diff --git a/Build/Build.fbp5 b/Build/Build.fbp5 index 5086d692..1cd1cc55 100644 --- a/Build/Build.fbp5 +++ b/Build/Build.fbp5 @@ -1269,7 +1269,7 @@ Comments= False 0 - False + True 0 1000 False @@ -7199,6 +7199,656 @@ Comments= + + + + 0 + + + + True + True + False + True + False + + 0 + False + 0 + 1000 + False + + + + 0 + + True + False + False + True + True + 0 + 1252 + 12 + Release + False + + + True + True + + False + + False + False + False + True + True + False + False + False + False + False + False + False + False + 3082 + + 1 + + 0 + 0 + False + 0 + + + True + 0 + + + rcBorland + 1000 + + False + False + False + False + [usPackages,usCompiler,usLinker,usVersionInfo] + False + False + + + + False + False + False + False + True + True + False + False + %package_path% + + + + False + %modules_dcp_path% + False + + False + + False + True + False + False + True + 4194304 + False + False + False + True + %library_path% + 0 + False + 0 + 1048576 + 16384 + + True + True + %output_path% + False + + False + fa8 + False + False + + True + True + False + False + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + + False + False + True + + + + + + 0 + + True + False + False + True + True + 0 + 1252 + 12 + Release + False + + + True + True + + False + + False + False + False + True + True + False + False + False + False + False + False + False + False + 3082 + + 1 + + 0 + 0 + False + 0 + + + True + 0 + + + rcBorland + 1000 + + False + False + False + False + [usPackages,usCompiler,usLinker,usVersionInfo] + False + False + + + + False + False + False + False + True + True + False + False + %package_path% + + + + False + %modules_dcp_path% + False + + False + + False + True + False + False + True + 4194304 + False + False + False + True + %library_path% + 0 + False + 0 + 1048576 + 16384 + + True + True + %output_path% + False + + False + fa8 + False + False + + True + True + False + False + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + + False + False + True + + + + + + 0 + + True + False + False + True + True + 0 + 1252 + 12 + Release + False + + + True + True + + False + + False + False + False + True + True + False + False + False + False + False + False + False + False + 3082 + + 1 + + 0 + 0 + False + 0 + + + True + 0 + + + rcBorland + 1000 + + False + False + False + False + [usPackages,usCompiler,usLinker,usVersionInfo] + False + False + + + + False + False + False + False + True + True + False + False + %package_path% + + + + False + %modules_dcp_path% + False + + False + + False + True + False + False + True + 4194304 + False + False + False + True + %library_path% + 0 + False + 0 + 1048576 + 16384 + + True + True + %output_path% + False + + False + fa8 + False + False + + True + True + False + False + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + + False + False + True + + + + + + 0 + + True + False + False + True + True + 0 + 1252 + 12 + Release + False + + + True + True + + False + + False + False + False + True + True + False + False + False + False + False + False + False + False + 3082 + + 1 + + 0 + 0 + False + 0 + + + True + 0 + + + rcBorland + 1000 + + False + False + False + False + [usPackages,usCompiler,usLinker,usVersionInfo] + False + False + + + + False + False + False + False + True + True + False + False + %package_path% + + + + False + %modules_dcp_path% + False + + False + + False + True + False + False + True + 4194304 + False + False + False + True + %library_path% + 0 + False + 0 + 1048576 + 16384 + + True + True + %output_path% + False + + False + fa8 + False + False + + True + True + False + False + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + + False + False + True + + + + + + 0 + + True + False + False + True + True + 0 + 1252 + 12 + Release + False + + + True + True + + False + + False + False + False + False + True + False + False + False + False + False + False + False + False + 3081 + + 1 + + 0 + 0 + False + 0 + + + True + 0 + + + rcBorland + 1000 + + False + False + False + False + [usPackages,usCompiler,usLinker,usVersionInfo] + False + False + + + + False + False + False + False + True + True + False + False + %package_path% + + + + False + %modules_dcp_path% + False + + False + + False + True + False + False + True + 4194304 + False + False + False + True + %library_path% + 0 + False + 0 + 1048576 + 16384 + + True + True + %output_path% + False + + False + fa8 + False + False + + True + True + False + False + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + + False + False + True + + + diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index 9ef630bc..2ce3c063 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -58,52 +58,52 @@ MainSource - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
fConfigurarConexion
diff --git a/Source/Cliente/uBootStrap.pas b/Source/Cliente/uBootStrap.pas index 49163222..4c4afa85 100644 --- a/Source/Cliente/uBootStrap.pas +++ b/Source/Cliente/uBootStrap.pas @@ -61,6 +61,8 @@ begin LoadModule('Ejercicios_plugin.bpl'); LoadModule('Contabilidad_plugin.bpl'); {$ENDIF} + + LoadModule('GestorInformes_plugin.bpl'); end; end; diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj index b92dc97b..1c5e39ee 100644 --- a/Source/GUIBase/GUIBase.dproj +++ b/Source/GUIBase/GUIBase.dproj @@ -58,32 +58,37 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fDialogBase
@@ -175,11 +180,6 @@
frViewTotales
TFrame
- - - - - diff --git a/Source/Modulos/Gestor de informes/Controller/GestorInformes_controller.rc b/Source/Modulos/Gestor de informes/Controller/GestorInformes_controller.rc new file mode 100644 index 00000000..153736af --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/GestorInformes_controller.rc @@ -0,0 +1,22 @@ +1 VERSIONINFO +FILEVERSION 1,0,0,0 +PRODUCTVERSION 1,0,0,0 +FILEFLAGSMASK 0x3FL +FILEFLAGS 0x00L +FILEOS 0x40004L +FILETYPE 0x1L +FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "0C0A04E4" + BEGIN + VALUE "FileVersion", "1.0.0.0\0" + VALUE "ProductVersion", "1.0.0.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0C0A, 1252 + END +END diff --git a/Source/Modulos/Gestor de informes/Controller/GestorInformes_controller.res b/Source/Modulos/Gestor de informes/Controller/GestorInformes_controller.res new file mode 100644 index 00000000..8b251f31 Binary files /dev/null and b/Source/Modulos/Gestor de informes/Controller/GestorInformes_controller.res differ diff --git a/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeBase.pas b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeBase.pas new file mode 100644 index 00000000..37ca5347 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeBase.pas @@ -0,0 +1,16 @@ +unit uIEditorInformeBase; + +interface + +uses + uEditorPreview; + +type + IEditorInformeBase = interface(IEditorPreview) + ['{5D57EB76-FD78-4B7E-BBC9-DE1AB5DFECCB}'] + end; + + +implementation + +end. diff --git a/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeFacturasClientePendientesReport.pas b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeFacturasClientePendientesReport.pas new file mode 100644 index 00000000..06f765bc --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeFacturasClientePendientesReport.pas @@ -0,0 +1,26 @@ +unit uIEditorInformeFacturasClientePendientesReport; + +interface + +uses + FactuGES_Intf, uIEditorInformeBase; + +type + IEditorInformeFacturasClientePendientesReport = interface(IEditorInformeBase) + ['{6ADD8C8B-34D8-4F51-9C9C-4A9ED54DDE34}'] + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDClientes: TIntegerArray; + function GetDesglosadoCliente: Boolean; + function GetImporteMinimo: Currency; + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDClientes: TIntegerArray read GetListaIDClientes; + property DesglosadoCliente: Boolean read GetDesglosadoCliente; + property ImporteMinimo: Currency read getImporteMinimo; + end; + + +implementation + +end. diff --git a/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeFacturasClienteReport.pas b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeFacturasClienteReport.pas new file mode 100644 index 00000000..37530af2 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeFacturasClienteReport.pas @@ -0,0 +1,26 @@ +unit uIEditorInformeFacturasClienteReport; + +interface + +uses + FactuGES_Intf, uIEditorInformeBase; + +type + IEditorInformeFacturasClienteReport = interface(IEditorInformeBase) + ['{AE5DD69C-6360-4A6A-A764-C0DAF5B5A948}'] + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDClientes: TIntegerArray; + function GetDesglosadoCliente: Boolean; + function GetImporteMinimo: Currency; + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDClientes: TIntegerArray read GetListaIDClientes; + property DesglosadoCliente: Boolean read GetDesglosadoCliente; + property ImporteMinimo: Currency read getImporteMinimo; + end; + + +implementation + +end. diff --git a/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeFacturasProveedorPendientesReport.pas b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeFacturasProveedorPendientesReport.pas new file mode 100644 index 00000000..0ec57b6f --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeFacturasProveedorPendientesReport.pas @@ -0,0 +1,26 @@ +unit uIEditorInformeFacturasProveedorPendientesReport; + +interface + +uses + FactuGES_Intf, uIEditorInformeBase; + +type + IEditorInformeFacturasProveedorPendientesReport = interface(IEditorInformeBase) + ['{C0EFEC01-BF2C-4B56-9876-2818892FABFA}'] + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDProveedores: TIntegerArray; + function GetDesglosadoProveedor: Boolean; + function GetImporteMinimo: Currency; + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDProveedores: TIntegerArray read GetListaIDProveedores; + property DesglosadoProveedor: Boolean read GetDesglosadoProveedor; + property ImporteMinimo: Currency read getImporteMinimo; + end; + + +implementation + +end. diff --git a/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeFacturasProveedorReport.pas b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeFacturasProveedorReport.pas new file mode 100644 index 00000000..8da71ede --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeFacturasProveedorReport.pas @@ -0,0 +1,26 @@ +unit uIEditorInformeFacturasProveedorReport; + +interface + +uses + FactuGES_Intf, uIEditorInformeBase; + +type + IEditorInformeFacturasProveedorReport = interface(IEditorInformeBase) + ['{0E60C309-336C-455D-825B-7E4892A6CBC5}'] + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDProveedores: TIntegerArray; + function GetDesglosadoProveedor: Boolean; + function GetImporteMinimo: Currency; + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDProveedores: TIntegerArray read GetListaIDProveedores; + property DesglosadoProveedor: Boolean read GetDesglosadoProveedor; + property ImporteMinimo: Currency read getImporteMinimo; + end; + + +implementation + +end. diff --git a/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeIVAClientesReport.pas b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeIVAClientesReport.pas new file mode 100644 index 00000000..5b023419 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeIVAClientesReport.pas @@ -0,0 +1,26 @@ +unit uIEditorInformeIVAClientesReport; + +interface + +uses + FactuGES_Intf, uIEditorInformeBase; + +type + IEditorInformeIVAClientesReport = interface(IEditorInformeBase) + ['{66F6F909-B1EC-4117-A115-12DFB62E6120}'] + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDClientes: TIntegerArray; + function GetDesglosadoCliente: Boolean; + function GetImporteMinimo: Currency; + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDClientes: TIntegerArray read GetListaIDClientes; + property DesglosadoCliente: Boolean read GetDesglosadoCliente; + property ImporteMinimo: Currency read getImporteMinimo; + end; + + +implementation + +end. diff --git a/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeIVAProveedoresReport.pas b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeIVAProveedoresReport.pas new file mode 100644 index 00000000..885df5c0 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeIVAProveedoresReport.pas @@ -0,0 +1,26 @@ +unit uIEditorInformeIVAProveedoresReport; + +interface + +uses + FactuGES_Intf, uIEditorInformeBase; + +type + IEditorInformeIVAProveedoresReport = interface(IEditorInformeBase) + ['{1EC723DF-B7F7-49F9-83FA-DF628FEF4B26}'] + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDProveedores: TIntegerArray; + function GetDesglosadoProveedor: Boolean; + function GetImporteMinimo: Currency; + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDProveedores: TIntegerArray read GetListaIDProveedores; + property DesglosadoProveedor: Boolean read GetDesglosadoProveedor; + property ImporteMinimo: Currency read getImporteMinimo; + end; + + +implementation + +end. diff --git a/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformePedidosReport.pas b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformePedidosReport.pas new file mode 100644 index 00000000..d6be6367 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformePedidosReport.pas @@ -0,0 +1,26 @@ +unit uIEditorInformePedidosReport; + +interface + +uses + FactuGES_Intf, uIEditorInformeBase; + +type + IEditorInformePedidosReport = interface(IEditorInformeBase) + ['{70B07429-BCB2-416F-8C42-6D7BFFA152D5}'] + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDProveedores: TIntegerArray; + function GetDesglosadoProveedor: Boolean; + function GetImporteMinimo: Currency; + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDProveedores: TIntegerArray read GetListaIDProveedores; + property DesglosadoProveedor: Boolean read GetDesglosadoProveedor; + property ImporteMinimo: Currency read getImporteMinimo; + end; + + +implementation + +end. diff --git a/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformePresupuestosReport.pas b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformePresupuestosReport.pas new file mode 100644 index 00000000..077eb140 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformePresupuestosReport.pas @@ -0,0 +1,26 @@ +unit uIEditorInformePresupuestosReport; + +interface + +uses + FactuGES_Intf, uIEditorInformeBase; + +type + IEditorInformePresupuestosReport = interface(IEditorInformeBase) + ['{99BBD05C-8AEF-4BA7-83C6-FC467F14488C}'] + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDClientes: TIntegerArray; + function GetDesglosadoCliente: Boolean; + function GetImporteMinimo: Currency; + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDClientes: TIntegerArray read GetListaIDClientes; + property DesglosadoCliente: Boolean read GetDesglosadoCliente; + property ImporteMinimo: Currency read getImporteMinimo; + end; + + +implementation + +end. diff --git a/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeRecibosCliPendientesReport.pas b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeRecibosCliPendientesReport.pas new file mode 100644 index 00000000..87efb33a --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeRecibosCliPendientesReport.pas @@ -0,0 +1,26 @@ +unit uIEditorInformeRecibosCliPendientesReport; + +interface + +uses + FactuGES_Intf, uIEditorInformeBase; + +type + IEditorInformeRecibosCliPendientesReport = interface(IEditorInformeBase) + ['{BD1EA0DE-B610-4170-9BFC-4A7C0F7ABF0E}'] + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDClientes: TIntegerArray; + function GetDesglosadoCliente: Boolean; + function GetImporteMinimo: Currency; + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDClientes: TIntegerArray read GetListaIDClientes; + property DesglosadoCliente: Boolean read GetDesglosadoCliente; + property ImporteMinimo: Currency read getImporteMinimo; + end; + + +implementation + +end. diff --git a/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeRecibosClienteReport.pas b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeRecibosClienteReport.pas new file mode 100644 index 00000000..a3f27043 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeRecibosClienteReport.pas @@ -0,0 +1,26 @@ +unit uIEditorInformeRecibosClienteReport; + +interface + +uses + FactuGES_Intf, uIEditorInformeBase; + +type + IEditorInformeRecibosClienteReport = interface(IEditorInformeBase) + ['{F0DAD68E-198D-41BE-B04E-C76486208631}'] + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDClientes: TIntegerArray; + function GetDesglosadoCliente: Boolean; + function GetImporteMinimo: Currency; + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDClientes: TIntegerArray read GetListaIDClientes; + property DesglosadoCliente: Boolean read GetDesglosadoCliente; + property ImporteMinimo: Currency read getImporteMinimo; + end; + + +implementation + +end. diff --git a/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeRecibosProvPendientesReport.pas b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeRecibosProvPendientesReport.pas new file mode 100644 index 00000000..88db7300 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeRecibosProvPendientesReport.pas @@ -0,0 +1,26 @@ +unit uIEditorInformeRecibosProvPendientesReport; + +interface + +uses + FactuGES_Intf, uIEditorInformeBase; + +type + IEditorInformeRecibosProvPendientesReport = interface(IEditorInformeBase) + ['{DC6AA05C-24F5-4F2A-BCB7-625629BF4297}'] + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDProveedores: TIntegerArray; + function GetDesglosadoProveedor: Boolean; + function GetImporteMinimo: Currency; + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDProveedores: TIntegerArray read GetListaIDProveedores; + property DesglosadoProveedor: Boolean read GetDesglosadoProveedor; + property ImporteMinimo: Currency read getImporteMinimo; + end; + + +implementation + +end. diff --git a/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeRecibosProveedorReport.pas b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeRecibosProveedorReport.pas new file mode 100644 index 00000000..11bf7f99 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeRecibosProveedorReport.pas @@ -0,0 +1,26 @@ +unit uIEditorInformeRecibosProveedorReport; + +interface + +uses + FactuGES_Intf, uIEditorInformeBase; + +type + IEditorInformeRecibosProveedorReport = interface(IEditorInformeBase) + ['{63D1B0D1-9BDD-48B6-BD3B-C05AC6B49C9C}'] + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDProveedores: TIntegerArray; + function GetDesglosadoProveedor: Boolean; + function GetImporteMinimo: Currency; + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDProveedores: TIntegerArray read GetListaIDProveedores; + property DesglosadoProveedor: Boolean read GetDesglosadoProveedor; + property ImporteMinimo: Currency read getImporteMinimo; + end; + + +implementation + +end. diff --git a/Source/Modulos/Gestor de informes/Controller/uGestorInformesController.pas b/Source/Modulos/Gestor de informes/Controller/uGestorInformesController.pas new file mode 100644 index 00000000..68b4a58a --- /dev/null +++ b/Source/Modulos/Gestor de informes/Controller/uGestorInformesController.pas @@ -0,0 +1,700 @@ +unit uGestorInformesController; + +interface + + +uses + Classes, SysUtils, uDADataTable, uControllerBase, uROTypes, uIDataModuleGestorInformes, + uIEditorInformeBase; + +type + IGestorInformesController = interface(IControllerBase) + ['{5A556B66-AF8F-46F7-B12E-B8336CE07F6D}'] + function GetDataModule: IDataModuleGestorInformes; + property DataModule: IDataModuleGestorInformes read GetDataModule; +// procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false); +// procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false); + + //MODULO PRESUPUESTOS DE CLIENTE + procedure VerInformeListadoPresupuestos; + + //MODULO FACTURAS DE CLIENTE + procedure VerInformeIVAClientes; + procedure VerInformeListadoFacturasCli; + procedure VerInformeListadoFacturasCliPendientes; + + //MODULO RECIBOS DE CLIENTE + procedure VerInformeListadoRecibosCliPendientes; + procedure VerInformeListadoRecibosCliente; + + //MODULO FACTURAS DE PROVEEDOR + procedure VerInformeIVAProveedores; + procedure VerInformeListadoFacturasProv; + procedure VerInformeListadoFacturasProvPendientes; + + //MODULO RECIBOS DE PROVEEDOR + procedure VerInformeListadoRecibosProvPendientes; + procedure VerInformeListadoRecibosProveedor; + end; + + TGestorInformesController = class(TControllerBase, IGestorInformesController) + private + FDataModule : IDataModuleGestorInformes; + + function CreateEditor(const AName : String; const IID: TGUID; out Intf): Boolean; + function GetDataModule: IDataModuleGestorInformes; + +// procedure FiltrarEmpresa(AFactura: IBizFacturaCliente); + + public + constructor Create; override; + destructor Destroy; override; +{ + function Buscar(const ID: Integer): IBizFacturaCliente; + function BuscarTodos: IBizFacturaCliente; + function BuscarTodasPendientesComision(IdAgente: Integer; IdComision: Integer; IdFacturasAsociadas: String): IBizFacturaCliente; + procedure Ver(AFactura : IBizFacturaCliente); + procedure VerTodos(AFacturas: IBizFacturaCliente); + + procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false); + procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false); +} + property DataModule: IDataModuleGestorInformes read GetDataModule; + + //MODULO PRESUPUESTOS DE CLIENTE + procedure VerInformeListadoPresupuestos; + + //MODULO FACTURAS DE CLIENTE + procedure VerInformeIVAClientes; + procedure VerInformeListadoFacturasCli; + procedure VerInformeListadoFacturasCliPendientes; + + //MODULO RECIBOS DE CLIENTE + procedure VerInformeListadoRecibosCliPendientes; + procedure VerInformeListadoRecibosCliente; + + //MODULO FACTURAS DE PROVEEDOR + procedure VerInformeIVAProveedores; + procedure VerInformeListadoFacturasProv; + procedure VerInformeListadoFacturasProvPendientes; + + //MODULO RECIBOS DE PROVEEDOR + procedure VerInformeListadoRecibosProvPendientes; + procedure VerInformeListadoRecibosProveedor; + + end; + +implementation + +uses + Windows, Controls, cxControls, DB, uEditorRegistryUtils, uFactuGES_App, + uDAInterfaces, uDataTableUtils, uDateUtils, uNumUtils, + DateUtils, Forms, uIntegerListUtils, uDataModuleGestorInformes, + uSistemaFunc, uDialogElegirEMail, uEMailUtils, Dialogs, + uIEditorInformePresupuestosReport, + uIEditorInformeIVAClientesReport, uIEditorInformeFacturasClienteReport, + uIEditorInformeFacturasClientePendientesReport, uIEditorInformeRecibosClienteReport, + uIEditorInformeRecibosCliPendientesReport, + uIEditorInformeIVAProveedoresReport, uIEditorInformeFacturasProveedorReport, + uIEditorInformeFacturasProveedorPendientesReport, uIEditorInformeRecibosProveedorReport, + uIEditorInformeRecibosProvPendientesReport, + uIEditorInformePedidosReport; + + +{procedure CopiarArticulosPedido(AOrigen: IBizDetallesPedidoCliente; + ADestino : IBizDetallesFacturaCliente); +var + i : integer; + ADetallesController : IDetallesFacturaClienteController; +begin + if not Assigned(AOrigen) then + raise Exception.Create ('Origen no asignado (CopiarArticulosPedido)'); + + if not Assigned(ADestino) then + raise Exception.Create ('Destino no asignado (CopiarArticulosPedido)'); + + if not AOrigen.DataTable.Active then + AOrigen.DataTable.Active := True; + + if not ADestino.DataTable.Active then + ADestino.DataTable.Active := True; + + ADetallesController := TDetallesFacturaClienteController.Create; + try + //OJO IMPORTANTE + //Siempre que vayamos a trabajar con los detalles debemos hacer un beginupdate de los mismos y un endupdate para + //obligarle siempre a recalcular los detalles una sola vez + ADetallesController.BeginUpdate(ADestino); + + AOrigen.DataTable.First; + for i := 0 to AOrigen.DataTable.RecordCount - 1 do + begin + ADetallesController.Add(ADestino, TIPO_DETALLE_CONCEPTO); + ADestino.Edit; + ADestino.REFERENCIA := AOrigen.REFERENCIA; + if AOrigen.ID_ARTICULO > 0 then + ADestino.ID_ARTICULO := AOrigen.ID_ARTICULO; + ADestino.CONCEPTO := AOrigen.CONCEPTO; + ADestino.CANTIDAD := AOrigen.CANTIDAD; + ADestino.IMPORTE_UNIDAD := AOrigen.IMPORTE_UNIDAD; + ADestino.IMPORTE_TOTAL := AOrigen.IMPORTE_TOTAL; + ADestino.DESCUENTO := AOrigen.DESCUENTO; + ADestino.IMPORTE_PORTE := AOrigen.IMPORTE_PORTE; + ADestino.VISIBLE := AOrigen.VISIBLE; + ADestino.REFERENCIA_PROVEEDOR := AOrigen.REFERENCIA_PROVEEDOR; + ADestino.Post; + AOrigen.Next; + end; + finally + ADetallesController.EndUpdate(ADestino); + ADetallesController := NIL; + end; +end;} + + + +{ TGestorInformesController } + + +{ +function TGestorInformesController.Buscar(const ID: Integer): IBizFacturaCliente; +begin +// Result := (FDataModule as IDataModuleFacturasCliente).GetItem(ID); +// FiltrarEmpresa(Result); +end; + +function TGestorInformesController.BuscarTodasPendientesComision(IdAgente:Integer; IdComision: Integer; IdFacturasAsociadas: String): IBizFacturaCliente; +var + Condicion: TDAWhereExpression; +begin +{ ShowHourglassCursor; + try + Result := BuscarTodos; + with Result.DataTable.DynamicWhere do + begin + //Todas las facturas de un agente determinado + Condicion := NewBinaryExpression(NewField('', fld_FacturasClienteID_AGENTE), NewConstant(IdAgente, datInteger), dboEqual); + + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + + with Result.DataTable.DynamicWhere do + begin + //Todas aquellas que no esten asociadas a ninguna comisión o asociadas a la comisión, + //pero no asociadas en el editor de la comision, esto es porque se puede agregar y quitar + //facturas y todos los cambios estan el cache y por lo tanto al pedir las facturas a seleccionar + //debemos tener en cuenta dichso cambios en cache + Condicion := NewBinaryExpression(NewField('', fld_FacturasClienteID_COMISION_LIQUIDADA), NewNull(), dboEqual); + + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + +{REPASARRRRRRR + //Quitamos aquellas que ya están asociadas + if length(IdFacturasAsociadas) > 0 then + with Result.DataTable.DynamicWhere do + begin + Condicion := NewBinaryExpression(NewField('', fld_FacturasClienteID), ' not in (' + IdFacturasAsociadas + ')');, dboEqual); + + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + + with Result.DataTable.Where do + begin + + CLOSEBraket; + AddOperator(opOR); + + OpenBraket; + //En caso de ser facturas ya asociadas lo limitamos a la comision actual + //ya que no debemos poder elegir facturas asociadas a otras comisiones + OpenBraket; + AddText(fld_FacturasClienteID_COMISION_LIQUIDADA + ' = ' + IntToStr(IdComision)); + CloseBraket; + //En el caso de que halla facturas asociadas + if length(IdFacturasAsociadas) > 0 then + begin + AddOperator(opAND); + OpenBraket; + AddText(fld_FacturasClienteID + ' not in (' + IdFacturasAsociadas + ')'); + CloseBraket; + end; + CloseBraket; + + CloseBraket; + end; + + finally + HideHourglassCursor; + end; +end; + +function TGestorInformesController.BuscarTodos: IBizFacturaCliente; +begin +// Result := FDataModule.GetItems; + // FiltrarEmpresa(Result); +end; +} + +constructor TGestorInformesController.Create; +begin + inherited; + FDataModule := TDataModuleGestorInformes.Create(Nil); +end; + + +function TGestorInformesController.CreateEditor(const AName: String; + const IID: TGUID; out Intf): Boolean; +begin + Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf); +end; + +destructor TGestorInformesController.Destroy; +begin + FDataModule := Nil; + inherited; +end; + +function TGestorInformesController.GetDataModule: IDataModuleGestorInformes; +begin + Result := FDataModule; +end; + +procedure TGestorInformesController.VerInformeIVAClientes; +var + AStream: Binary; + AEditor : IEditorInformeIVAClientesReport; +begin + AEditor := NIL; + CreateEditor('EditorInformeIVAClientesReport', IEditorInformeIVAClientesReport, AEditor); + if Assigned(AEditor) then + try + AEditor.Controller := Self; + AEditor.Title := 'Listado de IVA de facturas de cliente'; + AStream := FDataModule.GenerarInformeIVAClientes(AppFactuGES.EmpresaActiva.ID, + AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDClientes, + AEditor.DesglosadoCliente, AEditor.ImporteMinimo); + AEditor.LoadFromStream(AStream); + AEditor.Preview; + finally + AEditor.Release; + AEditor := Nil; + FreeAndNil(AStream); + end; +end; + +procedure TGestorInformesController.VerInformeIVAProveedores; +var + AStream: Binary; + AEditor : IEditorInformeIVAProveedoresReport; +begin + AEditor := NIL; + + CreateEditor('EditorInformeIVAProveedoresReport', IEditorInformeIVAProveedoresReport, AEditor); + if Assigned(AEditor) then + try + AEditor.Controller := Self; + AEditor.Title := 'Listado de IVA de facturas de proveedor'; + AStream := FDataModule.GenerarInformeIVAProveedores(AppFactuGES.EmpresaActiva.ID, + AEditor.FechaInicio, AEditor.FechaFin, + AEditor.ListaIDProveedores, AEditor.DesglosadoProveedor, + AEditor.ImporteMinimo); + AEditor.LoadFromStream(AStream); + AEditor.Preview; + finally + AEditor.Release; + AEditor := Nil; + FreeAndNil(AStream); + end; +end; + +procedure TGestorInformesController.VerInformeListadoFacturasCli; +var + AStream: Binary; + AEditor : IEditorInformeFacturasClienteReport; +begin + AEditor := NIL; + + CreateEditor('EditorInformeFacturasClienteReport', IEditorInformeFacturasClienteReport, AEditor); + if Assigned(AEditor) then + try + AEditor.Controller := Self; + AEditor.Title := 'Listado de facturas de cliente'; + AStream := FDataModule.GenerarInformeListadoFacturasCli(AppFactuGES.EmpresaActiva.ID, + AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDClientes, + AEditor.DesglosadoCliente, AEditor.ImporteMinimo); + AEditor.LoadFromStream(AStream); + AEditor.Preview; + finally + AEditor.Release; + AEditor := Nil; + FreeAndNil(AStream); + end; +end; + +procedure TGestorInformesController.VerInformeListadoFacturasCliPendientes; +var + AStream: Binary; + AEditor : IEditorInformeFacturasClientePendientesReport; +begin + AEditor := NIL; + + CreateEditor('EditorInformeFacturasClientePendientesReport', IEditorInformeFacturasClientePendientesReport, AEditor); + if Assigned(AEditor) then + try + AEditor.Controller := Self; + AEditor.Title := 'Listado de facturas de cliente pendientes'; + AStream := FDataModule.GenerarInformeListadoFacturasCliPendientes(AppFactuGES.EmpresaActiva.ID, + AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDClientes, + AEditor.DesglosadoCliente, AEditor.ImporteMinimo); + AEditor.LoadFromStream(AStream); + AEditor.Preview; + finally + AEditor.Release; + AEditor := Nil; + FreeAndNil(AStream); + end; +end; + +procedure TGestorInformesController.VerInformeListadoFacturasProv; +var + AStream: Binary; + AEditor : IEditorInformeFacturasProveedorReport; +begin + AEditor := NIL; + CreateEditor('EditorInformeFacturasProveedorReport', IEditorInformeFacturasProveedorReport, AEditor); + if Assigned(AEditor) then + try + AEditor.Controller := Self; + AEditor.Title := 'Listado de facturas de proveedor'; + AStream := FDataModule.GenerarInformeListadoFacturasProv(AppFactuGES.EmpresaActiva.ID, + AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDProveedores, + AEditor.DesglosadoProveedor, AEditor.ImporteMinimo); + AEditor.LoadFromStream(AStream); + AEditor.Preview; + finally + AEditor.Release; + AEditor := Nil; + FreeAndNil(AStream); + end; +end; + +procedure TGestorInformesController.VerInformeListadoFacturasProvPendientes; +var + AStream: Binary; + AEditor : IEditorInformeFacturasProveedorPendientesReport; +begin + AEditor := NIL; + CreateEditor('EditorInformeFacturasProveedorPendientesReport', IEditorInformeFacturasProveedorPendientesReport, AEditor); + if Assigned(AEditor) then + try + AEditor.Controller := Self; + AEditor.Title := 'Listado de facturas de proveedor pendientes'; + AStream := FDataModule.GenerarInformeListadoFacturasProvPendientes(AppFactuGES.EmpresaActiva.ID, + AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDProveedores, + AEditor.DesglosadoProveedor, AEditor.ImporteMinimo); + AEditor.LoadFromStream(AStream); + AEditor.Preview; + finally + AEditor.Release; + AEditor := Nil; + FreeAndNil(AStream); + end; +end; + +procedure TGestorInformesController.VerInformeListadoPresupuestos; +var + AStream: Binary; + AEditor : IEditorInformePresupuestosReport; +begin + AEditor := NIL; + + CreateEditor('EditorInformePresupuestosReport', IEditorInformePresupuestosReport, AEditor); + if Assigned(AEditor) then + try + AEditor.Controller := Self; + AEditor.Title := 'Listado de presupuestos de cliente'; + AStream := FDataModule.GenerarInformeListadoPresupuestos(AppFactuGES.EmpresaActiva.ID, + AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDClientes, + AEditor.DesglosadoCliente, AEditor.ImporteMinimo); + AEditor.LoadFromStream(AStream); + AEditor.Preview; + finally + AEditor.Release; + AEditor := Nil; + FreeAndNil(AStream); + end; +end; + +procedure TGestorInformesController.VerInformeListadoRecibosCliente; +var + AStream: Binary; + AEditor : IEditorInformeRecibosClienteReport; +begin + AEditor := NIL; + CreateEditor('EditorInformeRecibosClienteReport', IEditorInformeRecibosClienteReport, AEditor); + if Assigned(AEditor) then + try + AEditor.Controller := Self; + AStream := FDataModule.GenerarInformeListadoRecibosCliente(AppFactuGES.EmpresaActiva.ID, + AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDClientes, + AEditor.DesglosadoCliente, AEditor.ImporteMinimo); + AEditor.LoadFromStream(AStream); + AEditor.Preview; + finally + AEditor.Release; + AEditor := Nil; + FreeAndNil(AStream); + end; +end; + +procedure TGestorInformesController.VerInformeListadoRecibosCliPendientes; +var + AStream: Binary; + AEditor : IEditorInformeRecibosCliPendientesReport; +begin + AEditor := NIL; + + CreateEditor('EditorInformeRecibosCliPendientesReport', IEditorInformeRecibosCliPendientesReport, AEditor); + if Assigned(AEditor) then + try + AEditor.Controller := Self; + AStream := FDataModule.GenerarInformeListadoRecibosCliPendientes(AppFactuGES.EmpresaActiva.ID, + AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDClientes, + AEditor.DesglosadoCliente, AEditor.ImporteMinimo); + AEditor.LoadFromStream(AStream); + AEditor.Preview; + finally + AEditor.Release; + AEditor := Nil; + FreeAndNil(AStream); + end; +end; + + +procedure TGestorInformesController.VerInformeListadoRecibosProveedor; +var + AStream: Binary; + AEditor : IEditorInformeRecibosProveedorReport; +begin + AEditor := NIL; + + CreateEditor('EditorInformeRecibosProveedorReport', IEditorInformeRecibosProveedorReport, AEditor); + if Assigned(AEditor) then + try + AEditor.Controller := Self; + AStream := FDataModule.GenerarInformeListadoRecibosProveedor(AppFactuGES.EmpresaActiva.ID, + AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDProveedores, + AEditor.DesglosadoProveedor, AEditor.ImporteMinimo); + AEditor.LoadFromStream(AStream); + AEditor.Preview; + finally + AEditor.Release; + AEditor := Nil; + FreeAndNil(AStream); + end; +end; + +procedure TGestorInformesController.VerInformeListadoRecibosProvPendientes; +var + AStream: Binary; + AEditor : IEditorInformeRecibosProvPendientesReport; +begin + AEditor := NIL; + + CreateEditor('EditorInformeRecibosProvPendientesReport', IEditorInformeRecibosProvPendientesReport, AEditor); + if Assigned(AEditor) then + try + AEditor.Controller := Self; + AStream := FDataModule.GenerarInformeListadoRecibosProvPendientes(AppFactuGES.EmpresaActiva.ID, + AEditor.FechaInicio, AEditor.FechaFin, AEditor.ListaIDProveedores, + AEditor.DesglosadoProveedor, AEditor.ImporteMinimo); + AEditor.LoadFromStream(AStream); + AEditor.Preview; + finally + AEditor.Release; + AEditor := Nil; + FreeAndNil(AStream); + end; +end; + +{ +procedure TGestorInformesController.Ver(AFactura: IBizFacturaCliente); +var + AEditor : IEditorFacturaCliente; +begin + AEditor := NIL; +{ ShowHourglassCursor; + try + RecuperarCliente(AFactura); + CreateEditor('EditorFacturaCliente', IEditorFacturaCliente, AEditor); + + if Assigned(AEditor) then + with AEditor do + begin + try + Controller := Self; //OJO ORDEN MUY IMPORTANTE + Factura := AFactura; + + //MODO CONSULTAR + if not EsModificable(AFactura) then + begin + SetDataTableReadOnly(AFactura.DataTable, True); + ReadOnly := True; + end; + + ShowModal; + + //MODO CONSULTAR (Se deja la tabla como estaba) + if ReadOnly then + SetDataTableReadOnly(AFactura.DataTable, False); + finally + AEditor.Release; + end; + end; + finally + AEditor := NIL; + HideHourglassCursor; + end; +end; + +procedure TGestorInformesController.VerTodos(AFacturas: IBizFacturaCliente); +var + AEditor : IEditorFacturasCliente; +begin + AEditor := NIL; +{ + CreateEditor('EditorFacturasCliente', IEditorFacturasCliente, AEditor); + if Assigned(AEditor) then + with AEditor do + begin + Controller := Self; //OJO ORDEN MUY IMPORTANTE + Facturas := AFacturas; + MultiSelect := True; + ShowEmbedded; + end; +end; + + +procedure TGestorInformesController.FiltrarEmpresa(AFactura: IBizFacturaCliente); +var + Condicion: TDAWhereExpression; +begin +{ if AFactura.DataTable.Active then + AFactura.DataTable.Active := False; + + // Filtrar las facturas actuales por empresa + with AFactura.DataTable.DynamicWhere do + begin + // (ID_EMPRESA >= ID) + Condicion := NewBinaryExpression(NewField('', fld_FacturasClienteID_EMPRESA), NewConstant(AppFactuGES.EmpresaActiva.ID, datInteger), dboEqual); + + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; +end; + +procedure TGestorInformesController.SetClienteController(const Value: IClientesController); +begin + FClienteController := Value; +end; + +procedure TGestorInformesController.SetDetallesController(const Value: IDetallesFacturaClienteController); +begin + FDetallesController := Value; +end; +} +{ +procedure TGestorInformesController.informe; +begin + + FDataModule.getInforme; +//showmessage('alla voy') +end; + +{ +procedure TGestorInformesController.Preview(AFactura: IBizFacturaCliente; AllItems: Boolean = false); +var +// AReportController : IFacturasClienteReportController; + ID_Facturas: TIntegerList; + +begin +{ + AReportController := TFacturasClienteReportController.Create; + ID_Facturas := TIntegerList.Create; + + try + //Si deseamos previsualizar todos los items del objeto albaran + if AllItems then + begin + with AFactura.DataTable do + begin + First; + while not EOF do + begin + ID_Facturas.Add(AFactura.ID); + Next; + end; + end; + end + //Solo previsualizamos el item seleccionado + else + ID_Facturas.Add(AFactura.ID); + + AReportController.Preview(ID_Facturas); + + finally + AReportController := NIL; + FreeANDNIL(ID_Facturas); + end; +end; + +procedure TGestorInformesController.Print(AFactura: IBizFacturaCliente; AllItems: Boolean = false); +var +// AReportController : IFacturasClienteReportController; + ID_Facturas: TIntegerList; + +begin +{ + AReportController := TFacturasClienteReportController.Create; + ID_Facturas := TIntegerList.Create; + + try + //Si deseamos previsualizar todos los items del objeto albaran + if AllItems then + begin + with AFactura.DataTable do + begin + First; + while not EOF do + begin + ID_Facturas.Add(AFactura.ID); + Next; + end; + end; + end + //Solo previsualizamos el item seleccionado + else + ID_Facturas.Add(AFactura.ID); + + AReportController.Print(ID_Facturas); + + finally + AReportController := NIL; + FreeANDNIL(ID_Facturas); + end; +end; +} + +end. diff --git a/Source/Modulos/Gestor de informes/Data/GestorInformes_data.dpk b/Source/Modulos/Gestor de informes/Data/GestorInformes_data.dpk new file mode 100644 index 00000000..000c9df2 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Data/GestorInformes_data.dpk @@ -0,0 +1,34 @@ +package GestorInformes_data; + +{$R *.res} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$IMPLICITBUILD OFF} + +requires + Base, + GestorInformes_model; + +contains + uDataModuleGestorInformes in 'uDataModuleGestorInformes.pas'; + +end. diff --git a/Source/Modulos/Gestor de informes/Data/GestorInformes_data.dproj b/Source/Modulos/Gestor de informes/Data/GestorInformes_data.dproj new file mode 100644 index 00000000..b6b38a35 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Data/GestorInformes_data.dproj @@ -0,0 +1,528 @@ + + + + {45f3d725-bfc7-4084-afb2-6032ebaddc4a} + GestorInformes_data.dpk + Debug + AnyCPU + DCC32 + ..\..\..\..\Output\Debug\Cliente\GestorInformes_data.bpl + + + 7.0 + False + False + 0 + RELEASE + + + 7.0 + .\ + .\ + .\ + ..\..\..\..\Output\Debug\Cliente + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\Lib + + + Delphi.Personality + Package + +FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0GestorInformes_data.dpk + + + + + MainSource + + + + + + + diff --git a/Source/Modulos/Gestor de informes/Data/GestorInformes_data.rc b/Source/Modulos/Gestor de informes/Data/GestorInformes_data.rc new file mode 100644 index 00000000..153736af --- /dev/null +++ b/Source/Modulos/Gestor de informes/Data/GestorInformes_data.rc @@ -0,0 +1,22 @@ +1 VERSIONINFO +FILEVERSION 1,0,0,0 +PRODUCTVERSION 1,0,0,0 +FILEFLAGSMASK 0x3FL +FILEFLAGS 0x00L +FILEOS 0x40004L +FILETYPE 0x1L +FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "0C0A04E4" + BEGIN + VALUE "FileVersion", "1.0.0.0\0" + VALUE "ProductVersion", "1.0.0.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0C0A, 1252 + END +END diff --git a/Source/Modulos/Gestor de informes/Data/GestorInformes_data.res b/Source/Modulos/Gestor de informes/Data/GestorInformes_data.res new file mode 100644 index 00000000..8b251f31 Binary files /dev/null and b/Source/Modulos/Gestor de informes/Data/GestorInformes_data.res differ diff --git a/Source/Modulos/Gestor de informes/Data/uDataModuleGestorInformes.dfm b/Source/Modulos/Gestor de informes/Data/uDataModuleGestorInformes.dfm new file mode 100644 index 00000000..03b96bdd --- /dev/null +++ b/Source/Modulos/Gestor de informes/Data/uDataModuleGestorInformes.dfm @@ -0,0 +1,63 @@ +inherited DataModuleGestorInformes: TDataModuleGestorInformes + OnCreate = DAClientDataModuleCreate + Height = 207 + Width = 518 + object RORemoteService: TRORemoteService + Message = dmConexion.ROMessage + Channel = dmConexion.ROChannel + ServiceName = 'srvGestorInformes' + Left = 40 + Top = 16 + end + object rda_GestorInformes: TDARemoteDataAdapter + GetSchemaCall.RemoteService = RORemoteService + GetDataCall.RemoteService = RORemoteService + UpdateDataCall.RemoteService = RORemoteService + GetScriptsCall.RemoteService = RORemoteService + RemoteService = RORemoteService + DataStreamer = Bin2DataStreamer + Left = 43 + Top = 135 + end + object Bin2DataStreamer: TDABin2DataStreamer + Left = 40 + Top = 72 + end + object tbl_DirectoryData: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = < + item + Name = 'FileName' + DataType = datString + Size = 200 + DisplayWidth = 50 + InPrimaryKey = True + end + item + Name = 'FileSize' + DataType = datInteger + end> + Params = < + item + Name = 'Directory' + DataType = datString + Size = 200 + Value = '' + ParamType = daptInput + end> + StreamingOptions = [soDisableEventsWhileStreaming] + RemoteDataAdapter = rda_GestorInformes + DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] + MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] + LogicalName = 'DirectoryData' + IndexDefs = <> + Left = 184 + Top = 40 + end + object ds_DirectoryData: TDADataSource + DataSet = tbl_DirectoryData.Dataset + DataTable = tbl_DirectoryData + Left = 184 + Top = 104 + end +end diff --git a/Source/Modulos/Gestor de informes/Data/uDataModuleGestorInformes.pas b/Source/Modulos/Gestor de informes/Data/uDataModuleGestorInformes.pas new file mode 100644 index 00000000..f7003dbf --- /dev/null +++ b/Source/Modulos/Gestor de informes/Data/uDataModuleGestorInformes.pas @@ -0,0 +1,218 @@ +unit uDataModuleGestorInformes; + +interface + +uses + SysUtils, Classes, DB, uDADataTable, uDABINAdapter, + uDAScriptingProvider, uDACDSDataTable, uROWinInetHttpChannel, uROTypes, + uRORemoteService, uROClient, uROBinMessage, + + uIDataModuleGestorInformes, uDADesigntimeCall, uDataModuleBase, + uDAInterfaces, uDAMemDataTable, uDADataStreamer, uDABin2DataStreamer, + uDARemoteDataAdapter, uIntegerListUtils, FactuGES_Intf; + +type + TDataModuleGestorInformes = class(TDataModuleBase, IDataModuleGestorInformes) + RORemoteService: TRORemoteService; + rda_GestorInformes: TDARemoteDataAdapter; + Bin2DataStreamer: TDABin2DataStreamer; + tbl_DirectoryData: TDAMemDataTable; + ds_DirectoryData: TDADataSource; + procedure DAClientDataModuleCreate(Sender: TObject); + public +// function GetItems : IBizFacturaCliente; + + //MODULO PRESUPUESTOS DE CLIENTE + function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + + //MODULO FACTURAS DE CLIENTE + function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasCliPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + + //MODULO RECIBOS DE CLIENTE + function GenerarInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + + //MODULO FACTURAS DE PROVEEDOR + function GenerarInformeIVAProveedores(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasProv(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasProvPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + + //MODULO RECIBOS DE CLIENTE + function GenerarInformeListadoRecibosProvPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosProveedor(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + + procedure getInforme; + end; + +implementation + +{$R *.DFM} + +uses + uDataModuleConexion, uDataTableUtils, cxControls, + Dialogs; + +{ TdmPresupuestos } + +procedure TDataModuleGestorInformes.DAClientDataModuleCreate(Sender: TObject); +begin + RORemoteService.Channel := dmConexion.Channel; + RORemoteService.Message := dmConexion.Message; +end; + +function TDataModuleGestorInformes.GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +begin + try + Result := (RORemoteService as IsrvGestorInformes).GenerarInformeIVAClientes(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo); + finally + end; +end; + +function TDataModuleGestorInformes.GenerarInformeIVAProveedores( + const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime; + const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +begin + try +// Result := (RORemoteService as IsrvGestorInformes).GenerarInformeIVAProveedores(IdEmpresa, FechaInicio, FechaFin, ListaIdProveedores, Desglosado, ImporteMinimo); + finally + end; +end; + +function TDataModuleGestorInformes.GenerarInformeListadoFacturasCli( + const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime; + const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +begin + try + Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoFacturasCli(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo); + finally + end; +end; + +function TDataModuleGestorInformes.GenerarInformeListadoFacturasCliPendientes( + const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime; + const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +begin + try + Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoFacturasCliPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo); + finally + end; +end; + +function TDataModuleGestorInformes.GenerarInformeListadoFacturasProv( + const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime; + const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +begin + try +// Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoFacturasProv(IdEmpresa, FechaInicio, FechaFin, ListaIdProveedores, Desglosado, ImporteMinimo); + finally + end; +end; + +function TDataModuleGestorInformes.GenerarInformeListadoFacturasProvPendientes( + const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime; + const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +begin + try +// Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoFacturasProvPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIdProveedores, Desglosado, ImporteMinimo); + finally + end; +end; + +function TDataModuleGestorInformes.GenerarInformeListadoPresupuestos( + const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime; + const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +begin + try + Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoPresupuestos(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo); + finally + end; +end; + +function TDataModuleGestorInformes.GenerarInformeListadoRecibosCliente( + const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime; + const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +begin + try + Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoRecibosCliente(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo); + finally + end; +end; + +function TDataModuleGestorInformes.GenerarInformeListadoRecibosCliPendientes( + const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime; + const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +begin + try + Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoRecibosCliPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIdClientes, Desglosado, ImporteMinimo); + finally + end; +end; + +function TDataModuleGestorInformes.GenerarInformeListadoRecibosProveedor( + const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime; + const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +begin + try +// Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoRecibosProveedor(IdEmpresa, FechaInicio, FechaFin, ListaIdProveedores, Desglosado, ImporteMinimo); + finally + end; +end; + +function TDataModuleGestorInformes.GenerarInformeListadoRecibosProvPendientes( + const IdEmpresa: Integer; const FechaInicio, FechaFin: TDateTime; + const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +begin + try +// Result := (RORemoteService as IsrvGestorInformes).GenerarInformeListadoRecibosProvPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIdProveedores, Desglosado, ImporteMinimo); + finally + end; +end; + +procedure TDataModuleGestorInformes.getInforme; +begin + tbl_DirectoryData.close; + tbl_DirectoryData.ParamByName('Directory').AsString := 'ddddd'; + tbl_DirectoryData.Open; + showmessage(tbl_DirectoryData.FieldByName('filename').asstring) +end; +{ +function TDataModuleGestorInformes.GetItems: IBizFacturaCliente; +var + AFactura : TDAMemDataTable; +begin + ShowHourglassCursor; + try + + AFactura := CloneDataTable(tbl_FacturasCliente); + + // EL CAMPO REFERENCIA TIENE QUE SER AUTOREFRESH!!!!! + AFactura.FieldByName(fld_FacturasClienteREFERENCIA).ServerAutoRefresh := TRUE; + + AFactura.BusinessRulesID := BIZ_CLIENT_FACTURA_CLIENTE; + + with TBizFacturaCliente(AFactura.BusinessEventsObj) do + begin + Detalles := _GetDetalles; + end; + + Result := (AFactura as IBizFacturaCliente); + + finally + HideHourglassCursor; + end; +end; +} + +end. diff --git a/Source/Modulos/Gestor de informes/GestorInformes_Group.groupproj b/Source/Modulos/Gestor de informes/GestorInformes_Group.groupproj new file mode 100644 index 00000000..3c2c84be --- /dev/null +++ b/Source/Modulos/Gestor de informes/GestorInformes_Group.groupproj @@ -0,0 +1,134 @@ + + + {d51b0489-bd4f-4ed4-a8cc-05ea2af327dd} + + + + + + + + + + + + + + + + + Default.Personality + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/Modulos/Gestor de informes/Model/Data/uIDataModuleGestorInformes.pas b/Source/Modulos/Gestor de informes/Model/Data/uIDataModuleGestorInformes.pas new file mode 100644 index 00000000..b2b3091a --- /dev/null +++ b/Source/Modulos/Gestor de informes/Model/Data/uIDataModuleGestorInformes.pas @@ -0,0 +1,39 @@ +unit uIDataModuleGestorInformes; + +interface + +uses + uROTypes, FactuGES_Intf; + +type + IDataModuleGestorInformes = interface + ['{65FB8E9E-5218-43DC-80AD-BDB4383B7064}'] +// function GetItems: IBizFacturaCliente; + procedure getInforme; + + //MODULO PRESUPUESTOS DE CLIENTE + function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + + //MODULO FACTURAS DE CLIENTE + function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasCliPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + + //MODULO RECIBOS DE CLIENTE + function GenerarInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + + //MODULO FACTURAS DE PROVEEDOR + function GenerarInformeIVAProveedores(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasProv(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasProvPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + + //MODULO RECIBOS DE CLIENTE + function GenerarInformeListadoRecibosProvPendientes(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosProveedor(const IdEmpresa: Integer; const FechaInicio: TDateTime; const FechaFin: TDateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + + end; + +implementation + +end. diff --git a/Source/Modulos/Gestor de informes/Model/GestorInformes_model.dpk b/Source/Modulos/Gestor de informes/Model/GestorInformes_model.dpk new file mode 100644 index 00000000..85aa7118 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Model/GestorInformes_model.dpk @@ -0,0 +1,33 @@ +package GestorInformes_model; + +{$R *.res} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$IMPLICITBUILD OFF} + +requires + Base; + +contains + uIDataModuleGestorInformes in 'Data\uIDataModuleGestorInformes.pas'; + +end. diff --git a/Source/Modulos/Gestor de informes/Model/GestorInformes_model.dproj b/Source/Modulos/Gestor de informes/Model/GestorInformes_model.dproj new file mode 100644 index 00000000..89a7a2b0 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Model/GestorInformes_model.dproj @@ -0,0 +1,527 @@ + + + + {e8b638a4-6653-49db-9d4d-557579466934} + GestorInformes_model.dpk + Debug + AnyCPU + DCC32 + ..\..\..\..\Output\Debug\Cliente\GestorInformes_model.bpl + + + 7.0 + False + False + 0 + RELEASE + + + 7.0 + ..\..\..\..\Output\Debug\Cliente + .\ + .\ + .\ + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\Lib + + + Delphi.Personality + Package + +FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0GestorInformes_model.dpk + + + + + MainSource + + + + + + diff --git a/Source/Modulos/Gestor de informes/Model/GestorInformes_model.rc b/Source/Modulos/Gestor de informes/Model/GestorInformes_model.rc new file mode 100644 index 00000000..153736af --- /dev/null +++ b/Source/Modulos/Gestor de informes/Model/GestorInformes_model.rc @@ -0,0 +1,22 @@ +1 VERSIONINFO +FILEVERSION 1,0,0,0 +PRODUCTVERSION 1,0,0,0 +FILEFLAGSMASK 0x3FL +FILEFLAGS 0x00L +FILEOS 0x40004L +FILETYPE 0x1L +FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "0C0A04E4" + BEGIN + VALUE "FileVersion", "1.0.0.0\0" + VALUE "ProductVersion", "1.0.0.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0C0A, 1252 + END +END diff --git a/Source/Modulos/Gestor de informes/Model/GestorInformes_model.res b/Source/Modulos/Gestor de informes/Model/GestorInformes_model.res new file mode 100644 index 00000000..8b251f31 Binary files /dev/null and b/Source/Modulos/Gestor de informes/Model/GestorInformes_model.res differ diff --git a/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.dpk b/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.dpk new file mode 100644 index 00000000..67ae964d --- /dev/null +++ b/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.dpk @@ -0,0 +1,37 @@ +package GestorInformes_plugin; + +{$R *.res} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$IMPLICITBUILD OFF} + +requires + Base, + GUIBase, + ApplicationBase, + GestorInformes_controller, + GestorInformes_view; + +contains + uPluginGestorInformes in 'uPluginGestorInformes.pas'; + +end. diff --git a/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.dproj b/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.dproj new file mode 100644 index 00000000..354acee4 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.dproj @@ -0,0 +1,531 @@ + + + + {ba7a4052-3c4c-401c-bae5-3701abd24fc1} + GestorInformes_plugin.dpk + Debug + AnyCPU + DCC32 + ..\..\..\..\Output\Debug\Cliente\GestorInformes_plugin.bpl + + + 7.0 + False + False + 0 + RELEASE + + + 7.0 + .\ + .\ + .\ + ..\..\..\..\Output\Debug\Cliente + ..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + + + Delphi.Personality + Package + +FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0GestorInformes_plugin.dpk + + + + + MainSource + + + + + + + + + + diff --git a/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.rc b/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.rc new file mode 100644 index 00000000..153736af --- /dev/null +++ b/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.rc @@ -0,0 +1,22 @@ +1 VERSIONINFO +FILEVERSION 1,0,0,0 +PRODUCTVERSION 1,0,0,0 +FILEFLAGSMASK 0x3FL +FILEFLAGS 0x00L +FILEOS 0x40004L +FILETYPE 0x1L +FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "0C0A04E4" + BEGIN + VALUE "FileVersion", "1.0.0.0\0" + VALUE "ProductVersion", "1.0.0.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0C0A, 1252 + END +END diff --git a/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.res b/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.res new file mode 100644 index 00000000..8b251f31 Binary files /dev/null and b/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.res differ diff --git a/Source/Modulos/Gestor de informes/Plugin/uPluginGestorInformes.dfm b/Source/Modulos/Gestor de informes/Plugin/uPluginGestorInformes.dfm new file mode 100644 index 00000000..9b80ff8a --- /dev/null +++ b/Source/Modulos/Gestor de informes/Plugin/uPluginGestorInformes.dfm @@ -0,0 +1,229 @@ +object PluginGestorInformes: TPluginGestorInformes + OldCreateOrder = True + Description = 'Informes' + ModuleMenu = MainMenu + ModuleName = 'Gestor de informes' + SmallImages = SmallImages + LargeImages = LargeImages + Author = 'Rodax Software' + Version = '1.0.0' + Height = 252 + Width = 401 + object LargeImages: TPngImageList + Height = 24 + Width = 24 + PngImages = < + item + PngImage.Data = { + 89504E470D0A1A0A0000000D4948445200000018000000180806000000E0773D + F80000000970485973000017120000171201679FD252000001BE4944415478DA + 63FCFFFF3F032D0123B2054BB79CA49A6DD13EE68C582D004A906CD8DFBFFF80 + F83F980601EBC07C86733BA6E1B6C0B6683F8A0187FB1C711A8EAC765BB315C3 + C275FB19E62DDD84DF02525CEE507A9081455D89E1C08C1D0CEF0FC6312CD978 + 90B005D87C802E06027B3BEC189C2B0E311CD97F0BCC7FB32F8661F996C394F9 + E0FF3F605803F11FA0EB41EC3FFFFE41E3E01F98BD7ADB51D27D400C00F9E2F1 + 8E70860DBB4E106701CCDBA480075B431936EF3D459C05F8520E3600D2B3A850 + 8F61EB81D3C45B802BA86096C3E4616AE7E7EB32EC387486763E989DA3CDB0E7 + E839DAF96046A626C3FE131768E783A969EA0C874E5FC26F4184A729387792E3 + 838929AA0CC7CE5EC16F41A89B09387792E3839E042586D317AFE3B720C8D988 + C1ADFA08591674C62A309CBB7213BF057E8E060C5EB5C7F01A06B27CC1913F70 + 7E820D0BD882B62839868BD76FE3B7C0DB4E0F5EAEC0CA1850D9032BF393275F + C1881F18BF394296E1CACD3BF82DF0B0D6C16938884E9B760D6BF0116D818BA5 + 164EC3411667CDB88133E888B2C0DE541D6CD8BFBF88621966E1BFFFFFB1061F + 322068818D912AB844A404E0B5A077CA428A0C8701980500619929EF09CFCE42 + 0000000049454E44AE426082} + Name = 'PngImage0' + Background = clWindow + end> + Left = 232 + Top = 16 + Bitmap = {} + end + object ModuleActionList: TActionList + Images = SmallImages + Left = 40 + Top = 72 + object actInformeFacturasCliente: TAction + Category = 'Facturas de cliente' + Caption = 'Listado de facturas de cliente' + ImageIndex = 0 + OnExecute = actInformeFacturasClienteExecute + end + object actInformeFacturasClientePendientes: TAction + Category = 'Facturas de cliente' + Caption = 'Listado de facturas de cliente pendientes' + ImageIndex = 0 + OnExecute = actInformeFacturasClientePendientesExecute + end + object actInformeFacturasClienteIVA: TAction + Category = 'Facturas de cliente' + Caption = 'Listado de IVA de facturas de cliente' + ImageIndex = 0 + OnExecute = actInformeFacturasClienteIVAExecute + end + object actInformeRecibosCliente: TAction + Category = 'Recibos de cliente' + Caption = 'Listado de recibos de cliente' + ImageIndex = 0 + OnExecute = actInformeRecibosClienteExecute + end + object actInformeRecibosCliPendientes: TAction + Category = 'Recibos de cliente' + Caption = 'Listado de recibos de cliente pendientes' + ImageIndex = 0 + OnExecute = actInformeRecibosCliPendientesExecute + end + object actInformeFacturasProveedor: TAction + Category = 'Facturas de proveedor' + Caption = 'Listado de facturas de proveedor' + ImageIndex = 0 + OnExecute = actInformeFacturasProveedorExecute + end + object actInformeFacturasProveedorPendientes: TAction + Category = 'Facturas de proveedor' + Caption = 'Listado de facturas de proveedor pendientes' + ImageIndex = 0 + OnExecute = actInformeFacturasProveedorPendientesExecute + end + object actInformeFacturasProveedorIVA: TAction + Category = 'Facturas de proveedor' + Caption = 'Listado de IVA de facturas de proveedor' + ImageIndex = 0 + OnExecute = actInformeFacturasProveedorIVAExecute + end + object actInformeRecibosProveedor: TAction + Category = 'Recibos de proveedor' + Caption = 'Listado de recibos de proveedor' + ImageIndex = 0 + OnExecute = actInformeRecibosProveedorExecute + end + object actInformeRecibosProvPendientes: TAction + Category = 'Recibos de proveedor' + Caption = 'Listado de recibos de proveedor pendientes' + ImageIndex = 0 + OnExecute = actInformeRecibosProvPendientesExecute + end + end + object MainMenu: TMainMenu + Images = LargeImages + Left = 40 + Top = 16 + object Informes1: TMenuItem + Caption = 'Informes' + object Listadodefacturasdecliente1: TMenuItem + Tag = 10 + Action = actInformeFacturasCliente + end + object Listadodefacturasdeclientependientes1: TMenuItem + Tag = 20 + Action = actInformeFacturasClientePendientes + end + object ListadodeIVAdefacturasdecliente1: TMenuItem + Tag = 30 + Action = actInformeFacturasClienteIVA + end + object N2: TMenuItem + Tag = 40 + Caption = '-' + end + object N1: TMenuItem + Tag = 50 + Action = actInformeRecibosCliente + end + object Listadoderecibosdeclientependientes1: TMenuItem + Tag = 60 + Action = actInformeRecibosCliPendientes + end + object N3: TMenuItem + Tag = 70 + Caption = '-' + end + object Listadodefacturasdeproveedor1: TMenuItem + Tag = 80 + Action = actInformeFacturasProveedor + end + object Listadodefacturasdeproveedorpendientes1: TMenuItem + Tag = 90 + Action = actInformeFacturasProveedorPendientes + end + object ListadodeIVAdefacturasdeproveedor1: TMenuItem + Tag = 100 + Action = actInformeFacturasProveedorIVA + end + object N4: TMenuItem + Tag = 110 + Caption = '-' + end + object Listadoderecibosdeproveedor1: TMenuItem + Tag = 120 + Action = actInformeRecibosProveedor + end + object Listadoderecibosdeproveedorpendientes1: TMenuItem + Tag = 130 + Action = actInformeRecibosProvPendientes + end + end + end + object SmallImages: TPngImageList + PngImages = < + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 610000000970485973000017120000171201679FD252000001684944415478DA + 63FCFFFF3FC394C53BFE33900172623D1819610600394469FAF3F71FC3EF3F7F + 19ACFDF319CEED98866A806DD17E14C587FB1CC134B2F8AE761B86B9ABF632CC + 5BBA09D3007CE0D7EFBF609B4178C98683D80D40770136B0AED69461E59623B8 + 0D80391B04FE01E5FEFCF907B7D9B7FE04C3AA4A6386B53B8EE13700E692BD9D + 760CCEE587E03607359F66585A6AC0B069CF49FC06A0DB0CC2207E58FB598685 + 85BA0CDB0E9CC16DC0C15E0706FBE203605B37375A809D0D02209BA3BB2F30CC + C9D566D87DE41C6E0340CE46B7F9E7AF3F6076D2C42B0C53D2D4180E9FBE8C69 + 4046941B8363E94194105F5E6EC810D9791ECC9E99A5C9903EED3A437F920AC3 + 89F357310D480E7386DB08A2435ACF302C2ED687B8049A067266DD62E88A5364 + 387BF906A60171410E280107B3191DB446C9315CBA7E1BD380283F3B147F23DB + FC1BC9E07FFFFE335CB97907D380502F6B86D5DB8E129D13310C0009900A4006 + 00004B6D80F047EC10D30000000049454E44AE426082} + Name = 'PngImage0' + Background = clWindow + end> + PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled] + Left = 308 + Top = 16 + Bitmap = {} + end + object ExtraImages: TPngImageList + Height = 28 + Width = 28 + PngImages = < + item + PngImage.Data = { + 89504E470D0A1A0A0000000D494844520000001C0000001C0806000000720DDF + 940000000970485973000017120000171201679FD252000002834944415478DA + BDD6ED4F52511800F087ECDFA8B5D6CB2A8550FC525862BC28B56966F9B2D658 + 5B7373D69ABDACF5A12FADD6875EB6968DD922299C1481888680C0E555485494 + 20B2FADCFAD6565FE53EDD7B0B86099C6BD7F970D9E53CDC7B7EE73907388810 + 11363344C5A023F0916BB0B9FC73559B7970C7DFD7DCFBDC8150B5A5AA24705A + 23159505C7A90CB62A0EFCF7E869A62F9A46C8E568C8D134C8DB2EC382EB6979 + D0EE4F635B5335340C506B3A0B3F549485FEBDDE7DF730182C7E308C38F881EB + 0D1654CBF680FFD70A04F42EF819D181D14691C131DF073C79ACA66C85A5F2C1 + 078D70F44A0022D4E742EE47E81C98EC413268F3A6B05D29E65D19BB4EB91C72 + E7E2B56373E6C93019B47A97F0945252B212BEC156FADDDB031667940738CD80 + AA3F60F114AD37BE79BAC1EA9A21836F3D8BD8A13EC881953E959582BD77F4BA + 14ECD3713268712791F9A20A064D572530E19B25836FDC0B7846535B002BAD65 + 7E40C5D7E4EF310E88C14925C8E06BD73C7636D709AEF0F9A56AF084E7798053 + 0CD8221C1CEADF0FBE68920C9AA7E6B0AB4526784AF57DFB808A2D92C1516702 + BBB5F5822B1CECDD0BA1D9140FF05D023BB532EEA74A08F8F8C26E88CEA5C9E0 + C8E47B660DEB41712D28684A1F9DDF05F164861FD8A1AE03E58DB0A00AEFEB76 + 4262294B064D13716C57D582E666541078EFEC0E486696C9E02B470C5B9BA470 + FC568C57E7ECA086232B85B64EBE9503EFF46C8754F60B3FF044A3A4F49643AF + FEFBD03B985DB3CEF9F6EDAE6D905EFE4A065F8ECFA0F6888488B103EAD37F2A + 39EDEB028DF62836378889187BBE38547EFBE20D0E8F4550231713B172B9E2E0 + 05BEB0855175A886DBCB362288A0C11AC227CFCC1B82E5A322B819F11BFB7D9A + E74CD9D0710000000049454E44AE426082} + Name = 'PngImage0' + Background = clWindow + end> + Left = 232 + Top = 80 + Bitmap = {} + end +end diff --git a/Source/Modulos/Gestor de informes/Plugin/uPluginGestorInformes.pas b/Source/Modulos/Gestor de informes/Plugin/uPluginGestorInformes.pas new file mode 100644 index 00000000..766a0a0a --- /dev/null +++ b/Source/Modulos/Gestor de informes/Plugin/uPluginGestorInformes.pas @@ -0,0 +1,157 @@ +unit uPluginGestorInformes; + +interface + +uses + uModuleController, uInterfaces, uHostManager, Menus, Classes, ActnList, + ImgList, Controls, PngImageList, uGestorInformesController; + +type + IMCGestorInformes = interface(IInterface) + ['{D44E1560-BF8F-4DA2-BF64-E0A44C08AC01}'] + end; + + TPluginGestorInformes = class(TModuleController, IMCGestorInformes) + ExtraImages: TPngImageList; + LargeImages: TPngImageList; + MainMenu: TMainMenu; + ModuleActionList: TActionList; + SmallImages: TPngImageList; + Informes1: TMenuItem; + actInformeFacturasCliente: TAction; + Listadodefacturasdecliente1: TMenuItem; + actInformeFacturasClientePendientes: TAction; + actInformeFacturasClienteIVA: TAction; + Listadodefacturasdeclientependientes1: TMenuItem; + ListadodeIVAdefacturasdecliente1: TMenuItem; + actInformeRecibosCliente: TAction; + N1: TMenuItem; + N2: TMenuItem; + actInformeRecibosCliPendientes: TAction; + Listadoderecibosdeclientependientes1: TMenuItem; + actInformeFacturasProveedor: TAction; + actInformeFacturasProveedorPendientes: TAction; + actInformeFacturasProveedorIVA: TAction; + actInformeRecibosProveedor: TAction; + actInformeRecibosProvPendientes: TAction; + N3: TMenuItem; + Listadodefacturasdeproveedor1: TMenuItem; + Listadodefacturasdeproveedorpendientes1: TMenuItem; + ListadodeIVAdefacturasdeproveedor1: TMenuItem; + N4: TMenuItem; + Listadoderecibosdeproveedor1: TMenuItem; + Listadoderecibosdeproveedorpendientes1: TMenuItem; + procedure actInformeFacturasClienteExecute(Sender: TObject); + procedure actInformeFacturasClientePendientesExecute(Sender: TObject); + procedure actInformeFacturasClienteIVAExecute(Sender: TObject); + procedure actInformeRecibosClienteExecute(Sender: TObject); + procedure actInformeRecibosCliPendientesExecute(Sender: TObject); + procedure actInformeFacturasProveedorExecute(Sender: TObject); + procedure actInformeFacturasProveedorPendientesExecute(Sender: TObject); + procedure actInformeFacturasProveedorIVAExecute(Sender: TObject); + procedure actInformeRecibosProveedorExecute(Sender: TObject); + procedure actInformeRecibosProvPendientesExecute(Sender: TObject); + private + FController : IGestorInformesController; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + +implementation + +{$R *.dfm} + +uses + Forms, Dialogs, SysUtils, + uGestorInformesViewRegister; + +function GetModule : TModuleController; +begin + Result := TPluginGestorInformes.Create(NIL); +end; + +exports + GetModule name GET_MODULE_FUNC; + +procedure TPluginGestorInformes.actInformeFacturasClienteExecute( + Sender: TObject); +begin + FController.VerInformeListadoFacturasCli; +end; + +procedure TPluginGestorInformes.actInformeFacturasClienteIVAExecute( + Sender: TObject); +begin + FController.VerInformeIVAClientes; +end; + +procedure TPluginGestorInformes.actInformeFacturasClientePendientesExecute( + Sender: TObject); +begin + FController.VerInformeListadoFacturasCliPendientes; +end; + +procedure TPluginGestorInformes.actInformeFacturasProveedorExecute( + Sender: TObject); +begin + FController.VerInformeListadoFacturasProv; +end; + +procedure TPluginGestorInformes.actInformeFacturasProveedorIVAExecute( + Sender: TObject); +begin + FController.VerInformeIVAProveedores; +end; + +procedure TPluginGestorInformes.actInformeFacturasProveedorPendientesExecute( + Sender: TObject); +begin + FController.VerInformeListadoFacturasProvPendientes; +end; + +procedure TPluginGestorInformes.actInformeRecibosClienteExecute( + Sender: TObject); +begin + FController.VerInformeListadoRecibosCliente; +end; + +procedure TPluginGestorInformes.actInformeRecibosCliPendientesExecute( + Sender: TObject); +begin + FController.VerInformeListadoRecibosCliPendientes; +end; + +procedure TPluginGestorInformes.actInformeRecibosProveedorExecute( + Sender: TObject); +begin + FController.VerInformeListadoRecibosProveedor; +end; + +procedure TPluginGestorInformes.actInformeRecibosProvPendientesExecute( + Sender: TObject); +begin + FController.VerInformeListadoRecibosProvPendientes; +end; + +constructor TPluginGestorInformes.Create(AOwner: TComponent); +begin + inherited; + uGestorInformesViewRegister.RegisterViews; + FController := TGestorInformesController.Create; +end; + +destructor TPluginGestorInformes.Destroy; +begin + FController := NIL; + uGestorInformesViewRegister.UnregisterViews; + inherited; +end; + +initialization + RegisterModuleClass(TPluginGestorInformes); + +finalization + UnRegisterModuleClass(TPluginGestorInformes); + +end. diff --git a/Source/Modulos/Gestor de informes/Servidor/srvGestorInformes_Impl.dfm b/Source/Modulos/Gestor de informes/Servidor/srvGestorInformes_Impl.dfm new file mode 100644 index 00000000..0b32f5d2 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Servidor/srvGestorInformes_Impl.dfm @@ -0,0 +1,109 @@ +object srvGestorInformes: TsrvGestorInformes + OldCreateOrder = True + SessionManager = dmServer.SessionManager + ServiceSchema = Schema + ServiceDataStreamer = Bin2DataStreamer + ExportedDataTables = < + item + DataTable = dtComboDataset + LogicalName = 'ComboDataset' + end + item + DataTable = dtWindowsDir + LogicalName = 'DirectoryData' + end> + BeforeGetDatasetData = DataAbstractServiceBeforeGetDatasetData + ValidateDatasetAccess = DataAbstractServiceValidateDatasetAccess + Height = 162 + Width = 313 + object Schema: TDASchema + ConnectionManager = dmServer.ConnectionManager + Datasets = <> + JoinDataTables = <> + UnionDataTables = <> + Commands = <> + RelationShips = < + item + Name = 'FK_Employees_Employees' + MasterDatasetName = 'Employees' + MasterFields = 'EmployeeID' + DetailDatasetName = 'Employees' + DetailFields = 'ReportsTo' + RelationshipType = rtForeignKey + end> + UpdateRules = <> + Version = 0 + Left = 32 + Top = 64 + end + object dtComboDataset: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = < + item + Name = 'AutoIncField' + DataType = datAutoInc + InPrimaryKey = True + end + item + Name = 'TextField' + DataType = datString + Size = 50 + DisplayWidth = 50 + end> + Params = < + item + Name = 'CustomParameter' + DataType = datString + Size = 50 + Value = '' + ParamType = daptInput + end> + MasterMappingMode = mmDataRequest + StreamingOptions = [soDisableEventsWhileStreaming] + RemoteFetchEnabled = False + LocalDataStreamer = Bin2DataStreamer + DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] + MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] + LogicalName = 'ComboDataset' + IndexDefs = <> + Left = 128 + Top = 56 + end + object dtWindowsDir: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = < + item + Name = 'FileName' + DataType = datString + Size = 200 + DisplayWidth = 50 + InPrimaryKey = True + end + item + Name = 'FileSize' + DataType = datInteger + end> + Params = < + item + Name = 'Directory' + DataType = datString + Size = 200 + Value = '' + ParamType = daptInput + end> + MasterMappingMode = mmDataRequest + StreamingOptions = [soDisableEventsWhileStreaming] + RemoteFetchEnabled = False + LocalDataStreamer = Bin2DataStreamer + DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] + MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] + LogicalName = 'DirectoryData' + IndexDefs = <> + Left = 216 + Top = 56 + end + object Bin2DataStreamer: TDABin2DataStreamer + Left = 32 + Top = 8 + end +end diff --git a/Source/Modulos/Gestor de informes/Servidor/srvGestorInformes_Impl.pas b/Source/Modulos/Gestor de informes/Servidor/srvGestorInformes_Impl.pas new file mode 100644 index 00000000..773c37df --- /dev/null +++ b/Source/Modulos/Gestor de informes/Servidor/srvGestorInformes_Impl.pas @@ -0,0 +1,376 @@ +unit srvGestorInformes_Impl; + +{----------------------------------------------------------------------------} +{ This unit was automatically generated by the RemObjects SDK after reading } +{ the RODL file associated with this project . } +{ } +{ This is where you are supposed to code the implementation of your objects. } +{----------------------------------------------------------------------------} + +interface + +uses + {vcl:} Classes, SysUtils, + {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions, + {Ancestor Implementation:} DataAbstractService_Impl, + {Used RODLs:} DataAbstract4_Intf, + {Generated:} uDABusinessProcessor, uDABin2DataStreamer, uDADataStreamer, + uDAScriptingProvider, uDAClasses, + FactuGES_Intf, uDAInterfaces, uDADataTable, uDAMemDataTable, uDABinAdapter; + + +const + { Dataset names for Schema } + ds_Employees = 'Employees'; + ds_Customers = 'Customers'; + ds_Regions = 'Regions'; + +type + { TGestorInformes } + TsrvGestorInformes = class(TDataAbstractService, IsrvGestorInformes) + dtComboDataset: TDAMemDataTable; + dtWindowsDir: TDAMemDataTable; + Schema: TDASchema; + Bin2DataStreamer: TDABin2DataStreamer; + procedure DataAbstractServiceBeforeGetDatasetData(aSender: TObject; + const aDataset: IDADataset; const aIncludeSchema: Boolean; + const aMaxRecords: Integer); + procedure DataAbstractServiceValidateDatasetAccess(Sender: TObject; + const aConnection: IDAConnection; const aDatasetName: string; + const aParamNames: array of string; + const aParamValues: array of Variant; aSchema: TDASchema; + var Allowed: Boolean); + private + procedure FillComboDataset(const aDataset: IDAEditableDataset); + procedure FillWinDirDataset(const aDataset: IDAEditableDataset); + + public + //MODULO PRESUPUESTOS CLIENTE + function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + + //MODULO FACTURAS CLIENTE + function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + + //MODULO RECIBOS CLIENTE + function GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + + //MODULO FACTURAS PROVEEDOR + function GenerarInformeIVAProveedores(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasProv(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + + //MODULO RECIBOS PROVEEDOR + function GenerarInformeListadoRecibosProveedor(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + end; + +implementation + +{$R *.dfm} +uses + {Generated:} FactuGES_Invk, uDataModuleServer, uDatabaseUtils, Dialogs, + uRptPresupuestosCliente_Server, uRptFacturasCliente_Server, uRptRecibosCliente_Server; +// uRptFacturasProveedor_Server, uRptRecibosProveedor_Server; + +procedure Create_srvGestorInformes(out anInstance: IUnknown); +begin + anInstance := TsrvGestorInformes.Create(nil); +end; + +procedure TsrvGestorInformes.FillComboDataset(const aDataset: IDAEditableDataset); +var + employees, + customers, + regions: IDADataset; + textfield: TDAField; +begin +{ + with aDataset do begin + // Opens the in memory data table + Open; + textfield := FieldByName('TextField'); + + // Adds 3 dummy records + Insert; + textfield.AsString := 'String A'; + Post; + + Insert; + textfield.AsString := 'String B'; + Post; + + Insert; + textfield.AsString := 'String C'; + Post; + + // Fetches data from other datasets, according to the value of the parameter "CustomParameter" + if (Pos('EMPLOYEES', UpperCase(ParamByName('CustomParameter').AsString)) > 0) then begin + employees := Schema.NewDataset(Connection, ds_Employees, [], [], TRUE); + while not employees.EOF do begin + Insert; + textfield.AsString := employees.FieldByName('FirstName').AsString + ' ' + employees.FieldByName('LastName').AsString; + Post; + + employees.Next; + end; + employees:=nil; + end; + if (Pos('CUSTOMERS', UpperCase(ParamByName('CustomParameter').AsString)) > 0) then begin + customers := Schema.NewDataset(Connection, ds_Customers, [], [], TRUE); + while not customers.EOF do begin + Insert; + textfield.AsString := customers.FieldByName('CompanyName').AsString; + Post; + + customers.Next; + end; + customers := nil; + end; + if (Pos('REGIONS', UpperCase(ParamByName('CustomParameter').AsString)) > 0) then begin + regions := Schema.NewDataset(Connection, ds_Regions, [], [], TRUE); + while not regions.EOF do begin + Insert; + textfield.AsString := regions.FieldByName('RegionDescription').AsString; + Post; + + regions.Next; + end; + regions := nil; + end; + end; +} +end; + +procedure TsrvGestorInformes.FillWinDirDataset(const aDataset: IDAEditableDataset); +var + dirinfo: TSearchRec; +begin + aDataset.Open; +{ + if (FindFirst(IncludeTrailingPathDelimiter(aDataset.ParamByName('Directory').AsString) + '*.*', faArchive, dirinfo) = 0) then repeat +} + aDataset.Insert; + + aDataset.FieldByName('FileName').AsString := 'hola'; + aDataset.FieldByName('FileSize').AsInteger := 10; + + aDataset.Post; +{ + until (FindNext(dirinfo) <> 0); +} +end; + +function TsrvGestorInformes.GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +var + AReportGenerator : TRptFacturasCliente; +begin + AReportGenerator := TRptFacturasCliente.Create(nil); + try + Result := AReportGenerator.GenerarInformeIVA(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo); + finally + FreeAndNIL(AReportGenerator); + end; +end; + +function TsrvGestorInformes.GenerarInformeIVAProveedores(const IdEmpresa: Integer; + const FechaInicio, FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +//var +// AReportGenerator : TRptFacturasProveedor; +begin +{ + AReportGenerator := TRptFacturasProveedor.Create(nil); + try + Result := AReportGenerator.GenerarInformeIVA(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo); + finally + FreeAndNIL(AReportGenerator); + end; +} +end; + +function TsrvGestorInformes.GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; + const FechaInicio, FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +var + AReportGenerator : TRptFacturasCliente; +begin + AReportGenerator := TRptFacturasCliente.Create(nil); + try + Result := AReportGenerator.GenerarInformeListadoFacturas(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo); + finally + FreeAndNIL(AReportGenerator); + end; +end; + +function TsrvGestorInformes.GenerarInformeListadoFacturasCliPendientes( + const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime; + const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +var + AReportGenerator : TRptFacturasCliente; +begin + AReportGenerator := TRptFacturasCliente.Create(nil); + try + Result := AReportGenerator.GenerarInformeListadoFacturasPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo); + finally + FreeAndNIL(AReportGenerator); + end; +end; + +function TsrvGestorInformes.GenerarInformeListadoFacturasProv( + const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime; + const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +//var +// AReportGenerator : TRptFacturasProveedor; +begin +{ + AReportGenerator := TRptFacturasProveedor.Create(nil); + try + Result := AReportGenerator.GenerarInformeListadoFacturas(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo); + finally + FreeAndNIL(AReportGenerator); + end; +} +end; + +function TsrvGestorInformes.GenerarInformeListadoFacturasProvPendientes( + const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime; + const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +//var +// AReportGenerator : TRptFacturasProveedor; +begin +{ + AReportGenerator := TRptFacturasProveedor.Create(nil); + try + Result := AReportGenerator.GenerarInformeListadoFacturasPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo); + finally + FreeAndNIL(AReportGenerator); + end; +} +end; + +function TsrvGestorInformes.GenerarInformeListadoPresupuestos( + const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime; + const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +var + AReportGenerator : TRptPresupuestosCliente; +begin + AReportGenerator := TRptPresupuestosCliente.Create(nil); + try + Result := AReportGenerator.GenerarInformeListadoPresupuestos(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo); + finally + FreeAndNIL(AReportGenerator); + end; +end; + +function TsrvGestorInformes.GenerarInformeListadoRecibosCliente( + const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime; + const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +var + AReportGenerator : TRptRecibosCliente; +begin + AReportGenerator := TRptRecibosCliente.Create(nil); + try + Result := AReportGenerator.GenerarInformeListadoRecibos(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo); + finally + FreeAndNIL(AReportGenerator); + end; +end; + +function TsrvGestorInformes.GenerarInformeListadoRecibosCliPendientes( + const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime; + const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +var + AReportGenerator : TRptRecibosCliente; +begin + AReportGenerator := TRptRecibosCliente.Create(nil); + try + Result := AReportGenerator.GenerarInformeListadoRecibosPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo); + finally + FreeAndNIL(AReportGenerator); + end; +end; + +function TsrvGestorInformes.GenerarInformeListadoRecibosProveedor( + const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime; + const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +//var +// AReportGenerator : TRptRecibosProveedor; +begin +{ + AReportGenerator := TRptRecibosProveedor.Create(nil); + try + Result := AReportGenerator.GenerarInformeListadoRecibos(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo); + finally + FreeAndNIL(AReportGenerator); + end; +} +end; + +function TsrvGestorInformes.GenerarInformeListadoRecibosProvPendientes( + const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime; + const ListaIDProveedores: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +//var +// AReportGenerator : TRptRecibosProveedor; +begin +{ + AReportGenerator := TRptRecibosProveedor.Create(nil); + try + Result := AReportGenerator.GenerarInformeListadoRecibosPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo); + finally + FreeAndNIL(AReportGenerator); + end; +} +end; + +procedure TsrvGestorInformes.DataAbstractServiceBeforeGetDatasetData( + aSender: TObject; const aDataset: IDADataset; + const aIncludeSchema: Boolean; const aMaxRecords: Integer); +begin + if SameText(aDataset.LogicalName, dtComboDataset.LogicalName) then + FillComboDataset((dtComboDataset as IDAEditableDataset)) + else if SameText(aDataset.LogicalName, dtWindowsDir.LogicalName) then + FillWinDirDataset((dtWindowsDir as IDAEditableDataset)); +end; + +procedure TsrvGestorInformes.DataAbstractServiceValidateDatasetAccess( + Sender: TObject; const aConnection: IDAConnection; + const aDatasetName: string; const aParamNames: array of string; + const aParamValues: array of Variant; aSchema: TDASchema; + var Allowed: Boolean); + + procedure FillParameters(aDataSet: TDAMemDataTable); + var + i: integer; + begin + for i := Low(aParamNames) to High(aParamNames) do + begin + showmessage(aParamValues[i]); + aDataset.ParamByName(aParamNames[i]).Value := aParamValues[i]; + end; + end; + +begin + if SameText(aDatasetName, dtComboDataset.LogicalName) then + FillParameters(dtComboDataset) + else if SameText(aDatasetName, dtWindowsDir.LogicalName) then + FillParameters(dtWindowsDir) +end; + +initialization + TROClassFactory.Create('srvGestorInformes', Create_srvGestorInformes, TsrvGestorInformes_Invoker); + +finalization + +end. + diff --git a/Source/Modulos/Gestor de informes/Views/GestorInformes_view.dpk b/Source/Modulos/Gestor de informes/Views/GestorInformes_view.dpk new file mode 100644 index 00000000..3120d145 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/GestorInformes_view.dpk @@ -0,0 +1,88 @@ +package GestorInformes_view; + +{$R *.res} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$IMPLICITBUILD OFF} + +requires + rtl, + vcl, + Base, + GUIBase, + ApplicationBase, + Contactos_view, + GestorInformes_controller, + Contactos_model, + Contactos_controller, + RemObjects_Core_D11, + dbrtl, + PNG_D10, + PngComponentsD10, + vclactnband, + vclx, + tb2k_d10, + tbx_d10, + JvCoreD11R, + vcldb, + vcljpg, + Jcl, + JclVcl, + JvSystemD11R, + JvStdCtrlsD11R, + JvPageCompsD11R, + GUISDK_D11, + xmlrtl, + cfpack_d11, + designide, + ccpackD11, + frx11, + fs11, + frxe11, + cxLibraryD11, + dxThemeD11, + dxGDIPlusD11, + dxLayoutControlD11, + dxComnD11, + cxEditorsD11, + cxDataD11; + +contains + uGestorInformesViewRegister in 'uGestorInformesViewRegister.pas', + uViewPeriodoFechas in 'uViewPeriodoFechas.pas' {frViewPeriodoFechas: TFrame}, + uViewFiltroImportes in 'uViewFiltroImportes.pas' {frViewFiltroImportes: TFrame}, + uEditorInformeIVAClientesReport in 'uEditorInformeIVAClientesReport.pas' {fEditorInformeIVAClientesReport: TForm}, + uEditorInformeBase in 'uEditorInformeBase.pas' {fEditorInformeBase: TForm}, + uViewFiltroClientes in 'uViewFiltroClientes.pas' {frViewFiltroClientes: TFrame}, + uViewParametrosInforme in 'uViewParametrosInforme.pas' {frViewParametrosInforme: TFrame}, + uEditorInformeFacturasClientePendientesReport in 'uEditorInformeFacturasClientePendientesReport.pas' {fEditorInformeFacturasClientePendientesReport: t}, + uEditorInformeFacturasClienteReport in 'uEditorInformeFacturasClienteReport.pas' {fEditorInformeFacturasClienteReport: T}, + uEditorInformeRecibosClienteReport in 'uEditorInformeRecibosClienteReport.pas' {fEditorInformeRecibosClienteReport: T}, + uEditorInformeRecibosCliPendientesReport in 'uEditorInformeRecibosCliPendientesReport.pas' {fEditorInformeRecibosCliPendientesReport: T}, + uViewFiltroProveedores in 'uViewFiltroProveedores.pas' {frViewFiltroProveedores: TFrame}, + uEditorInformeIVAProveedoresReport in 'uEditorInformeIVAProveedoresReport.pas' {fEditorInformeIVAProveedoresReport: TForm}, + uEditorInformeRecibosProvPendientesReport in 'uEditorInformeRecibosProvPendientesReport.pas' {fEditorInformeRecibosProvPendientesReport: TForm}, + uEditorInformeFacturasProveedorPendientesReport in 'uEditorInformeFacturasProveedorPendientesReport.pas' {fEditorInformeFacturasProveedorPendientesReport: TForm}, + uEditorInformeFacturasProveedorReport in 'uEditorInformeFacturasProveedorReport.pas' {fEditorInformeFacturasProveedorReport: TForm}, + uEditorInformeRecibosProveedorReport in 'uEditorInformeRecibosProveedorReport.pas' {fEditorInformeRecibosProveedorReport: TForm}; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/GestorInformes_view.dproj b/Source/Modulos/Gestor de informes/Views/GestorInformes_view.dproj new file mode 100644 index 00000000..b66a9f88 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/GestorInformes_view.dproj @@ -0,0 +1,630 @@ + + + + {cdba3fdf-b755-404b-b9f9-ebf0ce885115} + GestorInformes_view.dpk + Debug + AnyCPU + DCC32 + ..\..\..\..\Output\Debug\Cliente\GestorInformes_view.bpl + + + 7.0 + False + False + 0 + RELEASE + + + 7.0 + ..\..\..\..\Output\Debug\Cliente + .\ + .\ + .\ + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\Lib + + + Delphi.Personality + Package + +FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0GestorInformes_view.dpk + + + + + MainSource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fEditorInformeBase
+ TForm +
+ +
fEditorInformeFacturasClientePendientesReport
+ t +
+ +
fEditorInformeFacturasClienteReport
+ T +
+ +
fEditorInformeFacturasProveedorPendientesReport
+ TForm +
+ +
fEditorInformeFacturasProveedorReport
+ TForm +
+ +
fEditorInformeIVAClientesReport
+ TForm +
+ +
fEditorInformeIVAProveedoresReport
+ TForm +
+ +
fEditorInformeRecibosClienteReport
+ T +
+ +
fEditorInformeRecibosCliPendientesReport
+ T +
+ +
fEditorInformeRecibosProveedorReport
+ TForm +
+ +
fEditorInformeRecibosProvPendientesReport
+ TForm +
+ + +
frViewFiltroClientes
+ TFrame +
+ +
frViewFiltroImportes
+ TFrame +
+ +
frViewFiltroProveedores
+ TFrame +
+ +
frViewParametrosInforme
+ TFrame +
+ +
frViewPeriodoFechas
+ TFrame +
+ + + + + + +
+
+ diff --git a/Source/Modulos/Gestor de informes/Views/GestorInformes_view.rc b/Source/Modulos/Gestor de informes/Views/GestorInformes_view.rc new file mode 100644 index 00000000..153736af --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/GestorInformes_view.rc @@ -0,0 +1,22 @@ +1 VERSIONINFO +FILEVERSION 1,0,0,0 +PRODUCTVERSION 1,0,0,0 +FILEFLAGSMASK 0x3FL +FILEFLAGS 0x00L +FILEOS 0x40004L +FILETYPE 0x1L +FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "0C0A04E4" + BEGIN + VALUE "FileVersion", "1.0.0.0\0" + VALUE "ProductVersion", "1.0.0.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0C0A, 1252 + END +END diff --git a/Source/Modulos/Gestor de informes/Views/GestorInformes_view.res b/Source/Modulos/Gestor de informes/Views/GestorInformes_view.res new file mode 100644 index 00000000..8b251f31 Binary files /dev/null and b/Source/Modulos/Gestor de informes/Views/GestorInformes_view.res differ diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeBase.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeBase.dfm new file mode 100644 index 00000000..cb500f4f --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeBase.dfm @@ -0,0 +1,126 @@ +inherited fEditorInformeBase: TfEditorInformeBase + Caption = '' + ClientHeight = 483 + ClientWidth = 787 + ExplicitWidth = 795 + ExplicitHeight = 517 + PixelsPerInch = 96 + TextHeight = 13 + inherited JvNavPanelHeader: TJvNavPanelHeader + Width = 787 + ExplicitWidth = 787 + inherited Image1: TImage + Left = 760 + ExplicitLeft = 760 + end + end + inherited TBXDock: TTBXDock + Width = 787 + ExplicitWidth = 787 + inherited tbxMenu: TTBXToolbar + ExplicitWidth = 787 + end + end + inherited StatusBar: TJvStatusBar + Top = 464 + Width = 787 + ExplicitTop = 464 + ExplicitWidth = 787 + end + object TBXMultiDockIzquierdo: TTBXMultiDock [3] + Left = 0 + Top = 102 + Width = 7 + Height = 362 + Position = dpLeft + end + object TBXMultiDockDerecho: TTBXMultiDock [4] + Left = 633 + Top = 102 + Width = 154 + Height = 362 + Position = dpRight + object pnlParametros: TTBXDockablePanel + Left = 0 + Top = 0 + Caption = 'Par'#225'metros' + CloseButton = False + CloseButtonWhenDocked = False + DefaultDock = TBXMultiDockDerecho + DockableTo = [dpLeft, dpRight] + DockedWidth = 150 + DockMode = dmCannotFloat + DockPos = 6 + FloatingWidth = 128 + FloatingHeight = 128 + SupportedDocks = [dkStandardDock, dkMultiDock] + TabOrder = 0 + object TBXDockablePanel1: TTBXDockablePanel + Left = 0 + Top = 196 + MaxClientHeight = 50 + Align = alBottom + Caption = 'TBXDockablePanel1' + FloatingWidth = 128 + FloatingHeight = 128 + SupportedDocks = [dkStandardDock, dkMultiDock] + TabOrder = 0 + ExplicitTop = 274 + ExplicitWidth = 128 + object TBXButton1: TTBXButton + Left = 16 + Top = 12 + Width = 121 + Height = 24 + Action = actRefrescar + ImageIndex = 9 + Images = SmallImages + TabOrder = 0 + end + end + end + end + inherited frxOLEObject1: TfrxOLEObject + Top = 200 + end + inherited frxRichObject1: TfrxRichObject + Top = 232 + end + inherited frxCrossObject1: TfrxCrossObject + Top = 200 + end + inherited frxCheckBoxObject1: TfrxCheckBoxObject + Top = 232 + end + inherited frxDialogControls1: TfrxDialogControls + Top = 264 + end + inherited frxTIFFExport1: TfrxTIFFExport + Left = 136 + Top = 152 + end + inherited frxPDFExport1: TfrxPDFExport + Left = 176 + Top = 152 + end + inherited frxBMPExport1: TfrxBMPExport + Left = 208 + Top = 152 + end + inherited frxXLSExport1: TfrxXLSExport + Left = 56 + Top = 152 + end + inherited frxMailExport1: TfrxMailExport + Left = 96 + Top = 152 + end + inherited frxRTFExport: TfrxRTFExport + Left = 248 + Top = 152 + end + inherited frxSimpleTextExport1: TfrxSimpleTextExport + Left = 280 + Top = 152 + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeBase.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeBase.pas new file mode 100644 index 00000000..1e5dee61 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeBase.pas @@ -0,0 +1,32 @@ +unit uEditorInformeBase; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail, + frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient, + frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage, + JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, + StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems, + TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, + JvExControls, JvNavigationPane, uIEditorInformeBase, TBXDkPanels; + +type + TfEditorInformeBase = class(TfEditorPreview, IEditorInformeBase) + TBXMultiDockIzquierdo: TTBXMultiDock; + TBXMultiDockDerecho: TTBXMultiDock; + pnlParametros: TTBXDockablePanel; + TBXDockablePanel1: TTBXDockablePanel; + TBXButton1: TTBXButton; + private + { Private declarations } + public + { Public declarations } + end; + +implementation + +{$R *.dfm} + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClientePendientesReport.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClientePendientesReport.dfm new file mode 100644 index 00000000..38cfafa0 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClientePendientesReport.dfm @@ -0,0 +1,202 @@ +inherited fEditorInformeFacturasClientePendientesReport: TfEditorInformeFacturasClientePendientesReport + Caption = 'fEditorInformeFacturasClientePendientesReport' + ClientHeight = 655 + ClientWidth = 895 + ExplicitWidth = 903 + ExplicitHeight = 689 + PixelsPerInch = 96 + TextHeight = 13 + inherited JvNavPanelHeader: TJvNavPanelHeader + Width = 895 + ExplicitWidth = 895 + inherited Image1: TImage + Left = 868 + ExplicitLeft = 868 + end + end + inherited TBXDock: TTBXDock + Width = 895 + ExplicitWidth = 895 + inherited tbxMenu: TTBXToolbar + ExplicitWidth = 895 + end + inherited TBXToolbar1: TTBXToolbar + ExplicitWidth = 591 + object TBXItem58: TTBXItem [0] + Action = actRefrescar + DisplayMode = nbdmImageAndText + Images = SmallImages + end + end + end + inherited StatusBar: TJvStatusBar + Top = 636 + Width = 895 + ExplicitTop = 636 + ExplicitWidth = 895 + end + inherited TBXMultiDockIzquierdo: TTBXMultiDock + Height = 534 + ExplicitHeight = 534 + end + inherited TBXMultiDockDerecho: TTBXMultiDock + Left = 703 + Width = 192 + Height = 534 + ExplicitLeft = 703 + ExplicitWidth = 192 + ExplicitHeight = 534 + inherited pnlParametros: TTBXDockablePanel + DockedWidth = 188 + ExplicitWidth = 192 + ExplicitHeight = 518 + inline frViewPeriodoFechas1: TfrViewPeriodoFechas [0] + Left = 0 + Top = 0 + Width = 188 + Height = 136 + Align = alTop + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 0 + ReadOnly = False + ExplicitWidth = 188 + ExplicitHeight = 136 + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited cbPeriodo: TcxComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 153 + Width = 153 + end + end + inherited TBXAlignmentPanel2: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited Label3: TLabel + Width = 85 + end + inherited edtFechaFin: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 99 + Width = 99 + end + inherited edtFechaIni: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 97 + Width = 97 + end + end + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + end + inherited TBXDockablePanel1: TTBXDockablePanel + Top = 368 + TabOrder = 2 + ExplicitTop = 456 + ExplicitWidth = 188 + ExplicitHeight = 40 + inherited TBXButton1: TTBXButton + AlignWithMargins = True + Left = 3 + Top = 3 + Width = 182 + Height = 37 + Margins.Left = 8 + Margins.Top = 8 + Margins.Right = 8 + Margins.Bottom = 8 + Align = alTop + ExplicitLeft = 3 + ExplicitTop = 3 + ExplicitWidth = 182 + ExplicitHeight = 37 + end + end + inline frViewFiltroImportes1: TfrViewFiltroImportes + Left = 0 + Top = 136 + Width = 188 + Height = 77 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 1 + ReadOnly = False + ExplicitTop = 136 + ExplicitWidth = 188 + ExplicitHeight = 77 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited eImporte: TcxSpinEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end + end + end + inline frViewFiltroClientes1: TfrViewFiltroClientes + Left = 0 + Top = 213 + Width = 188 + Height = 146 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 3 + ReadOnly = False + ExplicitTop = 213 + ExplicitWidth = 188 + ExplicitHeight = 146 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited bElegirCliente: TBitBtn + Width = 108 + ExplicitWidth = 108 + end + inherited edtCliente: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 141 + Width = 141 + end + end + end + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClientePendientesReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClientePendientesReport.pas new file mode 100644 index 00000000..5af4f753 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClientePendientesReport.pas @@ -0,0 +1,132 @@ +unit uEditorInformeFacturasClientePendientesReport; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail, + frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient, + frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage, + JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, + StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems, + TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, + JvExControls, JvNavigationPane, uCustomView, + uViewBase, uViewPeriodoFechas, + uViewFiltroClientes, dxLayoutControl, cxControls, uViewFiltroImportes, + FactuGES_Intf, TBXDkPanels, uEditorInformeBase, + uIEditorInformeBase, uViewParametrosInforme, + uIEditorInformeFacturasClientePendientesReport; + +type + TfEditorInformeFacturasClientePendientesReport = class(TfEditorInformeBase, IEditorInformeFacturasClientePendientesReport) + TBXItem58: TTBXItem; + frViewPeriodoFechas1: TfrViewPeriodoFechas; + frViewFiltroImportes1: TfrViewFiltroImportes; + frViewFiltroClientes1: TfrViewFiltroClientes; + procedure actRefrescarExecute(Sender: TObject); + private + FListaIDClientes: TIntegerArray; + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDClientes: TIntegerArray; + function GetImporteMinimo: Currency; + function GetDesglosadoCliente: Boolean; + + procedure RefrescarInforme; + + public + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDClientes: TIntegerArray read GetListaIDClientes; + property DesglosadoCliente: Boolean read GetDesglosadoCliente; + property ImporteMinimo: Currency read GetImporteMinimo; + + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + + +implementation + +{$R *.dfm} + +uses uROTypes, uGestorInformesController, uFactuGES_App; + +{ TfEditorGestorInformesReport } + +procedure TfEditorInformeFacturasClientePendientesReport.actRefrescarExecute(Sender: TObject); +begin + inherited; + RefrescarInforme; +end; + +constructor TfEditorInformeFacturasClientePendientesReport.Create(AOwner: TComponent); +begin + inherited; + FListaIDClientes := TIntegerArray.Create; +end; + +destructor TfEditorInformeFacturasClientePendientesReport.Destroy; +begin + FListaIDClientes.Free; + inherited; +end; + +function TfEditorInformeFacturasClientePendientesReport.GetDesglosadoCliente: Boolean; +begin + if frViewFiltroImportes1.cbxDesglosado.Enabled then + Result := frViewFiltroClientes1.cbxDesglosado.Checked + else + Result := False; +end; + +function TfEditorInformeFacturasClientePendientesReport.GetFechaFin: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaFin.Date; +end; + +function TfEditorInformeFacturasClientePendientesReport.GetFechaInicio: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaIni.Date; +end; + +function TfEditorInformeFacturasClientePendientesReport.GetImporteMinimo: Currency; +begin + if frViewFiltroImportes1.eImporte.Enabled then + Result := frViewFiltroImportes1.eImporte.Value + else + Result := 0; +end; + +function TfEditorInformeFacturasClientePendientesReport.GetListaIDClientes: TIntegerArray; +begin + FListaIDClientes.Clear; + if Assigned(frViewFiltroClientes1.Cliente) then + FListaIDClientes.Add(frViewFiltroClientes1.Cliente.ID); + + Result := FListaIDClientes; +end; + +procedure TfEditorInformeFacturasClientePendientesReport.RefrescarInforme; +var + AStream: Binary; +begin + ShowHourglassCursor; + try + AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeListadoFacturasCliPendientes( + AppFactuGES.EmpresaActiva.ID, + FechaInicio, + FechaFin, + ListaIDClientes, + DesglosadoCliente, + ImporteMinimo); + + LoadFromStream(AStream); + Report.ShowPreparedReport; + finally + FreeAndNil(AStream); + HideHourglassCursor; + end; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClienteReport.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClienteReport.dfm new file mode 100644 index 00000000..6e84ca94 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClienteReport.dfm @@ -0,0 +1,202 @@ +inherited fEditorInformeFacturasClienteReport: TfEditorInformeFacturasClienteReport + Caption = 'fEditorInformeFacturasClienteReport' + ClientHeight = 655 + ClientWidth = 895 + ExplicitWidth = 903 + ExplicitHeight = 689 + PixelsPerInch = 96 + TextHeight = 13 + inherited JvNavPanelHeader: TJvNavPanelHeader + Width = 895 + ExplicitWidth = 895 + inherited Image1: TImage + Left = 868 + ExplicitLeft = 868 + end + end + inherited TBXDock: TTBXDock + Width = 895 + ExplicitWidth = 895 + inherited tbxMenu: TTBXToolbar + ExplicitWidth = 895 + end + inherited TBXToolbar1: TTBXToolbar + ExplicitWidth = 591 + object TBXItem58: TTBXItem [0] + Action = actRefrescar + DisplayMode = nbdmImageAndText + Images = SmallImages + end + end + end + inherited StatusBar: TJvStatusBar + Top = 636 + Width = 895 + ExplicitTop = 636 + ExplicitWidth = 895 + end + inherited TBXMultiDockIzquierdo: TTBXMultiDock + Height = 534 + ExplicitHeight = 534 + end + inherited TBXMultiDockDerecho: TTBXMultiDock + Left = 703 + Width = 192 + Height = 534 + ExplicitLeft = 703 + ExplicitWidth = 192 + ExplicitHeight = 534 + inherited pnlParametros: TTBXDockablePanel + DockedWidth = 188 + ExplicitWidth = 192 + ExplicitHeight = 518 + inline frViewPeriodoFechas1: TfrViewPeriodoFechas [0] + Left = 0 + Top = 0 + Width = 188 + Height = 136 + Align = alTop + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 0 + ReadOnly = False + ExplicitWidth = 188 + ExplicitHeight = 136 + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited cbPeriodo: TcxComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 153 + Width = 153 + end + end + inherited TBXAlignmentPanel2: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited Label3: TLabel + Width = 85 + end + inherited edtFechaFin: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 99 + Width = 99 + end + inherited edtFechaIni: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 97 + Width = 97 + end + end + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + end + inherited TBXDockablePanel1: TTBXDockablePanel + Top = 368 + TabOrder = 2 + ExplicitTop = 440 + ExplicitWidth = 188 + ExplicitHeight = 50 + inherited TBXButton1: TTBXButton + AlignWithMargins = True + Left = 3 + Top = 3 + Width = 182 + Height = 37 + Margins.Left = 8 + Margins.Top = 8 + Margins.Right = 8 + Margins.Bottom = 8 + Align = alTop + ExplicitLeft = 3 + ExplicitTop = 3 + ExplicitWidth = 182 + ExplicitHeight = 37 + end + end + inline frViewFiltroImportes1: TfrViewFiltroImportes + Left = 0 + Top = 136 + Width = 188 + Height = 77 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 1 + ReadOnly = False + ExplicitTop = 136 + ExplicitWidth = 188 + ExplicitHeight = 77 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited eImporte: TcxSpinEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end + end + end + inline frViewFiltroClientes1: TfrViewFiltroClientes + Left = 0 + Top = 213 + Width = 188 + Height = 146 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 3 + ReadOnly = False + ExplicitTop = 213 + ExplicitWidth = 188 + ExplicitHeight = 146 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited bElegirCliente: TBitBtn + Width = 108 + ExplicitWidth = 108 + end + inherited edtCliente: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 141 + Width = 141 + end + end + end + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClienteReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClienteReport.pas new file mode 100644 index 00000000..3baa8ee1 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClienteReport.pas @@ -0,0 +1,131 @@ +unit uEditorInformeFacturasClienteReport; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail, + frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient, + frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage, + JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, + StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems, + TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, + JvExControls, JvNavigationPane, uCustomView, + uViewBase, uViewPeriodoFechas, + uViewFiltroClientes, dxLayoutControl, cxControls, uViewFiltroImportes, + FactuGES_Intf, TBXDkPanels, uEditorInformeBase, + uIEditorInformeBase, uViewParametrosInforme, uIEditorInformeFacturasClienteReport; + +type + TfEditorInformeFacturasClienteReport = class(TfEditorInformeBase, IEditorInformeFacturasClienteReport) + TBXItem58: TTBXItem; + frViewPeriodoFechas1: TfrViewPeriodoFechas; + frViewFiltroImportes1: TfrViewFiltroImportes; + frViewFiltroClientes1: TfrViewFiltroClientes; + procedure actRefrescarExecute(Sender: TObject); + private + FListaIDClientes: TIntegerArray; + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDClientes: TIntegerArray; + function GetImporteMinimo: Currency; + function GetDesglosadoCliente: Boolean; + + procedure RefrescarInforme; + + public + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDClientes: TIntegerArray read GetListaIDClientes; + property DesglosadoCliente: Boolean read GetDesglosadoCliente; + property ImporteMinimo: Currency read GetImporteMinimo; + + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + + +implementation + +{$R *.dfm} + +uses uROTypes, uGestorInformesController, uFactuGES_App; + +{ TfEditorGestorInformesReport } + +procedure TfEditorInformeFacturasClienteReport.actRefrescarExecute(Sender: TObject); +begin + inherited; + RefrescarInforme; +end; + +constructor TfEditorInformeFacturasClienteReport.Create(AOwner: TComponent); +begin + inherited; + FListaIDClientes := TIntegerArray.Create; +end; + +destructor TfEditorInformeFacturasClienteReport.Destroy; +begin + FListaIDClientes.Free; + inherited; +end; + +function TfEditorInformeFacturasClienteReport.GetDesglosadoCliente: Boolean; +begin + if frViewFiltroImportes1.cbxDesglosado.Enabled then + Result := frViewFiltroClientes1.cbxDesglosado.Checked + else + Result := False; +end; + +function TfEditorInformeFacturasClienteReport.GetFechaFin: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaFin.Date; +end; + +function TfEditorInformeFacturasClienteReport.GetFechaInicio: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaIni.Date; +end; + +function TfEditorInformeFacturasClienteReport.GetImporteMinimo: Currency; +begin + if frViewFiltroImportes1.eImporte.Enabled then + Result := frViewFiltroImportes1.eImporte.Value + else + Result := 0; +end; + +function TfEditorInformeFacturasClienteReport.GetListaIDClientes: TIntegerArray; +begin + FListaIDClientes.Clear; + if Assigned(frViewFiltroClientes1.Cliente) then + FListaIDClientes.Add(frViewFiltroClientes1.Cliente.ID); + + Result := FListaIDClientes; +end; + +procedure TfEditorInformeFacturasClienteReport.RefrescarInforme; +var + AStream: Binary; +begin + ShowHourglassCursor; + try + AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeListadoFacturasCli( + AppFactuGES.EmpresaActiva.ID, + FechaInicio, + FechaFin, + ListaIDClientes, + DesglosadoCliente, + ImporteMinimo); + + LoadFromStream(AStream); + Report.ShowPreparedReport; + finally + FreeAndNil(AStream); + HideHourglassCursor; + end; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorPendientesReport.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorPendientesReport.dfm new file mode 100644 index 00000000..bf96e4c9 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorPendientesReport.dfm @@ -0,0 +1,201 @@ +inherited fEditorInformeFacturasProveedorPendientesReport: TfEditorInformeFacturasProveedorPendientesReport + Caption = 'fEditorInformeFacturasProveedorPendientesReport' + ClientHeight = 655 + ClientWidth = 895 + ExplicitWidth = 903 + ExplicitHeight = 689 + PixelsPerInch = 96 + TextHeight = 13 + inherited JvNavPanelHeader: TJvNavPanelHeader + Width = 895 + ExplicitWidth = 895 + inherited Image1: TImage + Left = 868 + ExplicitLeft = 868 + end + end + inherited TBXDock: TTBXDock + Width = 895 + ExplicitWidth = 895 + inherited tbxMenu: TTBXToolbar + ExplicitWidth = 895 + end + inherited TBXToolbar1: TTBXToolbar + ExplicitWidth = 591 + object TBXItem58: TTBXItem [0] + Action = actRefrescar + DisplayMode = nbdmImageAndText + Images = SmallImages + end + end + end + inherited StatusBar: TJvStatusBar + Top = 636 + Width = 895 + ExplicitTop = 636 + ExplicitWidth = 895 + end + inherited TBXMultiDockIzquierdo: TTBXMultiDock + Height = 534 + ExplicitHeight = 534 + end + inherited TBXMultiDockDerecho: TTBXMultiDock + Left = 703 + Width = 192 + Height = 534 + ExplicitLeft = 703 + ExplicitWidth = 192 + ExplicitHeight = 534 + inherited pnlParametros: TTBXDockablePanel + DockedWidth = 188 + ExplicitWidth = 192 + ExplicitHeight = 518 + inline frViewPeriodoFechas1: TfrViewPeriodoFechas [0] + Left = 0 + Top = 0 + Width = 188 + Height = 136 + Align = alTop + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 0 + ReadOnly = False + ExplicitWidth = 188 + ExplicitHeight = 136 + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited cbPeriodo: TcxComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 153 + Width = 153 + end + end + inherited TBXAlignmentPanel2: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited Label3: TLabel + Width = 172 + end + inherited edtFechaFin: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 99 + Width = 99 + end + inherited edtFechaIni: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 97 + Width = 97 + end + end + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + end + inherited TBXDockablePanel1: TTBXDockablePanel + Top = 368 + TabOrder = 2 + ExplicitTop = 368 + ExplicitWidth = 188 + inherited TBXButton1: TTBXButton + AlignWithMargins = True + Left = 3 + Top = 3 + Width = 182 + Height = 37 + Margins.Left = 8 + Margins.Top = 8 + Margins.Right = 8 + Margins.Bottom = 8 + Align = alTop + ExplicitLeft = 3 + ExplicitTop = 3 + ExplicitWidth = 182 + ExplicitHeight = 37 + end + end + inline frViewFiltroImportes1: TfrViewFiltroImportes + Left = 0 + Top = 136 + Width = 188 + Height = 77 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 1 + ReadOnly = False + ExplicitTop = 136 + ExplicitWidth = 188 + ExplicitHeight = 77 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited eImporte: TcxSpinEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end + end + end + inline frViewFiltroProveedores1: TfrViewFiltroProveedores + Left = 0 + Top = 213 + Width = 188 + Height = 146 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 3 + ReadOnly = False + ExplicitTop = 213 + ExplicitWidth = 188 + ExplicitHeight = 146 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited bElegirProveedor: TBitBtn + Width = 108 + ExplicitWidth = 108 + end + inherited edtProveedor: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 141 + Width = 141 + end + end + end + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorPendientesReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorPendientesReport.pas new file mode 100644 index 00000000..ab1aebed --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorPendientesReport.pas @@ -0,0 +1,132 @@ +unit uEditorInformeFacturasProveedorPendientesReport; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail, + frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient, + frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage, + JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, + StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems, + TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, + JvExControls, JvNavigationPane, uCustomView, + uViewBase, uViewPeriodoFechas, + uViewFiltroProveedores, dxLayoutControl, cxControls, uViewFiltroImportes, + FactuGES_Intf, TBXDkPanels, uEditorInformeBase, + uIEditorInformeBase, uViewParametrosInforme, + uIEditorInformeFacturasProveedorPendientesReport; + +type + TfEditorInformeFacturasProveedorPendientesReport = class(TfEditorInformeBase, IEditorInformeFacturasProveedorPendientesReport) + TBXItem58: TTBXItem; + frViewPeriodoFechas1: TfrViewPeriodoFechas; + frViewFiltroImportes1: TfrViewFiltroImportes; + frViewFiltroProveedores1: TfrViewFiltroProveedores; + procedure actRefrescarExecute(Sender: TObject); + private + FListaIDProveedores: TIntegerArray; + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDProveedores: TIntegerArray; + function GetImporteMinimo: Currency; + function GetDesglosadoProveedor: Boolean; + + procedure RefrescarInforme; + + public + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDProveedores: TIntegerArray read GetListaIDProveedores; + property DesglosadoProveedor: Boolean read GetDesglosadoProveedor; + property ImporteMinimo: Currency read GetImporteMinimo; + + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + + +implementation + +{$R *.dfm} + +uses uROTypes, uGestorInformesController, uFactuGES_App; + +{ TfEditorGestorInformesReport } + +procedure TfEditorInformeFacturasProveedorPendientesReport.actRefrescarExecute(Sender: TObject); +begin + inherited; + RefrescarInforme; +end; + +constructor TfEditorInformeFacturasProveedorPendientesReport.Create(AOwner: TComponent); +begin + inherited; + FListaIDProveedores := TIntegerArray.Create; +end; + +destructor TfEditorInformeFacturasProveedorPendientesReport.Destroy; +begin + FListaIDProveedores.Free; + inherited; +end; + +function TfEditorInformeFacturasProveedorPendientesReport.GetDesglosadoProveedor: Boolean; +begin + if frViewFiltroImportes1.cbxDesglosado.Enabled then + Result := frViewFiltroProveedores1.cbxDesglosado.Checked + else + Result := False; +end; + +function TfEditorInformeFacturasProveedorPendientesReport.GetFechaFin: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaFin.Date; +end; + +function TfEditorInformeFacturasProveedorPendientesReport.GetFechaInicio: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaIni.Date; +end; + +function TfEditorInformeFacturasProveedorPendientesReport.GetImporteMinimo: Currency; +begin + if frViewFiltroImportes1.eImporte.Enabled then + Result := frViewFiltroImportes1.eImporte.Value + else + Result := 0; +end; + +function TfEditorInformeFacturasProveedorPendientesReport.GetListaIDProveedores: TIntegerArray; +begin + FListaIDProveedores.Clear; + if Assigned(frViewFiltroProveedores1.Proveedor) then + FListaIDProveedores.Add(frViewFiltroProveedores1.Proveedor.ID); + + Result := FListaIDProveedores; +end; + +procedure TfEditorInformeFacturasProveedorPendientesReport.RefrescarInforme; +var + AStream: Binary; +begin + ShowHourglassCursor; + try + AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeListadoFacturasProvPendientes( + AppFactuGES.EmpresaActiva.ID, + FechaInicio, + FechaFin, + ListaIDProveedores, + DesglosadoProveedor, + ImporteMinimo); + + LoadFromStream(AStream); + Report.ShowPreparedReport; + finally + FreeAndNil(AStream); + HideHourglassCursor; + end; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorReport.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorReport.dfm new file mode 100644 index 00000000..81b4bd65 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorReport.dfm @@ -0,0 +1,201 @@ +inherited fEditorInformeFacturasProveedorReport: TfEditorInformeFacturasProveedorReport + Caption = 'fEditorInformeFacturasProveedorReport' + ClientHeight = 655 + ClientWidth = 895 + ExplicitWidth = 903 + ExplicitHeight = 689 + PixelsPerInch = 96 + TextHeight = 13 + inherited JvNavPanelHeader: TJvNavPanelHeader + Width = 895 + ExplicitWidth = 895 + inherited Image1: TImage + Left = 868 + ExplicitLeft = 868 + end + end + inherited TBXDock: TTBXDock + Width = 895 + ExplicitWidth = 895 + inherited tbxMenu: TTBXToolbar + ExplicitWidth = 895 + end + inherited TBXToolbar1: TTBXToolbar + ExplicitWidth = 591 + object TBXItem58: TTBXItem [0] + Action = actRefrescar + DisplayMode = nbdmImageAndText + Images = SmallImages + end + end + end + inherited StatusBar: TJvStatusBar + Top = 636 + Width = 895 + ExplicitTop = 636 + ExplicitWidth = 895 + end + inherited TBXMultiDockIzquierdo: TTBXMultiDock + Height = 534 + ExplicitHeight = 534 + end + inherited TBXMultiDockDerecho: TTBXMultiDock + Left = 703 + Width = 192 + Height = 534 + ExplicitLeft = 703 + ExplicitWidth = 192 + ExplicitHeight = 534 + inherited pnlParametros: TTBXDockablePanel + DockedWidth = 188 + ExplicitWidth = 192 + ExplicitHeight = 518 + inline frViewPeriodoFechas1: TfrViewPeriodoFechas [0] + Left = 0 + Top = 0 + Width = 188 + Height = 136 + Align = alTop + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 0 + ReadOnly = False + ExplicitWidth = 188 + ExplicitHeight = 136 + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited cbPeriodo: TcxComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 153 + Width = 153 + end + end + inherited TBXAlignmentPanel2: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited Label3: TLabel + Width = 172 + end + inherited edtFechaFin: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 99 + Width = 99 + end + inherited edtFechaIni: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 97 + Width = 97 + end + end + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + end + inherited TBXDockablePanel1: TTBXDockablePanel + Top = 368 + TabOrder = 2 + ExplicitTop = 368 + ExplicitWidth = 188 + inherited TBXButton1: TTBXButton + AlignWithMargins = True + Left = 3 + Top = 3 + Width = 182 + Height = 37 + Margins.Left = 8 + Margins.Top = 8 + Margins.Right = 8 + Margins.Bottom = 8 + Align = alTop + ExplicitLeft = 3 + ExplicitTop = 3 + ExplicitWidth = 182 + ExplicitHeight = 37 + end + end + inline frViewFiltroImportes1: TfrViewFiltroImportes + Left = 0 + Top = 136 + Width = 188 + Height = 77 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 1 + ReadOnly = False + ExplicitTop = 136 + ExplicitWidth = 188 + ExplicitHeight = 77 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited eImporte: TcxSpinEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end + end + end + inline frViewFiltroProveedores1: TfrViewFiltroProveedores + Left = 0 + Top = 213 + Width = 188 + Height = 146 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 3 + ReadOnly = False + ExplicitTop = 213 + ExplicitWidth = 188 + ExplicitHeight = 146 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited bElegirProveedor: TBitBtn + Width = 108 + ExplicitWidth = 108 + end + inherited edtProveedor: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 141 + Width = 141 + end + end + end + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorReport.pas new file mode 100644 index 00000000..a5db710a --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasProveedorReport.pas @@ -0,0 +1,131 @@ +unit uEditorInformeFacturasProveedorReport; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail, + frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient, + frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage, + JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, + StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems, + TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, + JvExControls, JvNavigationPane, uCustomView, + uViewBase, uViewPeriodoFechas, + uViewFiltroProveedores, dxLayoutControl, cxControls, uViewFiltroImportes, + FactuGES_Intf, TBXDkPanels, uEditorInformeBase, + uIEditorInformeBase, uViewParametrosInforme, uIEditorInformeFacturasProveedorReport; + +type + TfEditorInformeFacturasProveedorReport = class(TfEditorInformeBase, IEditorInformeFacturasProveedorReport) + TBXItem58: TTBXItem; + frViewPeriodoFechas1: TfrViewPeriodoFechas; + frViewFiltroImportes1: TfrViewFiltroImportes; + frViewFiltroProveedores1: TfrViewFiltroProveedores; + procedure actRefrescarExecute(Sender: TObject); + private + FListaIDProveedores: TIntegerArray; + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDProveedores: TIntegerArray; + function GetImporteMinimo: Currency; + function GetDesglosadoProveedor: Boolean; + + procedure RefrescarInforme; + + public + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDProveedores: TIntegerArray read GetListaIDProveedores; + property DesglosadoProveedor: Boolean read GetDesglosadoProveedor; + property ImporteMinimo: Currency read GetImporteMinimo; + + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + + +implementation + +{$R *.dfm} + +uses uROTypes, uGestorInformesController, uFactuGES_App; + +{ TfEditorGestorInformesReport } + +procedure TfEditorInformeFacturasProveedorReport.actRefrescarExecute(Sender: TObject); +begin + inherited; + RefrescarInforme; +end; + +constructor TfEditorInformeFacturasProveedorReport.Create(AOwner: TComponent); +begin + inherited; + FListaIDProveedores := TIntegerArray.Create; +end; + +destructor TfEditorInformeFacturasProveedorReport.Destroy; +begin + FListaIDProveedores.Free; + inherited; +end; + +function TfEditorInformeFacturasProveedorReport.GetDesglosadoProveedor: Boolean; +begin + if frViewFiltroImportes1.cbxDesglosado.Enabled then + Result := frViewFiltroProveedores1.cbxDesglosado.Checked + else + Result := False; +end; + +function TfEditorInformeFacturasProveedorReport.GetFechaFin: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaFin.Date; +end; + +function TfEditorInformeFacturasProveedorReport.GetFechaInicio: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaIni.Date; +end; + +function TfEditorInformeFacturasProveedorReport.GetImporteMinimo: Currency; +begin + if frViewFiltroImportes1.eImporte.Enabled then + Result := frViewFiltroImportes1.eImporte.Value + else + Result := 0; +end; + +function TfEditorInformeFacturasProveedorReport.GetListaIDProveedores: TIntegerArray; +begin + FListaIDProveedores.Clear; + if Assigned(frViewFiltroProveedores1.Proveedor) then + FListaIDProveedores.Add(frViewFiltroProveedores1.Proveedor.ID); + + Result := FListaIDProveedores; +end; + +procedure TfEditorInformeFacturasProveedorReport.RefrescarInforme; +var + AStream: Binary; +begin + ShowHourglassCursor; + try + AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeListadoFacturasProv( + AppFactuGES.EmpresaActiva.ID, + FechaInicio, + FechaFin, + ListaIDProveedores, + DesglosadoProveedor, + ImporteMinimo); + + LoadFromStream(AStream); + Report.ShowPreparedReport; + finally + FreeAndNil(AStream); + HideHourglassCursor; + end; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAClientesReport.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAClientesReport.dfm new file mode 100644 index 00000000..502250f6 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAClientesReport.dfm @@ -0,0 +1,201 @@ +inherited fEditorInformeIVAClientesReport: TfEditorInformeIVAClientesReport + Caption = 'fEditorInformeIVAClientesReport' + ClientHeight = 655 + ClientWidth = 895 + ExplicitWidth = 903 + ExplicitHeight = 689 + PixelsPerInch = 96 + TextHeight = 13 + inherited JvNavPanelHeader: TJvNavPanelHeader + Width = 895 + ExplicitWidth = 895 + inherited Image1: TImage + Left = 868 + ExplicitLeft = 868 + end + end + inherited TBXDock: TTBXDock + Width = 895 + ExplicitWidth = 895 + inherited tbxMenu: TTBXToolbar + ExplicitWidth = 895 + end + inherited TBXToolbar1: TTBXToolbar + ExplicitWidth = 591 + object TBXItem58: TTBXItem [0] + Action = actRefrescar + DisplayMode = nbdmImageAndText + Images = SmallImages + end + end + end + inherited StatusBar: TJvStatusBar + Top = 636 + Width = 895 + ExplicitTop = 636 + ExplicitWidth = 895 + end + inherited TBXMultiDockIzquierdo: TTBXMultiDock + Height = 534 + ExplicitHeight = 534 + end + inherited TBXMultiDockDerecho: TTBXMultiDock + Left = 703 + Width = 192 + Height = 534 + ExplicitLeft = 703 + ExplicitWidth = 192 + ExplicitHeight = 534 + inherited pnlParametros: TTBXDockablePanel + DockedWidth = 188 + ExplicitWidth = 192 + ExplicitHeight = 518 + inline frViewPeriodoFechas1: TfrViewPeriodoFechas [0] + Left = 0 + Top = 0 + Width = 188 + Height = 136 + Align = alTop + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 0 + ReadOnly = False + ExplicitWidth = 188 + ExplicitHeight = 136 + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited cbPeriodo: TcxComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 153 + Width = 153 + end + end + inherited TBXAlignmentPanel2: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited Label3: TLabel + Width = 172 + end + inherited edtFechaFin: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 99 + Width = 99 + end + inherited edtFechaIni: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 97 + Width = 97 + end + end + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + end + inherited TBXDockablePanel1: TTBXDockablePanel + Top = 368 + TabOrder = 2 + ExplicitTop = 368 + ExplicitWidth = 188 + inherited TBXButton1: TTBXButton + AlignWithMargins = True + Left = 3 + Top = 3 + Width = 182 + Height = 37 + Margins.Left = 8 + Margins.Top = 8 + Margins.Right = 8 + Margins.Bottom = 8 + Align = alTop + ExplicitLeft = 3 + ExplicitTop = 3 + ExplicitWidth = 182 + ExplicitHeight = 37 + end + end + inline frViewFiltroImportes1: TfrViewFiltroImportes + Left = 0 + Top = 136 + Width = 188 + Height = 77 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 1 + ReadOnly = False + ExplicitTop = 136 + ExplicitWidth = 188 + ExplicitHeight = 77 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited eImporte: TcxSpinEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end + end + end + inline frViewFiltroClientes1: TfrViewFiltroClientes + Left = 0 + Top = 213 + Width = 188 + Height = 146 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 3 + ReadOnly = False + ExplicitTop = 213 + ExplicitWidth = 188 + ExplicitHeight = 146 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited bElegirCliente: TBitBtn + Width = 108 + ExplicitWidth = 108 + end + inherited edtCliente: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 141 + Width = 141 + end + end + end + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAClientesReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAClientesReport.pas new file mode 100644 index 00000000..57073e98 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAClientesReport.pas @@ -0,0 +1,131 @@ +unit uEditorInformeIVAClientesReport; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail, + frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient, + frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage, + JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, + StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems, + TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, + JvExControls, JvNavigationPane, uCustomView, + uViewBase, uViewPeriodoFechas, + uViewFiltroClientes, dxLayoutControl, cxControls, uViewFiltroImportes, + FactuGES_Intf, TBXDkPanels, uEditorInformeBase, + uIEditorInformeBase, uViewParametrosInforme, uIEditorInformeIVAClientesReport; + +type + TfEditorInformeIVAClientesReport = class(TfEditorInformeBase, IEditorInformeIVAClientesReport) + TBXItem58: TTBXItem; + frViewPeriodoFechas1: TfrViewPeriodoFechas; + frViewFiltroImportes1: TfrViewFiltroImportes; + frViewFiltroClientes1: TfrViewFiltroClientes; + procedure actRefrescarExecute(Sender: TObject); + private + FListaIDClientes: TIntegerArray; + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDClientes: TIntegerArray; + function GetImporteMinimo: Currency; + function GetDesglosadoCliente: Boolean; + + procedure RefrescarInforme; + + public + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDClientes: TIntegerArray read GetListaIDClientes; + property DesglosadoCliente: Boolean read GetDesglosadoCliente; + property ImporteMinimo: Currency read GetImporteMinimo; + + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + + +implementation + +{$R *.dfm} + +uses uROTypes, uGestorInformesController, uFactuGES_App; + +{ TfEditorGestorInformesReport } + +procedure TfEditorInformeIVAClientesReport.actRefrescarExecute(Sender: TObject); +begin + inherited; + RefrescarInforme; +end; + +constructor TfEditorInformeIVAClientesReport.Create(AOwner: TComponent); +begin + inherited; + FListaIDClientes := TIntegerArray.Create; +end; + +destructor TfEditorInformeIVAClientesReport.Destroy; +begin + FListaIDClientes.Free; + inherited; +end; + +function TfEditorInformeIVAClientesReport.GetDesglosadoCliente: Boolean; +begin + if frViewFiltroImportes1.cbxDesglosado.Enabled then + Result := frViewFiltroClientes1.cbxDesglosado.Checked + else + Result := False; +end; + +function TfEditorInformeIVAClientesReport.GetFechaFin: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaFin.Date; +end; + +function TfEditorInformeIVAClientesReport.GetFechaInicio: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaIni.Date; +end; + +function TfEditorInformeIVAClientesReport.GetImporteMinimo: Currency; +begin + if frViewFiltroImportes1.eImporte.Enabled then + Result := frViewFiltroImportes1.eImporte.Value + else + Result := 0; +end; + +function TfEditorInformeIVAClientesReport.GetListaIDClientes: TIntegerArray; +begin + FListaIDClientes.Clear; + if Assigned(frViewFiltroClientes1.Cliente) then + FListaIDClientes.Add(frViewFiltroClientes1.Cliente.ID); + + Result := FListaIDClientes; +end; + +procedure TfEditorInformeIVAClientesReport.RefrescarInforme; +var + AStream: Binary; +begin + ShowHourglassCursor; + try + AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeIVAClientes( + AppFactuGES.EmpresaActiva.ID, + FechaInicio, + FechaFin, + ListaIDClientes, + DesglosadoCliente, + ImporteMinimo); + + LoadFromStream(AStream); + Report.ShowPreparedReport; + finally + FreeAndNil(AStream); + HideHourglassCursor; + end; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAProveedoresReport.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAProveedoresReport.dfm new file mode 100644 index 00000000..28a85ed6 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAProveedoresReport.dfm @@ -0,0 +1,201 @@ +inherited fEditorInformeIVAProveedoresReport: TfEditorInformeIVAProveedoresReport + Caption = 'fEditorInformeIVAProveedoresReport' + ClientHeight = 655 + ClientWidth = 895 + ExplicitWidth = 903 + ExplicitHeight = 689 + PixelsPerInch = 96 + TextHeight = 13 + inherited JvNavPanelHeader: TJvNavPanelHeader + Width = 895 + ExplicitWidth = 895 + inherited Image1: TImage + Left = 868 + ExplicitLeft = 868 + end + end + inherited TBXDock: TTBXDock + Width = 895 + ExplicitWidth = 895 + inherited tbxMenu: TTBXToolbar + ExplicitWidth = 895 + end + inherited TBXToolbar1: TTBXToolbar + ExplicitWidth = 591 + object TBXItem58: TTBXItem [0] + Action = actRefrescar + DisplayMode = nbdmImageAndText + Images = SmallImages + end + end + end + inherited StatusBar: TJvStatusBar + Top = 636 + Width = 895 + ExplicitTop = 636 + ExplicitWidth = 895 + end + inherited TBXMultiDockIzquierdo: TTBXMultiDock + Height = 534 + ExplicitHeight = 534 + end + inherited TBXMultiDockDerecho: TTBXMultiDock + Left = 703 + Width = 192 + Height = 534 + ExplicitLeft = 703 + ExplicitWidth = 192 + ExplicitHeight = 534 + inherited pnlParametros: TTBXDockablePanel + DockedWidth = 188 + ExplicitWidth = 192 + ExplicitHeight = 518 + inline frViewPeriodoFechas1: TfrViewPeriodoFechas [0] + Left = 0 + Top = 0 + Width = 188 + Height = 136 + Align = alTop + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 0 + ReadOnly = False + ExplicitWidth = 188 + ExplicitHeight = 136 + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited cbPeriodo: TcxComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 153 + Width = 153 + end + end + inherited TBXAlignmentPanel2: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited Label3: TLabel + Width = 85 + end + inherited edtFechaFin: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 99 + Width = 99 + end + inherited edtFechaIni: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 97 + Width = 97 + end + end + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + end + inherited TBXDockablePanel1: TTBXDockablePanel + Top = 368 + TabOrder = 2 + ExplicitTop = 368 + ExplicitWidth = 188 + inherited TBXButton1: TTBXButton + AlignWithMargins = True + Left = 3 + Top = 3 + Width = 182 + Height = 37 + Margins.Left = 8 + Margins.Top = 8 + Margins.Right = 8 + Margins.Bottom = 8 + Align = alTop + ExplicitLeft = 3 + ExplicitTop = 3 + ExplicitWidth = 182 + ExplicitHeight = 37 + end + end + inline frViewFiltroImportes1: TfrViewFiltroImportes + Left = 0 + Top = 136 + Width = 188 + Height = 77 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 1 + ReadOnly = False + ExplicitTop = 136 + ExplicitWidth = 188 + ExplicitHeight = 77 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited eImporte: TcxSpinEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end + end + end + inline frViewFiltroProveedores1: TfrViewFiltroProveedores + Left = 0 + Top = 213 + Width = 188 + Height = 146 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 3 + ReadOnly = False + ExplicitTop = 213 + ExplicitWidth = 188 + ExplicitHeight = 146 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited bElegirProveedor: TBitBtn + Width = 108 + ExplicitWidth = 108 + end + inherited edtProveedor: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 141 + Width = 141 + end + end + end + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAProveedoresReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAProveedoresReport.pas new file mode 100644 index 00000000..c5b543b7 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeIVAProveedoresReport.pas @@ -0,0 +1,131 @@ +unit uEditorInformeIVAProveedoresReport; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail, + frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient, + frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage, + JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, + StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems, + TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, + JvExControls, JvNavigationPane, uCustomView, + uViewBase, uViewPeriodoFechas, + uViewFiltroProveedores, dxLayoutControl, cxControls, uViewFiltroImportes, + FactuGES_Intf, TBXDkPanels, uEditorInformeBase, + uIEditorInformeBase, uViewParametrosInforme, uIEditorInformeIVAProveedoresReport; + +type + TfEditorInformeIVAProveedoresReport = class(TfEditorInformeBase, IEditorInformeIVAProveedoresReport) + TBXItem58: TTBXItem; + frViewPeriodoFechas1: TfrViewPeriodoFechas; + frViewFiltroImportes1: TfrViewFiltroImportes; + frViewFiltroProveedores1: TfrViewFiltroProveedores; + procedure actRefrescarExecute(Sender: TObject); + private + FListaIDProveedores: TIntegerArray; + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDProveedores: TIntegerArray; + function GetImporteMinimo: Currency; + function GetDesglosadoProveedor: Boolean; + + procedure RefrescarInforme; + + public + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDProveedores: TIntegerArray read GetListaIDProveedores; + property DesglosadoProveedor: Boolean read GetDesglosadoProveedor; + property ImporteMinimo: Currency read GetImporteMinimo; + + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + + +implementation + +{$R *.dfm} + +uses uROTypes, uGestorInformesController, uFactuGES_App; + +{ TfEditorGestorInformesReport } + +procedure TfEditorInformeIVAProveedoresReport.actRefrescarExecute(Sender: TObject); +begin + inherited; + RefrescarInforme; +end; + +constructor TfEditorInformeIVAProveedoresReport.Create(AOwner: TComponent); +begin + inherited; + FListaIDProveedores := TIntegerArray.Create; +end; + +destructor TfEditorInformeIVAProveedoresReport.Destroy; +begin + FListaIDProveedores.Free; + inherited; +end; + +function TfEditorInformeIVAProveedoresReport.GetDesglosadoProveedor: Boolean; +begin + if frViewFiltroImportes1.cbxDesglosado.Enabled then + Result := frViewFiltroProveedores1.cbxDesglosado.Checked + else + Result := False; +end; + +function TfEditorInformeIVAProveedoresReport.GetFechaFin: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaFin.Date; +end; + +function TfEditorInformeIVAProveedoresReport.GetFechaInicio: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaIni.Date; +end; + +function TfEditorInformeIVAProveedoresReport.GetImporteMinimo: Currency; +begin + if frViewFiltroImportes1.eImporte.Enabled then + Result := frViewFiltroImportes1.eImporte.Value + else + Result := 0; +end; + +function TfEditorInformeIVAProveedoresReport.GetListaIDProveedores: TIntegerArray; +begin + FListaIDProveedores.Clear; + if Assigned(frViewFiltroProveedores1.Proveedor) then + FListaIDProveedores.Add(frViewFiltroProveedores1.Proveedor.ID); + + Result := FListaIDProveedores; +end; + +procedure TfEditorInformeIVAProveedoresReport.RefrescarInforme; +var + AStream: Binary; +begin + ShowHourglassCursor; + try + AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeIVAProveedores( + AppFactuGES.EmpresaActiva.ID, + FechaInicio, + FechaFin, + ListaIDProveedores, + DesglosadoProveedor, + ImporteMinimo); + + LoadFromStream(AStream); + Report.ShowPreparedReport; + finally + FreeAndNil(AStream); + HideHourglassCursor; + end; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformePresupuestosReport.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformePresupuestosReport.dfm new file mode 100644 index 00000000..29de7b78 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformePresupuestosReport.dfm @@ -0,0 +1,201 @@ +inherited fEditorInformePresupuestosReport: TfEditorInformePresupuestosReport + Caption = 'fEditorInformePresupuestosReport' + ClientHeight = 655 + ClientWidth = 895 + ExplicitWidth = 903 + ExplicitHeight = 689 + PixelsPerInch = 96 + TextHeight = 13 + inherited JvNavPanelHeader: TJvNavPanelHeader + Width = 895 + ExplicitWidth = 895 + inherited Image1: TImage + Left = 868 + ExplicitLeft = 868 + end + end + inherited TBXDock: TTBXDock + Width = 895 + ExplicitWidth = 895 + inherited tbxMenu: TTBXToolbar + ExplicitWidth = 895 + end + inherited TBXToolbar1: TTBXToolbar + ExplicitWidth = 591 + object TBXItem58: TTBXItem [0] + Action = actRefrescar + DisplayMode = nbdmImageAndText + Images = SmallImages + end + end + end + inherited StatusBar: TJvStatusBar + Top = 636 + Width = 895 + ExplicitTop = 636 + ExplicitWidth = 895 + end + inherited TBXMultiDockIzquierdo: TTBXMultiDock + Height = 534 + ExplicitHeight = 534 + end + inherited TBXMultiDockDerecho: TTBXMultiDock + Left = 703 + Width = 192 + Height = 534 + ExplicitLeft = 703 + ExplicitWidth = 192 + ExplicitHeight = 534 + inherited pnlParametros: TTBXDockablePanel + DockedWidth = 188 + ExplicitWidth = 192 + ExplicitHeight = 518 + inline frViewPeriodoFechas1: TfrViewPeriodoFechas [0] + Left = 0 + Top = 0 + Width = 188 + Height = 136 + Align = alTop + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 0 + ReadOnly = False + ExplicitWidth = 188 + ExplicitHeight = 136 + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited cbPeriodo: TcxComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 153 + Width = 153 + end + end + inherited TBXAlignmentPanel2: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited Label3: TLabel + Width = 85 + end + inherited edtFechaFin: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 99 + Width = 99 + end + inherited edtFechaIni: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 97 + Width = 97 + end + end + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + end + inherited TBXDockablePanel1: TTBXDockablePanel + Top = 368 + TabOrder = 2 + ExplicitTop = 368 + ExplicitWidth = 188 + inherited TBXButton1: TTBXButton + AlignWithMargins = True + Left = 3 + Top = 3 + Width = 182 + Height = 37 + Margins.Left = 8 + Margins.Top = 8 + Margins.Right = 8 + Margins.Bottom = 8 + Align = alTop + ExplicitLeft = 3 + ExplicitTop = 3 + ExplicitWidth = 182 + ExplicitHeight = 37 + end + end + inline frViewFiltroImportes1: TfrViewFiltroImportes + Left = 0 + Top = 136 + Width = 188 + Height = 77 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 1 + ReadOnly = False + ExplicitTop = 136 + ExplicitWidth = 188 + ExplicitHeight = 77 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited eImporte: TcxSpinEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end + end + end + inline frViewFiltroClientes1: TfrViewFiltroClientes + Left = 0 + Top = 213 + Width = 188 + Height = 146 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 3 + ReadOnly = False + ExplicitTop = 213 + ExplicitWidth = 188 + ExplicitHeight = 146 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited bElegirCliente: TBitBtn + Width = 108 + ExplicitWidth = 108 + end + inherited edtCliente: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 141 + Width = 141 + end + end + end + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformePresupuestosReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformePresupuestosReport.pas new file mode 100644 index 00000000..5c171854 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformePresupuestosReport.pas @@ -0,0 +1,131 @@ +unit uEditorInformePresupuestosReport; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail, + frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient, + frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage, + JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, + StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems, + TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, + JvExControls, JvNavigationPane, uCustomView, + uViewBase, uViewPeriodoFechas, + uViewFiltroClientes, dxLayoutControl, cxControls, uViewFiltroImportes, + FactuGES_Intf, TBXDkPanels, uEditorInformeBase, + uIEditorInformeBase, uViewParametrosInforme, uIEditorInformePresupuestosReport; + +type + TfEditorInformePresupuestosReport = class(TfEditorInformeBase, IEditorInformePresupuestosReport) + TBXItem58: TTBXItem; + frViewPeriodoFechas1: TfrViewPeriodoFechas; + frViewFiltroImportes1: TfrViewFiltroImportes; + frViewFiltroClientes1: TfrViewFiltroClientes; + procedure actRefrescarExecute(Sender: TObject); + private + FListaIDClientes: TIntegerArray; + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDClientes: TIntegerArray; + function GetImporteMinimo: Currency; + function GetDesglosadoCliente: Boolean; + + procedure RefrescarInforme; + + public + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDClientes: TIntegerArray read GetListaIDClientes; + property DesglosadoCliente: Boolean read GetDesglosadoCliente; + property ImporteMinimo: Currency read GetImporteMinimo; + + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + + +implementation + +{$R *.dfm} + +uses uROTypes, uGestorInformesController, uFactuGES_App; + +{ TfEditorGestorInformesReport } + +procedure TfEditorInformePresupuestosReport.actRefrescarExecute(Sender: TObject); +begin + inherited; + RefrescarInforme; +end; + +constructor TfEditorInformePresupuestosReport.Create(AOwner: TComponent); +begin + inherited; + FListaIDClientes := TIntegerArray.Create; +end; + +destructor TfEditorInformePresupuestosReport.Destroy; +begin + FListaIDClientes.Free; + inherited; +end; + +function TfEditorInformePresupuestosReport.GetDesglosadoCliente: Boolean; +begin + if frViewFiltroImportes1.cbxDesglosado.Enabled then + Result := frViewFiltroClientes1.cbxDesglosado.Checked + else + Result := False; +end; + +function TfEditorInformePresupuestosReport.GetFechaFin: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaFin.Date; +end; + +function TfEditorInformePresupuestosReport.GetFechaInicio: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaIni.Date; +end; + +function TfEditorInformePresupuestosReport.GetImporteMinimo: Currency; +begin + if frViewFiltroImportes1.eImporte.Enabled then + Result := frViewFiltroImportes1.eImporte.Value + else + Result := 0; +end; + +function TfEditorInformePresupuestosReport.GetListaIDClientes: TIntegerArray; +begin + FListaIDClientes.Clear; + if Assigned(frViewFiltroClientes1.Cliente) then + FListaIDClientes.Add(frViewFiltroClientes1.Cliente.ID); + + Result := FListaIDClientes; +end; + +procedure TfEditorInformePresupuestosReport.RefrescarInforme; +var + AStream: Binary; +begin + ShowHourglassCursor; + try + AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeListadoPresupuestos( + AppFactuGES.EmpresaActiva.ID, + FechaInicio, + FechaFin, + ListaIDClientes, + DesglosadoCliente, + ImporteMinimo); + + LoadFromStream(AStream); + Report.ShowPreparedReport; + finally + FreeAndNil(AStream); + HideHourglassCursor; + end; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosCliPendientesReport.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosCliPendientesReport.dfm new file mode 100644 index 00000000..dc130d97 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosCliPendientesReport.dfm @@ -0,0 +1,201 @@ +inherited fEditorInformeRecibosCliPendientesReport: TfEditorInformeRecibosCliPendientesReport + Caption = 'fEditorInformeRecibosCliPendientesReport' + ClientHeight = 655 + ClientWidth = 895 + ExplicitWidth = 903 + ExplicitHeight = 689 + PixelsPerInch = 96 + TextHeight = 13 + inherited JvNavPanelHeader: TJvNavPanelHeader + Width = 895 + ExplicitWidth = 895 + inherited Image1: TImage + Left = 868 + ExplicitLeft = 868 + end + end + inherited TBXDock: TTBXDock + Width = 895 + ExplicitWidth = 895 + inherited tbxMenu: TTBXToolbar + ExplicitWidth = 895 + end + inherited TBXToolbar1: TTBXToolbar + ExplicitWidth = 591 + object TBXItem58: TTBXItem [0] + Action = actRefrescar + DisplayMode = nbdmImageAndText + Images = SmallImages + end + end + end + inherited StatusBar: TJvStatusBar + Top = 636 + Width = 895 + ExplicitTop = 636 + ExplicitWidth = 895 + end + inherited TBXMultiDockIzquierdo: TTBXMultiDock + Height = 534 + ExplicitHeight = 534 + end + inherited TBXMultiDockDerecho: TTBXMultiDock + Left = 703 + Width = 192 + Height = 534 + ExplicitLeft = 703 + ExplicitWidth = 192 + ExplicitHeight = 534 + inherited pnlParametros: TTBXDockablePanel + DockedWidth = 188 + ExplicitWidth = 192 + ExplicitHeight = 518 + inline frViewPeriodoFechas1: TfrViewPeriodoFechas [0] + Left = 0 + Top = 0 + Width = 188 + Height = 136 + Align = alTop + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 0 + ReadOnly = False + ExplicitWidth = 188 + ExplicitHeight = 136 + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited cbPeriodo: TcxComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 153 + Width = 153 + end + end + inherited TBXAlignmentPanel2: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited Label3: TLabel + Width = 85 + end + inherited edtFechaFin: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 99 + Width = 99 + end + inherited edtFechaIni: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 97 + Width = 97 + end + end + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + end + inherited TBXDockablePanel1: TTBXDockablePanel + Top = 368 + TabOrder = 2 + ExplicitTop = 368 + ExplicitWidth = 188 + inherited TBXButton1: TTBXButton + AlignWithMargins = True + Left = 3 + Top = 3 + Width = 182 + Height = 37 + Margins.Left = 8 + Margins.Top = 8 + Margins.Right = 8 + Margins.Bottom = 8 + Align = alTop + ExplicitLeft = 3 + ExplicitTop = 3 + ExplicitWidth = 182 + ExplicitHeight = 37 + end + end + inline frViewFiltroImportes1: TfrViewFiltroImportes + Left = 0 + Top = 136 + Width = 188 + Height = 77 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 1 + ReadOnly = False + ExplicitTop = 136 + ExplicitWidth = 188 + ExplicitHeight = 77 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited eImporte: TcxSpinEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end + end + end + inline frViewFiltroClientes1: TfrViewFiltroClientes + Left = 0 + Top = 213 + Width = 188 + Height = 146 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 3 + ReadOnly = False + ExplicitTop = 213 + ExplicitWidth = 188 + ExplicitHeight = 146 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited bElegirCliente: TBitBtn + Width = 108 + ExplicitWidth = 108 + end + inherited edtCliente: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 141 + Width = 141 + end + end + end + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosCliPendientesReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosCliPendientesReport.pas new file mode 100644 index 00000000..621a0ed4 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosCliPendientesReport.pas @@ -0,0 +1,131 @@ +unit uEditorInformeRecibosCliPendientesReport; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail, + frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient, + frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage, + JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, + StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems, + TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, + JvExControls, JvNavigationPane, uCustomView, + uViewBase, uViewPeriodoFechas, + uViewFiltroClientes, dxLayoutControl, cxControls, uViewFiltroImportes, + FactuGES_Intf, TBXDkPanels, uEditorInformeBase, + uIEditorInformeBase, uViewParametrosInforme, uIEditorInformeRecibosCliPendientesReport; + +type + TfEditorInformeRecibosCliPendientesReport = class(TfEditorInformeBase, IEditorInformeRecibosCliPendientesReport) + TBXItem58: TTBXItem; + frViewPeriodoFechas1: TfrViewPeriodoFechas; + frViewFiltroImportes1: TfrViewFiltroImportes; + frViewFiltroClientes1: TfrViewFiltroClientes; + procedure actRefrescarExecute(Sender: TObject); + private + FListaIDClientes: TIntegerArray; + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDClientes: TIntegerArray; + function GetImporteMinimo: Currency; + function GetDesglosadoCliente: Boolean; + + procedure RefrescarInforme; + + public + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDClientes: TIntegerArray read GetListaIDClientes; + property DesglosadoCliente: Boolean read GetDesglosadoCliente; + property ImporteMinimo: Currency read GetImporteMinimo; + + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + + +implementation + +{$R *.dfm} + +uses uROTypes, uGestorInformesController, uFactuGES_App; + +{ TfEditorGestorInformesReport } + +procedure TfEditorInformeRecibosCliPendientesReport.actRefrescarExecute(Sender: TObject); +begin + inherited; + RefrescarInforme; +end; + +constructor TfEditorInformeRecibosCliPendientesReport.Create(AOwner: TComponent); +begin + inherited; + FListaIDClientes := TIntegerArray.Create; +end; + +destructor TfEditorInformeRecibosCliPendientesReport.Destroy; +begin + FListaIDClientes.Free; + inherited; +end; + +function TfEditorInformeRecibosCliPendientesReport.GetDesglosadoCliente: Boolean; +begin + if frViewFiltroImportes1.cbxDesglosado.Enabled then + Result := frViewFiltroClientes1.cbxDesglosado.Checked + else + Result := False; +end; + +function TfEditorInformeRecibosCliPendientesReport.GetFechaFin: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaFin.Date; +end; + +function TfEditorInformeRecibosCliPendientesReport.GetFechaInicio: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaIni.Date; +end; + +function TfEditorInformeRecibosCliPendientesReport.GetImporteMinimo: Currency; +begin + if frViewFiltroImportes1.eImporte.Enabled then + Result := frViewFiltroImportes1.eImporte.Value + else + Result := 0; +end; + +function TfEditorInformeRecibosCliPendientesReport.GetListaIDClientes: TIntegerArray; +begin + FListaIDClientes.Clear; + if Assigned(frViewFiltroClientes1.Cliente) then + FListaIDClientes.Add(frViewFiltroClientes1.Cliente.ID); + + Result := FListaIDClientes; +end; + +procedure TfEditorInformeRecibosCliPendientesReport.RefrescarInforme; +var + AStream: Binary; +begin + ShowHourglassCursor; + try + AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeListadoRecibosCliPendientes( + AppFactuGES.EmpresaActiva.ID, + FechaInicio, + FechaFin, + ListaIDClientes, + DesglosadoCliente, + ImporteMinimo); + + LoadFromStream(AStream); + Report.ShowPreparedReport; + finally + FreeAndNil(AStream); + HideHourglassCursor; + end; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosClienteReport.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosClienteReport.dfm new file mode 100644 index 00000000..9b501ea1 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosClienteReport.dfm @@ -0,0 +1,201 @@ +inherited fEditorInformeRecibosClienteReport: TfEditorInformeRecibosClienteReport + Caption = 'fEditorInformeRecibosClienteReport' + ClientHeight = 655 + ClientWidth = 895 + ExplicitWidth = 903 + ExplicitHeight = 689 + PixelsPerInch = 96 + TextHeight = 13 + inherited JvNavPanelHeader: TJvNavPanelHeader + Width = 895 + ExplicitWidth = 895 + inherited Image1: TImage + Left = 868 + ExplicitLeft = 868 + end + end + inherited TBXDock: TTBXDock + Width = 895 + ExplicitWidth = 895 + inherited tbxMenu: TTBXToolbar + ExplicitWidth = 895 + end + inherited TBXToolbar1: TTBXToolbar + ExplicitWidth = 591 + object TBXItem58: TTBXItem [0] + Action = actRefrescar + DisplayMode = nbdmImageAndText + Images = SmallImages + end + end + end + inherited StatusBar: TJvStatusBar + Top = 636 + Width = 895 + ExplicitTop = 636 + ExplicitWidth = 895 + end + inherited TBXMultiDockIzquierdo: TTBXMultiDock + Height = 534 + ExplicitHeight = 534 + end + inherited TBXMultiDockDerecho: TTBXMultiDock + Left = 703 + Width = 192 + Height = 534 + ExplicitLeft = 703 + ExplicitWidth = 192 + ExplicitHeight = 534 + inherited pnlParametros: TTBXDockablePanel + DockedWidth = 188 + ExplicitWidth = 192 + ExplicitHeight = 518 + inline frViewPeriodoFechas1: TfrViewPeriodoFechas [0] + Left = 0 + Top = 0 + Width = 188 + Height = 136 + Align = alTop + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 0 + ReadOnly = False + ExplicitWidth = 188 + ExplicitHeight = 136 + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited cbPeriodo: TcxComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 153 + Width = 153 + end + end + inherited TBXAlignmentPanel2: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited Label3: TLabel + Width = 85 + end + inherited edtFechaFin: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 99 + Width = 99 + end + inherited edtFechaIni: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 97 + Width = 97 + end + end + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + end + inherited TBXDockablePanel1: TTBXDockablePanel + Top = 368 + TabOrder = 2 + ExplicitTop = 368 + ExplicitWidth = 188 + inherited TBXButton1: TTBXButton + AlignWithMargins = True + Left = 3 + Top = 3 + Width = 182 + Height = 37 + Margins.Left = 8 + Margins.Top = 8 + Margins.Right = 8 + Margins.Bottom = 8 + Align = alTop + ExplicitLeft = 3 + ExplicitTop = 3 + ExplicitWidth = 182 + ExplicitHeight = 37 + end + end + inline frViewFiltroImportes1: TfrViewFiltroImportes + Left = 0 + Top = 136 + Width = 188 + Height = 77 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 1 + ReadOnly = False + ExplicitTop = 136 + ExplicitWidth = 188 + ExplicitHeight = 77 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited eImporte: TcxSpinEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end + end + end + inline frViewFiltroClientes1: TfrViewFiltroClientes + Left = 0 + Top = 213 + Width = 188 + Height = 146 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 3 + ReadOnly = False + ExplicitTop = 213 + ExplicitWidth = 188 + ExplicitHeight = 146 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited bElegirCliente: TBitBtn + Width = 108 + ExplicitWidth = 108 + end + inherited edtCliente: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 141 + Width = 141 + end + end + end + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosClienteReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosClienteReport.pas new file mode 100644 index 00000000..78557eed --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosClienteReport.pas @@ -0,0 +1,131 @@ +unit uEditorInformeRecibosClienteReport; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail, + frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient, + frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage, + JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, + StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems, + TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, + JvExControls, JvNavigationPane, uCustomView, + uViewBase, uViewPeriodoFechas, + uViewFiltroClientes, dxLayoutControl, cxControls, uViewFiltroImportes, + FactuGES_Intf, TBXDkPanels, uEditorInformeBase, + uIEditorInformeBase, uViewParametrosInforme, uIEditorInformeRecibosClienteReport; + +type + TfEditorInformeRecibosClienteReport = class(TfEditorInformeBase, IEditorInformeRecibosClienteReport) + TBXItem58: TTBXItem; + frViewPeriodoFechas1: TfrViewPeriodoFechas; + frViewFiltroImportes1: TfrViewFiltroImportes; + frViewFiltroClientes1: TfrViewFiltroClientes; + procedure actRefrescarExecute(Sender: TObject); + private + FListaIDClientes: TIntegerArray; + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDClientes: TIntegerArray; + function GetImporteMinimo: Currency; + function GetDesglosadoCliente: Boolean; + + procedure RefrescarInforme; + + public + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDClientes: TIntegerArray read GetListaIDClientes; + property DesglosadoCliente: Boolean read GetDesglosadoCliente; + property ImporteMinimo: Currency read GetImporteMinimo; + + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + + +implementation + +{$R *.dfm} + +uses uROTypes, uGestorInformesController, uFactuGES_App; + +{ TfEditorGestorInformesReport } + +procedure TfEditorInformeRecibosClienteReport.actRefrescarExecute(Sender: TObject); +begin + inherited; + RefrescarInforme; +end; + +constructor TfEditorInformeRecibosClienteReport.Create(AOwner: TComponent); +begin + inherited; + FListaIDClientes := TIntegerArray.Create; +end; + +destructor TfEditorInformeRecibosClienteReport.Destroy; +begin + FListaIDClientes.Free; + inherited; +end; + +function TfEditorInformeRecibosClienteReport.GetDesglosadoCliente: Boolean; +begin + if frViewFiltroImportes1.cbxDesglosado.Enabled then + Result := frViewFiltroClientes1.cbxDesglosado.Checked + else + Result := False; +end; + +function TfEditorInformeRecibosClienteReport.GetFechaFin: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaFin.Date; +end; + +function TfEditorInformeRecibosClienteReport.GetFechaInicio: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaIni.Date; +end; + +function TfEditorInformeRecibosClienteReport.GetImporteMinimo: Currency; +begin + if frViewFiltroImportes1.eImporte.Enabled then + Result := frViewFiltroImportes1.eImporte.Value + else + Result := 0; +end; + +function TfEditorInformeRecibosClienteReport.GetListaIDClientes: TIntegerArray; +begin + FListaIDClientes.Clear; + if Assigned(frViewFiltroClientes1.Cliente) then + FListaIDClientes.Add(frViewFiltroClientes1.Cliente.ID); + + Result := FListaIDClientes; +end; + +procedure TfEditorInformeRecibosClienteReport.RefrescarInforme; +var + AStream: Binary; +begin + ShowHourglassCursor; + try + AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeListadoRecibosCliente( + AppFactuGES.EmpresaActiva.ID, + FechaInicio, + FechaFin, + ListaIDClientes, + DesglosadoCliente, + ImporteMinimo); + + LoadFromStream(AStream); + Report.ShowPreparedReport; + finally + FreeAndNil(AStream); + HideHourglassCursor; + end; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosProvPendientesReport.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosProvPendientesReport.dfm new file mode 100644 index 00000000..546fe94e --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosProvPendientesReport.dfm @@ -0,0 +1,201 @@ +inherited fEditorInformeRecibosProvPendientesReport: TfEditorInformeRecibosProvPendientesReport + Caption = 'fEditorInformeRecibosProvPendientesReport' + ClientHeight = 655 + ClientWidth = 895 + ExplicitWidth = 903 + ExplicitHeight = 689 + PixelsPerInch = 96 + TextHeight = 13 + inherited JvNavPanelHeader: TJvNavPanelHeader + Width = 895 + ExplicitWidth = 895 + inherited Image1: TImage + Left = 868 + ExplicitLeft = 868 + end + end + inherited TBXDock: TTBXDock + Width = 895 + ExplicitWidth = 895 + inherited tbxMenu: TTBXToolbar + ExplicitWidth = 895 + end + inherited TBXToolbar1: TTBXToolbar + ExplicitWidth = 591 + object TBXItem58: TTBXItem [0] + Action = actRefrescar + DisplayMode = nbdmImageAndText + Images = SmallImages + end + end + end + inherited StatusBar: TJvStatusBar + Top = 636 + Width = 895 + ExplicitTop = 636 + ExplicitWidth = 895 + end + inherited TBXMultiDockIzquierdo: TTBXMultiDock + Height = 534 + ExplicitHeight = 534 + end + inherited TBXMultiDockDerecho: TTBXMultiDock + Left = 703 + Width = 192 + Height = 534 + ExplicitLeft = 703 + ExplicitWidth = 192 + ExplicitHeight = 534 + inherited pnlParametros: TTBXDockablePanel + DockedWidth = 188 + ExplicitWidth = 192 + ExplicitHeight = 518 + inline frViewPeriodoFechas1: TfrViewPeriodoFechas [0] + Left = 0 + Top = 0 + Width = 188 + Height = 136 + Align = alTop + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 0 + ReadOnly = False + ExplicitWidth = 188 + ExplicitHeight = 136 + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited cbPeriodo: TcxComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 153 + Width = 153 + end + end + inherited TBXAlignmentPanel2: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited Label3: TLabel + Width = 85 + end + inherited edtFechaFin: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 99 + Width = 99 + end + inherited edtFechaIni: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 97 + Width = 97 + end + end + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + end + inherited TBXDockablePanel1: TTBXDockablePanel + Top = 368 + TabOrder = 2 + ExplicitTop = 368 + ExplicitWidth = 188 + inherited TBXButton1: TTBXButton + AlignWithMargins = True + Left = 3 + Top = 3 + Width = 182 + Height = 37 + Margins.Left = 8 + Margins.Top = 8 + Margins.Right = 8 + Margins.Bottom = 8 + Align = alTop + ExplicitLeft = 3 + ExplicitTop = 3 + ExplicitWidth = 182 + ExplicitHeight = 37 + end + end + inline frViewFiltroImportes1: TfrViewFiltroImportes + Left = 0 + Top = 136 + Width = 188 + Height = 77 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 1 + ReadOnly = False + ExplicitTop = 136 + ExplicitWidth = 188 + ExplicitHeight = 77 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited eImporte: TcxSpinEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end + end + end + inline frViewFiltroProveedores1: TfrViewFiltroProveedores + Left = 0 + Top = 213 + Width = 188 + Height = 146 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 3 + ReadOnly = False + ExplicitTop = 213 + ExplicitWidth = 188 + ExplicitHeight = 146 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited bElegirProveedor: TBitBtn + Width = 108 + ExplicitWidth = 108 + end + inherited edtProveedor: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 141 + Width = 141 + end + end + end + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosProvPendientesReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosProvPendientesReport.pas new file mode 100644 index 00000000..749b62d9 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosProvPendientesReport.pas @@ -0,0 +1,131 @@ +unit uEditorInformeRecibosProvPendientesReport; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail, + frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient, + frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage, + JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, + StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems, + TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, + JvExControls, JvNavigationPane, uCustomView, + uViewBase, uViewPeriodoFechas, + uViewFiltroProveedores, dxLayoutControl, cxControls, uViewFiltroImportes, + FactuGES_Intf, TBXDkPanels, uEditorInformeBase, + uIEditorInformeBase, uViewParametrosInforme, uIEditorInformeRecibosProvPendientesReport; + +type + TfEditorInformeRecibosProvPendientesReport = class(TfEditorInformeBase, IEditorInformeRecibosProvPendientesReport) + TBXItem58: TTBXItem; + frViewPeriodoFechas1: TfrViewPeriodoFechas; + frViewFiltroImportes1: TfrViewFiltroImportes; + frViewFiltroProveedores1: TfrViewFiltroProveedores; + procedure actRefrescarExecute(Sender: TObject); + private + FListaIDProveedores: TIntegerArray; + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDProveedores: TIntegerArray; + function GetImporteMinimo: Currency; + function GetDesglosadoProveedor: Boolean; + + procedure RefrescarInforme; + + public + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDProveedores: TIntegerArray read GetListaIDProveedores; + property DesglosadoProveedor: Boolean read GetDesglosadoProveedor; + property ImporteMinimo: Currency read GetImporteMinimo; + + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + + +implementation + +{$R *.dfm} + +uses uROTypes, uGestorInformesController, uFactuGES_App; + +{ TfEditorGestorInformesReport } + +procedure TfEditorInformeRecibosProvPendientesReport.actRefrescarExecute(Sender: TObject); +begin + inherited; + RefrescarInforme; +end; + +constructor TfEditorInformeRecibosProvPendientesReport.Create(AOwner: TComponent); +begin + inherited; + FListaIDProveedores := TIntegerArray.Create; +end; + +destructor TfEditorInformeRecibosProvPendientesReport.Destroy; +begin + FListaIDProveedores.Free; + inherited; +end; + +function TfEditorInformeRecibosProvPendientesReport.GetDesglosadoProveedor: Boolean; +begin + if frViewFiltroImportes1.cbxDesglosado.Enabled then + Result := frViewFiltroProveedores1.cbxDesglosado.Checked + else + Result := False; +end; + +function TfEditorInformeRecibosProvPendientesReport.GetFechaFin: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaFin.Date; +end; + +function TfEditorInformeRecibosProvPendientesReport.GetFechaInicio: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaIni.Date; +end; + +function TfEditorInformeRecibosProvPendientesReport.GetImporteMinimo: Currency; +begin + if frViewFiltroImportes1.eImporte.Enabled then + Result := frViewFiltroImportes1.eImporte.Value + else + Result := 0; +end; + +function TfEditorInformeRecibosProvPendientesReport.GetListaIDProveedores: TIntegerArray; +begin + FListaIDProveedores.Clear; + if Assigned(frViewFiltroProveedores1.Proveedor) then + FListaIDProveedores.Add(frViewFiltroProveedores1.Proveedor.ID); + + Result := FListaIDProveedores; +end; + +procedure TfEditorInformeRecibosProvPendientesReport.RefrescarInforme; +var + AStream: Binary; +begin + ShowHourglassCursor; + try + AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeListadoRecibosProvPendientes( + AppFactuGES.EmpresaActiva.ID, + FechaInicio, + FechaFin, + ListaIDProveedores, + DesglosadoProveedor, + ImporteMinimo); + + LoadFromStream(AStream); + Report.ShowPreparedReport; + finally + FreeAndNil(AStream); + HideHourglassCursor; + end; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosProveedorReport.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosProveedorReport.dfm new file mode 100644 index 00000000..0f2f3941 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosProveedorReport.dfm @@ -0,0 +1,201 @@ +inherited fEditorInformeRecibosProveedorReport: TfEditorInformeRecibosProveedorReport + Caption = 'fEditorInformeRecibosProveedorReport' + ClientHeight = 655 + ClientWidth = 895 + ExplicitWidth = 903 + ExplicitHeight = 689 + PixelsPerInch = 96 + TextHeight = 13 + inherited JvNavPanelHeader: TJvNavPanelHeader + Width = 895 + ExplicitWidth = 895 + inherited Image1: TImage + Left = 868 + ExplicitLeft = 868 + end + end + inherited TBXDock: TTBXDock + Width = 895 + ExplicitWidth = 895 + inherited tbxMenu: TTBXToolbar + ExplicitWidth = 895 + end + inherited TBXToolbar1: TTBXToolbar + ExplicitWidth = 591 + object TBXItem58: TTBXItem [0] + Action = actRefrescar + DisplayMode = nbdmImageAndText + Images = SmallImages + end + end + end + inherited StatusBar: TJvStatusBar + Top = 636 + Width = 895 + ExplicitTop = 636 + ExplicitWidth = 895 + end + inherited TBXMultiDockIzquierdo: TTBXMultiDock + Height = 534 + ExplicitHeight = 534 + end + inherited TBXMultiDockDerecho: TTBXMultiDock + Left = 703 + Width = 192 + Height = 534 + ExplicitLeft = 703 + ExplicitWidth = 192 + ExplicitHeight = 534 + inherited pnlParametros: TTBXDockablePanel + DockedWidth = 188 + ExplicitWidth = 192 + ExplicitHeight = 518 + inline frViewPeriodoFechas1: TfrViewPeriodoFechas [0] + Left = 0 + Top = 0 + Width = 188 + Height = 136 + Align = alTop + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 0 + ReadOnly = False + ExplicitWidth = 188 + ExplicitHeight = 136 + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited cbPeriodo: TcxComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 153 + Width = 153 + end + end + inherited TBXAlignmentPanel2: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited Label3: TLabel + Width = 85 + end + inherited edtFechaFin: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 99 + Width = 99 + end + inherited edtFechaIni: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 97 + Width = 97 + end + end + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + end + inherited TBXDockablePanel1: TTBXDockablePanel + Top = 368 + TabOrder = 2 + ExplicitTop = 368 + ExplicitWidth = 188 + inherited TBXButton1: TTBXButton + AlignWithMargins = True + Left = 3 + Top = 3 + Width = 182 + Height = 37 + Margins.Left = 8 + Margins.Top = 8 + Margins.Right = 8 + Margins.Bottom = 8 + Align = alTop + ExplicitLeft = 3 + ExplicitTop = 3 + ExplicitWidth = 182 + ExplicitHeight = 37 + end + end + inline frViewFiltroImportes1: TfrViewFiltroImportes + Left = 0 + Top = 136 + Width = 188 + Height = 77 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 1 + ReadOnly = False + ExplicitTop = 136 + ExplicitWidth = 188 + ExplicitHeight = 77 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 182 + ExplicitWidth = 182 + inherited eImporte: TcxSpinEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end + end + end + inline frViewFiltroProveedores1: TfrViewFiltroProveedores + Left = 0 + Top = 213 + Width = 188 + Height = 146 + Align = alTop + AutoSize = True + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 3 + ReadOnly = False + ExplicitTop = 213 + ExplicitWidth = 188 + ExplicitHeight = 146 + inherited TBXLabel2: TTBXLabel + Width = 188 + ExplicitWidth = 188 + end + inherited bElegirProveedor: TBitBtn + Width = 108 + ExplicitWidth = 108 + end + inherited edtProveedor: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 141 + Width = 141 + end + end + end + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosProveedorReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosProveedorReport.pas new file mode 100644 index 00000000..3371ae0b --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeRecibosProveedorReport.pas @@ -0,0 +1,131 @@ +unit uEditorInformeRecibosProveedorReport; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uEditorPreview, frxExportText, frxExportRTF, frxExportMail, + frxExportXLS, frxExportImage, frxExportPDF, frxClass, frxDCtrl, frxGradient, + frxChBox, frxCross, frxRich, frxOLE, frxBarcode, JvAppStorage, + JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, + StdActns, ActnList, ComCtrls, JvExComCtrls, JvStatusBar, TB2ExtItems, + TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, + JvExControls, JvNavigationPane, uCustomView, + uViewBase, uViewPeriodoFechas, + uViewFiltroProveedores, dxLayoutControl, cxControls, uViewFiltroImportes, + FactuGES_Intf, TBXDkPanels, uEditorInformeBase, + uIEditorInformeBase, uViewParametrosInforme, uIEditorInformeRecibosProveedorReport; + +type + TfEditorInformeRecibosProveedorReport = class(TfEditorInformeBase, IEditorInformeRecibosProveedorReport) + TBXItem58: TTBXItem; + frViewPeriodoFechas1: TfrViewPeriodoFechas; + frViewFiltroImportes1: TfrViewFiltroImportes; + frViewFiltroProveedores1: TfrViewFiltroProveedores; + procedure actRefrescarExecute(Sender: TObject); + private + FListaIDProveedores: TIntegerArray; + function GetFechaFin: TDateTime; + function GetFechaInicio: TDateTime; + function GetListaIDProveedores: TIntegerArray; + function GetImporteMinimo: Currency; + function GetDesglosadoProveedor: Boolean; + + procedure RefrescarInforme; + + public + property FechaInicio: TDateTime read GetFechaInicio; + property FechaFin: TDateTime read GetFechaFin; + property ListaIDProveedores: TIntegerArray read GetListaIDProveedores; + property DesglosadoProveedor: Boolean read GetDesglosadoProveedor; + property ImporteMinimo: Currency read GetImporteMinimo; + + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + + +implementation + +{$R *.dfm} + +uses uROTypes, uGestorInformesController, uFactuGES_App; + +{ TfEditorGestorInformesReport } + +procedure TfEditorInformeRecibosProveedorReport.actRefrescarExecute(Sender: TObject); +begin + inherited; + RefrescarInforme; +end; + +constructor TfEditorInformeRecibosProveedorReport.Create(AOwner: TComponent); +begin + inherited; + FListaIDProveedores := TIntegerArray.Create; +end; + +destructor TfEditorInformeRecibosProveedorReport.Destroy; +begin + FListaIDProveedores.Free; + inherited; +end; + +function TfEditorInformeRecibosProveedorReport.GetDesglosadoProveedor: Boolean; +begin + if frViewFiltroImportes1.cbxDesglosado.Enabled then + Result := frViewFiltroProveedores1.cbxDesglosado.Checked + else + Result := False; +end; + +function TfEditorInformeRecibosProveedorReport.GetFechaFin: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaFin.Date; +end; + +function TfEditorInformeRecibosProveedorReport.GetFechaInicio: TDateTime; +begin + Result := frViewPeriodoFechas1.edtFechaIni.Date; +end; + +function TfEditorInformeRecibosProveedorReport.GetImporteMinimo: Currency; +begin + if frViewFiltroImportes1.eImporte.Enabled then + Result := frViewFiltroImportes1.eImporte.Value + else + Result := 0; +end; + +function TfEditorInformeRecibosProveedorReport.GetListaIDProveedores: TIntegerArray; +begin + FListaIDProveedores.Clear; + if Assigned(frViewFiltroProveedores1.Proveedor) then + FListaIDProveedores.Add(frViewFiltroProveedores1.Proveedor.ID); + + Result := FListaIDProveedores; +end; + +procedure TfEditorInformeRecibosProveedorReport.RefrescarInforme; +var + AStream: Binary; +begin + ShowHourglassCursor; + try + AStream := (Controller as IGestorInformesController).DataModule.GenerarInformeListadoRecibosProveedor( + AppFactuGES.EmpresaActiva.ID, + FechaInicio, + FechaFin, + ListaIDProveedores, + DesglosadoProveedor, + ImporteMinimo); + + LoadFromStream(AStream); + Report.ShowPreparedReport; + finally + FreeAndNil(AStream); + HideHourglassCursor; + end; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uGestorInformesViewRegister.pas b/Source/Modulos/Gestor de informes/Views/uGestorInformesViewRegister.pas new file mode 100644 index 00000000..30f52964 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uGestorInformesViewRegister.pas @@ -0,0 +1,51 @@ +unit uGestorInformesViewRegister; + +interface + +procedure RegisterViews; +procedure UnregisterViews; + +implementation + +uses + uEditorRegistryUtils, + uEditorInformeIVAClientesReport, uEditorInformeFacturasClienteReport, uEditorInformeFacturasClientePendientesReport, + uEditorInformeRecibosClienteReport, uEditorInformeRecibosCliPendientesReport, + uEditorInformePresupuestosReport, + + uEditorInformeIVAProveedoresReport, uEditorInformeFacturasProveedorReport, uEditorInformeFacturasProveedorPendientesReport, + uEditorInformeRecibosProveedorReport, uEditorInformeRecibosProvPendientesReport; + +procedure RegisterViews; +begin + EditorRegistry.RegisterClass(TfEditorInformePresupuestosReport, 'EditorInformePresupuestosReport'); + EditorRegistry.RegisterClass(TfEditorInformeIVAClientesReport, 'EditorInformeIVAClientesReport'); + EditorRegistry.RegisterClass(TfEditorInformeFacturasClienteReport, 'EditorInformeFacturasClienteReport'); + EditorRegistry.RegisterClass(TfEditorInformeFacturasClientePendientesReport, 'EditorInformeFacturasClientePendientesReport'); + EditorRegistry.RegisterClass(TfEditorInformeRecibosClienteReport, 'EditorInformeRecibosClienteReport'); + EditorRegistry.RegisterClass(TfEditorInformeRecibosCliPendientesReport, 'EditorInformeRecibosCliPendientesReport'); + + EditorRegistry.RegisterClass(TfEditorInformeIVAProveedoresReport, 'EditorInformeIVAProveedoresReport'); + EditorRegistry.RegisterClass(TfEditorInformeFacturasProveedorReport, 'EditorInformeFacturasProveedorReport'); + EditorRegistry.RegisterClass(TfEditorInformeFacturasProveedorPendientesReport, 'EditorInformeFacturasProveedorPendientesReport'); + EditorRegistry.RegisterClass(TfEditorInformeRecibosProveedorReport, 'EditorInformeRecibosProveedorReport'); + EditorRegistry.RegisterClass(TfEditorInformeRecibosProvPendientesReport, 'EditorInformeRecibosProvPendientesReport'); +end; + +procedure UnregisterViews; +begin + EditorRegistry.UnRegisterClass(TfEditorInformePresupuestosReport); + EditorRegistry.UnRegisterClass(TfEditorInformeIVAClientesReport); + EditorRegistry.UnRegisterClass(TfEditorInformeFacturasClienteReport); + EditorRegistry.UnRegisterClass(TfEditorInformeFacturasClientePendientesReport); + EditorRegistry.UnRegisterClass(TfEditorInformeRecibosClienteReport); + EditorRegistry.UnRegisterClass(TfEditorInformeRecibosCliPendientesReport); + + EditorRegistry.UnRegisterClass(TfEditorInformeIVAProveedoresReport); + EditorRegistry.UnRegisterClass(TfEditorInformeFacturasProveedorReport); + EditorRegistry.UnRegisterClass(TfEditorInformeFacturasProveedorPendientesReport); + EditorRegistry.UnRegisterClass(TfEditorInformeRecibosProveedorReport); + EditorRegistry.UnRegisterClass(TfEditorInformeRecibosProvPendientesReport); +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes.dfm b/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes.dfm new file mode 100644 index 00000000..cebe0033 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes.dfm @@ -0,0 +1,131 @@ +inherited frViewFiltroClientes: TfrViewFiltroClientes + Width = 451 + Align = alTop + OnCreate = CustomViewCreate + OnDestroy = CustomViewDestroy + ExplicitWidth = 451 + DesignSize = ( + 451 + 195) + object TBXLabel2: TTBXLabel + Left = 0 + Top = 0 + Width = 451 + Height = 29 + Margins.Top = 5 + Margins.Bottom = 10 + Align = alTop + Caption = 'Clientes' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentColor = True + ParentFont = False + Underline = True + end + object bElegirCliente: TBitBtn + AlignWithMargins = True + Left = 61 + Top = 123 + Width = 382 + Height = 23 + Margins.Left = 0 + Margins.Top = 0 + Margins.Right = 2 + Margins.Bottom = 0 + Anchors = [akLeft, akTop, akRight] + Caption = 'Elegir un cliente' + Enabled = False + TabOrder = 1 + OnClick = bElegirClienteClick + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000000000000000000000000000000000000FF00FF00FF00 + FF00FF00FF00EB00EB00C507C600AB13AD00A119A2009F19A000A215A400AA10 + AC00B608B800CE00CE00EF00EF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00B426B000526840004A823400478F310043962F0042992F0043972F004690 + 3100488533004B7237005A405100D201D200FF00FF00FF00FF00FF00FF00FF00 + FF0062654E004F81350047903100409C2E003AA62C0038AA2B0039A72B003E9E + 2D00459230004D84340056753800A0189F00FF00FF00FF00FF00FF00FF00FF00 + FF005F6B4C004B89330042992F0039A82B0032B428002EBB260031B6270037AB + 2A00409C2E00498C3200527B3600B015B100FF00FF00FF00FF00FF00FF00FF00 + FF0090488700488D32003E9E2D0035AF290035B631007ACB7B002DBF280033B2 + 28003DA12D0047903100576A4800EC01EC00FF00FF00FF00FF00FF00FF00FF00 + FF00F008F1005F7351003E9F2D0034B0290080AC8100D2D3D30081BB820032B2 + 28003DA22D004A863A00C519C500FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00EE09EF007861730036923E00598CAE00498CBB004A81A6002B70 + 3A00606D5900D613D600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00EA0CF400608CD00054A2D80053A1D6004F9DD300488B + C2009D11AC00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF008C67DE005CA9DD005CA9DD005AA7DC0056A4D900519F + D400565FAB00EA00EA00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00EC0DF60060A7DE0063B0E30063B0E30061AEE1005CA9DD0056A4 + D9004E94CC00C105C600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00C532ED0066B2E5006BB7E9006BB7E90067B3E60061AEE1005AA7 + DC00539FD500A817BE00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00BA3AE7004989B1004A85AC005895BD0068B2E30064B0E4005CA9 + DE0053A0D400AA1BC300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00CA23E8005098C400539AC7004E93BE00437DA2005190BA005198 + C6003C79A000BE08C300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00F804FC006995D40062ACDA005DA6D3005299C6004284AD003C7F + A900535AA100F300F300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00C140ED0071BAEA0068B2E00059A1CF004990BC004378 + AA00C315D600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00FF00FF00C83EF000808BDF00668BCC007C60C700D116 + E400FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00} + end + object cbxDesglosado: TCheckBox + Left = 23 + Top = 49 + Width = 146 + Height = 17 + Caption = 'Desglosar por cliente' + TabOrder = 2 + end + object edtCliente: TcxTextEdit + Left = 28 + Top = 99 + Anchors = [akLeft, akTop, akRight] + AutoSize = False + Enabled = False + Properties.ReadOnly = True + Properties.UseLeftAlignmentOnEditing = False + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 3 + Height = 21 + Width = 415 + end + object rbTodosClientes: TRadioButton + Left = 6 + Top = 29 + Width = 147 + Height = 17 + Caption = 'Incluir a todos los clientes' + Checked = True + TabOrder = 4 + TabStop = True + OnClick = rbTodosClientesClick + end + object rbUnCliente: TRadioButton + Left = 6 + Top = 76 + Width = 175 + Height = 17 + Caption = 'S'#243'lo listar el cliente siguiente:' + TabOrder = 5 + OnClick = rbUnClienteClick + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes.pas b/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes.pas new file mode 100644 index 00000000..0719a029 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes.pas @@ -0,0 +1,95 @@ +unit uViewFiltroClientes; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uViewBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxDBEdit, + StdCtrls, Buttons, TBXDkPanels, uViewParametrosInforme, uBizContactos, + uClientesController; + +type + IViewFiltroClientes = interface(IViewParametrosInforme) + ['{129906DA-8E64-4312-8095-A04F8007CF7F}'] + end; + + TfrViewFiltroClientes = class(TfrViewParametrosInforme, IViewFiltroClientes) + TBXLabel2: TTBXLabel; + rbTodosClientes: TRadioButton; + rbUnCliente: TRadioButton; + cbxDesglosado: TCheckBox; + bElegirCliente: TBitBtn; + edtCliente: TcxTextEdit; + procedure rbTodosClientesClick(Sender: TObject); + procedure rbUnClienteClick(Sender: TObject); + procedure CustomViewCreate(Sender: TObject); + procedure bElegirClienteClick(Sender: TObject); + procedure CustomViewDestroy(Sender: TObject); + private + FCliente : IBizCliente; + FClientesController : IClientesController; + public + property Cliente : IBizCliente read FCliente; + end; + +implementation + +{$R *.dfm} + +procedure TfrViewFiltroClientes.bElegirClienteClick(Sender: TObject); +var + AClientes : IBizCliente; +begin + inherited; + AClientes := IBizCliente(FClientesController.BuscarTodos); + try + FCliente := IBizCliente(FClientesController.ElegirContacto(AClientes, '', False)); + if Assigned(FCliente) then + begin + FCliente.Open; + edtCliente.Text := FCliente.NOMBRE; + end; + finally + AClientes := NIL; + end; +end; + +procedure TfrViewFiltroClientes.CustomViewCreate(Sender: TObject); +begin + inherited; + FCliente := NIL; + FClientesController := NIL; +end; + +procedure TfrViewFiltroClientes.CustomViewDestroy(Sender: TObject); +begin + inherited; + FCliente := NIL; + FClientesController := NIL; +end; + +procedure TfrViewFiltroClientes.rbTodosClientesClick(Sender: TObject); +begin + if rbTodosClientes.Checked then + begin + cbxDesglosado.Enabled := True; + FCliente := NIL; + bElegirCliente.Enabled := False; + edtCliente.Clear; + edtCliente.Enabled := False; + end; +end; + +procedure TfrViewFiltroClientes.rbUnClienteClick(Sender: TObject); +begin + if rbUnCliente.Checked then + begin + cbxDesglosado.Enabled := False; + bElegirCliente.Enabled := True; + edtCliente.Enabled := True; + if not Assigned(FClientesController) then + FClientesController := TClientesController.Create; + end; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes_anterior.dfm b/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes_anterior.dfm new file mode 100644 index 00000000..79c0b818 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes_anterior.dfm @@ -0,0 +1,276 @@ +inherited frViewFiltroClientes_anterior: TfrViewFiltroClientes_anterior + Width = 528 + Height = 414 + ExplicitWidth = 528 + ExplicitHeight = 414 + inherited dxLayoutControl1: TdxLayoutControl + Top = 288 + Width = 528 + Height = 126 + Align = alBottom + ExplicitTop = 288 + ExplicitWidth = 528 + ExplicitHeight = 126 + DesignSize = ( + 528 + 126) + object edtlNombre: TcxDBTextEdit [0] + Left = 56 + Top = 10 + Anchors = [akLeft, akTop, akRight] + AutoSize = False + DataBinding.DataField = 'NOMBRE' + DataBinding.DataSource = dsCliente + Enabled = False + ParentFont = False + Properties.ReadOnly = True + Properties.UseLeftAlignmentOnEditing = False + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 0 + Height = 21 + Width = 200 + end + object edtNIFCIF: TcxDBTextEdit [1] + Left = 377 + Top = 10 + Anchors = [akLeft, akTop, akRight] + AutoSize = False + DataBinding.DataField = 'NIF_CIF' + DataBinding.DataSource = dsCliente + Enabled = False + ParentFont = False + Properties.ReadOnly = True + Properties.UseLeftAlignmentOnEditing = False + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 1 + Height = 21 + Width = 100 + end + inherited dxLayoutControl1Group_Root: TdxLayoutGroup + LayoutDirection = ldHorizontal + object dxLayoutControl1Item1: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'Nombre:' + Control = edtlNombre + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item2: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'NIF/CIF:' + Control = edtNIFCIF + ControlOptions.ShowBorder = False + end + end + end + inherited Panel1: TPanel + Top = 162 + Width = 528 + ExplicitTop = 162 + ExplicitWidth = 528 + inherited bElegirCliente: TBitBtn + ExplicitLeft = 4 + ExplicitTop = 4 + end + inherited bNuevoCliente: TBitBtn + ExplicitLeft = 266 + ExplicitTop = 4 + end + inherited bVerFicha: TBitBtn + ExplicitLeft = 121 + ExplicitTop = 4 + end + end + object GroupBox1: TGroupBox [2] + Left = 0 + Top = 29 + Width = 528 + Height = 133 + Margins.Left = 0 + Margins.Top = 0 + Margins.Right = 0 + Margins.Bottom = 0 + Align = alTop + Caption = 'Elija una de las siguientes opciones para generar el listado' + TabOrder = 2 + DesignSize = ( + 528 + 133) + object rd1: TRadioButton + Left = 16 + Top = 24 + Width = 273 + Height = 17 + Caption = 'Incluir en el informe a todos los clientes' + Checked = True + TabOrder = 0 + TabStop = True + OnClick = rd1Click + end + object rd2: TRadioButton + Left = 16 + Top = 71 + Width = 361 + Height = 17 + Caption = 'S'#243'lo listar el informe con el cliente siguiente:' + TabOrder = 1 + OnClick = rd2Click + end + object cbxDesglosado: TCheckBox + Left = 33 + Top = 44 + Width = 176 + Height = 17 + Caption = 'Desglosar por cliente' + Checked = True + State = cbChecked + TabOrder = 2 + end + object BitBtn1: TBitBtn + AlignWithMargins = True + Left = 401 + Top = 93 + Width = 115 + Height = 23 + Margins.Left = 0 + Margins.Top = 0 + Margins.Right = 2 + Margins.Bottom = 0 + Action = actElegirContacto + Anchors = [akTop, akRight] + Caption = 'Elegir un cliente' + TabOrder = 3 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000000000000000000000000000000000000FF00FF00FF00 + FF00FF00FF00EB00EB00C507C600AB13AD00A119A2009F19A000A215A400AA10 + AC00B608B800CE00CE00EF00EF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00B426B000526840004A823400478F310043962F0042992F0043972F004690 + 3100488533004B7237005A405100D201D200FF00FF00FF00FF00FF00FF00FF00 + FF0062654E004F81350047903100409C2E003AA62C0038AA2B0039A72B003E9E + 2D00459230004D84340056753800A0189F00FF00FF00FF00FF00FF00FF00FF00 + FF005F6B4C004B89330042992F0039A82B0032B428002EBB260031B6270037AB + 2A00409C2E00498C3200527B3600B015B100FF00FF00FF00FF00FF00FF00FF00 + FF0090488700488D32003E9E2D0035AF290035B631007ACB7B002DBF280033B2 + 28003DA12D0047903100576A4800EC01EC00FF00FF00FF00FF00FF00FF00FF00 + FF00F008F1005F7351003E9F2D0034B0290080AC8100D2D3D30081BB820032B2 + 28003DA22D004A863A00C519C500FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00EE09EF007861730036923E00598CAE00498CBB004A81A6002B70 + 3A00606D5900D613D600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00EA0CF400608CD00054A2D80053A1D6004F9DD300488B + C2009D11AC00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF008C67DE005CA9DD005CA9DD005AA7DC0056A4D900519F + D400565FAB00EA00EA00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00EC0DF60060A7DE0063B0E30063B0E30061AEE1005CA9DD0056A4 + D9004E94CC00C105C600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00C532ED0066B2E5006BB7E9006BB7E90067B3E60061AEE1005AA7 + DC00539FD500A817BE00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00BA3AE7004989B1004A85AC005895BD0068B2E30064B0E4005CA9 + DE0053A0D400AA1BC300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00CA23E8005098C400539AC7004E93BE00437DA2005190BA005198 + C6003C79A000BE08C300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00F804FC006995D40062ACDA005DA6D3005299C6004284AD003C7F + A900535AA100F300F300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00C140ED0071BAEA0068B2E00059A1CF004990BC004378 + AA00C315D600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00FF00FF00C83EF000808BDF00668BCC007C60C700D116 + E400FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00} + end + object cxDBTextEdit1: TcxDBTextEdit + Left = 33 + Top = 94 + Anchors = [akLeft, akTop, akRight] + AutoSize = False + DataBinding.DataField = 'NOMBRE' + DataBinding.DataSource = dsCliente + Enabled = False + ParentFont = False + Properties.ReadOnly = True + Properties.UseLeftAlignmentOnEditing = False + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 4 + Height = 21 + Width = 365 + end + end + object TBXLabel2: TTBXLabel [3] + Left = 0 + Top = 0 + Width = 528 + Height = 29 + Margins.Top = 5 + Margins.Bottom = 10 + Align = alTop + Caption = 'Clientes' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentColor = True + ParentFont = False + Underline = True + end + inherited dsCliente: TDADataSource + Left = 88 + Top = 224 + end + inherited ActionList1: TActionList + Left = 56 + Top = 224 + inherited actElegirContacto: TAction + Enabled = False + end + inherited actAnadirContacto: TAction + Enabled = False + Visible = False + end + inherited actVerContacto: TAction + Enabled = False + end + inherited actElegirDireccion: TAction + Enabled = False + end + inherited actElegirPersonaContacto: TAction + Enabled = False + end + end + inherited PngImageList: TPngImageList + Left = 120 + Top = 224 + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes_anterior.pas b/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes_anterior.pas new file mode 100644 index 00000000..640e29a8 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes_anterior.pas @@ -0,0 +1,56 @@ +unit uViewFiltroClientes_anterior; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, ImgList, PngImageList, ActnList, DB, + uDAInterfaces, uDADataTable, StdCtrls, Buttons, ExtCtrls, dxLayoutControl, + cxControls, cxContainer, cxEdit, cxTextEdit, cxDBEdit, TBXDkPanels, + uViewDatosYSeleccionClienteBase; + + +type + TfrViewFiltroClientes_anterior = class(TfrViewDatosYSeleccionClienteBase) + dxLayoutControl1Item1: TdxLayoutItem; + edtlNombre: TcxDBTextEdit; + dxLayoutControl1Item2: TdxLayoutItem; + edtNIFCIF: TcxDBTextEdit; + GroupBox1: TGroupBox; + rd1: TRadioButton; + rd2: TRadioButton; + cbxDesglosado: TCheckBox; + TBXLabel2: TTBXLabel; + BitBtn1: TBitBtn; + cxDBTextEdit1: TcxDBTextEdit; + procedure rd1Click(Sender: TObject); + procedure rd2Click(Sender: TObject); + end; + +implementation +{$R *.dfm} + +procedure TfrViewFiltroClientes_anterior.rd1Click(Sender: TObject); +begin + inherited; + if rd1.Checked then + begin + cbxDesglosado.Enabled := True; + actElegirContacto.Enabled := False; + actVerContacto.Enabled := False; + Cliente := Nil; + end; +end; + +procedure TfrViewFiltroClientes_anterior.rd2Click(Sender: TObject); +begin + inherited; + if rd2.Checked then + begin + cbxDesglosado.Enabled := False; + actElegirContacto.Enabled := True; + actVerContacto.Enabled := True; + end; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uViewFiltroImportes.dfm b/Source/Modulos/Gestor de informes/Views/uViewFiltroImportes.dfm new file mode 100644 index 00000000..0fc8dfb7 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uViewFiltroImportes.dfm @@ -0,0 +1,69 @@ +inherited frViewFiltroImportes: TfrViewFiltroImportes + Width = 451 + Height = 93 + Align = alTop + ExplicitWidth = 451 + ExplicitHeight = 93 + object TBXLabel2: TTBXLabel + Left = 0 + Top = 0 + Width = 451 + Height = 29 + Margins.Top = 5 + Margins.Bottom = 10 + Align = alTop + Caption = 'Importes' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentColor = True + ParentFont = False + Underline = True + end + object TBXAlignmentPanel1: TTBXAlignmentPanel + AlignWithMargins = True + Left = 3 + Top = 32 + Width = 445 + Height = 42 + Margins.Left = 5 + Margins.Right = 5 + Align = alTop + AutoSize = True + TabOrder = 1 + object cbxDesglosado: TCheckBox + Left = 7 + Top = 0 + Width = 159 + Height = 17 + Caption = 'Solo facturas que superen:' + Color = clBtnFace + ParentColor = False + TabOrder = 0 + OnClick = cbxDesglosadoClick + end + object eImporte: TcxSpinEdit + Left = 24 + Top = 21 + Enabled = False + Properties.Alignment.Horz = taRightJustify + Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364 + Properties.EditFormat = ',0.00 '#8364';-,0.00 '#8364 + Properties.UseDisplayFormatWhenEditing = True + Properties.ValueType = vtFloat + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.SkinName = '' + Style.ButtonStyle = bts3D + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 1 + Value = 3000.000000000000000000 + Width = 142 + end + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uViewFiltroImportes.pas b/Source/Modulos/Gestor de informes/Views/uViewFiltroImportes.pas new file mode 100644 index 00000000..bec8f367 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uViewFiltroImportes.pas @@ -0,0 +1,32 @@ +unit uViewFiltroImportes; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uViewBase, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxSpinEdit, + dxLayoutControl, StdCtrls, cxControls, TBXDkPanels, uViewParametrosInforme; + +type + IViewFiltroImportes = interface(IViewParametrosInforme) + ['{AE773F0B-E72A-4A71-9C5C-8E68EC61456A}'] + end; + + TfrViewFiltroImportes = class(TfrViewParametrosInforme, IViewFiltroImportes) + cbxDesglosado: TCheckBox; + eImporte: TcxSpinEdit; + TBXLabel2: TTBXLabel; + TBXAlignmentPanel1: TTBXAlignmentPanel; + procedure cbxDesglosadoClick(Sender: TObject); + end; + +implementation +{$R *.dfm} + +procedure TfrViewFiltroImportes.cbxDesglosadoClick(Sender: TObject); +begin + inherited; + eImporte.Enabled := not eImporte.Enabled; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uViewFiltroProveedores.dfm b/Source/Modulos/Gestor de informes/Views/uViewFiltroProveedores.dfm new file mode 100644 index 00000000..4198254a --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uViewFiltroProveedores.dfm @@ -0,0 +1,131 @@ +inherited frViewFiltroProveedores: TfrViewFiltroProveedores + Width = 451 + Align = alTop + OnCreate = CustomViewCreate + OnDestroy = CustomViewDestroy + ExplicitWidth = 451 + DesignSize = ( + 451 + 195) + object TBXLabel2: TTBXLabel + Left = 0 + Top = 0 + Width = 451 + Height = 29 + Margins.Top = 5 + Margins.Bottom = 10 + Align = alTop + Caption = 'Proveedores' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentColor = True + ParentFont = False + Underline = True + end + object bElegirProveedor: TBitBtn + AlignWithMargins = True + Left = 61 + Top = 123 + Width = 382 + Height = 23 + Margins.Left = 0 + Margins.Top = 0 + Margins.Right = 2 + Margins.Bottom = 0 + Anchors = [akLeft, akTop, akRight] + Caption = 'Elegir un proveedor' + Enabled = False + TabOrder = 1 + OnClick = bElegirProveedorClick + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000000000000000000000000000000000000FF00FF00FF00 + FF00FF00FF00EB00EB00C507C600AB13AD00A119A2009F19A000A215A400AA10 + AC00B608B800CE00CE00EF00EF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00B426B000526840004A823400478F310043962F0042992F0043972F004690 + 3100488533004B7237005A405100D201D200FF00FF00FF00FF00FF00FF00FF00 + FF0062654E004F81350047903100409C2E003AA62C0038AA2B0039A72B003E9E + 2D00459230004D84340056753800A0189F00FF00FF00FF00FF00FF00FF00FF00 + FF005F6B4C004B89330042992F0039A82B0032B428002EBB260031B6270037AB + 2A00409C2E00498C3200527B3600B015B100FF00FF00FF00FF00FF00FF00FF00 + FF0090488700488D32003E9E2D0035AF290035B631007ACB7B002DBF280033B2 + 28003DA12D0047903100576A4800EC01EC00FF00FF00FF00FF00FF00FF00FF00 + FF00F008F1005F7351003E9F2D0034B0290080AC8100D2D3D30081BB820032B2 + 28003DA22D004A863A00C519C500FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00EE09EF007861730036923E00598CAE00498CBB004A81A6002B70 + 3A00606D5900D613D600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00EA0CF400608CD00054A2D80053A1D6004F9DD300488B + C2009D11AC00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF008C67DE005CA9DD005CA9DD005AA7DC0056A4D900519F + D400565FAB00EA00EA00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00EC0DF60060A7DE0063B0E30063B0E30061AEE1005CA9DD0056A4 + D9004E94CC00C105C600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00C532ED0066B2E5006BB7E9006BB7E90067B3E60061AEE1005AA7 + DC00539FD500A817BE00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00BA3AE7004989B1004A85AC005895BD0068B2E30064B0E4005CA9 + DE0053A0D400AA1BC300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00CA23E8005098C400539AC7004E93BE00437DA2005190BA005198 + C6003C79A000BE08C300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00F804FC006995D40062ACDA005DA6D3005299C6004284AD003C7F + A900535AA100F300F300FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00C140ED0071BAEA0068B2E00059A1CF004990BC004378 + AA00C315D600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 + FF00FF00FF00FF00FF00FF00FF00C83EF000808BDF00668BCC007C60C700D116 + E400FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00} + end + object cbxDesglosado: TCheckBox + Left = 23 + Top = 49 + Width = 158 + Height = 17 + Caption = 'Desglosar por proveedor' + TabOrder = 2 + end + object edtProveedor: TcxTextEdit + Left = 28 + Top = 99 + Anchors = [akLeft, akTop, akRight] + AutoSize = False + Enabled = False + Properties.ReadOnly = True + Properties.UseLeftAlignmentOnEditing = False + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 3 + Height = 21 + Width = 415 + end + object rbTodosProveedores: TRadioButton + Left = 6 + Top = 29 + Width = 195 + Height = 17 + Caption = 'Incluir a todos los Proveedores' + Checked = True + TabOrder = 4 + TabStop = True + OnClick = rbTodosProveedoresClick + end + object rbUnProveedor: TRadioButton + Left = 6 + Top = 76 + Width = 175 + Height = 17 + Caption = 'S'#243'lo listar el proveedor siguiente:' + TabOrder = 5 + OnClick = rbUnProveedorClick + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uViewFiltroProveedores.pas b/Source/Modulos/Gestor de informes/Views/uViewFiltroProveedores.pas new file mode 100644 index 00000000..b9cb10ed --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uViewFiltroProveedores.pas @@ -0,0 +1,95 @@ +unit uViewFiltroProveedores; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uViewBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxDBEdit, + StdCtrls, Buttons, TBXDkPanels, uViewParametrosInforme, uBizContactos, + uProveedoresController; + +type + IViewFiltroProveedores = interface(IViewParametrosInforme) + ['{129906DA-8E64-4312-8095-A04F8007CF7F}'] + end; + + TfrViewFiltroProveedores = class(TfrViewParametrosInforme, IViewFiltroProveedores) + TBXLabel2: TTBXLabel; + rbTodosProveedores: TRadioButton; + rbUnProveedor: TRadioButton; + cbxDesglosado: TCheckBox; + bElegirProveedor: TBitBtn; + edtProveedor: TcxTextEdit; + procedure rbTodosProveedoresClick(Sender: TObject); + procedure rbUnProveedorClick(Sender: TObject); + procedure CustomViewCreate(Sender: TObject); + procedure bElegirProveedorClick(Sender: TObject); + procedure CustomViewDestroy(Sender: TObject); + private + FProveedor : IBizProveedor; + FProveedoresController : IProveedoresController; + public + property Proveedor : IBizProveedor read FProveedor; + end; + +implementation + +{$R *.dfm} + +procedure TfrViewFiltroProveedores.bElegirProveedorClick(Sender: TObject); +var + AProveedores : IBizProveedor; +begin + inherited; + AProveedores := IBizProveedor(FProveedoresController.BuscarTodos); + try + FProveedor := IBizProveedor(FProveedoresController.ElegirContacto(AProveedores, '', False)); + if Assigned(FProveedor) then + begin + FProveedor.Open; + edtProveedor.Text := FProveedor.NOMBRE; + end; + finally + AProveedores := NIL; + end; +end; + +procedure TfrViewFiltroProveedores.CustomViewCreate(Sender: TObject); +begin + inherited; + FProveedor := NIL; + FProveedoresController := NIL; +end; + +procedure TfrViewFiltroProveedores.CustomViewDestroy(Sender: TObject); +begin + inherited; + FProveedor := NIL; + FProveedoresController := NIL; +end; + +procedure TfrViewFiltroProveedores.rbTodosProveedoresClick(Sender: TObject); +begin + if rbTodosProveedores.Checked then + begin + cbxDesglosado.Enabled := True; + FProveedor := NIL; + bElegirProveedor.Enabled := False; + edtProveedor.Clear; + edtProveedor.Enabled := False; + end; +end; + +procedure TfrViewFiltroProveedores.rbUnProveedorClick(Sender: TObject); +begin + if rbUnProveedor.Checked then + begin + cbxDesglosado.Enabled := False; + bElegirProveedor.Enabled := True; + edtProveedor.Enabled := True; + if not Assigned(FProveedoresController) then + FProveedoresController := TProveedoresController.Create; + end; +end; + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uViewParametrosInforme.dfm b/Source/Modulos/Gestor de informes/Views/uViewParametrosInforme.dfm new file mode 100644 index 00000000..3fa6f1f8 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uViewParametrosInforme.dfm @@ -0,0 +1,6 @@ +inherited frViewParametrosInforme: TfrViewParametrosInforme + Width = 369 + Height = 195 + ExplicitWidth = 369 + ExplicitHeight = 195 +end diff --git a/Source/Modulos/Gestor de informes/Views/uViewParametrosInforme.pas b/Source/Modulos/Gestor de informes/Views/uViewParametrosInforme.pas new file mode 100644 index 00000000..fe9e71e5 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uViewParametrosInforme.pas @@ -0,0 +1,26 @@ +unit uViewParametrosInforme; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uViewBase; + +type + IViewParametrosInforme = interface(IViewBase) + ['{2578FF9E-F084-4603-81D8-32450E3865B7}'] + end; + + TfrViewParametrosInforme = class(TfrViewBase, IViewParametrosInforme) + private + { Private declarations } + public + { Public declarations } + end; + + +implementation + +{$R *.dfm} + +end. diff --git a/Source/Modulos/Gestor de informes/Views/uViewPeriodoFechas.dfm b/Source/Modulos/Gestor de informes/Views/uViewPeriodoFechas.dfm new file mode 100644 index 00000000..af7b1f72 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uViewPeriodoFechas.dfm @@ -0,0 +1,192 @@ +inherited frViewPeriodoFechas: TfrViewPeriodoFechas + Width = 451 + Height = 177 + Align = alTop + ExplicitWidth = 451 + ExplicitHeight = 177 + object TBXAlignmentPanel1: TTBXAlignmentPanel + AlignWithMargins = True + Left = 3 + Top = 32 + Width = 445 + Height = 21 + Margins.Left = 5 + Margins.Right = 5 + Align = alTop + AutoSize = True + TabOrder = 0 + DesignSize = ( + 445 + 21) + object cbPeriodo: TcxComboBox + Left = 16 + Top = 0 + RepositoryItem = cxRepositoryPeriodos + Anchors = [akLeft, akTop, akRight] + Properties.OnChange = cbPeriodoPropertiesChange + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + Style.ButtonStyle = bts3D + Style.PopupBorderStyle = epbsFrame3D + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 0 + Text = 'Este mes' + Width = 416 + end + end + object TBXAlignmentPanel2: TTBXAlignmentPanel + AlignWithMargins = True + Left = 3 + Top = 59 + Width = 445 + Height = 74 + Margins.Left = 5 + Margins.Top = 5 + Margins.Right = 5 + Align = alTop + AutoSize = True + TabOrder = 1 + DesignSize = ( + 445 + 74) + object Label3: TLabel + Left = 5 + Top = 5 + Width = 435 + Height = 13 + Align = alTop + Caption = 'Rango de fechas:' + Transparent = True + ExplicitWidth = 85 + end + object Label1: TLabel + Left = 29 + Top = 29 + Width = 34 + Height = 13 + Caption = 'Desde:' + Transparent = True + end + object Label2: TLabel + Left = 32 + Top = 56 + Width = 31 + Height = 13 + Caption = 'hasta:' + Transparent = True + end + object edtFechaFin: TcxDateEdit + Left = 72 + Top = 53 + Anchors = [akLeft, akTop, akRight] + Properties.DateButtons = [btnToday] + Properties.PostPopupValueOnTab = True + Properties.SaveTime = False + Properties.ShowTime = False + Properties.OnValidate = edtFechaFinPropertiesValidate + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + Style.ButtonStyle = bts3D + Style.PopupBorderStyle = epbsFrame3D + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 0 + Width = 362 + end + object edtFechaIni: TcxDateEdit + Left = 72 + Top = 26 + Anchors = [akLeft, akTop, akRight] + Properties.DateButtons = [btnToday] + Properties.PostPopupValueOnTab = True + Properties.SaveTime = False + Properties.ShowTime = False + Properties.OnValidate = edtFechaIni2PropertiesValidate + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + Style.ButtonStyle = bts3D + Style.PopupBorderStyle = epbsFrame3D + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 1 + Width = 360 + end + end + object TBXLabel2: TTBXLabel + Left = 0 + Top = 0 + Width = 451 + Height = 29 + Margins.Top = 5 + Margins.Bottom = 10 + Align = alTop + Caption = 'Periodo' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentColor = True + ParentFont = False + Underline = True + end + object cxRepository: TcxEditRepository + Left = 32 + Top = 24 + object cxRepositoryPeriodos: TcxEditRepositoryComboBoxItem + Properties.BeepOnError = True + Properties.DropDownListStyle = lsFixedList + Properties.DropDownRows = 10 + Properties.ImmediatePost = True + Properties.ImmediateUpdateText = True + Properties.Items.Strings = ( + 'Hoy' + 'Ayer' + 'Esta semana' + 'Este mes' + 'Este a'#241'o' + #218'ltimos 7 d'#237'as' + #218'ltimos 30 d'#237'as' + #218'ltimos 3 meses' + 'Mes anterior' + 'A'#241'o anterior' + 'Personalizado') + Properties.PostPopupValueOnTab = True + Properties.ReadOnly = False + end + end +end diff --git a/Source/Modulos/Gestor de informes/Views/uViewPeriodoFechas.pas b/Source/Modulos/Gestor de informes/Views/uViewPeriodoFechas.pas new file mode 100644 index 00000000..2a538ff0 --- /dev/null +++ b/Source/Modulos/Gestor de informes/Views/uViewPeriodoFechas.pas @@ -0,0 +1,203 @@ +unit uViewPeriodoFechas; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, cxGraphics, cxEdit, cxDropDownEdit, cxCalendar, StdCtrls, + cxControls, cxContainer, cxTextEdit, cxMaskEdit, TBXDkPanels, + cxEditRepositoryItems, dxLayoutControl, dxLayoutLookAndFeels, uViewBase, + Mask, JvExMask, JvToolEdit, TB2Dock, uViewParametrosInforme; + +type + IViewPeriodoFechas = interface(IViewParametrosInforme) + ['{793084E2-873E-4C57-8BD6-9087816CCF3A}'] + end; + + TfrViewPeriodoFechas = class(TfrViewParametrosInforme, IViewPeriodoFechas) + cxRepository: TcxEditRepository; + cxRepositoryPeriodos: TcxEditRepositoryComboBoxItem; + cbPeriodo: TcxComboBox; + edtFechaIni: TcxDateEdit; + edtFechaFin: TcxDateEdit; + TBXLabel2: TTBXLabel; + TBXAlignmentPanel1: TTBXAlignmentPanel; + TBXAlignmentPanel2: TTBXAlignmentPanel; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + procedure cbPeriodoPropertiesChange(Sender: TObject); + procedure edtFechaIni2PropertiesValidate(Sender: TObject; + var DisplayValue: Variant; var ErrorText: TCaption; + var Error: Boolean); + procedure edtFechaFinPropertiesValidate(Sender: TObject; + var DisplayValue: Variant; var ErrorText: TCaption; + var Error: Boolean); + private + function GetFechaFinal: TDateTime; + function GetFechaInicial: TDateTime; + procedure SetFechaFinal(const Value: TDateTime); + procedure SetFechaInicial(const Value: TDateTime); + public + procedure Hoy; + procedure Ayer; + procedure EstaSemana; + procedure EsteMes; + procedure EsteAno; + procedure Ultimos7dias; + procedure Ultimos30dias; + procedure Ultimos3meses; + procedure MesAnterior; + procedure AnoAnterior; + procedure Personalizado; + property FechaInicial : TDateTime read GetFechaInicial write SetFechaInicial; + property FechaFinal : TDateTime read GetFechaFinal write SetFechaFinal; + constructor Create(AOwner: TComponent); override; + end; + +implementation + +uses DateUtils; + +{$R *.dfm} + +procedure TfrViewPeriodoFechas.AnoAnterior; +begin + edtFechaIni.Date := StartOfTheYear(IncYear(Today, -1)); + edtFechaFin.Date := EndOfTheYear(IncYear(Today, -1)); +end; + +procedure TfrViewPeriodoFechas.Ayer; +begin + edtFechaIni.Date := Yesterday; + edtFechaFin.Date := Yesterday; +end; + +procedure TfrViewPeriodoFechas.EstaSemana; +begin + edtFechaIni.Date := StartOfTheWeek(Today); + edtFechaFin.Date := EndOfTheWeek(Today); +end; + +procedure TfrViewPeriodoFechas.EsteAno; +begin + edtFechaIni.Date := StartOfTheYear(Today); + edtFechaFin.Date := EndOfTheYear(Today); +end; + +procedure TfrViewPeriodoFechas.EsteMes; +begin + edtFechaIni.Date := StartOfTheMonth(Today); + edtFechaFin.Date := EndOfTheMonth(Today); +end; + +function TfrViewPeriodoFechas.GetFechaFinal: TDateTime; +begin + Result := DateOf(edtFechaFin.Date); +end; + +function TfrViewPeriodoFechas.GetFechaInicial: TDateTime; +begin + Result := DateOf(edtFechaIni.Date); +end; + +procedure TfrViewPeriodoFechas.Hoy; +begin + edtFechaIni.Date := Today; + edtFechaFin.Date := Today; +end; + +procedure TfrViewPeriodoFechas.MesAnterior; +begin + edtFechaIni.Date := StartOfTheMonth(IncMonth(Today, -1)); + edtFechaFin.Date := EndOfTheMonth(IncMonth(Today, -1)); +end; + +procedure TfrViewPeriodoFechas.Personalizado; +begin + edtFechaIni.SetFocus; +end; + +procedure TfrViewPeriodoFechas.SetFechaFinal(const Value: TDateTime); +begin + edtFechaFin.Date := Value; +end; + +procedure TfrViewPeriodoFechas.SetFechaInicial(const Value: TDateTime); +begin + edtFechaIni.Date := Value; +end; + +procedure TfrViewPeriodoFechas.Ultimos30dias; +begin + edtFechaIni.Date := IncDay(Today, -30); + edtFechaFin.Date := Today +end; + +procedure TfrViewPeriodoFechas.Ultimos3meses; +begin + edtFechaIni.Date := IncMonth(Today, -3); + edtFechaFin.Date := Today +end; + +procedure TfrViewPeriodoFechas.Ultimos7dias; +begin + edtFechaIni.Date := IncDay(Today, -7); + edtFechaFin.Date := Today +end; + +procedure TfrViewPeriodoFechas.cbPeriodoPropertiesChange(Sender: TObject); +begin + case (Sender as TcxComboBox).ItemIndex of + 0 : Hoy; + 1 : Ayer; + 2 : EstaSemana; + 3 : EsteMes; + 4 : EsteAno; + 5 : Ultimos7dias; + 6 : Ultimos30dias; + 7 : Ultimos3meses; + 8 : MesAnterior; + 9 : AnoAnterior; + else + Personalizado; + end; +end; + +constructor TfrViewPeriodoFechas.Create(AOwner: TComponent); +begin + inherited; + cbPeriodo.ItemIndex := 3; + EsteMes; +end; + +procedure TfrViewPeriodoFechas.edtFechaIni2PropertiesValidate( + Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; + var Error: Boolean); +begin + inherited; + if DisplayValue <> edtFechaIni.Date then + cbPeriodo.ItemIndex := 12; + if DisplayValue > edtFechaFin.Date then + begin + edtFechaFin.EditText := DisplayValue; + edtFechaFin.ValidateEdit(True); + end; +end; + +procedure TfrViewPeriodoFechas.edtFechaFinPropertiesValidate( + Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; + var Error: Boolean); +begin + inherited; + if DisplayValue <> edtFechaFin.Date then + cbPeriodo.ItemIndex := 12; + if DisplayValue < edtFechaIni.Date then + begin + edtFechaIni.EditText := DisplayValue; + edtFechaIni.ValidateEdit(True); + end; +end; + +end. + diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm index a9216117..0dc76cf5 100644 --- a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm +++ b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm @@ -2,7 +2,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente OldCreateOrder = True OnCreate = DataModuleCreate Height = 548 - Width = 535 + Width = 639 object DADataCabecera: TDADataSource DataSet = tbl_Cabecera.Dataset DataTable = tbl_Cabecera @@ -39,6 +39,147 @@ object RptPresupuestosCliente: TRptPresupuestosCliente ConnectionManager = dmServer.ConnectionManager DataDictionary = DataDictionary Datasets = < + item + Params = <> + Statements = < + item + Connection = 'IBX' + ConnectionType = 'Interbase' + Default = True + Name = 'IBX' + SQL = + 'select ID_EMPRESA,'#10'extract (month from fecha_presupuesto) as MES' + + ','#10'case'#10'when extract (month from fecha_presupuesto) = 1 then '#39'ENE' + + 'RO - '#39' || extract (year from fecha_presupuesto)'#10'when extract (mo' + + 'nth from fecha_presupuesto) = 2 then '#39'FEBRERO - '#39' || extract (ye' + + 'ar from fecha_presupuesto)'#10'when extract (month from fecha_presup' + + 'uesto) = 3 then '#39'MARZO - '#39' || extract (year from fecha_presupues' + + 'to)'#10'when extract (month from fecha_presupuesto) = 4 then '#39'ABRIL ' + + '- '#39' || extract (year from fecha_presupuesto)'#10'when extract (month' + + ' from fecha_presupuesto) = 5 then '#39'MAYO - '#39' || extract (year fro' + + 'm fecha_presupuesto)'#10'when extract (month from fecha_presupuesto)' + + ' = 6 then '#39'JUNIO - '#39' || extract (year from fecha_presupuesto)'#10'wh' + + 'en extract (month from fecha_presupuesto) = 7 then '#39'JULIO - '#39' ||' + + ' extract (year from fecha_presupuesto)'#10'when extract (month from ' + + 'fecha_presupuesto) = 8 then '#39'AGOSTO - '#39' || extract (year from fe' + + 'cha_presupuesto)'#10'when extract (month from fecha_presupuesto) = 9' + + ' then '#39'SEPTIEMBRE - '#39' || extract (year from fecha_presupuesto)'#10'w' + + 'hen extract (month from fecha_presupuesto) = 10 then '#39'OCTUBRE - ' + + #39' || extract (year from fecha_presupuesto)'#10'when extract (month f' + + 'rom fecha_presupuesto) = 11 then '#39'NOVIEMBRE - '#39' || extract (year' + + ' from fecha_presupuesto)'#10'when extract (month from fecha_presupue' + + 'sto) = 12 then '#39'DICIEMBRE - '#39' || extract (year from fecha_presup' + + 'uesto)'#10'end as TITULO,'#10'REFERENCIA, ID_CLIENTE, NOMBRE, SITUACION' + + ', NIF_CIF, FECHA_PRESUPUESTO, FECHA_DECISION, '#39#39' as FACTURA, IMP' + + 'ORTE_TOTAL'#10#10'from V_presupuestos_cliente'#10'where {where}'#10'order by F' + + 'ECHA_PRESUPUESTO'#10 + StatementType = stSQL + ColumnMappings = < + item + DatasetField = 'ID_EMPRESA' + TableField = 'ID_EMPRESA' + end + item + DatasetField = 'MES' + TableField = 'MES' + end + item + DatasetField = 'TITULO' + TableField = 'TITULO' + end + item + DatasetField = 'REFERENCIA' + TableField = 'REFERENCIA' + end + item + DatasetField = 'ID_CLIENTE' + TableField = 'ID_CLIENTE' + end + item + DatasetField = 'NOMBRE' + TableField = 'NOMBRE' + end + item + DatasetField = 'SITUACION' + TableField = 'SITUACION' + end + item + DatasetField = 'NIF_CIF' + TableField = 'NIF_CIF' + end + item + DatasetField = 'FECHA_PRESUPUESTO' + TableField = 'FECHA_PRESUPUESTO' + end + item + DatasetField = 'FECHA_DECISION' + TableField = 'FECHA_DECISION' + end + item + DatasetField = 'FACTURA' + TableField = 'FACTURA' + end + item + DatasetField = 'IMPORTE_TOTAL' + TableField = 'IMPORTE_TOTAL' + end> + end> + Name = 'InformeListadoPresupuestos' + Fields = < + item + Name = 'ID_EMPRESA' + DataType = datInteger + end + item + Name = 'MES' + DataType = datSmallInt + end + item + Name = 'TITULO' + DataType = datString + Size = 19 + end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + end + item + Name = 'ID_CLIENTE' + DataType = datInteger + end + item + Name = 'NOMBRE' + DataType = datString + Size = 255 + end + item + Name = 'SITUACION' + DataType = datString + Size = 255 + end + item + Name = 'NIF_CIF' + DataType = datString + Size = 15 + end + item + Name = 'FECHA_PRESUPUESTO' + DataType = datDateTime + end + item + Name = 'FECHA_DECISION' + DataType = datDateTime + end + item + Name = 'FACTURA' + DataType = datString + end + item + Name = 'IMPORTE_TOTAL' + DataType = datCurrency + end> + end item Params = < item @@ -858,4 +999,86 @@ object RptPresupuestosCliente: TRptPresupuestosCliente Left = 472 Top = 440 end + object tbl_InformeListadoPresupuestos: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = < + item + Name = 'ID_EMPRESA' + DataType = datInteger + end + item + Name = 'MES' + DataType = datSmallInt + end + item + Name = 'TITULO' + DataType = datString + Size = 19 + end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + end + item + Name = 'ID_CLIENTE' + DataType = datInteger + end + item + Name = 'NOMBRE' + DataType = datString + Size = 255 + end + item + Name = 'SITUACION' + DataType = datString + Size = 255 + end + item + Name = 'NIF_CIF' + DataType = datString + Size = 15 + end + item + Name = 'FECHA_PRESUPUESTO' + DataType = datDateTime + end + item + Name = 'FECHA_DECISION' + DataType = datDateTime + end + item + Name = 'FACTURA' + DataType = datString + end + item + Name = 'IMPORTE_TOTAL' + DataType = datCurrency + end> + Params = <> + LogChanges = False + StreamingOptions = [soDisableEventsWhileStreaming] + RemoteFetchEnabled = False + LocalSchema = schReport + LocalDataStreamer = Bin2DataStreamer + DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] + MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] + LogicalName = 'InformeListadoPresupuestos' + IndexDefs = <> + Left = 464 + Top = 128 + end + object DADSInformeListadoPresupuestos: TDADataSource + DataSet = tbl_InformeListadoPresupuestos.Dataset + DataTable = tbl_InformeListadoPresupuestos + Left = 464 + Top = 72 + end + object frxDBInformeListadoPresupuestos: TfrxDBDataset + UserName = 'frxDBInformeListadoPresupuestos' + CloseDataSource = True + DataSource = DADSInformeListadoPresupuestos + Left = 464 + Top = 16 + end end diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas index d0767564..e2fa2459 100644 --- a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas +++ b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas @@ -26,8 +26,6 @@ type tbl_Cabecera: TDAMemDataTable; tbl_Detalles: TDAMemDataTable; frxReport: TfrxReport; - schReport: TDASchema; - DataDictionary: TDADataDictionary; IBDatabase1: TIBDatabase; IBTransaction1: TIBTransaction; DataSource1: TDataSource; @@ -35,13 +33,20 @@ type cabecera: TIBQuery; detalles: TIBQuery; frxPDFExport1: TfrxPDFExport; + tbl_InformeListadoPresupuestos: TDAMemDataTable; + DADSInformeListadoPresupuestos: TDADataSource; + frxDBInformeListadoPresupuestos: TfrxDBDataset; + schReport: TDASchema; + DataDictionary: TDADataDictionary; procedure DataModuleCreate(Sender: TObject); private FConnection: IDAConnection; - procedure _GenerarPresupuesto(const AID : Integer); + procedure _GenerarPresupuesto(const AID : Integer); + function _GenerarInforme(const TipoInforme: String; const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const ImporteMinimo: Currency): Binary; public function GenerarPresupuesto(const ListaID : TIntegerArray): Binary; function GenerarPresupuestoEnPDF(const ListaID : TIntegerArray): Binary; + function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; end; implementation @@ -53,10 +58,12 @@ uses const rptInforme = 'InfPresupuestoCliente.fr3'; + rptInformeListadoPresupuestosDesglosado = 'InformeListadoPresupuestosDesglosado.fr3'; + rptInformeListadoPresupuestos = 'InformeListadoPresupuestos.fr3'; { Dataset names for schReport } - ds_InformeCabecera = 'Informe_Cabecera'; - ds_InformeDetalles = 'Informe_Detalles'; +// ds_InformeCabecera = 'Informe_Cabecera'; +// ds_InformeDetalles = 'Informe_Detalles'; { TRptPresupuestosProveedor } @@ -69,17 +76,37 @@ begin frxReport.EngineOptions.NewSilentMode := simReThrow; end; +function TRptPresupuestosCliente.GenerarInformeListadoPresupuestos( + const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime; + const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +var + ATipoInforme: String; + +begin + +//DESGLOSADO POR CLIENTE EN ESTE INFORME NO SE DESGLOSARÁ POR CLIENTE + if Desglosado then + ATipoInforme := rptInformeListadoPresupuestosDesglosado + else + ATipoInforme := rptInformeListadoPresupuestos; + + Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, ImporteMinimo); +end; + function TRptPresupuestosCliente.GenerarPresupuesto(const ListaID : TIntegerArray): Binary; var i: Integer; begin Result := Binary.Create; + try + //Vamos generando todos y cada uno de los presupuestos recibidos + for i := 0 to ListaID.Count - 1 do + _GenerarPresupuesto(ListaID.Items[i]); - //Vamos generando todos y cada uno de los presupuestos recibidos - for i := 0 to ListaID.Count - 1 do - _GenerarPresupuesto(ListaID.Items[i]); - - frxReport.PreviewPages.SaveToStream(Result); + frxReport.PreviewPages.SaveToStream(Result); + finally + end; end; function TRptPresupuestosCliente.GenerarPresupuestoEnPDF( @@ -88,19 +115,114 @@ var i: Integer; begin Result := Binary.Create; + try + //Vamos generando todos y cada uno de los presupuestos recibidos + for i := 0 to ListaID.Count - 1 do + _GenerarPresupuesto(ListaID.Items[i]); - //Vamos generando todos y cada uno de los presupuestos recibidos - for i := 0 to ListaID.Count - 1 do - _GenerarPresupuesto(ListaID.Items[i]); + frxPDFExport1.Stream := Result; + frxReport.Export(frxPDFExport1) + finally + end; +end; - frxPDFExport1.Stream := Result; - frxReport.Export(frxPDFExport1) +function TRptPresupuestosCliente._GenerarInforme(const TipoInforme: String; + const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime; + const ListaIDClientes: TIntegerArray; const ImporteMinimo: Currency): Binary; +var + Condicion: TDAWhereExpression; + i: Integer; + +begin + Result := Binary.Create; + FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" + + try + + if tbl_InformeListadoPresupuestos.Active then + tbl_InformeListadoPresupuestos.Active := False; + + // Filtrar el informe por empresa + with tbl_InformeListadoPresupuestos.DynamicWhere do + begin + // (ID_EMPRESA >= ID) + Condicion := NewBinaryExpression(NewField('', fld_PresupuestosClienteID_EMPRESA), NewConstant(IdEmpresa, datInteger), dboEqual); + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + + // Filtrar el informe por fechas + if not VarIsNull(FechaInicio) + and not VarIsNull(FechaFin) then + begin + with tbl_InformeListadoPresupuestos.DynamicWhere do + begin + // (FECHA_INICIO between FECHA_FIN) + Condicion := NewBinaryExpression(NewField('', fld_PresupuestosClienteFECHA_PRESUPUESTO), NewConstant(FechaInicio, datDateTime), dboGreaterOrEqual); + Condicion := NewBinaryExpression(NewBinaryExpression(NewField('', fld_PresupuestosClienteFECHA_PRESUPUESTO), NewConstant(FechaFin, datDateTime), dboLessOrEqual), Condicion, dboAnd); + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + end; + + // Filtrar el informe por cliente + if Assigned(ListaIDClientes) then + begin + with tbl_InformeListadoPresupuestos.DynamicWhere do + begin + for i := 0 to ListaIDClientes.Count - 1 do + begin + + // (ID_CLIENTE = ID) + Condicion := NewBinaryExpression(NewField('', fld_PresupuestosClienteID_CLIENTE), NewConstant(ListaIDClientes.Items[i], datInteger), dboEqual); + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + end; + end; + + // Filtrar el informe por importe minimo + if (ImporteMinimo > 0) then + begin + with tbl_InformeListadoPresupuestos.DynamicWhere do + begin + // (IMPORTE_TOTAL > ImporteMinimo) + Condicion := NewBinaryExpression(NewField('', fld_PresupuestosClienteIMPORTE_TOTAL), NewConstant(ImporteMinimo, datCurrency), dboGreaterOrEqual); + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + end; + + + tbl_InformeListadoPresupuestos.Active := True; + + frxReport.LoadFromFile(DarRutaInformes + TipoInforme, True); +// frxReport.LoadFromFile(DarRutaInformes + IntToStr(IdEmpresa) + '\' + TipoInforme, True); + frxReport.Variables.Variables['FechaInicio'] := FechaInicio; + frxReport.Variables.Variables['FechaFin'] := FechaFin; + + frxReport.PrepareReport(False); + frxReport.PreviewPages.SaveToStream(Result); + + finally + FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" + end; end; procedure TRptPresupuestosCliente._GenerarPresupuesto(const AID: Integer); begin - FConnection.BeginTransaction; + FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" try + tbl_Cabecera.Active := False; + tbl_Detalles.Active := False; tbl_Cabecera.ParamByName('ID').AsInteger := AID; tbl_Detalles.ParamByName('ID').AsInteger := AID; tbl_Cabecera.Active := True; @@ -109,7 +231,7 @@ begin frxReport.LoadFromFile(DarRutaInformes + rptInforme, True); frxReport.PrepareReport(False); finally - FConnection.RollbackTransaction; + FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" end; end; diff --git a/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dpk b/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dpk index 72f72c02..3431d923 100644 Binary files a/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dpk and b/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dpk differ diff --git a/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dproj b/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dproj index cf9cb52d..6a5ed824 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dproj +++ b/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dproj @@ -43,9 +43,6 @@ FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 - - - Intraweb 8.0 Design Package for Borland Development Studio 2006 PresupuestosCliente_view.dpk @@ -54,12 +51,24 @@ MainSource - - - - - - + + + + + + + + + + + + + + + + + +
fEditorElegirArticulosPresupuestoCliente
TfEditorElegirArticulosPedidoCliente @@ -85,6 +94,10 @@
frViewDetallesPresupuestoCliente
TFrame
+ +
frViewDocumentosPresupuestoCliente
+ TFrame +
frViewElegirArticulosPresupuestosCliente
TFrame diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm index 436360ec..eb08718f 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm @@ -1897,4 +1897,5 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente GroupOptions.CaptionOptions.UseDefaultFont = False end end + end diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm index c698dfb9..9c25dde8 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm @@ -151,11 +151,16 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente end inherited TBXTMain2: TTBXToolbar Visible = True - ExplicitWidth = 91 + ExplicitWidth = 150 object TBXItem40: TTBXItem Action = actGenerar DisplayMode = nbdmImageAndText end + object TBXSeparatorItem18: TTBXSeparatorItem + end + object TBXItem42: TTBXItem + Action = ActInformes + end end end inherited StatusBar: TJvStatusBar @@ -201,6 +206,11 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente OnExecute = actEnviarEMailExecute OnUpdate = actEnviarEMailUpdate end + object ActInformes: TAction + Category = 'Acciones' + Caption = 'Informes' + OnExecute = ActInformesExecute + end end inherited SmallImages: TPngImageList PngImages = < @@ -3183,4 +3193,311 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente Left = 184 Top = 112 end + object JSInformesDialog: TJSDialog + Content.Strings = ( + 'Seleccione el informe que desea realizar') + DialogOptions = [doCommandLinks, doModal] + Glyph.Data = { + 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00 + 00001C0806000000720DDF940000000970485973000017120000171201679FD2 + 520000000467414D410000B18E7CFB5193000003104944415478DAAD96FB4B14 + 5114C7CFE463DC1E606444BFF54424D3DC55CA52B1CCD7165A219905054182FD + 1452FD5810FD100406610A669A998FC4F5BDB6266265DAB60F5DD15E58FE03B2 + 3F99D29ABBA7B9779C71C61D9D6177CFCE70CFDCB97B3EF7DCF3BD33C38082FD + B502B2B300CC656020048688A24F036233A0671F40D43160BA87BF62AEEE1010 + 60D7AE293AD8B835815E9B625C80DC8F1E88D4A7C1E8C1FB8F9FD6C3C44035B3 + 21500A65F6D700FE2EA580A5EC551F4A50359316B31D76EFDC0EE5F72A645045 + A067AE0623074B8140891108F1057064CC0D556053DF173812B707E6DCF332A8 + 225080D201DB4AF99BF335B4D502F371415BCC364833C4C29F458F0C2A031281 + 081734AB0B3C88403C1E6E3E2E7960F6A8FFD27A7D3EF07A11DA2C76C84A8D87 + A57FCB32E8B8A54A4C8C21B59365C9015996EF2240B6634DF435B51460A46D1F + 70C093AA46BF09C980C12CA914E6F371ADD707EF1DB3B0B0B8006EB79B8EA96B + EA5106121851245129118FD8BFA2DC5C53C6BAF5EBBBBA97C2D64EC064195B1F + 286C76E956A0EA5C51AEB4764A9929F5750D5A9581D2274B9B651C0BA2F514A8 + 6F28E36B70AD9A4253EF97A9AA55B0CEBA87D03B645B3F43C1DE589C58186D10 + 81150FCAC57B11E161B04517099BB953C78643141B01BA28EEE4DAB0B04DE2B8 + CA460B9C399902E661BB3AB0F5AD038BF30CD4D7E7DD14815A61023027DD00EF + 469C1A80FD1C307F1578FD4A81E665945AD68924181A9D5007B6F4DBF1527E32 + F5C9D3632351F8F549AEE916B14EAA039BCD362C31A6040D23E7887D4A03B0CF + 86C5C6641A24BB7646D3F2D51A77F8C1BCDCFFC79CD3EAC0D7BD56AE86294165 + 4660CB5C6B737DD3062CCA31D00069E76E05241862CF1EDD05E7D40F756063CF + 673C7F5A4F679A59541EF03E4C8C3B0893DF67D481AFBAC7B0F05412CD30EBE2 + ED80F7617CEC0198FEF94B1BF06C6622AD4B4EC99D80F7A1666043D7281A3312 + FD84C20B8417C3AA789405239826E0CBCE4F98979E10344C33B0BE630473D312 + 82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA + 1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082} + Instruction.Text = 'Nuevo informe' + Instruction.Glyph.Data = { + 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00 + 00001C0806000000720DDF940000000970485973000017120000171201679FD2 + 520000000467414D410000B18E7CFB5193000003104944415478DAAD96FB4B14 + 5114C7CFE463DC1E606444BFF54424D3DC55CA52B1CCD7165A219905054182FD + 1452FD5810FD100406610A669A998FC4F5BDB6266265DAB60F5DD15E58FE03B2 + 3F99D29ABBA7B9779C71C61D9D6177CFCE70CFDCB97B3EF7DCF3BD33C38082FD + B502B2B300CC656020048688A24F036233A0671F40D43160BA87BF62AEEE1010 + 60D7AE293AD8B835815E9B625C80DC8F1E88D4A7C1E8C1FB8F9FD6C3C44035B3 + 21500A65F6D700FE2EA580A5EC551F4A50359316B31D76EFDC0EE5F72A645045 + A067AE0623074B8140891108F1057064CC0D556053DF173812B707E6DCF332A8 + 225080D201DB4AF99BF335B4D502F371415BCC364833C4C29F458F0C2A031281 + 081734AB0B3C88403C1E6E3E2E7960F6A8FFD27A7D3EF07A11DA2C76C84A8D87 + A57FCB32E8B8A54A4C8C21B59365C9015996EF2240B6634DF435B51460A46D1F + 70C093AA46BF09C980C12CA914E6F371ADD707EF1DB3B0B0B8006EB79B8EA96B + EA5106121851245129118FD8BFA2DC5C53C6BAF5EBBBBA97C2D64EC064195B1F + 286C76E956A0EA5C51AEB4764A9929F5750D5A9581D2274B9B651C0BA2F514A8 + 6F28E36B70AD9A4253EF97A9AA55B0CEBA87D03B645B3F43C1DE589C58186D10 + 81150FCAC57B11E161B04517099BB953C78643141B01BA28EEE4DAB0B04DE2B8 + CA460B9C399902E661BB3AB0F5AD038BF30CD4D7E7DD14815A61023027DD00EF + 469C1A80FD1C307F1578FD4A81E665945AD68924181A9D5007B6F4DBF1527E32 + F5C9D3632351F8F549AEE916B14EAA039BCD362C31A6040D23E7887D4A03B0CF + 86C5C6641A24BB7646D3F2D51A77F8C1BCDCFFC79CD3EAC0D7BD56AE86294165 + 4660CB5C6B737DD3062CCA31D00069E76E05241862CF1EDD05E7D40F756063CF + 673C7F5A4F679A59541EF03E4C8C3B0893DF67D481AFBAC7B0F05412CD30EBE2 + ED80F7617CEC0198FEF94B1BF06C6622AD4B4EC99D80F7A1666043D7281A3312 + FD84C20B8417C3AA789405239826E0CBCE4F98979E10344C33B0BE630473D312 + 82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA + 1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082} + Instruction.Icon = tdiCustom + CustomButtons = < + item + Caption = 'Listado de presupuestos.' + Value = 100 + Default = True + end> + ButtonBar.Buttons = [cbCancel] + MainIcon = tdiCustom + Title = 'FactuGES' + Position = dpMainFormCenter + Icon.Data = { + 0000010003002020100001000400E8020000360000002020000001000800A808 + 00001E0300002020000001002000A8100000C60B000028000000200000004000 + 0000010004000000000000020000000000000000000000000000000000000000 + 000000008000008000000080800080000000800080008080000080808000C0C0 + C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 + 0000000000000000000000000000000008777777777777777777777700000000 + 0877767777677776777767760000000008F88888888888888888888700000000 + 08F8FF8F8F888888888888860000000008FF8F8F88F8F8888888888C00000000 + 08F88888F8888888888888860000000008F8688878E8888E88E8788700000000 + 08F8688888F8F8FFFFFF88760000000008FF4888888F8FFFFFFF788700000000 + 08F8676767677677677658E50000000008FF8888888887878787888700000000 + 08FF8887887E8888888888860000000008FFE8E8E788C8E8FF8F8F8600000000 + 08FFF8F8F8F8FF8F88F8F8870000000008FFFFFF8FF8F8F8F88F888600000000 + 0FF8477878787878788788860000000008FF68888888F8FF8F8F788700000000 + 08B7588888FF8FFFFFFF78860000083008BB47887776777777776F86000000B7 + 8B9B73BB88788787E87878870000008BB8B9BB78888888EFF8F8FF8600000087 + B8BB8B888E8E8E88FFF8F886000000088BBB888FFFFFFFFFF8F877770000B9BB + B8FFBB9B9BFFFFFFF87466460000BBB9BB8FBBBBB8FFFFFFF88F888700000008 + B8BB88888FFFFFFFF88F8F7700000008BBBBBB8FFFFFFFFFFF8887700000007B + B7B98BB8FFFFFFFFF8887700000000B78B9B87B888F88F88F8877000000007B0 + 08BB883B78888788787700000000000000B9000000000000000000000000FFFF + FFFFF800000FF800000FF800000FF800000FF800000FF800000FF800000FF800 + 000FF800000FF800000FF800000FF800000FF800000FF800000FF800000FF800 + 000FF800000FF800000F9800000FC000000FC000000FC000000FE000000F0000 + 000F0000000FE000000FE000001FC000003FC000007F980000FFFCFFFFFF2800 + 0000200000004000000001000800000000000004000000000000000000000001 + 00000001000000000000694731007C5D49007E604C0081635000826451008567 + 540085685500886B5900896D5B008A6E5D008B705F008E715F008B7260008C72 + 61008E74640084766C00957A6900977D6D00887B72009A8171009D8272009C84 + 76009D8778009F897B00A28A7900A08B7D00A18C7E00E1B06E00E1B67D003E7A + 970073A0A5007AA2B70074AFBD007BB2BB003CAACE0028A5DB0020ADDF000D9A + E500209EE3000DA6E2001AA4EF0000A6FF000CABFE0009ACFE0010A4F10015AC + FA0000B5FB0000B0FD000CB6FC0000BFF90000BAFD0004BAFD0009BBFB0013B6 + F40015BFFA001CBDFB0026B7FD00589EC50040A4CD0040ABCC0050A2C7005DAE + C00060A3C20062A4C60060B7CB006AB0CD007BB6C80077BAC80061BADD0044AD + E50000C3F80007C6FB0000CAF80000CFFB0000D4F90026C8FA0026CDF8002BCC + F90039C4FB0039C2FC0039CAFA003FCFFB0024D6F80030D2F80039D5F80000F8 + F8001FF8F8002CF6F8003EF4F8005AC6DC0070CDDF0052C0E40054C9E3004DCE + FA005FC7FF004FD2FB004DD9F8005FD9FB006ED3E70063CDFE0060D1FB0060D8 + F90060DDF80046F8F90056F0F8005FFAFA0073E3F80073E4F90073EEF80060F1 + F800958A84009A918C0081999500A68F8200AD968500A3968C00AE988900AD9A + 8D00B19A8B00AF9C9000B09E9200B59F9200B7A29300B2A19600B5A19400B7A4 + 9700BDA79700B4A39800B1A59D00B4A79F00BAA69800BCA79900B4A89F00BCA8 + 9900BAA89C00BDAA9D00BEAC9E0083ADBD00B5A9A100BDABA000BEADA100BFAF + A500A0BABE00C0AB9E00C1AC9E00C6AE9F00E2B98100E4BA8300E4BB8400E5BC + 8500E1BD8E00E3BF9000C0ADA000C2B0A300C2B1A500C4B2A600C1B2A800C3B5 + AB00C8B4A800CCB9AD00CEBCB100D0BEB200D1BFB400E4C19300E5C29400E6C4 + 9600E8C69900D0C9A300CFC1B800D2C1B600D3C3B800D5C4B900D6C6BC00D8C6 + BC00D6C8BE00DAC9BF00ECD3B000EDD4B200EFD6B500E7D1B800E7D3BD00F0D8 + B6008CB7C40080BEC70097C3C70099C3C900ABD7CF00AFD9DD0086E3F90086E7 + F90086ECF8009EE5FB0090E8F900ACEDFC00BCEAFD00BCF1FB00BFF1FD00D7C9 + C000D9CAC100DCCBC200DACCC200DDCCC300DACCC400DDCEC400DED0C600DED1 + C900DED3CC00DFD4CD00E1D1C900E2D5CD00F0DCC200E3D8D200E5D9D200E2DA + D500E6DBD400E5DCD500E8DDD600E6DDD800E9DFD900E6E0DB00EAE0DA00EAE2 + DD00ECE3DE00EBE4DE00ECE4DE00F3E7D900C6E1EF00C9EFFD00D7F6FD00DFF3 + FF00DFFEFE00EBE7E300EDE6E100EFE7E400EEE8E400F0EAE600F2EDE900F2EE + EC00F4EFEC00F5F0EE00F9F4ED00E7FAFD00EBF8FF00F6F2F000F7F4F100F8F4 + F200F9F7F500FAF8F600FBF9F900FCFBFA00FCFCFB00FEFEFE00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000007D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D + 0D0D0000000000000000009C9C19191919191919191919191919191919191919 + 1903000000000000000000ABDECBCBC7C7AFABABABABAAA3A2A2A0A0A0A0A0A0 + 8607000000000000000000ABECEAE9DEDEDEDED7D5D2D2D2CBCBCBCBB0CBB0CB + 9007000000000000000000ABEDECEAE9DEDEDBD7D7D5D2D2D2CDCDCBB0B0B0B0 + 9007000000000000000000AFEDE9A9CFD2CFD2CDCBCBCBB0B0ABACA3A3A3A3B0 + 9007000000000000000000AFF0D5017783838386868686869099909999907BB0 + 9007000000000000000000B0F4D501A0B0CBD2D5DEECEDF7FAFAFAFAFAF77BAA + 9007000000000000000000CBF4DC01A0B0B0B0D2D5DBEAEDF7FAFAFAFAF47BB0 + 9007000000000000000000CBF8DC010404070604090909090D0D110D110D02A3 + 9007000000000000000000CBFAED9E9E9E9C999E8C8C8C868683837E7D7D7ACB + 9007000000000000000000CBFAF1A7A7A6A6A6A69898989898B5DBDBD5D5D2D2 + 9907000000000000000000CDFAF796969696961D961D931D1DB4DEDBD7D5D5D2 + 9C07000000000000000000CFFAFAFAFAF8F7F0F0EDEDEDECE9E9DEDEDED7D5D5 + 9907000000000000000000CDFAFAEAF0EDEDECEAEAE9DEDEDBDCD5D5D5D5D2D5 + 9C07000000000000000000D2FAEC01737D7D7B7D7D7B7D7B7D7B7B7B7D7B7DD2 + 9907000000000000000000CFFAEC019EABB0CBD2D5DCDEECEDF4F4F4F4EA7BD2 + 9C07000000000000000000B9524601A0B0B0CBB5D5DEEAEDF7FAFAFAFAF47DD5 + 9C070000000000213F0000B83226010C3F5C1F111214141616191B1B1B1807D2 + 9C07000000000000253D8A5B322D711E2860BA7E7E7A7E797A797979767676D5 + 9E0700000000000041375E662F2B65314EBBB6B6B6B6B4B4B1E2F4EDEDEDECEA + 9C070000000000008F5D66663232394EC1A81C1C1C1C1C1C1CD3F7F4EDDED7D5 + 9C0700000000000000B7BE6E5758BEBDE4E6E6F3FAFAFAFAFAFAF7F4D5928675 + 7304000000002A2A2A2A4A6AFAE7562F2A2A2A5FFAFAFAFAFAFAF8D577010101 + 0101000000004747472F4A59C5E7564A32474766FAFAFAFAFAFAFADCA0D2CFB0 + A20C00000000000000436C6958686D6BC2C5C5E7FAFAFAFAFAFAFADEAADEDBCB + 1470000000000000004551534A4A5250C0E7FAFAFAFAFAFAFAFAFADEAAD7B514 + 700000000000000042384C54472B613550C3FAFAFAFAFAFAFAFAFADEA1B0196F + 000000000000000024234463322EBC5A3664E3ECE9E9E9E9E9E9E9CF90731300 + 000000000000003A3C00002232298B8B3E3B207E8B7E8B7E827E817E74100000 + 0000000000000000000000003227000000000000000000000000000000000000 + 000000000000FFFFFFFFF800000FF800000FF800000FF800000FF800000FF800 + 000FF800000FF800000FF800000FF800000FF800000FF800000FF800000FF800 + 000FF800000FF800000FF800000FF800000F9800000FC000000FC000000FC000 + 000FE000000F0000000F0000000FE000000FE000001FC000003FC000007F9800 + 00FFFCFFFFFF2800000020000000400000000100200000000000801000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000007067 + 5F70AA9382E570513CE3735540E3735540E3735540E3735540E3735540E37355 + 40E3735540E3735540E3735540E3735540E3735540E3735540E3735540E37355 + 40E3735540E3735540E3735540E3735540E3735540E3735540E372533EE5BAAB + A070000000000000000000000000000000000000000000000000000000005E54 + 4C7FCAB7ABFFC5B5AAFFA18877FFA28A78FFA28A79FFA28A79FFA28A79FFA28A + 79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A + 79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A79FFA58D7CFF7A5B46FFB2A1 + 967F000000000000000000000000000000000000000000000000000000006055 + 4D7ED7C6BBFFEDE4E0FFD9CCC4FFD9CCC4FFD9CBC3FFD8CAC1FFD7C9BFFFD6C7 + BDFFD5C6BBFFD4C4BAFFD3C3B8FFD2C1B7FFD1C0B5FFD0BEB3FFCFBDB2FFCEBC + B0FFCEBBAFFFCEBBAFFFCEBBAFFFCEBBAFFFCEBCB0FFBEAA9CFF82644FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006056 + 4D7ED7C8BCFFF2EBE8FFEFE9E5FFEEE7E2FFECE5E0FFEBE2DEFFEAE0DBFFE9DE + D8FFE7DBD4FFE5D9D1FFE3D7CFFFE2D4CCFFE1D2C9FFDFD0C7FFDDCDC4FFDCCB + C2FFDBC9BFFFDBC9BFFFDBC9BFFFDBC9BFFFDCCAC1FFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006155 + 4E7ED8C9BDFFF3EDE9FFF1EAE6FFF0E9E6FFEEE6E1FFECE4DFFFEBE2DDFFEAE0 + DAFFE9DED7FFE7DBD4FFE5D9D1FFE3D7CFFFE2D4CCFFE1D2C9FFDFD0C7FFDDCD + C4FFDCCBC2FFDBC9BFFFDBC9BFFFDBC9BFFFDCCAC0FFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006157 + 4E7ED9C9BFFFF4EFEDFFEFE8E3FFD0C2B9FFDFD5CEFFE0D5CEFFE0D4CCFFDED3 + CBFFDDD1C8FFDCCFC6FFDACCC4FFD9CBC1FFD8C9BFFFD7C7BDFFD6C5BBFFD5C4 + B9FFD3C2B7FFD2C0B5FFD2BFB4FFD2BFB4FFDAC8BEFFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006256 + 4F7EDACCC0FFF5F2EFFFE5DDD9FF5C3821FFB0998AFFB8A394FFB8A394FFB9A3 + 94FFB8A495FFB9A597FFB9A698FFBAA698FFBBA799FFBBA89AFFBBA89BFFBCA8 + 9BFFBCA89BFFBCA89BFFBBA89AFFB49E8FFFD8C6BBFFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006256 + 4F7EDBCBC1FFF8F4F3FFE7E0DBFF5F3C24FFD0BDB2FFDCCBC1FFDDCCC3FFE2D2 + CBFFE7DBD4FFEDE2DEFFF0E8E6FFF5F0EDFFF9F7F4FFFDFDFDFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFAF8F7FFB39D8DFFD8C6BBFFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006256 + 4F7EDCCEC3FFFAF6F5FFE9E2DDFF5F3C24FFD2BFB5FFDFCDC4FFDECCC3FFE0CE + C6FFE4D4CDFFE9DDD6FFEFE4E0FFF1EAE8FFF7F1EFFFFBF8F6FFFFFEFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFCFBFAFFB5A090FFD9C7BEFFC1AD9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006257 + 4F7EDDCFC4FFFCF9F9FFE9E4E0FF5F3A23FF7C5D49FF7F5F4CFF7E5F4CFF7E60 + 4DFF7F614DFF816350FF826552FF836654FF846856FF856A57FF866B59FF876C + 5BFF876D5BFF876D5BFF866B59FF72523DFFD5C3B9FFC1AFA1FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006357 + 507EDECFC6FFFCFCFBFFF4F1F0FFC3B6AEFFC3B5ADFFC1B4ACFFC0B3AAFFBFB1 + A9FFBEB0A6FFBDAEA5FFBDACA3FFBCABA2FFBBAAA0FFBAA99FFFB8A69AFFB8A4 + 98FFB6A396FFB5A194FFB49F93FFB39D90FFDCCDC4FFC2AEA1FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006357 + 507EDFD2C7FFFEFEFDFFF9F5EFFFE8C696FFE9C799FFE8C697FFE7C596FFE7C4 + 95FFE6C394FFE5C293FFE4C091FFE4C090FFE3BF8FFFE2BD8CFFE9D5BFFFEBE1 + DCFFEADFD8FFE7DCD5FFE5DAD3FFE4D8D0FFE3D4CCFFC2AFA2FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006458 + 517EE0D3C8FFFFFFFFFFFAF5EFFFE3B77CFFE4B97FFFE2B87EFFE3B77DFFE2B7 + 7CFFE2B67BFFE1B57AFFE1B479FFE0B478FFE0B377FFDFB174FFE6D0B7FFEBE1 + DCFFE8DFD9FFE8DDD6FFE6D9D2FFE3D8D1FFE4D7CFFFC3AFA2FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006458 + 517EE1D2C9FFFFFFFFFFFEFEFDFFFEFFFFFFFCFDFEFFFBFBFBFFF9F7F8FFF8F5 + F6FFF7F3F2FFF5F1F0FFF4EFEEFFF1EDEBFFF0EBE9FFEEE9E6FFEDE6E2FFECE3 + DEFFEBE1DBFFE9DFD9FFE8DDD6FFE6DAD3FFE5D9D2FFC3B0A3FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006459 + 517EE1D4CAFFFFFFFFFFFDFDFCFFEEEBE8FFF5F2F0FFF4F0EFFFF3EFECFFF2ED + EAFFF1EBE8FFEEE9E5FFEFE7E3FFECE5E1FFEAE4DEFFEAE1DCFFE8E0DAFFE7DE + D8FFE6DDD6FFE5DBD4FFE4D8D1FFE2D6CEFFE6DBD4FFC3B1A4FF81634EFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006559 + 527EE2D4CAFFFFFFFFFFF0ECEAFF5B361EFFAB9383FFB39D8EFFB39D8DFFB39D + 8DFFB29D8DFFB29C8DFFB29C8CFFB29C8CFFB29C8CFFB29C8CFFB29C8CFFB29C + 8CFFB29C8CFFB29C8CFFB29C8DFFB39D8EFFE3D8D0FFC4B1A4FF81634EFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006559 + 527EE5D4CAFFFFFFFFFFF7F0EBFF5F3B24FFCCB8ADFFD7C5BAFFD9C7BDFFDCCC + C3FFE1D4CCFFE5DAD4FFE8E0DBFFEDE5E1FFF1EBE9FFF5F2EFFFF7F5F3FFF8F6 + F4FFF8F5F4FFF8F6F4FFF1EEEAFFB29C8DFFE6DAD3FFC4B2A5FF81634EFFB2A1 + 967E00000000000000000000000000000000000000000000000000000000685A + 527E9AC6C9FF35CFFEFF3DAEEBFF663E24FFD2BFB4FFE0CBBFFFE0C9BDFFE1CD + C4FFE4D5CDFFE9DED7FFEEE5E0FFF2EBE8FFF6F2F0FFFCF8F8FFFFFFFEFFFFFF + FFFFFFFFFFFFFFFFFFFFFCFAF9FFB49E8FFFE7DED7FFC5B3A6FF81634EFFB2A1 + 967E00000000000000000000000000000000007792910072A7A3001E33366957 + 4C7C86C1C8FF00BFFBFF079AEBFF6A3E23FF926D57FF5FA3C8FF4AC1E8FF6C9C + A2FF917260FF927767FF947A69FF957C6CFF977E6FFF998171FF9A8374FF9B85 + 76FF9C8678FF9C8678FF998274FF7D5E49FFE3D9D4FFC5B3A7FF81634EFFB2A1 + 967E00000000000000000000000000000000005A6F7000A9E5E40075AEAE5C90 + A5BD75D0E0FF00BFFAFF0CA3F4FF8A9A91FF3C7492FF03A4E4FF4AD5FFFF98C4 + CBFFB3A196FFB1A197FFB0A096FFB09F95FFAF9D92FFAF9C91FFAD9A8EFFAC99 + 8CFFAB988AFFAB9789FFAA9688FFA99386FFE8E0DAFFC5B4A7FF81634EFFB2A1 + 967E00000000000000000000000000000000000000002DA5BFC110C2FFFF4DD0 + FDFF64DBF9FF00B3FAFF09A8FEFF68D7FFFF04B5FFFF24CCFBFFAFD8CEFFF7DA + B8FFF3DBBBFFF3DBBAFFF2D9B9FFF1D8B7FFF0D7B4FFEED5B2FFF6EADDFFF9F6 + F4FFF7F3F1FFF5F1EEFFF5EFECFFF4EDEAFFF1EBE7FFC6B4A8FF81634EFFB2A1 + 967E00000000000000000000000000000000000000005F8A909142C7E4E960DE + F8FF64D7FAFF00B6FDFF00B8FDFF21B2FDFF1ECCF7FF93EBFCFFD2C69BFFE1AB + 63FFDFAC66FFDFAC66FFDFAC66FFDFAC66FFDFAC66FFDEA961FFEFDBC0FFF8F6 + F5FFF6F2F0FFF3EDEBFFECE2DCFFE9DFD9FFE5DBD6FFC2B1A4FF81634FFFB2A1 + 967E000000000000000000000000000E171A000E171A00040B145994A4A990EB + FCFF61F1F7FF13FAF7FF23F9F7FF93EDF7FF8CE5F8FFD5F2FDFFE9F8FFFFE7F8 + FFFFF0FCFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFDFEFFFFFAFAF9FFF9F7 + F5FFF7F2F0FFE8DFD8FFC7AE9FFFBEA998FFAF9888FFB09A8AFF7F604DFFB2A1 + 967E00000000000000000000000000AAFFFF00AAFFFF00AAFFFF00A4FFFF00CD + FAFF5DFCF9FFFFFFFFFFEEFEFEFF00FBF7FF00AAFEFF00A1FFFF00A1FFFF00A0 + FFFF56C3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFDFBFFFCFBFAFFFBFA + F8FFE6DDD6FFAA9180FF5D3922FF603D26FF613E27FF613E28FF634029FFB4A3 + 987E00000000000000000000000000CAFFFF00CAFFFF00CBFFFF00B0FFFF00CD + FBFF38F5F7FFC3EFFAFFF0FFFEFF00FAF7FF00C8F7FF00C2F7FF00C2F7FF00C1 + F7FF57D7FAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFEFFFDFDFCFFFCFC + FBFFE7DED8FFCCB9ACFFE6DBD5FFE2D7D0FFDCCFC5FFD7C5BBFF8E705DFFB4A2 + 9680000000000000000000000000002E383C002E383C00252F364C99B0B57DE8 + FBFF59F1F7FF25F7F7FF41FAF8FF7CEEF7FF77E4F7FFB5EFFCFFC6F2FDFFC3F2 + FDFFD9F6FCFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFEFEFFFEFE + FEFFE9E1DAFFCEBCAFFFF1E9E3FFEADFD8FFE4D5CCFF9D816FFF3A291F868985 + 831C00000000000000000000000000000000000000004E7073774AB0DADC37C9 + FBFF22D5F7FF00D3F9FF02C3FBFF37D5F7FF34BEFCFFA2E6FAFFECFBFDFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFF + FFFFEAE2DCFFCDBBADFFEADFD8FFE3D5CBFF9F8271FF3E2D2386050100200000 + 000000000000000000000000000000000000000000003E9CC4C219C0FFFF23C9 + FCFF30D3F8FF00BEF8FF06A8FEFF4FDCF8FF00B8FCFF32C2FBFFC0EBFCFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFEAE3DEFFCDB9ABFFDDCEC4FFA58979FF3E2C1F8F0905041B000000000000 + 000000000000000000000000000000000000003451510099DDDB0091C0C35DAD + BCCF76D7E9FF00BEF9FF10A9FBFFBDDEDEFF5AC8DDFF0AB5F7FF62CEFFFFCBE4 + F1FFF1E7E0FFEFE7E1FFEEE6E1FFEEE6E1FFEEE6E0FFEDE6E0FFEDE5E0FFEEE6 + E1FFE1D4CCFFC5AE9FFFA68D7FF53E2718A10402000E00000000000000000000 + 0000000000000000000000000000000000000075B7AF0099C7C500323E425442 + 3B5C6BA8B1DA00C1FCFF0EA1F3F8A98E80C0AB9081C12698B1C10088C4C14C85 + A3C1A18D80C19E8D81C19E8B81C19D8C80C19B8C7FC19B8A7FC19C897FC19A89 + 7EC19B8B7EC1897769C2432B1BAC000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000045565A00C5FFFF0094E6E2000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FFFFFFFFF0000007F0000007F0000007F000 + 0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000 + 0007F0000007F0000007F0000007F0000007F0000007F0000007800000078000 + 0007C0000007C000000700000007000000070000000700000007C000000FC000 + 001F8000003F800000FFF8FFFFFF} + Width = 450 + Left = 768 + Top = 72 + end end diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas index 9637e4fa..0d2bc5fe 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas @@ -35,6 +35,10 @@ type Enviarporemail1: TMenuItem; TBXItem4441: TTBXItem; TBXItem41: TTBXItem; + ActInformes: TAction; + JSInformesDialog: TJSDialog; + TBXItem42: TTBXItem; + TBXSeparatorItem18: TTBXSeparatorItem; procedure FormShow(Sender: TObject); procedure actGenerarAlbaranCliExecute(Sender: TObject); procedure actEliminarUpdate(Sender: TObject); @@ -45,6 +49,7 @@ type procedure actGenerarUpdate(Sender: TObject); procedure actEnviarEMailExecute(Sender: TObject); procedure actEnviarEMailUpdate(Sender: TObject); + procedure ActInformesExecute(Sender: TObject); protected FPresupuestos: IBizPresupuestoCliente; @@ -82,7 +87,7 @@ uses // uBizAlbaranesCliente, uAlbaranesClienteController, uEditorBase, uEditorDBBase, uDialogUtils, // uFacturasClienteController, uBizFacturasCliente, - uGridUtils, uDBSelectionListUtils; + uGridUtils, uDBSelectionListUtils, uGestorInformesController; // uGenerarPresupuestosProvUtils, uGenerarAlbaranesCliUtils; @@ -190,6 +195,31 @@ begin (FPresupuestos.SITUACION <> SITUACION_PRESUPUESTO_ANULADO); end; +procedure TfEditorPresupuestosCliente.ActInformesExecute(Sender: TObject); +var + Respuesta : Integer; + AGestorInformesController : IGestorInformesController; + +begin + AGestorInformesController := TGestorInformesController.Create; + try + + Respuesta := JsInformesDialog.Execute; + + if Respuesta <> IDCANCEL then + begin + case JsInformesDialog.CustomButtonResult of + 100 : begin // Listado de facturas pendientes + AGestorInformesController.VerInformeListadoPresupuestos; + end; + end; + end; + + finally + AGestorInformesController := NIL; + end; +end; + procedure TfEditorPresupuestosCliente.AsignarVista; begin ViewGrid := CreateView(TfrViewPresupuestosCliente) as IViewPresupuestosCliente; diff --git a/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas b/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas index 2a921a82..fcb57c6f 100644 --- a/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas +++ b/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas @@ -162,7 +162,7 @@ uses Forms, uNumUtils, cxControls, DB, uEditorRegistryUtils, Dialogs, uDAInterfaces, uDataTableUtils, uDataModuleUsuarios, uFactuGES_App, uDateUtils, uROTypes, DateUtils, Controls, Windows, Variants, - uRecibosClienteReportController, uBizContactos, uDADelta, + uRecibosClienteReportController, uBizContactos, uDADelta, uIntegerListUtils, schRecibosClienteClient_Intf, uIEditorRecibosCliente, uIEditorReciboCliente, uIEditorElegirRecibosCliente, uDataModuleRecibosCliente, uIEditorFechaPago; @@ -907,15 +907,16 @@ begin end; procedure TRecibosClienteController.Preview(ARecibosCliente: IBizRecibosCliente; AllItems: Boolean = false); + var AReportController : IRecibosClienteReportController; - ID_Recibos: TStringList; + ID_Recibos: TIntegerList; begin AReportController := TRecibosClienteReportController.Create; - try - ID_Recibos := TStringList.Create; + ID_Recibos := TIntegerList.Create; + try //Si deseamos previsualizar todos los items del objeto albaran if AllItems then begin @@ -924,33 +925,32 @@ begin First; while not EOF do begin - ID_Recibos.Add(IntToStr(ARecibosCliente.ID)); + ID_Recibos.Add(ARecibosCliente.ID); Next; end; end; end //Solo previsualizamos el item seleccionado else - ID_Recibos.Add(IntToStr(ARecibosCliente.ID)); - - AReportController.Preview(ID_Recibos.CommaText); + ID_Recibos.Add(ARecibosCliente.ID); + AReportController.Preview(ID_Recibos); finally AReportController := NIL; - ID_Recibos.Free; + FreeANDNil(ID_Recibos); end; end; procedure TRecibosClienteController.Print(ARecibosCliente: IBizRecibosCliente; AllItems: Boolean = false); var AReportController : IRecibosClienteReportController; - ID_Recibos: TStringList; + ID_Recibos: TIntegerList; begin AReportController := TRecibosClienteReportController.Create; - try - ID_Recibos := TStringList.Create; + ID_Recibos := TIntegerList.Create; + try //Si deseamos previsualizar todos los items del objeto albaran if AllItems then begin @@ -959,20 +959,19 @@ begin First; while not EOF do begin - ID_Recibos.Add(IntToStr(ARecibosCliente.ID)); + ID_Recibos.Add(ARecibosCliente.ID); Next; end; end; end //Solo previsualizamos el item seleccionado else - ID_Recibos.Add(IntToStr(ARecibosCliente.ID)); - - AReportController.Print(ID_Recibos.CommaText); + ID_Recibos.Add(ARecibosCliente.ID); + AReportController.Print(ID_Recibos); finally AReportController := NIL; - ID_Recibos.Free; + FreeANDNil(ID_Recibos); end; end; diff --git a/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteReportController.pas b/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteReportController.pas index 3bf7759e..3d892958 100644 --- a/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteReportController.pas +++ b/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteReportController.pas @@ -4,13 +4,13 @@ interface uses Classes, SysUtils, uDADataTable, uIDataModuleRecibosClienteReport, - uBizRecibosCliente, uControllerBase; + uBizRecibosCliente, uControllerBase, uIntegerListUtils; type IRecibosClienteReportController = interface(IControllerBase) ['{3837DFA3-0A38-4BB2-B0DB-D0615249EA49}'] - procedure Preview(const ID : String); - procedure Print(const ID : String); + procedure Preview(const ListaID : TIntegerList); + procedure Print(const ListaID : TIntegerList); end; TRecibosClienteReportController = class(TControllerBase, IRecibosClienteReportController) @@ -21,8 +21,8 @@ type constructor Create; override; destructor Destroy; override; - procedure Preview(const ID : String); - procedure Print(const ID : String); + procedure Preview(const ListaID : TIntegerList); + procedure Print(const ListaID : TIntegerList); end; @@ -53,29 +53,34 @@ begin inherited; end; -procedure TRecibosClienteReportController.Preview(const ID : String); +procedure TRecibosClienteReportController.Preview(const ListaID : TIntegerList); var AStream: Binary; AEditor : IEditorRecibosClientePreview; begin AEditor := NIL; - AStream := FDataModule.GetReport(ID); + + AStream := FDataModule.GetReport(ListaID); try CreateEditor('EditorRecibosClientePreview', IEditorRecibosClientePreview, AEditor); if Assigned(AEditor) then + begin try + AEditor.Controller := Self; + AEditor.ListaID := ListaID; AEditor.LoadFromStream(AStream); AEditor.Preview; finally AEditor.Release; end; + end; finally FreeAndNil(AStream); AEditor := Nil; end; end; -procedure TRecibosClienteReportController.Print(const ID : String); +procedure TRecibosClienteReportController.Print(const ListaID : TIntegerList); var AStream: Binary; AEditor : IEditorRecibosClientePreview; @@ -83,19 +88,23 @@ begin AEditor := NIL; ShowHourglassCursor; try - AStream := FDataModule.GetReport(ID); + AStream := FDataModule.GetReport(ListaID); try CreateEditor('EditorRecibosClientePreview', IEditorRecibosClientePreview, AEditor); if Assigned(AEditor) then + begin try + AEditor.Controller := Self; + AEditor.ListaID := ListaID; AEditor.LoadFromStream(AStream); AEditor.Print; finally AEditor.Release; - AEditor := NIL; end; + end; finally FreeAndNil(AStream); + AEditor := Nil; end; finally HideHourglassCursor; diff --git a/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.pas b/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.pas index 171e51f0..a65899fb 100644 --- a/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.pas +++ b/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.pas @@ -29,7 +29,7 @@ uses SysUtils, Classes, DB, uDAClientDataModule, uDADataTable, uDABINAdapter, uDAScriptingProvider, uDACDSDataTable, uROWinInetHttpChannel, uROTypes, uRORemoteService, uROClient, uROBinMessage, - uDADesigntimeCall, uDataModuleBase, + uDADesigntimeCall, uDataModuleBase, uIntegerListUtils, uIDataModuleRecibosCliente, uIDataModuleRecibosClienteReport, uBizRecibosCliente, uBizPagosCliente, uBizRecibosCliCompensados, uDAInterfaces, @@ -55,7 +55,7 @@ type function GetItems: IBizRecibosCliente; function GetItem(const ID : Integer) : IBizRecibosCliente; function NewItem : IBizRecibosCliente; - function GetReport(const ID: String): Binary; + function GetReport(const ListaID: TIntegerList): Binary; end; implementation @@ -69,9 +69,16 @@ uses { TDataModuleRecibosCliente } -function TDataModuleRecibosCliente.GetReport(const ID: String): Binary; +function TDataModuleRecibosCliente.GetReport(const ListaID: TIntegerList): Binary; +var + AParam : TIntegerArray; begin - Result := (RORemoteService as IsrvRecibosCliente).GenerateReport(ID); + AParam := ListaID.ToIntegerArray; + try + Result := (RORemoteService as IsrvRecibosCliente).GenerateReport(AParam); + finally + FreeANDNIL(AParam); + end; end; procedure TDataModuleRecibosCliente.DAClientDataModuleCreate(Sender: TObject); diff --git a/Source/Modulos/Recibos de cliente/Model/Data/uIDataModuleRecibosClienteReport.pas b/Source/Modulos/Recibos de cliente/Model/Data/uIDataModuleRecibosClienteReport.pas index 71d7a21e..4584c7d6 100644 --- a/Source/Modulos/Recibos de cliente/Model/Data/uIDataModuleRecibosClienteReport.pas +++ b/Source/Modulos/Recibos de cliente/Model/Data/uIDataModuleRecibosClienteReport.pas @@ -3,12 +3,12 @@ unit uIDataModuleRecibosClienteReport; interface uses - SysUtils, Classes, uROTypes; + SysUtils, uIntegerListUtils, uROTypes; type IDataModuleRecibosClienteReport = interface ['{FBADD967-0008-4ED5-9CCD-5BFE4F527D52}'] - function GetReport(const ID: String): Binary; + function GetReport(const ListaID: TIntegerList): Binary; end; implementation diff --git a/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.dfm b/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.dfm index 6246531c..deafc8b0 100644 --- a/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.dfm +++ b/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.dfm @@ -2,7 +2,7 @@ object RptRecibosCliente: TRptRecibosCliente OldCreateOrder = True OnCreate = DataModuleCreate Height = 405 - Width = 447 + Width = 593 object DADataCabecera: TDADataSource DataSet = tbl_Cabecera.Dataset DataTable = tbl_Cabecera @@ -241,6 +241,139 @@ object RptRecibosCliente: TRptRecibosCliente ConnectionManager = dmServer.ConnectionManager DataDictionary = DataDictionary Datasets = < + item + Params = <> + Statements = < + item + Connection = 'IBX' + ConnectionType = 'Interbase' + Default = True + Name = 'IBX' + SQL = + 'select ID_EMPRESA,'#10'extract (month from fecha_vencimiento) as MES' + + ','#10'case'#10'when extract (month from fecha_vencimiento) = 1 then '#39'ENE' + + 'RO - '#39' || extract (year from fecha_vencimiento)'#10'when extract (mo' + + 'nth from fecha_vencimiento) = 2 then '#39'FEBRERO - '#39' || extract (ye' + + 'ar from fecha_vencimiento)'#10'when extract (month from fecha_vencim' + + 'iento) = 3 then '#39'MARZO - '#39' || extract (year from fecha_vencimien' + + 'to)'#10'when extract (month from fecha_vencimiento) = 4 then '#39'ABRIL ' + + '- '#39' || extract (year from fecha_vencimiento)'#10'when extract (month' + + ' from fecha_vencimiento) = 5 then '#39'MAYO - '#39' || extract (year fro' + + 'm fecha_vencimiento)'#10'when extract (month from fecha_vencimiento)' + + ' = 6 then '#39'JUNIO - '#39' || extract (year from fecha_vencimiento)'#10'wh' + + 'en extract (month from fecha_vencimiento) = 7 then '#39'JULIO - '#39' ||' + + ' extract (year from fecha_vencimiento)'#10'when extract (month from ' + + 'fecha_vencimiento) = 8 then '#39'AGOSTO - '#39' || extract (year from fe' + + 'cha_vencimiento)'#10'when extract (month from fecha_vencimiento) = 9' + + ' then '#39'SEPTIEMBRE - '#39' || extract (year from fecha_vencimiento)'#10'w' + + 'hen extract (month from fecha_vencimiento) = 10 then '#39'OCTUBRE - ' + + #39' || extract (year from fecha_vencimiento)'#10'when extract (month f' + + 'rom fecha_vencimiento) = 11 then '#39'NOVIEMBRE - '#39' || extract (year' + + ' from fecha_vencimiento)'#10'when extract (month from fecha_vencimie' + + 'nto) = 12 then '#39'DICIEMBRE - '#39' || extract (year from fecha_vencim' + + 'iento)'#10'end as TITULO,'#10'REFERENCIA, ID_CLIENTE, NOMBRE_CLIENTE, S' + + 'ITUACION, NIF_CIF as NIF_CIF_CLIENTE, fecha_vencimiento, FECHA_E' + + 'MISION,'#10'IMPORTE_TOTAL'#10#10'from V_recibos_cliente'#10'where {where}'#10'orde' + + 'r by FECHA_VENCIMIENTO'#10 + StatementType = stSQL + ColumnMappings = < + item + DatasetField = 'ID_EMPRESA' + TableField = 'ID_EMPRESA' + end + item + DatasetField = 'MES' + TableField = 'MES' + end + item + DatasetField = 'TITULO' + TableField = 'TITULO' + end + item + DatasetField = 'REFERENCIA' + TableField = 'REFERENCIA' + end + item + DatasetField = 'ID_CLIENTE' + TableField = 'ID_CLIENTE' + end + item + DatasetField = 'NOMBRE_CLIENTE' + TableField = 'NOMBRE_CLIENTE' + end + item + DatasetField = 'SITUACION' + TableField = 'SITUACION' + end + item + DatasetField = 'NIF_CIF_CLIENTE' + TableField = 'NIF_CIF_CLIENTE' + end + item + DatasetField = 'FECHA_VENCIMIENTO' + TableField = 'FECHA_VENCIMIENTO' + end + item + DatasetField = 'FECHA_EMISION' + TableField = 'FECHA_EMISION' + end + item + DatasetField = 'IMPORTE_TOTAL' + TableField = 'IMPORTE_TOTAL' + end> + end> + Name = 'InformeListadoRecibos' + Fields = < + item + Name = 'ID_EMPRESA' + DataType = datInteger + end + item + Name = 'MES' + DataType = datSmallInt + end + item + Name = 'TITULO' + DataType = datString + Size = 19 + end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + end + item + Name = 'ID_CLIENTE' + DataType = datInteger + end + item + Name = 'NOMBRE_CLIENTE' + DataType = datString + Size = 255 + end + item + Name = 'SITUACION' + DataType = datString + Size = 9 + end + item + Name = 'NIF_CIF_CLIENTE' + DataType = datString + Size = 15 + end + item + Name = 'FECHA_VENCIMIENTO' + DataType = datDateTime + end + item + Name = 'FECHA_EMISION' + DataType = datDateTime + end + item + Name = 'IMPORTE_TOTAL' + DataType = datCurrency + end> + end item Params = < item @@ -924,4 +1057,82 @@ object RptRecibosCliente: TRptRecibosCliente Left = 48 Top = 88 end + object tbl_InformeListadoRecibos: TDAMemDataTable + RemoteUpdatesOptions = [] + Fields = < + item + Name = 'ID_EMPRESA' + DataType = datInteger + end + item + Name = 'MES' + DataType = datSmallInt + end + item + Name = 'TITULO' + DataType = datString + Size = 19 + end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + end + item + Name = 'ID_CLIENTE' + DataType = datInteger + end + item + Name = 'NOMBRE_CLIENTE' + DataType = datString + Size = 255 + end + item + Name = 'SITUACION' + DataType = datString + Size = 9 + end + item + Name = 'NIF_CIF_CLIENTE' + DataType = datString + Size = 15 + end + item + Name = 'FECHA_VENCIMIENTO' + DataType = datDateTime + end + item + Name = 'FECHA_EMISION' + DataType = datDateTime + end + item + Name = 'IMPORTE_TOTAL' + DataType = datCurrency + end> + Params = <> + LogChanges = False + StreamingOptions = [soDisableEventsWhileStreaming] + RemoteFetchEnabled = False + LocalSchema = schReport + LocalDataStreamer = Bin2DataStreamer + DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] + MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] + LogicalName = 'InformeListadoRecibos' + IndexDefs = <> + Left = 496 + Top = 128 + end + object DADSInformeListadoRecibos: TDADataSource + DataSet = tbl_InformeListadoRecibos.Dataset + DataTable = tbl_InformeListadoRecibos + Left = 496 + Top = 72 + end + object frxDBInformeListadoRecibos: TfrxDBDataset + UserName = 'frxDBInformeListadoRecibos' + CloseDataSource = True + DataSource = DADSInformeListadoRecibos + Left = 496 + Top = 16 + end end diff --git a/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.pas b/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.pas index 5cfc4195..39e0d4ef 100644 --- a/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.pas +++ b/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.pas @@ -7,7 +7,8 @@ uses Dialogs, frxClass, frxDBSet, uDAScriptingProvider, uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient, frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes, - uDAInterfaces, uDADataStreamer, uDABin2DataStreamer, uDAMemDataTable; + uDAInterfaces, uDADataStreamer, uDABin2DataStreamer, uDAMemDataTable, + FactuGES_Intf; type TRptRecibosCliente = class(TDataModule) @@ -28,12 +29,18 @@ type Bin2DataStreamer: TDABin2DataStreamer; schReport: TDASchema; DataDictionary: TDADataDictionary; + tbl_InformeListadoRecibos: TDAMemDataTable; + DADSInformeListadoRecibos: TDADataSource; + frxDBInformeListadoRecibos: TfrxDBDataset; procedure DataModuleCreate(Sender: TObject); private FConnection: IDAConnection; - procedure GenerarRecibo(const ID : Integer); overload; + procedure _GenerarRecibo(const ID : Integer); overload; + function _GenerarInforme(const TipoInforme: String; const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const ImporteMinimo: Currency): Binary; public - function GenerarRecibo(const ID : String): Binary; overload; + function GenerarRecibo(const ListaID : TIntegerArray): Binary; overload; + function GenerarInformeListadoRecibos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; end; implementation @@ -41,14 +48,18 @@ implementation {$R *.dfm} uses - uDataModuleServer; + uDataModuleServer, schRecibosClienteClient_Intf; const rptInforme = 'InfReciboCliente.fr3'; + rptInformeListadoRecibosClienteDesglosado = 'InformeListadoRecibosClienteDesglosado.fr3'; + rptInformeListadoRecibosCliente = 'InformeListadoRecibosCliente.fr3'; + rptInformeListadoRecibosCliPendientes = 'InformeListadoRecibosCliPendientes.fr3'; + rptInformeListadoRecibosCliPendientesDesglosado = 'InformeListadoRecibosCliPendientesDesglosado.fr3'; { Dataset names for schReport } - ds_InformeCabecera = 'Informe_Cabecera'; - ds_InformeCompensados = 'Informe_Compensados'; +// ds_InformeCabecera = 'Informe_Cabecera'; +// ds_InformeCompensados = 'Informe_Compensados'; { TRptReciboCliente } @@ -60,38 +71,179 @@ begin frxReport.EngineOptions.NewSilentMode := simReThrow; end; -function TRptRecibosCliente.GenerarRecibo(const ID: String): Binary; +function TRptRecibosCliente.GenerarInformeListadoRecibos( + const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime; + const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; var - ID_Recibos: TStringList; + ATipoInforme: String; +begin + +//DESGLOSADO POR CLIENTE EN ESTE INFORME NO SE DESGLOSARÁ POR CLIENTE + if Desglosado then + ATipoInforme := rptInformeListadoRecibosClienteDesglosado + else + ATipoInforme := rptInformeListadoRecibosCliente; + + Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, ImporteMinimo); +end; + +function TRptRecibosCliente.GenerarInformeListadoRecibosPendientes( + const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime; + const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; + const ImporteMinimo: Currency): Binary; +var + Condicion: TDAWhereExpression; + ATipoInforme: String; + +begin + if tbl_InformeListadoRecibos.Active then + tbl_InformeListadoRecibos.Active := False; + + // Filtrar el informe por situacion + with tbl_InformeListadoRecibos.DynamicWhere do + begin + // (ID_EMPRESA >= ID) + Condicion := NewBinaryExpression(NewField('', fld_RecibosClienteSITUACION), NewConstant('COBRADO', datString), dboNotEqual); + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + + +//DESGLOSADO POR CLIENTE EN ESTE INFORME NO SE DESGLOSARÁ POR CLIENTE + if Desglosado then + ATipoInforme := rptInformeListadoRecibosCliPendientesDesglosado + else + ATipoInforme := rptInformeListadoRecibosCliPendientes; + + + Result := _GenerarInforme(ATipoInforme, IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, ImporteMinimo); +end; + +function TRptRecibosCliente.GenerarRecibo(const ListaID: TIntegerArray): Binary; +var + i: Integer; +begin + Result := Binary.Create; + try + //Vamos generando todos y cada uno de los albaranes recibidos + for i := 0 to ListaID.Count - 1 do + _GenerarRecibo(ListaID.Items[i]); + frxReport.PreviewPages.SaveToStream(Result); + finally + end; +end; + +function TRptRecibosCliente._GenerarInforme(const TipoInforme: String; + const IdEmpresa: Integer; const FechaInicio, FechaFin: DateTime; + const ListaIDClientes: TIntegerArray; const ImporteMinimo: Currency): Binary; +var + Condicion: TDAWhereExpression; i: Integer; begin Result := Binary.Create; + FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" - ID_Recibos := TStringList.Create; - ID_Recibos.CommaText := ID; + try - //Vamos generando todos y cada uno de los albaranes recibidos - for i := 0 to ID_Recibos.Count - 1 do - GenerarRecibo(StrToInt(ID_Recibos.Strings[i])); + if tbl_InformeListadoRecibos.Active then + tbl_InformeListadoRecibos.Active := False; - frxReport.PreviewPages.SaveToStream(Result); + // Filtrar el informe por empresa + with tbl_InformeListadoRecibos.DynamicWhere do + begin + // (ID_EMPRESA >= ID) + Condicion := NewBinaryExpression(NewField('', fld_RecibosClienteID_EMPRESA), NewConstant(IdEmpresa, datInteger), dboEqual); + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + + // Filtrar el informe por fechas + if not VarIsNull(FechaInicio) + and not VarIsNull(FechaFin) then + begin + with tbl_InformeListadoRecibos.DynamicWhere do + begin + // (FECHA_INICIO between FECHA_FIN) + Condicion := NewBinaryExpression(NewField('', fld_RecibosClienteFECHA_VENCIMIENTO), NewConstant(FechaInicio, datDateTime), dboGreaterOrEqual); + Condicion := NewBinaryExpression(NewBinaryExpression(NewField('', fld_RecibosClienteFECHA_VENCIMIENTO), NewConstant(FechaFin, datDateTime), dboLessOrEqual), Condicion, dboAnd); + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + end; + + // Filtrar el informe por cliente + if Assigned(ListaIDClientes) then + begin + with tbl_InformeListadoRecibos.DynamicWhere do + begin + for i := 0 to ListaIDClientes.Count - 1 do + begin + + // (ID_CLIENTE = ID) + Condicion := NewBinaryExpression(NewField('', fld_RecibosClienteID_CLIENTE), NewConstant(ListaIDClientes.Items[i], datInteger), dboEqual); + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + end; + end; + + // Filtrar el informe por importe minimo + if (ImporteMinimo > 0) then + begin + with tbl_InformeListadoRecibos.DynamicWhere do + begin + // (IMPORTE_TOTAL > ImporteMinimo) + Condicion := NewBinaryExpression(NewField('', fld_RecibosClienteIMPORTE_TOTAL), NewConstant(ImporteMinimo, datCurrency), dboGreaterOrEqual); + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; + end; + + tbl_InformeListadoRecibos.Active := True; + + frxReport.LoadFromFile(DarRutaInformes + TipoInforme, True); +// frxReport.LoadFromFile(DarRutaInformes + IntToStr(IdEmpresa) + '\' + TipoInforme, True); + frxReport.Variables.Variables['FechaInicio'] := FechaInicio; + frxReport.Variables.Variables['FechaFin'] := FechaFin; + + frxReport.PrepareReport(False); + frxReport.PreviewPages.SaveToStream(Result); + + finally + FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" + end; end; -procedure TRptRecibosCliente.GenerarRecibo(const ID: Integer); +procedure TRptRecibosCliente._GenerarRecibo(const ID: Integer); begin - FConnection.BeginTransaction; + FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" try + tbl_Cabecera.Active := False; + tbl_Compensados.Active := False; + tbl_Cabecera.ParamByName('ID').AsInteger := ID; tbl_Compensados.ParamByName('ID_RECIBO').AsInteger := ID; + tbl_Cabecera.Active := True; tbl_Compensados.Active := True; frxReport.LoadFromFile(DarRutaInformes + rptInforme, True); +// frxReport.LoadFromFile(DarRutaInformes + tbl_Cabecera.FieldByName('ID_EMPRESA').AsString + '\' + rptInforme, True); frxReport.PrepareReport(False); - finally - FConnection.RollbackTransaction; + FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" end; end; diff --git a/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.pas b/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.pas index 2df687de..58a3f99f 100644 --- a/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.pas +++ b/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.pas @@ -33,7 +33,7 @@ type private protected { IsrvRecibosProveedor methods } - function GenerateReport(const ID: String): Binary; + function GenerateReport(const ListaID: TIntegerArray): Binary; end; implementation @@ -79,13 +79,13 @@ begin ConnectionName := dmServer.ConnectionName; end; -function TsrvRecibosCliente.GenerateReport(const ID: String): Binary; +function TsrvRecibosCliente.GenerateReport(const ListaID: TIntegerArray): Binary; var AReportGenerator : TRptRecibosCliente; begin AReportGenerator := TRptRecibosCliente.Create(nil); try - Result := AReportGenerator.GenerarRecibo(ID); + Result := AReportGenerator.GenerarRecibo(ListaID); finally FreeAndNIL(AReportGenerator); end; diff --git a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dpk b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dpk index 632f13a7..d1912262 100644 Binary files a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dpk and b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dpk differ diff --git a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dproj b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dproj index 9088e966..9a13d0ba 100644 --- a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dproj +++ b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dproj @@ -62,6 +62,7 @@ + diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorRecibosCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uEditorRecibosCliente.dfm index 2f271c9f..e5d6e8d3 100644 --- a/Source/Modulos/Recibos de cliente/Views/uEditorRecibosCliente.dfm +++ b/Source/Modulos/Recibos de cliente/Views/uEditorRecibosCliente.dfm @@ -41,11 +41,18 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente Width = 645 ExplicitWidth = 645 inherited tbxMain: TTBXToolbar - ExplicitWidth = 561 + ExplicitWidth = 645 end inherited tbxMenu: TTBXToolbar ExplicitWidth = 645 end + inherited TBXTMain2: TTBXToolbar + Visible = True + ExplicitWidth = 66 + object TBXItem38: TTBXItem + Action = actInformes + end + end end inherited StatusBar: TJvStatusBar Top = 542 @@ -115,15 +122,27 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente Width = 645 ExplicitWidth = 645 inherited txtFiltroTodo: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 548 Width = 548 end inherited edtFechaIniFiltro: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 236 Width = 236 end inherited edtFechaFinFiltro: TcxDateEdit Left = 340 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 340 ExplicitWidth = 295 Width = 295 @@ -183,6 +202,11 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente Enabled = False Visible = False end + object actInformes: TAction + Category = 'Archivo' + Caption = 'Informes' + OnExecute = actInformesExecute + end end inherited SmallImages: TPngImageList [5] PngImages = < @@ -2144,4 +2168,315 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente Left = 328 Top = 144 end + object JSInformesDialog: TJSDialog + Content.Strings = ( + 'Seleccione el informe que desea realizar') + DialogOptions = [doCommandLinks, doModal] + Glyph.Data = { + 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00 + 00001C0806000000720DDF940000000970485973000017120000171201679FD2 + 520000000467414D410000B18E7CFB5193000003104944415478DAAD96FB4B14 + 5114C7CFE463DC1E606444BFF54424D3DC55CA52B1CCD7165A219905054182FD + 1452FD5810FD100406610A669A998FC4F5BDB6266265DAB60F5DD15E58FE03B2 + 3F99D29ABBA7B9779C71C61D9D6177CFCE70CFDCB97B3EF7DCF3BD33C38082FD + B502B2B300CC656020048688A24F036233A0671F40D43160BA87BF62AEEE1010 + 60D7AE293AD8B835815E9B625C80DC8F1E88D4A7C1E8C1FB8F9FD6C3C44035B3 + 21500A65F6D700FE2EA580A5EC551F4A50359316B31D76EFDC0EE5F72A645045 + A067AE0623074B8140891108F1057064CC0D556053DF173812B707E6DCF332A8 + 225080D201DB4AF99BF335B4D502F371415BCC364833C4C29F458F0C2A031281 + 081734AB0B3C88403C1E6E3E2E7960F6A8FFD27A7D3EF07A11DA2C76C84A8D87 + A57FCB32E8B8A54A4C8C21B59365C9015996EF2240B6634DF435B51460A46D1F + 70C093AA46BF09C980C12CA914E6F371ADD707EF1DB3B0B0B8006EB79B8EA96B + EA5106121851245129118FD8BFA2DC5C53C6BAF5EBBBBA97C2D64EC064195B1F + 286C76E956A0EA5C51AEB4764A9929F5750D5A9581D2274B9B651C0BA2F514A8 + 6F28E36B70AD9A4253EF97A9AA55B0CEBA87D03B645B3F43C1DE589C58186D10 + 81150FCAC57B11E161B04517099BB953C78643141B01BA28EEE4DAB0B04DE2B8 + CA460B9C399902E661BB3AB0F5AD038BF30CD4D7E7DD14815A61023027DD00EF + 469C1A80FD1C307F1578FD4A81E665945AD68924181A9D5007B6F4DBF1527E32 + F5C9D3632351F8F549AEE916B14EAA039BCD362C31A6040D23E7887D4A03B0CF + 86C5C6641A24BB7646D3F2D51A77F8C1BCDCFFC79CD3EAC0D7BD56AE86294165 + 4660CB5C6B737DD3062CCA31D00069E76E05241862CF1EDD05E7D40F756063CF + 673C7F5A4F679A59541EF03E4C8C3B0893DF67D481AFBAC7B0F05412CD30EBE2 + ED80F7617CEC0198FEF94B1BF06C6622AD4B4EC99D80F7A1666043D7281A3312 + FD84C20B8417C3AA789405239826E0CBCE4F98979E10344C33B0BE630473D312 + 82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA + 1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082} + Instruction.Text = 'Nuevo informe' + Instruction.Glyph.Data = { + 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00 + 00001C0806000000720DDF940000000970485973000017120000171201679FD2 + 520000000467414D410000B18E7CFB5193000003104944415478DAAD96FB4B14 + 5114C7CFE463DC1E606444BFF54424D3DC55CA52B1CCD7165A219905054182FD + 1452FD5810FD100406610A669A998FC4F5BDB6266265DAB60F5DD15E58FE03B2 + 3F99D29ABBA7B9779C71C61D9D6177CFCE70CFDCB97B3EF7DCF3BD33C38082FD + B502B2B300CC656020048688A24F036233A0671F40D43160BA87BF62AEEE1010 + 60D7AE293AD8B835815E9B625C80DC8F1E88D4A7C1E8C1FB8F9FD6C3C44035B3 + 21500A65F6D700FE2EA580A5EC551F4A50359316B31D76EFDC0EE5F72A645045 + A067AE0623074B8140891108F1057064CC0D556053DF173812B707E6DCF332A8 + 225080D201DB4AF99BF335B4D502F371415BCC364833C4C29F458F0C2A031281 + 081734AB0B3C88403C1E6E3E2E7960F6A8FFD27A7D3EF07A11DA2C76C84A8D87 + A57FCB32E8B8A54A4C8C21B59365C9015996EF2240B6634DF435B51460A46D1F + 70C093AA46BF09C980C12CA914E6F371ADD707EF1DB3B0B0B8006EB79B8EA96B + EA5106121851245129118FD8BFA2DC5C53C6BAF5EBBBBA97C2D64EC064195B1F + 286C76E956A0EA5C51AEB4764A9929F5750D5A9581D2274B9B651C0BA2F514A8 + 6F28E36B70AD9A4253EF97A9AA55B0CEBA87D03B645B3F43C1DE589C58186D10 + 81150FCAC57B11E161B04517099BB953C78643141B01BA28EEE4DAB0B04DE2B8 + CA460B9C399902E661BB3AB0F5AD038BF30CD4D7E7DD14815A61023027DD00EF + 469C1A80FD1C307F1578FD4A81E665945AD68924181A9D5007B6F4DBF1527E32 + F5C9D3632351F8F549AEE916B14EAA039BCD362C31A6040D23E7887D4A03B0CF + 86C5C6641A24BB7646D3F2D51A77F8C1BCDCFFC79CD3EAC0D7BD56AE86294165 + 4660CB5C6B737DD3062CCA31D00069E76E05241862CF1EDD05E7D40F756063CF + 673C7F5A4F679A59541EF03E4C8C3B0893DF67D481AFBAC7B0F05412CD30EBE2 + ED80F7617CEC0198FEF94B1BF06C6622AD4B4EC99D80F7A1666043D7281A3312 + FD84C20B8417C3AA789405239826E0CBCE4F98979E10344C33B0BE630473D312 + 82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA + 1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082} + Instruction.Icon = tdiCustom + CustomButtons = < + item + Caption = 'Listado de recibos pendientes.' + Value = 100 + Default = True + end + item + Caption = 'Listado de recibos' + Value = 200 + end> + ButtonBar.Buttons = [cbCancel] + MainIcon = tdiCustom + Title = 'FactuGES' + Position = dpMainFormCenter + Icon.Data = { + 0000010003002020100001000400E8020000360000002020000001000800A808 + 00001E0300002020000001002000A8100000C60B000028000000200000004000 + 0000010004000000000000020000000000000000000000000000000000000000 + 000000008000008000000080800080000000800080008080000080808000C0C0 + C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 + 0000000000000000000000000000000008777777777777777777777700000000 + 0877767777677776777767760000000008F88888888888888888888700000000 + 08F8FF8F8F888888888888860000000008FF8F8F88F8F8888888888C00000000 + 08F88888F8888888888888860000000008F8688878E8888E88E8788700000000 + 08F8688888F8F8FFFFFF88760000000008FF4888888F8FFFFFFF788700000000 + 08F8676767677677677658E50000000008FF8888888887878787888700000000 + 08FF8887887E8888888888860000000008FFE8E8E788C8E8FF8F8F8600000000 + 08FFF8F8F8F8FF8F88F8F8870000000008FFFFFF8FF8F8F8F88F888600000000 + 0FF8477878787878788788860000000008FF68888888F8FF8F8F788700000000 + 08B7588888FF8FFFFFFF78860000083008BB47887776777777776F86000000B7 + 8B9B73BB88788787E87878870000008BB8B9BB78888888EFF8F8FF8600000087 + B8BB8B888E8E8E88FFF8F886000000088BBB888FFFFFFFFFF8F877770000B9BB + B8FFBB9B9BFFFFFFF87466460000BBB9BB8FBBBBB8FFFFFFF88F888700000008 + B8BB88888FFFFFFFF88F8F7700000008BBBBBB8FFFFFFFFFFF8887700000007B + B7B98BB8FFFFFFFFF8887700000000B78B9B87B888F88F88F8877000000007B0 + 08BB883B78888788787700000000000000B9000000000000000000000000FFFF + FFFFF800000FF800000FF800000FF800000FF800000FF800000FF800000FF800 + 000FF800000FF800000FF800000FF800000FF800000FF800000FF800000FF800 + 000FF800000FF800000F9800000FC000000FC000000FC000000FE000000F0000 + 000F0000000FE000000FE000001FC000003FC000007F980000FFFCFFFFFF2800 + 0000200000004000000001000800000000000004000000000000000000000001 + 00000001000000000000694731007C5D49007E604C0081635000826451008567 + 540085685500886B5900896D5B008A6E5D008B705F008E715F008B7260008C72 + 61008E74640084766C00957A6900977D6D00887B72009A8171009D8272009C84 + 76009D8778009F897B00A28A7900A08B7D00A18C7E00E1B06E00E1B67D003E7A + 970073A0A5007AA2B70074AFBD007BB2BB003CAACE0028A5DB0020ADDF000D9A + E500209EE3000DA6E2001AA4EF0000A6FF000CABFE0009ACFE0010A4F10015AC + FA0000B5FB0000B0FD000CB6FC0000BFF90000BAFD0004BAFD0009BBFB0013B6 + F40015BFFA001CBDFB0026B7FD00589EC50040A4CD0040ABCC0050A2C7005DAE + C00060A3C20062A4C60060B7CB006AB0CD007BB6C80077BAC80061BADD0044AD + E50000C3F80007C6FB0000CAF80000CFFB0000D4F90026C8FA0026CDF8002BCC + F90039C4FB0039C2FC0039CAFA003FCFFB0024D6F80030D2F80039D5F80000F8 + F8001FF8F8002CF6F8003EF4F8005AC6DC0070CDDF0052C0E40054C9E3004DCE + FA005FC7FF004FD2FB004DD9F8005FD9FB006ED3E70063CDFE0060D1FB0060D8 + F90060DDF80046F8F90056F0F8005FFAFA0073E3F80073E4F90073EEF80060F1 + F800958A84009A918C0081999500A68F8200AD968500A3968C00AE988900AD9A + 8D00B19A8B00AF9C9000B09E9200B59F9200B7A29300B2A19600B5A19400B7A4 + 9700BDA79700B4A39800B1A59D00B4A79F00BAA69800BCA79900B4A89F00BCA8 + 9900BAA89C00BDAA9D00BEAC9E0083ADBD00B5A9A100BDABA000BEADA100BFAF + A500A0BABE00C0AB9E00C1AC9E00C6AE9F00E2B98100E4BA8300E4BB8400E5BC + 8500E1BD8E00E3BF9000C0ADA000C2B0A300C2B1A500C4B2A600C1B2A800C3B5 + AB00C8B4A800CCB9AD00CEBCB100D0BEB200D1BFB400E4C19300E5C29400E6C4 + 9600E8C69900D0C9A300CFC1B800D2C1B600D3C3B800D5C4B900D6C6BC00D8C6 + BC00D6C8BE00DAC9BF00ECD3B000EDD4B200EFD6B500E7D1B800E7D3BD00F0D8 + B6008CB7C40080BEC70097C3C70099C3C900ABD7CF00AFD9DD0086E3F90086E7 + F90086ECF8009EE5FB0090E8F900ACEDFC00BCEAFD00BCF1FB00BFF1FD00D7C9 + C000D9CAC100DCCBC200DACCC200DDCCC300DACCC400DDCEC400DED0C600DED1 + C900DED3CC00DFD4CD00E1D1C900E2D5CD00F0DCC200E3D8D200E5D9D200E2DA + D500E6DBD400E5DCD500E8DDD600E6DDD800E9DFD900E6E0DB00EAE0DA00EAE2 + DD00ECE3DE00EBE4DE00ECE4DE00F3E7D900C6E1EF00C9EFFD00D7F6FD00DFF3 + FF00DFFEFE00EBE7E300EDE6E100EFE7E400EEE8E400F0EAE600F2EDE900F2EE + EC00F4EFEC00F5F0EE00F9F4ED00E7FAFD00EBF8FF00F6F2F000F7F4F100F8F4 + F200F9F7F500FAF8F600FBF9F900FCFBFA00FCFCFB00FEFEFE00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000007D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D + 0D0D0000000000000000009C9C19191919191919191919191919191919191919 + 1903000000000000000000ABDECBCBC7C7AFABABABABAAA3A2A2A0A0A0A0A0A0 + 8607000000000000000000ABECEAE9DEDEDEDED7D5D2D2D2CBCBCBCBB0CBB0CB + 9007000000000000000000ABEDECEAE9DEDEDBD7D7D5D2D2D2CDCDCBB0B0B0B0 + 9007000000000000000000AFEDE9A9CFD2CFD2CDCBCBCBB0B0ABACA3A3A3A3B0 + 9007000000000000000000AFF0D5017783838386868686869099909999907BB0 + 9007000000000000000000B0F4D501A0B0CBD2D5DEECEDF7FAFAFAFAFAF77BAA + 9007000000000000000000CBF4DC01A0B0B0B0D2D5DBEAEDF7FAFAFAFAF47BB0 + 9007000000000000000000CBF8DC010404070604090909090D0D110D110D02A3 + 9007000000000000000000CBFAED9E9E9E9C999E8C8C8C868683837E7D7D7ACB + 9007000000000000000000CBFAF1A7A7A6A6A6A69898989898B5DBDBD5D5D2D2 + 9907000000000000000000CDFAF796969696961D961D931D1DB4DEDBD7D5D5D2 + 9C07000000000000000000CFFAFAFAFAF8F7F0F0EDEDEDECE9E9DEDEDED7D5D5 + 9907000000000000000000CDFAFAEAF0EDEDECEAEAE9DEDEDBDCD5D5D5D5D2D5 + 9C07000000000000000000D2FAEC01737D7D7B7D7D7B7D7B7D7B7B7B7D7B7DD2 + 9907000000000000000000CFFAEC019EABB0CBD2D5DCDEECEDF4F4F4F4EA7BD2 + 9C07000000000000000000B9524601A0B0B0CBB5D5DEEAEDF7FAFAFAFAF47DD5 + 9C070000000000213F0000B83226010C3F5C1F111214141616191B1B1B1807D2 + 9C07000000000000253D8A5B322D711E2860BA7E7E7A7E797A797979767676D5 + 9E0700000000000041375E662F2B65314EBBB6B6B6B6B4B4B1E2F4EDEDEDECEA + 9C070000000000008F5D66663232394EC1A81C1C1C1C1C1C1CD3F7F4EDDED7D5 + 9C0700000000000000B7BE6E5758BEBDE4E6E6F3FAFAFAFAFAFAF7F4D5928675 + 7304000000002A2A2A2A4A6AFAE7562F2A2A2A5FFAFAFAFAFAFAF8D577010101 + 0101000000004747472F4A59C5E7564A32474766FAFAFAFAFAFAFADCA0D2CFB0 + A20C00000000000000436C6958686D6BC2C5C5E7FAFAFAFAFAFAFADEAADEDBCB + 1470000000000000004551534A4A5250C0E7FAFAFAFAFAFAFAFAFADEAAD7B514 + 700000000000000042384C54472B613550C3FAFAFAFAFAFAFAFAFADEA1B0196F + 000000000000000024234463322EBC5A3664E3ECE9E9E9E9E9E9E9CF90731300 + 000000000000003A3C00002232298B8B3E3B207E8B7E8B7E827E817E74100000 + 0000000000000000000000003227000000000000000000000000000000000000 + 000000000000FFFFFFFFF800000FF800000FF800000FF800000FF800000FF800 + 000FF800000FF800000FF800000FF800000FF800000FF800000FF800000FF800 + 000FF800000FF800000FF800000FF800000F9800000FC000000FC000000FC000 + 000FE000000F0000000F0000000FE000000FE000001FC000003FC000007F9800 + 00FFFCFFFFFF2800000020000000400000000100200000000000801000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000007067 + 5F70AA9382E570513CE3735540E3735540E3735540E3735540E3735540E37355 + 40E3735540E3735540E3735540E3735540E3735540E3735540E3735540E37355 + 40E3735540E3735540E3735540E3735540E3735540E3735540E372533EE5BAAB + A070000000000000000000000000000000000000000000000000000000005E54 + 4C7FCAB7ABFFC5B5AAFFA18877FFA28A78FFA28A79FFA28A79FFA28A79FFA28A + 79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A + 79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A79FFA58D7CFF7A5B46FFB2A1 + 967F000000000000000000000000000000000000000000000000000000006055 + 4D7ED7C6BBFFEDE4E0FFD9CCC4FFD9CCC4FFD9CBC3FFD8CAC1FFD7C9BFFFD6C7 + BDFFD5C6BBFFD4C4BAFFD3C3B8FFD2C1B7FFD1C0B5FFD0BEB3FFCFBDB2FFCEBC + B0FFCEBBAFFFCEBBAFFFCEBBAFFFCEBBAFFFCEBCB0FFBEAA9CFF82644FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006056 + 4D7ED7C8BCFFF2EBE8FFEFE9E5FFEEE7E2FFECE5E0FFEBE2DEFFEAE0DBFFE9DE + D8FFE7DBD4FFE5D9D1FFE3D7CFFFE2D4CCFFE1D2C9FFDFD0C7FFDDCDC4FFDCCB + C2FFDBC9BFFFDBC9BFFFDBC9BFFFDBC9BFFFDCCAC1FFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006155 + 4E7ED8C9BDFFF3EDE9FFF1EAE6FFF0E9E6FFEEE6E1FFECE4DFFFEBE2DDFFEAE0 + DAFFE9DED7FFE7DBD4FFE5D9D1FFE3D7CFFFE2D4CCFFE1D2C9FFDFD0C7FFDDCD + C4FFDCCBC2FFDBC9BFFFDBC9BFFFDBC9BFFFDCCAC0FFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006157 + 4E7ED9C9BFFFF4EFEDFFEFE8E3FFD0C2B9FFDFD5CEFFE0D5CEFFE0D4CCFFDED3 + CBFFDDD1C8FFDCCFC6FFDACCC4FFD9CBC1FFD8C9BFFFD7C7BDFFD6C5BBFFD5C4 + B9FFD3C2B7FFD2C0B5FFD2BFB4FFD2BFB4FFDAC8BEFFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006256 + 4F7EDACCC0FFF5F2EFFFE5DDD9FF5C3821FFB0998AFFB8A394FFB8A394FFB9A3 + 94FFB8A495FFB9A597FFB9A698FFBAA698FFBBA799FFBBA89AFFBBA89BFFBCA8 + 9BFFBCA89BFFBCA89BFFBBA89AFFB49E8FFFD8C6BBFFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006256 + 4F7EDBCBC1FFF8F4F3FFE7E0DBFF5F3C24FFD0BDB2FFDCCBC1FFDDCCC3FFE2D2 + CBFFE7DBD4FFEDE2DEFFF0E8E6FFF5F0EDFFF9F7F4FFFDFDFDFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFAF8F7FFB39D8DFFD8C6BBFFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006256 + 4F7EDCCEC3FFFAF6F5FFE9E2DDFF5F3C24FFD2BFB5FFDFCDC4FFDECCC3FFE0CE + C6FFE4D4CDFFE9DDD6FFEFE4E0FFF1EAE8FFF7F1EFFFFBF8F6FFFFFEFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFCFBFAFFB5A090FFD9C7BEFFC1AD9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006257 + 4F7EDDCFC4FFFCF9F9FFE9E4E0FF5F3A23FF7C5D49FF7F5F4CFF7E5F4CFF7E60 + 4DFF7F614DFF816350FF826552FF836654FF846856FF856A57FF866B59FF876C + 5BFF876D5BFF876D5BFF866B59FF72523DFFD5C3B9FFC1AFA1FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006357 + 507EDECFC6FFFCFCFBFFF4F1F0FFC3B6AEFFC3B5ADFFC1B4ACFFC0B3AAFFBFB1 + A9FFBEB0A6FFBDAEA5FFBDACA3FFBCABA2FFBBAAA0FFBAA99FFFB8A69AFFB8A4 + 98FFB6A396FFB5A194FFB49F93FFB39D90FFDCCDC4FFC2AEA1FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006357 + 507EDFD2C7FFFEFEFDFFF9F5EFFFE8C696FFE9C799FFE8C697FFE7C596FFE7C4 + 95FFE6C394FFE5C293FFE4C091FFE4C090FFE3BF8FFFE2BD8CFFE9D5BFFFEBE1 + DCFFEADFD8FFE7DCD5FFE5DAD3FFE4D8D0FFE3D4CCFFC2AFA2FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006458 + 517EE0D3C8FFFFFFFFFFFAF5EFFFE3B77CFFE4B97FFFE2B87EFFE3B77DFFE2B7 + 7CFFE2B67BFFE1B57AFFE1B479FFE0B478FFE0B377FFDFB174FFE6D0B7FFEBE1 + DCFFE8DFD9FFE8DDD6FFE6D9D2FFE3D8D1FFE4D7CFFFC3AFA2FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006458 + 517EE1D2C9FFFFFFFFFFFEFEFDFFFEFFFFFFFCFDFEFFFBFBFBFFF9F7F8FFF8F5 + F6FFF7F3F2FFF5F1F0FFF4EFEEFFF1EDEBFFF0EBE9FFEEE9E6FFEDE6E2FFECE3 + DEFFEBE1DBFFE9DFD9FFE8DDD6FFE6DAD3FFE5D9D2FFC3B0A3FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006459 + 517EE1D4CAFFFFFFFFFFFDFDFCFFEEEBE8FFF5F2F0FFF4F0EFFFF3EFECFFF2ED + EAFFF1EBE8FFEEE9E5FFEFE7E3FFECE5E1FFEAE4DEFFEAE1DCFFE8E0DAFFE7DE + D8FFE6DDD6FFE5DBD4FFE4D8D1FFE2D6CEFFE6DBD4FFC3B1A4FF81634EFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006559 + 527EE2D4CAFFFFFFFFFFF0ECEAFF5B361EFFAB9383FFB39D8EFFB39D8DFFB39D + 8DFFB29D8DFFB29C8DFFB29C8CFFB29C8CFFB29C8CFFB29C8CFFB29C8CFFB29C + 8CFFB29C8CFFB29C8CFFB29C8DFFB39D8EFFE3D8D0FFC4B1A4FF81634EFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006559 + 527EE5D4CAFFFFFFFFFFF7F0EBFF5F3B24FFCCB8ADFFD7C5BAFFD9C7BDFFDCCC + C3FFE1D4CCFFE5DAD4FFE8E0DBFFEDE5E1FFF1EBE9FFF5F2EFFFF7F5F3FFF8F6 + F4FFF8F5F4FFF8F6F4FFF1EEEAFFB29C8DFFE6DAD3FFC4B2A5FF81634EFFB2A1 + 967E00000000000000000000000000000000000000000000000000000000685A + 527E9AC6C9FF35CFFEFF3DAEEBFF663E24FFD2BFB4FFE0CBBFFFE0C9BDFFE1CD + C4FFE4D5CDFFE9DED7FFEEE5E0FFF2EBE8FFF6F2F0FFFCF8F8FFFFFFFEFFFFFF + FFFFFFFFFFFFFFFFFFFFFCFAF9FFB49E8FFFE7DED7FFC5B3A6FF81634EFFB2A1 + 967E00000000000000000000000000000000007792910072A7A3001E33366957 + 4C7C86C1C8FF00BFFBFF079AEBFF6A3E23FF926D57FF5FA3C8FF4AC1E8FF6C9C + A2FF917260FF927767FF947A69FF957C6CFF977E6FFF998171FF9A8374FF9B85 + 76FF9C8678FF9C8678FF998274FF7D5E49FFE3D9D4FFC5B3A7FF81634EFFB2A1 + 967E00000000000000000000000000000000005A6F7000A9E5E40075AEAE5C90 + A5BD75D0E0FF00BFFAFF0CA3F4FF8A9A91FF3C7492FF03A4E4FF4AD5FFFF98C4 + CBFFB3A196FFB1A197FFB0A096FFB09F95FFAF9D92FFAF9C91FFAD9A8EFFAC99 + 8CFFAB988AFFAB9789FFAA9688FFA99386FFE8E0DAFFC5B4A7FF81634EFFB2A1 + 967E00000000000000000000000000000000000000002DA5BFC110C2FFFF4DD0 + FDFF64DBF9FF00B3FAFF09A8FEFF68D7FFFF04B5FFFF24CCFBFFAFD8CEFFF7DA + B8FFF3DBBBFFF3DBBAFFF2D9B9FFF1D8B7FFF0D7B4FFEED5B2FFF6EADDFFF9F6 + F4FFF7F3F1FFF5F1EEFFF5EFECFFF4EDEAFFF1EBE7FFC6B4A8FF81634EFFB2A1 + 967E00000000000000000000000000000000000000005F8A909142C7E4E960DE + F8FF64D7FAFF00B6FDFF00B8FDFF21B2FDFF1ECCF7FF93EBFCFFD2C69BFFE1AB + 63FFDFAC66FFDFAC66FFDFAC66FFDFAC66FFDFAC66FFDEA961FFEFDBC0FFF8F6 + F5FFF6F2F0FFF3EDEBFFECE2DCFFE9DFD9FFE5DBD6FFC2B1A4FF81634FFFB2A1 + 967E000000000000000000000000000E171A000E171A00040B145994A4A990EB + FCFF61F1F7FF13FAF7FF23F9F7FF93EDF7FF8CE5F8FFD5F2FDFFE9F8FFFFE7F8 + FFFFF0FCFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFDFEFFFFFAFAF9FFF9F7 + F5FFF7F2F0FFE8DFD8FFC7AE9FFFBEA998FFAF9888FFB09A8AFF7F604DFFB2A1 + 967E00000000000000000000000000AAFFFF00AAFFFF00AAFFFF00A4FFFF00CD + FAFF5DFCF9FFFFFFFFFFEEFEFEFF00FBF7FF00AAFEFF00A1FFFF00A1FFFF00A0 + FFFF56C3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFDFBFFFCFBFAFFFBFA + F8FFE6DDD6FFAA9180FF5D3922FF603D26FF613E27FF613E28FF634029FFB4A3 + 987E00000000000000000000000000CAFFFF00CAFFFF00CBFFFF00B0FFFF00CD + FBFF38F5F7FFC3EFFAFFF0FFFEFF00FAF7FF00C8F7FF00C2F7FF00C2F7FF00C1 + F7FF57D7FAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFEFFFDFDFCFFFCFC + FBFFE7DED8FFCCB9ACFFE6DBD5FFE2D7D0FFDCCFC5FFD7C5BBFF8E705DFFB4A2 + 9680000000000000000000000000002E383C002E383C00252F364C99B0B57DE8 + FBFF59F1F7FF25F7F7FF41FAF8FF7CEEF7FF77E4F7FFB5EFFCFFC6F2FDFFC3F2 + FDFFD9F6FCFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFEFEFFFEFE + FEFFE9E1DAFFCEBCAFFFF1E9E3FFEADFD8FFE4D5CCFF9D816FFF3A291F868985 + 831C00000000000000000000000000000000000000004E7073774AB0DADC37C9 + FBFF22D5F7FF00D3F9FF02C3FBFF37D5F7FF34BEFCFFA2E6FAFFECFBFDFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFF + FFFFEAE2DCFFCDBBADFFEADFD8FFE3D5CBFF9F8271FF3E2D2386050100200000 + 000000000000000000000000000000000000000000003E9CC4C219C0FFFF23C9 + FCFF30D3F8FF00BEF8FF06A8FEFF4FDCF8FF00B8FCFF32C2FBFFC0EBFCFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFEAE3DEFFCDB9ABFFDDCEC4FFA58979FF3E2C1F8F0905041B000000000000 + 000000000000000000000000000000000000003451510099DDDB0091C0C35DAD + BCCF76D7E9FF00BEF9FF10A9FBFFBDDEDEFF5AC8DDFF0AB5F7FF62CEFFFFCBE4 + F1FFF1E7E0FFEFE7E1FFEEE6E1FFEEE6E1FFEEE6E0FFEDE6E0FFEDE5E0FFEEE6 + E1FFE1D4CCFFC5AE9FFFA68D7FF53E2718A10402000E00000000000000000000 + 0000000000000000000000000000000000000075B7AF0099C7C500323E425442 + 3B5C6BA8B1DA00C1FCFF0EA1F3F8A98E80C0AB9081C12698B1C10088C4C14C85 + A3C1A18D80C19E8D81C19E8B81C19D8C80C19B8C7FC19B8A7FC19C897FC19A89 + 7EC19B8B7EC1897769C2432B1BAC000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000045565A00C5FFFF0094E6E2000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FFFFFFFFF0000007F0000007F0000007F000 + 0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000 + 0007F0000007F0000007F0000007F0000007F0000007F0000007800000078000 + 0007C0000007C000000700000007000000070000000700000007C000000FC000 + 001F8000003F800000FFF8FFFFFF} + Width = 450 + Left = 408 + Top = 80 + end end diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorRecibosCliente.pas b/Source/Modulos/Recibos de cliente/Views/uEditorRecibosCliente.pas index 9d2e0963..9672fd1d 100644 --- a/Source/Modulos/Recibos de cliente/Views/uEditorRecibosCliente.pas +++ b/Source/Modulos/Recibos de cliente/Views/uEditorRecibosCliente.pas @@ -44,8 +44,12 @@ type frViewRecibosCliente1: TfrViewRecibosCliente; JsPrevisualizarDialog: TJSDialog; JsImprimirDialog: TJSDialog; + JSInformesDialog: TJSDialog; + actInformes: TAction; + TBXItem38: TTBXItem; procedure FormShow(Sender: TObject); procedure actEliminarUpdate(Sender: TObject); + procedure actInformesExecute(Sender: TObject); private FRecibosCliente: IBizRecibosCliente; FController : IRecibosClienteController; @@ -74,8 +78,8 @@ type implementation uses - uDataModuleRecibosCliente, uDataModuleUsuarios, uFactuGES_App, - uGridUtils, uDBSelectionListUtils; + uDataModuleRecibosCliente, uDataModuleUsuarios, uFactuGES_App, + uGridUtils, uDBSelectionListUtils, uGestorInformesController; {$R *.dfm} @@ -89,6 +93,34 @@ begin (Sender as TAction).Enabled := (FRecibosCliente.SITUACION = CTE_PENDIENTE) AND (FRecibosCliente.ID_FACTURA < 1); end; +procedure TfEditorRecibosCliente.actInformesExecute(Sender: TObject); +var + Respuesta : Integer; + AGestorInformesController : IGestorInformesController; + +begin + AGestorInformesController := TGestorInformesController.Create; + try + + Respuesta := JsInformesDialog.Execute; + + if Respuesta <> IDCANCEL then + begin + case JsInformesDialog.CustomButtonResult of + 100 : begin // Listado de recibos pendientes + AGestorInformesController.VerInformeListadoRecibosCliPendientes; + end; + 200 : begin // Listado de recibos de cliente + AGestorInformesController.VerInformeListadoRecibosCliente; + end; + end; + end; + + finally + AGestorInformesController := NIL; + end; +end; + constructor TfEditorRecibosCliente.Create(AOwner: TComponent); begin inherited; diff --git a/Source/Servicios/FactuGES.RODL b/Source/Servicios/FactuGES.RODL index 65de1cce..2e8f8d2c 100644 --- a/Source/Servicios/FactuGES.RODL +++ b/Source/Servicios/FactuGES.RODL @@ -186,7 +186,7 @@ - + @@ -250,7 +250,7 @@ - + @@ -584,6 +584,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Servicios/FactuGES_Intf.pas b/Source/Servicios/FactuGES_Intf.pas index 2f326fbb..3b80262c 100644 --- a/Source/Servicios/FactuGES_Intf.pas +++ b/Source/Servicios/FactuGES_Intf.pas @@ -52,6 +52,7 @@ const IsrvComisiones_IID : TGUID = '{B600E9A1-28EC-484E-A74D-B5BB96FDF20A}'; IsrvProvinciasPoblaciones_IID : TGUID = '{C9925D63-0F5F-4546-8657-54F59FE51359}'; IsrvGestorDocumentos_IID : TGUID = '{A057EA3B-F714-4899-B6DA-1E4C8696ADC7}'; + IsrvGestorInformes_IID : TGUID = '{9ACA4D42-EA9A-4D2C-B233-19CD299EAE91}'; { Event ID's } @@ -86,6 +87,7 @@ type IsrvComisiones = interface; IsrvProvinciasPoblaciones = interface; IsrvGestorDocumentos = interface; + IsrvGestorInformes = interface; TRdxEmpresasArray = class; TIntegerArray = class; @@ -422,7 +424,7 @@ type { IsrvRecibosCliente } IsrvRecibosCliente = interface(IDataAbstractService) ['{3B68252A-EE6A-4D37-B250-93F2DB940DDF}'] - function GenerateReport(const ID: String): Binary; + function GenerateReport(const ListaID: TIntegerArray): Binary; end; { CosrvRecibosCliente } @@ -435,7 +437,7 @@ type protected function __GetInterfaceName:string; override; - function GenerateReport(const ID: String): Binary; + function GenerateReport(const ListaID: TIntegerArray): Binary; end; { IsrvRecibosProveedor } @@ -498,7 +500,7 @@ type { IsrvFacturasCliente } IsrvFacturasCliente = interface(IDataAbstractService) ['{56B4FFF0-AB1B-46B2-BA16-ABD5360F6311}'] - function GenerateReport(const FacturaID: String): Binary; + function GenerateReport(const FacturaID: TIntegerArray): Binary; end; { CosrvFacturasCliente } @@ -511,7 +513,7 @@ type protected function __GetInterfaceName:string; override; - function GenerateReport(const FacturaID: String): Binary; + function GenerateReport(const FacturaID: TIntegerArray): Binary; end; { IsrvFacturasProveedor } @@ -767,6 +769,67 @@ type function EliminarID(const Almacen: TRdxAlmacenes; const ID: Integer): Boolean; end; + { IsrvGestorInformes } + IsrvGestorInformes = interface(IDataAbstractService) + ['{9ACA4D42-EA9A-4D2C-B233-19CD299EAE91}'] + function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeIVAProveedores(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListadoIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasProv(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosProveedor(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + end; + + { CosrvGestorInformes } + CosrvGestorInformes = class + class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvGestorInformes; + end; + + { TsrvGestorInformes_Proxy } + TsrvGestorInformes_Proxy = class(TDataAbstractService_Proxy, IsrvGestorInformes) + protected + function __GetInterfaceName:string; override; + + function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeIVAProveedores(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListadoIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasProv(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoFacturasProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosProveedor(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoRecibosProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; + end; + implementation uses @@ -1472,12 +1535,12 @@ begin result := 'srvRecibosCliente'; end; -function TsrvRecibosCliente_Proxy.GenerateReport(const ID: String): Binary; +function TsrvRecibosCliente_Proxy.GenerateReport(const ListaID: TIntegerArray): Binary; begin try result := nil; __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerateReport'); - __Message.Write('ID', TypeInfo(String), ID, []); + __Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); __Message.Finalize; __TransportChannel.Dispatch(__Message); @@ -1596,12 +1659,12 @@ begin result := 'srvFacturasCliente'; end; -function TsrvFacturasCliente_Proxy.GenerateReport(const FacturaID: String): Binary; +function TsrvFacturasCliente_Proxy.GenerateReport(const FacturaID: TIntegerArray): Binary; begin try result := nil; __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerateReport'); - __Message.Write('FacturaID', TypeInfo(String), FacturaID, []); + __Message.Write('FacturaID', TypeInfo(FactuGES_Intf.TIntegerArray), FacturaID, []); __Message.Finalize; __TransportChannel.Dispatch(__Message); @@ -2180,6 +2243,273 @@ begin end end; +{ CosrvGestorInformes } + +class function CosrvGestorInformes.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvGestorInformes; +begin + result := TsrvGestorInformes_Proxy.Create(aMessage, aTransportChannel); +end; + +{ TsrvGestorInformes_Proxy } + +function TsrvGestorInformes_Proxy.__GetInterfaceName:string; +begin + result := 'srvGestorInformes'; +end; + +function TsrvGestorInformes_Proxy.GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +begin + try + result := nil; + __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeIVAClientes'); + __Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Write('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []); + __Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + __Message.Finalize; + + __TransportChannel.Dispatch(__Message); + + __Message.Read('Result', TypeInfo(Binary), result, []); + finally + __Message.UnsetAttributes(__TransportChannel); + __Message.FreeStream; + end +end; + +function TsrvGestorInformes_Proxy.GenerarInformeIVAProveedores(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +begin + try + result := nil; + __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeIVAProveedores'); + __Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Write('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []); + __Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + __Message.Finalize; + + __TransportChannel.Dispatch(__Message); + + __Message.Read('Result', TypeInfo(Binary), result, []); + finally + __Message.UnsetAttributes(__TransportChannel); + __Message.FreeStream; + end +end; + +function TsrvGestorInformes_Proxy.GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListadoIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +begin + try + result := nil; + __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoFacturasCli'); + __Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Write('ListadoIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListadoIDClientes, []); + __Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + __Message.Finalize; + + __TransportChannel.Dispatch(__Message); + + __Message.Read('Result', TypeInfo(Binary), result, []); + finally + __Message.UnsetAttributes(__TransportChannel); + __Message.FreeStream; + end +end; + +function TsrvGestorInformes_Proxy.GenerarInformeListadoFacturasProv(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +begin + try + result := nil; + __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoFacturasProv'); + __Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Write('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []); + __Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + __Message.Finalize; + + __TransportChannel.Dispatch(__Message); + + __Message.Read('Result', TypeInfo(Binary), result, []); + finally + __Message.UnsetAttributes(__TransportChannel); + __Message.FreeStream; + end +end; + +function TsrvGestorInformes_Proxy.GenerarInformeListadoFacturasCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +begin + try + result := nil; + __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoFacturasCliPendientes'); + __Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Write('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []); + __Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + __Message.Finalize; + + __TransportChannel.Dispatch(__Message); + + __Message.Read('Result', TypeInfo(Binary), result, []); + finally + __Message.UnsetAttributes(__TransportChannel); + __Message.FreeStream; + end +end; + +function TsrvGestorInformes_Proxy.GenerarInformeListadoFacturasProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +begin + try + result := nil; + __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoFacturasProvPendientes'); + __Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Write('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []); + __Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + __Message.Finalize; + + __TransportChannel.Dispatch(__Message); + + __Message.Read('Result', TypeInfo(Binary), result, []); + finally + __Message.UnsetAttributes(__TransportChannel); + __Message.FreeStream; + end +end; + +function TsrvGestorInformes_Proxy.GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +begin + try + result := nil; + __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoRecibosCliente'); + __Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Write('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []); + __Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + __Message.Finalize; + + __TransportChannel.Dispatch(__Message); + + __Message.Read('Result', TypeInfo(Binary), result, []); + finally + __Message.UnsetAttributes(__TransportChannel); + __Message.FreeStream; + end +end; + +function TsrvGestorInformes_Proxy.GenerarInformeListadoRecibosProveedor(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +begin + try + result := nil; + __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoRecibosProveedor'); + __Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Write('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []); + __Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + __Message.Finalize; + + __TransportChannel.Dispatch(__Message); + + __Message.Read('Result', TypeInfo(Binary), result, []); + finally + __Message.UnsetAttributes(__TransportChannel); + __Message.FreeStream; + end +end; + +function TsrvGestorInformes_Proxy.GenerarInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +begin + try + result := nil; + __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoRecibosCliPendientes'); + __Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Write('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []); + __Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + __Message.Finalize; + + __TransportChannel.Dispatch(__Message); + + __Message.Read('Result', TypeInfo(Binary), result, []); + finally + __Message.UnsetAttributes(__TransportChannel); + __Message.FreeStream; + end +end; + +function TsrvGestorInformes_Proxy.GenerarInformeListadoRecibosProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +begin + try + result := nil; + __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoRecibosProvPendientes'); + __Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Write('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []); + __Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + __Message.Finalize; + + __TransportChannel.Dispatch(__Message); + + __Message.Read('Result', TypeInfo(Binary), result, []); + finally + __Message.UnsetAttributes(__TransportChannel); + __Message.FreeStream; + end +end; + +function TsrvGestorInformes_Proxy.GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; +begin + try + result := nil; + __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeListadoPresupuestos'); + __Message.Write('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Write('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Write('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Write('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []); + __Message.Write('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Write('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + __Message.Finalize; + + __TransportChannel.Dispatch(__Message); + + __Message.Read('Result', TypeInfo(Binary), result, []); + finally + __Message.UnsetAttributes(__TransportChannel); + __Message.FreeStream; + end +end; + initialization RegisterROClass(TRdxLoginInfo); RegisterROClass(TRdxEmpresasArray); @@ -2213,6 +2543,7 @@ initialization RegisterProxyClass(IsrvComisiones_IID, TsrvComisiones_Proxy); RegisterProxyClass(IsrvProvinciasPoblaciones_IID, TsrvProvinciasPoblaciones_Proxy); RegisterProxyClass(IsrvGestorDocumentos_IID, TsrvGestorDocumentos_Proxy); + RegisterProxyClass(IsrvGestorInformes_IID, TsrvGestorInformes_Proxy); finalization @@ -2248,5 +2579,6 @@ finalization UnregisterProxyClass(IsrvComisiones_IID); UnregisterProxyClass(IsrvProvinciasPoblaciones_IID); UnregisterProxyClass(IsrvGestorDocumentos_IID); + UnregisterProxyClass(IsrvGestorInformes_IID); end. diff --git a/Source/Servicios/FactuGES_Invk.pas b/Source/Servicios/FactuGES_Invk.pas index 2c2892fa..8e3cfa57 100644 --- a/Source/Servicios/FactuGES_Invk.pas +++ b/Source/Servicios/FactuGES_Invk.pas @@ -230,6 +230,23 @@ type procedure Invoke_EliminarID(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); end; + TsrvGestorInformes_Invoker = class(TDataAbstractService_Invoker) + private + protected + published + procedure Invoke_GenerarInformeIVAClientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); + procedure Invoke_GenerarInformeIVAProveedores(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); + procedure Invoke_GenerarInformeListadoFacturasCli(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); + procedure Invoke_GenerarInformeListadoFacturasProv(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); + procedure Invoke_GenerarInformeListadoFacturasCliPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); + procedure Invoke_GenerarInformeListadoFacturasProvPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); + procedure Invoke_GenerarInformeListadoRecibosCliente(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); + procedure Invoke_GenerarInformeListadoRecibosProveedor(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); + procedure Invoke_GenerarInformeListadoRecibosCliPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); + procedure Invoke_GenerarInformeListadoRecibosProvPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); + procedure Invoke_GenerarInformeListadoPresupuestos(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); + end; + implementation uses @@ -426,17 +443,18 @@ end; { TsrvRecibosCliente_Invoker } procedure TsrvRecibosCliente_Invoker.Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerateReport(const ID: String): Binary; } +{ function GenerateReport(const ListaID: TIntegerArray): Binary; } var - ID: String; + ListaID: FactuGES_Intf.TIntegerArray; lResult: Binary; __lObjectDisposer: TROObjectDisposer; begin + ListaID := nil; lResult := nil; try - __Message.Read('ID', TypeInfo(String), ID, []); + __Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); - lResult := (__Instance as IsrvRecibosCliente).GenerateReport(ID); + lResult := (__Instance as IsrvRecibosCliente).GenerateReport(ListaID); __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvRecibosCliente', 'GenerateReportResponse'); __Message.Write('Result', TypeInfo(Binary), lResult, []); @@ -446,6 +464,7 @@ begin finally __lObjectDisposer := TROObjectDisposer.Create(__Instance); try + __lObjectDisposer.Add(ListaID); __lObjectDisposer.Add(lResult); finally __lObjectDisposer.Free(); @@ -546,15 +565,16 @@ end; { TsrvFacturasCliente_Invoker } procedure TsrvFacturasCliente_Invoker.Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerateReport(const FacturaID: String): Binary; } +{ function GenerateReport(const FacturaID: TIntegerArray): Binary; } var - FacturaID: String; + FacturaID: FactuGES_Intf.TIntegerArray; lResult: Binary; __lObjectDisposer: TROObjectDisposer; begin + FacturaID := nil; lResult := nil; try - __Message.Read('FacturaID', TypeInfo(String), FacturaID, []); + __Message.Read('FacturaID', TypeInfo(FactuGES_Intf.TIntegerArray), FacturaID, []); lResult := (__Instance as IsrvFacturasCliente).GenerateReport(FacturaID); @@ -566,6 +586,7 @@ begin finally __lObjectDisposer := TROObjectDisposer.Create(__Instance); try + __lObjectDisposer.Add(FacturaID); __lObjectDisposer.Add(lResult); finally __lObjectDisposer.Free(); @@ -1205,5 +1226,458 @@ begin end; end; +{ TsrvGestorInformes_Invoker } + +procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeIVAClientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); +{ function GenerarInformeIVAClientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; } +var + IdEmpresa: Integer; + FechaInicio: DateTime; + FechaFin: DateTime; + ListaIDClientes: FactuGES_Intf.TIntegerArray; + Desglosado: Boolean; + ImporteMinimo: Currency; + lResult: Binary; + __lObjectDisposer: TROObjectDisposer; +begin + ListaIDClientes := nil; + lResult := nil; + try + __Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Read('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []); + __Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + + lResult := (__Instance as IsrvGestorInformes).GenerarInformeIVAClientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo); + + __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeIVAClientesResponse'); + __Message.Write('Result', TypeInfo(Binary), lResult, []); + __Message.Finalize; + __Message.UnsetAttributes(__Transport); + + finally + __lObjectDisposer := TROObjectDisposer.Create(__Instance); + try + __lObjectDisposer.Add(ListaIDClientes); + __lObjectDisposer.Add(lResult); + finally + __lObjectDisposer.Free(); + end; + end; +end; + +procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeIVAProveedores(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); +{ function GenerarInformeIVAProveedores(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; } +var + IdEmpresa: Integer; + FechaInicio: DateTime; + FechaFin: DateTime; + ListaIDProveedores: FactuGES_Intf.TIntegerArray; + Desglosado: Boolean; + ImporteMinimo: Currency; + lResult: Binary; + __lObjectDisposer: TROObjectDisposer; +begin + ListaIDProveedores := nil; + lResult := nil; + try + __Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Read('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []); + __Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + + lResult := (__Instance as IsrvGestorInformes).GenerarInformeIVAProveedores(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo); + + __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeIVAProveedoresResponse'); + __Message.Write('Result', TypeInfo(Binary), lResult, []); + __Message.Finalize; + __Message.UnsetAttributes(__Transport); + + finally + __lObjectDisposer := TROObjectDisposer.Create(__Instance); + try + __lObjectDisposer.Add(ListaIDProveedores); + __lObjectDisposer.Add(lResult); + finally + __lObjectDisposer.Free(); + end; + end; +end; + +procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoFacturasCli(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); +{ function GenerarInformeListadoFacturasCli(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListadoIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; } +var + IdEmpresa: Integer; + FechaInicio: DateTime; + FechaFin: DateTime; + ListadoIDClientes: FactuGES_Intf.TIntegerArray; + Desglosado: Boolean; + ImporteMinimo: Currency; + lResult: Binary; + __lObjectDisposer: TROObjectDisposer; +begin + ListadoIDClientes := nil; + lResult := nil; + try + __Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Read('ListadoIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListadoIDClientes, []); + __Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + + lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoFacturasCli(IdEmpresa, FechaInicio, FechaFin, ListadoIDClientes, Desglosado, ImporteMinimo); + + __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoFacturasCliResponse'); + __Message.Write('Result', TypeInfo(Binary), lResult, []); + __Message.Finalize; + __Message.UnsetAttributes(__Transport); + + finally + __lObjectDisposer := TROObjectDisposer.Create(__Instance); + try + __lObjectDisposer.Add(ListadoIDClientes); + __lObjectDisposer.Add(lResult); + finally + __lObjectDisposer.Free(); + end; + end; +end; + +procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoFacturasProv(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); +{ function GenerarInformeListadoFacturasProv(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; } +var + IdEmpresa: Integer; + FechaInicio: DateTime; + FechaFin: DateTime; + ListaIDProveedores: FactuGES_Intf.TIntegerArray; + Desglosado: Boolean; + ImporteMinimo: Currency; + lResult: Binary; + __lObjectDisposer: TROObjectDisposer; +begin + ListaIDProveedores := nil; + lResult := nil; + try + __Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Read('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []); + __Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + + lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoFacturasProv(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo); + + __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoFacturasProvResponse'); + __Message.Write('Result', TypeInfo(Binary), lResult, []); + __Message.Finalize; + __Message.UnsetAttributes(__Transport); + + finally + __lObjectDisposer := TROObjectDisposer.Create(__Instance); + try + __lObjectDisposer.Add(ListaIDProveedores); + __lObjectDisposer.Add(lResult); + finally + __lObjectDisposer.Free(); + end; + end; +end; + +procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoFacturasCliPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); +{ function GenerarInformeListadoFacturasCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; } +var + IdEmpresa: Integer; + FechaInicio: DateTime; + FechaFin: DateTime; + ListaIDClientes: FactuGES_Intf.TIntegerArray; + Desglosado: Boolean; + ImporteMinimo: Currency; + lResult: Binary; + __lObjectDisposer: TROObjectDisposer; +begin + ListaIDClientes := nil; + lResult := nil; + try + __Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Read('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []); + __Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + + lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoFacturasCliPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo); + + __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoFacturasCliPendientesResponse'); + __Message.Write('Result', TypeInfo(Binary), lResult, []); + __Message.Finalize; + __Message.UnsetAttributes(__Transport); + + finally + __lObjectDisposer := TROObjectDisposer.Create(__Instance); + try + __lObjectDisposer.Add(ListaIDClientes); + __lObjectDisposer.Add(lResult); + finally + __lObjectDisposer.Free(); + end; + end; +end; + +procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoFacturasProvPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); +{ function GenerarInformeListadoFacturasProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; } +var + IdEmpresa: Integer; + FechaInicio: DateTime; + FechaFin: DateTime; + ListaIDProveedores: FactuGES_Intf.TIntegerArray; + Desglosado: Boolean; + ImporteMinimo: Currency; + lResult: Binary; + __lObjectDisposer: TROObjectDisposer; +begin + ListaIDProveedores := nil; + lResult := nil; + try + __Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Read('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []); + __Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + + lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoFacturasProvPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo); + + __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoFacturasProvPendientesResponse'); + __Message.Write('Result', TypeInfo(Binary), lResult, []); + __Message.Finalize; + __Message.UnsetAttributes(__Transport); + + finally + __lObjectDisposer := TROObjectDisposer.Create(__Instance); + try + __lObjectDisposer.Add(ListaIDProveedores); + __lObjectDisposer.Add(lResult); + finally + __lObjectDisposer.Free(); + end; + end; +end; + +procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoRecibosCliente(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); +{ function GenerarInformeListadoRecibosCliente(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; } +var + IdEmpresa: Integer; + FechaInicio: DateTime; + FechaFin: DateTime; + ListaIDClientes: FactuGES_Intf.TIntegerArray; + Desglosado: Boolean; + ImporteMinimo: Currency; + lResult: Binary; + __lObjectDisposer: TROObjectDisposer; +begin + ListaIDClientes := nil; + lResult := nil; + try + __Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Read('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []); + __Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + + lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoRecibosCliente(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo); + + __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoRecibosClienteResponse'); + __Message.Write('Result', TypeInfo(Binary), lResult, []); + __Message.Finalize; + __Message.UnsetAttributes(__Transport); + + finally + __lObjectDisposer := TROObjectDisposer.Create(__Instance); + try + __lObjectDisposer.Add(ListaIDClientes); + __lObjectDisposer.Add(lResult); + finally + __lObjectDisposer.Free(); + end; + end; +end; + +procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoRecibosProveedor(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); +{ function GenerarInformeListadoRecibosProveedor(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; } +var + IdEmpresa: Integer; + FechaInicio: DateTime; + FechaFin: DateTime; + ListaIDProveedores: FactuGES_Intf.TIntegerArray; + Desglosado: Boolean; + ImporteMinimo: Currency; + lResult: Binary; + __lObjectDisposer: TROObjectDisposer; +begin + ListaIDProveedores := nil; + lResult := nil; + try + __Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Read('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []); + __Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + + lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoRecibosProveedor(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo); + + __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoRecibosProveedorResponse'); + __Message.Write('Result', TypeInfo(Binary), lResult, []); + __Message.Finalize; + __Message.UnsetAttributes(__Transport); + + finally + __lObjectDisposer := TROObjectDisposer.Create(__Instance); + try + __lObjectDisposer.Add(ListaIDProveedores); + __lObjectDisposer.Add(lResult); + finally + __lObjectDisposer.Free(); + end; + end; +end; + +procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoRecibosCliPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); +{ function GenerarInformeListadoRecibosCliPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; } +var + IdEmpresa: Integer; + FechaInicio: DateTime; + FechaFin: DateTime; + ListaIDClientes: FactuGES_Intf.TIntegerArray; + Desglosado: Boolean; + ImporteMinimo: Currency; + lResult: Binary; + __lObjectDisposer: TROObjectDisposer; +begin + ListaIDClientes := nil; + lResult := nil; + try + __Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Read('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []); + __Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + + lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoRecibosCliPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo); + + __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoRecibosCliPendientesResponse'); + __Message.Write('Result', TypeInfo(Binary), lResult, []); + __Message.Finalize; + __Message.UnsetAttributes(__Transport); + + finally + __lObjectDisposer := TROObjectDisposer.Create(__Instance); + try + __lObjectDisposer.Add(ListaIDClientes); + __lObjectDisposer.Add(lResult); + finally + __lObjectDisposer.Free(); + end; + end; +end; + +procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoRecibosProvPendientes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); +{ function GenerarInformeListadoRecibosProvPendientes(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDProveedores: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; } +var + IdEmpresa: Integer; + FechaInicio: DateTime; + FechaFin: DateTime; + ListaIDProveedores: FactuGES_Intf.TIntegerArray; + Desglosado: Boolean; + ImporteMinimo: Currency; + lResult: Binary; + __lObjectDisposer: TROObjectDisposer; +begin + ListaIDProveedores := nil; + lResult := nil; + try + __Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Read('ListaIDProveedores', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDProveedores, []); + __Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + + lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoRecibosProvPendientes(IdEmpresa, FechaInicio, FechaFin, ListaIDProveedores, Desglosado, ImporteMinimo); + + __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoRecibosProvPendientesResponse'); + __Message.Write('Result', TypeInfo(Binary), lResult, []); + __Message.Finalize; + __Message.UnsetAttributes(__Transport); + + finally + __lObjectDisposer := TROObjectDisposer.Create(__Instance); + try + __lObjectDisposer.Add(ListaIDProveedores); + __lObjectDisposer.Add(lResult); + finally + __lObjectDisposer.Free(); + end; + end; +end; + +procedure TsrvGestorInformes_Invoker.Invoke_GenerarInformeListadoPresupuestos(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); +{ function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: DateTime; const FechaFin: DateTime; const ListaIDClientes: TIntegerArray; + const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; } +var + IdEmpresa: Integer; + FechaInicio: DateTime; + FechaFin: DateTime; + ListaIDClientes: FactuGES_Intf.TIntegerArray; + Desglosado: Boolean; + ImporteMinimo: Currency; + lResult: Binary; + __lObjectDisposer: TROObjectDisposer; +begin + ListaIDClientes := nil; + lResult := nil; + try + __Message.Read('IdEmpresa', TypeInfo(Integer), IdEmpresa, []); + __Message.Read('FechaInicio', TypeInfo(DateTime), FechaInicio, [paIsDateTime]); + __Message.Read('FechaFin', TypeInfo(DateTime), FechaFin, [paIsDateTime]); + __Message.Read('ListaIDClientes', TypeInfo(FactuGES_Intf.TIntegerArray), ListaIDClientes, []); + __Message.Read('Desglosado', TypeInfo(Boolean), Desglosado, []); + __Message.Read('ImporteMinimo', TypeInfo(Currency), ImporteMinimo, []); + + lResult := (__Instance as IsrvGestorInformes).GenerarInformeListadoPresupuestos(IdEmpresa, FechaInicio, FechaFin, ListaIDClientes, Desglosado, ImporteMinimo); + + __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvGestorInformes', 'GenerarInformeListadoPresupuestosResponse'); + __Message.Write('Result', TypeInfo(Binary), lResult, []); + __Message.Finalize; + __Message.UnsetAttributes(__Transport); + + finally + __lObjectDisposer := TROObjectDisposer.Create(__Instance); + try + __lObjectDisposer.Add(ListaIDClientes); + __lObjectDisposer.Add(lResult); + finally + __lObjectDisposer.Free(); + end; + end; +end; + initialization end. diff --git a/Source/Servicios/RODLFILE.res b/Source/Servicios/RODLFILE.res index 87d5d284..c2f7be36 100644 Binary files a/Source/Servicios/RODLFILE.res and b/Source/Servicios/RODLFILE.res differ diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES index 20923184..fd690993 100644 Binary files a/Source/Servidor/FactuGES_Server.RES and b/Source/Servidor/FactuGES_Server.RES differ diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr index 6ec4f12b..1f10dbda 100644 --- a/Source/Servidor/FactuGES_Server.dpr +++ b/Source/Servidor/FactuGES_Server.dpr @@ -128,7 +128,8 @@ uses schAlmacenesServer_Intf in '..\Modulos\Almacenes\Model\schAlmacenesServer_Intf.pas', srvGestorDocumentos_Impl in '..\Modulos\Gestion de documentos\Servidor\srvGestorDocumentos_Impl.pas' {srvGestorDocumentos: TDataAbstractService}, uStringsUtils in '..\Base\Utiles\uStringsUtils.pas', - uSistemaFunc in '..\Base\Utiles\uSistemaFunc.pas'; + uSistemaFunc in '..\Base\Utiles\uSistemaFunc.pas', + srvGestorInformes_Impl in '..\Modulos\Gestor de informes\Servidor\srvGestorInformes_Impl.pas' {srvGestorInformes: TDataAbstractService}; {$R *.res} {$R ..\Servicios\RODLFile.res} diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj index afd8852f..f0d1f393 100644 --- a/Source/Servidor/FactuGES_Server.dproj +++ b/Source/Servidor/FactuGES_Server.dproj @@ -144,6 +144,10 @@
srvGestorDocumentos
TDataAbstractService
+ +
srvGestorInformes
+ TDataAbstractService +
diff --git a/Source/Servidor/FactuGES_Server.rc b/Source/Servidor/FactuGES_Server.rc index b1cfa8d5..4da5dbef 100644 --- a/Source/Servidor/FactuGES_Server.rc +++ b/Source/Servidor/FactuGES_Server.rc @@ -16,7 +16,7 @@ BEGIN VALUE "FileVersion", "2.2.4.0\0" VALUE "ProductName", "FactuGES (Servidor)\0" VALUE "ProductVersion", "2.2.4.0\0" - VALUE "CompileDate", "jueves, 13 de noviembre de 2008 20:53\0" + VALUE "CompileDate", "viernes, 14 de noviembre de 2008 20:51\0" END END BLOCK "VarFileInfo" diff --git a/Source/Servidor/uDataModuleServer.dfm b/Source/Servidor/uDataModuleServer.dfm index 85e735dd..73d1659b 100644 --- a/Source/Servidor/uDataModuleServer.dfm +++ b/Source/Servidor/uDataModuleServer.dfm @@ -41,8 +41,8 @@ object dmServer: TdmServer Name = 'IBX' ConnectionString = 'IBX?Server=localhost;Database=C:\Codigo Acana\Output\Debug\Datab' + - 'ase\FactuGES.FDB;UserID=sysdba;Password=masterkey;Dialect=3;Char' + - 'set=ISO8859_1;' + 'ase\FactuGES_PRODUCCION.FDB;UserID=sysdba;Password=masterkey;Dia' + + 'lect=3;Charset=ISO8859_1;' ConnectionType = 'Interbase' Default = True end>