From 4d991d0e50b4d8dad36241a93827e95c6a697098 Mon Sep 17 00:00:00 2001 From: roberto Date: Tue, 6 Aug 2024 16:17:39 +0000 Subject: [PATCH] Version 4.0.0 - Firma digital de contratos y facturas, poder hacer plantillas git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@690 f4e31baf-9722-1c47-927c-6f952f962d4b --- Source/Base/Utiles/uSistemaFunc.pas | 51 +++++ Source/Cliente/FactuGES.dproj | 2 +- Source/Cliente/FactuGES.rc | 8 +- Source/Cliente/FactuGES.res | Bin 171984 -> 171984 bytes Source/GUIBase/GUIBase.dproj | 56 ++--- Source/Informes/5/1/InfContratoCliente.fr3 | 54 ++--- Source/Informes/5/1/InfPresupuestoCliente.fr3 | 10 +- Source/Informes/5/1/firma_contrato.bat | 48 +++++ Source/Informes/5/1/firma_factura.bat | 48 +++++ Source/Informes/5/1/sello.jpg | Bin 0 -> 14692 bytes Source/Informes/5/3/InfContratoCliente.fr3 | 12 +- Source/Informes/5/3/InfPresupuestoCliente.fr3 | 10 +- Source/Informes/5/3/firma_contrato.bat | 47 +++++ Source/Informes/5/3/firma_factura.bat | 47 +++++ Source/Informes/5/3/sello.jpg | Bin 0 -> 43665 bytes ...ormeListadoFacturasProveedorPendientes.fr3 | 44 ++-- ...oFacturasProveedorPendientesDesglosado.fr3 | 46 ++-- .../5/InformeListadoRecibosCliPendientes.fr3 | 36 ++-- ...eListadoRecibosCliPendientesDesglosado.fr3 | 36 ++-- .../5/InformeListadoRecibosCliente.fr3 | 38 ++-- ...InformeListadoRecibosClienteDesglosado.fr3 | 36 ++-- .../5/InformeListadoRecibosProvPendientes.fr3 | 36 ++-- ...ListadoRecibosProvPendientesDesglosado.fr3 | 38 ++-- .../5/InformeListadoRecibosProveedor.fr3 | 32 +-- ...formeListadoRecibosProveedorDesglosado.fr3 | 34 +-- .../Informes/6/{ => 1}/InfAlbaranCliente.fr3 | 0 .../Informes/6/{ => 1}/InfContratoCliente.fr3 | 54 ++--- .../Informes/6/{ => 1}/InfFacturaCliente.fr3 | 0 .../Informes/6/{ => 1}/InfPedidoProveedor.fr3 | 0 .../6/{ => 1}/InfPresupuestoCliente.fr3 | 10 +- .../Informes/6/{ => 1}/InfReciboCliente.fr3 | 0 Source/Informes/6/1/firma_contrato.bat | 48 +++++ Source/Informes/6/1/firma_factura.bat | 48 +++++ Source/Informes/6/1/sello.jpg | Bin 0 -> 14692 bytes Source/Informes/InfPresupuestoCliente.fr3 | 10 +- .../Model/uBizAlbaranClienteServer.pas | 6 +- .../Model/uBizAlbaranesCliente.pas | 5 +- .../Views/uViewAlbaranesCliente.dfm | 12 ++ .../Views/uViewAlbaranesCliente.pas | 25 +++ .../Model/uBizAlbaranProveedorServer.PAS | 6 +- .../Views/uViewAlbaranesProveedor.dfm | 10 + .../Views/uViewAlbaranesProveedor.pas | 25 +++ .../Controller/uContactosController.pas | 11 +- .../Contactos/Views/uViewVendedores.dfm | 26 +++ .../Contactos/Views/uViewVendedores.pas | 3 +- .../uContratosClienteController.pas | 87 ++++++++ .../uContratosClienteReportController.pas | 9 +- .../Data/ContratosCliente_data.dproj | 24 +-- .../Data/uDataModuleContratosCliente.dfm | 4 + .../Data/uDataModuleContratosCliente.pas | 9 +- .../uIDataModuleContratosClienteReport.pas | 2 +- .../Model/schContratosClienteClient_Intf.pas | 67 ++++-- .../Model/schContratosClienteServer_Intf.pas | 75 +++++-- .../Model/uBizContratosCliente.pas | 7 +- .../Model/uBizContratosClienteServer.pas | 8 +- .../Reports/uRptContratosCliente_Server.dfm | 20 +- .../Reports/uRptContratosCliente_Server.pas | 39 +++- .../Servidor/srvContratosCliente_Impl.dfm | 44 ++-- .../Servidor/srvContratosCliente_Impl.pas | 6 +- .../Views/uEditorContratoCliente.dfm | 88 ++++---- .../Views/uEditorContratoCliente.pas | 6 + .../Views/uEditorContratosCliente.dfm | 38 +++- .../Views/uEditorContratosCliente.pas | 82 +++++++- .../Views/uViewContratoCliente.dfm | 114 ++++++---- .../Views/uViewContratoCliente.pas | 2 + .../Views/uViewContratosCliente.dfm | 12 ++ .../Views/uViewContratosCliente.pas | 1 + .../Controller/uFacturasClienteController.pas | 86 +++++++- .../uFacturasClienteReportController.pas | 9 +- .../Data/uDataModuleFacturasCliente.pas | 9 +- .../FacturasCliente_Group.groupproj | 24 +-- .../uIDataModuleFacturasClienteReport.pas | 2 +- .../Model/schFacturasClienteClient_Intf.pas | 12 +- .../Model/schFacturasClienteServer_Intf.pas | 12 +- .../Model/uBizFacturasCliente.pas | 5 +- .../Model/uBizFacturasClienteServer.pas | 13 +- .../Reports/uRptFacturasCliente_Server.dfm | 74 ++++--- .../Reports/uRptFacturasCliente_Server.pas | 47 ++++- .../Servidor/srvFacturasCliente_Impl.dfm | 43 ++-- .../Servidor/srvFacturasCliente_Impl.pas | 7 +- .../Views/FacturasCliente_view.dproj | 78 +++---- .../Views/uEditorFacturaCliente.dfm | 7 +- .../Views/uEditorFacturasCliente.dfm | 48 ++++- .../Views/uEditorFacturasCliente.pas | 68 +++++- .../Views/uViewFacturaCliente.dfm | 33 +-- .../Views/uViewFacturasCliente.dfm | 8 + .../Views/uViewFacturasCliente.pas | 23 +- .../Model/uBizFacturasProveedorServer.pas | 2 +- .../Views/uViewFacturasProveedor.dfm | 10 + .../Views/uViewFacturasProveedor.pas | 25 +++ .../uPedidosProveedorController.pas | 28 +++ .../Model/uBizPedidosProveedor.pas | 8 - .../Model/uBizPedidosProveedorServer.pas | 6 +- .../Views/PedidosProveedor_view.dproj | 44 ++-- .../Views/uEditorPedidoProveedor.dfm | 101 --------- .../Views/uEditorPedidoProveedor.pas | 6 +- .../uPresupuestosClienteController.pas | 32 ++- .../Data/uDataModulePresupuestosCliente.dfm | 4 + .../schPresupuestosClienteClient_Intf.pas | 59 ++++-- .../schPresupuestosClienteServer_Intf.pas | 67 ++++-- .../Model/uBizPresupuestosCliente.pas | 9 +- .../Model/uBizPresupuestosClienteServer.pas | 6 +- .../PresupuestosCliente_Group.groupproj | 16 +- .../uRptPresupuestosCliente_Server.dfm | 17 +- .../Servidor/srvPresupuestosCliente_Impl.dfm | 42 +++- .../Views/uEditorPresupuestoCliente.dfm | 199 ++++++------------ .../Views/uEditorPresupuestoCliente.pas | 7 +- .../Views/uEditorPresupuestosCliente.dfm | 4 +- .../Views/uEditorPresupuestosCliente.pas | 24 +++ .../Views/uViewPresupuestoCliente.dfm | 145 ++++++++----- .../Views/uViewPresupuestoCliente.pas | 6 +- .../Views/uViewPresupuestosCliente.dfm | 11 + .../Views/uViewPresupuestosCliente.pas | 10 + .../Reports/uRptRecibosCliente_Server.dfm | 26 ++- .../Views/uViewRecibosCliente.dfm | 34 ++- .../Views/uViewRecibosCliente.pas | 25 +++ .../Reports/uRptRecibosProveedor_Server.dfm | 26 ++- .../Views/uViewRecibosProveedor.dfm | 14 ++ .../Views/uViewRecibosProveedor.pas | 27 +++ Source/Servicios/FactuGES.RODL | 8 + Source/Servicios/FactuGES_Intf.pas | 16 +- Source/Servicios/FactuGES_Invk.pas | 16 +- Source/Servicios/RODLFile.res | Bin 45872 -> 46166 bytes Source/Servidor/FactuGES_Server.dpr | 12 +- Source/Servidor/FactuGES_Server.dproj | 3 +- Source/Servidor/FactuGES_Server.rc | 10 +- Source/Servidor/FactuGES_Server.res | Bin 23348 -> 23348 bytes Source/Servidor/uDataModuleServer.pas | 6 + 128 files changed, 2455 insertions(+), 1076 deletions(-) create mode 100644 Source/Informes/5/1/firma_contrato.bat create mode 100644 Source/Informes/5/1/firma_factura.bat create mode 100644 Source/Informes/5/1/sello.jpg create mode 100644 Source/Informes/5/3/firma_contrato.bat create mode 100644 Source/Informes/5/3/firma_factura.bat create mode 100644 Source/Informes/5/3/sello.jpg rename Source/Informes/6/{ => 1}/InfAlbaranCliente.fr3 (100%) rename Source/Informes/6/{ => 1}/InfContratoCliente.fr3 (96%) rename Source/Informes/6/{ => 1}/InfFacturaCliente.fr3 (100%) rename Source/Informes/6/{ => 1}/InfPedidoProveedor.fr3 (100%) rename Source/Informes/6/{ => 1}/InfPresupuestoCliente.fr3 (99%) rename Source/Informes/6/{ => 1}/InfReciboCliente.fr3 (100%) create mode 100644 Source/Informes/6/1/firma_contrato.bat create mode 100644 Source/Informes/6/1/firma_factura.bat create mode 100644 Source/Informes/6/1/sello.jpg diff --git a/Source/Base/Utiles/uSistemaFunc.pas b/Source/Base/Utiles/uSistemaFunc.pas index bc21f81a..573611df 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 e5c0088e..fad65b67 100644 --- a/Source/Cliente/FactuGES.dproj +++ b/Source/Cliente/FactuGES.dproj @@ -52,7 +52,7 @@ Delphi.Personality VCLApplication -FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse3670FalseFalseFalseFalseFalse30821252Rodax Software S.L.3.6.7.0FactuGESFactuGES3.6.7.0 +FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse4000FalseFalseFalseFalseFalse30821252Rodax Software S.L.4.0.0.0FactuGESFactuGES4.0.0.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.rc b/Source/Cliente/FactuGES.rc index 75046c1c..ed07e0c0 100644 --- a/Source/Cliente/FactuGES.rc +++ b/Source/Cliente/FactuGES.rc @@ -1,7 +1,7 @@ MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Factuges.ico" 1 VERSIONINFO -FILEVERSION 3,6,7,0 -PRODUCTVERSION 3,6,7,0 +FILEVERSION 4,0,0,0 +PRODUCTVERSION 4,0,0,0 FILEFLAGSMASK 0x3FL FILEFLAGS 0x00L FILEOS 0x40004L @@ -13,10 +13,10 @@ BEGIN BLOCK "0C0A04E4" BEGIN VALUE "CompanyName", "Rodax Software S.L.\0" - VALUE "FileVersion", "3.6.7.0\0" + VALUE "FileVersion", "4.0.0.0\0" VALUE "InternalName", "FactuGES\0" VALUE "ProductName", "FactuGES\0" - VALUE "ProductVersion", "3.6.7.0\0" + VALUE "ProductVersion", "4.0.0.0\0" END END BLOCK "VarFileInfo" diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res index eb60ce570c4d5a9521e0f53137b0b5e628319c57..96e35ec425ed373dd255afe84dff578e2e3fbdfd 100644 GIT binary patch delta 64 zcmcbxpX MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fDialogBase
diff --git a/Source/Informes/5/1/InfContratoCliente.fr3 b/Source/Informes/5/1/InfContratoCliente.fr3 index 77fb8809..3d1fa07d 100644 --- a/Source/Informes/5/1/InfContratoCliente.fr3 +++ b/Source/Informes/5/1/InfContratoCliente.fr3 @@ -1,23 +1,23 @@ - + - + - + - + - - - - + + + + @@ -29,41 +29,41 @@ - + - + - - - - - - + + + + + + - + - + - + - + - + - - - + + + - + - + @@ -78,7 +78,7 @@ - + diff --git a/Source/Informes/5/1/InfPresupuestoCliente.fr3 b/Source/Informes/5/1/InfPresupuestoCliente.fr3 index 14390a5e..c9130051 100644 --- a/Source/Informes/5/1/InfPresupuestoCliente.fr3 +++ b/Source/Informes/5/1/InfPresupuestoCliente.fr3 @@ -1,15 +1,15 @@ - + - - - + + + - + diff --git a/Source/Informes/5/1/firma_contrato.bat b/Source/Informes/5/1/firma_contrato.bat new file mode 100644 index 00000000..c438dda4 --- /dev/null +++ b/Source/Informes/5/1/firma_contrato.bat @@ -0,0 +1,48 @@ +@ECHO off +title firmadocumento +cls + +set LOGFILE=D:\Rodax\Servidor\Informes\5\1\log_factura.txt + +set ARCHIVO=%1 +set city=MADRID +set province=MADRID +set postalcode=28010 +set PositionOnPageLowerLeftX=30 +set PositionOnPageLowerLeftY=90 +set PositionOnPageUpperRightX=200 +set PositionOnPageUpperRigthY=170 +set signaturePage=-1 +set signatureRubricImage="D:\Rodax\Servidor\Informes\5\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" + +REM set "CONFIG=signatureProductionCity=MADRID\nsignatureProductionProvince=MADRID\nsignatureProductionPostalCode=28053\nsignatureProductionCountry=ESPAÑA\nsignaturePage3=%signaturePage3%\nPositionOnPageLowerLeftX=%PositionOnPageLowerLeftX%\nPositionPageLowerLeftY=%PositionPageLowerLeftY%\nPositionOnPageUpperRightX=%PositionOnPageUpperRightX%\nPositionOnPageUpperRigthY=%PositionOnPageUpperRigthY%\nsignatureRubricImage=%signatureRubricImage%\nlayer2text=%layer2text=%" +REM \nsignaturePage=%signaturePage% + + +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% +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:\Rodax\Servidor\PDFS\cert-cris.pfx" -password %PASSCRIS% -filter subject.contains:59828 -config %CONFIG% + diff --git a/Source/Informes/5/1/firma_factura.bat b/Source/Informes/5/1/firma_factura.bat new file mode 100644 index 00000000..a8141151 --- /dev/null +++ b/Source/Informes/5/1/firma_factura.bat @@ -0,0 +1,48 @@ +@ECHO off +title firmadocumento +cls + +set LOGFILE=D:\Rodax\Servidor\Informes\5\1\log_factura.txt + +set ARCHIVO=%1 +set city=MADRID +set province=MADRID +set postalcode=28010 +set PositionOnPageLowerLeftX=200 +set PositionOnPageLowerLeftY=80 +set PositionOnPageUpperRightX=370 +set PositionOnPageUpperRigthY=200 +set signaturePage=-1 +set signatureRubricImage="D:\Rodax\Servidor\Informes\5\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" + +REM set "CONFIG=signatureProductionCity=MADRID\nsignatureProductionProvince=MADRID\nsignatureProductionPostalCode=28053\nsignatureProductionCountry=ESPAÑA\nsignaturePage3=%signaturePage3%\nPositionOnPageLowerLeftX=%PositionOnPageLowerLeftX%\nPositionPageLowerLeftY=%PositionPageLowerLeftY%\nPositionOnPageUpperRightX=%PositionOnPageUpperRightX%\nPositionOnPageUpperRigthY=%PositionOnPageUpperRigthY%\nsignatureRubricImage=%signatureRubricImage%\nlayer2text=%layer2text=%" +REM \nsignaturePage=%signaturePage% + + +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% +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:\Rodax\Servidor\PDFS\cert-cris.pfx" -password %PASSCRIS% -filter subject.contains:59828 -config %CONFIG% + diff --git a/Source/Informes/5/1/sello.jpg b/Source/Informes/5/1/sello.jpg new file mode 100644 index 0000000000000000000000000000000000000000..44d4e9c61912cc93c14a8a91c225b0d765a1431c GIT binary patch literal 14692 zcmd6NcU+Ur(rD-)T@;XB6h&(29T92LM11K*2-T242)zm@MLH_IDODkKLJ3ux^j;Hs zlakP+gIs*iIq!Gx{mwb}`|cn2cPGE>Z=ao+ot@d8+2@(vtEsC+0HcbRqa6UCq45wv z3iuDW+6K@*aR-6D0eAqy>t;Cs;A)Y;%)!mgMMg*n3Kz7pakjP<1UW;5ysTV=fP%t8 z069f37b_6h){Vp3*4_~+&$WYU=HhU)k>@fL*A~`xQMPq(RQGYU)%VeP0rCNZq;0qq z6*%O)WV|3Q5L-7Z4ljrk6fWZ>&-G{LGS~Ir%|cupf0DR?<++r8OXV=qe#W8f>}ty) zEeI3<2@3-`B(G~?5+YL4(vp&r{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kdb#CHd7Mwlm5ao3Fb=%N?+d)B+j^`&To?c_0;!| zL#3dGwm$uCZirVs_EUW%;em{ZvaU`^1mer-t?OKY>a(2~nBROs*-IyGZRMTmqB6lx zKd9XYAu^FcS?e2fgSy~FEO)k$=)8im$z=X(-qnrC4xmnjkcspJI83?=I`hbSzeBSw zJbt_&t=C-f?Tz=-Yx4bJYxZ#`$Mif5WHbJpAnxRsw15ST_Xarvx{FJ<`hCbdv2#xn znBOa4Z9H#EhmN(zzEPv0B02+ zkS`A-C{7CKJR+N25yDBVRLUuyS6@6~q~3Ts5ps0d%0zt#KFeZHNMSJWig#k69Pe+- zx|>jU@YD>yIB?ihHkYOti~A zv~YrH&dWA%RNaw_RI10OQHjm7r0CisJq?LY-tp_pE*01JV$0th>*{G^EW4-(Wx-3~ zE|lEc3)@7BZ)MjDuP=Q)mFkIR$2u7%)m-E%UVfRES811nckLcVLae78OdRb=tRJY2 zWE_l{w^brP2$OPtGg2e{!38PiY%Y^{XQyI>96*Op@N1`$ZksyOTmeG#x%LtboIs4< gxxw6LOpHU!%R_j>N=5(~s__3kNc}%~R=k@2A2tw;e*gdg literal 0 HcmV?d00001 diff --git a/Source/Informes/5/3/InfContratoCliente.fr3 b/Source/Informes/5/3/InfContratoCliente.fr3 index cd04ba82..a7c447cd 100644 --- a/Source/Informes/5/3/InfContratoCliente.fr3 +++ b/Source/Informes/5/3/InfContratoCliente.fr3 @@ -1,13 +1,13 @@ - + - + - - + + @@ -103,9 +103,9 @@ - + - + diff --git a/Source/Informes/5/3/InfPresupuestoCliente.fr3 b/Source/Informes/5/3/InfPresupuestoCliente.fr3 index 74f577f6..14674108 100644 --- a/Source/Informes/5/3/InfPresupuestoCliente.fr3 +++ b/Source/Informes/5/3/InfPresupuestoCliente.fr3 @@ -1,17 +1,17 @@ - + - + - + - + - + diff --git a/Source/Informes/5/3/firma_contrato.bat b/Source/Informes/5/3/firma_contrato.bat new file mode 100644 index 00000000..2be3b0ac --- /dev/null +++ b/Source/Informes/5/3/firma_contrato.bat @@ -0,0 +1,47 @@ +@ECHO off +title firmadocumento +cls + +set LOGFILE=D:\Rodax\Servidor\Informes\5\3\log_contrato.txt + +set ARCHIVO=%1 +set city=RIVAS +set province=MADRID +set postalcode=28522 +set PositionOnPageLowerLeftX=80 +set PositionOnPageLowerLeftY=163 +set PositionOnPageUpperRightX=240 +set PositionOnPageUpperRigthY=253 +set signaturePage=-1 +set signatureRubricImage="D:\Rodax\Servidor\Informes\5\3\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" + +REM set "CONFIG=signatureProductionCity=MADRID\nsignatureProductionProvince=MADRID\nsignatureProductionPostalCode=28053\nsignatureProductionCountry=ESPAÑA\nsignaturePage3=%signaturePage3%\nPositionOnPageLowerLeftX=%PositionOnPageLowerLeftX%\nPositionPageLowerLeftY=%PositionPageLowerLeftY%\nPositionOnPageUpperRightX=%PositionOnPageUpperRightX%\nPositionOnPageUpperRigthY=%PositionOnPageUpperRigthY%\nsignatureRubricImage=%signatureRubricImage%\nlayer2text=%layer2text=%" +REM \nsignaturePage=%signaturePage% + + +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% + +call :FIRMA >> %LOGFILE% +exit /b + +:FIRMA +"C:\Program Files (x86)\AutoFirma\AutoFirma\AutoFirmaCommandLine.exe" sign -i %ARCHIVO% -o %ARCHIVO% -store pkcs12:"D:\Rodax\Servidor\PDFS\cert-alis.pfx" -password %PASSALIS% -filter subject.contains:13910 -config %CONFIG% + diff --git a/Source/Informes/5/3/firma_factura.bat b/Source/Informes/5/3/firma_factura.bat new file mode 100644 index 00000000..275fba95 --- /dev/null +++ b/Source/Informes/5/3/firma_factura.bat @@ -0,0 +1,47 @@ +@ECHO off +title firmadocumento +cls + +set LOGFILE=D:\Rodax\Servidor\Informes\5\3\log_factura.txt + +set ARCHIVO=%1 +set city=RIVAS +set province=MADRID +set postalcode=28522 +set PositionOnPageLowerLeftX=150 +set PositionOnPageLowerLeftY=100 +set PositionOnPageUpperRightX=310 +set PositionOnPageUpperRigthY=190 +set signaturePage=-1 +set signatureRubricImage="D:\Rodax\Servidor\Informes\5\3\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" + +REM set "CONFIG=signatureProductionCity=MADRID\nsignatureProductionProvince=MADRID\nsignatureProductionPostalCode=28053\nsignatureProductionCountry=ESPAÑA\nsignaturePage3=%signaturePage3%\nPositionOnPageLowerLeftX=%PositionOnPageLowerLeftX%\nPositionPageLowerLeftY=%PositionPageLowerLeftY%\nPositionOnPageUpperRightX=%PositionOnPageUpperRightX%\nPositionOnPageUpperRigthY=%PositionOnPageUpperRigthY%\nsignatureRubricImage=%signatureRubricImage%\nlayer2text=%layer2text=%" +REM \nsignaturePage=%signaturePage% + + +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% + +call :FIRMA >> %LOGFILE% +exit /b + +:FIRMA +"C:\Program Files (x86)\AutoFirma\AutoFirma\AutoFirmaCommandLine.exe" sign -i %ARCHIVO% -o %ARCHIVO% -store pkcs12:"D:\Rodax\Servidor\PDFS\cert-alis.pfx" -password %PASSALIS% -filter subject.contains:13910 -config %CONFIG% + diff --git a/Source/Informes/5/3/sello.jpg b/Source/Informes/5/3/sello.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e0ce2b700c8749592460dd78d6ef41252c051f33 GIT binary patch literal 43665 zcmeFYXH-*f*EblNN*8GgC<;g~(xpa4KtQBPFA?b=L~7`AP_5jfWM^wOx+!`O~H1MAZI2Q(X5Z@Z` zcIM>hpVvPU_(uZ&NZ=m{{3C&XB=G-B3DCWz0Z{{-bAUi+pS-30&+)sY#J|Th%1R(m zQqq4P|2LXA6L2E2f6&DLFZJdhrvH(^KN9#y0{=+h9|`^nuBl#=SCyB&EGw_7 zD61-`2>Rb$JE>XF=eY+2JXV#F@$r{-bcQ~3k#>T5%LF?~%R;*@puEMW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FkM12s+?b?|y6|0JD{*$6}#$ zev6C;s}#Q~Y`8NOe`{vS@lTL3?44q@8OaUKiK0@GwuA!S$X27hgsgJ}$Am|wN!>8} z;=M7+Y+^2AsQUPiW=jv#ED#9}3v~tDeSo)HtI?ZD!Oa}_cADiY%u)G^6gk&xx|#fE z7P@6-A!{5c-T`<}LQ^~yKBy=-Aguom4+_AH00ctU(rkl<`~WNmld809ga_=dOMIW2 zhumLppz?8;%10Vx#=$m!y4;+Sscvv*!p^lYigpb^yHIWd`B256pX`UsKC&-g19z(7 z>i`QK3aDjw=vo#KNY}Czl$BR#?3t}B_Csh@TtJn4T9u>+I1xmp9ICoOf|U_k1h^Jr zL38bAp0A?yfxsI6G;7d^qiExt?42~i8qAEP5ZY4BN}8VTh34VJew2?uCRkF*SwL|g YNV`r;qcjgTbJF4d{3q*HUVPjAe^>^o5dZ)H literal 0 HcmV?d00001 diff --git a/Source/Informes/5/InformeListadoFacturasProveedorPendientes.fr3 b/Source/Informes/5/InformeListadoFacturasProveedorPendientes.fr3 index 6ea8d3ce..a5b90c5c 100644 --- a/Source/Informes/5/InformeListadoFacturasProveedorPendientes.fr3 +++ b/Source/Informes/5/InformeListadoFacturasProveedorPendientes.fr3 @@ -1,44 +1,46 @@ - + - + - + - - - - + + + + - - + + + - - - - - - - + + + + + + + + - + - + - + @@ -47,7 +49,7 @@ - + @@ -56,7 +58,7 @@ - + diff --git a/Source/Informes/5/InformeListadoFacturasProveedorPendientesDesglosado.fr3 b/Source/Informes/5/InformeListadoFacturasProveedorPendientesDesglosado.fr3 index 71f8c8ac..ec705179 100644 --- a/Source/Informes/5/InformeListadoFacturasProveedorPendientesDesglosado.fr3 +++ b/Source/Informes/5/InformeListadoFacturasProveedorPendientesDesglosado.fr3 @@ -1,5 +1,5 @@ - + @@ -9,40 +9,40 @@ - + - - - - - + + + + - - + + + - - - - - - - + + + + + + + - - - + + + - + - + @@ -51,7 +51,7 @@ - + @@ -60,7 +60,7 @@ - + diff --git a/Source/Informes/5/InformeListadoRecibosCliPendientes.fr3 b/Source/Informes/5/InformeListadoRecibosCliPendientes.fr3 index c01ba3fd..586e602c 100644 --- a/Source/Informes/5/InformeListadoRecibosCliPendientes.fr3 +++ b/Source/Informes/5/InformeListadoRecibosCliPendientes.fr3 @@ -1,5 +1,5 @@ - + @@ -11,29 +11,31 @@ - + - - - - - - + + + + + + + - - - - - - - + + + + + + + + - + - + diff --git a/Source/Informes/5/InformeListadoRecibosCliPendientesDesglosado.fr3 b/Source/Informes/5/InformeListadoRecibosCliPendientesDesglosado.fr3 index 4ba051ab..873ece94 100644 --- a/Source/Informes/5/InformeListadoRecibosCliPendientesDesglosado.fr3 +++ b/Source/Informes/5/InformeListadoRecibosCliPendientesDesglosado.fr3 @@ -1,5 +1,5 @@ - + @@ -14,31 +14,31 @@ - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - + + - + diff --git a/Source/Informes/5/InformeListadoRecibosCliente.fr3 b/Source/Informes/5/InformeListadoRecibosCliente.fr3 index 230fedab..d19580df 100644 --- a/Source/Informes/5/InformeListadoRecibosCliente.fr3 +++ b/Source/Informes/5/InformeListadoRecibosCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -11,29 +11,31 @@ - + - - - - - + + + + + - + + - - - - - - - + + + + + + + + - - - + + + diff --git a/Source/Informes/5/InformeListadoRecibosClienteDesglosado.fr3 b/Source/Informes/5/InformeListadoRecibosClienteDesglosado.fr3 index a232d8fb..435042fa 100644 --- a/Source/Informes/5/InformeListadoRecibosClienteDesglosado.fr3 +++ b/Source/Informes/5/InformeListadoRecibosClienteDesglosado.fr3 @@ -1,5 +1,5 @@ - + @@ -14,31 +14,31 @@ - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - + + - + diff --git a/Source/Informes/5/InformeListadoRecibosProvPendientes.fr3 b/Source/Informes/5/InformeListadoRecibosProvPendientes.fr3 index c002cb18..1b388e43 100644 --- a/Source/Informes/5/InformeListadoRecibosProvPendientes.fr3 +++ b/Source/Informes/5/InformeListadoRecibosProvPendientes.fr3 @@ -1,5 +1,5 @@ - + @@ -13,27 +13,29 @@ - - - - - - + + + + + + - + + - - - - - - - + + + + + + + + - - + + diff --git a/Source/Informes/5/InformeListadoRecibosProvPendientesDesglosado.fr3 b/Source/Informes/5/InformeListadoRecibosProvPendientesDesglosado.fr3 index b22a7d96..6c8c39ba 100644 --- a/Source/Informes/5/InformeListadoRecibosProvPendientesDesglosado.fr3 +++ b/Source/Informes/5/InformeListadoRecibosProvPendientesDesglosado.fr3 @@ -1,5 +1,5 @@ - + @@ -12,27 +12,29 @@ - - - - - - + + + + + + - + + - - - - - - - - + + + + + + + + + - - + + diff --git a/Source/Informes/5/InformeListadoRecibosProveedor.fr3 b/Source/Informes/5/InformeListadoRecibosProveedor.fr3 index b3721a41..3ac248f5 100644 --- a/Source/Informes/5/InformeListadoRecibosProveedor.fr3 +++ b/Source/Informes/5/InformeListadoRecibosProveedor.fr3 @@ -1,5 +1,5 @@ - + @@ -13,27 +13,29 @@ - + - - - - + + + + - + + - - - - + + + + - - + + + - - + + diff --git a/Source/Informes/5/InformeListadoRecibosProveedorDesglosado.fr3 b/Source/Informes/5/InformeListadoRecibosProveedorDesglosado.fr3 index e049eab4..fa24204d 100644 --- a/Source/Informes/5/InformeListadoRecibosProveedorDesglosado.fr3 +++ b/Source/Informes/5/InformeListadoRecibosProveedorDesglosado.fr3 @@ -1,5 +1,5 @@ - + @@ -13,27 +13,27 @@ - - - - - - + + + + + - + + - - - - - - - + + + + + + + - - + + diff --git a/Source/Informes/6/InfAlbaranCliente.fr3 b/Source/Informes/6/1/InfAlbaranCliente.fr3 similarity index 100% rename from Source/Informes/6/InfAlbaranCliente.fr3 rename to Source/Informes/6/1/InfAlbaranCliente.fr3 diff --git a/Source/Informes/6/InfContratoCliente.fr3 b/Source/Informes/6/1/InfContratoCliente.fr3 similarity index 96% rename from Source/Informes/6/InfContratoCliente.fr3 rename to Source/Informes/6/1/InfContratoCliente.fr3 index 77fb8809..a15f2835 100644 --- a/Source/Informes/6/InfContratoCliente.fr3 +++ b/Source/Informes/6/1/InfContratoCliente.fr3 @@ -1,23 +1,23 @@ - + - + - + - + - - - - + + + + @@ -29,41 +29,41 @@ - + - + - - - - - - + + + + + + - + - + - + - + - + - - - + + + - + - + @@ -78,7 +78,7 @@ - + diff --git a/Source/Informes/6/InfFacturaCliente.fr3 b/Source/Informes/6/1/InfFacturaCliente.fr3 similarity index 100% rename from Source/Informes/6/InfFacturaCliente.fr3 rename to Source/Informes/6/1/InfFacturaCliente.fr3 diff --git a/Source/Informes/6/InfPedidoProveedor.fr3 b/Source/Informes/6/1/InfPedidoProveedor.fr3 similarity index 100% rename from Source/Informes/6/InfPedidoProveedor.fr3 rename to Source/Informes/6/1/InfPedidoProveedor.fr3 diff --git a/Source/Informes/6/InfPresupuestoCliente.fr3 b/Source/Informes/6/1/InfPresupuestoCliente.fr3 similarity index 99% rename from Source/Informes/6/InfPresupuestoCliente.fr3 rename to Source/Informes/6/1/InfPresupuestoCliente.fr3 index 14390a5e..4a950dc9 100644 --- a/Source/Informes/6/InfPresupuestoCliente.fr3 +++ b/Source/Informes/6/1/InfPresupuestoCliente.fr3 @@ -1,15 +1,15 @@ - + - - - + + + - + diff --git a/Source/Informes/6/InfReciboCliente.fr3 b/Source/Informes/6/1/InfReciboCliente.fr3 similarity index 100% rename from Source/Informes/6/InfReciboCliente.fr3 rename to Source/Informes/6/1/InfReciboCliente.fr3 diff --git a/Source/Informes/6/1/firma_contrato.bat b/Source/Informes/6/1/firma_contrato.bat new file mode 100644 index 00000000..77ef5700 --- /dev/null +++ b/Source/Informes/6/1/firma_contrato.bat @@ -0,0 +1,48 @@ +@ECHO off +title firmadocumento +cls + +set LOGFILE=D:\Rodax\Servidor\Informes\6\1\log_contrato.txt + +set ARCHIVO=%1 +set city=MADRID +set province=MADRID +set postalcode=28010 +set PositionOnPageLowerLeftX=30 +set PositionOnPageLowerLeftY=90 +set PositionOnPageUpperRightX=200 +set PositionOnPageUpperRigthY=170 +set signaturePage=-1 +set signatureRubricImage="D:\Rodax\Servidor\Informes\6\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" + +REM set "CONFIG=signatureProductionCity=MADRID\nsignatureProductionProvince=MADRID\nsignatureProductionPostalCode=28053\nsignatureProductionCountry=ESPAÑA\nsignaturePage3=%signaturePage3%\nPositionOnPageLowerLeftX=%PositionOnPageLowerLeftX%\nPositionPageLowerLeftY=%PositionPageLowerLeftY%\nPositionOnPageUpperRightX=%PositionOnPageUpperRightX%\nPositionOnPageUpperRigthY=%PositionOnPageUpperRigthY%\nsignatureRubricImage=%signatureRubricImage%\nlayer2text=%layer2text=%" +REM \nsignaturePage=%signaturePage% + + +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% +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:\Rodax\Servidor\PDFS\cert-cris.pfx" -password %PASSCRIS% -filter subject.contains:59828 -config %CONFIG% + diff --git a/Source/Informes/6/1/firma_factura.bat b/Source/Informes/6/1/firma_factura.bat new file mode 100644 index 00000000..7df9faf0 --- /dev/null +++ b/Source/Informes/6/1/firma_factura.bat @@ -0,0 +1,48 @@ +@ECHO off +title firmadocumento +cls + +set LOGFILE=D:\Rodax\Servidor\Informes\6\1\log_factura.txt + +set ARCHIVO=%1 +set city=MADRID +set province=MADRID +set postalcode=28010 +set PositionOnPageLowerLeftX=200 +set PositionOnPageLowerLeftY=80 +set PositionOnPageUpperRightX=370 +set PositionOnPageUpperRigthY=200 +set signaturePage=-1 +set signatureRubricImage="D:\Rodax\Servidor\Informes\6\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" + +REM set "CONFIG=signatureProductionCity=MADRID\nsignatureProductionProvince=MADRID\nsignatureProductionPostalCode=28053\nsignatureProductionCountry=ESPAÑA\nsignaturePage3=%signaturePage3%\nPositionOnPageLowerLeftX=%PositionOnPageLowerLeftX%\nPositionPageLowerLeftY=%PositionPageLowerLeftY%\nPositionOnPageUpperRightX=%PositionOnPageUpperRightX%\nPositionOnPageUpperRigthY=%PositionOnPageUpperRigthY%\nsignatureRubricImage=%signatureRubricImage%\nlayer2text=%layer2text=%" +REM \nsignaturePage=%signaturePage% + + +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% +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:\Rodax\Servidor\PDFS\cert-cris.pfx" -password %PASSCRIS% -filter subject.contains:59828 -config %CONFIG% + diff --git a/Source/Informes/6/1/sello.jpg b/Source/Informes/6/1/sello.jpg new file mode 100644 index 0000000000000000000000000000000000000000..44d4e9c61912cc93c14a8a91c225b0d765a1431c GIT binary patch literal 14692 zcmd6NcU+Ur(rD-)T@;XB6h&(29T92LM11K*2-T242)zm@MLH_IDODkKLJ3ux^j;Hs zlakP+gIs*iIq!Gx{mwb}`|cn2cPGE>Z=ao+ot@d8+2@(vtEsC+0HcbRqa6UCq45wv z3iuDW+6K@*aR-6D0eAqy>t;Cs;A)Y;%)!mgMMg*n3Kz7pakjP<1UW;5ysTV=fP%t8 z069f37b_6h){Vp3*4_~+&$WYU=HhU)k>@fL*A~`xQMPq(RQGYU)%VeP0rCNZq;0qq z6*%O)WV|3Q5L-7Z4ljrk6fWZ>&-G{LGS~Ir%|cupf0DR?<++r8OXV=qe#W8f>}ty) zEeI3<2@3-`B(G~?5+YL4(vp&r{2U^}BBDaV5<(*40wSU^;*v5zF^<0j*R@1f8#|fj zPgMUd@A^re>+gzrdU^_aiV8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em{ZvaU`^1mer-t?OKY>a(2~nBROs*-IyGZRMTmqB6lx zKd9XYAu^FcS?e2fgSy~FEO)k$=)8im$z=X(-qnrC4xmnjkcspJI83?=I`hbSzeBSw zJbt_&t=C-f?Tz=-Yx4bJYxZ#`$Mif5WHbJpAnxRsw15ST_Xarvx{FJ<`hCbdv2#xn znBOa4Z9H#EhmN(zzEPv0B02+ zkS`A-C{7CKJR+N25yDBVRLUuyS6@6~q~3Ts5ps0d%0zt#KFeZHNMSJWig#k69Pe+- zx|>jU@YD>yIB?ihHkYOti~A zv~YrH&dWA%RNaw_RI10OQHjm7r0CisJq?LY-tp_pE*01JV$0th>*{G^EW4-(Wx-3~ zE|lEc3)@7BZ)MjDuP=Q)mFkIR$2u7%)m-E%UVfRES811nckLcVLae78OdRb=tRJY2 zWE_l{w^brP2$OPtGg2e{!38PiY%Y^{XQyI>96*Op@N1`$ZksyOTmeG#x%LtboIs4< gxxw6LOpHU!%R_j>N=5(~s__3kNc}%~R=k@2A2tw;e*gdg literal 0 HcmV?d00001 diff --git a/Source/Informes/InfPresupuestoCliente.fr3 b/Source/Informes/InfPresupuestoCliente.fr3 index 74f577f6..f4e96e7e 100644 --- a/Source/Informes/InfPresupuestoCliente.fr3 +++ b/Source/Informes/InfPresupuestoCliente.fr3 @@ -1,17 +1,17 @@ - + - + - + - + - + diff --git a/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranClienteServer.pas b/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranClienteServer.pas index 99fdd017..8b29afdb 100644 --- a/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranClienteServer.pas +++ b/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranClienteServer.pas @@ -88,7 +88,8 @@ begin GetClassFactory('srvReferencias').CreateInstance(AClientID, Intf); AReferenciasService := Intf as IsrvReferencias; - Result := AReferenciasService.DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa +// Result := AReferenciasService.DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa + Result := AReferenciasService.DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA, ID_TIENDA); //Referencia diferente según tienda end; @@ -108,7 +109,8 @@ begin GetClassFactory('srvReferencias').CreateInstance(AClientID, Intf); AReferenciasService := Intf as IsrvReferencias; - Result := AReferenciasService.IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa +// Result := AReferenciasService.IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa + Result := AReferenciasService.IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, ID_EMPRESA, ID_TIENDA); //Referencia diferente según tienda end; initialization diff --git a/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranesCliente.pas b/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranesCliente.pas index d9eff2d0..686c91dc 100644 --- a/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranesCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Model/uBizAlbaranesCliente.pas @@ -191,6 +191,7 @@ begin SITUACION := SITUACION_ALBARAN_PENDIENTE; REFERENCIA := ''; TIPO := CTE_TIPO_ALBARAN; + ID_TIENDA := AppFactuGES.TiendaActiva.ID; TIENDA := AppFactuGES.TiendaActiva.NOMBRE; @@ -241,13 +242,13 @@ begin ID_CLIENTE := FCliente.ID; if FCliente.ID_FORMA_PAGO > 0 then ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO; - +{ if FCliente.ID_TIENDA > 0 then begin ID_TIENDA := FCliente.ID_TIENDA; TIENDA := FCliente.TIENDA; end; - +} DataTable.Post; //Muy importante ya que es necesario hacer un post de la cabecera antes de añadir detalles //si se quita el id de la cabecera y los detalles se desincroniza if bEnEdicion then diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm index 8447f0ca..f7e0ab66 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm @@ -239,6 +239,8 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 781 + ExplicitWidth = 250 + Width = 250 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel @@ -276,6 +278,11 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente object TBXItem2: TTBXItem Action = actAlmacenes end + object TBXSeparatorItem3: TTBXSeparatorItem + end + object TBXItem4: TTBXItem + Action = actTienda + end end end end @@ -311,6 +318,11 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente OnExecute = actAlmacenesExecute OnUpdate = actAlmacenesUpdate end + object actTienda: TAction + Caption = 'Tienda' + OnExecute = actTiendaExecute + OnUpdate = actTiendaUpdate + end end inherited cxStyleRepositoryInforme: TcxStyleRepository Left = 360 diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.pas index 7dc50444..cd8d0462 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.pas @@ -61,6 +61,9 @@ type cxGridViewTIENDA: TcxGridDBColumn; cxGridViewREF_CONTRATO: TcxGridDBColumn; cxGridViewLISTA_NOMBRES: TcxGridDBColumn; + actTienda: TAction; + TBXSeparatorItem3: TTBXSeparatorItem; + TBXItem4: TTBXItem; procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); procedure cxGridViewCODIGOCustomDrawCell(Sender: TcxCustomGridTableView; @@ -76,6 +79,8 @@ type procedure actAlmacenesUpdate(Sender: TObject); procedure cxGridViewMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); + procedure actTiendaExecute(Sender: TObject); + procedure actTiendaUpdate(Sender: TObject); private //Filtros relativos a la vista @@ -140,6 +145,26 @@ begin (Sender as TAction).Checked := not (cxGridViewNOMBRE.GroupIndex < 0); end; +procedure TfrViewAlbaranesCliente.actTiendaExecute(Sender: TObject); +begin + if (cxGridViewTIENDA.GroupIndex < 0) then + begin + cxGridViewTIENDA.GroupIndex := cxGridView.GroupedColumnCount; + cxGridViewTIENDA.Visible := False; + end + else + begin + cxGridViewTIENDA.GroupIndex := -1; + cxGridViewTIENDA.Visible := True; + end; +end; + +procedure TfrViewAlbaranesCliente.actTiendaUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Checked := not (cxGridViewTIENDA.GroupIndex < 0); +end; + procedure TfrViewAlbaranesCliente.AnadirFiltroFechas; var Columna: TcxGridDBColumn; diff --git a/Source/Modulos/Albaranes de proveedor/Model/uBizAlbaranProveedorServer.PAS b/Source/Modulos/Albaranes de proveedor/Model/uBizAlbaranProveedorServer.PAS index 78762b68..d2457e6e 100644 --- a/Source/Modulos/Albaranes de proveedor/Model/uBizAlbaranProveedorServer.PAS +++ b/Source/Modulos/Albaranes de proveedor/Model/uBizAlbaranProveedorServer.PAS @@ -85,7 +85,8 @@ begin GetClassFactory('srvReferencias').CreateInstance(AClientID, Intf); AReferenciasService := Intf as IsrvReferencias; - Result := AReferenciasService.DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa +// Result := AReferenciasService.DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa + Result := AReferenciasService.DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA, ID_TIENDA); //Referencia diferente según tienda end; function TBizAlbaranProveedorServer.IncrementarReferencia: Boolean; @@ -104,7 +105,8 @@ begin GetClassFactory('srvReferencias').CreateInstance(AClientID, Intf); AReferenciasService := Intf as IsrvReferencias; - Result := AReferenciasService.IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa +// Result := AReferenciasService.IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa + Result := AReferenciasService.IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, ID_EMPRESA, ID_TIENDA); //Referencia diferente según tienda end; initialization diff --git a/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranesProveedor.dfm b/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranesProveedor.dfm index e75c9845..b0c75ce2 100644 --- a/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranesProveedor.dfm +++ b/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranesProveedor.dfm @@ -216,6 +216,11 @@ inherited frViewAlbaranesProveedor: TfrViewAlbaranesProveedor object TBXItem2: TTBXItem Action = actAlmacen end + object TBXSeparatorItem3: TTBXSeparatorItem + end + object TBXItem4: TTBXItem + Action = actTienda + end end end end @@ -238,6 +243,11 @@ inherited frViewAlbaranesProveedor: TfrViewAlbaranesProveedor OnExecute = actAlmacenExecute OnUpdate = actAlmacenUpdate end + object actTienda: TAction + Caption = 'Tienda' + OnExecute = actTiendaExecute + OnUpdate = actTiendaUpdate + end end inherited GridPNGImageList: TPngImageList Left = 352 diff --git a/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranesProveedor.pas b/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranesProveedor.pas index bad9d64c..fc34073b 100644 --- a/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranesProveedor.pas +++ b/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranesProveedor.pas @@ -47,6 +47,9 @@ type cxGridViewREFERENCIA_PROVEEDOR: TcxGridDBColumn; cxGridViewREF_FACTURA_PROV: TcxGridDBColumn; cxGridViewTIENDA: TcxGridDBColumn; + actTienda: TAction; + TBXSeparatorItem3: TTBXSeparatorItem; + TBXItem4: TTBXItem; procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); procedure cxGridViewCODIGOCustomDrawCell(Sender: TcxCustomGridTableView; @@ -61,6 +64,8 @@ type procedure actAlmacenUpdate(Sender: TObject); procedure cxGridViewMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); + procedure actTiendaExecute(Sender: TObject); + procedure actTiendaUpdate(Sender: TObject); private //Filtros relativos a la vista @@ -122,6 +127,26 @@ begin (Sender as TAction).Checked := not (cxGridViewNOMBRE.GroupIndex < 0); end; +procedure TfrViewAlbaranesProveedor.actTiendaExecute(Sender: TObject); +begin + if (cxGridViewTIENDA.GroupIndex < 0) then + begin + cxGridViewTIENDA.GroupIndex := cxGridView.GroupedColumnCount; + cxGridViewTIENDA.Visible := False; + end + else + begin + cxGridViewTIENDA.GroupIndex := -1; + cxGridViewTIENDA.Visible := True; + end; +end; + +procedure TfrViewAlbaranesProveedor.actTiendaUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Checked := not (cxGridViewTIENDA.GroupIndex < 0); +end; + procedure TfrViewAlbaranesProveedor.AnadirFiltroFechas; var Columna: TcxGridDBColumn; diff --git a/Source/Modulos/Contactos/Controller/uContactosController.pas b/Source/Modulos/Contactos/Controller/uContactosController.pas index b6761428..a878e43a 100644 --- a/Source/Modulos/Contactos/Controller/uContactosController.pas +++ b/Source/Modulos/Contactos/Controller/uContactosController.pas @@ -187,14 +187,13 @@ begin JsDialog.Instruction.Text := 'Elija una direcci'#243'n.'; JsDialog.DialogOptions := [doCommandLinks, doModal]; JsDialog.ButtonBar.Buttons := [cbOk]; - JsDialog.Width := 600; + JsDialog.Width := 1280; + JsDialog.BorderStyle := bsSizeable; //Añadimos la direccion principal del contacto with JsDialog.CustomButtons.Add do begin - Caption := AContacto.NOMBRE + ' ' + AContacto.NIF_CIF; - Info.Add(AContacto.CALLE); - Info.Add(AContacto.CODIGO_POSTAL + ' ' + AContacto.POBLACION + ' ' + AContacto.PROVINCIA); + Caption := AContacto.NOMBRE + ' - ' + AContacto.NIF_CIF + ' - ' + AContacto.CALLE + ' ' + AContacto.POBLACION + ' ' + AContacto.PROVINCIA; Value := -1; Default := True; end; @@ -205,9 +204,7 @@ begin begin with JsDialog.CustomButtons.Add do begin - Caption := AContacto.Direcciones.NOMBRE + ' ' + AContacto.Direcciones.NIF_CIF; - Info.Add(AContacto.Direcciones.CALLE); - Info.Add(AContacto.Direcciones.CODIGO_POSTAL + ' ' + AContacto.Direcciones.POBLACION + ' ' + AContacto.Direcciones.PROVINCIA); + Caption := AContacto.Direcciones.NOMBRE + ' - ' + AContacto.Direcciones.NIF_CIF + ' - ' + AContacto.Direcciones.CALLE + ' ' + AContacto.Direcciones.POBLACION + ' ' + AContacto.Direcciones.PROVINCIA; Value := AContacto.Direcciones.ID; end; AContacto.Direcciones.DataTable.Next; diff --git a/Source/Modulos/Contactos/Views/uViewVendedores.dfm b/Source/Modulos/Contactos/Views/uViewVendedores.dfm index 557674fa..f45040ce 100644 --- a/Source/Modulos/Contactos/Views/uViewVendedores.dfm +++ b/Source/Modulos/Contactos/Views/uViewVendedores.dfm @@ -24,16 +24,42 @@ inherited frViewVendedores: TfrViewVendedores inherited frViewFiltroBase1: TfrViewFiltroBase inherited TBXDockablePanel1: TTBXDockablePanel inherited dxLayoutControl1: TdxLayoutControl + inherited txtFiltroTodo: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 460 + Width = 460 + end inherited edtFechaIniFiltro: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 237 Width = 237 end inherited edtFechaFinFiltro: TcxDateEdit Left = 341 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 341 ExplicitWidth = 206 Width = 206 end + inherited txtFiltroTodo2: TcxTextEdit + Left = 397 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 397 + ExplicitWidth = 223 + Width = 223 + end end end end diff --git a/Source/Modulos/Contactos/Views/uViewVendedores.pas b/Source/Modulos/Contactos/Views/uViewVendedores.pas index f5fc28d0..5e35d8a8 100644 --- a/Source/Modulos/Contactos/Views/uViewVendedores.pas +++ b/Source/Modulos/Contactos/Views/uViewVendedores.pas @@ -11,7 +11,8 @@ uses cxGridPopupMenu, dxPSCore, dxPScxCommon, dxPScxGrid6Lnk, uDADataTable, cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, dxPgsDlg, ActnList, TB2Item, - TBX, TB2Toolbar, TBXDkPanels, TB2Dock, uViewFiltroBase, uDAInterfaces; + TBX, TB2Toolbar, TBXDkPanels, TB2Dock, uViewFiltroBase, uDAInterfaces, + uCustomView, uViewBase; type IViewVendedores = interface(IViewContactos) diff --git a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas index c5d4a9f8..077370be 100644 --- a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas +++ b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas @@ -57,6 +57,7 @@ type procedure Preview(AContrato : IBizContratoCliente; AllItems: Boolean = false); procedure Print(AContrato : IBizContratoCliente; AllItems: Boolean = false); + 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; @@ -68,6 +69,7 @@ type procedure VerBeneficio(const ID: Integer); procedure CopiarDireccion (const ADireccion: IBizDireccionesContacto; AContrato: IBizContratoCliente); + procedure FechaUltimaActualizacionToday (AContrato: IBizContratoCliente); end; TContratosClienteController = class(TControllerBase, IContratosClienteController) @@ -135,6 +137,7 @@ type procedure Preview(AContrato : IBizContratoCliente; AllItems: Boolean = false); procedure Print(AContrato : IBizContratoCliente; AllItems: Boolean = false); + 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; @@ -146,6 +149,7 @@ type procedure VerBeneficio(const ID: Integer); procedure CopiarDireccion (const ADireccion: IBizDireccionesContacto; AContrato: IBizContratoCliente); + procedure FechaUltimaActualizacionToday (AContrato: IBizContratoCliente); end; implementation @@ -990,6 +994,32 @@ begin Result := ASeleccionados; end; +procedure TContratosClienteController.FechaUltimaActualizacionToday(AContrato: IBizContratoCliente); +var + bEnEdicion : Boolean; +begin + if not Assigned(AContrato) then + raise Exception.Create ('Contrato no asignado (CopiarDireccion)'); + + if AContrato.DataTable.Active then + AContrato.DataTable.Active := True; + + bEnEdicion := (AContrato.DataTable.State in dsEditModes); + if not bEnEdicion then + AContrato.Edit; + + ShowHourglassCursor; + AContrato.Edit; + try + AContrato.FECHA_ULT_PRESENTACION_CLIENTE := DateOf(Date); + + if not bEnEdicion then + AContrato.Post; + finally + HideHourglassCursor; + end; +end; + procedure TContratosClienteController.FiltrarAno(AContrato: IBizContratoCliente; ADynWhereDataTable: WideString;const Ano: String); var Condicion: TDAWhereExpression; @@ -1184,6 +1214,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 ('Factura 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 4376bf8b..32a95135 100644 --- a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas +++ b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas @@ -12,7 +12,7 @@ type ['{FEF47B69-26A3-462A-AF6D-4B2073D4F9DC}'] procedure Preview(const AListaID : TIntegerList); procedure Print(const AListaID : TIntegerList); - function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean; + function ExportToPDF(const AID: Integer; const AFileName : String = ''; const AFirmado: Boolean = False): Boolean; end; TContratosClienteReportController = class(TControllerBase, IContratosClienteReportController) @@ -25,7 +25,7 @@ type procedure Preview(const AListaID : TIntegerList); procedure Print(const AListaID : TIntegerList); - function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean; + function ExportToPDF(const AID: Integer; const AFileName : String = ''; const AFirmado: Boolean = False): Boolean; end; @@ -57,8 +57,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 = False): Boolean; var AStream: Binary; begin @@ -68,7 +67,7 @@ begin ShowHourglassCursor; try - AStream := FDataModule.GetRptPDFContrato(AID); + AStream := FDataModule.GetRptPDFContrato(AID, AFirmado); try AStream.SaveToFile(AFileName); Result := True; diff --git a/Source/Modulos/Contratos de cliente/Data/ContratosCliente_data.dproj b/Source/Modulos/Contratos de cliente/Data/ContratosCliente_data.dproj index 56e509c2..add048fd 100644 --- a/Source/Modulos/Contratos de cliente/Data/ContratosCliente_data.dproj +++ b/Source/Modulos/Contratos de cliente/Data/ContratosCliente_data.dproj @@ -49,18 +49,18 @@ MainSource - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm index 3e7eb83d..4fa6bdd9 100644 --- a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm @@ -346,6 +346,10 @@ inherited DataModuleContratosCliente: TDataModuleContratosCliente Size = 255 DisplayLabel = 'Otros nombres' DictionaryEntry = 'ContratosCliente_LISTA_NOMBRES' + end + item + Name = 'FECHA_ULT_PRESENTACION_CLIENTE' + DataType = datDateTime end> Params = <> StreamingOptions = [soDisableEventsWhileStreaming] diff --git a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas index cdfbda2e..95f35297 100644 --- a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas @@ -46,7 +46,7 @@ type // Report function GetRptContratos(const AListaID: TIntegerList): Binary; - function GetRptPDFContrato(const AID: Integer): Binary; + function GetRptPDFContrato(const AID: Integer; const Firmado: Boolean): Binary; function GetAnosItems : TStringList; function GetContratosClienteBeneficios : IBizContratosClienteBeneficios; @@ -58,7 +58,7 @@ implementation {$R *.DFM} uses - cxControls, FactuGES_Intf, uDataModuleConexion, Dialogs, DataAbstract4_Intf, + cxControls, uFactuGES_App, FactuGES_Intf, uDataModuleConexion, Dialogs, DataAbstract4_Intf, uDataTableUtils, schContratosClienteClient_Intf, uBizContactos; { TdmContratosCliente } @@ -74,15 +74,14 @@ begin RORemoteService.Message := dmConexion.Message; end; -function TDataModuleContratosCliente.GetRptPDFContrato( - const AID: Integer): Binary; +function TDataModuleContratosCliente.GetRptPDFContrato(const AID: Integer; const Firmado: Boolean): Binary; var AParam : TIntegerArray; begin AParam := TIntegerArray.Create; try AParam.Add(AID); - Result := (RORemoteService as IsrvContratosCliente).GenerarInformeEnPDF(AParam) + Result := (RORemoteService as IsrvContratosCliente).GenerarInformeEnPDF(AParam, 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 a883e0fe..9844259a 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): Binary; - function GetRptPDFContrato(const AID: Integer): Binary; + function GetRptPDFContrato(const AID: Integer; const Firmado: Boolean): 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 b8c0a05f..77edca9c 100644 --- a/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas +++ b/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas @@ -9,14 +9,14 @@ 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 = '{4A855BE2-1E27-410A-8350-ACF29C53F151}'; - RID_Propiedades = '{41570D1D-ED23-49DE-9131-AE3093CC8765}'; - RID_ListaAnosContratos = '{D5EA6576-1B2F-4111-A91D-BFFC1FDF10F8}'; - RID_ContratosClienteBeneficios = '{F424B9B6-07F8-463E-B4A0-1BA7AA6ED4E0}'; - RID_ContratosCliente = '{15CCCCE9-CCB4-446E-BAEF-19862E2DFB78}'; - RID_TiposCapitulos = '{CBD0C09A-5DEA-4BCD-BFF4-D416AE6A10D4}'; - RID_ContratosCliente_Detalles = '{7875CEEB-1D15-46A1-93CD-1FF70AE1624F}'; - RID_ContratoClienteFacturasProv = '{F4C72497-51E7-4AA6-ADD6-A1B25CD1FA91}'; + RID_Valores = '{07040A27-DD19-4D93-B5DA-C9C49C1822CA}'; + RID_Propiedades = '{3006A5CE-2DB4-46FD-97B3-65E9CBA7AD2A}'; + RID_ListaAnosContratos = '{09600C3F-3F5A-4DB6-87A9-12C67B9AC2F1}'; + RID_ContratosClienteBeneficios = '{B58A588F-6D51-43FB-B318-5F9ABE371CBE}'; + RID_ContratosCliente = '{AFEF7F44-F9AD-4DCC-82CE-A441F94C7B6E}'; + RID_TiposCapitulos = '{C4F51BD4-AB1F-4564-8370-E83BDA635D61}'; + RID_ContratosCliente_Detalles = '{E45B94F9-C284-41CE-A73F-69E835616CBC}'; + RID_ContratoClienteFacturasProv = '{4884E75F-7CFE-4300-B53A-7F8F87745F99}'; { Data table names } nme_Valores = 'Valores'; @@ -140,6 +140,7 @@ const fld_ContratosClienteCALIDADES = 'CALIDADES'; fld_ContratosClienteREFERENCIA_CLIENTE = 'REFERENCIA_CLIENTE'; fld_ContratosClienteLISTA_NOMBRES = 'LISTA_NOMBRES'; + fld_ContratosClienteFECHA_ULT_PRESENTACION_CLIENTE = 'FECHA_ULT_PRESENTACION_CLIENTE'; { ContratosCliente field indexes } idx_ContratosClienteID = 0; @@ -191,6 +192,7 @@ const idx_ContratosClienteCALIDADES = 46; idx_ContratosClienteREFERENCIA_CLIENTE = 47; idx_ContratosClienteLISTA_NOMBRES = 48; + idx_ContratosClienteFECHA_ULT_PRESENTACION_CLIENTE = 49; { TiposCapitulos fields } fld_TiposCapitulosID = 'ID'; @@ -267,7 +269,7 @@ const type { IValores } IValores = interface(IDAStronglyTypedDataTable) - ['{13277775-D26C-4C37-8D1A-93F331210A30}'] + ['{72662564-0D03-463E-94DA-D8D703FC7FFD}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -326,7 +328,7 @@ type { IPropiedades } IPropiedades = interface(IDAStronglyTypedDataTable) - ['{EEFEAABF-251E-4913-AC03-72EC40D49314}'] + ['{F1B345B8-6699-4700-8097-BFC5BDFD8537}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -385,7 +387,7 @@ type { IListaAnosContratos } IListaAnosContratos = interface(IDAStronglyTypedDataTable) - ['{72262AA4-E2B8-4359-AB2E-ED2F1CE60AAF}'] + ['{36FADA3D-628F-480A-B077-EA8D6676A7C1}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -420,7 +422,7 @@ type { IContratosClienteBeneficios } IContratosClienteBeneficios = interface(IDAStronglyTypedDataTable) - ['{B769A1EC-6BF4-4753-BD9D-33065C8BA7E5}'] + ['{BBC61983-3B64-4845-A47B-F8511BBF7A73}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -635,7 +637,7 @@ type { IContratosCliente } IContratosCliente = interface(IDAStronglyTypedDataTable) - ['{1A06CC8E-8C33-4DF9-B6DB-55FBABAA3E21}'] + ['{5ECD7363-96C7-4393-AADE-B82526538C1E}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -827,6 +829,10 @@ type procedure SetLISTA_NOMBRESValue(const aValue: String); function GetLISTA_NOMBRESIsNull: Boolean; procedure SetLISTA_NOMBRESIsNull(const aValue: Boolean); + function GetFECHA_ULT_PRESENTACION_CLIENTEValue: DateTime; + procedure SetFECHA_ULT_PRESENTACION_CLIENTEValue(const aValue: DateTime); + function GetFECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean; + procedure SetFECHA_ULT_PRESENTACION_CLIENTEIsNull(const aValue: Boolean); { Properties } @@ -928,6 +934,8 @@ type property REFERENCIA_CLIENTEIsNull: Boolean read GetREFERENCIA_CLIENTEIsNull write SetREFERENCIA_CLIENTEIsNull; property LISTA_NOMBRES: String read GetLISTA_NOMBRESValue write SetLISTA_NOMBRESValue; property LISTA_NOMBRESIsNull: Boolean read GetLISTA_NOMBRESIsNull write SetLISTA_NOMBRESIsNull; + property FECHA_ULT_PRESENTACION_CLIENTE: DateTime read GetFECHA_ULT_PRESENTACION_CLIENTEValue write SetFECHA_ULT_PRESENTACION_CLIENTEValue; + property FECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean read GetFECHA_ULT_PRESENTACION_CLIENTEIsNull write SetFECHA_ULT_PRESENTACION_CLIENTEIsNull; end; { TContratosClienteDataTableRules } @@ -1137,6 +1145,10 @@ type procedure SetLISTA_NOMBRESValue(const aValue: String); virtual; function GetLISTA_NOMBRESIsNull: Boolean; virtual; procedure SetLISTA_NOMBRESIsNull(const aValue: Boolean); virtual; + function GetFECHA_ULT_PRESENTACION_CLIENTEValue: DateTime; virtual; + procedure SetFECHA_ULT_PRESENTACION_CLIENTEValue(const aValue: DateTime); virtual; + function GetFECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean; virtual; + procedure SetFECHA_ULT_PRESENTACION_CLIENTEIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; @@ -1237,6 +1249,8 @@ type property REFERENCIA_CLIENTEIsNull: Boolean read GetREFERENCIA_CLIENTEIsNull write SetREFERENCIA_CLIENTEIsNull; property LISTA_NOMBRES: String read GetLISTA_NOMBRESValue write SetLISTA_NOMBRESValue; property LISTA_NOMBRESIsNull: Boolean read GetLISTA_NOMBRESIsNull write SetLISTA_NOMBRESIsNull; + property FECHA_ULT_PRESENTACION_CLIENTE: DateTime read GetFECHA_ULT_PRESENTACION_CLIENTEValue write SetFECHA_ULT_PRESENTACION_CLIENTEValue; + property FECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean read GetFECHA_ULT_PRESENTACION_CLIENTEIsNull write SetFECHA_ULT_PRESENTACION_CLIENTEIsNull; public constructor Create(aDataTable: TDADataTable); override; @@ -1249,7 +1263,7 @@ type } { ITiposCapitulos } ITiposCapitulos = interface(IDAStronglyTypedDataTable) - ['{40EC6583-F105-4DC0-9181-38C309355EDF}'] + ['{9303AF23-576A-4218-A01D-460C960EE4B3}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1344,7 +1358,7 @@ type { IContratosCliente_Detalles } IContratosCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{9660A725-EBFD-413A-B413-5FC6C4BA26EF}'] + ['{7DA1AFC7-EB2B-4195-8CC5-0AB9E9B72906}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1595,7 +1609,7 @@ type { IContratoClienteFacturasProv } IContratoClienteFacturasProv = interface(IDAStronglyTypedDataTable) - ['{4BA8132B-EFEA-44CF-86F8-5BE79AD5A663}'] + ['{92725D42-6696-45DF-9DB5-D9606DF194DD}'] { Property getters and setters } function GetID_CONTRATOValue: Integer; procedure SetID_CONTRATOValue(const aValue: Integer); @@ -3283,6 +3297,27 @@ begin DataTable.Fields[idx_ContratosClienteLISTA_NOMBRES].AsVariant := Null; end; +function TContratosClienteDataTableRules.GetFECHA_ULT_PRESENTACION_CLIENTEValue: DateTime; +begin + result := DataTable.Fields[idx_ContratosClienteFECHA_ULT_PRESENTACION_CLIENTE].AsDateTime; +end; + +procedure TContratosClienteDataTableRules.SetFECHA_ULT_PRESENTACION_CLIENTEValue(const aValue: DateTime); +begin + DataTable.Fields[idx_ContratosClienteFECHA_ULT_PRESENTACION_CLIENTE].AsDateTime := aValue; +end; + +function TContratosClienteDataTableRules.GetFECHA_ULT_PRESENTACION_CLIENTEIsNull: boolean; +begin + result := DataTable.Fields[idx_ContratosClienteFECHA_ULT_PRESENTACION_CLIENTE].IsNull; +end; + +procedure TContratosClienteDataTableRules.SetFECHA_ULT_PRESENTACION_CLIENTEIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_ContratosClienteFECHA_ULT_PRESENTACION_CLIENTE].AsVariant := Null; +end; + { TTiposCapitulosDataTableRules } constructor TTiposCapitulosDataTableRules.Create(aDataTable: TDADataTable); diff --git a/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas b/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas index fe035b61..c6c38d6c 100644 --- a/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas +++ b/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas @@ -9,19 +9,19 @@ 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 = '{F5BA3630-406E-40FE-97E7-4BC91132C5C8}'; - RID_PropiedadesDelta = '{A595FE24-F858-4D75-9446-36289739B617}'; - RID_ListaAnosContratosDelta = '{E1E216DE-7155-4F81-867C-3884DAD7D803}'; - RID_ContratosClienteBeneficiosDelta = '{A5795708-FD64-43F9-8BFB-9790F4704A05}'; - RID_ContratosClienteDelta = '{DB9934DA-3136-4D8C-8207-684254C4E5ED}'; - RID_TiposCapitulosDelta = '{BC8F6452-CA5B-4003-8BC5-6DC010737C59}'; - RID_ContratosCliente_DetallesDelta = '{5E3953D6-994F-4C13-BD75-D73DB9D7B437}'; - RID_ContratoClienteFacturasProvDelta = '{E4D089BC-21D9-4983-900F-8F82272F74AF}'; + RID_ValoresDelta = '{D65A1140-B47F-4E5C-9F78-5E23024E699F}'; + RID_PropiedadesDelta = '{6F61B397-916F-47F9-8B1F-143BBE4D8761}'; + RID_ListaAnosContratosDelta = '{E49B48FF-2E1A-4370-9CA7-31E903528445}'; + RID_ContratosClienteBeneficiosDelta = '{9F4F1DC8-CE07-49F0-93A6-E6780C53CC11}'; + RID_ContratosClienteDelta = '{CEB5EB7A-F6D6-45BF-82B3-F538011FC1F6}'; + RID_TiposCapitulosDelta = '{7D7EDE09-5AD4-40F0-A2D9-DFB899D5EE0E}'; + RID_ContratosCliente_DetallesDelta = '{8CE89C32-E498-4B5A-9083-8C056ABE340F}'; + RID_ContratoClienteFacturasProvDelta = '{5C24C33D-2EA7-495D-B98B-546E7EDA1C19}'; type { IValoresDelta } IValoresDelta = interface(IValores) - ['{F5BA3630-406E-40FE-97E7-4BC91132C5C8}'] + ['{D65A1140-B47F-4E5C-9F78-5E23024E699F}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_PROPIEDADValue : Integer; @@ -79,7 +79,7 @@ type { IPropiedadesDelta } IPropiedadesDelta = interface(IPropiedades) - ['{A595FE24-F858-4D75-9446-36289739B617}'] + ['{6F61B397-916F-47F9-8B1F-143BBE4D8761}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -137,7 +137,7 @@ type { IListaAnosContratosDelta } IListaAnosContratosDelta = interface(IListaAnosContratos) - ['{E1E216DE-7155-4F81-867C-3884DAD7D803}'] + ['{E49B48FF-2E1A-4370-9CA7-31E903528445}'] { Property getters and setters } function GetOldANOValue : String; @@ -171,7 +171,7 @@ type { IContratosClienteBeneficiosDelta } IContratosClienteBeneficiosDelta = interface(IContratosClienteBeneficios) - ['{A5795708-FD64-43F9-8BFB-9790F4704A05}'] + ['{9F4F1DC8-CE07-49F0-93A6-E6780C53CC11}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldREFERENCIAValue : String; @@ -385,7 +385,7 @@ type { IContratosClienteDelta } IContratosClienteDelta = interface(IContratosCliente) - ['{DB9934DA-3136-4D8C-8207-684254C4E5ED}'] + ['{CEB5EB7A-F6D6-45BF-82B3-F538011FC1F6}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -436,6 +436,7 @@ type function GetOldCALIDADESValue : IROStrings; function GetOldREFERENCIA_CLIENTEValue : String; function GetOldLISTA_NOMBRESValue : String; + function GetOldFECHA_ULT_PRESENTACION_CLIENTEValue : DateTime; { Properties } property OldID : Integer read GetOldIDValue; @@ -487,6 +488,7 @@ type property OldCALIDADES : IROStrings read GetOldCALIDADESValue; property OldREFERENCIA_CLIENTE : String read GetOldREFERENCIA_CLIENTEValue; property OldLISTA_NOMBRES : String read GetOldLISTA_NOMBRESValue; + property OldFECHA_ULT_PRESENTACION_CLIENTE : DateTime read GetOldFECHA_ULT_PRESENTACION_CLIENTEValue; end; { TContratosClienteBusinessProcessorRules } @@ -794,6 +796,12 @@ type function GetOldLISTA_NOMBRESIsNull: Boolean; virtual; procedure SetLISTA_NOMBRESValue(const aValue: String); virtual; procedure SetLISTA_NOMBRESIsNull(const aValue: Boolean); virtual; + function GetFECHA_ULT_PRESENTACION_CLIENTEValue: DateTime; virtual; + function GetFECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean; virtual; + function GetOldFECHA_ULT_PRESENTACION_CLIENTEValue: DateTime; virtual; + function GetOldFECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean; virtual; + procedure SetFECHA_ULT_PRESENTACION_CLIENTEValue(const aValue: DateTime); virtual; + procedure SetFECHA_ULT_PRESENTACION_CLIENTEIsNull(const aValue: Boolean); virtual; { Properties } property ID : Integer read GetIDValue write SetIDValue; @@ -992,6 +1000,10 @@ type property LISTA_NOMBRESIsNull : Boolean read GetLISTA_NOMBRESIsNull write SetLISTA_NOMBRESIsNull; property OldLISTA_NOMBRES : String read GetOldLISTA_NOMBRESValue; property OldLISTA_NOMBRESIsNull : Boolean read GetOldLISTA_NOMBRESIsNull; + property FECHA_ULT_PRESENTACION_CLIENTE : DateTime read GetFECHA_ULT_PRESENTACION_CLIENTEValue write SetFECHA_ULT_PRESENTACION_CLIENTEValue; + property FECHA_ULT_PRESENTACION_CLIENTEIsNull : Boolean read GetFECHA_ULT_PRESENTACION_CLIENTEIsNull write SetFECHA_ULT_PRESENTACION_CLIENTEIsNull; + property OldFECHA_ULT_PRESENTACION_CLIENTE : DateTime read GetOldFECHA_ULT_PRESENTACION_CLIENTEValue; + property OldFECHA_ULT_PRESENTACION_CLIENTEIsNull : Boolean read GetOldFECHA_ULT_PRESENTACION_CLIENTEIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; @@ -1001,7 +1013,7 @@ type { ITiposCapitulosDelta } ITiposCapitulosDelta = interface(ITiposCapitulos) - ['{BC8F6452-CA5B-4003-8BC5-6DC010737C59}'] + ['{7D7EDE09-5AD4-40F0-A2D9-DFB899D5EE0E}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldPOSICIONValue : Integer; @@ -1095,7 +1107,7 @@ type { IContratosCliente_DetallesDelta } IContratosCliente_DetallesDelta = interface(IContratosCliente_Detalles) - ['{5E3953D6-994F-4C13-BD75-D73DB9D7B437}'] + ['{8CE89C32-E498-4B5A-9083-8C056ABE340F}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CONTRATOValue : Integer; @@ -1345,7 +1357,7 @@ type { IContratoClienteFacturasProvDelta } IContratoClienteFacturasProvDelta = interface(IContratoClienteFacturasProv) - ['{E4D089BC-21D9-4983-900F-8F82272F74AF}'] + ['{5C24C33D-2EA7-495D-B98B-546E7EDA1C19}'] { Property getters and setters } function GetOldID_CONTRATOValue : Integer; function GetOldREFERENCIAValue : String; @@ -3759,6 +3771,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosClienteLISTA_NOMBRES] := Null; end; +function TContratosClienteBusinessProcessorRules.GetFECHA_ULT_PRESENTACION_CLIENTEValue: DateTime; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosClienteFECHA_ULT_PRESENTACION_CLIENTE]; +end; + +function TContratosClienteBusinessProcessorRules.GetFECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosClienteFECHA_ULT_PRESENTACION_CLIENTE]); +end; + +function TContratosClienteBusinessProcessorRules.GetOldFECHA_ULT_PRESENTACION_CLIENTEValue: DateTime; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ContratosClienteFECHA_ULT_PRESENTACION_CLIENTE]; +end; + +function TContratosClienteBusinessProcessorRules.GetOldFECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ContratosClienteFECHA_ULT_PRESENTACION_CLIENTE]); +end; + +procedure TContratosClienteBusinessProcessorRules.SetFECHA_ULT_PRESENTACION_CLIENTEValue(const aValue: DateTime); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosClienteFECHA_ULT_PRESENTACION_CLIENTE] := aValue; +end; + +procedure TContratosClienteBusinessProcessorRules.SetFECHA_ULT_PRESENTACION_CLIENTEIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosClienteFECHA_ULT_PRESENTACION_CLIENTE] := Null; +end; + { TTiposCapitulosBusinessProcessorRules } constructor TTiposCapitulosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); diff --git a/Source/Modulos/Contratos de cliente/Model/uBizContratosCliente.pas b/Source/Modulos/Contratos de cliente/Model/uBizContratosCliente.pas index 498949e5..e36ea710 100644 --- a/Source/Modulos/Contratos de cliente/Model/uBizContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Model/uBizContratosCliente.pas @@ -265,6 +265,7 @@ begin ID_TIPO_IVA := AppFactuGES.EmpresaActiva.ID_TIPO_IVA; FECHA_CONTRATO := DateOf(Date); + FECHA_ULT_PRESENTACION_CLIENTE := DateOf(Date); INCIDENCIAS_ACTIVAS := 0; RE := 0; @@ -358,13 +359,15 @@ begin ID_TIPO_IVA := FCliente.ID_TIPO_IVA; RECARGO_EQUIVALENCIA := FCliente.RECARGO_EQUIVALENCIA; - if FCliente.ID_TIENDA > 0 then + +//OJO en empresa cristina no existen tiendas solo es la tienda cristina por lo que no se cambia asignación si estamos en esa empresa, falla si de cogen un cliente de acana los contadores + if (AppFactuGES.EmpresaActiva.ID <> CTE_EMPRESA_CRISTINA) + and (FCliente.ID_TIENDA > 0) then begin ID_TIENDA := FCliente.ID_TIENDA; TIENDA := FCliente.TIENDA; end; - // En acana la ficha de cliente no tiene descuento aplicado por defecto // DESCUENTO := FCliente.DESCUENTO; diff --git a/Source/Modulos/Contratos de cliente/Model/uBizContratosClienteServer.pas b/Source/Modulos/Contratos de cliente/Model/uBizContratosClienteServer.pas index 0b12be6c..faf8b4df 100644 --- a/Source/Modulos/Contratos de cliente/Model/uBizContratosClienteServer.pas +++ b/Source/Modulos/Contratos de cliente/Model/uBizContratosClienteServer.pas @@ -14,7 +14,7 @@ type private FReferenciaAutomatica : Boolean; function DarReferencia : String; - function IncrementarReferencia : Boolean; + function IncrementarReferencia : Boolean; protected procedure BeforeProcessDelta(Sender: TDABusinessProcessor; const aDelta: IDADelta); override; @@ -84,7 +84,8 @@ begin GetClassFactory('srvReferencias').CreateInstance(AClientID, Intf); AReferenciasService := Intf as IsrvReferencias; - Result := AReferenciasService.DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa +// Result := AReferenciasService.DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa + Result := AReferenciasService.DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA, ID_TIENDA); //Referencia diferente según tienda end; function TBizContratosClienteServer.IncrementarReferencia: Boolean; @@ -99,7 +100,8 @@ begin GetClassFactory('srvReferencias').CreateInstance(AClientID, Intf); AReferenciasService := Intf as IsrvReferencias; - Result := AReferenciasService.IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa +// Result := AReferenciasService.IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa + Result := AReferenciasService.IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, ID_EMPRESA, ID_TIENDA); //Referencia diferente según tienda end; initialization diff --git a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm index bf2f537f..5645802c 100644 --- a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm +++ b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm @@ -205,8 +205,9 @@ object RptContratosCliente: TRptContratosCliente 'IENTE.IMPORTE_TOTAL,'#10' V_CONTRATOS_CLIENTE.PERSONA_CONTACTO,'#10' ' + ' V_CONTRATOS_CLIENTE.VENDEDOR,'#10' V_CONTRATOS_CLIENTE.TIPO_CO' + 'NTRATO,'#10' V_CONTRATOS_CLIENTE.CONDICIONES,'#10' V_CONTRATOS_CLI' + - 'ENTE.ID_TIENDA'#10'FROM'#10' V_CONTRATOS_CLIENTE'#10'WHERE'#10' V_CONTRATO' + - 'S_CLIENTE.ID = :ID'#10 + 'ENTE.ID_TIENDA,'#10' V_CONTRATOS_CLIENTE.FECHA_ULT_PRESENTACION_C' + + 'LIENTE'#10'FROM'#10' V_CONTRATOS_CLIENTE'#10'WHERE'#10' V_CONTRATOS_CLIENT' + + 'E.ID = :ID'#10 StatementType = stSQL ColumnMappings = < item @@ -340,6 +341,10 @@ object RptContratosCliente: TRptContratosCliente item DatasetField = 'ID_TIENDA' TableField = 'ID_TIENDA' + end + item + DatasetField = 'FECHA_ULT_PRESENTACION_CLIENTE' + TableField = 'FECHA_ULT_PRESENTACION_CLIENTE' end> end> Name = 'Informe_Cabecera' @@ -488,6 +493,10 @@ object RptContratosCliente: TRptContratosCliente item Name = 'ID_TIENDA' DataType = datInteger + end + item + Name = 'FECHA_ULT_PRESENTACION_CLIENTE' + DataType = datDateTime end> ReadOnly = True end @@ -1230,6 +1239,10 @@ object RptContratosCliente: TRptContratosCliente item Name = 'ID_TIENDA' DataType = datInteger + end + item + Name = 'FECHA_ULT_PRESENTACION_CLIENTE' + DataType = datDateTime end> Params = < item @@ -1523,6 +1536,7 @@ object RptContratosCliente: TRptContratosCliente UseFileCache = True ShowProgress = False OverwritePrompt = False + EmbeddedFonts = True PrintOptimized = True Outline = False Background = False @@ -1530,7 +1544,7 @@ object RptContratosCliente: TRptContratosCliente Author = 'FactuGES' Subject = 'FactuGES' Creator = 'FactuGES' - ProtectionFlags = [ePrint, eModify, eCopy, eAnnot] + ProtectionFlags = [ePrint, eAnnot] HideToolbar = False HideMenubar = False HideWindowUI = False diff --git a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas index 32e29a93..2ccf054c 100644 --- a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas +++ b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas @@ -76,6 +76,7 @@ type private FConnection: IDAConnection; FIdEmpresa: Integer; + FIdTienda: Integer; FFechaInicio: Variant; FFechaFin: Variant; FListaIDClientes: TIntegerArray; @@ -93,7 +94,7 @@ type procedure RecuperarNombresClientes; public function GenerarContrato(const ListaID : TIntegerArray): Binary; - function GenerarContratoEnPDF(const ListaID : TIntegerArray): Binary; + function GenerarContratoEnPDF(const ListaID : TIntegerArray; 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; @@ -141,18 +142,39 @@ begin end; end; -function TRptContratosCliente.GenerarContratoEnPDF(const ListaID: TIntegerArray): Binary; +function TRptContratosCliente.GenerarContratoEnPDF(const ListaID: TIntegerArray; const Usuario: AnsiString; const Firmado: Boolean): Binary; var i: Integer; + AStream : Binary; + ARutaFichero, ANombreFichero, LlamadaBat : String; begin Result := Binary.Create; 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 - frxPDFExport1.Stream := Result; - frxReport.Export(frxPDFExport1) + //Vamos generando todos y cada uno de los contratos 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), IntToStr(FIdTienda)); + LlamadaBat := ARutaFichero + '"' + ANombreFichero + '"'; + if ExecAndWait(LlamadaBat) then + Result.LoadFromFile(ANombreFichero); + end; + end; finally end; end; @@ -531,9 +553,10 @@ begin tbl_Cabecera.Active := True; tbl_Capitulos.Active := True; tbl_Detalles.Active := True; - tbl_DetallesArticulos.Active := True; + FIdEmpresa := tbl_Cabecera.FieldByName('ID_EMPRESA').AsInteger; + FIdTienda := tbl_Cabecera.FieldByName('ID_TIENDA').AsInteger; AInforme := DarRutaFichero(DarRutaInformes, rptInforme, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString, tbl_Cabecera.FieldByName('ID_TIENDA').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.dfm b/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.dfm index a4f90937..c6365958 100644 --- a/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.dfm +++ b/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.dfm @@ -487,6 +487,10 @@ object srvContratosCliente: TsrvContratosCliente item DatasetField = 'LISTA_NOMBRES' TableField = 'LISTA_NOMBRES' + end + item + DatasetField = 'FECHA_ULT_PRESENTACION_CLIENTE' + TableField = 'FECHA_ULT_PRESENTACION_CLIENTE' end> end> Name = 'ContratosCliente' @@ -761,6 +765,10 @@ object srvContratosCliente: TsrvContratosCliente DataType = datString Size = 255 DictionaryEntry = 'ContratosCliente_LISTA_NOMBRES' + end + item + Name = 'FECHA_ULT_PRESENTACION_CLIENTE' + DataType = datDateTime end> end item @@ -1308,6 +1316,11 @@ object srvContratosCliente: TsrvContratosCliente Name = 'ID_EMPRESA' DataType = datInteger Value = '' + end + item + Name = 'FECHA_ULT_PRESENTACION_CLIENTE' + DataType = datDateTime + Value = '' end> Statements = < item @@ -1324,17 +1337,18 @@ object srvContratosCliente: TsrvContratosCliente '_IVA,'#10' IMPORTE_TOTAL, ID_FORMA_PAGO, ID_TIENDA, ID_VENDEDOR,' + ' PERSONA_CONTACTO,'#10' RE, IMPORTE_RE, RECARGO_EQUIVALENCIA, TE' + 'LEFONO, MOVIL, TIPO_CONTRATO, CONDICIONES,'#10' CALIDADES, REFER' + - 'ENCIA_CLIENTE, ID_EMPRESA)'#10' VALUES'#10' (:ID, :ID_CLIENTE, :NIF_' + - 'CIF, :NOMBRE, :ID_DIRECCION, :CALLE, :POBLACION, :PROVINCIA,'#10' ' + - ' :CODIGO_POSTAL, :REFERENCIA, :FECHA_CONTRATO, :SITUACION, :FOR' + - 'MA_PAGO,'#10' :PLAZO_ENTREGA, :OBSERVACIONES, :INCIDENCIAS, :INC' + - 'IDENCIAS_ACTIVAS, CURRENT_TIMESTAMP,'#10' :USUARIO, :IMPORTE_NET' + - 'O, :IMPORTE_PORTE, :DESCUENTO, :IMPORTE_DESCUENTO,'#10' :BASE_IM' + - 'PONIBLE, :ID_TIPO_IVA, :IVA, :IMPORTE_IVA, :IMPORTE_TOTAL, :ID_F' + - 'ORMA_PAGO,'#10' :ID_TIENDA, :ID_VENDEDOR, :PERSONA_CONTACTO, :RE' + - ', :IMPORTE_RE, :RECARGO_EQUIVALENCIA,'#10' :TELEFONO, :MOVIL, :T' + - 'IPO_CONTRATO, :CONDICIONES, :CALIDADES, :REFERENCIA_CLIENTE, :ID' + - '_EMPRESA)'#10#10 + 'ENCIA_CLIENTE, ID_EMPRESA, FECHA_ULT_PRESENTACION_CLIENTE)'#10' VAL' + + 'UES'#10' (:ID, :ID_CLIENTE, :NIF_CIF, :NOMBRE, :ID_DIRECCION, :CA' + + 'LLE, :POBLACION, :PROVINCIA,'#10' :CODIGO_POSTAL, :REFERENCIA, :' + + 'FECHA_CONTRATO, :SITUACION, :FORMA_PAGO,'#10' :PLAZO_ENTREGA, :O' + + 'BSERVACIONES, :INCIDENCIAS, :INCIDENCIAS_ACTIVAS, CURRENT_TIMEST' + + 'AMP,'#10' :USUARIO, :IMPORTE_NETO, :IMPORTE_PORTE, :DESCUENTO, :' + + 'IMPORTE_DESCUENTO,'#10' :BASE_IMPONIBLE, :ID_TIPO_IVA, :IVA, :IM' + + 'PORTE_IVA, :IMPORTE_TOTAL, :ID_FORMA_PAGO,'#10' :ID_TIENDA, :ID_' + + 'VENDEDOR, :PERSONA_CONTACTO, :RE, :IMPORTE_RE, :RECARGO_EQUIVALE' + + 'NCIA,'#10' :TELEFONO, :MOVIL, :TIPO_CONTRATO, :CONDICIONES, :CAL' + + 'IDADES, :REFERENCIA_CLIENTE, :ID_EMPRESA, :FECHA_ULT_PRESENTACIO' + + 'N_CLIENTE)'#10#10 StatementType = stSQL ColumnMappings = <> end> @@ -1579,6 +1593,11 @@ object srvContratosCliente: TsrvContratosCliente DataType = datInteger Value = '' end + item + Name = 'FECHA_ULT_PRESENTACION_CLIENTE' + DataType = datDateTime + Value = '' + end item Name = 'OLD_ID' Value = '' @@ -1609,7 +1628,8 @@ object srvContratosCliente: TsrvContratosCliente 'NO = :TELEFONO,'#10' MOVIL = :MOVIL,'#10' TIPO_CONTRATO = :TIPO_CO' + 'NTRATO,'#10' CONDICIONES = :CONDICIONES,'#10' CALIDADES = :CALIDAD' + 'ES,'#10' REFERENCIA_CLIENTE = :REFERENCIA_CLIENTE,'#10' ID_EMPRESA' + - ' = :ID_EMPRESA'#10' WHERE'#10' (ID = :OLD_ID)'#10#10 + ' = :ID_EMPRESA,'#10' FECHA_ULT_PRESENTACION_CLIENTE = :FECHA_ULT_' + + 'PRESENTACION_CLIENTE'#10' WHERE'#10' (ID = :OLD_ID)'#10#10 StatementType = stSQL ColumnMappings = <> end> diff --git a/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.pas b/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.pas index 4381145c..06d7ec97 100644 --- a/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.pas +++ b/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.pas @@ -34,7 +34,7 @@ type protected { IsrvContratosCliente methods } function GenerarInforme(const ListaID: TIntegerArray): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const Usuario: AnsiString; const Firmado: Boolean): Binary; end; implementation @@ -89,13 +89,13 @@ begin end; end; -function TsrvContratosCliente.GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; +function TsrvContratosCliente.GenerarInformeEnPDF(const ListaID: TIntegerArray; const Usuario: AnsiString; const Firmado: Boolean): Binary; var AReportGenerator : TRptContratosCliente; begin AReportGenerator := TRptContratosCliente.Create(nil); try - Result := AReportGenerator.GenerarContratoEnPDF(ListaID); + Result := AReportGenerator.GenerarContratoEnPDF(ListaID, Usuario, Firmado); finally FreeAndNIL(AReportGenerator); end; diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm index e03cdb3b..33f5f823 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm @@ -223,49 +223,49 @@ inherited fEditorContratoCliente: TfEditorContratoCliente Width = 122 end inherited cbFormaPago: TcxDBLookupComboBox - Top = 138 - ExplicitTop = 138 + Top = 165 + ExplicitTop = 165 ExplicitWidth = 122 Width = 122 end inherited bFormasPago: TButton Left = 305 - Top = 138 + Top = 165 ExplicitLeft = 305 - ExplicitTop = 138 + ExplicitTop = 165 end inherited cbSituacion: TcxDBImageComboBox - Top = 111 - ExplicitTop = 111 + Top = 138 + ExplicitTop = 138 ExplicitWidth = 260 Width = 260 end inherited memFormaPago: TcxDBMemo - Top = 287 - ExplicitTop = 287 + Top = 314 + ExplicitTop = 314 ExplicitWidth = 396 ExplicitHeight = 100 Height = 100 Width = 396 end inherited memPlazoEntrega: TcxDBMemo - Top = 373 - ExplicitTop = 373 + Top = 387 + ExplicitTop = 387 ExplicitWidth = 396 ExplicitHeight = 100 Height = 100 Width = 396 end inherited cbVendedor: TcxDBLookupComboBox - Top = 165 - ExplicitTop = 165 + Top = 192 + ExplicitTop = 192 ExplicitWidth = 27 Width = 27 end inherited cbTipoContrato: TcxDBComboBox - Left = 318 + Left = 331 Top = 84 - ExplicitLeft = 318 + ExplicitLeft = 331 ExplicitTop = 84 ExplicitWidth = 113 Width = 113 @@ -378,9 +378,9 @@ inherited fEditorContratoCliente: TfEditorContratoCliente end end inherited frViewTienda1: TfrViewTienda - Top = 216 + Top = 243 Width = 451 - ExplicitTop = 216 + ExplicitTop = 243 ExplicitWidth = 451 inherited dxLayoutControl1: TdxLayoutControl Width = 451 @@ -390,6 +390,12 @@ inherited fEditorContratoCliente: TfEditorContratoCliente end end end + inherited edtFechaUltRevision: TcxDBDateEdit + Top = 111 + ExplicitTop = 111 + ExplicitWidth = 123 + Width = 123 + end end end end @@ -427,51 +433,51 @@ inherited fEditorContratoCliente: TfEditorContratoCliente ExplicitLeft = 334 ExplicitTop = 0 end - inherited FontName: TJvFontComboBox + inherited FontSize: TEdit [5] Left = 0 - ExplicitLeft = 0 - end - inherited FontSize: TEdit - Left = 145 Width = 110 - ExplicitLeft = 145 + ExplicitLeft = 0 ExplicitWidth = 110 end - inherited UpDown1: TUpDown - Left = 271 - ExplicitLeft = 271 + inherited UpDown1: TUpDown [6] + Left = 110 + ExplicitLeft = 110 + end + inherited FontName: TJvFontComboBox [7] + Left = 127 + ExplicitLeft = 127 end inherited ToolButton13: TToolButton - Left = 288 - ExplicitLeft = 288 + Left = 272 + ExplicitLeft = 272 end inherited ToolButton6: TToolButton - Left = 296 - ExplicitLeft = 296 + Left = 280 + ExplicitLeft = 280 end inherited ToolButton7: TToolButton - Left = 330 - ExplicitLeft = 330 + Left = 314 + ExplicitLeft = 314 end inherited ToolButton8: TToolButton - Left = 364 - ExplicitLeft = 364 + Left = 348 + ExplicitLeft = 348 end inherited ToolButton12: TToolButton - Left = 398 - ExplicitLeft = 398 + Left = 382 + ExplicitLeft = 382 end inherited ToolButton9: TToolButton - Left = 406 - ExplicitLeft = 406 + Left = 390 + ExplicitLeft = 390 end inherited ToolButton10: TToolButton - Left = 440 - ExplicitLeft = 440 + Left = 424 + ExplicitLeft = 424 end inherited ToolButton11: TToolButton - Left = 474 - ExplicitLeft = 474 + Left = 458 + ExplicitLeft = 458 end end inherited cxGrid: TcxGrid diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.pas b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.pas index 20591ba1..71169cdf 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.pas @@ -276,6 +276,12 @@ begin frViewDetallesContratoCliente1.BeginUpdate; try bEsNuevo := FContrato.EsNuevo; + + if not bEsNuevo then + if (FContrato.FECHA_ULT_PRESENTACION_CLIENTE < Date) then + if ShowConfirmMessage('Cambio fecha actualización', '¿Desea cambiar la fecha de última actualización del contrato por la de hoy?') = IDYES then + Controller.FechaUltimaActualizacionToday(FContrato); + //GESTION_DOCUMENTOS if FController.Guardar(FContrato) then frViewDocumentosContratoCliente1.actActualizarServidor.Execute; diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm index cf4bc942..c3e27634 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm @@ -126,7 +126,7 @@ inherited fEditorContratosCliente: TfEditorContratosCliente Width = 1119 ExplicitWidth = 1119 inherited tbxMain: TTBXToolbar - ExplicitWidth = 888 + ExplicitWidth = 1119 object TBXSubmenuItem3: TTBXSubmenuItem [0] Caption = 'Nuevo' DisplayMode = nbdmImageAndText @@ -163,7 +163,11 @@ inherited fEditorContratosCliente: TfEditorContratosCliente Action = ActDuplicarAPresupuesto DisplayMode = nbdmImageAndText end - object TBXItem47: TTBXItem [14] + object TBXItem51: TTBXItem [14] + Action = actGenerarPDF + DisplayMode = nbdmImageAndText + end + object TBXItem47: TTBXItem [15] Action = actEnviarEMail DisplayMode = nbdmImageAndText end @@ -324,6 +328,13 @@ inherited fEditorContratosCliente: TfEditorContratosCliente OnExecute = ActDuplicarAPresupuestoExecute OnUpdate = ActDuplicarAPresupuestoUpdate end + object actGenerarPDF: TAction + Category = 'Archivo' + Caption = 'Generar PDF' + ImageIndex = 30 + OnExecute = actGenerarPDFExecute + OnUpdate = actGenerarPDFUpdate + end end inherited SmallImages: TPngImageList PngImages = < @@ -1076,6 +1087,29 @@ inherited fEditorContratosCliente: TfEditorContratosCliente AE426082} Name = 'PngImage29' 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 = 'PngImage30' + 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 44c3fe50..836b3898 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas @@ -56,6 +56,8 @@ type TBXItem49: TTBXItem; ActDuplicarAPresupuesto: TAction; TBXItem50: TTBXItem; + actGenerarPDF: TAction; + TBXItem51: TTBXItem; procedure FormShow(Sender: TObject); procedure actGenerarAlbaranCliExecute(Sender: TObject); procedure actEliminarUpdate(Sender: TObject); @@ -85,6 +87,8 @@ type procedure actVerFacturasProveedorExecute(Sender: TObject); procedure ActDuplicarAPresupuestoExecute(Sender: TObject); procedure ActDuplicarAPresupuestoUpdate(Sender: TObject); + procedure actGenerarPDFExecute(Sender: TObject); + procedure actGenerarPDFUpdate(Sender: TObject); protected FContratos: IBizContratoCliente; @@ -334,6 +338,53 @@ begin 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 las facturas/abonos de cliente seleccionados?', 'Atención', MB_YESNO) = IDYES) then + AFirmar := True; + end + else + begin + AContratos := Contratos; + ACadena := '¿Desea firmar digitalmente este contrato de 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; @@ -412,14 +463,23 @@ end; procedure TfEditorContratosCliente.bArmarioClick(Sender: TObject); begin inherited; + + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_CRISTINA) then + if (ShowConfirmMessage('Atención CIF - CRISTINA', 'No hagas el presupuesto en esta empresa si no va a ser facturado con el CIF de Cristina Puerta Estudio, ¿Desea continuar con el presupuesto?') = IDNO) then + exit; + if FController.Anadir(Contratos, teArmario) then FController.Ver(Contratos); - end; procedure TfEditorContratosCliente.bBanoClick(Sender: TObject); begin inherited; + + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_CRISTINA) then + if (ShowConfirmMessage('Atención CIF - CRISTINA', 'No hagas el presupuesto en esta empresa si no va a ser facturado con el CIF de Cristina Puerta Estudio, ¿Desea continuar con el presupuesto?') = IDNO) then + exit; + if FController.Anadir(Contratos, teBano) then FController.Ver(Contratos); end; @@ -427,6 +487,11 @@ end; procedure TfEditorContratosCliente.bCocinaClick(Sender: TObject); begin inherited; + + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_CRISTINA) then + if (ShowConfirmMessage('Atención CIF - CRISTINA', 'No hagas el presupuesto en esta empresa si no va a ser facturado con el CIF de Cristina Puerta Estudio, ¿Desea continuar con el presupuesto?') = IDNO) then + exit; + if FController.Anadir(Contratos, teCocina) then FController.Ver(Contratos); end; @@ -434,6 +499,11 @@ end; procedure TfEditorContratosCliente.bElectrodomesticoClick(Sender: TObject); begin inherited; + + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_CRISTINA) then + if (ShowConfirmMessage('Atención CIF - CRISTINA', 'No hagas el presupuesto en esta empresa si no va a ser facturado con el CIF de Cristina Puerta Estudio, ¿Desea continuar con el presupuesto?') = IDNO) then + exit; + if FController.Anadir(Contratos, teElectrodomestico) then FController.Ver(Contratos); end; @@ -441,6 +511,11 @@ end; procedure TfEditorContratosCliente.bObraClick(Sender: TObject); begin inherited; + + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_CRISTINA) then + if (ShowConfirmMessage('Atención CIF - CRISTINA', 'No hagas el presupuesto en esta empresa si no va a ser facturado con el CIF de Cristina Puerta Estudio, ¿Desea continuar con el presupuesto?') = IDNO) then + exit; + if FController.Anadir(Contratos, teObra) then FController.Ver(Contratos); end; @@ -448,6 +523,11 @@ end; procedure TfEditorContratosCliente.bVariosClick(Sender: TObject); begin inherited; + + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_CRISTINA) then + if (ShowConfirmMessage('Atención CIF - CRISTINA', 'No hagas el presupuesto en esta empresa si no va a ser facturado con el CIF de Cristina Puerta Estudio, ¿Desea continuar con el presupuesto?') = IDNO) then + exit; + if FController.Anadir(Contratos, teVarios) then FController.Ver(Contratos); end; diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.dfm index c596ac38..25ea6377 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.dfm @@ -19,7 +19,7 @@ inherited frViewContratoCliente: TfrViewContratoCliente 817 491) object edtFechaContrato: TcxDBDateEdit - Left = 104 + Left = 131 Top = 82 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_CONTRATO' @@ -59,12 +59,12 @@ inherited frViewContratoCliente: TfrViewContratoCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 12 + TabOrder = 13 Height = 139 Width = 404 end object eReferencia: TcxDBTextEdit - Left = 104 + Left = 131 Top = 28 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'REFERENCIA' @@ -89,8 +89,8 @@ inherited frViewContratoCliente: TfrViewContratoCliente Width = 122 end object cbFormaPago: TcxDBLookupComboBox - Left = 104 - Top = 136 + Left = 131 + Top = 163 DataBinding.DataField = 'ID_FORMA_PAGO' DataBinding.DataSource = DADataSource Properties.KeyFieldNames = 'ID' @@ -115,21 +115,21 @@ inherited frViewContratoCliente: TfrViewContratoCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 5 + TabOrder = 6 Width = 122 end object bFormasPago: TButton Left = 282 - Top = 136 + Top = 163 Width = 132 Height = 21 Caption = 'Ver las formas de pago...' - TabOrder = 6 + TabOrder = 7 OnClick = bFormasPagoClick end object cbSituacion: TcxDBImageComboBox - Left = 104 - Top = 109 + Left = 131 + Top = 136 DataBinding.DataField = 'SITUACION' DataBinding.DataSource = DADataSource Properties.Items = < @@ -154,12 +154,12 @@ inherited frViewContratoCliente: TfrViewContratoCliente StyleDisabled.LookAndFeel.NativeStyle = True StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 4 + TabOrder = 5 Width = 260 end object memFormaPago: TcxDBMemo Left = 22 - Top = 297 + Top = 324 Anchors = [akLeft, akTop, akRight, akBottom] DataBinding.DataField = 'FORMA_PAGO' DataBinding.DataSource = DADataSource @@ -175,35 +175,35 @@ inherited frViewContratoCliente: TfrViewContratoCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 9 - Height = 100 - Width = 396 - end - object memPlazoEntrega: TcxDBMemo - Left = 22 - Top = 401 - Anchors = [akLeft, akTop, akRight, akBottom] - DataBinding.DataField = 'PLAZO_ENTREGA' - DataBinding.DataSource = DADataSource - Properties.ScrollBars = ssVertical - Style.BorderColor = clWindowFrame - Style.BorderStyle = ebs3D - Style.HotTrack = False - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = True - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = True - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = True - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = True TabOrder = 10 Height = 100 Width = 396 end + object memPlazoEntrega: TcxDBMemo + Left = 22 + Top = 415 + Anchors = [akLeft, akTop, akRight, akBottom] + DataBinding.DataField = 'PLAZO_ENTREGA' + DataBinding.DataSource = DADataSource + Properties.ScrollBars = ssVertical + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 11 + Height = 100 + Width = 396 + end object cbVendedor: TcxDBLookupComboBox - Left = 104 - Top = 163 + Left = 131 + Top = 190 DataBinding.DataField = 'ID_VENDEDOR' DataBinding.DataSource = DADataSource Properties.KeyFieldNames = 'ID' @@ -228,11 +228,11 @@ inherited frViewContratoCliente: TfrViewContratoCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 7 + TabOrder = 8 Width = 27 end object cbTipoContrato: TcxDBComboBox - Left = 306 + Left = 318 Top = 82 DataBinding.DataField = 'TIPO_CONTRATO' DataBinding.DataSource = DADataSource @@ -258,7 +258,7 @@ inherited frViewContratoCliente: TfrViewContratoCliente Width = 113 end object edtlREF_CLIENTE: TcxDBTextEdit - Left = 104 + Left = 131 Top = 55 Anchors = [akLeft, akTop, akRight] AutoSize = False @@ -284,7 +284,7 @@ inherited frViewContratoCliente: TfrViewContratoCliente Top = 28 Width = 366 Height = 270 - TabOrder = 11 + TabOrder = 12 ReadOnly = False ExplicitLeft = 444 ExplicitTop = 28 @@ -331,13 +331,36 @@ inherited frViewContratoCliente: TfrViewContratoCliente end inline frViewTienda1: TfrViewTienda Left = 22 - Top = 220 + Top = 247 Width = 451 Height = 41 - TabOrder = 8 + TabOrder = 9 ReadOnly = False ExplicitLeft = 22 - ExplicitTop = 220 + ExplicitTop = 247 + end + object edtFechaUltRevision: TcxDBDateEdit + Left = 131 + Top = 109 + Anchors = [akLeft, akTop, akRight] + DataBinding.DataField = 'FECHA_ULT_PRESENTACION_CLIENTE' + DataBinding.DataSource = DADataSource + Properties.DateButtons = [btnToday] + Properties.ImmediatePost = True + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.Color = clInfoBk + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.Shadow = False + Style.ButtonStyle = bts3D + Style.ButtonTransparency = ebtNone + Style.PopupBorderStyle = epbsFrame3D + StyleDisabled.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 4 + Width = 123 end object dxLayoutControl1Group_Root: TdxLayoutGroup ShowCaption = False @@ -386,6 +409,11 @@ inherited frViewContratoCliente: TfrViewContratoCliente ControlOptions.ShowBorder = False end end + object dxLayoutControl1Item14: TdxLayoutItem + Caption = 'Fecha '#250'ltima revisi'#243'n:' + Control = edtFechaUltRevision + ControlOptions.ShowBorder = False + end object dxLayoutControl1Item10: TdxLayoutItem AutoAligns = [aaVertical] AlignHorz = ahClient diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.pas b/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.pas index 23b2b2cc..1b7c68f1 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratoCliente.pas @@ -70,6 +70,8 @@ type dxLayoutControl1Item13: TdxLayoutItem; frViewTienda1: TfrViewTienda; dxLayoutControl1Group10: TdxLayoutGroup; + dxLayoutControl1Item14: TdxLayoutItem; + edtFechaUltRevision: TcxDBDateEdit; procedure CustomViewCreate(Sender: TObject); procedure CustomViewDestroy(Sender: TObject); procedure bFormasPagoClick(Sender: TObject); diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm index 006ecceb..fedc6216 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm @@ -119,6 +119,10 @@ inherited frViewContratosCliente: TfrViewContratosCliente BestFitMaxWidth = 25 Width = 105 end + object cxGridViewFECHA_ULT_PRESENTACION_CLIENTE: TcxGridDBColumn + Caption = 'Fecha '#250'lt. actualizaci'#243'n' + DataBinding.FieldName = 'FECHA_ULT_PRESENTACION_CLIENTE' + end object cxGridViewNIF_CIF: TcxGridDBColumn Caption = 'NIF/CIF' DataBinding.FieldName = 'NIF_CIF' @@ -210,12 +214,16 @@ inherited frViewContratosCliente: TfrViewContratosCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 250 + Width = 250 end inherited edtFechaIniFiltro: TcxDateEdit Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 250 + Width = 250 end inherited edtFechaFinFiltro: TcxDateEdit Left = 515 @@ -224,6 +232,8 @@ inherited frViewContratosCliente: TfrViewContratosCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 515 + ExplicitWidth = 250 + Width = 250 end inherited txtFiltroTodo2: TcxTextEdit Left = 515 @@ -232,6 +242,8 @@ inherited frViewContratosCliente: TfrViewContratosCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 515 + ExplicitWidth = 250 + Width = 250 end inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited dxLayoutControl1Group2: TdxLayoutGroup diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas index 01cfc6d1..15b6b648 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas @@ -53,6 +53,7 @@ type actTienda: TAction; TBXItem2: TTBXItem; TBXSeparatorItem1: TTBXSeparatorItem; + cxGridViewFECHA_ULT_PRESENTACION_CLIENTE: TcxGridDBColumn; procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas index d3dd2a38..b6cf9592 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas @@ -27,7 +27,7 @@ type function Nuevo (WithInsert: Boolean = True) : IBizFacturaCliente; function Anadir(AFactura : IBizFacturaCliente) : Boolean; overload; function AnadirAbono(AFactura : IBizFacturaCliente) : Boolean; - function AnadirProforma(AFactura : IBizFacturaCliente) : Boolean; + function AnadirProforma: IBizFacturaCliente; function Anadir(AFacturas : IBizFacturaCliente; AListaAlbaranes : IBizAlbaranCliente; Const ATipo: String = CTE_TIPO_FACTURA): Boolean; overload; function Eliminar(const ID : Integer): Boolean; overload; @@ -42,6 +42,7 @@ type procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false); procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false); procedure EnviarFacturaPorEMail(AFactura : IBizFacturaCliente); + procedure GenerarPDF(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AFirmado: Boolean = False); procedure RecalcularImportes(AFactura: IBizFacturaCliente); @@ -93,7 +94,7 @@ type function Existe(const ID: Integer) : Boolean; virtual; function Anadir(AFactura : IBizFacturaCliente): Boolean; overload; function AnadirAbono(AFactura : IBizFacturaCliente) : Boolean; - function AnadirProforma(AFactura : IBizFacturaCliente) : Boolean; + function AnadirProforma: IBizFacturaCliente; function Anadir(AFacturas : IBizFacturaCliente; AListaAlbaranes : IBizAlbaranCliente; Const ATipo: String = CTE_TIPO_FACTURA): Boolean; overload; function Buscar(const ID: Integer): IBizFacturaCliente; function BuscarTodos: IBizFacturaCliente; @@ -108,6 +109,7 @@ type procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false); procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false); 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; @@ -195,9 +197,12 @@ end; { TFacturasClienteController } function TFacturasClienteController.Anadir(AFactura: IBizFacturaCliente) : Boolean; +var + bEnEdicion: Boolean; begin if not Assigned(AFactura) then raise Exception.Create ('Factura no asignada (Anadir)'); + AFactura.Insert; Result := True; end; @@ -209,12 +214,14 @@ begin Result := True; end; -function TFacturasClienteController.AnadirProforma( - AFactura: IBizFacturaCliente): Boolean; +function TFacturasClienteController.AnadirProforma: IBizFacturaCliente; +var + AFactura : IBizFacturaCliente; + begin - Anadir(AFactura); + AFactura := Nuevo(True); AFactura.TIPO := CTE_TIPO_PROFORMA; - Result := True; + Result := AFactura; end; function TFacturasClienteController.Anadir(AFacturas: IBizFacturaCliente; @@ -268,7 +275,10 @@ begin AAlbaranesController.RecuperarCliente(AListaAlbaranes); AListaAlbaranes.Cliente.DataTable.Active := True; AFacturas.Cliente := AListaAlbaranes.Cliente; - AFacturas.ID_FORMA_PAGO := AListaAlbaranes.ID_FORMA_PAGO; + if AListaAlbaranes.datatable.fieldbyname(fld_facturasClienteID_FORMA_PAGO).isnull then + AFacturas.ID_FORMA_PAGO := AppFactuGES.EmpresaActiva.ID_FORMA_PAGO + else + AFacturas.ID_FORMA_PAGO := AListaAlbaranes.ID_FORMA_PAGO; AFacturas.TIPO := ATipo; AFacturas.DataTable.FieldByName(fld_FacturasClienteOBSERVACIONES).AsString := AListaAlbaranes.DataTable.FieldByName(fld_FacturasClienteOBSERVACIONES).AsString; @@ -781,6 +791,11 @@ begin if (AFactura.IMPORTE_TOTAL > 0) then raise Exception.Create('Un abono nunca no puede tener un importe positivo, asegurese que las cantidades sean negativas'); + //En caso de ser una Factura no podra tener un importe total negativo + if (AFactura.TIPO = CTE_TIPO_FACTURA) then + if (AFactura.IMPORTE_TOTAL < 0) then + raise Exception.Create('Una factura nunca no puede tener un importe total negativo, asegurese que la factura esté correcta'); + { Esta validación puede saltar cuando se generan facturas automáticamente por albaranes o pedidos y el cliente no tiene Tipo de IVA puesto, se cambia, para signar automáticamente por defecto a la factura la primera forma de pago, @@ -1370,6 +1385,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 85b49b0c..12afb971 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas @@ -12,7 +12,7 @@ type ['{A0F41767-4FF6-4BAE-9FC9-894DD721D756}'] procedure Preview(const AListaID : TIntegerList); procedure Print(const AListaID : TIntegerList); - function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean; + function ExportToPDF(const AID: Integer; const AFileName : String = ''; const AFirmado: Boolean = False): Boolean; end; TFacturasClienteReportController = class(TControllerBase, IFacturasClienteReportController) @@ -25,7 +25,7 @@ type procedure Preview(const AListaID : TIntegerList); procedure Print(const AListaID : TIntegerList); - function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean; + 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, AFirmado); try AStream.SaveToFile(AFileName); Result := True; diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas index 1741e1be..a28127af 100644 --- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas @@ -34,7 +34,7 @@ type // Report function GetReport(const AListaID: TIntegerList): Binary; - function GetRptPDFFactura(const AID: Integer): Binary; + function GetRptPDFFactura(const AID: Integer; 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 } @@ -65,18 +65,17 @@ begin end; end; -function TDataModuleFacturasCliente.GetRptPDFFactura(const AID: Integer): Binary; +function TDataModuleFacturasCliente.GetRptPDFFactura(const AID: Integer; const Firmado: Boolean): Binary; var AParam : TIntegerArray; begin AParam := TIntegerArray.Create; try AParam.Add(AID); - Result := (RORemoteService as IsrvFacturasCliente).GenerarInformeEnPDF(AParam) + Result := (RORemoteService as IsrvFacturasCliente).GenerarInformeEnPDF(AParam, AppFactuGES.UsuarioActivo.USERNAME, Firmado) finally FreeANDNIL(AParam) end; - end; function TDataModuleFacturasCliente.NewItem: IBizFacturaCliente; diff --git a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj index 71b32e39..e012e455 100644 --- a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj +++ b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj @@ -198,6 +198,15 @@ + + + + + + + + + @@ -252,23 +261,14 @@ - - - - - - - - - - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas b/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas index afd4aa57..ba1196e2 100644 --- a/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas +++ b/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas @@ -9,7 +9,7 @@ type IDataModuleFacturasClienteReport = interface ['{F498AC70-AA38-4C06-B301-85A4AC0B210B}'] function GetReport(const AListaID: TIntegerList): Binary; - function GetRptPDFFactura(const AID: Integer): Binary; + function GetRptPDFFactura(const AID: Integer; const Firmado: Boolean): Binary; end; implementation diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas index df43e4d5..879a82c1 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 = '{35EC352F-3CB5-431C-941C-773B56FC9C17}'; - RID_FacturasCliente = '{EE5C9C18-5B51-475E-9CFC-A2F163B0F368}'; - RID_FacturasCliente_Detalles = '{CECC09E5-CA18-4B27-A693-F38FD2708E6E}'; + RID_ListaAnosFacturas = '{AA9E9DF8-6E40-4A04-9F56-47B64CB31051}'; + RID_FacturasCliente = '{35ABCCE5-A88B-4859-859C-7D64631B8A39}'; + RID_FacturasCliente_Detalles = '{A1647325-0E90-4395-B301-CA5855F4360C}'; { Data table names } nme_ListaAnosFacturas = 'ListaAnosFacturas'; @@ -167,7 +167,7 @@ const type { IListaAnosFacturas } IListaAnosFacturas = interface(IDAStronglyTypedDataTable) - ['{35B9CF8B-1998-4510-99B1-1EC13710F8AB}'] + ['{6F39FFB6-319E-466C-A13F-451029BC363F}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -202,7 +202,7 @@ type { IFacturasCliente } IFacturasCliente = interface(IDAStronglyTypedDataTable) - ['{ADFA571C-3DA5-4B91-A0A9-35AFF4CC2018}'] + ['{7C87FE37-C098-4355-990B-2693BC995665}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -849,7 +849,7 @@ type { IFacturasCliente_Detalles } IFacturasCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{1DBA415D-060E-4E81-99F9-6BBC34A48D3E}'] + ['{8FE5D0B5-031E-4B7C-9CEB-B2ED7A7201D5}'] { 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 051d012a..53460a17 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 = '{AF9DCBE5-965F-4954-B3E3-028464D75916}'; - RID_FacturasClienteDelta = '{F7ACAA8D-6710-4ECA-8FBF-0341136DF2CB}'; - RID_FacturasCliente_DetallesDelta = '{D779175D-1E98-4B6B-9059-BEC7DCD94A11}'; + RID_ListaAnosFacturasDelta = '{625CABDC-50D6-4944-B22B-D3348700AFA2}'; + RID_FacturasClienteDelta = '{1B6A177E-8B9C-415E-94B1-5CBD0CF0FF05}'; + RID_FacturasCliente_DetallesDelta = '{A116A70B-8E0A-4216-9D6E-97820C5EB891}'; type { IListaAnosFacturasDelta } IListaAnosFacturasDelta = interface(IListaAnosFacturas) - ['{AF9DCBE5-965F-4954-B3E3-028464D75916}'] + ['{625CABDC-50D6-4944-B22B-D3348700AFA2}'] { Property getters and setters } function GetOldANOValue : String; @@ -50,7 +50,7 @@ type { IFacturasClienteDelta } IFacturasClienteDelta = interface(IFacturasCliente) - ['{F7ACAA8D-6710-4ECA-8FBF-0341136DF2CB}'] + ['{1B6A177E-8B9C-415E-94B1-5CBD0CF0FF05}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -697,7 +697,7 @@ type { IFacturasCliente_DetallesDelta } IFacturasCliente_DetallesDelta = interface(IFacturasCliente_Detalles) - ['{D779175D-1E98-4B6B-9059-BEC7DCD94A11}'] + ['{A116A70B-8E0A-4216-9D6E-97820C5EB891}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_FACTURAValue : Integer; diff --git a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas index 0ba062d9..5b509c3d 100644 --- a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas @@ -341,12 +341,15 @@ begin ID_TIPO_IVA := FCliente.ID_TIPO_IVA; RECARGO_EQUIVALENCIA := FCliente.RECARGO_EQUIVALENCIA; +//OJO en empresa cristina no existe el la tienda de acana por lo que falla si cogen un cliente de acana +//por eso comentamos esta asignación +{ if FCliente.ID_TIENDA > 0 then begin ID_TIENDA := FCliente.ID_TIENDA; TIENDA := FCliente.TIENDA; end; - +} //Si el cliente tiene la contabilidad desactivada la factura que realizamos la desactivamos también. if (FCliente.IGNORAR_CONTABILIDAD = 1) then IGNORAR_CONTABILIDAD := 1; diff --git a/Source/Modulos/Facturas de cliente/Model/uBizFacturasClienteServer.pas b/Source/Modulos/Facturas de cliente/Model/uBizFacturasClienteServer.pas index f8e8fa9a..4844fe1f 100644 --- a/Source/Modulos/Facturas de cliente/Model/uBizFacturasClienteServer.pas +++ b/Source/Modulos/Facturas de cliente/Model/uBizFacturasClienteServer.pas @@ -8,6 +8,12 @@ uses const BIZ_SERVER_FACTURAS_CLIENTE = 'Server.FacturasCliente'; + REF_FACTURAS_CLIENTE = 'REF_FACTURAS_CLIENTE'; + REF_ABONOS_CLIENTE = 'REF_ABONOS_CLIENTE'; + REF_FACTURAS_PROFORMA = 'REF_FACTURAS_PROFORMA'; + CTE_TIPO_ABONO = 'A'; + CTE_TIPO_FACTURA = 'F'; + CTE_TIPO_PROFORMA = 'P'; type TBizFacturasClienteServer = class(TFacturasClienteBusinessProcessorRules) @@ -30,13 +36,6 @@ uses Variants, uDAClasses, uReferenciasUtils, uBusinessUtils, uROClasses, uDataModuleServer, schFacturasClienteClient_Intf, FactuGES_Intf, uROServer, SysUtils; -const - REF_FACTURAS_CLIENTE = 'REF_FACTURAS_CLIENTE'; - REF_ABONOS_CLIENTE = 'REF_ABONOS_CLIENTE'; - REF_FACTURAS_PROFORMA = 'REF_FACTURAS_PROFORMA'; - CTE_TIPO_ABONO = 'A'; - CTE_TIPO_FACTURA = 'F'; - CTE_TIPO_PROFORMA = 'P'; { TBizFacturasClienteServer } diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm index c2e571c9..d9b14641 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm +++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm @@ -377,7 +377,8 @@ object RptFacturasCliente: TRptFacturasCliente 'L'#10'from V_facturas_cliente'#10'left join contactos on (contactos.ID =' + ' V_facturas_cliente.ID_CLIENTE)'#10'LEFT OUTER JOIN v_contactos_nomb' + 'res ON (v_contactos_nombres.id = v_facturas_cliente.id_cliente)'#10 + - 'group by 1,2,3,4,5,6,7'#10'order by 1,5,6,7,2,4'#10 + 'where (V_facturas_cliente.TIPO <> '#39'P'#39')'#10'group by 1,2,3,4,5,6,7'#10'or' + + 'der by 1,5,6,7,2,4'#10 StatementType = stSQL ColumnMappings = < item @@ -448,8 +449,7 @@ object RptFacturasCliente: TRptFacturasCliente end item Name = 'NOMBRE' - DataType = datString - Size = 255 + DataType = datMemo end item Name = 'IVA' @@ -511,7 +511,8 @@ object RptFacturasCliente: TRptFacturasCliente ' NIF_CIF, FECHA_FACTURA, BASE_IMPONIBLE, IVA, IMPORTE_IVA, RE, I' + 'MPORTE_RE, IMPORTE_TOTAL'#10'from v_facturas_cliente'#10'LEFT OUTER JOIN' + ' v_contactos_nombres ON (v_contactos_nombres.id = v_facturas_cli' + - 'ente.id_cliente)'#10'where {where}'#10'order by ANO, MES, REFERENCIA'#10#10 + 'ente.id_cliente)'#10'where (V_facturas_cliente.TIPO <> '#39'P'#39')'#10'and {whe' + + 're}'#10#10'order by ANO, MES, REFERENCIA'#10#10 StatementType = stSQL ColumnMappings = < item @@ -795,32 +796,33 @@ object RptFacturasCliente: TRptFacturasCliente TargetTable = 'FACTURAS_CLIENTE' SQL = 'SELECT'#10' V_FACTURAS_CLIENTE.ID, V_FACTURAS_CLIENTE.REFERENCIA,' + - ' V_FACTURAS_CLIENTE.FECHA_FACTURA,'#10' V_FACTURAS_CLIENTE.TIENDA' + - ', V_FACTURAS_CLIENTE.ID_TIENDA,'#10' V_FACTURAS_CLIENTE.IMPORTE_N' + - 'ETO,'#10' V_FACTURAS_CLIENTE.BASE_IMPONIBLE, V_FACTURAS_CLIENTE.D' + - 'ESCUENTO, V_FACTURAS_CLIENTE.IMPORTE_DESCUENTO,'#10' V_FACTURAS_C' + - 'LIENTE.IVA, V_FACTURAS_CLIENTE.IMPORTE_IVA,'#10' V_FACTURAS_CLIEN' + - 'TE.RE, V_FACTURAS_CLIENTE.IMPORTE_RE,'#10' V_FACTURAS_CLIENTE.IMP' + - 'ORTE_TOTAL,'#10' V_FACTURAS_CLIENTE.OBSERVACIONES, FORMAS_PAGO.DE' + - 'SCRIPCION AS FORMA_PAGO, V_FACTURAS_CLIENTE.ID_CLIENTE,'#10' V_FA' + - 'CTURAS_CLIENTE.NIF_CIF,'#10' V_FACTURAS_CLIENTE.NOMBRE as NOMBRE,' + - #10' V_FACTURAS_CLIENTE.CALLE,'#10' V_FACTURAS_CLIENTE.PROVINCIA,' + - ' V_FACTURAS_CLIENTE.CODIGO_POSTAL, V_FACTURAS_CLIENTE.POBLACION,' + - #10' CONTACTOS_DATOS_BANCO.TITULAR,'#10' CONTACTOS_DATOS_BANCO.EN' + - 'TIDAD,'#10' CONTACTOS_DATOS_BANCO.SUCURSAL,'#10' CONTACTOS_DATOS_B' + - 'ANCO.DC,'#10' CONTACTOS_DATOS_BANCO.CUENTA,'#10' ID_EMPRESA, EMPRE' + - 'SAS.NIF_CIF as NIF_CIF_EMPRESA, EMPRESAS.RAZON_SOCIAL,'#10' EMPRE' + - 'SAS.CALLE as CALLE_EMPRESA, EMPRESAS.POBLACION as POBLACION_EMPR' + - 'ESA,'#10' EMPRESAS.PROVINCIA as PROVINCIA_EMPRESA, EMPRESAS.CODIG' + - 'O_POSTAL as CODIGO_POSTAL_EMPRESA,'#10' EMPRESAS.TELEFONO_1, EMPR' + - 'ESAS.FAX, EMPRESAS.MOVIL_1, EMPRESAS.EMAIL_1,'#10' EMPRESAS.PAGIN' + - 'A_WEB, EMPRESAS.REGISTRO_MERCANTIL, EMPRESAS.LOGOTIPO'#10'FROM V_FAC' + - 'TURAS_CLIENTE'#10'LEFT JOIN EMPRESAS ON EMPRESAS.ID = ID_EMPRESA'#10'LEF' + - 'T JOIN FORMAS_PAGO ON (FORMAS_PAGO.ID = V_FACTURAS_CLIENTE.ID_FO' + - 'RMA_PAGO)'#10'LEFT JOIN CONTACTOS_DATOS_BANCO ON (CONTACTOS_DATOS_BA' + - 'NCO.ID_CONTACTO = V_FACTURAS_CLIENTE.ID_CLIENTE)'#10'LEFT OUTER JOIN' + - ' v_contactos_nombres ON (v_contactos_nombres.id = V_FACTURAS_CLI' + - 'ENTE.id_cliente)'#10'WHERE V_FACTURAS_CLIENTE.ID = :ID'#10 + ' V_FACTURAS_CLIENTE.FECHA_FACTURA,'#10' V_FACTURAS_CLIENTE.TIPO,'#10 + + ' V_FACTURAS_CLIENTE.TIENDA, V_FACTURAS_CLIENTE.ID_TIENDA,'#10' ' + + ' V_FACTURAS_CLIENTE.IMPORTE_NETO,'#10' V_FACTURAS_CLIENTE.BASE_IM' + + 'PONIBLE, V_FACTURAS_CLIENTE.DESCUENTO, V_FACTURAS_CLIENTE.IMPORT' + + 'E_DESCUENTO,'#10' V_FACTURAS_CLIENTE.IVA, V_FACTURAS_CLIENTE.IMPO' + + 'RTE_IVA,'#10' V_FACTURAS_CLIENTE.RE, V_FACTURAS_CLIENTE.IMPORTE_R' + + 'E,'#10' V_FACTURAS_CLIENTE.IMPORTE_TOTAL,'#10' V_FACTURAS_CLIENTE.' + + 'OBSERVACIONES, FORMAS_PAGO.DESCRIPCION AS FORMA_PAGO, V_FACTURAS' + + '_CLIENTE.ID_CLIENTE,'#10' V_FACTURAS_CLIENTE.NIF_CIF,'#10' V_FACTU' + + 'RAS_CLIENTE.NOMBRE as NOMBRE,'#10' V_FACTURAS_CLIENTE.CALLE,'#10' ' + + 'V_FACTURAS_CLIENTE.PROVINCIA, V_FACTURAS_CLIENTE.CODIGO_POSTAL, ' + + 'V_FACTURAS_CLIENTE.POBLACION,'#10' CONTACTOS_DATOS_BANCO.TITULAR,' + + #10' CONTACTOS_DATOS_BANCO.ENTIDAD,'#10' CONTACTOS_DATOS_BANCO.SU' + + 'CURSAL,'#10' CONTACTOS_DATOS_BANCO.DC,'#10' CONTACTOS_DATOS_BANCO.' + + 'CUENTA,'#10' ID_EMPRESA, EMPRESAS.NIF_CIF as NIF_CIF_EMPRESA, EMP' + + 'RESAS.RAZON_SOCIAL,'#10' EMPRESAS.CALLE as CALLE_EMPRESA, EMPRESA' + + 'S.POBLACION as POBLACION_EMPRESA,'#10' EMPRESAS.PROVINCIA as PROV' + + 'INCIA_EMPRESA, EMPRESAS.CODIGO_POSTAL as CODIGO_POSTAL_EMPRESA,'#10 + + ' EMPRESAS.TELEFONO_1, EMPRESAS.FAX, EMPRESAS.MOVIL_1, EMPRESA' + + 'S.EMAIL_1,'#10' EMPRESAS.PAGINA_WEB, EMPRESAS.REGISTRO_MERCANTIL,' + + ' EMPRESAS.LOGOTIPO'#10'FROM V_FACTURAS_CLIENTE'#10'LEFT JOIN EMPRESAS ON' + + ' EMPRESAS.ID = ID_EMPRESA'#10'LEFT JOIN FORMAS_PAGO ON (FORMAS_PAGO.' + + 'ID = V_FACTURAS_CLIENTE.ID_FORMA_PAGO)'#10'LEFT JOIN CONTACTOS_DATOS' + + '_BANCO ON (CONTACTOS_DATOS_BANCO.ID_CONTACTO = V_FACTURAS_CLIENT' + + 'E.ID_CLIENTE)'#10'LEFT OUTER JOIN v_contactos_nombres ON (v_contacto' + + 's_nombres.id = V_FACTURAS_CLIENTE.id_cliente)'#10'WHERE V_FACTURAS_C' + + 'LIENTE.ID = :ID'#10 StatementType = stSQL ColumnMappings = < item @@ -1010,6 +1012,10 @@ object RptFacturasCliente: TRptFacturasCliente item DatasetField = 'ID_TIENDA' TableField = 'ID_TIENDA' + end + item + DatasetField = 'TIPO' + TableField = 'TIPO' end> end> Name = 'InformeFacturasCliente' @@ -1031,6 +1037,11 @@ object RptFacturasCliente: TRptFacturasCliente DataType = datDateTime DictionaryEntry = 'FacturasCliente_FECHA_FACTURA' end + item + Name = 'TIPO' + DataType = datString + Size = 1 + end item Name = 'TIENDA' DataType = datString @@ -1815,6 +1826,7 @@ object RptFacturasCliente: TRptFacturasCliente UseFileCache = True ShowProgress = False OverwritePrompt = False + EmbeddedFonts = True PrintOptimized = True Outline = False Background = False @@ -1822,7 +1834,7 @@ object RptFacturasCliente: TRptFacturasCliente Author = 'FactuGES' Subject = 'FactuGES' Creator = 'FactuGES' - ProtectionFlags = [ePrint, eModify, eCopy, eAnnot] + ProtectionFlags = [ePrint, eAnnot] HideToolbar = False HideMenubar = False HideWindowUI = False diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas index c749af99..fad6a780 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas +++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas @@ -46,6 +46,7 @@ type private FConnection: IDAConnection; FIdEmpresa: Integer; + FIdTienda: Integer; FFechaInicio: Variant; FFechaFin: Variant; FFechaVenInicio: Variant; @@ -55,7 +56,7 @@ type FImporteMinimo: Currency; FDesglosado : Boolean; - //Genera cada uno de los albaranes a imprimir + //Genera cada uno de las facturas a imprimir procedure _GenerarFactura(const ID: integer); overload; procedure PrepararTablaInforme(ATabla: TDAMemDataTable); @@ -66,7 +67,7 @@ type public function GenerarFactura(const ListaID : TIntegerArray): Binary; overload; - function GenerarFacturaEnPDF(const ListaID : TIntegerArray): Binary; + function GenerarFacturaEnPDF(const ListaID : TIntegerArray; 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; @@ -78,12 +79,12 @@ implementation {$R *.dfm} uses - uSistemaFunc, StrUtils, uROServer, DataAbstract4_Intf, + uSistemaFunc, StrUtils, uROServer, DataAbstract4_Intf, uBizFacturasClienteServer, uDataModuleServer, schFacturasClienteClient_Intf, schRecibosClienteClient_Intf; const rptFacturaCliente = 'InfFacturaCliente.fr3'; - + rptFacturaProformaCliente = 'InfFacturaCliente_proforma.fr3'; rptInformeIVA = 'InformeIVAClientes.fr3'; rptInformeIVADesglosado = 'InformeIVAClientesDesglosado.fr3'; rptInformeListadoFacturasCliente = 'InformeListadoFacturasCliente.fr3'; @@ -127,19 +128,39 @@ begin end; end; -function TRptFacturasCliente.GenerarFacturaEnPDF( - const ListaID: TIntegerArray): Binary; +function TRptFacturasCliente.GenerarFacturaEnPDF(const ListaID: TIntegerArray; const Usuario: AnsiString; const Firmado: Boolean): Binary; var i: Integer; + AStream : Binary; + ARutaFichero, ANombreFichero, LlamadaBat : String; begin Result := Binary.Create; try + //Inicializamos parametros + //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), IntToStr(FIdTienda)); + LlamadaBat := ARutaFichero + '"' + ANombreFichero + '"'; + if ExecAndWait(LlamadaBat) then + Result.LoadFromFile(ANombreFichero); + end; + end; finally end; end; @@ -710,7 +731,13 @@ begin tbl_Detalles.Active := True; tbl_Vencimientos.Active := True; - AInforme := DarRutaFichero(DarRutaInformes, rptFacturaCliente, 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; + if (tbl_Cabecera.FieldByName('TIPO').AsString = CTE_TIPO_PROFORMA) then + AInforme := DarRutaFichero(DarRutaInformes, rptFacturaProformaCliente, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString, tbl_Cabecera.FieldByName('ID_TIENDA').AsString) + else + 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.dfm b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm index 7b16580a..a0d4484b 100644 --- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm +++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm @@ -952,6 +952,12 @@ object srvFacturasCliente: TsrvFacturasCliente Size = 255 Value = '' end + item + Name = 'TIPO' + DataType = datString + Size = 1 + Value = '' + end item Name = 'FECHA_FACTURA' DataType = datDateTime @@ -1118,24 +1124,25 @@ object srvFacturasCliente: TsrvFacturasCliente TargetTable = 'FACTURAS_CLIENTE' SQL = 'INSERT INTO FACTURAS_CLIENTE ('#10' ID,'#10' ID_EMPRESA,'#10' REFER' + - 'ENCIA,'#10' FECHA_FACTURA,'#10' FECHA_VENCIMIENTO,'#10' BASE_IMPONI' + - 'BLE,'#10' DESCUENTO,'#10' IMPORTE_DESCUENTO,'#10' IVA,'#10' IMPORTE_' + - 'IVA,'#10' RE,'#10' IMPORTE_RE,'#10' IMPORTE_TOTAL,'#10' OBSERVACIONE' + - 'S,'#10' ID_CLIENTE,'#10' NIF_CIF,'#10' NOMBRE,'#10' CALLE,'#10' POBLA' + - 'CION,'#10' PROVINCIA,'#10' CODIGO_POSTAL,'#10' FECHA_ALTA,'#10' USUA' + - 'RIO,'#10' ID_FORMA_PAGO,'#10' RECARGO_EQUIVALENCIA,'#10' ID_TIPO_IV' + - 'A,'#10' IMPORTE_NETO,'#10' IMPORTE_PORTE,'#10' IGNORAR_CONTABILIDAD' + - ','#10' ID_TIENDA,'#10' ID_CONTRATO,'#10' SIN_COMISION,'#10' TIPO_FAC' + - 'TURA,'#10' SITUACION)'#10' VALUES ('#10' :ID,'#10' :ID_EMPRESA,'#10' :R' + - 'EFERENCIA,'#10' :FECHA_FACTURA,'#10' :FECHA_VENCIMIENTO,'#10' :BASE' + - '_IMPONIBLE,'#10' :DESCUENTO,'#10' :IMPORTE_DESCUENTO,'#10' :IVA,'#10' ' + - ' :IMPORTE_IVA,'#10' :RE,'#10' :IMPORTE_RE,'#10' :IMPORTE_TOTAL,'#10' ' + - ' :OBSERVACIONES,'#10' :ID_CLIENTE,'#10' :NIF_CIF,'#10' :NOMBRE,'#10' ' + - ' :CALLE,'#10' :POBLACION,'#10' :PROVINCIA,'#10' :CODIGO_POSTAL,'#10' ' + - ' CURRENT_TIMESTAMP,'#10' :USUARIO,'#10' :ID_FORMA_PAGO,'#10' :RECA' + - 'RGO_EQUIVALENCIA,'#10' :ID_TIPO_IVA,'#10' :IMPORTE_NETO,'#10' :IMPO' + - 'RTE_PORTE,'#10' :IGNORAR_CONTABILIDAD,'#10' :ID_TIENDA,'#10' :ID_CO' + - 'NTRATO,'#10' :SIN_COMISION,'#10' :TIPO_FACTURA,'#10' :SITUACION);'#10 + 'ENCIA,'#10' TIPO,'#10' FECHA_FACTURA,'#10' FECHA_VENCIMIENTO,'#10' B' + + 'ASE_IMPONIBLE,'#10' DESCUENTO,'#10' IMPORTE_DESCUENTO,'#10' IVA,'#10' ' + + ' IMPORTE_IVA,'#10' RE,'#10' IMPORTE_RE,'#10' IMPORTE_TOTAL,'#10' OB' + + 'SERVACIONES,'#10' ID_CLIENTE,'#10' NIF_CIF,'#10' NOMBRE,'#10' CALLE,' + + #10' POBLACION,'#10' PROVINCIA,'#10' CODIGO_POSTAL,'#10' FECHA_ALTA' + + ','#10' USUARIO,'#10' ID_FORMA_PAGO,'#10' RECARGO_EQUIVALENCIA,'#10' ' + + 'ID_TIPO_IVA,'#10' IMPORTE_NETO,'#10' IMPORTE_PORTE,'#10' IGNORAR_CO' + + 'NTABILIDAD,'#10' ID_TIENDA,'#10' ID_CONTRATO,'#10' SIN_COMISION,'#10' ' + + ' TIPO_FACTURA,'#10' SITUACION)'#10' VALUES ('#10' :ID,'#10' :ID_EMPRE' + + 'SA,'#10' :REFERENCIA,'#10' :TIPO,'#10' :FECHA_FACTURA,'#10' :FECHA_V' + + 'ENCIMIENTO,'#10' :BASE_IMPONIBLE,'#10' :DESCUENTO,'#10' :IMPORTE_DE' + + 'SCUENTO,'#10' :IVA,'#10' :IMPORTE_IVA,'#10' :RE,'#10' :IMPORTE_RE,'#10' ' + + ' :IMPORTE_TOTAL,'#10' :OBSERVACIONES,'#10' :ID_CLIENTE,'#10' :NIF' + + '_CIF,'#10' :NOMBRE,'#10' :CALLE,'#10' :POBLACION,'#10' :PROVINCIA,'#10' ' + + ' :CODIGO_POSTAL,'#10' CURRENT_TIMESTAMP,'#10' :USUARIO,'#10' :ID_' + + 'FORMA_PAGO,'#10' :RECARGO_EQUIVALENCIA,'#10' :ID_TIPO_IVA,'#10' :IM' + + 'PORTE_NETO,'#10' :IMPORTE_PORTE,'#10' :IGNORAR_CONTABILIDAD,'#10' :' + + 'ID_TIENDA,'#10' :ID_CONTRATO,'#10' :SIN_COMISION,'#10' :TIPO_FACTUR' + + 'A,'#10' :SITUACION);'#10 StatementType = stSQL ColumnMappings = <> end> diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas index 52856065..d75624a9 100644 --- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas +++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas @@ -36,7 +36,7 @@ type protected { IsrvFacturasCliente methods } function GenerateReport(const FacturaID: TIntegerArray): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const Usuario: AnsiString; const Firmado: Boolean): Binary; end; implementation @@ -78,14 +78,13 @@ begin ConnectionName := dmServer.ConnectionName; end; -function TsrvFacturasCliente.GenerarInformeEnPDF( - const ListaID: TIntegerArray): Binary; +function TsrvFacturasCliente.GenerarInformeEnPDF(const ListaID: TIntegerArray; const Usuario: AnsiString; const Firmado: Boolean): Binary; var AReportGenerator : TRptFacturasCliente; begin AReportGenerator := TRptFacturasCliente.Create(nil); try - Result := AReportGenerator.GenerarFacturaEnPDF(ListaID); + Result := AReportGenerator.GenerarFacturaEnPDF(ListaID, Usuario, Firmado); finally FreeAndNIL(AReportGenerator); end; diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj index a769db74..673f7547 100644 --- a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj +++ b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj @@ -49,45 +49,45 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fEditorElegirArticulosFacturaCliente
TForm diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm index 8a8de336..44abfc99 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm @@ -184,14 +184,15 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Width = 310 end inherited frViewObservaciones1: TfrViewObservaciones - Width = 521 + Width = 785 Height = 228 - ExplicitWidth = 521 + ExplicitWidth = 785 ExplicitHeight = 228 inherited memObservaciones: TcxDBMemo DataBinding.DataSource = frViewFacturaCliente1.DADataSource + ExplicitWidth = 785 Height = 228 - Width = 521 + Width = 785 end end inherited cbRecargoEquivalencia: TcxDBCheckBox diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm index b7c31001..8a7b2e94 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm @@ -59,7 +59,11 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente inherited TBXItem2: TTBXItem Visible = False end - object TBXItem41: TTBXItem [13] + object TBXItem44: TTBXItem [13] + Action = actGenerarPDF + DisplayMode = nbdmImageAndText + end + object TBXItem41: TTBXItem [14] Action = actEnviarMail DisplayMode = nbdmImageAndText end @@ -227,14 +231,14 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente Width = 263 end inherited txtFiltroTodo2: TcxTextEdit - Left = 459 + Left = 473 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 459 - ExplicitWidth = 250 - Width = 250 + ExplicitLeft = 473 + ExplicitWidth = 223 + Width = 223 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel @@ -333,6 +337,13 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente OnExecute = actConvertirEnFacturaExecute OnUpdate = actConvertirEnFacturaUpdate end + object actGenerarPDF: TAction + Category = 'Archivo' + Caption = 'Generar PDF' + ImageIndex = 28 + OnExecute = actGenerarPDFExecute + OnUpdate = actGenerarPDFUpdate + end end inherited SmallImages: TPngImageList [5] PngImages = < @@ -1118,6 +1129,29 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente 00000049454E44AE426082} Name = 'PngImage27' 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 = 'PngImage28' + Background = clWindow end> Left = 395 Bitmap = {} @@ -4766,4 +4800,8 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente Left = 136 Top = 144 end + object JSDialog1: TJSDialog + Left = 104 + Top = 320 + end end diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas index 9830c0a5..0a588eb0 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas @@ -45,18 +45,23 @@ type actNuevaProforma: TAction; JsNuevaProformaDialog: TJSDialog; actConvertirEnFactura: TAction; + JSDialog1: TJSDialog; + actGenerarPDF: TAction; + TBXItem44: TTBXItem; procedure FormShow(Sender: TObject); procedure actEliminarUpdate(Sender: TObject); procedure actNuevaFacturaExecute(Sender: TObject); + procedure actNuevaProformaExecute(Sender: TObject); procedure actNuevoAbonoExecute(Sender: TObject); procedure actInformesExecute(Sender: TObject); procedure OnListaAnosChange(Sender: TObject; const Text: string); procedure actEnviarMailUpdate(Sender: TObject); procedure actEnviarMailExecute(Sender: TObject); procedure actCambiarSituacionExecute(Sender: TObject); - procedure actNuevaProformaExecute(Sender: TObject); procedure actConvertirEnFacturaExecute(Sender: TObject); procedure actConvertirEnFacturaUpdate(Sender: TObject); + procedure actGenerarPDFExecute(Sender: TObject); + procedure actGenerarPDFUpdate(Sender: TObject); private FFacturas: IBizFacturaCliente; @@ -195,6 +200,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; @@ -250,9 +307,12 @@ begin GenerarFacturaCli(CTE_TIPO_PROFORMA); actRefrescar.Execute; end; - 100 : begin // Factura nueva vacia - if FController.AnadirProforma(Facturas) then - FController.Ver(Facturas); + 100 : begin // Factura nueva vacia, No funciona como el abono al hacer post me quita el insert en la tabla general + //optamos por generar objeto nuevo y refrescar despues, "menos óptimo" +// if FController.AnadirProforma(Facturas) then +// FController.Ver(Facturas); + FController.Ver(FController.AnadirProforma); + actRefrescar.Execute; end; end; end; diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm index 7cbaf6fe..bcb812f5 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm @@ -1,6 +1,6 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente - Width = 705 - Height = 497 + Width = 1081 + Height = 551 Align = alClient OnCreate = CustomViewCreate OnDestroy = CustomViewDestroy @@ -9,8 +9,8 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente object dxLayoutControl1: TdxLayoutControl Left = 0 Top = 0 - Width = 705 - Height = 497 + Width = 1081 + Height = 551 Align = alClient ParentBackground = True TabOrder = 0 @@ -20,8 +20,8 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente ExplicitWidth = 451 ExplicitHeight = 304 DesignSize = ( - 705 - 497) + 1081 + 551) object eReferencia: TcxDBTextEdit Left = 135 Top = 30 @@ -98,7 +98,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Width = 78 end object bFormasPago: TButton - Left = 311 + Left = 410 Top = 135 Width = 132 Height = 23 @@ -126,7 +126,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente inherited dxLayoutControl1: TdxLayoutControl Width = 351 Height = 63 - ExplicitWidth = 351 + ExplicitWidth = 421 ExplicitHeight = 63 inherited cbTienda: TcxComboBox ExplicitWidth = 399 @@ -135,7 +135,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente end end inline frViewClienteFactura1: TfrViewClienteFactura - Left = 471 + Left = 570 Top = 30 Width = 398 Height = 265 @@ -147,14 +147,14 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente ParentFont = False TabOrder = 9 ReadOnly = False - ExplicitLeft = 471 + ExplicitLeft = 570 ExplicitTop = 30 ExplicitWidth = 398 ExplicitHeight = 265 inherited dxLayoutControl1: TdxLayoutControl Width = 398 Height = 265 - ExplicitWidth = 398 + ExplicitWidth = 101 ExplicitHeight = 265 inherited edtlNombre: TcxDBTextEdit ExplicitWidth = 276 @@ -177,12 +177,12 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Width = 276 end inherited edtCodigoPostal: TcxDBTextEdit - Left = 192 - ExplicitLeft = 192 + Left = 397 + ExplicitLeft = 397 end inherited Button3: TBitBtn - Left = 82 - ExplicitLeft = 82 + Left = 287 + ExplicitLeft = 287 end inherited cxDBTextEdit1: TcxDBTextEdit ExplicitWidth = 283 @@ -231,7 +231,8 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente inherited memObservaciones: TcxDBMemo DataBinding.DataField = 'OBSERVACIONES' DataBinding.DataSource = DADataSource - ExplicitHeight = 228 + ExplicitWidth = 550 + ExplicitHeight = 20 Height = 228 end end diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm index 5001bcdc..9785cb9e 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm @@ -184,6 +184,9 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente object cxGridPagadas: TcxGridLevel Caption = 'Pagadas' end + object cxGridProforma: TcxGridLevel + Caption = 'Proformas' + end end inherited frViewFiltroBase1: TfrViewFiltroBase Width = 802 @@ -261,6 +264,11 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente object TBXItem2: TTBXItem Action = actProvincia end + object TBXSeparatorItem3: TTBXSeparatorItem + end + object TBXItem4: TTBXItem + Action = actTienda + end end end end diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas index 6583358d..808a53eb 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas @@ -68,6 +68,9 @@ type cxStyleProforma: TcxStyle; actTienda: TAction; actFormaPago: TAction; + TBXSeparatorItem3: TTBXSeparatorItem; + TBXItem4: TTBXItem; + cxGridProforma: TcxGridLevel; procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle); @@ -193,9 +196,20 @@ begin FFiltro := AddFilterGrid(fboAnd); case cxGrid.ActiveLevel.Index of - 1 : FFiltro.AddItem(cxGridViewSITUACION, foEqual, CTE_PENDIENTE, CTE_PENDIENTE); - 2 : FFiltro.AddItem(cxGridViewSITUACION, foEqual, CTE_PARCIAMENTE_PAGADA, CTE_PARCIAMENTE_PAGADA); - 3 : FFiltro.AddItem(cxGridViewSITUACION, foEqual, CTE_PAGADA, CTE_PAGADA); + 0 : FFiltro.AddItem(cxGridViewTIPO, foNotEqual, CTE_TIPO_PROFORMA, CTE_TIPO_PROFORMA); + 1 : Begin + FFiltro.AddItem(cxGridViewSITUACION, foEqual, CTE_PENDIENTE, CTE_PENDIENTE); + FFiltro.AddItem(cxGridViewTIPO, foNotEqual, CTE_TIPO_PROFORMA, CTE_TIPO_PROFORMA); + End; + 2 : Begin + FFiltro.AddItem(cxGridViewSITUACION, foEqual, CTE_PARCIAMENTE_PAGADA, CTE_PARCIAMENTE_PAGADA); + FFiltro.AddItem(cxGridViewTIPO, foNotEqual, CTE_TIPO_PROFORMA, CTE_TIPO_PROFORMA); + End; + 3 : Begin + FFiltro.AddItem(cxGridViewSITUACION, foEqual, CTE_PAGADA, CTE_PAGADA); + FFiltro.AddItem(cxGridViewTIPO, foNotEqual, CTE_TIPO_PROFORMA, CTE_TIPO_PROFORMA); + End; + 4 : FFiltro.AddItem(cxGridViewTIPO, foEqual, CTE_TIPO_PROFORMA, CTE_TIPO_PROFORMA); end; end; @@ -216,6 +230,9 @@ end; procedure TfrViewFacturasCliente.ConfigView; begin inherited; + //Para que nos filtre la pestaña todas y quite las facturas proforma + AnadirOtrosFiltros; + //Solo para aliso if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ALISO) then begin diff --git a/Source/Modulos/Facturas de proveedor/Model/uBizFacturasProveedorServer.pas b/Source/Modulos/Facturas de proveedor/Model/uBizFacturasProveedorServer.pas index c4fef884..04820595 100644 --- a/Source/Modulos/Facturas de proveedor/Model/uBizFacturasProveedorServer.pas +++ b/Source/Modulos/Facturas de proveedor/Model/uBizFacturasProveedorServer.pas @@ -94,7 +94,7 @@ var AClientID : TGUID; ATipo : String; begin -//No se hace distinción en la referencia entre facturas y abonos +//No se hace distinción en la referencia entre facturas y abonos (factura rectificativa) // if TIPO = CTE_TIPO_FACTURA then ATipo := REF_FACTURAS_PROVEEDOR; // else diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.dfm index 03deefa3..b6b5b7bc 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.dfm @@ -277,6 +277,11 @@ inherited frViewFacturasProveedor: TfrViewFacturasProveedor object TBXItem4: TTBXItem Action = actFormaPago end + object TBXSeparatorItem4: TTBXSeparatorItem + end + object TBXItem5: TTBXItem + Action = actTienda + end end end end @@ -304,6 +309,11 @@ inherited frViewFacturasProveedor: TfrViewFacturasProveedor OnExecute = actFormaPagoExecute OnUpdate = actFormaPagoUpdate end + object actTienda: TAction + Caption = 'Tienda' + OnExecute = actTiendaExecute + OnUpdate = actTiendaUpdate + end end inherited GridPNGImageList: TPngImageList PngImages = < diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.pas b/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.pas index 69ef45e1..969375d5 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.pas +++ b/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.pas @@ -64,6 +64,9 @@ type actFormaPago: TAction; TBXSeparatorItem3: TTBXSeparatorItem; TBXItem4: TTBXItem; + actTienda: TAction; + TBXSeparatorItem4: TTBXSeparatorItem; + TBXItem5: TTBXItem; procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle); @@ -74,6 +77,8 @@ type procedure actProvinciaUpdate(Sender: TObject); procedure actFormaPagoExecute(Sender: TObject); procedure actFormaPagoUpdate(Sender: TObject); + procedure actTiendaExecute(Sender: TObject); + procedure actTiendaUpdate(Sender: TObject); private //Filtros relativos a la vista @@ -159,6 +164,26 @@ begin (Sender as TAction).Checked := not (cxGridViewPROVINCIA.GroupIndex < 0); end; +procedure TfrViewFacturasProveedor.actTiendaExecute(Sender: TObject); +begin + if (cxGridViewTIENDA.GroupIndex < 0) then + begin + cxGridViewTIENDA.GroupIndex := cxGridView.GroupedColumnCount; + cxGridViewTIENDA.Visible := False; + end + else + begin + cxGridViewTIENDA.GroupIndex := -1; + cxGridViewTIENDA.Visible := True; + end; +end; + +procedure TfrViewFacturasProveedor.actTiendaUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Checked := not (cxGridViewTIENDA.GroupIndex < 0); +end; + procedure TfrViewFacturasProveedor.AnadirFiltroFechas; var Columna: TcxGridDBColumn; diff --git a/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas b/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas index 96f35041..b77091e8 100644 --- a/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas +++ b/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas @@ -61,6 +61,7 @@ type function ElegirPedidos(APedido: IBizPedidoProveedor; AMensaje: String; AMultiSelect: Boolean): IBizPedidoProveedor; procedure RecuperarProveedor(APedido: IBizPedidoProveedor); Procedure AsignarContrato(APedido: IBizPedidoProveedor; const ID_CONTRATO: Integer; AReferencia, ANombreCliente: String); + procedure AsignarTienda(APedido: IBIzPedidoProveedor; const ID_TIENDA: Integer); end; TPedidosProveedorController = class(TControllerBase, IPedidosProveedorController) @@ -135,6 +136,7 @@ type function ExtraerSeleccionados(APedido: IBizPedidoProveedor) : IBizPedidoProveedor; function ElegirPedidos(APedido: IBizPedidoProveedor; AMensaje: String; AMultiSelect: Boolean): IBizPedidoProveedor; Procedure AsignarContrato(APedido: IBizPedidoProveedor; const ID_CONTRATO: Integer; AReferencia, ANombreCliente: String); + procedure AsignarTienda(APedido: IBIzPedidoProveedor; const ID_TIENDA: Integer); function DarListaAnosPedidos: TStringList; procedure FiltrarAno(APedido: IBizPedidoProveedor; ADynWhereDataTable: WideString; const Ano: String); @@ -189,6 +191,32 @@ begin FDataModule := TDataModulePedidosProveedor.Create(Nil); end; +procedure TPedidosProveedorController.AsignarTienda( + APedido: IBIzPedidoProveedor; const ID_TIENDA: Integer); +var + bEnEdicion : Boolean; + +begin + if not Assigned(APedido) then + raise Exception.Create ('APedido no asignado'); + + ShowHourglassCursor; + try + bEnEdicion := (APedido.DataTable.State in dsEditModes); + if not bEnEdicion then + APedido.Edit; + + APedido.DataTable.Edit; + APedido.ID_TIENDA := ID_TIENDA; + + if not bEnEdicion then + APedido.Post; + + finally + HideHourglassCursor; + end; +end; + function TPedidosProveedorController.Buscar(const ID: Integer): IBizPedidoProveedor; begin Result := FDataModule.GetItem(ID); diff --git a/Source/Modulos/Pedidos a proveedor/Model/uBizPedidosProveedor.pas b/Source/Modulos/Pedidos a proveedor/Model/uBizPedidosProveedor.pas index 7134b418..347674ec 100644 --- a/Source/Modulos/Pedidos a proveedor/Model/uBizPedidosProveedor.pas +++ b/Source/Modulos/Pedidos a proveedor/Model/uBizPedidosProveedor.pas @@ -329,14 +329,6 @@ begin DataTable.Edit; ID_PROVEEDOR := FProveedor.ID; - - if FProveedor.ID_TIENDA > 0 then - begin - ID_TIENDA := FProveedor.ID_TIENDA; - TIENDA := FProveedor.TIENDA; - end; - - DataTable.Post; //Muy importante ya que es necesario hacer un post de la cabecera antes de añadir detalles //si se quita el id de la cabecera y los detalles se desincroniza if bEnEdicion then diff --git a/Source/Modulos/Pedidos a proveedor/Model/uBizPedidosProveedorServer.pas b/Source/Modulos/Pedidos a proveedor/Model/uBizPedidosProveedorServer.pas index c4de8df7..3e393290 100644 --- a/Source/Modulos/Pedidos a proveedor/Model/uBizPedidosProveedorServer.pas +++ b/Source/Modulos/Pedidos a proveedor/Model/uBizPedidosProveedorServer.pas @@ -80,7 +80,8 @@ begin GetClassFactory('srvReferencias').CreateInstance(AClientID, Intf); AReferenciasService := Intf as IsrvReferencias; - Result := AReferenciasService.DarNuevaReferencia(REF_PEDIDOS_PROVEEDOR, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa +// Result := AReferenciasService.DarNuevaReferencia(REF_PEDIDOS_PROVEEDOR, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa + Result := AReferenciasService.DarNuevaReferencia(REF_PEDIDOS_PROVEEDOR, ID_EMPRESA, ID_TIENDA); //Referencia diferente según tienda end; function TBizPedidosProveedorServer.IncrementarReferencia: Boolean; @@ -93,7 +94,8 @@ begin GetClassFactory('srvReferencias').CreateInstance(AClientID, Intf); AReferenciasService := Intf as IsrvReferencias; - Result := AReferenciasService.IncrementarValorReferencia(REF_PEDIDOS_PROVEEDOR, Self.REFERENCIA, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa +// Result := AReferenciasService.IncrementarValorReferencia(REF_PEDIDOS_PROVEEDOR, Self.REFERENCIA, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa + Result := AReferenciasService.IncrementarValorReferencia(REF_PEDIDOS_PROVEEDOR, Self.REFERENCIA, ID_EMPRESA, ID_TIENDA); //Referencia diferente según tienda end; initialization diff --git a/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj b/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj index af5fe38a..309e214a 100644 --- a/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj +++ b/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj @@ -49,28 +49,28 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +
fEditorDireccionEntregaPedidoProveedor
TfEditorDireccionEntregaPedidoProveedor diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm index 03872a4a..2b0cbed9 100644 --- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm +++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm @@ -107,31 +107,8 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor ExplicitHeight = 463 inherited frViewProveedorPedido: TfrViewDatosYSeleccionProveedor Left = 551 - Width = 357 ExplicitLeft = 551 - ExplicitWidth = 357 inherited dxLayoutControl1: TdxLayoutControl - Width = 357 - inherited edtlNombre: TcxDBTextEdit - ExplicitWidth = 283 - Width = 283 - end - inherited edtNIFCIF: TcxDBTextEdit - ExplicitWidth = 283 - Width = 283 - end - inherited edtCalle: TcxDBTextEdit - ExplicitWidth = 283 - Width = 283 - end - inherited edtPoblacion: TcxDBTextEdit - ExplicitWidth = 176 - Width = 176 - end - inherited edtProvincia: TcxDBTextEdit - ExplicitWidth = 283 - Width = 283 - end inherited edtCodigoPostal: TcxDBTextEdit Left = 237 ExplicitLeft = 237 @@ -142,30 +119,8 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor end end end - inherited edtFechaPedido: TcxDBDateEdit - ExplicitWidth = 158 - Width = 158 - end - inherited edtFechaConfirmacion: TcxDBDateEdit - ExplicitWidth = 158 - Width = 158 - end - inherited edtFechaEntrega: TcxDBDateEdit - ExplicitWidth = 158 - Width = 158 - end - inherited eReferencia: TcxDBTextEdit - ExplicitWidth = 158 - Width = 158 - end inherited frViewDireccionEntregaPedidoProv1: TfrViewDireccionEntregaPedidoProv - Width = 273 - Height = 166 - ExplicitWidth = 273 - ExplicitHeight = 166 inherited dxLayoutControl1: TdxLayoutControl - Width = 273 - Height = 166 inherited rdxDestino1: TRadioButton Width = 253 ExplicitWidth = 253 @@ -203,8 +158,6 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 323 - ExplicitWidth = 183 - Width = 183 end inherited eNumBultos: TcxDBSpinEdit Left = 401 @@ -212,60 +165,24 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor end end end - inherited cbFormaPago: TcxDBLookupComboBox - ExplicitWidth = 20 - Width = 20 - end inherited bFormasPago: TButton Left = 389 ExplicitLeft = 389 end - inherited edtFechaEnvio: TcxDBDateEdit - ExplicitWidth = 158 - Width = 158 - end - inherited eReferenciaContratoCli: TcxTextEdit - ExplicitWidth = 20 - Width = 20 - end inherited Button1: TButton Left = 421 ExplicitLeft = 421 end inherited frViewTienda1: TfrViewTienda Left = 551 - Width = 357 Enabled = True ExplicitLeft = 551 - ExplicitWidth = 357 - inherited dxLayoutControl1: TdxLayoutControl - Width = 357 - inherited cbTienda: TcxComboBox - ExplicitWidth = 390 - Width = 390 - end - end end inherited frViewObservaciones1: TfrViewObservaciones - Width = 422 - ExplicitWidth = 422 inherited memObservaciones: TcxDBMemo DataBinding.DataSource = frViewPedidoProveedor1.DADataSource - Width = 422 end end - inherited edtlDescripcion: TcxDBTextEdit - ExplicitWidth = 283 - Width = 283 - end - inherited edtFechaEnvio2: TcxDBDateEdit - ExplicitWidth = 257 - Width = 257 - end - inherited cbVendedor: TcxDBLookupComboBox - ExplicitWidth = 250 - Width = 250 - end inherited Button2: TButton Left = 315 ExplicitLeft = 315 @@ -523,8 +440,6 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor Style.IsFontAssigned = True ExplicitLeft = 164 ExplicitTop = 38 - ExplicitWidth = 93 - Width = 93 end inherited ImporteIVA: TcxDBCurrencyEdit Left = 636 @@ -532,8 +447,6 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor Style.IsFontAssigned = True ExplicitLeft = 636 ExplicitTop = 88 - ExplicitWidth = 137 - Width = 137 end inherited ImporteTotal: TcxDBCurrencyEdit Left = 566 @@ -541,8 +454,6 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor Style.IsFontAssigned = True ExplicitLeft = 566 ExplicitTop = 142 - ExplicitWidth = 137 - Width = 137 end inherited edtDescuento: TcxDBSpinEdit Left = 93 @@ -564,8 +475,6 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor Style.IsFontAssigned = True ExplicitLeft = 565 ExplicitTop = 11 - ExplicitWidth = 92 - Width = 92 end inherited edtRE: TcxDBSpinEdit Left = 565 @@ -584,8 +493,6 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor Style.IsFontAssigned = True ExplicitLeft = 636 ExplicitTop = 115 - ExplicitWidth = 56 - Width = 56 end inherited eImporteNeto: TcxDBCurrencyEdit Left = 93 @@ -593,8 +500,6 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor Style.IsFontAssigned = True ExplicitLeft = 93 ExplicitTop = 11 - ExplicitWidth = 147 - Width = 147 end inherited ePorte: TcxDBCurrencyEdit Left = 93 @@ -603,8 +508,6 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor Style.IsFontAssigned = True ExplicitLeft = 93 ExplicitTop = 65 - ExplicitWidth = 147 - Width = 147 end inherited eIVA: TcxDBLookupComboBox Left = 93 @@ -613,8 +516,6 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor DataBinding.DataSource = nil ExplicitLeft = 93 ExplicitTop = 92 - ExplicitWidth = 81 - Width = 81 end inherited bTiposIVA: TButton Left = 305 @@ -628,8 +529,6 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor DataBinding.DataField = '' ExplicitLeft = 93 ExplicitTop = 119 - ExplicitWidth = 219 - Width = 219 end inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited dxLayoutControl1Group1: TdxLayoutGroup diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.pas b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.pas index 80b2b0cf..6e2bff6f 100644 --- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.pas +++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.pas @@ -219,8 +219,12 @@ end; procedure TfEditorPedidoProveedor.OnProveedorChanged(Sender: TObject); begin FPedido.Proveedor := ViewPedido.ViewProveedorPedido.Proveedor; + + if (ShowConfirmMessage('Atención tienda asignada', '¿Desea actualizar la tienda a la pertenece el pedido en base a la tienda a la que pertenece el proveedor seleccionado?') = IDYES) then + FController.AsignarTienda(FPedido, FPedido.Proveedor.ID_TIENDA); + frViewPedidoProveedor1.frViewTienda1.ElegirTienda(FPedido.ID_TIENDA); - + // Si el pedido tiene detalles hay que mirar si los descuentos y otros campos // para los artículos hay que cambiarlos. // if (FPedido.Detalles.RecordCount > 0) then diff --git a/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas b/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas index e5691c6f..42e29075 100644 --- a/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas +++ b/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas @@ -113,6 +113,7 @@ type function DarListaAnosPresupuestos: TStringList; procedure FiltrarAno(APresupuesto: IBizPresupuestoCliente; ADynWhereDataTable: WideString; const Ano: String); + procedure FechaUltimaActualizacionToday (APresupuesto: IBizPresupuestoCliente); end; TPresupuestosClienteController = class(TControllerBase, IPresupuestosClienteController) @@ -189,6 +190,7 @@ type function DarListaAnosPresupuestos: TStringList; procedure FiltrarAno(APresupuesto: IBizPresupuestoCliente; ADynWhereDataTable: WideString; const Ano: String); + procedure FechaUltimaActualizacionToday (APresupuesto: IBizPresupuestoCliente); end; implementation @@ -782,9 +784,7 @@ begin if not Assigned(APresupuesto) then raise Exception.Create ('Presupuesto no asignado (EsModificable)'); - //Result := (APresupuesto.SITUACION = SITUACION_PRESUPUESTO_PENDIENTE); - - Result := True; + Result := (APresupuesto.SITUACION <> SITUACION_PRESUPUESTO_PLANTILLA); end; procedure TPresupuestosClienteController.RecalcularImportes( @@ -870,6 +870,32 @@ begin Result := ASeleccionados; end; +procedure TPresupuestosClienteController.FechaUltimaActualizacionToday(APresupuesto: IBizPresupuestoCliente); +var + bEnEdicion : Boolean; +begin + if not Assigned(APresupuesto) then + raise Exception.Create ('Contrato no asignado (CopiarDireccion)'); + + if APresupuesto.DataTable.Active then + APresupuesto.DataTable.Active := True; + + bEnEdicion := (APresupuesto.DataTable.State in dsEditModes); + if not bEnEdicion then + APresupuesto.Edit; + + ShowHourglassCursor; + APresupuesto.Edit; + try + APresupuesto.FECHA_ULT_PRESENTACION_CLIENTE := DateOf(Date); + + if not bEnEdicion then + APresupuesto.Post; + finally + HideHourglassCursor; + end; +end; + procedure TPresupuestosClienteController.FiltrarAno(APresupuesto: IBizPresupuestoCliente; ADynWhereDataTable: WideString;const Ano: String); var Condicion: TDAWhereExpression; diff --git a/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm index 1ef011d9..2a5e0192 100644 --- a/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm @@ -308,6 +308,10 @@ inherited DataModulePresupuestosCliente: TDataModulePresupuestosCliente Size = 255 DisplayLabel = 'Otros nombres' DictionaryEntry = 'PresupuestosCliente_LISTA_NOMBRES' + end + item + Name = 'FECHA_ULT_PRESENTACION_CLIENTE' + DataType = datDateTime end> Params = <> StreamingOptions = [soDisableEventsWhileStreaming] diff --git a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas index 3aac314d..d5a1c757 100644 --- a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas +++ b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas @@ -9,12 +9,12 @@ 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 = '{B97FDFCF-3DC5-4FBD-A7CA-D8410AE6D1A2}'; - RID_Propiedades = '{EC5DE5CF-02CE-44C1-B361-0AAFF7B78ADC}'; - RID_ListaAnosPresupuestos = '{92B72FB6-5806-4F60-A078-A8BF296A4802}'; - RID_PresupuestosCliente = '{5F381B4C-4432-4E10-B498-A9D9093769AC}'; - RID_CapitulosPresupuesto = '{ABB90CA8-CFFC-4FA2-94D3-FE61B70DE842}'; - RID_PresupuestosCliente_Detalles = '{215F3858-E25C-4697-B36E-6E4862292811}'; + RID_Valores = '{1C137EA2-79F9-4B4C-905B-31E2F3118006}'; + RID_Propiedades = '{A64DFA30-E2C1-4317-B535-D2FEC9DD5FDC}'; + RID_ListaAnosPresupuestos = '{AFF490F1-4DC0-4717-B4A1-1C66A8BE0B61}'; + RID_PresupuestosCliente = '{CC490968-9BAD-41E4-81CB-A6EEBFE5F382}'; + RID_CapitulosPresupuesto = '{2F44DC36-32F6-45B9-85D6-3D793A9F4AE2}'; + RID_PresupuestosCliente_Detalles = '{C95D5B67-4EC8-4B81-A498-2104C61C977C}'; { Data table names } nme_Valores = 'Valores'; @@ -101,6 +101,7 @@ const fld_PresupuestosClienteCALIDADES = 'CALIDADES'; fld_PresupuestosClienteREFERENCIA_CLIENTE = 'REFERENCIA_CLIENTE'; fld_PresupuestosClienteLISTA_NOMBRES = 'LISTA_NOMBRES'; + fld_PresupuestosClienteFECHA_ULT_PRESENTACION_CLIENTE = 'FECHA_ULT_PRESENTACION_CLIENTE'; { PresupuestosCliente field indexes } idx_PresupuestosClienteID = 0; @@ -147,6 +148,7 @@ const idx_PresupuestosClienteCALIDADES = 41; idx_PresupuestosClienteREFERENCIA_CLIENTE = 42; idx_PresupuestosClienteLISTA_NOMBRES = 43; + idx_PresupuestosClienteFECHA_ULT_PRESENTACION_CLIENTE = 44; { CapitulosPresupuesto fields } fld_CapitulosPresupuestoID = 'ID'; @@ -219,7 +221,7 @@ const type { IValores } IValores = interface(IDAStronglyTypedDataTable) - ['{1F250F6D-3212-402A-9D52-3FFEF4F656F4}'] + ['{D66A0BC2-1BB9-4699-8E7A-786E0205A42D}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -326,7 +328,7 @@ type { IPropiedades } IPropiedades = interface(IDAStronglyTypedDataTable) - ['{0986E005-7249-4D17-80E3-4D7E14429CCB}'] + ['{5CA94698-11F6-4DAB-82E2-7BC712E7E4D8}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -373,7 +375,7 @@ type { IListaAnosPresupuestos } IListaAnosPresupuestos = interface(IDAStronglyTypedDataTable) - ['{F1CE9770-4F7E-47B9-9E11-CF91133C609D}'] + ['{B695311B-59BC-4222-B586-5CE4E46426D5}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -408,7 +410,7 @@ type { IPresupuestosCliente } IPresupuestosCliente = interface(IDAStronglyTypedDataTable) - ['{632DB14E-4E7E-4FBA-BAB3-0E0A4F4358F1}'] + ['{B2C60249-0034-42C6-ACB9-E6AF356420DD}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -581,6 +583,10 @@ type procedure SetLISTA_NOMBRESValue(const aValue: String); function GetLISTA_NOMBRESIsNull: Boolean; procedure SetLISTA_NOMBRESIsNull(const aValue: Boolean); + function GetFECHA_ULT_PRESENTACION_CLIENTEValue: DateTime; + procedure SetFECHA_ULT_PRESENTACION_CLIENTEValue(const aValue: DateTime); + function GetFECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean; + procedure SetFECHA_ULT_PRESENTACION_CLIENTEIsNull(const aValue: Boolean); { Properties } @@ -672,6 +678,8 @@ type property REFERENCIA_CLIENTEIsNull: Boolean read GetREFERENCIA_CLIENTEIsNull write SetREFERENCIA_CLIENTEIsNull; property LISTA_NOMBRES: String read GetLISTA_NOMBRESValue write SetLISTA_NOMBRESValue; property LISTA_NOMBRESIsNull: Boolean read GetLISTA_NOMBRESIsNull write SetLISTA_NOMBRESIsNull; + property FECHA_ULT_PRESENTACION_CLIENTE: DateTime read GetFECHA_ULT_PRESENTACION_CLIENTEValue write SetFECHA_ULT_PRESENTACION_CLIENTEValue; + property FECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean read GetFECHA_ULT_PRESENTACION_CLIENTEIsNull write SetFECHA_ULT_PRESENTACION_CLIENTEIsNull; end; { TPresupuestosClienteDataTableRules } @@ -860,6 +868,10 @@ type procedure SetLISTA_NOMBRESValue(const aValue: String); virtual; function GetLISTA_NOMBRESIsNull: Boolean; virtual; procedure SetLISTA_NOMBRESIsNull(const aValue: Boolean); virtual; + function GetFECHA_ULT_PRESENTACION_CLIENTEValue: DateTime; virtual; + procedure SetFECHA_ULT_PRESENTACION_CLIENTEValue(const aValue: DateTime); virtual; + function GetFECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean; virtual; + procedure SetFECHA_ULT_PRESENTACION_CLIENTEIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; @@ -950,6 +962,8 @@ type property REFERENCIA_CLIENTEIsNull: Boolean read GetREFERENCIA_CLIENTEIsNull write SetREFERENCIA_CLIENTEIsNull; property LISTA_NOMBRES: String read GetLISTA_NOMBRESValue write SetLISTA_NOMBRESValue; property LISTA_NOMBRESIsNull: Boolean read GetLISTA_NOMBRESIsNull write SetLISTA_NOMBRESIsNull; + property FECHA_ULT_PRESENTACION_CLIENTE: DateTime read GetFECHA_ULT_PRESENTACION_CLIENTEValue write SetFECHA_ULT_PRESENTACION_CLIENTEValue; + property FECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean read GetFECHA_ULT_PRESENTACION_CLIENTEIsNull write SetFECHA_ULT_PRESENTACION_CLIENTEIsNull; public constructor Create(aDataTable: TDADataTable); override; @@ -959,7 +973,7 @@ type { ICapitulosPresupuesto } ICapitulosPresupuesto = interface(IDAStronglyTypedDataTable) - ['{AE4D0841-3455-4F06-BCC4-F5CB620D6E6F}'] + ['{8DDBB981-6B18-428A-9F4E-FF4BE6283AD4}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1114,7 +1128,7 @@ type { IPresupuestosCliente_Detalles } IPresupuestosCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{2DD0D791-E9A1-4501-8382-B10F87D19770}'] + ['{D156932E-C94A-4BD6-A3CF-B3EF3166E76E}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2575,6 +2589,27 @@ begin DataTable.Fields[idx_PresupuestosClienteLISTA_NOMBRES].AsVariant := Null; end; +function TPresupuestosClienteDataTableRules.GetFECHA_ULT_PRESENTACION_CLIENTEValue: DateTime; +begin + result := DataTable.Fields[idx_PresupuestosClienteFECHA_ULT_PRESENTACION_CLIENTE].AsDateTime; +end; + +procedure TPresupuestosClienteDataTableRules.SetFECHA_ULT_PRESENTACION_CLIENTEValue(const aValue: DateTime); +begin + DataTable.Fields[idx_PresupuestosClienteFECHA_ULT_PRESENTACION_CLIENTE].AsDateTime := aValue; +end; + +function TPresupuestosClienteDataTableRules.GetFECHA_ULT_PRESENTACION_CLIENTEIsNull: boolean; +begin + result := DataTable.Fields[idx_PresupuestosClienteFECHA_ULT_PRESENTACION_CLIENTE].IsNull; +end; + +procedure TPresupuestosClienteDataTableRules.SetFECHA_ULT_PRESENTACION_CLIENTEIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_PresupuestosClienteFECHA_ULT_PRESENTACION_CLIENTE].AsVariant := Null; +end; + { TCapitulosPresupuestoDataTableRules } constructor TCapitulosPresupuestoDataTableRules.Create(aDataTable: TDADataTable); diff --git a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas index bed82f90..23921c51 100644 --- a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas +++ b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas @@ -9,17 +9,17 @@ 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 = '{8A602FA2-F0F7-48FF-9D5C-450DD49824A0}'; - RID_PropiedadesDelta = '{ED1FE07A-4D3A-42CA-B260-9C0F63280666}'; - RID_ListaAnosPresupuestosDelta = '{1C36675B-4471-4B14-BE62-E6B8B99DBBC9}'; - RID_PresupuestosClienteDelta = '{FB71F4AF-2DC1-41AF-BB17-E817422E50C9}'; - RID_CapitulosPresupuestoDelta = '{FE29C9E0-026F-4C67-8D59-3D9ECA83E94E}'; - RID_PresupuestosCliente_DetallesDelta = '{E0A8A450-F599-49A7-80FA-05390499C535}'; + RID_ValoresDelta = '{F1287920-FCBE-4504-9B47-E59123D3BDA3}'; + RID_PropiedadesDelta = '{EC69B037-7162-4B60-B280-DC0BE4C2C763}'; + RID_ListaAnosPresupuestosDelta = '{1F8FFF3A-9750-4D9F-944E-3B5A4696FD1C}'; + RID_PresupuestosClienteDelta = '{F7B626AE-70AA-4FEB-8E94-9B5D049DBF5B}'; + RID_CapitulosPresupuestoDelta = '{CDA86224-B80C-4EE6-BA08-1FBE48C27FE6}'; + RID_PresupuestosCliente_DetallesDelta = '{F7A55A7B-967E-410C-AA6D-C1D14E2D57DD}'; type { IValoresDelta } IValoresDelta = interface(IValores) - ['{8A602FA2-F0F7-48FF-9D5C-450DD49824A0}'] + ['{F1287920-FCBE-4504-9B47-E59123D3BDA3}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -125,7 +125,7 @@ type { IPropiedadesDelta } IPropiedadesDelta = interface(IPropiedades) - ['{ED1FE07A-4D3A-42CA-B260-9C0F63280666}'] + ['{EC69B037-7162-4B60-B280-DC0BE4C2C763}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -171,7 +171,7 @@ type { IListaAnosPresupuestosDelta } IListaAnosPresupuestosDelta = interface(IListaAnosPresupuestos) - ['{1C36675B-4471-4B14-BE62-E6B8B99DBBC9}'] + ['{1F8FFF3A-9750-4D9F-944E-3B5A4696FD1C}'] { Property getters and setters } function GetOldANOValue : String; @@ -205,7 +205,7 @@ type { IPresupuestosClienteDelta } IPresupuestosClienteDelta = interface(IPresupuestosCliente) - ['{FB71F4AF-2DC1-41AF-BB17-E817422E50C9}'] + ['{F7B626AE-70AA-4FEB-8E94-9B5D049DBF5B}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -251,6 +251,7 @@ type function GetOldCALIDADESValue : IROStrings; function GetOldREFERENCIA_CLIENTEValue : String; function GetOldLISTA_NOMBRESValue : String; + function GetOldFECHA_ULT_PRESENTACION_CLIENTEValue : DateTime; { Properties } property OldID : Integer read GetOldIDValue; @@ -297,6 +298,7 @@ type property OldCALIDADES : IROStrings read GetOldCALIDADESValue; property OldREFERENCIA_CLIENTE : String read GetOldREFERENCIA_CLIENTEValue; property OldLISTA_NOMBRES : String read GetOldLISTA_NOMBRESValue; + property OldFECHA_ULT_PRESENTACION_CLIENTE : DateTime read GetOldFECHA_ULT_PRESENTACION_CLIENTEValue; end; { TPresupuestosClienteBusinessProcessorRules } @@ -573,6 +575,12 @@ type function GetOldLISTA_NOMBRESIsNull: Boolean; virtual; procedure SetLISTA_NOMBRESValue(const aValue: String); virtual; procedure SetLISTA_NOMBRESIsNull(const aValue: Boolean); virtual; + function GetFECHA_ULT_PRESENTACION_CLIENTEValue: DateTime; virtual; + function GetFECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean; virtual; + function GetOldFECHA_ULT_PRESENTACION_CLIENTEValue: DateTime; virtual; + function GetOldFECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean; virtual; + procedure SetFECHA_ULT_PRESENTACION_CLIENTEValue(const aValue: DateTime); virtual; + procedure SetFECHA_ULT_PRESENTACION_CLIENTEIsNull(const aValue: Boolean); virtual; { Properties } property ID : Integer read GetIDValue write SetIDValue; @@ -751,6 +759,10 @@ type property LISTA_NOMBRESIsNull : Boolean read GetLISTA_NOMBRESIsNull write SetLISTA_NOMBRESIsNull; property OldLISTA_NOMBRES : String read GetOldLISTA_NOMBRESValue; property OldLISTA_NOMBRESIsNull : Boolean read GetOldLISTA_NOMBRESIsNull; + property FECHA_ULT_PRESENTACION_CLIENTE : DateTime read GetFECHA_ULT_PRESENTACION_CLIENTEValue write SetFECHA_ULT_PRESENTACION_CLIENTEValue; + property FECHA_ULT_PRESENTACION_CLIENTEIsNull : Boolean read GetFECHA_ULT_PRESENTACION_CLIENTEIsNull write SetFECHA_ULT_PRESENTACION_CLIENTEIsNull; + property OldFECHA_ULT_PRESENTACION_CLIENTE : DateTime read GetOldFECHA_ULT_PRESENTACION_CLIENTEValue; + property OldFECHA_ULT_PRESENTACION_CLIENTEIsNull : Boolean read GetOldFECHA_ULT_PRESENTACION_CLIENTEIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; @@ -760,7 +772,7 @@ type { ICapitulosPresupuestoDelta } ICapitulosPresupuestoDelta = interface(ICapitulosPresupuesto) - ['{FE29C9E0-026F-4C67-8D59-3D9ECA83E94E}'] + ['{CDA86224-B80C-4EE6-BA08-1FBE48C27FE6}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldPOSICIONValue : Integer; @@ -914,7 +926,7 @@ type { IPresupuestosCliente_DetallesDelta } IPresupuestosCliente_DetallesDelta = interface(IPresupuestosCliente_Detalles) - ['{E0A8A450-F599-49A7-80FA-05390499C535}'] + ['{F7A55A7B-967E-410C-AA6D-C1D14E2D57DD}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_PRESUPUESTOValue : Integer; @@ -2920,6 +2932,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteLISTA_NOMBRES] := Null; end; +function TPresupuestosClienteBusinessProcessorRules.GetFECHA_ULT_PRESENTACION_CLIENTEValue: DateTime; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteFECHA_ULT_PRESENTACION_CLIENTE]; +end; + +function TPresupuestosClienteBusinessProcessorRules.GetFECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteFECHA_ULT_PRESENTACION_CLIENTE]); +end; + +function TPresupuestosClienteBusinessProcessorRules.GetOldFECHA_ULT_PRESENTACION_CLIENTEValue: DateTime; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosClienteFECHA_ULT_PRESENTACION_CLIENTE]; +end; + +function TPresupuestosClienteBusinessProcessorRules.GetOldFECHA_ULT_PRESENTACION_CLIENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosClienteFECHA_ULT_PRESENTACION_CLIENTE]); +end; + +procedure TPresupuestosClienteBusinessProcessorRules.SetFECHA_ULT_PRESENTACION_CLIENTEValue(const aValue: DateTime); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteFECHA_ULT_PRESENTACION_CLIENTE] := aValue; +end; + +procedure TPresupuestosClienteBusinessProcessorRules.SetFECHA_ULT_PRESENTACION_CLIENTEIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteFECHA_ULT_PRESENTACION_CLIENTE] := Null; +end; + { TCapitulosPresupuestoBusinessProcessorRules } constructor TCapitulosPresupuestoBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); diff --git a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas index b6225617..75896f4d 100644 --- a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas @@ -13,6 +13,7 @@ const SITUACION_PRESUPUESTO_PENDIENTE = 'PENDIENTE'; SITUACION_PRESUPUESTO_ACEPTADO = 'ACEPTADO'; SITUACION_PRESUPUESTO_ANULADO = 'ANULADO'; + SITUACION_PRESUPUESTO_PLANTILLA = 'PLANTILLA'; type @@ -267,6 +268,7 @@ begin FECHA_PRESUPUESTO := DateOf(Date); FECHA_VIGENCIA := IncMonth(Date, AppFactuGES.EmpresaActiva.VALIDEZ_PRESUPUESTOS); + FECHA_ULT_PRESENTACION_CLIENTE := DateOf(Date); NO_VALORADO := 0; INCIDENCIAS_ACTIVAS := 0; @@ -340,12 +342,15 @@ begin if FCliente.ID_FORMA_PAGO > 0 then ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO; - if FCliente.ID_TIENDA > 0 then +//OJO en empresa cristina no existen tiendas solo es la tienda cristina por lo que no se cambia asignación si estamos en esa empresa, falla si de cogen un cliente de acana los contadores + if (AppFactuGES.EmpresaActiva.ID <> CTE_EMPRESA_CRISTINA) + and (FCliente.ID_TIENDA > 0) then begin ID_TIENDA := FCliente.ID_TIENDA; TIENDA := FCliente.TIENDA; end; -// En acana la ficha de cliente no tiene descuento aplicado por defecto + +// En acana la ficha de cliente no tiene descuento aplicado por defecto // DESCUENTO := FCliente.DESCUENTO; DataTable.Post; //Muy importante ya que es necesario hacer un post de la cabecera antes de añadir detalles diff --git a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosClienteServer.pas b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosClienteServer.pas index cbf9ca77..f3b3bbd7 100644 --- a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosClienteServer.pas +++ b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosClienteServer.pas @@ -84,7 +84,8 @@ begin GetClassFactory('srvReferencias').CreateInstance(AClientID, Intf); AReferenciasService := Intf as IsrvReferencias; - Result := AReferenciasService.DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa +// Result := AReferenciasService.DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA, -1); //Referencia común a todas las tiendas de la empresa + Result := AReferenciasService.DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA, ID_TIENDA); //Referencia diferente según tienda end; function TBizPresupuestosClienteServer.IncrementarReferencia: Boolean; @@ -99,7 +100,8 @@ begin GetClassFactory('srvReferencias').CreateInstance(AClientID, Intf); AReferenciasService := Intf as IsrvReferencias; - Result := AReferenciasService.IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, ID_EMPRESA, -1) //Referencia común a todas las tiendas de la empresa +// Result := AReferenciasService.IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, ID_EMPRESA, -1) //Referencia común a todas las tiendas de la empresa + Result := AReferenciasService.IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, ID_EMPRESA, ID_TIENDA) //Referencia diferente según tienda end; initialization diff --git a/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj b/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj index ddf8b33e..ae5c362a 100644 --- a/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj +++ b/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj @@ -17,6 +17,7 @@ + @@ -261,14 +262,23 @@ + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm index 4470f539..d07e0976 100644 --- a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm +++ b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm @@ -229,7 +229,8 @@ object RptPresupuestosCliente: TRptPresupuestosCliente 'TACTOS_DIRECCIONES.MOVIL, CONTACTOS.MOVIL_1) AS MOVIL,'#10' V_PRE' + 'SUPUESTOS_CLIENTE.PERSONA_CONTACTO,'#10' V_PRESUPUESTOS_CLIENTE.V' + 'ENDEDOR, V_PRESUPUESTOS_CLIENTE.NO_VALORADO,'#10' V_PRESUPUESTOS_' + - 'CLIENTE.ID_TIENDA'#10'FROM'#10' V_PRESUPUESTOS_CLIENTE'#10' INNER JOIN' + + 'CLIENTE.ID_TIENDA,'#10' V_PRESUPUESTOS_CLIENTE.FECHA_ULT_PRESENTA' + + 'CION_CLIENTE'#10' '#10'FROM'#10' V_PRESUPUESTOS_CLIENTE'#10' INNER JOIN' + ' CONTACTOS ON (CONTACTOS.ID = V_PRESUPUESTOS_CLIENTE.ID_CLIENTE)' + #10' LEFT OUTER JOIN CONTACTOS_DIRECCIONES ON (CONTACTOS_DIRECCI' + 'ONES.ID = V_PRESUPUESTOS_CLIENTE.ID_DIRECCION)'#10'WHERE'#10' V_PRESU' + @@ -371,6 +372,10 @@ object RptPresupuestosCliente: TRptPresupuestosCliente item DatasetField = 'ID_TIENDA' TableField = 'ID_TIENDA' + end + item + DatasetField = 'FECHA_ULT_PRESENTACION_CLIENTE' + TableField = 'FECHA_ULT_PRESENTACION_CLIENTE' end> end> Name = 'Informe_Cabecera' @@ -524,6 +529,10 @@ object RptPresupuestosCliente: TRptPresupuestosCliente item Name = 'ID_TIENDA' DataType = datInteger + end + item + Name = 'FECHA_ULT_PRESENTACION_CLIENTE' + DataType = datDateTime end> ReadOnly = True end @@ -917,7 +926,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente PrintOptions.Printer = 'Por defecto' PrintOptions.PrintOnSheet = 0 ReportOptions.CreateDate = 39065.872423495400000000 - ReportOptions.LastChange = 44396.827522094910000000 + ReportOptions.LastChange = 45462.732395833340000000 ScriptLanguage = 'PascalScript' ShowProgress = False StoreInDFM = False @@ -1094,6 +1103,10 @@ object RptPresupuestosCliente: TRptPresupuestosCliente item Name = 'ID_TIENDA' DataType = datInteger + end + item + Name = 'FECHA_ULT_PRESENTACION_CLIENTE' + DataType = datDateTime end> Params = < item diff --git a/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm b/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm index 3f9698a5..e30a94be 100644 --- a/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm +++ b/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm @@ -342,6 +342,10 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente item DatasetField = 'LISTA_NOMBRES' TableField = 'LISTA_NOMBRES' + end + item + DatasetField = 'FECHA_ULT_PRESENTACION_CLIENTE' + TableField = 'FECHA_ULT_PRESENTACION_CLIENTE' end> end> Name = 'PresupuestosCliente' @@ -583,6 +587,10 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente DataType = datString Size = 255 DictionaryEntry = 'PresupuestosCliente_LISTA_NOMBRES' + end + item + Name = 'FECHA_ULT_PRESENTACION_CLIENTE' + DataType = datDateTime end> end item @@ -1101,6 +1109,11 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente Name = 'ID_EMPRESA' DataType = datInteger Value = '' + end + item + Name = 'FECHA_ULT_PRESENTACION_CLIENTE' + DataType = datDateTime + Value = '' end> Statements = < item @@ -1117,16 +1130,17 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente '_IVA,'#10' RE, IMPORTE_RE, RECARGO_EQUIVALENCIA, IMPORTE_TOTAL, ' + 'ID_FORMA_PAGO, ID_TIENDA, ID_VENDEDOR,'#10' ID_CONTRATO, NO_VALO' + 'RADO, TIPO_PRESUPUESTO, CALIDADES, REFERENCIA_CLIENTE,'#10' ID_E' + - 'MPRESA)'#10' VALUES'#10' (:ID,'#10' :FECHA_PRESUPUESTO, :FECHA_VIGEN' + - 'CIA, :FECHA_DECISION, :REFERENCIA,'#10' :SITUACION, :ID_CLIENTE,' + - ' :ID_DIRECCION, :PERSONA_CONTACTO,'#10' :FORMA_PAGO, :PLAZO_ENTR' + - 'EGA, :OBSERVACIONES, :INCIDENCIAS,'#10' :INCIDENCIAS_ACTIVAS, CU' + - 'RRENT_TIMESTAMP, :USUARIO, :IMPORTE_NETO, :IMPORTE_PORTE,'#10' :' + - 'DESCUENTO, :IMPORTE_DESCUENTO, :BASE_IMPONIBLE, :ID_TIPO_IVA, :I' + - 'VA, :IMPORTE_IVA,'#10' :RE, :IMPORTE_RE, :RECARGO_EQUIVALENCIA, ' + - ':IMPORTE_TOTAL, :ID_FORMA_PAGO, :ID_TIENDA, :ID_VENDEDOR,'#10' :' + - 'ID_CONTRATO, :NO_VALORADO, :TIPO_PRESUPUESTO, :CALIDADES, :REFER' + - 'ENCIA_CLIENTE,'#10' :ID_EMPRESA)'#10' '#10#10#10#10#10 + 'MPRESA, FECHA_ULT_PRESENTACION_CLIENTE)'#10' VALUES'#10' (:ID,'#10' ' + + ':FECHA_PRESUPUESTO, :FECHA_VIGENCIA, :FECHA_DECISION, :REFERENCI' + + 'A,'#10' :SITUACION, :ID_CLIENTE, :ID_DIRECCION, :PERSONA_CONTACT' + + 'O,'#10' :FORMA_PAGO, :PLAZO_ENTREGA, :OBSERVACIONES, :INCIDENCIA' + + 'S,'#10' :INCIDENCIAS_ACTIVAS, CURRENT_TIMESTAMP, :USUARIO, :IMPO' + + 'RTE_NETO, :IMPORTE_PORTE,'#10' :DESCUENTO, :IMPORTE_DESCUENTO, :' + + 'BASE_IMPONIBLE, :ID_TIPO_IVA, :IVA, :IMPORTE_IVA,'#10' :RE, :IMP' + + 'ORTE_RE, :RECARGO_EQUIVALENCIA, :IMPORTE_TOTAL, :ID_FORMA_PAGO, ' + + ':ID_TIENDA, :ID_VENDEDOR,'#10' :ID_CONTRATO, :NO_VALORADO, :TIPO' + + '_PRESUPUESTO, :CALIDADES, :REFERENCIA_CLIENTE,'#10' :ID_EMPRESA,' + + ' :FECHA_ULT_PRESENTACION_CLIENTE)'#10' '#10#10#10#10#10 StatementType = stSQL ColumnMappings = <> end> @@ -1340,6 +1354,11 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente DataType = datInteger Value = '' end + item + Name = 'FECHA_ULT_PRESENTACION_CLIENTE' + DataType = datDateTime + Value = '' + end item Name = 'OLD_ID' Value = '' @@ -1370,7 +1389,8 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente 'ID_CONTRATO = :ID_CONTRATO,'#10' NO_VALORADO = :NO_VALORADO,'#10' ' + 'TIPO_PRESUPUESTO = :TIPO_PRESUPUESTO,'#10' CALIDADES = :CALIDADES' + ','#10' REFERENCIA_CLIENTE = :REFERENCIA_CLIENTE,'#10' ID_EMPRESA =' + - ' :ID_EMPRESA'#10' WHERE'#10' (ID = :OLD_ID)'#10#10 + ' :ID_EMPRESA,'#10' FECHA_ULT_PRESENTACION_CLIENTE = :FECHA_ULT_PR' + + 'ESENTACION_CLIENTE'#10' WHERE'#10' (ID = :OLD_ID)'#10#10 StatementType = stSQL ColumnMappings = <> end> diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm index 66c2cd5d..2939e4b2 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm @@ -202,121 +202,48 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Height = 414 ExplicitWidth = 834 ExplicitHeight = 414 - inherited edtFechaPresupuesto: TcxDBDateEdit - ExplicitWidth = 187 - Width = 187 - end inherited memObservaciones: TcxDBMemo - Left = 396 - ExplicitLeft = 396 - ExplicitWidth = 793 - Width = 793 - end - inherited eReferencia: TcxDBTextEdit - ExplicitWidth = 122 - Width = 122 - end - inherited cbFormaPago: TcxDBLookupComboBox - ExplicitWidth = 122 - Width = 122 + Left = 403 + ExplicitLeft = 403 end inherited bFormasPago: TButton - Left = 234 - ExplicitLeft = 234 + Left = 241 + ExplicitLeft = 241 end inherited edtFechaDecision: TcxDBDateEdit - Left = 276 - ExplicitLeft = 276 - ExplicitWidth = 260 - Width = 260 - end - inherited edtFechaVigencia: TcxDBDateEdit - ExplicitWidth = 260 - Width = 260 - end - inherited cbSituacion: TcxDBImageComboBox - ExplicitWidth = 260 - Width = 260 + Left = 287 + ExplicitLeft = 287 end inherited frViewDatosYSeleccionClientePresupuesto1: TfrViewDatosYSeleccionClientePresupuesto - Left = 396 - Width = 320 - ExplicitLeft = 396 - ExplicitWidth = 320 + Left = 403 + ExplicitLeft = 403 inherited dxLayoutControl1: TdxLayoutControl - Width = 320 - inherited edtlNombre: TcxDBTextEdit - ExplicitWidth = 224 - Width = 224 - end + ExplicitWidth = 320 inherited edtNIFCIF: TcxDBTextEdit - Left = 286 - ExplicitLeft = 286 + Left = 279 + ExplicitLeft = 279 end inherited Button3: TBitBtn - Left = 197 - ExplicitLeft = 197 - end - inherited edtPersonaContacto: TcxDBTextEdit - ExplicitWidth = 283 - Width = 283 - end - inherited edtDireccion: TcxMemo - ExplicitWidth = 121 - Width = 121 + Left = 190 + ExplicitLeft = 190 end inherited Button4: TButton - Left = 366 - ExplicitLeft = 366 + Left = 359 + ExplicitLeft = 359 end inherited Button5: TButton - Left = 366 - ExplicitLeft = 366 - end - inherited edtTelefonos: TcxTextEdit - ExplicitWidth = 363 - Width = 363 + Left = 359 + ExplicitLeft = 359 end end end - inherited memFormaPago: TcxDBMemo - ExplicitWidth = 475 - ExplicitHeight = 44 - Height = 44 - Width = 475 - end inherited memPlazoEntrega: TcxDBMemo - Top = 380 - ExplicitTop = 380 - ExplicitWidth = 396 - ExplicitHeight = 100 - Height = 100 - Width = 396 - end - inherited cbVendedor: TcxDBLookupComboBox - ExplicitWidth = 27 - Width = 27 + Top = 407 + ExplicitTop = 407 end inherited cbTipoPresupuesto: TcxDBComboBox - Left = 270 - ExplicitLeft = 270 - ExplicitWidth = 186 - Width = 186 - end - inherited edtRef_cliente: TcxDBTextEdit - ExplicitWidth = 204 - Width = 204 - end - inherited frViewTienda1: TfrViewTienda - Width = 451 - ExplicitWidth = 451 - inherited dxLayoutControl1: TdxLayoutControl - Width = 451 - inherited cbTienda: TcxComboBox - ExplicitWidth = 390 - Width = 390 - end - end + Left = 282 + ExplicitLeft = 282 end end end @@ -344,11 +271,33 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente ExplicitHeight = 414 inherited ToolBar1: TToolBar Width = 834 + Height = 24 ExplicitWidth = 834 - inherited FontName: TJvFontComboBox - ExplicitLeft = 368 + inherited ToolButton14: TToolButton [1] + Left = 109 + Top = 0 + Enabled = True + ExplicitLeft = 109 ExplicitTop = 0 end + inherited ToolButton2: TToolButton [2] + Left = 143 + end + inherited FontName: TJvFontComboBox [3] + Left = 257 + Top = 0 + ExplicitLeft = 257 + ExplicitTop = 0 + end + inherited ToolButton3: TToolButton [4] + Left = 402 + ExplicitLeft = 402 + end + inherited ToolButton4: TToolButton [5] + Left = 457 + Wrap = False + ExplicitLeft = 457 + end inherited FontSize: TEdit Left = 513 Top = 0 @@ -416,14 +365,12 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Top = 50 Width = 834 Height = 364 - ExplicitTop = 50 ExplicitWidth = 834 ExplicitHeight = 364 end inherited TBXDock1: TTBXDock Top = 24 Width = 834 - ExplicitTop = 24 ExplicitWidth = 834 inherited TBXToolbar1: TTBXToolbar ExplicitWidth = 665 @@ -594,18 +541,16 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente LookAndFeel = dxLayoutOfficeLookAndFeel1 ExplicitWidth = 848 inherited Bevel3: TBevel - Left = 352 + Left = 310 Top = 57 - Height = 122 - ExplicitLeft = 352 + ExplicitLeft = 310 ExplicitTop = 57 - ExplicitHeight = 122 end inherited Bevel4: TBevel - Left = 464 + Left = 422 Top = 88 Width = 342 - ExplicitLeft = 464 + ExplicitLeft = 422 ExplicitTop = 88 ExplicitWidth = 342 end @@ -613,26 +558,20 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Top = 84 Style.IsFontAssigned = True ExplicitTop = 84 - ExplicitWidth = 93 - Width = 93 end inherited ImporteIVA: TcxDBCurrencyEdit - Left = 535 + Left = 493 Top = 108 Style.IsFontAssigned = True - ExplicitLeft = 535 + ExplicitLeft = 493 ExplicitTop = 108 - ExplicitWidth = 137 - Width = 137 end inherited ImporteTotal: TcxDBCurrencyEdit - Left = 465 + Left = 423 Top = 162 Style.IsFontAssigned = True - ExplicitLeft = 465 + ExplicitLeft = 423 ExplicitTop = 162 - ExplicitWidth = 137 - Width = 137 end inherited edtDescuento: TcxDBSpinEdit Top = 84 @@ -640,69 +579,57 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente ExplicitTop = 84 end inherited edtIVA: TcxDBSpinEdit - Left = 464 + Left = 422 Top = 108 Style.IsFontAssigned = True - ExplicitLeft = 464 + ExplicitLeft = 422 ExplicitTop = 108 end inherited ImporteBase: TcxDBCurrencyEdit - Left = 464 + Left = 422 Top = 57 Style.IsFontAssigned = True - ExplicitLeft = 464 + ExplicitLeft = 422 ExplicitTop = 57 - ExplicitWidth = 92 - Width = 92 end inherited edtRE: TcxDBSpinEdit - Left = 464 + Left = 422 Top = 135 Style.IsFontAssigned = True - ExplicitLeft = 464 + ExplicitLeft = 422 ExplicitTop = 135 end inherited ImporteRE: TcxDBCurrencyEdit - Left = 535 + Left = 493 Top = 135 Style.IsFontAssigned = True - ExplicitLeft = 535 + ExplicitLeft = 493 ExplicitTop = 135 - ExplicitWidth = 56 - Width = 56 end inherited eImporteNeto: TcxDBCurrencyEdit Top = 57 Style.IsFontAssigned = True ExplicitTop = 57 - ExplicitWidth = 147 - Width = 147 end inherited ePorte: TcxDBCurrencyEdit Top = 111 Style.IsFontAssigned = True ExplicitTop = 111 - ExplicitWidth = 147 - Width = 147 end inherited eIVA: TcxDBLookupComboBox Top = 138 ExplicitTop = 138 - ExplicitWidth = 81 - Width = 81 end inherited bTiposIVA: TButton - Left = 204 + Left = 162 Top = 138 OnClick = frViewTotales1bTiposIVAClick - ExplicitLeft = 204 + ExplicitLeft = 162 ExplicitTop = 138 end inherited cbRecargoEquivalencia: TcxDBCheckBox Top = 165 ExplicitTop = 165 - ExplicitWidth = 219 - Width = 219 end inherited cbValorado: TcxDBCheckBox Left = 11 diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas index 07d7c107..5ac7b244 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas @@ -281,6 +281,12 @@ begin frViewDetallesPresupuestoCliente1.BeginUpdate; try bEsNuevo := FPresupuesto.EsNuevo; + + if not bEsNuevo then + if (FPresupuesto.FECHA_ULT_PRESENTACION_CLIENTE < Date) then + if ShowConfirmMessage('Cambio fecha actualización', '¿Desea cambiar la fecha de última actualización del presupuesto por la de hoy?') = IDYES then + Controller.FechaUltimaActualizacionToday(FPresupuesto); + //GESTION_DOCUMENTOS if FController.Guardar(FPresupuesto) then frViewDocumentosPresupuestoCliente1.actActualizarServidor.Execute; @@ -430,7 +436,6 @@ begin FViewPresupuesto.Presupuesto := FPresupuesto; frViewDetallesPresupuestoCliente1.Detalles := FPresupuesto.Detalles; frViewDetallesPresupuestoCliente1.Presupuesto := FPresupuesto; //Para poder sacar los descuento del articulos segun el cliente seleccionado - finally ViewPresupuesto.ViewClientePresupuesto.OnClienteChanged := OnClienteChanged; end; diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm index 78d826c6..ab1af750 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm @@ -2,7 +2,7 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente Caption = 'Lista de presupuestos de cliente' ClientWidth = 805 ExplicitWidth = 813 - ExplicitHeight = 478 + ExplicitHeight = 240 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader @@ -125,7 +125,7 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente Width = 805 ExplicitWidth = 805 inherited tbxMain: TTBXToolbar - ExplicitWidth = 751 + ExplicitWidth = 805 object TBXSubmenuItem3: TTBXSubmenuItem [0] Caption = 'Nuevo' DisplayMode = nbdmImageAndText diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas index fe326de9..09f35daf 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas @@ -285,6 +285,10 @@ end; procedure TfEditorPresupuestosCliente.bArmarioClick(Sender: TObject); begin inherited; + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_CRISTINA) then + if (ShowConfirmMessage('Atención CIF - CRISTINA', 'No hagas el presupuesto en esta empresa si no va a ser facturado con el CIF de Cristina Puerta Estudio, ¿Desea continuar con el presupuesto?') = IDNO) then + exit; + if FController.Anadir(Presupuestos, teArmario) then FController.Ver(Presupuestos); end; @@ -292,6 +296,10 @@ end; procedure TfEditorPresupuestosCliente.bBanoClick(Sender: TObject); begin inherited; + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_CRISTINA) then + if (ShowConfirmMessage('Atención CIF - CRISTINA', 'No hagas el presupuesto en esta empresa si no va a ser facturado con el CIF de Cristina Puerta Estudio, ¿Desea continuar con el presupuesto?') = IDNO) then + exit; + if FController.Anadir(Presupuestos, teBano) then FController.Ver(Presupuestos); end; @@ -299,6 +307,10 @@ end; procedure TfEditorPresupuestosCliente.bCocinaClick(Sender: TObject); begin inherited; + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_CRISTINA) then + if (ShowConfirmMessage('Atención CIF - CRISTINA', 'No hagas el presupuesto en esta empresa si no va a ser facturado con el CIF de Cristina Puerta Estudio, ¿Desea continuar con el presupuesto?') = IDNO) then + exit; + if FController.Anadir(Presupuestos, teCocina) then FController.Ver(Presupuestos); end; @@ -306,6 +318,10 @@ end; procedure TfEditorPresupuestosCliente.bElectrodomesticoClick(Sender: TObject); begin inherited; + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_CRISTINA) then + if (ShowConfirmMessage('Atención CIF - CRISTINA', 'No hagas el presupuesto en esta empresa si no va a ser facturado con el CIF de Cristina Puerta Estudio, ¿Desea continuar con el presupuesto?') = IDNO) then + exit; + if FController.Anadir(Presupuestos, teElectrodomestico) then FController.Ver(Presupuestos); end; @@ -313,6 +329,10 @@ end; procedure TfEditorPresupuestosCliente.bObraClick(Sender: TObject); begin inherited; + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_CRISTINA) then + if (ShowConfirmMessage('Atención CIF - CRISTINA', 'No hagas el presupuesto en esta empresa si no va a ser facturado con el CIF de Cristina Puerta Estudio, ¿Desea continuar con el presupuesto?') = IDNO) then + exit; + if FController.Anadir(Presupuestos, teObra) then FController.Ver(Presupuestos); end; @@ -320,6 +340,10 @@ end; procedure TfEditorPresupuestosCliente.bVariosClick(Sender: TObject); begin inherited; + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_CRISTINA) then + if (ShowConfirmMessage('Atención CIF - CRISTINA', 'No hagas el presupuesto en esta empresa si no va a ser facturado con el CIF de Cristina Puerta Estudio, ¿Desea continuar con el presupuesto?') = IDNO) then + exit; + if FController.Anadir(Presupuestos, teVarios) then FController.Ver(Presupuestos); end; diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.dfm index 461f731d..bbbd74ea 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.dfm @@ -19,7 +19,7 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente 895 555) object edtFechaPresupuesto: TcxDBDateEdit - Left = 103 + Left = 131 Top = 82 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_PRESUPUESTO' @@ -42,7 +42,7 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 187 end object memObservaciones: TcxDBMemo - Left = 432 + Left = 440 Top = 288 Anchors = [akLeft, akTop, akRight, akBottom] DataBinding.DataField = 'OBSERVACIONES' @@ -59,12 +59,12 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 14 + TabOrder = 15 Height = 245 Width = 793 end object eReferencia: TcxDBTextEdit - Left = 103 + Left = 131 Top = 28 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'REFERENCIA' @@ -89,8 +89,8 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 122 end object cbFormaPago: TcxDBLookupComboBox - Left = 103 - Top = 163 + Left = 131 + Top = 190 DataBinding.DataField = 'ID_FORMA_PAGO' DataBinding.DataSource = DADataSource Properties.KeyFieldNames = 'ID' @@ -115,21 +115,21 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 7 + TabOrder = 8 Width = 122 end object bFormasPago: TButton - Left = 270 - Top = 163 + Left = 278 + Top = 190 Width = 132 Height = 21 Caption = 'Ver las formas de pago...' - TabOrder = 8 + TabOrder = 9 OnClick = bFormasPagoClick end object edtFechaDecision: TcxDBDateEdit - Left = 295 - Top = 109 + Left = 306 + Top = 136 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_DECISION' DataBinding.DataSource = DADataSource @@ -146,12 +146,12 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente StyleDisabled.LookAndFeel.NativeStyle = True StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 5 + TabOrder = 6 Width = 260 end object edtFechaVigencia: TcxDBDateEdit - Left = 103 - Top = 109 + Left = 131 + Top = 136 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_VIGENCIA' DataBinding.DataSource = DADataSource @@ -172,12 +172,12 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 4 + TabOrder = 5 Width = 260 end object cbSituacion: TcxDBImageComboBox - Left = 103 - Top = 136 + Left = 131 + Top = 163 DataBinding.DataField = 'SITUACION' DataBinding.DataSource = DADataSource Properties.ImmediatePost = True @@ -194,6 +194,10 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente item Description = 'ANULADO' Value = 'ANULADO' + end + item + Description = 'PLANTILLA' + Value = 'PLANTILLA' end> Style.BorderColor = clWindowFrame Style.BorderStyle = ebs3D @@ -203,11 +207,11 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente StyleDisabled.LookAndFeel.NativeStyle = True StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 6 + TabOrder = 7 Width = 260 end inline frViewDatosYSeleccionClientePresupuesto1: TfrViewDatosYSeleccionClientePresupuesto - Left = 432 + Left = 440 Top = 28 Width = 320 Height = 224 @@ -217,9 +221,9 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Font.Name = 'Tahoma' Font.Style = [] ParentFont = False - TabOrder = 13 + TabOrder = 14 ReadOnly = False - ExplicitLeft = 432 + ExplicitLeft = 440 ExplicitTop = 28 ExplicitWidth = 320 ExplicitHeight = 224 @@ -233,12 +237,12 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 224 end inherited edtNIFCIF: TcxDBTextEdit - Left = 328 - ExplicitLeft = 328 + Left = 320 + ExplicitLeft = 320 end inherited Button3: TBitBtn - Left = 239 - ExplicitLeft = 239 + Left = 231 + ExplicitLeft = 231 end inherited edtPersonaContacto: TcxDBTextEdit ExplicitWidth = 283 @@ -249,12 +253,12 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 121 end inherited Button4: TButton - Left = 408 - ExplicitLeft = 408 + Left = 400 + ExplicitLeft = 400 end inherited Button5: TButton - Left = 408 - ExplicitLeft = 408 + Left = 400 + ExplicitLeft = 400 end inherited edtTelefonos: TcxTextEdit ExplicitWidth = 363 @@ -264,7 +268,7 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente end object memFormaPago: TcxDBMemo Left = 22 - Top = 324 + Top = 351 Anchors = [akLeft, akTop, akRight, akBottom] DataBinding.DataField = 'FORMA_PAGO' DataBinding.DataSource = DADataSource @@ -280,13 +284,13 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 11 + TabOrder = 12 Height = 44 Width = 475 end object memPlazoEntrega: TcxDBMemo Left = 22 - Top = 415 + Top = 432 Anchors = [akLeft, akTop, akRight, akBottom] DataBinding.DataField = 'PLAZO_ENTREGA' DataBinding.DataSource = DADataSource @@ -302,13 +306,13 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 12 + TabOrder = 13 Height = 100 Width = 396 end object cbVendedor: TcxDBLookupComboBox - Left = 103 - Top = 190 + Left = 131 + Top = 217 DataBinding.DataField = 'ID_VENDEDOR' DataBinding.DataSource = DADataSource Properties.KeyFieldNames = 'ID' @@ -333,11 +337,11 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 9 + TabOrder = 10 Width = 27 end object cbTipoPresupuesto: TcxDBComboBox - Left = 289 + Left = 302 Top = 82 DataBinding.DataField = 'TIPO_PRESUPUESTO' DataBinding.DataSource = DADataSource @@ -357,7 +361,7 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 186 end object edtRef_cliente: TcxDBTextEdit - Left = 103 + Left = 131 Top = 55 Anchors = [akLeft, akTop, akRight] AutoSize = False @@ -380,13 +384,36 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente end inline frViewTienda1: TfrViewTienda Left = 22 - Top = 247 + Top = 274 Width = 451 Height = 41 - TabOrder = 10 + TabOrder = 11 ReadOnly = False ExplicitLeft = 22 - ExplicitTop = 247 + ExplicitTop = 274 + end + object edtFechaUltRevision: TcxDBDateEdit + Left = 131 + Top = 109 + Anchors = [akLeft, akTop, akRight] + DataBinding.DataField = 'FECHA_ULT_PRESENTACION_CLIENTE' + DataBinding.DataSource = DADataSource + Properties.DateButtons = [btnToday] + Properties.ImmediatePost = True + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.Color = clInfoBk + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.Shadow = False + Style.ButtonStyle = bts3D + Style.ButtonTransparency = ebtNone + Style.PopupBorderStyle = epbsFrame3D + StyleDisabled.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 4 + Width = 111 end object dxLayoutControl1Group_Root: TdxLayoutGroup ShowCaption = False @@ -422,20 +449,30 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente object dxLayoutControl1Group12: TdxLayoutGroup ShowCaption = False Hidden = True - LayoutDirection = ldHorizontal ShowBorder = False - object dxLayoutControl1Item2: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahClient - Caption = 'Fecha presup.:' - Control = edtFechaPresupuesto - ControlOptions.ShowBorder = False + object dxLayoutControl1Group14: TdxLayoutGroup + ShowCaption = False + Hidden = True + LayoutDirection = ldHorizontal + ShowBorder = False + object dxLayoutControl1Item2: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'Fecha presup.:' + Control = edtFechaPresupuesto + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item12: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'Tipo presup.:' + Control = cbTipoPresupuesto + ControlOptions.ShowBorder = False + end end - object dxLayoutControl1Item12: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahClient - Caption = 'Tipo presup.:' - Control = cbTipoPresupuesto + object dxLayoutControl1Item16: TdxLayoutItem + Caption = 'Fecha '#250'ltima revisi'#243'n:' + Control = edtFechaUltRevision ControlOptions.ShowBorder = False end end diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.pas index a35f3210..a50f55e6 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.pas @@ -75,6 +75,9 @@ type dxLayoutControl1Item14: TdxLayoutItem; frViewTienda1: TfrViewTienda; dxLayoutControl1Group13: TdxLayoutGroup; + dxLayoutControl1Item16: TdxLayoutItem; + edtFechaUltRevision: TcxDBDateEdit; + dxLayoutControl1Group14: TdxLayoutGroup; procedure CustomViewCreate(Sender: TObject); procedure CustomViewDestroy(Sender: TObject); procedure bFormasPagoClick(Sender: TObject); @@ -134,7 +137,7 @@ begin cbTipoPresupuesto.Properties.Items.Add(CTE_VARIOS); //FILTRO DE EMPRESAS - if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_CRISTINA) then +{ if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_CRISTINA) then begin frViewTienda1.Visible := False; frViewTienda1.dxLayoutControl1.Visible := False; @@ -146,6 +149,7 @@ begin frViewTienda1.dxLayoutControl1.Visible := True; dxLayoutControl1Group13.Visible := True; end; + } end; procedure TfrViewPresupuestoCliente.CustomViewDestroy(Sender: TObject); diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm index cf9ddfdb..950f78b6 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm @@ -178,6 +178,10 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente Caption = 'Tienda' DataBinding.FieldName = 'TIENDA' end + object cxGridViewFECHA_ULT_PRESENTACION_CLIENTE: TcxGridDBColumn + Caption = 'Fecha '#250'lt. actualizaci'#243'n' + DataBinding.FieldName = 'FECHA_ULT_PRESENTACION_CLIENTE' + end end inherited cxGridLevel: TcxGridLevel Caption = 'Todos' @@ -191,6 +195,9 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente object cxGridLevelServidor: TcxGridLevel Caption = 'Anulados' end + object cxGridPlantillas: TcxGridLevel + Caption = 'Plantillas' + end end inherited frViewFiltroBase1: TfrViewFiltroBase Width = 903 @@ -584,5 +591,9 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente AssignedValues = [svTextColor] TextColor = clGrayText end + object cxStylePLANTILLA: TcxStyle + AssignedValues = [svTextColor] + TextColor = 33023 + end end end diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas index 43ba100b..72b50148 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas @@ -55,6 +55,9 @@ type actTienda: TAction; TBXItem4: TTBXItem; TBXSeparatorItem3: TTBXSeparatorItem; + cxGridViewFECHA_ULT_PRESENTACION_CLIENTE: TcxGridDBColumn; + cxGridPlantillas: TcxGridLevel; + cxStylePLANTILLA: TcxStyle; procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; @@ -223,9 +226,11 @@ begin FFiltro := AddFilterGrid(fboAnd); case cxGrid.ActiveLevel.Index of + 0 : FFiltro.AddItem(cxGridViewSITUACION, foNotEqual, SITUACION_PRESUPUESTO_PLANTILLA, SITUACION_PRESUPUESTO_PLANTILLA); 1 : FFiltro.AddItem(cxGridViewSITUACION, foEqual, SITUACION_PRESUPUESTO_PENDIENTE, SITUACION_PRESUPUESTO_PENDIENTE); 2 : FFiltro.AddItem(cxGridViewSITUACION, foEqual, SITUACION_PRESUPUESTO_ACEPTADO, SITUACION_PRESUPUESTO_ACEPTADO); 3 : FFiltro.AddItem(cxGridViewSITUACION, foEqual, SITUACION_PRESUPUESTO_ANULADO, SITUACION_PRESUPUESTO_ANULADO); + 4 : FFiltro.AddItem(cxGridViewSITUACION, foEqual, SITUACION_PRESUPUESTO_PLANTILLA, SITUACION_PRESUPUESTO_PLANTILLA); end; end; @@ -248,6 +253,9 @@ end; procedure TfrViewPresupuestosCliente.ConfigView; begin inherited; + //Para que nos filtre la pestaña todas y quite las facturas proforma + AnadirOtrosFiltros; + //FILTRO DE EMPRESAS if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ALISO) then begin @@ -350,6 +358,8 @@ begin AStyle.TextColor := cxStyleACEPTADO.TextColor else if ASituacion = SITUACION_PRESUPUESTO_ANULADO then AStyle.TextColor := cxStyleRECHAZADO.TextColor + else if ASituacion = SITUACION_PRESUPUESTO_PLANTILLA then + AStyle.TextColor := cxStylePLANTILLA.TextColor end; end; diff --git a/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.dfm b/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.dfm index c0e363a5..878896ce 100644 --- a/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.dfm +++ b/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.dfm @@ -270,10 +270,10 @@ object RptRecibosCliente: TRptRecibosCliente 'nto) = 11 then '#39'NOVIEMBRE - '#39' || extract (year from fecha_vencim' + 'iento)'#10'when extract (month from fecha_vencimiento) = 12 then '#39'DI' + 'CIEMBRE - '#39' || extract (year from fecha_vencimiento)'#10'end as TITU' + - 'LO,'#10'REFERENCIA, ID_CLIENTE, NOMBRE_CLIENTE, SITUACION, NIF_CIF ' + - 'as NIF_CIF_CLIENTE, fecha_vencimiento, FECHA_EMISION,'#10'IMPORTE_TO' + - 'TAL'#10#10'from V_recibos_cliente'#10'where {where}'#10'order by ANO, MES, NOM' + - 'BRE_CLIENTE'#10 + 'LO,'#10'REFERENCIA, TIENDA, ID_CLIENTE, NOMBRE_CLIENTE, SITUACION, N' + + 'IF_CIF as NIF_CIF_CLIENTE, fecha_vencimiento, FECHA_EMISION,'#10'IMP' + + 'ORTE_TOTAL'#10#10'from V_recibos_cliente'#10'where {where}'#10'order by ANO, M' + + 'ES, NOMBRE_CLIENTE'#10 StatementType = stSQL ColumnMappings = < item @@ -323,6 +323,10 @@ object RptRecibosCliente: TRptRecibosCliente item DatasetField = 'ANO' TableField = 'ANO' + end + item + DatasetField = 'TIENDA' + TableField = 'TIENDA' end> end> Name = 'InformeListadoRecibos' @@ -349,6 +353,11 @@ object RptRecibosCliente: TRptRecibosCliente DataType = datString Size = 255 end + item + Name = 'TIENDA' + DataType = datString + Size = 255 + end item Name = 'ID_CLIENTE' DataType = datInteger @@ -998,6 +1007,10 @@ object RptRecibosCliente: TRptRecibosCliente Name = 'ID_EMPRESA' DataType = datInteger end + item + Name = 'ANO' + DataType = datSmallInt + end item Name = 'MES' DataType = datSmallInt @@ -1012,6 +1025,11 @@ object RptRecibosCliente: TRptRecibosCliente DataType = datString Size = 255 end + item + Name = 'TIENDA' + DataType = datString + Size = 255 + end item Name = 'ID_CLIENTE' DataType = datInteger diff --git a/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.dfm index 2d5c5c83..d11ff72d 100644 --- a/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.dfm +++ b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.dfm @@ -58,9 +58,7 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente object cxGridViewTIENDA: TcxGridDBColumn Caption = 'Tienda' DataBinding.FieldName = 'TIENDA' - Visible = False BestFitMaxWidth = 60 - VisibleForCustomization = False end object cxGridViewID_RECIBO_COMPENSADO: TcxGridDBColumn Caption = 'Compensado' @@ -227,19 +225,41 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente Width = 686 ExplicitWidth = 686 inherited txtFiltroTodo: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 434 Width = 434 end inherited edtFechaIniFiltro: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 183 Width = 183 end inherited edtFechaFinFiltro: TcxDateEdit Left = 367 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 367 ExplicitWidth = 234 Width = 234 end + inherited txtFiltroTodo2: TcxTextEdit + Left = 464 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 464 + ExplicitWidth = 250 + Width = 250 + end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 686 @@ -267,6 +287,11 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente object TBXItem2: TTBXItem Action = actCliente end + object TBXSeparatorItem2: TTBXSeparatorItem + end + object TBXItem3: TTBXItem + Action = actTienda + end end end end @@ -289,6 +314,11 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente OnExecute = actClienteExecute OnUpdate = actClienteUpdate end + object actTienda: TAction + Caption = 'Tienda' + OnExecute = actTiendaExecute + OnUpdate = actTiendaUpdate + end end inherited cxStyleRepositoryInforme: TcxStyleRepository Top = 184 diff --git a/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.pas b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.pas index 87a5064a..e933fb61 100644 --- a/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.pas +++ b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.pas @@ -59,6 +59,9 @@ type cxGridViewCODIGO_POSTAL: TcxGridDBColumn; cxGridViewCUENTA_CONTABLE: TcxGridDBColumn; cxGridViewLISTA_NOMBRES: TcxGridDBColumn; + actTienda: TAction; + TBXSeparatorItem2: TTBXSeparatorItem; + TBXItem3: TTBXItem; procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle); @@ -70,6 +73,8 @@ type procedure cxGridViewID_RECIBO_COMPENSADOCustomDrawCell( Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); + procedure actTiendaExecute(Sender: TObject); + procedure actTiendaUpdate(Sender: TObject); private //Filtros relativos a la vista @@ -117,6 +122,26 @@ begin (Sender as TAction).Checked := not (cxGridViewNOMBRE_CLIENTE.GroupIndex < 0); end; +procedure TfrViewRecibosCliente.actTiendaExecute(Sender: TObject); +begin + if (cxGridViewTIENDA.GroupIndex < 0) then + begin + cxGridViewTIENDA.GroupIndex := cxGridView.GroupedColumnCount; + cxGridViewTIENDA.Visible := False; + end + else + begin + cxGridViewTIENDA.GroupIndex := -1; + cxGridViewTIENDA.Visible := True; + end; +end; + +procedure TfrViewRecibosCliente.actTiendaUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Checked := not (cxGridViewTIENDA.GroupIndex < 0); +end; + procedure TfrViewRecibosCliente.AnadirFiltroFechas; var Columna: TcxGridDBColumn; diff --git a/Source/Modulos/Recibos de proveedor/Reports/uRptRecibosProveedor_Server.dfm b/Source/Modulos/Recibos de proveedor/Reports/uRptRecibosProveedor_Server.dfm index 68ab3c16..b0bede60 100644 --- a/Source/Modulos/Recibos de proveedor/Reports/uRptRecibosProveedor_Server.dfm +++ b/Source/Modulos/Recibos de proveedor/Reports/uRptRecibosProveedor_Server.dfm @@ -65,11 +65,11 @@ object RptRecibosProveedor: TRptRecibosProveedor 'nto) = 11 then '#39'NOVIEMBRE - '#39' || extract (year from fecha_vencim' + 'iento)'#10'when extract (month from fecha_vencimiento) = 12 then '#39'DI' + 'CIEMBRE - '#39' || extract (year from fecha_vencimiento)'#10'end as TITU' + - 'LO,'#10'REFERENCIA, REFERENCIA_FACTURA_PROV, ID_PROVEEDOR, NOMBRE_P' + - 'ROVEEDOR, SITUACION, ID_FORMA_PAGO_FACTURA, FORMA_PAGO_FACTURA, ' + - 'NIF_CIF as NIF_CIF_PROVEEDOR, fecha_vencimiento, FECHA_EMISION,'#10 + - 'IMPORTE_TOTAL'#10#10'from V_recibos_proveedor'#10'where {where}'#10'order by A' + - 'NO, MES, NOMBRE_PROVEEDOR'#10 + 'LO,'#10'REFERENCIA, TIENDA, REFERENCIA_FACTURA_PROV, ID_PROVEEDOR, N' + + 'OMBRE_PROVEEDOR, SITUACION, ID_FORMA_PAGO_FACTURA, FORMA_PAGO_FA' + + 'CTURA, NIF_CIF as NIF_CIF_PROVEEDOR, fecha_vencimiento, FECHA_EM' + + 'ISION,'#10'IMPORTE_TOTAL'#10#10'from V_recibos_proveedor'#10'where {where}'#10'ord' + + 'er by ANO, MES, NOMBRE_PROVEEDOR'#10 StatementType = stSQL ColumnMappings = < item @@ -135,6 +135,10 @@ object RptRecibosProveedor: TRptRecibosProveedor item DatasetField = 'ID_FORMA_PAGO_FACTURA' TableField = 'ID_FORMA_PAGO_FACTURA' + end + item + DatasetField = 'TIENDA' + TableField = 'TIENDA' end> end> Name = 'InformeListadoRecibos' @@ -161,6 +165,11 @@ object RptRecibosProveedor: TRptRecibosProveedor DataType = datString Size = 255 end + item + Name = 'TIENDA' + DataType = datString + Size = 255 + end item Name = 'REFERENCIA_FACTURA_PROV' DataType = datString @@ -231,7 +240,7 @@ object RptRecibosProveedor: TRptRecibosProveedor PrintOptions.Printer = 'Por defecto' PrintOptions.PrintOnSheet = 0 ReportOptions.CreateDate = 37800.807714351900000000 - ReportOptions.LastChange = 45055.383770833330000000 + ReportOptions.LastChange = 45226.449743009260000000 ScriptLanguage = 'PascalScript' ShowProgress = False StoreInDFM = False @@ -264,6 +273,11 @@ object RptRecibosProveedor: TRptRecibosProveedor DataType = datString Size = 255 end + item + Name = 'TIENDA' + DataType = datString + Size = 255 + end item Name = 'REFERENCIA_FACTURA_PROV' DataType = datString diff --git a/Source/Modulos/Recibos de proveedor/Views/uViewRecibosProveedor.dfm b/Source/Modulos/Recibos de proveedor/Views/uViewRecibosProveedor.dfm index 20788f77..2c15f817 100644 --- a/Source/Modulos/Recibos de proveedor/Views/uViewRecibosProveedor.dfm +++ b/Source/Modulos/Recibos de proveedor/Views/uViewRecibosProveedor.dfm @@ -43,6 +43,10 @@ inherited frViewRecibosProveedor: TfrViewRecibosProveedor end> OptionsCustomize.ColumnHidingOnGrouping = False OptionsView.GroupFooters = gfAlwaysVisible + object cxGridViewTIENDA: TcxGridDBColumn + Caption = 'Tienda' + DataBinding.FieldName = 'TIENDA' + end object cxGridViewREFERENCIA: TcxGridDBColumn Caption = 'Referencia' DataBinding.FieldName = 'REFERENCIA' @@ -246,6 +250,11 @@ inherited frViewRecibosProveedor: TfrViewRecibosProveedor object TBXItem3: TTBXItem Action = actFormasPago end + object TBXSeparatorItem3: TTBXSeparatorItem + end + object TBXItem4: TTBXItem + Action = actTienda + end end end end @@ -266,6 +275,11 @@ inherited frViewRecibosProveedor: TfrViewRecibosProveedor OnExecute = actFormasPagoExecute OnUpdate = actFormasPagoUpdate end + object actTienda: TAction + Caption = 'Tienda' + OnExecute = actTiendaExecute + OnUpdate = actTiendaUpdate + end end inherited GridPNGImageList: TPngImageList PngImages = < diff --git a/Source/Modulos/Recibos de proveedor/Views/uViewRecibosProveedor.pas b/Source/Modulos/Recibos de proveedor/Views/uViewRecibosProveedor.pas index 80e047b4..0c620a8c 100644 --- a/Source/Modulos/Recibos de proveedor/Views/uViewRecibosProveedor.pas +++ b/Source/Modulos/Recibos de proveedor/Views/uViewRecibosProveedor.pas @@ -56,6 +56,10 @@ type actFormasPago: TAction; TBXSeparatorItem2: TTBXSeparatorItem; TBXItem3: TTBXItem; + actTienda: TAction; + TBXSeparatorItem3: TTBXSeparatorItem; + TBXItem4: TTBXItem; + cxGridViewTIENDA: TcxGridDBColumn; procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle); @@ -69,6 +73,8 @@ type AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); procedure actFormasPagoExecute(Sender: TObject); procedure actFormasPagoUpdate(Sender: TObject); + procedure actTiendaExecute(Sender: TObject); + procedure actTiendaUpdate(Sender: TObject); private //Filtros relativos a la vista @@ -138,6 +144,27 @@ begin (Sender as TAction).Checked := not (cxGridViewNOMBRE_PROVEEDOR.GroupIndex < 0); end; +procedure TfrViewRecibosProveedor.actTiendaExecute(Sender: TObject); +begin + inherited; + if (cxGridViewTIENDA.GroupIndex < 0) then + begin + cxGridViewTIENDA.GroupIndex := cxGridView.GroupedColumnCount; + cxGridViewTIENDA.Visible := False; + end + else + begin + cxGridViewTIENDA.GroupIndex := -1; + cxGridViewTIENDA.Visible := True; + end; +end; + +procedure TfrViewRecibosProveedor.actTiendaUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Checked := not (cxGridViewTIENDA.GroupIndex < 0); +end; + procedure TfrViewRecibosProveedor.AnadirFiltroFechas; var Columna: TcxGridDBColumn; diff --git a/Source/Servicios/FactuGES.RODL b/Source/Servicios/FactuGES.RODL index 5f236331..c4e11e21 100644 --- a/Source/Servicios/FactuGES.RODL +++ b/Source/Servicios/FactuGES.RODL @@ -310,6 +310,10 @@ + + + + @@ -945,6 +949,10 @@ + + + + diff --git a/Source/Servicios/FactuGES_Intf.pas b/Source/Servicios/FactuGES_Intf.pas index a7a30e2b..394175f7 100644 --- a/Source/Servicios/FactuGES_Intf.pas +++ b/Source/Servicios/FactuGES_Intf.pas @@ -517,7 +517,7 @@ type IsrvFacturasCliente = interface(IDataAbstractService) ['{56B4FFF0-AB1B-46B2-BA16-ABD5360F6311}'] function GenerateReport(const FacturaID: TIntegerArray): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const Usuario: AnsiString; const Firmado: Boolean): Binary; end; { CosrvFacturasCliente } @@ -531,7 +531,7 @@ type function __GetInterfaceName:string; override; function GenerateReport(const FacturaID: TIntegerArray): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const Usuario: AnsiString; const Firmado: Boolean): Binary; end; { IsrvFacturasProveedor } @@ -866,7 +866,7 @@ type IsrvContratosCliente = interface(IDataAbstractService) ['{ADBF1627-F507-4A0F-818E-38BAE28579B6}'] function GenerarInforme(const ListaID: TIntegerArray): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const Usuario: AnsiString; const Firmado: Boolean): Binary; end; { CosrvContratosCliente } @@ -880,7 +880,7 @@ type function __GetInterfaceName:string; override; function GenerarInforme(const ListaID: TIntegerArray): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const Usuario: AnsiString; const Firmado: Boolean): Binary; end; implementation @@ -1840,12 +1840,14 @@ begin end end; -function TsrvFacturasCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; +function TsrvFacturasCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; 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('Usuario', TypeInfo(AnsiString), Usuario, []); + __Message.Write('Firmado', TypeInfo(Boolean), Firmado, []); __Message.Finalize; __TransportChannel.Dispatch(__Message); @@ -2825,12 +2827,14 @@ begin end end; -function TsrvContratosCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; +function TsrvContratosCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; 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('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 69d8a39c..c3326b17 100644 --- a/Source/Servicios/FactuGES_Invk.pas +++ b/Source/Servicios/FactuGES_Invk.pas @@ -965,9 +965,11 @@ begin end; procedure TsrvFacturasCliente_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; } +{ function GenerarInformeEnPDF(const ListaID: TIntegerArray; const Usuario: AnsiString; const Firmado: Boolean): Binary; } var ListaID: FactuGES_Intf.TIntegerArray; + Usuario: AnsiString; + Firmado: Boolean; lResult: Binary; __lObjectDisposer: TROObjectDisposer; begin @@ -975,8 +977,10 @@ begin lResult := nil; try __Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); + __Message.Read('Usuario', TypeInfo(AnsiString), Usuario, []); + __Message.Read('Firmado', TypeInfo(Boolean), Firmado, []); - lResult := (__Instance as IsrvFacturasCliente).GenerarInformeEnPDF(ListaID); + lResult := (__Instance as IsrvFacturasCliente).GenerarInformeEnPDF(ListaID, Usuario, Firmado); __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvFacturasCliente', 'GenerarInformeEnPDFResponse'); __Message.Write('Result', TypeInfo(Binary), lResult, []); @@ -2364,9 +2368,11 @@ begin end; procedure TsrvContratosCliente_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; } +{ function GenerarInformeEnPDF(const ListaID: TIntegerArray; const Usuario: AnsiString; const Firmado: Boolean): Binary; } var ListaID: FactuGES_Intf.TIntegerArray; + Usuario: AnsiString; + Firmado: Boolean; lResult: Binary; __lObjectDisposer: TROObjectDisposer; begin @@ -2374,8 +2380,10 @@ begin lResult := nil; try __Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); + __Message.Read('Usuario', TypeInfo(AnsiString), Usuario, []); + __Message.Read('Firmado', TypeInfo(Boolean), Firmado, []); - lResult := (__Instance as IsrvContratosCliente).GenerarInformeEnPDF(ListaID); + lResult := (__Instance as IsrvContratosCliente).GenerarInformeEnPDF(ListaID, 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 fd8d570802d6e014f40291de876b57b419947686..a5a471bad93933e832280abaf25c61afecbee98b 100644 GIT binary patch delta 83 zcmdn+jOp47rU?p6Y+E)e{dAu!ATBWZ?;5$u|J8I^+%k)DCr_w1nQXu&JNds$;O0&b RjY!-o*2`IJW?Q5s2mq>+Am9K1 delta 33 ocmccif@#AurU?p64>oO7`sqG-L1@}$5l@3iAR~0M&SEV=024qC(EtDd diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr index 4834721d..26c30918 100644 --- a/Source/Servidor/FactuGES_Server.dpr +++ b/Source/Servidor/FactuGES_Server.dpr @@ -116,8 +116,6 @@ uses schRecibosClienteServer_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteServer_Intf.pas', schRecibosProveedorClient_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorClient_Intf.pas', schRecibosProveedorServer_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorServer_Intf.pas', - schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas', - schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas', schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas', schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas', schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas', @@ -130,15 +128,17 @@ uses schAlbaranesProveedorServer_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorServer_Intf.pas', schPedidosProveedorClient_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorClient_Intf.pas', schPedidosProveedorServer_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorServer_Intf.pas', - schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas', - schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas', schBase_Intf in '..\Base\schBase_Intf.pas', schAlbaranesClienteClient_Intf in '..\Modulos\Albaranes de cliente\Model\schAlbaranesClienteClient_Intf.pas', schAlbaranesClienteServer_Intf in '..\Modulos\Albaranes de cliente\Model\schAlbaranesClienteServer_Intf.pas', + schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas', + schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas', + schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas', + schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas', schContratosClienteClient_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteClient_Intf.pas', schContratosClienteServer_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteServer_Intf.pas', - schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas', - schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas'; + schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas', + schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas'; {$R *.res} {$R ..\Servicios\RODLFile.res} diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj index 8ee87cd6..e75e1b01 100644 --- a/Source/Servidor/FactuGES_Server.dproj +++ b/Source/Servidor/FactuGES_Server.dproj @@ -28,8 +28,7 @@ Delphi.Personality -FalseTrueFalseTrueFalse3670FalseFalseFalseFalseFalse30821252Rodax Software S.L.3.6.7.0FactuGES (Servidor)3.6.7.0miércoles, 18 de octubre de 2023 17:30 - +FalseTrueFalseTrueFalse4000FalseFalseFalseFalseFalse30821252Rodax Software S.L.4.0.0.0FactuGES (Servidor)4.0.0.0jueves, 01 de agosto de 2024 15:42 File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found FactuGES_Server.dpr diff --git a/Source/Servidor/FactuGES_Server.rc b/Source/Servidor/FactuGES_Server.rc index e0aa9c74..502b1b69 100644 --- a/Source/Servidor/FactuGES_Server.rc +++ b/Source/Servidor/FactuGES_Server.rc @@ -1,7 +1,7 @@ MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Servidor.ico" 1 VERSIONINFO -FILEVERSION 3,6,7,0 -PRODUCTVERSION 3,6,7,0 +FILEVERSION 4,0,0,0 +PRODUCTVERSION 4,0,0,0 FILEFLAGSMASK 0x3FL FILEFLAGS 0x00L FILEOS 0x40004L @@ -13,10 +13,10 @@ BEGIN BLOCK "0C0A04E4" BEGIN VALUE "CompanyName", "Rodax Software S.L.\0" - VALUE "FileVersion", "3.6.7.0\0" + VALUE "FileVersion", "4.0.0.0\0" VALUE "ProductName", "FactuGES (Servidor)\0" - VALUE "ProductVersion", "3.6.7.0\0" - VALUE "CompileDate", "jueves, 19 de octubre de 2023 15:39\0" + VALUE "ProductVersion", "4.0.0.0\0" + VALUE "CompileDate", "domingo, 04 de agosto de 2024 18:59\0" END END BLOCK "VarFileInfo" diff --git a/Source/Servidor/FactuGES_Server.res b/Source/Servidor/FactuGES_Server.res index d6d25530cdcd3cd1afc77e3adcd9e9abdfdee2a4..16bd23b1a5549b52ca32a70f52a8aa598e349c0e 100644 GIT binary patch delta 129 zcmdn8jd9C1#tk}={0s~%3=jaOCtF7zV=w^W$*fVuNW8`|d@e1=?xOolv$ ubRbKIK>?`J1W2YZqyouAuxK$u2~Z9uW&~7W1Xg3nV8LL;U^@AAlqUcn3l~=a delta 129 zcmdn8jd9C1#tk}={A>)&3=9nH3{ZNqb>u-#V+K72Gaxpf%ovkLk3GAnF8c1Fyu2NGn4@3lNgG?e2AzKg8_pPgE3gGDT5V*@#NQ0o&YqH B7n1-0 diff --git a/Source/Servidor/uDataModuleServer.pas b/Source/Servidor/uDataModuleServer.pas index cb33b180..c294e89d 100644 --- a/Source/Servidor/uDataModuleServer.pas +++ b/Source/Servidor/uDataModuleServer.pas @@ -62,6 +62,7 @@ type function DarRutaInformes : String; +function DarRutaPDFS : String; function Encrypt (const Source : string) : String; function Decrypt (const Source : string) : String; function GetNextAutoinc(AConnection : IDAConnection; const GeneratorName: string): integer; @@ -82,6 +83,11 @@ begin Result := ExtractFilePath(Application.ExeName) + 'Informes' + PathDelim; end; +function DarRutaPDFS : String; +begin + Result := ExtractFilePath(Application.ExeName) + 'PDFS' + PathDelim; +end; + function GetNextAutoinc(AConnection : IDAConnection; const GeneratorName: string): integer; var ds: IDADataset;