diff --git a/Source/Informes/1/InformeIVAProveedores.fr3 b/Source/Informes/1/InformeIVAProveedores.fr3 index 3e33eac2..4560eb82 100644 --- a/Source/Informes/1/InformeIVAProveedores.fr3 +++ b/Source/Informes/1/InformeIVAProveedores.fr3 @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -23,9 +23,9 @@ - + - + @@ -41,5 +41,24 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Source/Informes/1/InformeIVAProveedoresDesglosado.fr3 b/Source/Informes/1/InformeIVAProveedoresDesglosado.fr3 index da04b390..5f66dbcd 100644 --- a/Source/Informes/1/InformeIVAProveedoresDesglosado.fr3 +++ b/Source/Informes/1/InformeIVAProveedoresDesglosado.fr3 @@ -1,31 +1,32 @@ - + - + - + - + + - - + + - + @@ -36,13 +37,31 @@ - + - + + + + + + + + + + + + + + + + + + + - + diff --git a/Source/Informes/1/InformeListadoFacturasProveedor.fr3 b/Source/Informes/1/InformeListadoFacturasProveedor.fr3 index 9fea41e2..e5b58705 100644 --- a/Source/Informes/1/InformeListadoFacturasProveedor.fr3 +++ b/Source/Informes/1/InformeListadoFacturasProveedor.fr3 @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -21,9 +21,9 @@ - + - + @@ -31,17 +31,36 @@ - - - + + + - + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Informes/1/InformeListadoFacturasProveedorDesglosado.fr3 b/Source/Informes/1/InformeListadoFacturasProveedorDesglosado.fr3 index 99f39e7c..d5e807f2 100644 --- a/Source/Informes/1/InformeListadoFacturasProveedorDesglosado.fr3 +++ b/Source/Informes/1/InformeListadoFacturasProveedorDesglosado.fr3 @@ -1,5 +1,5 @@ - + @@ -12,39 +12,58 @@ - + - + - + - - + + - + - - - - - + + + + + - - - - + + + + - + + + + + + + + + + + + + + + + + + + + - + diff --git a/Source/Informes/1/InformeListadoFacturasProveedorPendientes.fr3 b/Source/Informes/1/InformeListadoFacturasProveedorPendientes.fr3 index f76df4d9..09768af3 100644 --- a/Source/Informes/1/InformeListadoFacturasProveedorPendientes.fr3 +++ b/Source/Informes/1/InformeListadoFacturasProveedorPendientes.fr3 @@ -1,42 +1,57 @@ - + - - - + + + - + - + - - - - - + + + + + - + + - - - - - - - + + + + + + + + - - - + + + + + + + + + + + + + + + + diff --git a/Source/Informes/1/InformeListadoFacturasProveedorPendientesDesglosado.fr3 b/Source/Informes/1/InformeListadoFacturasProveedorPendientesDesglosado.fr3 index b29a6896..7c936462 100644 --- a/Source/Informes/1/InformeListadoFacturasProveedorPendientesDesglosado.fr3 +++ b/Source/Informes/1/InformeListadoFacturasProveedorPendientesDesglosado.fr3 @@ -1,5 +1,5 @@ - + @@ -12,35 +12,50 @@ - + + - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + - - - + + + - - - + + + + + + + + - + + + + + + + + diff --git a/Source/Modulos/Facturas de proveedor/FacturasProveedor_Group.groupproj b/Source/Modulos/Facturas de proveedor/FacturasProveedor_Group.groupproj index 054f7fc0..6a7fd52b 100644 --- a/Source/Modulos/Facturas de proveedor/FacturasProveedor_Group.groupproj +++ b/Source/Modulos/Facturas de proveedor/FacturasProveedor_Group.groupproj @@ -16,6 +16,7 @@ + @@ -261,14 +262,23 @@ + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Facturas de proveedor/Reports/uRptFacturasProveedor_Server.dfm b/Source/Modulos/Facturas de proveedor/Reports/uRptFacturasProveedor_Server.dfm index 67f26cec..fa322f73 100644 --- a/Source/Modulos/Facturas de proveedor/Reports/uRptFacturasProveedor_Server.dfm +++ b/Source/Modulos/Facturas de proveedor/Reports/uRptFacturasProveedor_Server.dfm @@ -445,8 +445,10 @@ object RptFacturasProveedor: TRptFacturasProveedor 'CIEMBRE - '#39' || extract (year from fecha_vencimiento)'#10'end as TITU' + 'LO,'#10'REFERENCIA, ID_PROVEEDOR, NOMBRE, SITUACION, NIF_CIF, FECHA' + '_FACTURA, FECHA_VENCIMIENTO, BASE_IMPONIBLE, IMPORTE_IVA, IMPORT' + - 'E_TOTAL'#10#10'from V_facturas_proveedor'#10'where {where}'#10'order by ANO, M' + - 'ES, fecha_vencimiento, NOMBRE'#10#10 + 'E_TOTAL,'#10'case'#10'when strlen(DATOS_BANCARIOS) = 0 then '#39'Sin cuenta ' + + 'bancaria'#39#10'else DATOS_BANCARIOS'#10'end as DATOS_BANCARIOS'#10#10#10'from V_f' + + 'acturas_proveedor'#10'where {where}'#10'order by ANO, MES, fecha_vencimi' + + 'ento, NOMBRE'#10#10 StatementType = stSQL ColumnMappings = < item @@ -507,6 +509,10 @@ object RptFacturasProveedor: TRptFacturasProveedor item DatasetField = 'IMPORTE_TOTAL' TableField = 'IMPORTE_TOTAL' + end + item + DatasetField = 'DATOS_BANCARIOS' + TableField = 'DATOS_BANCARIOS' end> end> Name = 'InformeListadoFacturasPendientes' @@ -571,6 +577,11 @@ object RptFacturasProveedor: TRptFacturasProveedor item Name = 'IMPORTE_TOTAL' DataType = datCurrency + end + item + Name = 'DATOS_BANCARIOS' + DataType = datString + Size = 255 end> end item @@ -729,6 +740,192 @@ object RptFacturasProveedor: TRptFacturasProveedor Name = 'IMPORTE_TOTAL' DataType = datCurrency end> + end + item + Params = <> + Statements = < + item + Connection = 'IBX' + Default = True + SQL = + 'select ID_EMPRESA,'#10'extract (year from fecha_vencimiento) as ANO,' + + #10'extract (month from fecha_vencimiento) as MES,'#10'case'#10'when extrac' + + 't (month from fecha_vencimiento) = 1 then '#39'ENERO - '#39' || extract ' + + '(year from fecha_vencimiento)'#10'when extract (month from fecha_ven' + + 'cimiento) = 2 then '#39'FEBRERO - '#39' || extract (year from fecha_venc' + + 'imiento)'#10'when extract (month from fecha_vencimiento) = 3 then '#39'M' + + 'ARZO - '#39' || extract (year from fecha_vencimiento)'#10'when extract (' + + 'month from fecha_vencimiento) = 4 then '#39'ABRIL - '#39' || extract (ye' + + 'ar from fecha_vencimiento)'#10'when extract (month from fecha_vencim' + + 'iento) = 5 then '#39'MAYO - '#39' || extract (year from fecha_vencimient' + + 'o)'#10'when extract (month from fecha_vencimiento) = 6 then '#39'JUNIO -' + + ' '#39' || extract (year from fecha_vencimiento)'#10'when extract (month ' + + 'from fecha_vencimiento) = 7 then '#39'JULIO - '#39' || extract (year fro' + + 'm fecha_vencimiento)'#10'when extract (month from fecha_vencimiento)' + + ' = 8 then '#39'AGOSTO - '#39' || extract (year from fecha_vencimiento)'#10'w' + + 'hen extract (month from fecha_vencimiento) = 9 then '#39'SEPTIEMBRE ' + + '- '#39' || extract (year from fecha_vencimiento)'#10'when extract (month' + + ' from fecha_vencimiento) = 10 then '#39'OCTUBRE - '#39' || extract (year' + + ' from fecha_vencimiento)'#10'when extract (month from fecha_vencimie' + + 'nto) = 11 then '#39'NOVIEMBRE - '#39' || extract (year from fecha_vencim' + + 'iento)'#10'when extract (month from fecha_vencimiento) = 12 then '#39'DI' + + 'CIEMBRE - '#39' || extract (year from fecha_vencimiento)'#10'end as TITU' + + 'LO,'#10'case'#10'when strlen(DATOS_BANCARIOS) = 0 then '#39'Sin cuenta banca' + + 'ria'#39#10'else DATOS_BANCARIOS'#10'end as DATOS_BANCARIOS,'#10'sum(IMPORTE_TO' + + 'TAL) as importe_total'#10#10'from V_facturas_proveedor'#10#10'group by 1,2,3' + + ',4,5'#10'order by 1,2,3,4,5'#10#10#10 + StatementType = stSQL + ColumnMappings = < + item + DatasetField = 'ID_EMPRESA' + TableField = 'ID_EMPRESA' + end + item + DatasetField = 'ANO' + TableField = 'ANO' + end + item + DatasetField = 'MES' + TableField = 'MES' + end + item + DatasetField = 'TITULO' + TableField = 'TITULO' + end + item + DatasetField = 'DATOS_BANCARIOS' + TableField = 'DATOS_BANCARIOS' + end + item + DatasetField = 'IMPORTE_TOTAL' + TableField = 'IMPORTE_TOTAL' + end> + end> + Name = 'InformeListadoFacturasPendientesResumen' + Fields = < + item + Name = 'ID_EMPRESA' + DataType = datInteger + end + item + Name = 'ANO' + DataType = datSmallInt + end + item + Name = 'MES' + DataType = datSmallInt + end + item + Name = 'TITULO' + DataType = datString + Size = 19 + end + item + Name = 'DATOS_BANCARIOS' + DataType = datString + Size = 255 + end + item + Name = 'IMPORTE_TOTAL' + DataType = datCurrency + end> + end + item + Params = <> + Statements = < + item + Connection = 'IBX' + TargetTable = 'V_FACTURAS_PROVEEDOR' + SQL = + 'select ID_EMPRESA,'#10'extract (year from fecha_factura) as ANO,'#10'ext' + + 'ract (month from fecha_factura) as MES,'#10'case'#10'when extract (month' + + ' from fecha_factura) = 1 then '#39'ENERO - '#39' || extract (year from f' + + 'echa_factura)'#10'when extract (month from fecha_factura) = 2 then '#39 + + 'FEBRERO - '#39' || extract (year from fecha_factura)'#10'when extract (m' + + 'onth from fecha_factura) = 3 then '#39'MARZO - '#39' || extract (year fr' + + 'om fecha_factura)'#10'when extract (month from fecha_factura) = 4 th' + + 'en '#39'ABRIL - '#39' || extract (year from fecha_factura)'#10'when extract ' + + '(month from fecha_factura) = 5 then '#39'MAYO - '#39' || extract (year f' + + 'rom fecha_factura)'#10'when extract (month from fecha_factura) = 6 t' + + 'hen '#39'JUNIO - '#39' || extract (year from fecha_factura)'#10'when extract' + + ' (month from fecha_factura) = 7 then '#39'JULIO - '#39' || extract (year' + + ' from fecha_factura)'#10'when extract (month from fecha_factura) = 8' + + ' then '#39'AGOSTO - '#39' || extract (year from fecha_factura)'#10'when extr' + + 'act (month from fecha_factura) = 9 then '#39'SEPTIEMBRE - '#39' || extra' + + 'ct (year from fecha_factura)'#10'when extract (month from fecha_fact' + + 'ura) = 10 then '#39'OCTUBRE - '#39' || extract (year from fecha_factura)' + + #10'when extract (month from fecha_factura) = 11 then '#39'NOVIEMBRE - ' + + #39' || extract (year from fecha_factura)'#10'when extract (month from ' + + 'fecha_factura) = 12 then '#39'DICIEMBRE - '#39' || extract (year from fe' + + 'cha_factura)'#10'end as TITULO,'#10'sum(BASE_IMPONIBLE) as BASE_IMPONIBL' + + 'E,'#10'sum(IMPORTE_IVA) as IMPORTE_IVA,'#10'sum(IMPORTE_TOTAL) AS IMPORT' + + 'E_TOTAL'#10'from V_facturas_proveedor'#10'group by 1,2,3,4'#10'order by 1,2,' + + '3,4'#10#10#10#10 + StatementType = stSQL + ColumnMappings = < + item + DatasetField = 'ID_EMPRESA' + TableField = 'ID_EMPRESA' + end + item + DatasetField = 'ANO' + TableField = '' + SQLOrigin = 'ANO' + end + item + DatasetField = 'MES' + TableField = '' + SQLOrigin = 'MES' + end + item + DatasetField = 'TITULO' + TableField = '' + SQLOrigin = 'TITULO' + end + item + DatasetField = 'BASE_IMPONIBLE' + TableField = 'BASE_IMPONIBLE' + end + item + DatasetField = 'IMPORTE_IVA' + TableField = 'IMPORTE_IVA' + end + item + DatasetField = 'IMPORTE_TOTAL' + TableField = 'IMPORTE_TOTAL' + end> + end> + Name = 'InformeListadoFacturasResumen' + Fields = < + item + Name = 'ID_EMPRESA' + DataType = datInteger + end + item + Name = 'ANO' + DataType = datSmallInt + end + item + Name = 'MES' + DataType = datSmallInt + end + item + Name = 'TITULO' + DataType = datString + Size = 19 + end + item + Name = 'BASE_IMPONIBLE' + DataType = datCurrency + end + item + Name = 'IMPORTE_IVA' + DataType = datCurrency + end + item + Name = 'IMPORTE_TOTAL' + DataType = datCurrency + end> end> JoinDataTables = <> UnionDataTables = <> @@ -1226,10 +1423,6 @@ object RptFacturasProveedor: TRptFacturasProveedor Size = 255 end end - object DABINAdapter: TDABINAdapter - Left = 48 - Top = 80 - end object DADSCabecera: TDADataSource DataSet = tbl_Cabecera.Dataset DataTable = tbl_Cabecera @@ -1311,7 +1504,7 @@ object RptFacturasProveedor: TRptFacturasProveedor StreamingOptions = [soDisableEventsWhileStreaming] RemoteFetchEnabled = False LocalSchema = schReport - LocalDataStreamer = DABINAdapter + LocalDataStreamer = Bin2DataStreamer DetailFields = 'ID_FACTURA' DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] @@ -1471,7 +1664,7 @@ object RptFacturasProveedor: TRptFacturasProveedor StreamingOptions = [soDisableEventsWhileStreaming] RemoteFetchEnabled = False LocalSchema = schReport - LocalDataStreamer = DABINAdapter + LocalDataStreamer = Bin2DataStreamer DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'InformeFacturasProveedor' @@ -1517,7 +1710,7 @@ object RptFacturasProveedor: TRptFacturasProveedor PrintOptions.Printer = 'Por defecto' PrintOptions.PrintOnSheet = 0 ReportOptions.CreateDate = 37800.807714351900000000 - ReportOptions.LastChange = 39741.448087719910000000 + ReportOptions.LastChange = 39835.653141990740000000 ScriptLanguage = 'PascalScript' ScriptText.Strings = ( 'procedure frxReportOnStartReport(Sender: TfrxComponent);' @@ -1557,6 +1750,14 @@ object RptFacturasProveedor: TRptFacturasProveedor ' end; ' 'end;' '' + 'procedure CabParametrosOnBeforePrint(Sender: TfrxComponent);' + 'begin' + ' if = null then' + + ' CabParametros.Visible := False; ' + + ' ' + 'end;' + '' 'begin' '' 'end.') @@ -1681,7 +1882,7 @@ object RptFacturasProveedor: TRptFacturasProveedor StreamingOptions = [soDisableEventsWhileStreaming] RemoteFetchEnabled = False LocalSchema = schReport - LocalDataStreamer = DABINAdapter + LocalDataStreamer = Bin2DataStreamer DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'InformeListadoFacturas' @@ -1765,13 +1966,18 @@ object RptFacturasProveedor: TRptFacturasProveedor item Name = 'IMPORTE_TOTAL' DataType = datCurrency + end + item + Name = 'DATOS_BANCARIOS' + DataType = datString + Size = 255 end> Params = <> LogChanges = False StreamingOptions = [soDisableEventsWhileStreaming] RemoteFetchEnabled = False LocalSchema = schReport - LocalDataStreamer = DABINAdapter + LocalDataStreamer = Bin2DataStreamer DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'InformeListadoFacturasPendientes' @@ -1792,4 +1998,91 @@ object RptFacturasProveedor: TRptFacturasProveedor Left = 768 Top = 16 end + object DADSInformeListadoFacturasPendResumen: TDADataSource + DataSet = tbl_InformeListadoFacturasPendResumen.Dataset + DataTable = tbl_InformeListadoFacturasPendResumen + Left = 768 + Top = 264 + end + object frxDBInformeListadoFacturasPendResumen: TfrxDBDataset + UserName = 'frxDBInformeListadoFacturasPendResumen' + CloseDataSource = True + DataSource = DADSInformeListadoFacturasPendResumen + Left = 768 + Top = 208 + end + object frxDBInformeListadoFacturasResumen: TfrxDBDataset + UserName = 'frxDBInformeListadoFacturasResumen' + CloseDataSource = True + DataSource = DADSInformeListadoFacturasResumen + Left = 576 + Top = 216 + end + object DADSInformeListadoFacturasResumen: TDADataSource + DataSet = tbl_InformeListadoFacturasResumen.Dataset + DataTable = tbl_InformeListadoFacturasResumen + Left = 576 + Top = 272 + end + object tbl_InformeListadoFacturasResumen: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = < + item + Name = 'ID_EMPRESA' + DataType = datInteger + end + item + Name = 'ANO' + DataType = datSmallInt + end + item + Name = 'MES' + DataType = datSmallInt + end + item + Name = 'TITULO' + DataType = datString + Size = 19 + end + item + Name = 'BASE_IMPONIBLE' + DataType = datCurrency + end + item + Name = 'IMPORTE_IVA' + DataType = datCurrency + end + item + Name = 'IMPORTE_TOTAL' + DataType = datCurrency + end> + Params = <> + MasterMappingMode = mmDataRequest + LogChanges = False + StreamingOptions = [soDisableEventsWhileStreaming] + RemoteFetchEnabled = False + DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] + MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] + IndexDefs = <> + Left = 576 + Top = 328 + end + object tbl_InformeListadoFacturasPendResumen: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = <> + Params = <> + MasterMappingMode = mmDataRequest + LogChanges = False + StreamingOptions = [soDisableEventsWhileStreaming] + RemoteFetchEnabled = False + DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] + MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] + IndexDefs = <> + Left = 768 + Top = 328 + end + object Bin2DataStreamer: TDABin2DataStreamer + Left = 48 + Top = 88 + end end diff --git a/Source/Modulos/Facturas de proveedor/Reports/uRptFacturasProveedor_Server.pas b/Source/Modulos/Facturas de proveedor/Reports/uRptFacturasProveedor_Server.pas index f9d1bb58..87f8d5e5 100644 --- a/Source/Modulos/Facturas de proveedor/Reports/uRptFacturasProveedor_Server.pas +++ b/Source/Modulos/Facturas de proveedor/Reports/uRptFacturasProveedor_Server.pas @@ -8,7 +8,7 @@ uses uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient, frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes, uDAInterfaces, uDADataStreamer, IBCustomDataSet, IBQuery, IBDatabase, - uDAMemDataTable, FactuGES_Intf, frxExportPDF; + uDAMemDataTable, FactuGES_Intf, frxExportPDF, uDABin2DataStreamer; type TRptFacturasProveedor = class(TDataModule) @@ -21,7 +21,6 @@ type DataSource2: TDataSource; cabecera: TIBQuery; detalles: TIBQuery; - DABINAdapter: TDABINAdapter; DADSCabecera: TDADataSource; DADSDetalles: TDADataSource; tbl_Detalles: TDAMemDataTable; @@ -83,11 +82,28 @@ type tbl_InformeListadoFacturasPendientes: TDAMemDataTable; DADSInformeListadoFacturasPendientes: TDADataSource; frxDBInformeListadoFacturasPendientes: TfrxDBDataset; + DADSInformeListadoFacturasPendResumen: TDADataSource; + frxDBInformeListadoFacturasPendResumen: TfrxDBDataset; + frxDBInformeListadoFacturasResumen: TfrxDBDataset; + DADSInformeListadoFacturasResumen: TDADataSource; + tbl_InformeListadoFacturasResumen: TDAMemDataTable; + tbl_InformeListadoFacturasPendResumen: TDAMemDataTable; + Bin2DataStreamer: TDABin2DataStreamer; schReport: TDASchema; procedure DataModuleCreate(Sender: TObject); private FConnection: IDAConnection; - function _GenerarInforme(ATabla: TDAMemDataTable; const TipoInforme: String; const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const FechaVenInicio: Variant; const FechaVenFin: Variant; const ListaIDProveedores: TIntegerArray; const ImporteMinimo: Currency): Binary; + FIdEmpresa: Integer; + FFechaInicio: Variant; + FFechaFin: Variant; + FFechaVenInicio: Variant; + FFechaVenFin: Variant; + FListaIDProveedores: TIntegerArray; + FImporteMinimo: Currency; + + procedure PrepararTablaInforme(ATabla: TDAMemDataTable); + procedure PrepararTablaResumenInforme(ATabla: IDADataset); + function _GenerarInforme(const TipoInforme: String): Binary; public function GenerarInformeIVA(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; @@ -100,7 +116,7 @@ implementation {$R *.dfm} uses - uSistemaFunc, uDataModuleServer, schFacturasProveedorClient_Intf; + uSistemaFunc, StrUtils, uDataModuleServer, schFacturasProveedorClient_Intf; const rptInformeIVA = 'InformeIVAProveedores.fr3'; @@ -110,6 +126,10 @@ const rptInformeListadoFactuasProveedorPendiente = 'InformeListadoFacturasProveedorPendientes.fr3'; rptInformeListadoFactuasProveedorPendienteDesglosado = 'InformeListadoFacturasProveedorPendientesDesglosado.fr3'; + { Dataset names for schReport } + ds_InformeListadoFacturasResumen = 'InformeListadoFacturasResumen'; + ds_InformeListadoFacturasPendientesResumen = 'InformeListadoFacturasPendientesResumen'; + { TRptFacturasProveedor } @@ -129,16 +149,59 @@ function TRptFacturasProveedor.GenerarInformeIVA(const IdEmpresa: Integer; const ImporteMinimo: Currency): Binary; var ATipoInforme: String; + AStream: TMemoryStream; + dsMaster: IDADataset; begin + FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" -//DESGLOSADO POR PROVEEDOR EN ESTE INFORME NO SE DESGLOSARÁ POR PROVEEDOR + AStream := TMemoryStream.Create; + try + //Inicializamos parametros + FIdEmpresa := IdEmpresa; + FFechaInicio := FechaInicio; + FFechaFin := FechaFin; + FFechaVenInicio := Null; + FFechaVenFin := Null; + FImporteMinimo := ImporteMinimo; + + if Assigned(FListaIDProveedores) then + FListaIDProveedores.Free; + FListaIDProveedores := ListaIDProveedores; + + //Se van a prepara las tablas del informe + if tbl_InformeListadoFacturas.Active then + tbl_InformeListadoFacturas.Active := False; + PrepararTablaInforme(tbl_InformeListadoFacturas); + + //Se prepara la tabla del listado resumen del informe + if tbl_InformeListadoFacturasResumen.Active then + tbl_InformeListadoFacturasResumen.Active := False; + dsMaster := schReport.NewDataset(FConnection, ds_InformeListadoFacturasResumen, [], [], False); + PrepararTablaResumenInforme(dsMaster); + //Esto se hace para rellenar la tabla del datamodule que usa el informe. + dsMaster.Open; + AStream.Clear; + Bin2DataStreamer.WriteDataset(AStream, dsMaster, [woRows, woSchema], -1); + Bin2DataStreamer.ReadDataset(AStream, tbl_InformeListadoFacturasResumen, TRUE, '', TRUE, TRUE); + + //DESGLOSADO POR PROVEEDOR EN ESTE INFORME NO SE DESGLOSARÁ POR PROVEEDOR if Desglosado then ATipoInforme := rptInformeIVADesglosado else ATipoInforme := rptInformeIVA; - Result := _GenerarInforme(tbl_InformeListadoFacturas, ATipoInforme, IdEmpresa, FechaInicio, FechaFin, Null, Null, ListaIDProveedores, ImporteMinimo); + //Finalmente se abren las tablas del informe + tbl_InformeListadoFacturas.Active := True; + tbl_InformeListadoFacturasResumen.Active := True; + + Result := _GenerarInforme(ATipoInforme); + + finally + AStream.Free; + dsMaster := Nil; + FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" + end; end; function TRptFacturasProveedor.GenerarInformeListadoFacturas( @@ -148,16 +211,59 @@ function TRptFacturasProveedor.GenerarInformeListadoFacturas( const ImporteMinimo: Currency): Binary; var ATipoInforme: String; - -begin + AStream: TMemoryStream; + dsMaster: IDADataset; -//DESGLOSADO POR PROVEEDOR EN ESTE INFORME NO SE DESGLOSARÁ POR PROVEEDOR +begin + FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" + + AStream := TMemoryStream.Create; + try + //Inicializamos parametros + FIdEmpresa := IdEmpresa; + FFechaInicio := FechaInicio; + FFechaFin := FechaFin; + FFechaVenInicio := FechaVenInicio; + FFechaVenFin := FechaVenFin; + FImporteMinimo := ImporteMinimo; + + if Assigned(FListaIDProveedores) then + FListaIDProveedores.Free; + FListaIDProveedores := ListaIDProveedores; + + //Se prepara la tabla del listado general del informe + if tbl_InformeListadoFacturas.Active then + tbl_InformeListadoFacturas.Active := False; + PrepararTablaInforme(tbl_InformeListadoFacturas); + + //Se prepara la tabla del listado resumen del informe + if tbl_InformeListadoFacturasResumen.Active then + tbl_InformeListadoFacturasResumen.Active := False; + dsMaster := schReport.NewDataset(FConnection, ds_InformeListadoFacturasResumen, [], [], False); + PrepararTablaResumenInforme(dsMaster); + //Esto se hace para rellenar la tabla del datamodule que usa el informe. + dsMaster.Open; + AStream.Clear; + Bin2DataStreamer.WriteDataset(AStream, dsMaster, [woRows, woSchema], -1); + Bin2DataStreamer.ReadDataset(AStream, tbl_InformeListadoFacturasResumen, TRUE, '', TRUE, TRUE); + + //DESGLOSADO POR PROVEEDOR EN ESTE INFORME NO SE DESGLOSARÁ POR PROVEEDOR if Desglosado then ATipoInforme := rptInformeListadoFacturasProveedorDesglosado else ATipoInforme := rptInformeListadoFacturasProveedor; - Result := _GenerarInforme(tbl_InformeListadoFacturas, ATipoInforme, IdEmpresa, FechaInicio, FechaFin, FechaVenInicio, FechaVenFin, ListaIDProveedores, ImporteMinimo); + //Finalmente se abren las tablas del informe + tbl_InformeListadoFacturas.Active := True; + tbl_InformeListadoFacturasResumen.Active := True; + + Result := _GenerarInforme(ATipoInforme); + + finally + AStream.Free; + dsMaster := Nil; + FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" + end; end; function TRptFacturasProveedor.GenerarInformeListadoFacturasPendientes( @@ -168,15 +274,36 @@ function TRptFacturasProveedor.GenerarInformeListadoFacturasPendientes( var Condicion: TDAWhereExpression; ATipoInforme: String; + AStream: TMemoryStream; + dsMaster: IDADataset; begin + FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" + + AStream := TMemoryStream.Create; + try + //Inicializamos parametros + FIdEmpresa := IdEmpresa; + FFechaInicio := FechaInicio; + FFechaFin := FechaFin; + FFechaVenInicio := FechaVenInicio; + FFechaVenFin := FechaVenFin; + FImporteMinimo := ImporteMinimo; + + if Assigned(FListaIDProveedores) then + FListaIDProveedores.Free; + FListaIDProveedores := ListaIDProveedores; + + + //Se prepara la tabla del listado general del informe if tbl_InformeListadoFacturasPendientes.Active then - tbl_InformeListadoFacturasPendientes.Active := False; + tbl_InformeListadoFacturasPendientes.Active := False; + PrepararTablaInforme(tbl_InformeListadoFacturasPendientes); // Filtrar el informe por situacion with tbl_InformeListadoFacturasPendientes.DynamicWhere do begin - // (ID_EMPRESA >= ID) + // (SITUACION >= PAGADA) Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorSITUACION), NewConstant('PAGADA', datString), dboNotEqual); if IsEmpty then Expression := Condicion @@ -184,127 +311,186 @@ begin Expression := NewBinaryExpression(Expression, Condicion, dboAnd); end; + //Se prepara la tabla del listado resumen del informe + if tbl_InformeListadoFacturasPendResumen.Active then + tbl_InformeListadoFacturasPendResumen.Active := False; -//DESGLOSADO POR PROVEEDOR EN ESTE INFORME + dsMaster := schReport.NewDataset(FConnection, ds_InformeListadoFacturasPendientesResumen, [], [], False); + PrepararTablaResumenInforme(dsMaster); + // Filtrar el informe por situacion + dsMaster.Where.AddText(' AND (SITUACION <> ''PAGADA'')'); + //Esto se hace para rellenar la tabla del datamodule que usa el informe. + dsMaster.Open; + AStream.Clear; + Bin2DataStreamer.WriteDataset(AStream, dsMaster, [woRows, woSchema], -1); + Bin2DataStreamer.ReadDataset(AStream, tbl_InformeListadoFacturasPendResumen, TRUE, '', TRUE, TRUE); + + //DESGLOSADO POR PROVEEDOR EN ESTE INFORME if Desglosado then ATipoInforme := rptInformeListadoFactuasProveedorPendienteDesglosado else ATipoInforme := rptInformeListadoFactuasProveedorPendiente; + //Finalmente se abren las tablas del informe + tbl_InformeListadoFacturasPendientes.Active := True; + tbl_InformeListadoFacturasPendResumen.Active := True; - Result := _GenerarInforme(tbl_InformeListadoFacturasPendientes, ATipoInforme, IdEmpresa, FechaInicio, FechaFin, FechaVenInicio, FechaVenFin, ListaIDProveedores, ImporteMinimo); + Result := _GenerarInforme(ATipoInforme); + + finally + AStream.Free; + dsMaster := Nil; + FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" + end; end; -function TRptFacturasProveedor._GenerarInforme(ATabla: TDAMemDataTable; const TipoInforme: String; - const IdEmpresa: Integer; const FechaInicio, FechaFin: Variant; - const FechaVenInicio: Variant; const FechaVenFin: Variant; - const ListaIDProveedores: TIntegerArray; const ImporteMinimo: Currency): Binary; +procedure TRptFacturasProveedor.PrepararTablaInforme(ATabla: TDAMemDataTable); var Condicion: TDAWhereExpression; i: Integer; - AInforme: Variant; begin - Result := Binary.Create; - FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" + // Filtrar el informe por empresa + with ATabla.DynamicWhere do + begin + // (ID_EMPRESA >= ID) + Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorID_EMPRESA), NewConstant(FIdEmpresa, datInteger), dboEqual); + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; - try - - if ATabla.Active then - ATabla.Active := False; - - // Filtrar el informe por empresa + // Filtrar el informe por fechas + if not VarIsNull(FFechaInicio) + and not VarIsNull(FFechaFin) then + begin with ATabla.DynamicWhere do begin - // (ID_EMPRESA >= ID) - Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorID_EMPRESA), NewConstant(IdEmpresa, datInteger), dboEqual); + // (FECHA_INICIO between FECHA_FIN) + Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorFECHA_FACTURA), NewConstant(FFechaInicio, datDateTime), dboGreaterOrEqual); + Condicion := NewBinaryExpression(NewBinaryExpression(NewField('', fld_FacturasProveedorFECHA_FACTURA), NewConstant(FFechaFin, datDateTime), dboLessOrEqual), Condicion, dboAnd); if IsEmpty then Expression := Condicion else Expression := NewBinaryExpression(Expression, Condicion, dboAnd); end; + end; - // Filtrar el informe por fechas - if not VarIsNull(FechaInicio) - and not VarIsNull(FechaFin) then + // Filtrar el informe por fechas de vencimiento + if not VarIsNull(FFechaVenInicio) + and not VarIsNull(FFechaVenFin) then + begin + with ATabla.DynamicWhere do begin - with ATabla.DynamicWhere do + // (FECHA_VENCIMIENTO_INICIO between FECHA_VENCIMIENTO_FIN) + Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorFECHA_VENCIMIENTO), NewConstant(FFechaVenInicio, datDateTime), dboGreaterOrEqual); + Condicion := NewBinaryExpression(NewBinaryExpression(NewField('', fld_FacturasProveedorFECHA_VENCIMIENTO), NewConstant(FFechaVenFin, datDateTime), dboLessOrEqual), Condicion, dboAnd); + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + end; + + // Filtrar el informe por proveedor + if Assigned(FListaIDProveedores) then + begin + with ATabla.DynamicWhere do + begin + for i := 0 to FListaIDProveedores.Count - 1 do begin - // (FECHA_INICIO between FECHA_FIN) - Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorFECHA_FACTURA), NewConstant(FechaInicio, datDateTime), dboGreaterOrEqual); - Condicion := NewBinaryExpression(NewBinaryExpression(NewField('', fld_FacturasProveedorFECHA_FACTURA), NewConstant(FechaFin, datDateTime), dboLessOrEqual), Condicion, dboAnd); + + // (ID_PROVEEDOR = ID) + Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorID_PROVEEDOR), NewConstant(FListaIDProveedores.Items[i], datInteger), dboEqual); if IsEmpty then Expression := Condicion else Expression := NewBinaryExpression(Expression, Condicion, dboAnd); - end; + end; end; + end; - // Filtrar el informe por fechas de vencimiento - if not VarIsNull(FechaVenInicio) - and not VarIsNull(FechaVenFin) then + // Filtrar el informe por importe minimo + if (FImporteMinimo > 0) then + begin + with ATabla.DynamicWhere do begin - with ATabla.DynamicWhere do - begin - // (FECHA_VENCIMIENTO_INICIO between FECHA_VENCIMIENTO_FIN) - Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorFECHA_VENCIMIENTO), NewConstant(FechaVenInicio, datDateTime), dboGreaterOrEqual); - Condicion := NewBinaryExpression(NewBinaryExpression(NewField('', fld_FacturasProveedorFECHA_VENCIMIENTO), NewConstant(FechaVenFin, datDateTime), dboLessOrEqual), Condicion, dboAnd); - if IsEmpty then - Expression := Condicion - else - Expression := NewBinaryExpression(Expression, Condicion, dboAnd); - end; + // (IMPORTE_TOTAL > ImporteMinimo) + Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorIMPORTE_TOTAL), NewConstant(FImporteMinimo, datCurrency), dboGreaterOrEqual); + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); end; + end; +end; - // Filtrar el informe por proveedor - if Assigned(ListaIDProveedores) then +procedure TRptFacturasProveedor.PrepararTablaResumenInforme(ATabla: IDADataset); +var + i: Integer; + AWhereStr : String; + +begin + // Filtrar el informe por empresa + AWhereStr := ' (' + fld_FacturasProveedorID_EMPRESA + ' = ' + IntToStr(FIdEmpresa) + ') '; + + // Filtrar el informe por fechas + if not VarIsNull(FFechaInicio) + and not VarIsNull(FFechaFin) then + begin + if Length(AWhereStr) > 0 then + AWhereStr := AWhereStr + 'AND'; + AWhereStr := AWhereStr + ' (' + fld_FacturasProveedorFECHA_FACTURA + ' between ''' + ReplaceStr(VarToStr(FFechaInicio),'/','.') + ''' and ''' + ReplaceStr(VarToStr(FFechaFin),'/','.') + ''') '; + end; + + // Filtrar el informe por fechas de vencimiento + if not VarIsNull(FFechaVenInicio) + and not VarIsNull(FFechaVenFin) then + begin + if Length(AWhereStr) > 0 then + AWhereStr := AWhereStr + 'AND'; + AWhereStr := AWhereStr + ' (' + fld_FacturasProveedorFECHA_VENCIMIENTO + ' between ''' + ReplaceStr(VarToStr(FFechaVenInicio),'/','.') + ''' and ''' + ReplaceStr(VarToStr(FFechaVenFin),'/','.') + ''') '; + end; + + // Filtrar el informe por proveedor + if Assigned(FListaIDProveedores) then + begin + for i := 0 to FListaIDProveedores.Count - 1 do begin - with ATabla.DynamicWhere do - begin - for i := 0 to ListaIDProveedores.Count - 1 do - begin - - // (ID_PROVEEDOR = ID) - Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorID_PROVEEDOR), NewConstant(ListaIDProveedores.Items[i], datInteger), dboEqual); - if IsEmpty then - Expression := Condicion - else - Expression := NewBinaryExpression(Expression, Condicion, dboAnd); - end; - end; + if Length(AWhereStr) > 0 then + AWhereStr := AWhereStr + 'AND'; + AWhereStr := AWhereStr + ' (' + fld_FacturasProveedorID_PROVEEDOR + ' = ' + IntToStr(FListaIDProveedores.Items[i]) + ') '; end; + end; - // Filtrar el informe por importe minimo - if (ImporteMinimo > 0) then - begin - with ATabla.DynamicWhere do - begin - // (IMPORTE_TOTAL > ImporteMinimo) - Condicion := NewBinaryExpression(NewField('', fld_FacturasProveedorIMPORTE_TOTAL), NewConstant(ImporteMinimo, datCurrency), dboGreaterOrEqual); - if IsEmpty then - Expression := Condicion - else - Expression := NewBinaryExpression(Expression, Condicion, dboAnd); - end; - end; + // Filtrar el informe por importe minimo + if (FImporteMinimo > 0) then + begin + if Length(AWhereStr) > 0 then + AWhereStr := AWhereStr + 'AND'; + AWhereStr := AWhereStr + ' (' + fld_FacturasProveedorIMPORTE_TOTAL + ' >= ' + CurrToStr(FImporteMinimo) + ') '; + end; + ATabla.Where.AddText(AWhereStr); +end; - ATabla.Active := True; +function TRptFacturasProveedor._GenerarInforme(const TipoInforme: String): Binary; +var + AInforme: Variant; - AInforme := DarRutaFichero(DarRutaInformes, TipoInforme, IntTostr(IdEmpresa)); +begin + Result := Binary.Create; + AInforme := DarRutaFichero(DarRutaInformes, TipoInforme, IntTostr(FIdEmpresa)); if VarIsNull(AInforme) then raise Exception.Create (('Error Servidor: _GenerarInforme, no encuentra informe ' + TipoInforme)); frxReport.LoadFromFile(AInforme, True); - frxReport.Variables.Variables['FechaInicio'] := FechaInicio; - frxReport.Variables.Variables['FechaFin'] := FechaFin; + frxReport.Variables.Variables['FechaInicio'] := FFechaInicio; + frxReport.Variables.Variables['FechaFin'] := FFechaFin; frxReport.PrepareReport(False); frxReport.PreviewPages.SaveToStream(Result); - - finally - FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" - end; end; end. diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorPendientesReport.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorPendientesReport.dfm index e762203c..e3db8a31 100644 --- a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorPendientesReport.dfm +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorPendientesReport.dfm @@ -70,7 +70,7 @@ inherited fEditorInformeFacturasProveedorPendientesReport: TfEditorInformeFactur Width = 182 ExplicitWidth = 182 inherited Label3: TLabel - Width = 85 + Width = 172 end inherited edtFechaFin: TcxDateEdit Left = 76 @@ -109,7 +109,7 @@ inherited fEditorInformeFacturasProveedorPendientesReport: TfEditorInformeFactur Width = 182 ExplicitWidth = 182 inherited Label4: TLabel - Width = 160 + Width = 172 end inherited edtFechaVenFin: TcxDateEdit Left = 76 diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorPendientesReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorPendientesReport.pas index 10a55d1e..13727853 100644 --- a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorPendientesReport.pas +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorPendientesReport.pas @@ -54,7 +54,7 @@ implementation {$R *.dfm} -uses uROTypes, uGestorInformesController, uFactuGES_App; +uses uROTypes, DateUtils, uGestorInformesController, uFactuGES_App; { TfEditorGestorInformesReport } @@ -87,6 +87,10 @@ end; function TfEditorInformeFacturasProveedorPendientesReport.GetFechaFin: Variant; begin Result := frViewPeriodoFechas1.edtFechaFin.EditValue; + + //Esto es para quitar la hora del timestamp para que luego no me redondee al dia siguiente + if not VarIsNull(Result) then + Result := DateOf(frViewPeriodoFechas1.edtFechaFin.Date); end; function TfEditorInformeFacturasProveedorPendientesReport.GetFechaInicio: Variant; @@ -97,6 +101,10 @@ end; function TfEditorInformeFacturasProveedorPendientesReport.GetFechaVenFin: Variant; begin Result := frViewPeriodoFechas1.edtFechaVenFin.EditValue; + + //Esto es para quitar la hora del timestamp para que luego no me redondee al dia siguiente + if not VarIsNull(Result) then + Result := DateOf(frViewPeriodoFechas1.edtFechaVenFin.Date); end; function TfEditorInformeFacturasProveedorPendientesReport.GetFechaVenInicio: Variant; diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorReport.pas index 3f7fd418..62408cd9 100644 --- a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorReport.pas +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorReport.pas @@ -53,7 +53,7 @@ implementation {$R *.dfm} -uses uROTypes, uGestorInformesController, uFactuGES_App; +uses uROTypes, DateUtils, uGestorInformesController, uFactuGES_App; { TfEditorGestorInformesReport } @@ -86,6 +86,10 @@ end; function TfEditorInformeFacturasProveedorReport.GetFechaFin: Variant; begin Result := frViewPeriodoFechas1.edtFechaFin.EditValue; + + //Esto es para quitar la hora del timestamp para que luego no me redondee al dia siguiente + if not VarIsNull(Result) then + Result := DateOf(frViewPeriodoFechas1.edtFechaFin.Date); end; function TfEditorInformeFacturasProveedorReport.GetFechaInicio: Variant; @@ -96,6 +100,10 @@ end; function TfEditorInformeFacturasProveedorReport.GetFechaVenFin: Variant; begin Result := frViewPeriodoFechas1.edtFechaVenFin.EditValue; + + //Esto es para quitar la hora del timestamp para que luego no me redondee al dia siguiente + if not VarIsNull(Result) then + Result := DateOf(frViewPeriodoFechas1.edtFechaVenFin.Date); end; function TfEditorInformeFacturasProveedorReport.GetFechaVenInicio: Variant; diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAProveedoresReport.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAProveedoresReport.dfm index 0067dea3..1ebea350 100644 --- a/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAProveedoresReport.dfm +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAProveedoresReport.dfm @@ -70,7 +70,7 @@ inherited fEditorInformeIVAProveedoresReport: TfEditorInformeIVAProveedoresRepor Width = 182 ExplicitWidth = 182 inherited Label3: TLabel - Width = 85 + Width = 172 end inherited edtFechaFin: TcxDateEdit Left = 76 @@ -110,7 +110,7 @@ inherited fEditorInformeIVAProveedoresReport: TfEditorInformeIVAProveedoresRepor Visible = False ExplicitWidth = 182 inherited Label4: TLabel - Width = 160 + Width = 172 end inherited edtFechaVenFin: TcxDateEdit Style.LookAndFeel.SkinName = '' @@ -133,7 +133,6 @@ inherited fEditorInformeIVAProveedoresReport: TfEditorInformeIVAProveedoresRepor StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 212 end end end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAProveedoresReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAProveedoresReport.pas index ff8741e9..0c868dbe 100644 --- a/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAProveedoresReport.pas +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAProveedoresReport.pas @@ -49,7 +49,7 @@ implementation {$R *.dfm} -uses uROTypes, uGestorInformesController, uFactuGES_App; +uses uROTypes, DateUtils, uGestorInformesController, uFactuGES_App; { TfEditorGestorInformesReport } @@ -82,6 +82,10 @@ end; function TfEditorInformeIVAProveedoresReport.GetFechaFin: Variant; begin Result := frViewPeriodoFechas1.edtFechaFin.EditValue; + + //Esto es para quitar la hora del timestamp para que luego no me redondee al dia siguiente + if not VarIsNull(Result) then + Result := DateOf(frViewPeriodoFechas1.edtFechaFin.Date); end; function TfEditorInformeIVAProveedoresReport.GetFechaInicio: Variant; diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorElegirRecibosCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uEditorElegirRecibosCliente.dfm index da76fcee..fa380e88 100644 --- a/Source/Modulos/Recibos de cliente/Views/uEditorElegirRecibosCliente.dfm +++ b/Source/Modulos/Recibos de cliente/Views/uEditorElegirRecibosCliente.dfm @@ -51,10 +51,12 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente inherited TBXDock: TTBXDock Top = 171 Width = 670 + Height = 72 ExplicitTop = 171 ExplicitWidth = 670 + ExplicitHeight = 72 inherited tbxMain: TTBXToolbar - ExplicitWidth = 126 + ExplicitWidth = 269 inherited TBXItem5: TTBXItem Visible = False end @@ -66,12 +68,12 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente end end inherited tbxFiltro: TTBXToolbar - Left = 126 + Left = 269 Top = 23 DockPos = 104 DockRow = 1 Visible = False - ExplicitLeft = 126 + ExplicitLeft = 269 ExplicitTop = 23 inherited TBXItem34: TTBXItem Action = actQuitarFiltro2 @@ -81,8 +83,11 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente ExplicitWidth = 670 end inherited TBXTMain2: TTBXToolbar - Left = 334 - ExplicitLeft = 334 + Left = 330 + DockPos = 330 + Visible = False + ExplicitLeft = 330 + ExplicitHeight = 23 end end inherited StatusBar: TJvStatusBar @@ -137,18 +142,18 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente end end inherited frViewRecibosCliente1: TfrViewRecibosCliente [5] - Top = 246 + Top = 243 Width = 670 - Height = 260 - ExplicitTop = 246 + Height = 263 + ExplicitTop = 243 ExplicitWidth = 670 - ExplicitHeight = 260 + ExplicitHeight = 263 inherited cxGrid: TcxGrid Width = 670 - Height = 132 + Height = 135 RootLevelOptions.DetailTabsPosition = dtpNone ExplicitWidth = 670 - ExplicitHeight = 132 + ExplicitHeight = 135 inherited cxGridView: TcxGridDBTableView DataController.Summary.DefaultGroupSummaryItems = < item @@ -167,12 +172,6 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente Kind = skCount Column = frViewRecibosCliente1.cxGridViewFECHA_EMISION end> - inherited cxGridViewID_RECIBO_COMPENSADO: TcxGridDBColumn - Visible = False - end - inherited cxGridViewREFERENCIA_REC_COMPENSADO: TcxGridDBColumn - Visible = False - end end end inherited frViewFiltroBase1: TfrViewFiltroBase @@ -209,6 +208,16 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente ExplicitWidth = 351 Width = 351 end + inherited eLista: TcxComboBox + Left = 697 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 697 + ExplicitWidth = 215 + Width = 215 + end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 670 @@ -221,8 +230,8 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente end end inherited pnlAgrupaciones: TTBXDockablePanel - Top = 234 - ExplicitTop = 234 + Top = 237 + ExplicitTop = 237 ExplicitWidth = 670 inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 670 @@ -238,6 +247,14 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente BuiltInReportLink = True end end + inherited cxViewGridPopupMenu: TcxGridPopupMenu + PopupMenus = < + item + GridView = frViewRecibosCliente1.cxGridView + HitTypes = [gvhtCell] + Index = 0 + end> + end end object pnlFiltrar: TTBXDockablePanel [6] Left = 0 @@ -403,7 +420,7 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente Left = 288 Top = 160 end - inherited JsImprimirDialog: TJSDialog + inherited JsImprimirDialog: TJSDialog [16] Top = 160 end object EditorSeleccionActionList: TActionList diff --git a/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.dfm index a3b41ae4..4596a8ac 100644 --- a/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.dfm +++ b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.dfm @@ -141,6 +141,10 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente DataBinding.FieldName = 'REFERENCIA_REMESA' Width = 48 end + object cxGridViewDATOS_BANCARIOS: TcxGridDBColumn + Caption = 'Banco' + DataBinding.FieldName = 'DATOS_BANCARIOS' + end end inherited cxGridLevel: TcxGridLevel Caption = 'Todos' diff --git a/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.pas b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.pas index 8b5a6f83..cfdb2b3d 100644 --- a/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.pas +++ b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.pas @@ -48,6 +48,7 @@ type TBXSeparatorItem1: TTBXSeparatorItem; cxGridViewREFERENCIA_REC_COMPENSADO: TcxGridDBColumn; cxGridViewID_RECIBO_COMPENSADO: TcxGridDBColumn; + cxGridViewDATOS_BANCARIOS: TcxGridDBColumn; procedure cxGridViewICONOCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); diff --git a/Source/Modulos/Remesas de cliente/Views/uEditorRemesasCliente.dfm b/Source/Modulos/Remesas de cliente/Views/uEditorRemesasCliente.dfm index 42bb6e8d..df5df69d 100644 --- a/Source/Modulos/Remesas de cliente/Views/uEditorRemesasCliente.dfm +++ b/Source/Modulos/Remesas de cliente/Views/uEditorRemesasCliente.dfm @@ -45,7 +45,7 @@ inherited fEditorRemesasCliente: TfEditorRemesasCliente Width = 785 ExplicitWidth = 785 inherited tbxMain: TTBXToolbar - ExplicitWidth = 561 + ExplicitWidth = 704 object TBXSeparatorItem17: TTBXSeparatorItem [12] end end