diff --git a/Build/Build.fbl6 b/Build/Build.fbl6 index 10d86ef..0e325ea 100644 Binary files a/Build/Build.fbl6 and b/Build/Build.fbl6 differ diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index 1d93673..59a3917 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -44,13 +44,6 @@ Package FalseTrueFalseLibreria base de FactuGESFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 - - - - - - - VCL for the Web Design Package for CodeGear RAD Studio CodeGear WebSnap Components CodeGear SOAP Components @@ -66,55 +59,55 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fConfigurarConexion
TForm diff --git a/Source/Base/Base.res b/Source/Base/Base.res index 8b251f3..1641339 100644 Binary files a/Source/Base/Base.res and b/Source/Base/Base.res differ diff --git a/Source/Base/Utiles/uSistemaFunc.pas b/Source/Base/Utiles/uSistemaFunc.pas index bc21f81..573611d 100644 --- a/Source/Base/Utiles/uSistemaFunc.pas +++ b/Source/Base/Utiles/uSistemaFunc.pas @@ -48,8 +48,10 @@ function GetSpecialFolderPath(folder : integer) : string; function PreguntarRuta(const ATitulo: String; const AComentario: String; var ARuta: String): Boolean; function PreguntarFicheroWordExportar (var Fichero : String) : Boolean; function PreguntarFicheroExcelExportar (var Fichero : String) : Boolean; +function PreguntarFicheroPDFExportar (var Fichero : String) : Boolean; function EscapeIllegalChars(AFileName: string): string; function FindFile(const filespec: TFileName; attributes: integer = faReadOnly Or faHidden Or faSysFile Or faArchive): TStringList; +function ExecAndWait(sCommandLine: string): Boolean; function DarRutaFichero(const ARutaIni: String; const AFichero: String; const ADirectorio1: String = ''; const ADirectorio2: String = ''): Variant; @@ -66,6 +68,34 @@ uses StdCtrls, SHFolder, cxShellBrowserDialog, cxLookAndFeels, uStringsUtils; +function ExecAndWait(sCommandLine: string): Boolean; +var + dwExitCode: DWORD; + tpiProcess: TProcessInformation; + tsiStartup: TStartupInfo; +begin + Result := False; + FillChar(tsiStartup, SizeOf(TStartupInfo), 0); + tsiStartup.cb := SizeOf(TStartupInfo); + if CreateProcess(nil, PChar(sCommandLine), nil, nil, False, 0, + nil, nil, tsiStartup, tpiProcess) then + begin + if WAIT_OBJECT_0 = WaitForSingleObject(tpiProcess.hProcess, INFINITE) then + begin + if GetExitCodeProcess(tpiProcess.hProcess, dwExitCode) then + begin + if dwExitCode = 0 then + Result := True + else + SetLastError(dwExitCode + $2000); + end; + end; + dwExitCode := GetLastError; + CloseHandle(tpiProcess.hProcess); + CloseHandle(tpiProcess.hThread); + SetLastError(dwExitCode); + end; +end; function GetSpecialFolderPath(folder : integer) : string; const @@ -465,6 +495,27 @@ begin end end; +function PreguntarFicheroPDFExportar (var Fichero : String) : Boolean; +var + DialogoSalvar : TSaveDialog; +begin + DialogoSalvar := TSaveDialog.Create(NIL); + try + with DialogoSalvar do + begin + DefaultExt := 'pdf'; + Filter := 'Documento pdf (*.pdf)|*.pdf'; + FileName := Fichero; + FilterIndex := 0; + Options := [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofEnableSizing]; + end; + Result := DialogoSalvar.Execute; + if Result then + Fichero := DialogoSalvar.FileName; + finally + DialogoSalvar.Free; + end; +end; procedure SetDefaultFonts(const AFont: TFont); diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj index 181cf4e..59645d9 100644 --- a/Source/Cliente/FactuGES.dproj +++ b/Source/Cliente/FactuGES.dproj @@ -52,7 +52,8 @@ Delphi.Personality VCLApplication -FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse2300FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.3.0.0FactuGES v2FactuGES v22.3.0.0 +FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse2310FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.3.1.0FactuGES v2FactuGES v22.3.1.0 + File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found FactuGES.dprFalse diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res index 5fcd81d..e891e0c 100644 Binary files a/Source/Cliente/FactuGES.res and b/Source/Cliente/FactuGES.res differ diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj index 84e7139..4cf8df4 100644 --- a/Source/GUIBase/GUIBase.dproj +++ b/Source/GUIBase/GUIBase.dproj @@ -58,34 +58,34 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fDialogBase
diff --git a/Source/Informes/1/firma_contrato.bat b/Source/Informes/1/firma_contrato.bat new file mode 100644 index 0000000..280cd00 --- /dev/null +++ b/Source/Informes/1/firma_contrato.bat @@ -0,0 +1,44 @@ +@ECHO off +title firmadocumento +cls + +set LOGFILE=D:\FactuGES2\Servidor\Informes\1\log_contrato.txt + +set ARCHIVO=%1 +set city=MADRID +set province=MADRID +set postalcode=28047 +set PositionOnPageLowerLeftX=30 +set PositionOnPageLowerLeftY=80 +set PositionOnPageUpperRightX=160 +set PositionOnPageUpperRigthY=200 +set signaturePage=1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 +set signatureRubricImage="D:\FactuGES2\Servidor\Informes\1\sello.jpg" +set layer2text="Firmado digitalmente por $$ORGANIZATION$$ Fecha: $$SIGNDATE=dd/MM/yyyy$$" +SET l2FontColor=black +SET l2FontSize=7 +SET l2FontFamily=1 +SET l2FontStyle=0 + +REM Asegura que autofirma no muestra ninguna GUI +set headless=true + +REM incluir únicamente el certificado del firmante +set "includeOnlySignningCertificate=true" + +REM Siempre creará una revisión al firmar. Requiere que el documento cumpla PDF 1.7 (ISO 32000-1:2008) +REM "alwaysCreateRevision=true" + +set "CONFIG=headless=%headless%\nlayer2Text=%layer2text%\nsignatureProductionCity=%city%\nsignatureProductionProvince=%province%\nsignatureProductionPostalCode=%postalcode%\nsignatureProductionCountry=ESPAÑA\nsignaturePositionOnPageLowerLeftX=%PositionOnPageLowerLeftX%\nsignaturePositionOnPageLowerLeftY=%PositionOnPageLowerLeftY%\nsignaturePositionOnPageUpperRightX=%PositionOnPageUpperRightX%\nsignaturePositionOnPageUpperRightY=%PositionOnPageUpperRigthY%\nsignaturePage=%signaturePage%\nincludeOnlySignningCertificate=true\nsignatureRubricImage=%signatureRubricImage%" + +REM echo %CONFIG% > %LOGFILE% +REM echo %ARCHIVO% > %LOGFILE% +echo %TEMP% > %LOGFILE% +rem echo %PASSCRIS% > %LOGFILE% + +call :FIRMA >> %LOGFILE% +exit /b + +:FIRMA +"C:\Program Files (x86)\AutoFirma\AutoFirma\AutoFirmaCommandLine.exe" sign -i %ARCHIVO% -o %ARCHIVO% -store pkcs12:"D:\FactuGES2\Servidor\PDFS\cert.pfx" -password %PASSACO% -filter subject.contains:4467 -config %CONFIG% + diff --git a/Source/Informes/1/firma_factura.bat b/Source/Informes/1/firma_factura.bat new file mode 100644 index 0000000..69545ca --- /dev/null +++ b/Source/Informes/1/firma_factura.bat @@ -0,0 +1,44 @@ +@ECHO off +title firmadocumento +cls + +set LOGFILE=D:\FactuGES2\Servidor\Informes\1\log_factura.txt + +set ARCHIVO=%1 +set city=MADRID +set province=MADRID +set postalcode=28047 +set PositionOnPageLowerLeftX=30 +set PositionOnPageLowerLeftY=80 +set PositionOnPageUpperRightX=160 +set PositionOnPageUpperRigthY=200 +set signaturePage=-1 +set signatureRubricImage="D:\FactuGES2\Servidor\Informes\1\sello.jpg" +set layer2text="Firmado digitalmente por $$ORGANIZATION$$ Fecha: $$SIGNDATE=dd/MM/yyyy$$" +SET l2FontColor=black +SET l2FontSize=7 +SET l2FontFamily=1 +SET l2FontStyle=0 + +REM Asegura que autofirma no muestra ninguna GUI +set headless=true + +REM incluir únicamente el certificado del firmante +set "includeOnlySignningCertificate=true" + +REM Siempre creará una revisión al firmar. Requiere que el documento cumpla PDF 1.7 (ISO 32000-1:2008) +REM "alwaysCreateRevision=true" + +set "CONFIG=headless=%headless%\nlayer2Text=%layer2text%\nsignatureProductionCity=%city%\nsignatureProductionProvince=%province%\nsignatureProductionPostalCode=%postalcode%\nsignatureProductionCountry=ESPAÑA\nsignaturePositionOnPageLowerLeftX=%PositionOnPageLowerLeftX%\nsignaturePositionOnPageLowerLeftY=%PositionOnPageLowerLeftY%\nsignaturePositionOnPageUpperRightX=%PositionOnPageUpperRightX%\nsignaturePositionOnPageUpperRightY=%PositionOnPageUpperRigthY%\nsignaturePage=-1\nincludeOnlySignningCertificate=true\nsignatureRubricImage=%signatureRubricImage%" + +REM echo %CONFIG% > %LOGFILE% +REM echo %ARCHIVO% > %LOGFILE% +echo %TEMP% > %LOGFILE% +rem echo %PASSCRIS% > %LOGFILE% + +call :FIRMA >> %LOGFILE% +exit /b + +:FIRMA +"C:\Program Files (x86)\AutoFirma\AutoFirma\AutoFirmaCommandLine.exe" sign -i %ARCHIVO% -o %ARCHIVO% -store pkcs12:"D:\FactuGES2\Servidor\PDFS\cert.pfx" -password %PASSACO% -filter subject.contains:4467 -config %CONFIG% + diff --git a/Source/Informes/1/sello.jpg b/Source/Informes/1/sello.jpg new file mode 100644 index 0000000..ae2da5b Binary files /dev/null and b/Source/Informes/1/sello.jpg differ diff --git a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas index ac06b98..c02962e 100644 --- a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas +++ b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas @@ -57,6 +57,8 @@ type procedure Preview(AContrato : IBizContratoCliente; AllItems: Boolean = false; AVerCondiciones: Boolean = false; const TamLetra: Integer = CTE_TamLetraIni); procedure Print(AContrato : IBizContratoCliente; AllItems: Boolean = false; AVerCondiciones: Boolean = false; const TamLetra: Integer = CTE_TamLetraIni); + procedure GenerarPDF(AContrato : IBizContratoCliente; AllItems: Boolean = false; AFirmado: Boolean = False); + procedure EnviarContratoPorEMail(AContrato : IBizContratoCliente); function CambiarSituacion(AContrato : IBizContratoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean = false): Boolean; function AsignarLOPD(AContratos: IBizContratoCliente): Boolean; @@ -136,6 +138,8 @@ type procedure Preview(AContrato : IBizContratoCliente; AllItems: Boolean = false; AVerCondiciones: Boolean = false; const TamLetra: Integer = CTE_TamLetraIni); procedure Print(AContrato : IBizContratoCliente; AllItems: Boolean = false; AVerCondiciones: Boolean = false; const TamLetra: Integer = CTE_TamLetraIni); + procedure GenerarPDF(AContrato : IBizContratoCliente; AllItems: Boolean = false; AFirmado: Boolean = False); + procedure EnviarContratoPorEMail(AContrato : IBizContratoCliente); function CambiarSituacion(AContrato : IBizContratoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean = false): Boolean; function AsignarLOPD(AContratos: IBizContratoCliente): Boolean; @@ -1209,6 +1213,63 @@ begin end; end; +procedure TContratosClienteController.GenerarPDF(AContrato: IBizContratoCliente; AllItems, AFirmado: Boolean); +var + AReportController : IContratosClienteReportController; + AFile : String; + bEliminado: Boolean; + ACausa: Variant; + +begin + if not Assigned(AContrato) then + raise Exception.Create ('Contrato no asignado (GenerarPDF)'); + + if AContrato.DataTable.Active then + AContrato.DataTable.Active := True; + + //En el caso de querer eliminar todos los items del objeto AAlbaran + if AllItems then + begin + with AContrato.DataTable do + begin + First; + while not EOF do + begin + AFile := EscapeIllegalChars(AContrato.REFERENCIA + ' - ' + AContrato.NOMBRE_CLIENTE); + if (not PreguntarFicheroPDFExportar(AFile)) then + Next + else + begin + ShowHourglassCursor; + try + AReportController := TContratosClienteReportController.Create; + AReportController.ExportToPDF(AContrato.ID, AFile, AFirmado); + finally + AReportController := NIL; + HideHourglassCursor; + end; + Next; + end; + end; + end; + end + else + begin + AFile := EscapeIllegalChars(AContrato.REFERENCIA + ' - ' + AContrato.NOMBRE_CLIENTE); + if (not PreguntarFicheroPDFExportar(AFile)) then + Exit; + + ShowHourglassCursor; + try + AReportController := TContratosClienteReportController.Create; + AReportController.ExportToPDF(AContrato.ID, AFile, AFirmado); + finally + AReportController := NIL; + HideHourglassCursor; + end; + end; +end; + function TContratosClienteController.GetClienteController: IClientesController; begin Result := FClienteController; diff --git a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas index 10d470b..cb57b37 100644 --- a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas +++ b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas @@ -12,8 +12,8 @@ type ['{FEF47B69-26A3-462A-AF6D-4B2073D4F9DC}'] procedure Preview(const AListaID : TIntegerList; AVerCondiciones: Boolean = false; const TamLetra: Integer = CTE_TamLetraIni); procedure Print(const AListaID : TIntegerList; AVerCondiciones: Boolean = false; const TamLetra: Integer = CTE_TamLetraIni); - function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean; - function getDataModule: IDataModuleContratosClienteReport; + function ExportToPDF(const AID: Integer; const AFileName : String = ''; const AFirmado: Boolean = False): Boolean; + function getDataModule: IDataModuleContratosClienteReport; property DataModule: IDataModuleContratosClienteReport read getDataModule; end; @@ -30,7 +30,7 @@ type procedure Preview(const AListaID : TIntegerList; AVerCondiciones: Boolean = false; const TamLetra: Integer = CTE_TamLetraIni); procedure Print(const AListaID : TIntegerList; AVerCondiciones: Boolean = false; const TamLetra: Integer = CTE_TamLetraIni); - function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean; + function ExportToPDF(const AID: Integer; const AFileName : String = ''; const AFirmado: Boolean = False): Boolean; end; @@ -62,8 +62,7 @@ begin inherited; end; -function TContratosClienteReportController.ExportToPDF(const AID: Integer; - const AFileName: String): Boolean; +function TContratosClienteReportController.ExportToPDF(const AID: Integer; const AFileName: String; const AFirmado: Boolean): Boolean; var AStream: Binary; begin @@ -73,7 +72,7 @@ begin ShowHourglassCursor; try - AStream := FDataModule.GetRptPDFContrato(AID); + AStream := FDataModule.GetRptPDFContrato(AID, false, AFirmado); try AStream.SaveToFile(AFileName); Result := True; diff --git a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas index 4504df5..f5f2160 100644 --- a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas @@ -47,7 +47,7 @@ type // Report function GetRptContratos(const AListaID: TIntegerList; AVerCondiciones: Boolean = false; const TamLetra: Integer = 9): Binary; - function GetRptPDFContrato(const AID: Integer; AVerCondiciones: Boolean = false): Binary; + function GetRptPDFContrato(const AID: Integer; AVerCondiciones: Boolean = false; const Firmado: Boolean = False): Binary; function GetAnosItems : TStringList; function GetContratosClienteBeneficios : IBizContratosClienteBeneficios; @@ -58,7 +58,7 @@ implementation {$R *.DFM} uses - cxControls, FactuGES_Intf, uDataModuleConexion, Dialogs, DataAbstract4_Intf, + cxControls, FactuGES_Intf, uFactuGES_App, uDataModuleConexion, Dialogs, DataAbstract4_Intf, uDataTableUtils, schContratosClienteClient_Intf, uBizContactos; { TdmContratosCliente } @@ -74,14 +74,14 @@ begin RORemoteService.Message := dmConexion.Message; end; -function TDataModuleContratosCliente.GetRptPDFContrato(const AID: Integer; AVerCondiciones: Boolean = false): Binary; +function TDataModuleContratosCliente.GetRptPDFContrato(const AID: Integer; AVerCondiciones: Boolean = false; const Firmado: Boolean = False): Binary; var AParam : TIntegerArray; begin AParam := TIntegerArray.Create; try AParam.Add(AID); - Result := (RORemoteService as IsrvContratosCliente).GenerarInformeEnPDF(AParam, AVerCondiciones) + Result := (RORemoteService as IsrvContratosCliente).GenerarInformeEnPDF(AParam, AVerCondiciones, AppFactuGES.UsuarioActivo.USERNAME, Firmado) finally FreeANDNIL(AParam) end; diff --git a/Source/Modulos/Contratos de cliente/Model/Data/uIDataModuleContratosClienteReport.pas b/Source/Modulos/Contratos de cliente/Model/Data/uIDataModuleContratosClienteReport.pas index 31375eb..947f167 100644 --- a/Source/Modulos/Contratos de cliente/Model/Data/uIDataModuleContratosClienteReport.pas +++ b/Source/Modulos/Contratos de cliente/Model/Data/uIDataModuleContratosClienteReport.pas @@ -9,7 +9,7 @@ type IDataModuleContratosClienteReport = interface ['{6AB7469B-842A-413E-AF33-9506477A9666}'] function GetRptContratos(const AListaID: TIntegerList; AVerCondiciones: Boolean = false; const TamLetra: Integer = 9): Binary; - function GetRptPDFContrato(const AID: Integer; AVerCondiciones: Boolean = false): Binary; + function GetRptPDFContrato(const AID: Integer; AVerCondiciones: Boolean = false; const Firmado: Boolean = False): Binary; end; implementation diff --git a/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas b/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas index 531c1df..c520476 100644 --- a/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas +++ b/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas @@ -9,13 +9,13 @@ const { Data table rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_Valores = '{8E9C5E5F-B1C4-40D2-844C-6818E0A71C41}'; - RID_Propiedades = '{10423127-9855-44C6-84D5-C2F5F30ABADC}'; - RID_ListaAnosContratos = '{EBCE4D2B-EED3-4477-AFB1-B628241320DE}'; - RID_ContratosClienteBeneficios = '{EDA1E900-8EED-454E-BDF5-4D354D61EBB5}'; - RID_ContratosCliente = '{C60CEDC1-9427-4DCE-821A-627672FAD176}'; - RID_TiposCapitulos = '{84075DE8-633F-4B18-A39B-B453DE08D5FD}'; - RID_ContratosCliente_Detalles = '{47A199B6-78E6-42EC-A6EF-C3A4A8939855}'; + RID_Valores = '{52B71EED-9363-4A19-B433-C4917CBE0490}'; + RID_Propiedades = '{28500097-0FDC-4DBF-8047-FF879A5DDC4A}'; + RID_ListaAnosContratos = '{587736A2-5CC2-48D3-B32A-E54D4E7E23B5}'; + RID_ContratosClienteBeneficios = '{C9C242F8-9818-4C50-B4F8-12D1F83C3682}'; + RID_ContratosCliente = '{25E7020F-9DCA-4458-BB59-6F80612DB958}'; + RID_TiposCapitulos = '{FF4FB40E-4BDD-4D49-8893-AEF4013E66C7}'; + RID_ContratosCliente_Detalles = '{893CDA38-9F05-42E6-A176-200846BFB3B4}'; { Data table names } nme_Valores = 'Valores'; @@ -261,7 +261,7 @@ const type { IValores } IValores = interface(IDAStronglyTypedDataTable) - ['{DE9A011D-6704-41A5-8170-8E1023E028A9}'] + ['{D4C72CBB-5A40-48B5-852D-1A61B100DFEB}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -320,7 +320,7 @@ type { IPropiedades } IPropiedades = interface(IDAStronglyTypedDataTable) - ['{75D8A850-AAAA-4A89-80D7-C3E1A0628CD2}'] + ['{F803D346-E489-4868-B0A3-F1C2E96E16B2}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -379,7 +379,7 @@ type { IListaAnosContratos } IListaAnosContratos = interface(IDAStronglyTypedDataTable) - ['{82CA0D96-396B-4640-A127-3A92D6D876E0}'] + ['{B9314FAD-1F9D-40AE-BA67-0D5AB968CB40}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -414,7 +414,7 @@ type { IContratosClienteBeneficios } IContratosClienteBeneficios = interface(IDAStronglyTypedDataTable) - ['{1ADAB916-C891-4BAE-9322-2FD39A6EAE85}'] + ['{EFDA00B5-AC6D-4E4E-A034-0AA20C0A990A}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -617,7 +617,7 @@ type { IContratosCliente } IContratosCliente = interface(IDAStronglyTypedDataTable) - ['{A40F5D4D-74B4-40B9-8AC3-36562B7A0880}'] + ['{F8022D8A-297E-4D9D-8AC6-B18A5C333FE6}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1327,7 +1327,7 @@ type } { ITiposCapitulos } ITiposCapitulos = interface(IDAStronglyTypedDataTable) - ['{E54DDB32-6949-47BA-95C2-5AB4013DFA97}'] + ['{B0A1870A-440A-4DA1-A1F7-BC9AD8D5F1A2}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1422,7 +1422,7 @@ type { IContratosCliente_Detalles } IContratosCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{D020E94C-7500-49D4-8605-8A0CD2F05A3F}'] + ['{0CF18EC5-18A6-409F-B07C-417A09924B1C}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); diff --git a/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas b/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas index 5301d8c..4cfdef4 100644 --- a/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas +++ b/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas @@ -9,18 +9,18 @@ const { Delta rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_ValoresDelta = '{B18B1C54-C567-4E9D-9F1C-EBF356EB9306}'; - RID_PropiedadesDelta = '{C1C489D2-F6B5-4233-8739-4BF728F9D0C8}'; - RID_ListaAnosContratosDelta = '{19C544EC-0104-4464-8453-55603B3A5316}'; - RID_ContratosClienteBeneficiosDelta = '{27648BA2-1AB1-47C4-93E4-148BE96C60FB}'; - RID_ContratosClienteDelta = '{B08191A8-1651-495D-82EB-4A90C31C4D2B}'; - RID_TiposCapitulosDelta = '{A3BF1E30-4BE1-4DBC-94A1-0EA20C2BD85E}'; - RID_ContratosCliente_DetallesDelta = '{FF4E0A9B-4339-4B2F-B1FF-D09CE86D6D01}'; + RID_ValoresDelta = '{2AA17EFC-B6ED-42C1-8998-4A61B38C6C9C}'; + RID_PropiedadesDelta = '{CFCEAC41-2605-4AB8-8708-9376886949CD}'; + RID_ListaAnosContratosDelta = '{3CF93616-7DEB-4108-BBF9-DF16A4F51DF1}'; + RID_ContratosClienteBeneficiosDelta = '{0B3B92D0-5683-4069-BCC9-BF13F3D32B81}'; + RID_ContratosClienteDelta = '{5972C7CE-C947-4BB7-ADA5-E24116CC4879}'; + RID_TiposCapitulosDelta = '{C2270A90-511B-4330-B083-2AB5AE7B2621}'; + RID_ContratosCliente_DetallesDelta = '{D393C1E6-380F-4806-9BE9-C4894A4D3E3E}'; type { IValoresDelta } IValoresDelta = interface(IValores) - ['{B18B1C54-C567-4E9D-9F1C-EBF356EB9306}'] + ['{2AA17EFC-B6ED-42C1-8998-4A61B38C6C9C}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_PROPIEDADValue : Integer; @@ -78,7 +78,7 @@ type { IPropiedadesDelta } IPropiedadesDelta = interface(IPropiedades) - ['{C1C489D2-F6B5-4233-8739-4BF728F9D0C8}'] + ['{CFCEAC41-2605-4AB8-8708-9376886949CD}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -136,7 +136,7 @@ type { IListaAnosContratosDelta } IListaAnosContratosDelta = interface(IListaAnosContratos) - ['{19C544EC-0104-4464-8453-55603B3A5316}'] + ['{3CF93616-7DEB-4108-BBF9-DF16A4F51DF1}'] { Property getters and setters } function GetOldANOValue : String; @@ -170,7 +170,7 @@ type { IContratosClienteBeneficiosDelta } IContratosClienteBeneficiosDelta = interface(IContratosClienteBeneficios) - ['{27648BA2-1AB1-47C4-93E4-148BE96C60FB}'] + ['{0B3B92D0-5683-4069-BCC9-BF13F3D32B81}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldREFERENCIAValue : String; @@ -372,7 +372,7 @@ type { IContratosClienteDelta } IContratosClienteDelta = interface(IContratosCliente) - ['{B08191A8-1651-495D-82EB-4A90C31C4D2B}'] + ['{5972C7CE-C947-4BB7-ADA5-E24116CC4879}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -1084,7 +1084,7 @@ type { ITiposCapitulosDelta } ITiposCapitulosDelta = interface(ITiposCapitulos) - ['{A3BF1E30-4BE1-4DBC-94A1-0EA20C2BD85E}'] + ['{C2270A90-511B-4330-B083-2AB5AE7B2621}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldPOSICIONValue : Integer; @@ -1178,7 +1178,7 @@ type { IContratosCliente_DetallesDelta } IContratosCliente_DetallesDelta = interface(IContratosCliente_Detalles) - ['{FF4E0A9B-4339-4B2F-B1FF-D09CE86D6D01}'] + ['{D393C1E6-380F-4806-9BE9-C4894A4D3E3E}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CONTRATOValue : Integer; diff --git a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm index 90b9c1c..4ba9434 100644 --- a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm +++ b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm @@ -1539,6 +1539,7 @@ object RptContratosCliente: TRptContratosCliente UseFileCache = True ShowProgress = False OverwritePrompt = False + EmbeddedFonts = True PrintOptimized = True Outline = False Background = False diff --git a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas index 7727d25..cc38f59 100644 --- a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas +++ b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas @@ -99,7 +99,7 @@ type procedure RecuperarNombresClientes; public function GenerarContrato(const ListaID : TIntegerArray; const VerCondiciones: Boolean; const TamLetra: Integer): Binary; - function GenerarContratoEnPDF(const ListaID : TIntegerArray; const VerCondiciones: Boolean): Binary; + function GenerarContratoEnPDF(const ListaID : TIntegerArray; const VerCondiciones: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; function GenerarInformeListadoContratos(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; end; @@ -137,7 +137,8 @@ begin frxDBDetalles.CloseDataSource := False; FListaNombresClientes := TStringList.Create; - + FTamLetra := 8; + with tbl_Detalles do begin MasterSource := DADSCapitulos; @@ -147,26 +148,44 @@ begin end; end; -function TRptContratosCliente.GenerarContratoEnPDF(const ListaID: TIntegerArray; const VerCondiciones: Boolean): Binary; +function TRptContratosCliente.GenerarContratoEnPDF(const ListaID: TIntegerArray; const VerCondiciones: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; var i: Integer; + AStream : Binary; + ARutaFichero, ANombreFichero, LlamadaBat : String; begin Result := Binary.Create; - - //Inicializamos parametros - FVerLogotipo := true; - FNombreEmpresa := ''; - FVerPrecios := true; - FVerTotales := true; - FVerCondiciones := VerCondiciones; - try - //Vamos generando todos y cada uno de los Contratos recibidos - for i := 0 to ListaID.Count - 1 do - _GenerarContrato(ListaID.Items[i]); + //Inicializamos parametros + FVerLogotipo := true; + FNombreEmpresa := ''; + FVerPrecios := true; + FVerTotales := true; + FVerCondiciones := VerCondiciones; - frxPDFExport1.Stream := Result; - frxReport.Export(frxPDFExport1) + //Vamos generando todos y cada uno de los presupuestos recibidos + for i := 0 to ListaID.Count - 1 do + begin + _GenerarContrato(ListaID.Items[i]); + ANombreFichero := frxReport.ReportOptions.Name + '_' + FormatDateTime('yyyymmdd_hhnnss_', now) + Usuario; + if Firmado then + ANombreFichero := ANombreFichero + 'firmado.pdf' + else + ANombreFichero := ANombreFichero + '.pdf'; + + ANombreFichero := DarRutaPDFS + EscapeIllegalChars(ANombreFichero); + frxPDFExport1.Stream := Result; + frxReport.Export(frxPDFExport1); + Result.SaveToFile(ANombreFichero); + + if Firmado then + begin + ARutaFichero := DarRutaFichero(DarRutaInformes, 'firma_contrato.bat ', IntToStr(FIdEmpresa)); + LlamadaBat := ARutaFichero + '"' + ANombreFichero + '"'; + if ExecAndWait(LlamadaBat) then + Result.LoadFromFile(ANombreFichero); + end; + end; finally end; end; @@ -558,6 +577,7 @@ begin tbl_DetallesArticulos.Active := True; + FIdEmpresa := tbl_Cabecera.FieldByName('ID_EMPRESA').AsInteger; AInforme := DarRutaFichero(DarRutaInformes, rptInforme, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString); if VarIsNull(AInforme) then raise Exception.Create (('Error Servidor: _GenerarContrato, no encuentra informe ' + rptInforme)); diff --git a/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.pas b/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.pas index 63b08e1..cd3291a 100644 --- a/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.pas +++ b/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.pas @@ -34,8 +34,7 @@ type protected { IsrvContratosCliente methods } function GenerarInforme(const ListaID: TIntegerArray; const VerCondiciones: Boolean; const TamLetra: Integer): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerCondiciones: Boolean): Binary; - + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerCondiciones: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; end; implementation @@ -90,13 +89,13 @@ begin end; end; -function TsrvContratosCliente.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerCondiciones: Boolean): Binary; +function TsrvContratosCliente.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerCondiciones: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; var AReportGenerator : TRptContratosCliente; begin AReportGenerator := TRptContratosCliente.Create(nil); try - Result := AReportGenerator.GenerarContratoEnPDF(ListaID, VerCondiciones); + Result := AReportGenerator.GenerarContratoEnPDF(ListaID, VerCondiciones, Usuario, Firmado); finally FreeAndNIL(AReportGenerator); end; diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm index e061a3f..2d3de69 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm @@ -3,7 +3,7 @@ inherited fEditorContratosCliente: TfEditorContratosCliente ClientHeight = 551 ClientWidth = 1119 ExplicitWidth = 1127 - ExplicitHeight = 595 + ExplicitHeight = 585 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader @@ -126,7 +126,7 @@ inherited fEditorContratosCliente: TfEditorContratosCliente Width = 1119 ExplicitWidth = 1119 inherited tbxMain: TTBXToolbar - ExplicitWidth = 1119 + ExplicitWidth = 982 object TBXSubmenuItem3: TTBXSubmenuItem [0] Caption = 'Nuevo' DisplayMode = nbdmImageAndText @@ -151,13 +151,17 @@ inherited fEditorContratosCliente: TfEditorContratosCliente inherited TBXItem2: TTBXItem Visible = False end - object TBXItem47: TTBXItem [13] + object TBXItem51: TTBXItem [13] + Action = actGenerarPDF + DisplayMode = nbdmImageAndText + end + object TBXItem47: TTBXItem [14] Action = actEnviarEMail DisplayMode = nbdmImageAndText end end inherited tbxFiltro: TTBXToolbar - ExplicitWidth = 535 + ExplicitWidth = 481 inherited lblAno: TTBXLabelItem Visible = True end @@ -194,11 +198,11 @@ inherited fEditorContratosCliente: TfEditorContratosCliente end end inherited TBXTMain2: TTBXToolbar - Left = 535 + Left = 481 DockPos = 343 Visible = True - ExplicitLeft = 535 - ExplicitWidth = 543 + ExplicitLeft = 481 + ExplicitWidth = 430 object TBXItem50: TTBXItem Action = actLOPD DisplayMode = nbdmImageAndText @@ -341,6 +345,13 @@ inherited fEditorContratosCliente: TfEditorContratosCliente OnExecute = actLOPDExecute OnUpdate = actLOPDUpdate end + object actGenerarPDF: TAction + Category = 'Acciones' + Caption = 'Generar PDF' + ImageIndex = 31 + OnExecute = actGenerarPDFExecute + OnUpdate = actGenerarPDFUpdate + end end inherited SmallImages: TPngImageList PngImages = < @@ -1193,6 +1204,29 @@ inherited fEditorContratosCliente: TfEditorContratosCliente A0BEE1E16734A0290000000049454E44AE426082} Name = 'PngImage30' Background = clWindow + end + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 610000000970485973000017120000171201679FD252000001F04944415478DA + 633CC0C0F09F0109C83939313CDAB70F5988C181818191C1600644DD850C4664 + 3946900162D7AEC1053872721838972E85F36F4A4A323818CC60A82CF062689F + B00DB7011C1C1C0C9C9C9C0CDFA3A31924B76E65F8F1E307184B7A6E64583825 + 99E1C69DE70C4B561C64F8F1F3EFC5D7EF7F78030D7A8A6280A0A020D890F7C1 + C10C826BD7824D17745C09D70C03627C2C0C959D5BBF000DD20019023640FDF9 + 7314CD201AE48DF7EFDF3368451D62F075D365D0D19265B872ED3198FEF3F90D + C3C2F597B7BEDA17EF0337000440CEC70694DE85810DD9BCEB32DC305878800D + 00853C08806CFDFEFD3B42674A0A38462E2FDACE90DBF7102CB4A0568361ED49 + 568663276F31BC3D98883000E66474F04A4B8BC1F6DF3F14B182CEDD0CF3363D + 66F87A3C8591B15842F33F0301D0F5EC2A0ABF6DC6368629EBDE3148311F6760 + 24A479F2A2EDFFB362DC19983E9D67B8BFDC98412AF402C3EC6DCF19E62DDD04 + 4907C41AF0772D1303AB453CC3FD2D0B197823BE307CFFF18BC13FA19A380372 + FC2480B61B3228DA3330DC3FC8C0C0E27E95E13B83284344663D7106787FF564 + 50F4896760F8BC90E1FD3B06860F9719183EDA3F61482A6C25CE00BD279E18E2 + CCEEF71872ABBA893320C4D30AE8E7DF0CDFBEFF66F8FAFD17C337A0FF41A0A8 + AE8F380360218E0D000074D3EB115697A8140000000049454E44AE426082} + Name = 'PngImage31' + Background = clWindow end> Bitmap = {} end diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas index 485aa70..b1448b3 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas @@ -59,6 +59,8 @@ type TBXSeparatorItem21: TTBXSeparatorItem; actLOPD: TAction; TBXItem50: TTBXItem; + actGenerarPDF: TAction; + TBXItem51: TTBXItem; procedure FormShow(Sender: TObject); procedure actGenerarAlbaranCliExecute(Sender: TObject); procedure actEliminarUpdate(Sender: TObject); @@ -92,6 +94,8 @@ type procedure actGenerarReciboCliUpdate(Sender: TObject); procedure actLOPDExecute(Sender: TObject); procedure actLOPDUpdate(Sender: TObject); + procedure actGenerarPDFExecute(Sender: TObject); + procedure actGenerarPDFUpdate(Sender: TObject); private procedure cambiarSituacion (const ASituacion: String); @@ -311,6 +315,54 @@ begin and (FContratos.SITUACION = SITUACION_CONTRATO_ACEPTADO); end; +procedure TfEditorContratosCliente.actGenerarPDFExecute(Sender: TObject); +var + ACadena : String; + AContratos: IBizContratoCliente; + AllItems: Boolean; + AListaCausas: TStringList; + AFirmar: Boolean; + +begin + inherited; + AContratos := Nil; + AFirmar := False; + AllItems := False; + AListaCausas := TStringList.Create; + + if MultiSelect and Assigned(ViewGrid) then + AllItems := (ViewGrid.NumSeleccionados > 1); + + if AllItems then + begin + SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Contratos as ISeleccionable).SelectedRecords); + AContratos := (Controller as IContratosClienteController).ExtraerSeleccionados(Contratos) as IBizContratoCliente; + + if (Application.MessageBox('¿Desea firmar digitalmente el/los contrato/s de cliente seleccionados?', 'Atención', MB_YESNO) = IDYES) then + AFirmar := True; + end + else + begin + AContratos := Contratos; + ACadena := '¿Desea firmar digitalmente este contrato a cliente?'; + + if (Application.MessageBox(PChar(ACadena), 'Atención', MB_YESNO) = IDYES) then + AFirmar := True; + end; + + FController.GenerarPDF(AContratos, AllItems, AFirmar); +end; + +procedure TfEditorContratosCliente.actGenerarPDFUpdate(Sender: TObject); +begin + inherited; + if HayDatos and Assigned(ViewGrid) then + (Sender as TAction).Enabled := ViewGrid.EsSeleccionCeldaDatos + and (ViewGrid.NumSeleccionados > 0) + else + (Sender as TAction).Enabled := False; +end; + procedure TfEditorContratosCliente.actGenerarPedidoProvExecute(Sender: TObject); var ACopiarDetalles: Boolean; diff --git a/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dproj b/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dproj index 698a727..59f2968 100644 --- a/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dproj +++ b/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.dproj @@ -49,15 +49,15 @@ MainSource - - - - - - - - - + + + + + + + + + diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas index 7fbf665..703247f 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas @@ -38,9 +38,10 @@ type function Duplicar(AFactura: IBizFacturaCliente): IBizFacturaCliente; function GenerarAbono(AFactura: IBizFacturaCliente): IBizFacturaCliente; - procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true); - procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true); + procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true); + procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true); procedure EnviarFacturaPorEMail(AFactura : IBizFacturaCliente); + procedure GenerarPDF(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AFirmado: Boolean = False); procedure RecalcularImportes(AFactura: IBizFacturaCliente); @@ -104,9 +105,10 @@ type function GenerarAbono(AFactura: IBizFacturaCliente): IBizFacturaCliente; procedure RecuperarCliente(AFactura : IBizFacturaCliente); - procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true); - procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true); + procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true); + procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true); procedure EnviarFacturaPorEMail(AFactura : IBizFacturaCliente); + procedure GenerarPDF(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AFirmado: Boolean = False); procedure RecalcularImportes(AFactura: IBizFacturaCliente); function EsModificable(AFactura: IBizFacturaCliente; var AComentario: Variant): Boolean; @@ -1328,7 +1330,7 @@ begin Result := AFactura; end; -procedure TFacturasClienteController.Preview(AFactura: IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true); +procedure TFacturasClienteController.Preview(AFactura: IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true); var AReportController : IFacturasClienteReportController; ID_Facturas: TIntegerList; @@ -1355,7 +1357,7 @@ begin else ID_Facturas.Add(AFactura.ID); - AReportController.Preview(ID_Facturas, AVerDatosCliente, AEmpresaAcota); + AReportController.Preview(ID_Facturas, AVerDatosCliente); finally AReportController := NIL; @@ -1363,7 +1365,7 @@ begin end; end; -procedure TFacturasClienteController.Print(AFactura: IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true); +procedure TFacturasClienteController.Print(AFactura: IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true); var AReportController : IFacturasClienteReportController; ID_Facturas: TIntegerList; @@ -1390,7 +1392,7 @@ begin else ID_Facturas.Add(AFactura.ID); - AReportController.Print(ID_Facturas, AVerDatosCliente, AEmpresaAcota); + AReportController.Print(ID_Facturas, AVerDatosCliente); finally AReportController := NIL; @@ -1418,6 +1420,63 @@ begin end; end; +procedure TFacturasClienteController.GenerarPDF(AFactura: IBizFacturaCliente; AllItems, AFirmado: Boolean); +var + AReportController : IFacturasClienteReportController; + AFile : String; + bEliminado: Boolean; + ACausa: Variant; + +begin + if not Assigned(AFactura) then + raise Exception.Create ('Factura no asignado (GenerarPDF)'); + + if AFactura.DataTable.Active then + AFactura.DataTable.Active := True; + + //En el caso de querer eliminar todos los items del objeto AAlbaran + if AllItems then + begin + with AFactura.DataTable do + begin + First; + while not EOF do + begin + AFile := EscapeIllegalChars(AFactura.REFERENCIA + ' - ' + AFactura.NOMBRE_CLIENTE); + if (not PreguntarFicheroPDFExportar(AFile)) then + Next + else + begin + ShowHourglassCursor; + try + AReportController := TFacturasClienteReportController.Create; + AReportController.ExportToPDF(AFactura.ID, AFile, AFirmado); + finally + AReportController := NIL; + HideHourglassCursor; + end; + Next; + end; + end; + end; + end + else + begin + AFile := EscapeIllegalChars(AFactura.REFERENCIA + ' - ' + AFactura.NOMBRE_CLIENTE); + if (not PreguntarFicheroPDFExportar(AFile)) then + Exit; + + ShowHourglassCursor; + try + AReportController := TFacturasClienteReportController.Create; + AReportController.ExportToPDF(AFactura.ID, AFile, AFirmado); + finally + AReportController := NIL; + HideHourglassCursor; + end; + end; +end; + procedure TFacturasClienteController.GenerarRecibos(AFactura: IBizFacturaCliente); var AFormasPagoController : IFormasPagoController; diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas index 5bfdc01..fdd2e0a 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas @@ -10,9 +10,9 @@ uses type IFacturasClienteReportController = interface(IControllerBase) ['{A0F41767-4FF6-4BAE-9FC9-894DD721D756}'] - procedure Preview(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true); - procedure Print(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true); - function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean; + procedure Preview(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true); + procedure Print(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true); + function ExportToPDF(const AID: Integer; const AFileName : String = ''; const AFirmado: Boolean = False): Boolean; end; TFacturasClienteReportController = class(TControllerBase, IFacturasClienteReportController) @@ -23,9 +23,9 @@ type constructor Create; override; destructor Destroy; override; - procedure Preview(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true); - procedure Print(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true); - function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean; + procedure Preview(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true); + procedure Print(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true); + function ExportToPDF(const AID: Integer; const AFileName : String = ''; const AFirmado: Boolean = False): Boolean; end; @@ -57,8 +57,7 @@ begin inherited; end; -function TFacturasClienteReportController.ExportToPDF(const AID: Integer; - const AFileName: String): Boolean; +function TFacturasClienteReportController.ExportToPDF(const AID: Integer; const AFileName: String; const AFirmado: Boolean): Boolean; var AStream: Binary; begin @@ -68,7 +67,7 @@ begin ShowHourglassCursor; try - AStream := FDataModule.GetRptPDFFactura(AID); + AStream := FDataModule.GetRptPDFFactura(AID, true, AFirmado); try AStream.SaveToFile(AFileName); Result := True; @@ -80,14 +79,14 @@ begin end; end; -procedure TFacturasClienteReportController.Preview(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true); +procedure TFacturasClienteReportController.Preview(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true); var AStream: Binary; AEditor : IEditorFacturasClientePreview; begin AEditor := NIL; - AStream := FDataModule.GetReport(AListaID, AVerDatosCliente, AEmpresaAcota); + AStream := FDataModule.GetReport(AListaID, AVerDatosCliente); try CreateEditor('EditorFacturasClientePreview', IEditorFacturasClientePreview, AEditor); if Assigned(AEditor) then @@ -105,7 +104,7 @@ begin end; end; -procedure TFacturasClienteReportController.Print(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true); +procedure TFacturasClienteReportController.Print(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true); var AStream: Binary; AEditor : IEditorFacturasClientePreview; @@ -113,7 +112,7 @@ begin AEditor := NIL; ShowHourglassCursor; try - AStream := FDataModule.GetReport(AListaID, AVerDatosCliente, AEmpresaAcota); + AStream := FDataModule.GetReport(AListaID, AVerDatosCliente); try CreateEditor('EditorFacturasClientePreview', IEditorFacturasClientePreview, AEditor); if Assigned(AEditor) then diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas index becfebb..3d0aff8 100644 --- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas @@ -33,8 +33,8 @@ type function NewItem : IBizFacturaCliente; // Report - function GetReport(const AListaID: TIntegerList; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true): Binary; - function GetRptPDFFactura(const AID: Integer; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true): Binary; + function GetReport(const AListaID: TIntegerList; AVerDatosCliente: Boolean = true): Binary; + function GetRptPDFFactura(const AID: Integer; AVerDatosCliente: Boolean = true; const Firmado: Boolean = False): Binary; end; implementation @@ -42,7 +42,7 @@ implementation {$R *.DFM} uses - FactuGES_Intf, uDataModuleConexion, uDataTableUtils, cxControls, + FactuGES_Intf, uFactuGES_App, uDataModuleConexion, uDataTableUtils, cxControls, schFacturasClienteClient_Intf, uBizContactos, Dialogs; { TdmPresupuestos } @@ -53,30 +53,30 @@ begin RORemoteService.Message := dmConexion.Message; end; -function TDataModuleFacturasCliente.GetReport(const AListaID: TIntegerList; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true): Binary; +function TDataModuleFacturasCliente.GetReport(const AListaID: TIntegerList; AVerDatosCliente: Boolean = true): Binary; var AParam : TIntegerArray; begin AParam := AListaID.ToIntegerArray; try - Result := (RORemoteService as IsrvFacturasCliente).GenerateReport(AParam, AVerDAtosCliente, AEmpresaAcota); + Result := (RORemoteService as IsrvFacturasCliente).GenerateReport(AParam, AVerDAtosCliente); finally FreeANDNIL(AParam); end; end; -function TDataModuleFacturasCliente.GetRptPDFFactura(const AID: Integer; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true): Binary; + +function TDataModuleFacturasCliente.GetRptPDFFactura(const AID: Integer; AVerDatosCliente: Boolean; const Firmado: Boolean): Binary; var AParam : TIntegerArray; begin AParam := TIntegerArray.Create; try AParam.Add(AID); - Result := (RORemoteService as IsrvFacturasCliente).GenerarInformeEnPDF(AParam, AVerDatosCliente, AEmpresaAcota) + Result := (RORemoteService as IsrvFacturasCliente).GenerarInformeEnPDF(AParam, AVerDatosCliente, AppFactuGES.UsuarioActivo.USERNAME, Firmado) finally FreeANDNIL(AParam) end; - end; function TDataModuleFacturasCliente.NewItem: IBizFacturaCliente; diff --git a/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas b/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas index efbcf99..6c692fc 100644 --- a/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas +++ b/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas @@ -8,8 +8,8 @@ uses type IDataModuleFacturasClienteReport = interface ['{F498AC70-AA38-4C06-B301-85A4AC0B210B}'] - function GetReport(const AListaID: TIntegerList; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true): Binary; - function GetRptPDFFactura(const AID: Integer; AVerDatosCliente: Boolean = true; AEmpresaAcota: Boolean = true): Binary; + function GetReport(const AListaID: TIntegerList; AVerDatosCliente: Boolean = true): Binary; + function GetRptPDFFactura(const AID: Integer; AVerDatosCliente: Boolean = true; const Firmado: Boolean = False): Binary; end; implementation diff --git a/Source/Modulos/Facturas de cliente/Model/FacturasCliente_model.dproj b/Source/Modulos/Facturas de cliente/Model/FacturasCliente_model.dproj index c93742d..e8ddf44 100644 --- a/Source/Modulos/Facturas de cliente/Model/FacturasCliente_model.dproj +++ b/Source/Modulos/Facturas de cliente/Model/FacturasCliente_model.dproj @@ -44,6 +44,8 @@ FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 + + RemObjects Pascal Script - RemObjects SDK 3.0 Integration EurekaLog 5.1.9 FacturasCliente_model.dpk
@@ -53,13 +55,13 @@ MainSource - - + + + - diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas index 8bb5d35..ce9e786 100644 --- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas +++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas @@ -9,9 +9,9 @@ const { Data table rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_ListaAnosFacturas = '{484D7187-CB40-476A-9513-05D56701D4B9}'; - RID_FacturasCliente = '{6D39955F-2046-48A8-A1A0-D1B462E5236E}'; - RID_FacturasCliente_Detalles = '{35F0CA37-6ADD-4C61-9D67-0466331C6F62}'; + RID_ListaAnosFacturas = '{01C99D6F-78B2-4E5F-B7F8-D9956D0AE8D4}'; + RID_FacturasCliente = '{78230E46-9D32-4F95-BED8-F15B9AE4D5F8}'; + RID_FacturasCliente_Detalles = '{01FA3B03-4B5B-4FB4-8724-A89BF09A75EF}'; { Data table names } nme_ListaAnosFacturas = 'ListaAnosFacturas'; @@ -171,7 +171,7 @@ const type { IListaAnosFacturas } IListaAnosFacturas = interface(IDAStronglyTypedDataTable) - ['{538ADACC-485C-464B-84AD-84ADBF7D37E2}'] + ['{80613B96-203D-4FEF-9621-DA0D5B02C3CD}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -206,7 +206,7 @@ type { IFacturasCliente } IFacturasCliente = interface(IDAStronglyTypedDataTable) - ['{45CA2939-6E07-4742-82AE-4698DB6B3A14}'] + ['{E065EEAD-79C9-48AA-8A3E-A7DD626FC162}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -877,7 +877,7 @@ type { IFacturasCliente_Detalles } IFacturasCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{75F87DDE-E13B-42B1-8550-89F45849D374}'] + ['{22259244-690D-4493-A734-5B3D8C2ECB2D}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas index fd64d93..fec22a4 100644 --- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas +++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas @@ -9,14 +9,14 @@ const { Delta rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_ListaAnosFacturasDelta = '{C9831765-1629-4325-A1FF-1FAE87FC82C2}'; - RID_FacturasClienteDelta = '{7FBCB9F2-5A0C-4C4C-9503-27624E85B1F2}'; - RID_FacturasCliente_DetallesDelta = '{E532A60C-1259-4F35-B997-18F37616D9FD}'; + RID_ListaAnosFacturasDelta = '{3852FAEA-64F2-4C8F-9FDF-E08A357F1861}'; + RID_FacturasClienteDelta = '{07651992-560F-432E-8583-EEEAAAA10E52}'; + RID_FacturasCliente_DetallesDelta = '{9385E500-5ECA-4B3A-8906-5660B5DB9309}'; type { IListaAnosFacturasDelta } IListaAnosFacturasDelta = interface(IListaAnosFacturas) - ['{C9831765-1629-4325-A1FF-1FAE87FC82C2}'] + ['{3852FAEA-64F2-4C8F-9FDF-E08A357F1861}'] { Property getters and setters } function GetOldANOValue : String; @@ -50,7 +50,7 @@ type { IFacturasClienteDelta } IFacturasClienteDelta = interface(IFacturasCliente) - ['{7FBCB9F2-5A0C-4C4C-9503-27624E85B1F2}'] + ['{07651992-560F-432E-8583-EEEAAAA10E52}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -721,7 +721,7 @@ type { IFacturasCliente_DetallesDelta } IFacturasCliente_DetallesDelta = interface(IFacturasCliente_Detalles) - ['{E532A60C-1259-4F35-B997-18F37616D9FD}'] + ['{9385E500-5ECA-4B3A-8906-5660B5DB9309}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_FACTURAValue : Integer; diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm index 525ae27..55b04dd 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm +++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm @@ -1699,6 +1699,7 @@ object RptFacturasCliente: TRptFacturasCliente UseFileCache = True ShowProgress = False OverwritePrompt = False + EmbeddedFonts = True PrintOptimized = True Outline = False Background = False diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas index 0112692..3fab7b4 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas +++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas @@ -52,7 +52,6 @@ type FImporteMinimo: Currency; FDesglosado : Boolean; FVerDatosCliente : Boolean; - FEmpresaAcota : Boolean; //Genera cada uno de los albaranes a imprimir procedure _GenerarFactura(const ID: integer); overload; @@ -64,8 +63,8 @@ type procedure RecuperarNombresClientes; public - function GenerarFactura(const ListaID : TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean = true): Binary; overload; - function GenerarFacturaEnPDF(const ListaID : TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean = true): Binary; + function GenerarFactura(const ListaID : TIntegerArray; const VerDatosCliente: Boolean): Binary; overload; + function GenerarFacturaEnPDF(const ListaID : TIntegerArray; const VerDatosCliente: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; function GenerarInformeIVA(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; function GenerarInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; function GenerarInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; @@ -109,14 +108,13 @@ begin FreeANDNIL(FListaNombresClientes); end; -function TRptFacturasCliente.GenerarFactura(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean = true): Binary; +function TRptFacturasCliente.GenerarFactura(const ListaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; var i: Integer; begin Result := Binary.Create; try FVerDatosCliente := VerDatosCliente; - FEmpresaAcota := EmpresaAcota; //Vamos generando todos y cada una de las facturas recibidas for i := 0 to ListaID.Count - 1 do @@ -127,21 +125,40 @@ begin end; end; -function TRptFacturasCliente.GenerarFacturaEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean = true): Binary; +function TRptFacturasCliente.GenerarFacturaEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; var i: Integer; + AStream : Binary; + ARutaFichero, ANombreFichero, LlamadaBat : String; begin Result := Binary.Create; try + //Inicializamos parametros FVerDatosCliente := VerDatosCliente; - FEmpresaAcota := EmpresaAcota; - + //Vamos generando todos y cada uno de los presupuestos recibidos for i := 0 to ListaID.Count - 1 do - _GenerarFactura(ListaID.Items[i]); + begin + _GenerarFactura(ListaID.Items[i]); + ANombreFichero := frxReport.ReportOptions.Name + '_' + FormatDateTime('yyyymmdd_hhnnss_', now) + Usuario; + if Firmado then + ANombreFichero := ANombreFichero + 'firmado.pdf' + else + ANombreFichero := ANombreFichero + '.pdf'; - frxPDFExport1.Stream := Result; - frxReport.Export(frxPDFExport1) + ANombreFichero := DarRutaPDFS + EscapeIllegalChars(ANombreFichero); + frxPDFExport1.Stream := Result; + frxReport.Export(frxPDFExport1); + Result.SaveToFile(ANombreFichero); + + if Firmado then + begin + ARutaFichero := DarRutaFichero(DarRutaInformes, 'firma_factura.bat ', IntToStr(FIdEmpresa)); + LlamadaBat := ARutaFichero + '"' + ANombreFichero + '"'; + if ExecAndWait(LlamadaBat) then + Result.LoadFromFile(ANombreFichero); + end; + end; finally end; end; @@ -638,10 +655,9 @@ begin tbl_Detalles.Active := True; tbl_Vencimientos.Active := True; - if FEmpresaAcota then - AInforme := DarRutaFichero(DarRutaInformes, rptFacturaCliente, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString, tbl_Cabecera.FieldByName('ID_TIENDA').AsString) - else - AInforme := DarRutaFichero(DarRutaInformes, rptFacturaClienteAlonsoySal, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString, tbl_Cabecera.FieldByName('ID_TIENDA').AsString); + FIdEmpresa := tbl_Cabecera.FieldByName('ID_EMPRESA').AsInteger; +// FIdTienda := tbl_Cabecera.FieldByName('ID_TIENDA').AsInteger; + AInforme := DarRutaFichero(DarRutaInformes, rptFacturaCliente, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString); //, tbl_Cabecera.FieldByName('ID_TIENDA').AsString); if VarIsNull(AInforme) then raise Exception.Create (('Error Servidor: _GenerarFactura, no encuentra informe ' + rptFacturaCliente)); diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas index 9ce0e45..8f9156e 100644 --- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas +++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas @@ -35,8 +35,8 @@ type private protected { IsrvFacturasCliente methods } - function GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean = true): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean = true): Binary; + function GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; end; implementation @@ -78,25 +78,25 @@ begin ConnectionName := dmServer.ConnectionName; end; -function TsrvFacturasCliente.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean = true): Binary; +function TsrvFacturasCliente.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; var AReportGenerator : TRptFacturasCliente; begin AReportGenerator := TRptFacturasCliente.Create(nil); try - Result := AReportGenerator.GenerarFacturaEnPDF(ListaID, VerDatosCliente, EmpresaAcota); + Result := AReportGenerator.GenerarFacturaEnPDF(ListaID, VerDatosCliente, Usuario, Firmado); finally FreeAndNIL(AReportGenerator); end; end; -function TsrvFacturasCliente.GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean = true): Binary; +function TsrvFacturasCliente.GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; var AReportGenerator : TRptFacturasCliente; begin AReportGenerator := TRptFacturasCliente.Create(nil); try - Result := AReportGenerator.GenerarFactura(FacturaID, VerDatosCliente, EmpresaAcota); + Result := AReportGenerator.GenerarFactura(FacturaID, VerDatosCliente); finally FreeAndNIL(AReportGenerator); end; diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm index b91a900..fd56f48 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm @@ -38,7 +38,7 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente Width = 640 ExplicitWidth = 640 inherited tbxMain: TTBXToolbar - ExplicitWidth = 632 + ExplicitWidth = 640 object TBXSubmenuItem2: TTBXSubmenuItem [0] Caption = 'Nuevo' DisplayMode = nbdmImageAndText @@ -56,7 +56,11 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente inherited TBXItem2: TTBXItem Visible = False end - object TBXItem41: TTBXItem [13] + object TBXItem45: TTBXItem [13] + Action = actGenerarPDF + DisplayMode = nbdmImageAndText + end + object TBXItem41: TTBXItem [14] Action = actEnviarMail DisplayMode = nbdmImageAndText end @@ -275,7 +279,6 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 640 - ExplicitTop = 75 ExplicitWidth = 640 inherited tbxBotones: TTBXToolbar Width = 630 @@ -375,6 +378,13 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente OnExecute = actLOPDExecute OnUpdate = actLOPDUpdate end + object actGenerarPDF: TAction + Category = 'Archivo' + Caption = 'Generar PDF' + ImageIndex = 29 + OnExecute = actGenerarPDFExecute + OnUpdate = actGenerarPDFUpdate + end end inherited SmallImages: TPngImageList [5] PngImages = < @@ -1184,6 +1194,29 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente 49454E44AE426082} Name = 'PngImage28' Background = clWindow + end + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 610000000970485973000017120000171201679FD252000001F04944415478DA + 633CC0C0F09F0109C83939313CDAB70F5988C181818191C1600644DD850C4664 + 3946900162D7AEC1053872721838972E85F36F4A4A323818CC60A82CF062689F + B00DB7011C1C1C0C9C9C9C0CDFA3A31924B76E65F8F1E307184B7A6E64583825 + 99E1C69DE70C4B561C64F8F1F3EFC5D7EF7F78030D7A8A6280A0A020D890F7C1 + C10C826BD7824D17745C09D70C03627C2C0C959D5BBF000DD20019023640FDF9 + 7314CD201AE48DF7EFDF3368451D62F075D365D0D19265B872ED3198FEF3F90D + C3C2F597B7BEDA17EF0337000440CEC70694DE85810DD9BCEB32DC305878800D + 00853C08806CFDFEFD3B42674A0A38462E2FDACE90DBF7102CB4A0568361ED49 + 568663276F31BC3D98883000E66474F04A4B8BC1F6DF3F14B182CEDD0CF3363D + 66F87A3C8591B15842F33F0301D0F5EC2A0ABF6DC6368629EBDE3148311F6760 + 24A479F2A2EDFFB362DC19983E9D67B8BFDC98412AF402C3EC6DCF19E62DDD04 + 4907C41AF0772D1303AB453CC3FD2D0B197823BE307CFFF18BC13FA19A380372 + FC2480B61B3228DA3330DC3FC8C0C0E27E95E13B83284344663D7106787FF564 + 50F4896760F8BC90E1FD3B06860F9719183EDA3F61482A6C25CE00BD279E18E2 + CCEEF71872ABBA893320C4D30AE8E7DF0CDFBEFF66F8FAFD17C337A0FF41A0A8 + AE8F380360218E0D000074D3EB115697A8140000000049454E44AE426082} + Name = 'PngImage29' + Background = clWindow end> Left = 395 Bitmap = {} diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas index 05e81c2..be879d9 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas @@ -45,6 +45,8 @@ type TBXItem43: TTBXItem; actLOPD: TAction; TBXItem44: TTBXItem; + actGenerarPDF: TAction; + TBXItem45: TTBXItem; procedure FormShow(Sender: TObject); procedure actEliminarUpdate(Sender: TObject); procedure actNuevaFacturaExecute(Sender: TObject); @@ -58,6 +60,8 @@ type procedure actLOPDExecute(Sender: TObject); procedure actLOPDUpdate(Sender: TObject); procedure actVerContratoExecute(Sender: TObject); + procedure actGenerarPDFExecute(Sender: TObject); + procedure actGenerarPDFUpdate(Sender: TObject); private FFacturas: IBizFacturaCliente; @@ -185,6 +189,58 @@ begin (Sender as TAction).Enabled := False; end; +procedure TfEditorFacturasCliente.actGenerarPDFExecute(Sender: TObject); +var + ACadena : String; + AFacturas: IBizFacturaCliente; + AllItems: Boolean; + AListaCausas: TStringList; + AFirmar: Boolean; + +begin + inherited; + AFacturas := Nil; + AFirmar := False; + AllItems := False; + AListaCausas := TStringList.Create; + + if MultiSelect and Assigned(ViewGrid) then + AllItems := (ViewGrid.NumSeleccionados > 1); + + if AllItems then + begin + SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Facturas as ISeleccionable).SelectedRecords); + AFacturas := (Controller as IFacturasClienteController).ExtraerSeleccionados(Facturas) as IBizFacturaCliente; + + if (Application.MessageBox('¿Desea firmar digitalmente las facturas/abonos de cliente seleccionados?', 'Atención', MB_YESNO) = IDYES) then + AFirmar := True; + end + else + begin + AFacturas := Facturas; + + if Facturas.TIPO = CTE_TIPO_FACTURA then + ACadena := '¿Desea firmar digitalmente esta factura de cliente?' + else + ACadena := '¿Desea firmar digitalmente este abono a cliente?'; + + if (Application.MessageBox(PChar(ACadena), 'Atención', MB_YESNO) = IDYES) then + AFirmar := True; + end; + + FController.GenerarPDF(AFacturas, AllItems, AFirmar); +end; + +procedure TfEditorFacturasCliente.actGenerarPDFUpdate(Sender: TObject); +begin + inherited; + if HayDatos and Assigned(ViewGrid) then + (Sender as TAction).Enabled := ViewGrid.EsSeleccionCeldaDatos + and (ViewGrid.NumSeleccionados > 0) + else + (Sender as TAction).Enabled := False; +end; + procedure TfEditorFacturasCliente.actInformesExecute(Sender: TObject); var Respuesta : Integer; diff --git a/Source/Servicios/FactuGES.RODL b/Source/Servicios/FactuGES.RODL index 3e94afd..ac3b761 100644 --- a/Source/Servicios/FactuGES.RODL +++ b/Source/Servicios/FactuGES.RODL @@ -304,8 +304,6 @@ - - @@ -316,7 +314,9 @@ - + + + @@ -937,6 +937,10 @@ + + + + diff --git a/Source/Servicios/FactuGES_Intf.pas b/Source/Servicios/FactuGES_Intf.pas index 31b0168..907fa0a 100644 --- a/Source/Servicios/FactuGES_Intf.pas +++ b/Source/Servicios/FactuGES_Intf.pas @@ -516,8 +516,8 @@ type { IsrvFacturasCliente } IsrvFacturasCliente = interface(IDataAbstractService) ['{56B4FFF0-AB1B-46B2-BA16-ABD5360F6311}'] - function GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean): Binary; + function GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; end; { CosrvFacturasCliente } @@ -530,8 +530,8 @@ type protected function __GetInterfaceName:string; override; - function GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean): Binary; + function GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; end; { IsrvFacturasProveedor } @@ -860,7 +860,7 @@ type IsrvContratosCliente = interface(IDataAbstractService) ['{ADBF1627-F507-4A0F-818E-38BAE28579B6}'] function GenerarInforme(const ListaID: TIntegerArray; const VerCondiciones: Boolean; const TamLetra: Integer): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerCondiciones: Boolean): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerCondiciones: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; end; { CosrvContratosCliente } @@ -874,7 +874,7 @@ type function __GetInterfaceName:string; override; function GenerarInforme(const ListaID: TIntegerArray; const VerCondiciones: Boolean; const TamLetra: Integer): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerCondiciones: Boolean): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerCondiciones: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; end; implementation @@ -1817,14 +1817,13 @@ begin result := 'srvFacturasCliente'; end; -function TsrvFacturasCliente_Proxy.GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean): Binary; +function TsrvFacturasCliente_Proxy.GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; begin try result := nil; __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerateReport'); __Message.Write('FacturaID', TypeInfo(FactuGES_Intf.TIntegerArray), FacturaID, []); __Message.Write('VerDatosCliente', TypeInfo(Boolean), VerDatosCliente, []); - __Message.Write('EmpresaAcota', TypeInfo(Boolean), EmpresaAcota, []); __Message.Finalize; __TransportChannel.Dispatch(__Message); @@ -1836,14 +1835,15 @@ begin end end; -function TsrvFacturasCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean): Binary; +function TsrvFacturasCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; begin try result := nil; __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnPDF'); __Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); __Message.Write('VerDatosCliente', TypeInfo(Boolean), VerDatosCliente, []); - __Message.Write('EmpresaAcota', TypeInfo(Boolean), EmpresaAcota, []); + __Message.Write('Usuario', TypeInfo(AnsiString), Usuario, []); + __Message.Write('Firmado', TypeInfo(Boolean), Firmado, []); __Message.Finalize; __TransportChannel.Dispatch(__Message); @@ -2799,13 +2799,15 @@ begin end end; -function TsrvContratosCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerCondiciones: Boolean): Binary; +function TsrvContratosCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerCondiciones: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; begin try result := nil; __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnPDF'); __Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); __Message.Write('VerCondiciones', TypeInfo(Boolean), VerCondiciones, []); + __Message.Write('Usuario', TypeInfo(AnsiString), Usuario, []); + __Message.Write('Firmado', TypeInfo(Boolean), Firmado, []); __Message.Finalize; __TransportChannel.Dispatch(__Message); diff --git a/Source/Servicios/FactuGES_Invk.pas b/Source/Servicios/FactuGES_Invk.pas index a37ec87..a3c9305 100644 --- a/Source/Servicios/FactuGES_Invk.pas +++ b/Source/Servicios/FactuGES_Invk.pas @@ -934,11 +934,10 @@ begin end; procedure TsrvFacturasCliente_Invoker.Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean): Binary; } +{ function GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; } var FacturaID: FactuGES_Intf.TIntegerArray; VerDatosCliente: Boolean; - EmpresaAcota: Boolean; lResult: Binary; __lObjectDisposer: TROObjectDisposer; begin @@ -947,9 +946,8 @@ begin try __Message.Read('FacturaID', TypeInfo(FactuGES_Intf.TIntegerArray), FacturaID, []); __Message.Read('VerDatosCliente', TypeInfo(Boolean), VerDatosCliente, []); - __Message.Read('EmpresaAcota', TypeInfo(Boolean), EmpresaAcota, []); - lResult := (__Instance as IsrvFacturasCliente).GenerateReport(FacturaID, VerDatosCliente, EmpresaAcota); + lResult := (__Instance as IsrvFacturasCliente).GenerateReport(FacturaID, VerDatosCliente); __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvFacturasCliente', 'GenerateReportResponse'); __Message.Write('Result', TypeInfo(Binary), lResult, []); @@ -968,11 +966,12 @@ begin end; procedure TsrvFacturasCliente_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const EmpresaAcota: Boolean): Binary; } +{ function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; } var ListaID: FactuGES_Intf.TIntegerArray; VerDatosCliente: Boolean; - EmpresaAcota: Boolean; + Usuario: AnsiString; + Firmado: Boolean; lResult: Binary; __lObjectDisposer: TROObjectDisposer; begin @@ -981,9 +980,10 @@ begin try __Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); __Message.Read('VerDatosCliente', TypeInfo(Boolean), VerDatosCliente, []); - __Message.Read('EmpresaAcota', TypeInfo(Boolean), EmpresaAcota, []); + __Message.Read('Usuario', TypeInfo(AnsiString), Usuario, []); + __Message.Read('Firmado', TypeInfo(Boolean), Firmado, []); - lResult := (__Instance as IsrvFacturasCliente).GenerarInformeEnPDF(ListaID, VerDatosCliente, EmpresaAcota); + lResult := (__Instance as IsrvFacturasCliente).GenerarInformeEnPDF(ListaID, VerDatosCliente, Usuario, Firmado); __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvFacturasCliente', 'GenerarInformeEnPDFResponse'); __Message.Write('Result', TypeInfo(Binary), lResult, []); @@ -2327,10 +2327,12 @@ begin end; procedure TsrvContratosCliente_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerCondiciones: Boolean): Binary; } +{ function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerCondiciones: Boolean; const Usuario: AnsiString; const Firmado: Boolean): Binary; } var ListaID: FactuGES_Intf.TIntegerArray; VerCondiciones: Boolean; + Usuario: AnsiString; + Firmado: Boolean; lResult: Binary; __lObjectDisposer: TROObjectDisposer; begin @@ -2339,8 +2341,10 @@ begin try __Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); __Message.Read('VerCondiciones', TypeInfo(Boolean), VerCondiciones, []); + __Message.Read('Usuario', TypeInfo(AnsiString), Usuario, []); + __Message.Read('Firmado', TypeInfo(Boolean), Firmado, []); - lResult := (__Instance as IsrvContratosCliente).GenerarInformeEnPDF(ListaID, VerCondiciones); + lResult := (__Instance as IsrvContratosCliente).GenerarInformeEnPDF(ListaID, VerCondiciones, Usuario, Firmado); __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvContratosCliente', 'GenerarInformeEnPDFResponse'); __Message.Write('Result', TypeInfo(Binary), lResult, []); diff --git a/Source/Servicios/RODLFile.res b/Source/Servicios/RODLFile.res index 497d97a..6ed873a 100644 Binary files a/Source/Servicios/RODLFile.res and b/Source/Servicios/RODLFile.res differ diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj index c570ce8..abd4a52 100644 --- a/Source/Servidor/FactuGES_Server.dproj +++ b/Source/Servidor/FactuGES_Server.dproj @@ -1,298 +1,302 @@ - + - - {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1} - FactuGES_Server.dpr - Debug - AnyCPU - DCC32 - ..\..\Output\Debug\Servidor\FactuGES_Server.exe - - - 7.0 - False - False - 0 - 3 - ..\..\Output\Release\Servidor - RELEASE - - - 7.0 - 3 - ..\..\Output\Debug\Servidor - DEBUG; - True - - - Delphi.Personality - - - FalseTrueFalseTrueFalse2300FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.3.0.0FactuGES v2(Servidor)2.3.0.0jueves, 25 de abril de 2024 17:41 - File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found - FactuGES_Server.dpr - - - - - MainSource - - - - - -
srvEjercicios
- TDataAbstractService -
- - - -
srvEmpresas
- TDARemoteService -
- -
srvProvinciasPoblaciones
- TRORemoteDataModule -
- - - - - - - - - - - -
srvAlbaranesCliente
- TDataAbstractService -
- - - - -
srvAlbaranesProveedor
- TDataAbstractService -
- - - -
srvAlmacenes
- TDARemoteService -
- - - - - - - -
RptComisiones
- TDataModule -
- -
srvComisiones
- TDataAbstractService -
- - - - -
srvContabilidad
- TDataAbstractService -
- - - - - - - -
RptListadosContactos
- TDataModule -
- -
srvContactos
- TDARemoteService -
- - - - -
RptContratosCliente
-
- -
srvContratosCliente
- TDataAbstractService -
- - - - -
RptFacturasCliente
- TDataModule -
- -
srvFacturasCliente
- TDataAbstractService -
- - - - -
RptFacturasProveedor
- TDataModule -
- -
srvFacturasProveedor
- TDataAbstractService -
- - - - - - - -
srvGestorDocumentos
- TDataAbstractService -
- -
srvGestorInformes
- TDataAbstractService -
- - - -
srvHistoricoMovimientos
- TDataAbstractService -
- - - -
srvInventario
- TDataAbstractService -
- - - - -
RptPedidosProveedor
- TDataModule -
- -
srvPedidosProveedor
- TDataAbstractService -
- - - - -
RptPresupuestosCliente
-
- -
srvPresupuestosCliente
- TDataAbstractService -
- - - - - -
RptRecibosCliente
- TDataModule -
- -
srvRecibosCliente
- TDataAbstractService -
- - - - - -
RptRecibosProveedor
- TDataModule -
- -
srvRecibosProveedor
- TDataAbstractService -
- - - -
srvReferencias
- TDataAbstractService -
- - - - -
srvRemesasCliente
- TDataAbstractService -
- - - - -
srvRemesasProveedor
- TDataAbstractService -
- - - - - - -
srvUnidadesMedida
- TDataAbstractService -
- - - -
srvConfiguracion
- TDataAbstractService -
- -
frConexionBD
- TFrame -
- -
frConfGeneral
- TFrame -
- -
fConfiguracion
- TForm -
- -
FrameConfiguracion
- TFrame -
- -
srvLogin
- TDARemoteService -
- -
fAcercaDe
-
- -
dmServer
- TDataModule -
- -
fServerForm
-
- - - - - - - - -
+ + {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1} + FactuGES_Server.dpr + Debug + AnyCPU + DCC32 + ..\..\Output\Debug\Servidor\FactuGES_Server.exe + + + 7.0 + False + False + 0 + 3 + ..\..\Output\Release\Servidor + RELEASE + + + 7.0 + 3 + ..\..\Output\Debug\Servidor + DEBUG; + True + + + Delphi.Personality + + +FalseTrueFalseTrueFalse2310FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.3.1.0FactuGES v2(Servidor)2.3.1.0lunes, 20 de mayo de 2024 18:10 + + + + + File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found + FactuGES_Server.dpr + + + + + MainSource + + + + + +
srvEjercicios
+ TDataAbstractService +
+ + + +
srvEmpresas
+ TDARemoteService +
+ +
srvProvinciasPoblaciones
+ TRORemoteDataModule +
+ + + + + + + + + + + +
srvAlbaranesCliente
+ TDataAbstractService +
+ + + + +
srvAlbaranesProveedor
+ TDataAbstractService +
+ + + +
srvAlmacenes
+ TDARemoteService +
+ + + + + + + +
RptComisiones
+ TDataModule +
+ +
srvComisiones
+ TDataAbstractService +
+ + + + +
srvContabilidad
+ TDataAbstractService +
+ + + + + + + +
RptListadosContactos
+ TDataModule +
+ +
srvContactos
+ TDARemoteService +
+ + + + +
RptContratosCliente
+
+ +
srvContratosCliente
+ TDataAbstractService +
+ + + + +
RptFacturasCliente
+ TDataModule +
+ +
srvFacturasCliente
+ TDataAbstractService +
+ + + + +
RptFacturasProveedor
+ TDataModule +
+ +
srvFacturasProveedor
+ TDataAbstractService +
+ + + + + + + +
srvGestorDocumentos
+ TDataAbstractService +
+ +
srvGestorInformes
+ TDataAbstractService +
+ + + +
srvHistoricoMovimientos
+ TDataAbstractService +
+ + + +
srvInventario
+ TDataAbstractService +
+ + + + +
RptPedidosProveedor
+ TDataModule +
+ +
srvPedidosProveedor
+ TDataAbstractService +
+ + + + +
RptPresupuestosCliente
+
+ +
srvPresupuestosCliente
+ TDataAbstractService +
+ + + + + +
RptRecibosCliente
+ TDataModule +
+ +
srvRecibosCliente
+ TDataAbstractService +
+ + + + + +
RptRecibosProveedor
+ TDataModule +
+ +
srvRecibosProveedor
+ TDataAbstractService +
+ + + +
srvReferencias
+ TDataAbstractService +
+ + + + +
srvRemesasCliente
+ TDataAbstractService +
+ + + + +
srvRemesasProveedor
+ TDataAbstractService +
+ + + + + + +
srvUnidadesMedida
+ TDataAbstractService +
+ + + +
srvConfiguracion
+ TDataAbstractService +
+ +
frConexionBD
+ TFrame +
+ +
frConfGeneral
+ TFrame +
+ +
fConfiguracion
+ TForm +
+ +
FrameConfiguracion
+ TFrame +
+ +
srvLogin
+ TDARemoteService +
+ +
fAcercaDe
+
+ +
dmServer
+ TDataModule +
+ +
fServerForm
+
+ + + + + + + + +