diff --git a/Build/Build.fbl6 b/Build/Build.fbl6 index cd6ec48..6971afa 100644 Binary files a/Build/Build.fbl6 and b/Build/Build.fbl6 differ diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index cd2da68..be8839b 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -58,56 +58,56 @@ MainSource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
fConfigurarConexion
TForm diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj index c6bff92..6b752ab 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\TrueFalse2020FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.0.2.0FactuGES v2FactuGES v22.0.2.0 +FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse2030FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.0.3.0FactuGES v2FactuGES v22.0.3.0 File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found FactuGES.dprFalse diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res index 14b0750..4c32aad 100644 Binary files a/Source/Cliente/FactuGES.res and b/Source/Cliente/FactuGES.res differ diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj index 0edfe47..b51a870 100644 --- a/Source/GUIBase/GUIBase.dproj +++ b/Source/GUIBase/GUIBase.dproj @@ -58,34 +58,34 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fDialogBase
diff --git a/Source/Informes/1/InfContratoCliente.fr3 b/Source/Informes/1/InfContratoCliente.fr3 index 226a841..02999cc 100644 --- a/Source/Informes/1/InfContratoCliente.fr3 +++ b/Source/Informes/1/InfContratoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -70,12 +70,12 @@ - + - - - + + + diff --git a/Source/Informes/1/InfFacturaCliente.fr3 b/Source/Informes/1/InfFacturaCliente.fr3 index bc0393a..fa87018 100644 --- a/Source/Informes/1/InfFacturaCliente.fr3 +++ b/Source/Informes/1/InfFacturaCliente.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Lib/ApplicationBase.dcp b/Source/Lib/ApplicationBase.dcp index 5e5f011..5e37463 100644 Binary files a/Source/Lib/ApplicationBase.dcp and b/Source/Lib/ApplicationBase.dcp differ diff --git a/Source/Lib/Base.dcp b/Source/Lib/Base.dcp index 16409b4..668b1ba 100644 Binary files a/Source/Lib/Base.dcp and b/Source/Lib/Base.dcp differ diff --git a/Source/Lib/GUIBase.dcp b/Source/Lib/GUIBase.dcp index d5a493a..03b2828 100644 Binary files a/Source/Lib/GUIBase.dcp and b/Source/Lib/GUIBase.dcp differ diff --git a/Source/Modulos/Contactos/Controller/uClientesController.pas b/Source/Modulos/Contactos/Controller/uClientesController.pas index bb00fe5..91f2c13 100644 --- a/Source/Modulos/Contactos/Controller/uClientesController.pas +++ b/Source/Modulos/Contactos/Controller/uClientesController.pas @@ -22,7 +22,7 @@ type procedure PrintInformeListaDatosContacto(ACliente : IBizCliente; AllItems: Boolean = false); procedure SetTieneSubcuenta(ACliente: IBizCliente; AValue: Boolean); procedure SetIgnorarContabilidad(ACliente: IBizCliente; AValue: Boolean); - function AsignarLOPD(AClientes: IBizCliente): TStringList; + function AsignarLOPD(AClientes: IBizCliente): Boolean; end; TClientesController = class(TContactosController, IClientesController) @@ -56,7 +56,7 @@ type procedure PrintInformeListaDatosContacto(ACliente : IBizCliente; AllItems: Boolean = false); procedure SetTieneSubcuenta(ACliente: IBizCliente; AValue: Boolean); procedure SetIgnorarContabilidad(ACliente: IBizCliente; AValue: Boolean); - function AsignarLOPD(AClientes: IBizCliente): TStringList; + function AsignarLOPD(AClientes: IBizCliente): Boolean; end; implementation @@ -69,13 +69,15 @@ uses { TClientesController } -function TClientesController.AsignarLOPD(AClientes: IBizCliente): TStringList; -//Devolverá la lista de clientes que no han podido ser cambiados a LOPD firmada +function TClientesController.AsignarLOPD(AClientes: IBizCliente): Boolean; +//Devolverá true en el caso de tener que modificar algun elemento de Aclientes, en caso de no modificar nada devuelve false begin - Result := TStringList.Create; - + Result := false; if Assigned(AClientes) then begin + if not AClientes.Datatable.Active then + AClientes.Datatable.Active := true; + with AClientes.DataTable do begin First; @@ -85,6 +87,7 @@ begin begin Edit; AClientes.LOPD := 1; + Result := true; Post; end; Next; diff --git a/Source/Modulos/Contactos/Views/Contactos_view.dproj b/Source/Modulos/Contactos/Views/Contactos_view.dproj index 0166601..9353056 100644 --- a/Source/Modulos/Contactos/Views/Contactos_view.dproj +++ b/Source/Modulos/Contactos/Views/Contactos_view.dproj @@ -47,40 +47,40 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fEditorCliente
diff --git a/Source/Modulos/Contactos/Views/uEditorClientes.dfm b/Source/Modulos/Contactos/Views/uEditorClientes.dfm index 95c461e..34334cb 100644 --- a/Source/Modulos/Contactos/Views/uEditorClientes.dfm +++ b/Source/Modulos/Contactos/Views/uEditorClientes.dfm @@ -98,12 +98,6 @@ inherited fEditorClientes: TfEditorClientes ExplicitWidth = 786 ExplicitHeight = 270 inherited cxGridView: TcxGridDBTableView - DataController.Summary.FooterSummaryItems = < - item - Format = '0 clientes' - Kind = skCount - Column = frViewClientes1.cxGridViewTIENDA - end> end end inherited frViewFiltroBase1: TfrViewFiltroBase diff --git a/Source/Modulos/Contactos/Views/uEditorClientes.pas b/Source/Modulos/Contactos/Views/uEditorClientes.pas index 4f5ba49..2734609 100644 --- a/Source/Modulos/Contactos/Views/uEditorClientes.pas +++ b/Source/Modulos/Contactos/Views/uEditorClientes.pas @@ -80,9 +80,7 @@ begin ViewGrid.RestoreGridStatus; end; - (Controller as IClientesController).AsignarLOPD(AClientes); - - if (AClientes.DataTable.RecordCount > 0) then + if (Controller as IClientesController).AsignarLOPD(AClientes) then RefrescarInterno; end; diff --git a/Source/Modulos/Contactos/Views/uViewClientes.dfm b/Source/Modulos/Contactos/Views/uViewClientes.dfm index 1a54884..d6cdabd 100644 --- a/Source/Modulos/Contactos/Views/uViewClientes.dfm +++ b/Source/Modulos/Contactos/Views/uViewClientes.dfm @@ -13,7 +13,7 @@ inherited frViewClientes: TfrViewClientes item Format = '0 clientes' Kind = skCount - Column = cxGridViewNIF_CIF + Column = cxGridViewNOMBRE end> object cxGridViewLOPD: TcxGridDBColumn [1] Caption = 'GDPR' diff --git a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas index beba6bf..48bb4b8 100644 --- a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas +++ b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas @@ -59,6 +59,7 @@ type procedure Print(AContrato : IBizContratoCliente; AllItems: Boolean = false); procedure EnviarContratoPorEMail(AContrato : IBizContratoCliente); function CambiarSituacion(AContrato : IBizContratoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean = false): Boolean; + function AsignarLOPD(AContratos: IBizContratoCliente): Boolean; function DarListaAnosContratos: TStringList; procedure FiltrarAno(AContrato: IBizContratoCliente; ADynWhereDataTable: WideString; const Ano: String); @@ -136,6 +137,7 @@ type procedure Print(AContrato : IBizContratoCliente; AllItems: Boolean = false); procedure EnviarContratoPorEMail(AContrato : IBizContratoCliente); function CambiarSituacion(AContrato : IBizContratoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean = false): Boolean; + function AsignarLOPD(AContratos: IBizContratoCliente): Boolean; function DarListaAnosContratos: TStringList; procedure FiltrarAno(AContrato: IBizContratoCliente; ADynWhereDataTable: WideString; const Ano: String); @@ -205,6 +207,29 @@ begin FDataModule := TDataModuleContratosCliente.Create(Nil); end; +function TContratosClienteController.AsignarLOPD(AContratos: IBizContratoCliente): Boolean; +var + ACliente : IBizCliente; + AResultado : Boolean; +begin + Result := false; + if Assigned(AContratos) then + begin + with AContratos.DataTable do + begin + First; + while not EOF do + begin + ACliente := (FClienteController.Buscar(AContratos.ID_Cliente) as IBizCliente); + AResultado := FClienteController.AsignarLOPD(ACliente); + if not Result then + Result := AResultado; + Next; + end; + end; + end; +end; + function TContratosClienteController.Buscar(const ID: Integer): IBizContratoCliente; begin Result := FDataModule.GetItem(ID); @@ -757,7 +782,7 @@ begin end; ShowHourglassCursor; - ATituloEnvio := 'Contrato ' + AContrato.Cliente.NOMBRE + ' - ' + AContrato.REFERENCIA_CLIENTE; + ATituloEnvio := 'Presupuesto ' + AContrato.Cliente.NOMBRE + ' - ' + AContrato.REFERENCIA_CLIENTE; AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(ATituloEnvio)); AReportController := TContratosClienteReportController.Create; try diff --git a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas index 4376bf8..2881f9f 100644 --- a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas +++ b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas @@ -97,7 +97,7 @@ begin try AEditor.Controller := Self; AEditor.ListaID := AListaID; - AEditor.Title := 'Contrato - ' + AppFactuGES.EmpresaActiva.NOMBRE; + AEditor.Title := 'Presupuesto - ' + AppFactuGES.EmpresaActiva.NOMBRE; AEditor.LoadFromStream(AStream); AEditor.Preview; finally @@ -114,15 +114,15 @@ begin end; procedure TContratosClienteReportController.Print(const AListaID : TIntegerList); -{var +var AStream: Binary; - AEditor : IEditorContratosClientePreview;} + AEditor : IEditorContratosClientePreview; begin -{ AEditor := NIL; + AEditor := NIL; ShowHourglassCursor; try - AStream := FDataModule.GetRptPresupuestos(AListaID); + AStream := FDataModule.GetRptContratos(AListaID); try CreateEditor('EditorContratosClientePreview', IEditorContratosClientePreview, AEditor); if Assigned(AEditor) then @@ -144,7 +144,6 @@ begin finally HideHourglassCursor; end; -} end; end. diff --git a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm index 8048777..2d430ab 100644 --- a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm @@ -45,6 +45,10 @@ inherited DataModuleContratosCliente: TDataModuleContratosCliente DataType = datInteger DictionaryEntry = 'ContratosCliente_ID_CLIENTE' end + item + Name = 'LOPD' + DataType = datSmallInt + end item Name = 'NOMBRE_CLIENTE' DataType = datString diff --git a/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas b/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas index 2966124..db4c0ea 100644 --- a/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas +++ b/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas @@ -9,13 +9,13 @@ const { Data table rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_Valores = '{15E11A92-F4CF-4E0E-B5D8-6184059DD8CE}'; - RID_Propiedades = '{B429EF7C-4158-41C1-BE6D-922C169CF14E}'; - RID_ListaAnosContratos = '{30057A80-16CD-42BE-8D5D-EDAFE97E8C5A}'; - RID_ContratosClienteBeneficios = '{2A70B854-D3DC-4787-87AD-051A0184E82C}'; - RID_ContratosCliente = '{0DB07217-A4E5-4685-BE8F-F2170E3AB1CA}'; - RID_TiposCapitulos = '{3C034371-9C2C-46CB-A282-6F62EFA16CB7}'; - RID_ContratosCliente_Detalles = '{AC6A2500-FFA3-4A5B-A26B-AA952998F27F}'; + RID_Valores = '{99FB7080-55D3-4F71-9776-CA0470AF1B16}'; + RID_Propiedades = '{39955AC4-909B-43B5-BFC3-AAC1E85B4521}'; + RID_ListaAnosContratos = '{842CF7DF-5B01-44CC-88B8-EF63F5B7B3BD}'; + RID_ContratosClienteBeneficios = '{CB3A4E53-B875-4D04-A53A-637A86A595CA}'; + RID_ContratosCliente = '{CFCB6098-A9BA-4688-BDA7-0CA8EF49CBD4}'; + RID_TiposCapitulos = '{E3584A5B-938B-48B5-87B2-A23154011868}'; + RID_ContratosCliente_Detalles = '{78024C2B-F048-4252-A838-4636A2126824}'; { Data table names } nme_Valores = 'Valores'; @@ -90,6 +90,7 @@ const fld_ContratosClienteID = 'ID'; fld_ContratosClienteID_EMPRESA = 'ID_EMPRESA'; fld_ContratosClienteID_CLIENTE = 'ID_CLIENTE'; + fld_ContratosClienteLOPD = 'LOPD'; fld_ContratosClienteNOMBRE_CLIENTE = 'NOMBRE_CLIENTE'; fld_ContratosClienteREF_CLIENTE = 'REF_CLIENTE'; fld_ContratosClienteNOMBRE_COMERCIAL_CLIENTE = 'NOMBRE_COMERCIAL_CLIENTE'; @@ -145,56 +146,57 @@ const idx_ContratosClienteID = 0; idx_ContratosClienteID_EMPRESA = 1; idx_ContratosClienteID_CLIENTE = 2; - idx_ContratosClienteNOMBRE_CLIENTE = 3; - idx_ContratosClienteREF_CLIENTE = 4; - idx_ContratosClienteNOMBRE_COMERCIAL_CLIENTE = 5; - idx_ContratosClienteNIF_CIF = 6; - idx_ContratosClienteNOMBRE = 7; - idx_ContratosClienteID_DIRECCION = 8; - idx_ContratosClienteCALLE = 9; - idx_ContratosClientePOBLACION = 10; - idx_ContratosClientePROVINCIA = 11; - idx_ContratosClienteCODIGO_POSTAL = 12; - idx_ContratosClienteTELEFONO = 13; - idx_ContratosClienteMOVIL = 14; - idx_ContratosClienteREFERENCIA = 15; - idx_ContratosClienteFECHA_CONTRATO = 16; - idx_ContratosClienteSITUACION = 17; - idx_ContratosClienteFORMA_PAGO = 18; - idx_ContratosClientePLAZO_ENTREGA = 19; - idx_ContratosClienteOBSERVACIONES = 20; - idx_ContratosClienteINCIDENCIAS = 21; - idx_ContratosClienteINCIDENCIAS_ACTIVAS = 22; - idx_ContratosClienteFECHA_ALTA = 23; - idx_ContratosClienteFECHA_MODIFICACION = 24; - idx_ContratosClienteUSUARIO = 25; - idx_ContratosClienteRECARGO_EQUIVALENCIA = 26; - idx_ContratosClienteRE = 27; - idx_ContratosClienteIMPORTE_RE = 28; - idx_ContratosClienteID_TIPO_IVA = 29; - idx_ContratosClienteIVA = 30; - idx_ContratosClienteIMPORTE_IVA = 31; - idx_ContratosClienteIMPORTE_NETO = 32; - idx_ContratosClienteIMPORTE_PORTE = 33; - idx_ContratosClienteID_TIENDA = 34; - idx_ContratosClienteTIENDA = 35; - idx_ContratosClienteBASE_IMPONIBLE = 36; - idx_ContratosClienteDESCUENTO = 37; - idx_ContratosClienteIMPORTE_DESCUENTO = 38; - idx_ContratosClienteIMPORTE_TOTAL = 39; - idx_ContratosClienteID_FORMA_PAGO = 40; - idx_ContratosClienteID_VENDEDOR = 41; - idx_ContratosClienteVENDEDOR = 42; - idx_ContratosClientePERSONA_CONTACTO = 43; - idx_ContratosClienteTIPO_CONTRATO = 44; - idx_ContratosClienteCONDICIONES = 45; - idx_ContratosClienteCALIDADES = 46; - idx_ContratosClienteREFERENCIA_CLIENTE = 47; - idx_ContratosClienteLISTA_NOMBRES = 48; - idx_ContratosClienteFECHA_DECISION = 49; - idx_ContratosClienteFACTURA_ASOCIADA = 50; - idx_ContratosClienteFECHA_PREVISTA_MONTAJE = 51; - idx_ContratosClienteCAMPO_LIBRE = 52; + idx_ContratosClienteLOPD = 3; + idx_ContratosClienteNOMBRE_CLIENTE = 4; + idx_ContratosClienteREF_CLIENTE = 5; + idx_ContratosClienteNOMBRE_COMERCIAL_CLIENTE = 6; + idx_ContratosClienteNIF_CIF = 7; + idx_ContratosClienteNOMBRE = 8; + idx_ContratosClienteID_DIRECCION = 9; + idx_ContratosClienteCALLE = 10; + idx_ContratosClientePOBLACION = 11; + idx_ContratosClientePROVINCIA = 12; + idx_ContratosClienteCODIGO_POSTAL = 13; + idx_ContratosClienteTELEFONO = 14; + idx_ContratosClienteMOVIL = 15; + idx_ContratosClienteREFERENCIA = 16; + idx_ContratosClienteFECHA_CONTRATO = 17; + idx_ContratosClienteSITUACION = 18; + idx_ContratosClienteFORMA_PAGO = 19; + idx_ContratosClientePLAZO_ENTREGA = 20; + idx_ContratosClienteOBSERVACIONES = 21; + idx_ContratosClienteINCIDENCIAS = 22; + idx_ContratosClienteINCIDENCIAS_ACTIVAS = 23; + idx_ContratosClienteFECHA_ALTA = 24; + idx_ContratosClienteFECHA_MODIFICACION = 25; + idx_ContratosClienteUSUARIO = 26; + idx_ContratosClienteRECARGO_EQUIVALENCIA = 27; + idx_ContratosClienteRE = 28; + idx_ContratosClienteIMPORTE_RE = 29; + idx_ContratosClienteID_TIPO_IVA = 30; + idx_ContratosClienteIVA = 31; + idx_ContratosClienteIMPORTE_IVA = 32; + idx_ContratosClienteIMPORTE_NETO = 33; + idx_ContratosClienteIMPORTE_PORTE = 34; + idx_ContratosClienteID_TIENDA = 35; + idx_ContratosClienteTIENDA = 36; + idx_ContratosClienteBASE_IMPONIBLE = 37; + idx_ContratosClienteDESCUENTO = 38; + idx_ContratosClienteIMPORTE_DESCUENTO = 39; + idx_ContratosClienteIMPORTE_TOTAL = 40; + idx_ContratosClienteID_FORMA_PAGO = 41; + idx_ContratosClienteID_VENDEDOR = 42; + idx_ContratosClienteVENDEDOR = 43; + idx_ContratosClientePERSONA_CONTACTO = 44; + idx_ContratosClienteTIPO_CONTRATO = 45; + idx_ContratosClienteCONDICIONES = 46; + idx_ContratosClienteCALIDADES = 47; + idx_ContratosClienteREFERENCIA_CLIENTE = 48; + idx_ContratosClienteLISTA_NOMBRES = 49; + idx_ContratosClienteFECHA_DECISION = 50; + idx_ContratosClienteFACTURA_ASOCIADA = 51; + idx_ContratosClienteFECHA_PREVISTA_MONTAJE = 52; + idx_ContratosClienteCAMPO_LIBRE = 53; { TiposCapitulos fields } fld_TiposCapitulosID = 'ID'; @@ -253,7 +255,7 @@ const type { IValores } IValores = interface(IDAStronglyTypedDataTable) - ['{9648EEF6-67C0-48F2-98D0-3F28225AE35F}'] + ['{09FAC198-D702-4643-8EC4-4EB93D4BF4F6}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -312,7 +314,7 @@ type { IPropiedades } IPropiedades = interface(IDAStronglyTypedDataTable) - ['{DAB78C0C-ABB8-4638-A964-D66FCE695D0B}'] + ['{54CBB767-40EE-4C07-B6A5-63974D22B258}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -371,7 +373,7 @@ type { IListaAnosContratos } IListaAnosContratos = interface(IDAStronglyTypedDataTable) - ['{803D3DE4-AE98-4631-A877-1D0F20987BC1}'] + ['{6B58BA26-5CD0-4833-8D04-BBCC26C3F2B5}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -406,7 +408,7 @@ type { IContratosClienteBeneficios } IContratosClienteBeneficios = interface(IDAStronglyTypedDataTable) - ['{80E97C0A-AA60-4FA0-9AE7-25932450F7FA}'] + ['{4ED11DCC-83B2-4E5D-ABDB-ECD75EB2E34D}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -609,7 +611,7 @@ type { IContratosCliente } IContratosCliente = interface(IDAStronglyTypedDataTable) - ['{C90AFE40-BB27-4460-A9A5-3EF0A0DD8972}'] + ['{F0ADB580-DB5D-4260-9065-0A37ED306068}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -623,6 +625,10 @@ type procedure SetID_CLIENTEValue(const aValue: Integer); function GetID_CLIENTEIsNull: Boolean; procedure SetID_CLIENTEIsNull(const aValue: Boolean); + function GetLOPDValue: SmallInt; + procedure SetLOPDValue(const aValue: SmallInt); + function GetLOPDIsNull: Boolean; + procedure SetLOPDIsNull(const aValue: Boolean); function GetNOMBRE_CLIENTEValue: String; procedure SetNOMBRE_CLIENTEValue(const aValue: String); function GetNOMBRE_CLIENTEIsNull: Boolean; @@ -826,6 +832,8 @@ type property ID_EMPRESAIsNull: Boolean read GetID_EMPRESAIsNull write SetID_EMPRESAIsNull; property ID_CLIENTE: Integer read GetID_CLIENTEValue write SetID_CLIENTEValue; property ID_CLIENTEIsNull: Boolean read GetID_CLIENTEIsNull write SetID_CLIENTEIsNull; + property LOPD: SmallInt read GetLOPDValue write SetLOPDValue; + property LOPDIsNull: Boolean read GetLOPDIsNull write SetLOPDIsNull; property NOMBRE_CLIENTE: String read GetNOMBRE_CLIENTEValue write SetNOMBRE_CLIENTEValue; property NOMBRE_CLIENTEIsNull: Boolean read GetNOMBRE_CLIENTEIsNull write SetNOMBRE_CLIENTEIsNull; property REF_CLIENTE: String read GetREF_CLIENTEValue write SetREF_CLIENTEValue; @@ -957,6 +965,10 @@ type procedure SetID_CLIENTEValue(const aValue: Integer); virtual; function GetID_CLIENTEIsNull: Boolean; virtual; procedure SetID_CLIENTEIsNull(const aValue: Boolean); virtual; + function GetLOPDValue: SmallInt; virtual; + procedure SetLOPDValue(const aValue: SmallInt); virtual; + function GetLOPDIsNull: Boolean; virtual; + procedure SetLOPDIsNull(const aValue: Boolean); virtual; function GetNOMBRE_CLIENTEValue: String; virtual; procedure SetNOMBRE_CLIENTEValue(const aValue: String); virtual; function GetNOMBRE_CLIENTEIsNull: Boolean; virtual; @@ -1159,6 +1171,8 @@ type property ID_EMPRESAIsNull: Boolean read GetID_EMPRESAIsNull write SetID_EMPRESAIsNull; property ID_CLIENTE: Integer read GetID_CLIENTEValue write SetID_CLIENTEValue; property ID_CLIENTEIsNull: Boolean read GetID_CLIENTEIsNull write SetID_CLIENTEIsNull; + property LOPD: SmallInt read GetLOPDValue write SetLOPDValue; + property LOPDIsNull: Boolean read GetLOPDIsNull write SetLOPDIsNull; property NOMBRE_CLIENTE: String read GetNOMBRE_CLIENTEValue write SetNOMBRE_CLIENTEValue; property NOMBRE_CLIENTEIsNull: Boolean read GetNOMBRE_CLIENTEIsNull write SetNOMBRE_CLIENTEIsNull; property REF_CLIENTE: String read GetREF_CLIENTEValue write SetREF_CLIENTEValue; @@ -1271,7 +1285,7 @@ type } { ITiposCapitulos } ITiposCapitulos = interface(IDAStronglyTypedDataTable) - ['{1EAC55ED-FD74-4C09-BA7C-01071428BF24}'] + ['{7F065E7D-C88C-4287-B4F1-4C90BDE4A5D0}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1366,7 +1380,7 @@ type { IContratosCliente_Detalles } IContratosCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{0C09878D-60CA-4203-BC67-10838C9E8EAA}'] + ['{FDC78645-413A-493D-8809-FC071D4847D8}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2235,6 +2249,27 @@ begin DataTable.Fields[idx_ContratosClienteID_CLIENTE].AsVariant := Null; end; +function TContratosClienteDataTableRules.GetLOPDValue: SmallInt; +begin + result := DataTable.Fields[idx_ContratosClienteLOPD].AsSmallInt; +end; + +procedure TContratosClienteDataTableRules.SetLOPDValue(const aValue: SmallInt); +begin + DataTable.Fields[idx_ContratosClienteLOPD].AsSmallInt := aValue; +end; + +function TContratosClienteDataTableRules.GetLOPDIsNull: boolean; +begin + result := DataTable.Fields[idx_ContratosClienteLOPD].IsNull; +end; + +procedure TContratosClienteDataTableRules.SetLOPDIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_ContratosClienteLOPD].AsVariant := Null; +end; + function TContratosClienteDataTableRules.GetNOMBRE_CLIENTEValue: String; begin result := DataTable.Fields[idx_ContratosClienteNOMBRE_CLIENTE].AsString; diff --git a/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas b/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas index d60e64e..6f2cbbe 100644 --- a/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas +++ b/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas @@ -9,18 +9,18 @@ const { Delta rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_ValoresDelta = '{3B063834-C8A8-4844-ACC8-234467330330}'; - RID_PropiedadesDelta = '{619FA028-3343-49AB-9A72-A6DF0667FC32}'; - RID_ListaAnosContratosDelta = '{7F13079B-DB22-4617-A28C-01007AF43172}'; - RID_ContratosClienteBeneficiosDelta = '{28BA457E-2509-4B11-9724-10E60AFB2BA9}'; - RID_ContratosClienteDelta = '{DFEAF2D7-9D59-40C6-8205-677DCCD6C526}'; - RID_TiposCapitulosDelta = '{74EAAE1F-DEB6-49BD-BF6C-FAE257428A2D}'; - RID_ContratosCliente_DetallesDelta = '{72FC35AB-AC55-43FB-B58A-152274E2A1CC}'; + RID_ValoresDelta = '{632E5888-2F7A-4385-87BD-46FC070B09D8}'; + RID_PropiedadesDelta = '{5BFC3D15-E4D9-4699-8EC7-9B314CD76D61}'; + RID_ListaAnosContratosDelta = '{92902251-E218-4288-839E-12C085E7E005}'; + RID_ContratosClienteBeneficiosDelta = '{8DB4D500-6D3F-4533-AC6F-99D59749A965}'; + RID_ContratosClienteDelta = '{65572B83-AD9B-4706-87EB-1454077273F4}'; + RID_TiposCapitulosDelta = '{21A8FE37-27F9-4CC7-9EE9-553179AC7015}'; + RID_ContratosCliente_DetallesDelta = '{C96EC97B-D8F0-4CA9-891B-1483F39E2224}'; type { IValoresDelta } IValoresDelta = interface(IValores) - ['{3B063834-C8A8-4844-ACC8-234467330330}'] + ['{632E5888-2F7A-4385-87BD-46FC070B09D8}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_PROPIEDADValue : Integer; @@ -78,7 +78,7 @@ type { IPropiedadesDelta } IPropiedadesDelta = interface(IPropiedades) - ['{619FA028-3343-49AB-9A72-A6DF0667FC32}'] + ['{5BFC3D15-E4D9-4699-8EC7-9B314CD76D61}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -136,7 +136,7 @@ type { IListaAnosContratosDelta } IListaAnosContratosDelta = interface(IListaAnosContratos) - ['{7F13079B-DB22-4617-A28C-01007AF43172}'] + ['{92902251-E218-4288-839E-12C085E7E005}'] { Property getters and setters } function GetOldANOValue : String; @@ -170,7 +170,7 @@ type { IContratosClienteBeneficiosDelta } IContratosClienteBeneficiosDelta = interface(IContratosClienteBeneficios) - ['{28BA457E-2509-4B11-9724-10E60AFB2BA9}'] + ['{8DB4D500-6D3F-4533-AC6F-99D59749A965}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldREFERENCIAValue : String; @@ -372,11 +372,12 @@ type { IContratosClienteDelta } IContratosClienteDelta = interface(IContratosCliente) - ['{DFEAF2D7-9D59-40C6-8205-677DCCD6C526}'] + ['{65572B83-AD9B-4706-87EB-1454077273F4}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; function GetOldID_CLIENTEValue : Integer; + function GetOldLOPDValue : SmallInt; function GetOldNOMBRE_CLIENTEValue : String; function GetOldREF_CLIENTEValue : String; function GetOldNOMBRE_COMERCIAL_CLIENTEValue : String; @@ -432,6 +433,7 @@ type property OldID : Integer read GetOldIDValue; property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue; property OldID_CLIENTE : Integer read GetOldID_CLIENTEValue; + property OldLOPD : SmallInt read GetOldLOPDValue; property OldNOMBRE_CLIENTE : String read GetOldNOMBRE_CLIENTEValue; property OldREF_CLIENTE : String read GetOldREF_CLIENTEValue; property OldNOMBRE_COMERCIAL_CLIENTE : String read GetOldNOMBRE_COMERCIAL_CLIENTEValue; @@ -519,6 +521,12 @@ type function GetOldID_CLIENTEIsNull: Boolean; virtual; procedure SetID_CLIENTEValue(const aValue: Integer); virtual; procedure SetID_CLIENTEIsNull(const aValue: Boolean); virtual; + function GetLOPDValue: SmallInt; virtual; + function GetLOPDIsNull: Boolean; virtual; + function GetOldLOPDValue: SmallInt; virtual; + function GetOldLOPDIsNull: Boolean; virtual; + procedure SetLOPDValue(const aValue: SmallInt); virtual; + procedure SetLOPDIsNull(const aValue: Boolean); virtual; function GetNOMBRE_CLIENTEValue: String; virtual; function GetNOMBRE_CLIENTEIsNull: Boolean; virtual; function GetOldNOMBRE_CLIENTEValue: String; virtual; @@ -827,6 +835,10 @@ type property ID_CLIENTEIsNull : Boolean read GetID_CLIENTEIsNull write SetID_CLIENTEIsNull; property OldID_CLIENTE : Integer read GetOldID_CLIENTEValue; property OldID_CLIENTEIsNull : Boolean read GetOldID_CLIENTEIsNull; + property LOPD : SmallInt read GetLOPDValue write SetLOPDValue; + property LOPDIsNull : Boolean read GetLOPDIsNull write SetLOPDIsNull; + property OldLOPD : SmallInt read GetOldLOPDValue; + property OldLOPDIsNull : Boolean read GetOldLOPDIsNull; property NOMBRE_CLIENTE : String read GetNOMBRE_CLIENTEValue write SetNOMBRE_CLIENTEValue; property NOMBRE_CLIENTEIsNull : Boolean read GetNOMBRE_CLIENTEIsNull write SetNOMBRE_CLIENTEIsNull; property OldNOMBRE_CLIENTE : String read GetOldNOMBRE_CLIENTEValue; @@ -1036,7 +1048,7 @@ type { ITiposCapitulosDelta } ITiposCapitulosDelta = interface(ITiposCapitulos) - ['{74EAAE1F-DEB6-49BD-BF6C-FAE257428A2D}'] + ['{21A8FE37-27F9-4CC7-9EE9-553179AC7015}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldPOSICIONValue : Integer; @@ -1130,7 +1142,7 @@ type { IContratosCliente_DetallesDelta } IContratosCliente_DetallesDelta = interface(IContratosCliente_Detalles) - ['{72FC35AB-AC55-43FB-B58A-152274E2A1CC}'] + ['{C96EC97B-D8F0-4CA9-891B-1483F39E2224}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CONTRATOValue : Integer; @@ -2249,6 +2261,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosClienteID_CLIENTE] := Null; end; +function TContratosClienteBusinessProcessorRules.GetLOPDValue: SmallInt; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosClienteLOPD]; +end; + +function TContratosClienteBusinessProcessorRules.GetLOPDIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosClienteLOPD]); +end; + +function TContratosClienteBusinessProcessorRules.GetOldLOPDValue: SmallInt; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ContratosClienteLOPD]; +end; + +function TContratosClienteBusinessProcessorRules.GetOldLOPDIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ContratosClienteLOPD]); +end; + +procedure TContratosClienteBusinessProcessorRules.SetLOPDValue(const aValue: SmallInt); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosClienteLOPD] := aValue; +end; + +procedure TContratosClienteBusinessProcessorRules.SetLOPDIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosClienteLOPD] := Null; +end; + function TContratosClienteBusinessProcessorRules.GetNOMBRE_CLIENTEValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosClienteNOMBRE_CLIENTE]; diff --git a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas index d64b751..5384aeb 100644 --- a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas +++ b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas @@ -563,7 +563,7 @@ begin frxReport.Variables.Variables['VerPrecios'] := FVerPrecios; frxReport.Variables.Variables['VerTotales'] := FVerTotales; frxReport.AddFunction('function PONERJUSTIFICACIONCOMPLETA(ARTFText : String): String', 'User Function',''); - frxReport.ReportOptions.Name := 'Contrato ' + tbl_Cabecera.FieldByName('REFERENCIA').AsString; + frxReport.ReportOptions.Name := 'Presupuesto ' + tbl_Cabecera.FieldByName('REFERENCIA').AsString; frxReport.PrepareReport(False); finally diff --git a/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.dfm b/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.dfm index 46e85b0..7ebf1ab 100644 --- a/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.dfm +++ b/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.dfm @@ -494,6 +494,10 @@ object srvContratosCliente: TsrvContratosCliente item DatasetField = 'CAMPO_LIBRE' TableField = 'CAMPO_LIBRE' + end + item + DatasetField = 'LOPD' + TableField = 'LOPD' end> end> Name = 'ContratosCliente' @@ -516,6 +520,10 @@ object srvContratosCliente: TsrvContratosCliente DataType = datInteger DictionaryEntry = 'ContratosCliente_ID_CLIENTE' end + item + Name = 'LOPD' + DataType = datSmallInt + end item Name = 'NOMBRE_CLIENTE' DataType = datString diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm index 176e40f..e2df5c6 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm @@ -175,7 +175,6 @@ inherited fEditorContratoCliente: TfEditorContratoCliente inherited pgPaginas: TPageControl Width = 866 Height = 473 - ActivePage = pagInicidencias TabOrder = 1 OnChanging = pgPaginasChanging ExplicitTop = 109 @@ -472,40 +471,40 @@ inherited fEditorContratoCliente: TfEditorContratoCliente ExplicitWidth = 110 end inherited UpDown1: TUpDown - Left = 271 - ExplicitLeft = 271 + Left = 255 + ExplicitLeft = 255 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/uEditorContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm index c0c6ae6..a5625b7 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm @@ -194,7 +194,11 @@ inherited fEditorContratosCliente: TfEditorContratosCliente DockPos = 343 Visible = True ExplicitLeft = 431 - ExplicitWidth = 370 + ExplicitWidth = 430 + object TBXItem50: TTBXItem + Action = actLOPD + DisplayMode = nbdmImageAndText + end object TBXSeparatorItem18: TTBXSeparatorItem end object TBXItem44: TTBXItem @@ -326,6 +330,13 @@ inherited fEditorContratosCliente: TfEditorContratosCliente OnExecute = actGenerarReciboCliExecute OnUpdate = actGenerarReciboCliUpdate end + object actLOPD: TAction + Category = 'Acciones' + Caption = 'GDPR' + ImageIndex = 27 + OnExecute = actLOPDExecute + OnUpdate = actLOPDUpdate + end end inherited SmallImages: TPngImageList PngImages = < diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas index 882ed88..7329a37 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas @@ -57,6 +57,8 @@ type actRechazar: TAction; actGenerarReciboCli: TAction; TBXSeparatorItem21: TTBXSeparatorItem; + actLOPD: TAction; + TBXItem50: TTBXItem; procedure FormShow(Sender: TObject); procedure actGenerarAlbaranCliExecute(Sender: TObject); procedure actEliminarUpdate(Sender: TObject); @@ -88,6 +90,8 @@ type procedure actRechazarUpdate(Sender: TObject); procedure actGenerarReciboCliExecute(Sender: TObject); procedure actGenerarReciboCliUpdate(Sender: TObject); + procedure actLOPDExecute(Sender: TObject); + procedure actLOPDUpdate(Sender: TObject); private procedure cambiarSituacion (const ASituacion: String); @@ -363,6 +367,36 @@ begin FController.VerListadoBeneficios; end; +procedure TfEditorContratosCliente.actLOPDExecute(Sender: TObject); +var + AContratos: IBizContratoCliente; + +begin + inherited; + ViewGrid.SaveGridStatus; + try + SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Contratos as ISeleccionable).SelectedRecords); + AContratos := (Controller as IContratosClienteController).ExtraerSeleccionados(Contratos) as IBizContratoCliente; + finally + ViewGrid.RestoreGridStatus; + end; + + if (Controller as IContratosClienteController).AsignarLOPD(AContratos) then + RefrescarInterno; +end; + +procedure TfEditorContratosCliente.actLOPDUpdate(Sender: TObject); +begin + inherited; + + if HayDatos and Assigned(ViewGrid) then + (Sender as TAction).Enabled := not (dsDataTable.DataTable.State in dsEditModes) + and ViewGrid.esSeleccionCeldaDatos + and (ViewGrid.NumSeleccionados > 0) + else + (Sender as TAction).Enabled := False; +end; + procedure TfEditorContratosCliente.actRechazarExecute(Sender: TObject); begin cambiarSituacion(SITUACION_CONTRATO_RECHAZADO); diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm index f08bbd7..b76f78f 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm @@ -9,8 +9,9 @@ inherited frViewContratosCliente: TfrViewContratosCliente Height = 369 RootLevelOptions.DetailTabsPosition = dtpTop OnActiveTabChanged = cxGridActiveTabChanged + ExplicitTop = 130 ExplicitWidth = 903 - ExplicitHeight = 397 + ExplicitHeight = 369 inherited cxGridView: TcxGridDBTableView DataController.KeyFieldNames = 'ID' DataController.Options = [dcoAnsiSort, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoGroupsAlwaysExpanded] @@ -32,6 +33,24 @@ inherited frViewContratosCliente: TfrViewContratosCliente Kind = skSum Column = cxGridViewIMPORTE_TOTAL end> + object cxGridViewLOPD: TcxGridDBColumn + Caption = 'GDPR' + DataBinding.FieldName = 'LOPD' + PropertiesClassName = 'TcxImageComboBoxProperties' + Properties.Images = GridPNGImageList + Properties.Items = < + item + Value = 0 + end + item + ImageIndex = 4 + Tag = 1 + Value = 1 + end> + BestFitMaxWidth = 40 + MinWidth = 40 + Width = 40 + end object cxGridViewCAMPO_LIBRE: TcxGridDBColumn Caption = '-' DataBinding.FieldName = 'CAMPO_LIBRE' @@ -178,21 +197,27 @@ inherited frViewContratosCliente: TfrViewContratosCliente ExplicitHeight = 130 inherited TBXDockablePanel1: TTBXDockablePanel ExplicitWidth = 903 + ExplicitHeight = 130 inherited dxLayoutControl1: TdxLayoutControl Width = 903 Height = 100 ExplicitWidth = 903 + ExplicitHeight = 100 inherited txtFiltroTodo: TcxTextEdit + Left = 116 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 116 end inherited edtFechaIniFiltro: TcxDateEdit + Left = 116 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 116 ExplicitWidth = 200 Width = 200 end @@ -216,11 +241,13 @@ inherited frViewContratosCliente: TfrViewContratosCliente Width = 200 end inherited edtFecha2IniFiltro: TcxDateEdit + Left = 116 Enabled = True Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 116 ExplicitWidth = 200 Width = 200 end @@ -239,6 +266,7 @@ inherited frViewContratosCliente: TfrViewContratosCliente inherited TBXAlignmentPanel1: TTBXAlignmentPanel Top = 100 Width = 903 + ExplicitTop = 100 ExplicitWidth = 903 inherited tbxBotones: TTBXToolbar Width = 893 @@ -537,6 +565,29 @@ inherited frViewContratosCliente: TfrViewContratosCliente CF0000000049454E44AE426082} Name = 'PngImage3' Background = clWindow + end + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 61000000097048597300000AEB00000AEB01828B0D5A000001DA4944415478DA + 63FCFFFF3F032580912C5DF2F33964B539E3DF7DF8F1956403380CE7C85B5929 + CFFAF99ED7FCFCED9BE124192060B7D8D6CE5279E99B876C42674FFC0CFEF9C0 + 7A27D10628FBAF0FB030915F74E7EA6FE6F387FF87FD7A6AB195E83090F55915 + EEE7A23BE7FCD9CFAC170EFF4EFDF6C07A31D18128E1BE3CC8DB597BE1A3BBBF + B98EECFA91FBFDBEF574A0F07FA20C10B09B67EBE366B8E3CDF37F9C47F77CED + FC7CD3AE125D0DC400B3897C9CCCBCEADFD9182F331C4CFC010E6DCB39F29E0E + 3A07599939E477AE7FBFFBE3CF4BBE0C77F27F621820EAB848DFDC447931372B + 9FE68E5DF7577F3C73368E414588D9C6496BB3AA92B8CBDECD9FDEBC7CF9D3F2 + E71DE7BBD85CC928EAB438C4C7556F3A0B1B8BC8B1BD9FFFDE7B753F4C41994B + C3CA48B1E5F09ECFFFEF3F7D19F3FB5AD0725CDE047B41276243A09D85FAAAA7 + CFBFB11CDEFBEA8EA79F98E4C3FBBFB8CF9F7BBDE5EB453F3FE440C31E060CF5 + 4C4ED9F63B6565845D5EBEFEF29F11287AE9C4AF2FAFBF3D32FF753EFE3ABE80 + 86C7028FF5429B101F83FDCF5F7F66797697E1FFCDDB6FA7FFBAE69F4D289A91 + A2B19EC539C7E1C49BC7EC46F71EBDD9FFF9DFD338868B994F4930808181D76E + 413EF33F56D90F0F5ED4323C29FE4E4833080000904EC47A3EA3126900000000 + 49454E44AE426082} + Name = 'PngImage4' + Background = clWindow end> Bitmap = {} end diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas index 4dadc7c..a8e1e06 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas @@ -52,6 +52,7 @@ type cxGridViewFACTURA_ASOCIADA: TcxGridDBColumn; cxGridViewFECHA_PREVISTA_MONTAJE: TcxGridDBColumn; cxGridViewCAMPO_LIBRE: TcxGridDBColumn; + cxGridViewLOPD: 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 095a7de..1166519 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas @@ -38,8 +38,8 @@ type function Duplicar(AFactura: IBizFacturaCliente): IBizFacturaCliente; function GenerarAbono(AFactura: IBizFacturaCliente): IBizFacturaCliente; - procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false); - procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false); + procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true); + procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true); procedure EnviarFacturaPorEMail(AFactura : IBizFacturaCliente); procedure RecalcularImportes(AFactura: IBizFacturaCliente); @@ -53,6 +53,7 @@ type function DarListaAnosFacturas: TStringList; procedure FiltrarAno(AFactura: IBizFacturaCliente; ADynWhereDataTable: WideString; const Ano: String); function CambiarSituacion(AFactura : IBizFacturaCliente; AllItems: Boolean = false; ASituacion: String = CTE_PENDIENTE; AListaCausas: TStringList = nil): Boolean; + function AsignarLOPD(AFacturas: IBizFacturaCliente): Boolean; end; TFacturasClienteController = class(TControllerBase, IFacturasClienteController) @@ -103,8 +104,8 @@ type function GenerarAbono(AFactura: IBizFacturaCliente): IBizFacturaCliente; procedure RecuperarCliente(AFactura : IBizFacturaCliente); - procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false); - procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false); + procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true); + procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true); procedure EnviarFacturaPorEMail(AFactura : IBizFacturaCliente); procedure RecalcularImportes(AFactura: IBizFacturaCliente); @@ -122,6 +123,7 @@ type procedure FiltrarAno(AFactura: IBizFacturaCliente; ADynWhereDataTable: WideString; const Ano: String); function CambiarSituacion(AFactura : IBizFacturaCliente; AllItems: Boolean = false; ASituacion: String = CTE_PENDIENTE; AListaCausas: TStringList = nil): Boolean; + function AsignarLOPD(AFacturas: IBizFacturaCliente): Boolean; end; implementation @@ -207,6 +209,29 @@ begin Result := True; end; +function TFacturasClienteController.AsignarLOPD(AFacturas: IBizFacturaCliente): Boolean; +var + ACliente : IBizCliente; + AResultado : Boolean; +begin + Result := false; + if Assigned(AFacturas) then + begin + with AFacturas.DataTable do + begin + First; + while not EOF do + begin + ACliente := (FClienteController.Buscar(AFacturas.ID_Cliente) as IBizCliente); + AResultado := FClienteController.AsignarLOPD(ACliente); + if not Result then + Result := AResultado; + Next; + end; + end; + end; +end; + function TFacturasClienteController.Anadir(AFacturas: IBizFacturaCliente; AListaAlbaranes: IBizAlbaranCliente): Boolean; var @@ -1270,7 +1295,7 @@ begin Result := AFactura; end; -procedure TFacturasClienteController.Preview(AFactura: IBizFacturaCliente; AllItems: Boolean = false); +procedure TFacturasClienteController.Preview(AFactura: IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true); var AReportController : IFacturasClienteReportController; ID_Facturas: TIntegerList; @@ -1297,7 +1322,7 @@ begin else ID_Facturas.Add(AFactura.ID); - AReportController.Preview(ID_Facturas); + AReportController.Preview(ID_Facturas, AVerDatosCliente); finally AReportController := NIL; @@ -1305,7 +1330,7 @@ begin end; end; -procedure TFacturasClienteController.Print(AFactura: IBizFacturaCliente; AllItems: Boolean = false); +procedure TFacturasClienteController.Print(AFactura: IBizFacturaCliente; AllItems: Boolean = false; AVerDatosCliente: Boolean = true); var AReportController : IFacturasClienteReportController; ID_Facturas: TIntegerList; @@ -1332,7 +1357,7 @@ begin else ID_Facturas.Add(AFactura.ID); - AReportController.Print(ID_Facturas); + AReportController.Print(ID_Facturas, AVerDatosCliente); finally AReportController := NIL; diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas index 85b49b0..22f5d26 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas @@ -10,8 +10,8 @@ uses type IFacturasClienteReportController = interface(IControllerBase) ['{A0F41767-4FF6-4BAE-9FC9-894DD721D756}'] - procedure Preview(const AListaID : TIntegerList); - procedure Print(const AListaID : TIntegerList); + procedure Preview(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true); + procedure Print(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true); function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean; end; @@ -23,8 +23,8 @@ type constructor Create; override; destructor Destroy; override; - procedure Preview(const AListaID : TIntegerList); - procedure Print(const AListaID : TIntegerList); + procedure Preview(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true); + procedure Print(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true); function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean; end; @@ -80,14 +80,14 @@ begin end; end; -procedure TFacturasClienteReportController.Preview(const AListaID : TIntegerList); +procedure TFacturasClienteReportController.Preview(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true); var AStream: Binary; AEditor : IEditorFacturasClientePreview; begin AEditor := NIL; - AStream := FDataModule.GetReport(AListaID); + AStream := FDataModule.GetReport(AListaID, AVerDatosCliente); try CreateEditor('EditorFacturasClientePreview', IEditorFacturasClientePreview, AEditor); if Assigned(AEditor) then @@ -105,7 +105,7 @@ begin end; end; -procedure TFacturasClienteReportController.Print(const AListaID : TIntegerList); +procedure TFacturasClienteReportController.Print(const AListaID : TIntegerList; AVerDatosCliente: Boolean = true); var AStream: Binary; AEditor : IEditorFacturasClientePreview; @@ -113,7 +113,7 @@ begin AEditor := NIL; ShowHourglassCursor; try - AStream := FDataModule.GetReport(AListaID); + AStream := FDataModule.GetReport(AListaID, AVerDatosCliente); try CreateEditor('EditorFacturasClientePreview', IEditorFacturasClientePreview, AEditor); if Assigned(AEditor) then diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm index a2b6dec..153d547 100644 --- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm @@ -152,6 +152,10 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente DataType = datString Size = 255 end + item + Name = 'LOPD' + DataType = datSmallInt + end item Name = 'NOMBRE_COMERCIAL_CLIENTE' DataType = datString diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas index 1741e1b..d4b5510 100644 --- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas @@ -33,8 +33,8 @@ type function NewItem : IBizFacturaCliente; // Report - function GetReport(const AListaID: TIntegerList): Binary; - function GetRptPDFFactura(const AID: Integer): Binary; + function GetReport(const AListaID: TIntegerList; AVerDatosCliente: Boolean = true): Binary; + function GetRptPDFFactura(const AID: Integer; AVerDatosCliente: Boolean = true): Binary; end; implementation @@ -53,26 +53,26 @@ begin RORemoteService.Message := dmConexion.Message; end; -function TDataModuleFacturasCliente.GetReport(const AListaID: TIntegerList): Binary; +function TDataModuleFacturasCliente.GetReport(const AListaID: TIntegerList; AVerDatosCliente: Boolean = true): Binary; var AParam : TIntegerArray; begin AParam := AListaID.ToIntegerArray; try - Result := (RORemoteService as IsrvFacturasCliente).GenerateReport(AParam); + Result := (RORemoteService as IsrvFacturasCliente).GenerateReport(AParam, AVerDAtosCliente); finally FreeANDNIL(AParam); end; end; -function TDataModuleFacturasCliente.GetRptPDFFactura(const AID: Integer): Binary; +function TDataModuleFacturasCliente.GetRptPDFFactura(const AID: Integer; AVerDatosCliente: Boolean = true): Binary; var AParam : TIntegerArray; begin AParam := TIntegerArray.Create; try AParam.Add(AID); - Result := (RORemoteService as IsrvFacturasCliente).GenerarInformeEnPDF(AParam) + Result := (RORemoteService as IsrvFacturasCliente).GenerarInformeEnPDF(AParam, AVerDatosCliente) finally FreeANDNIL(AParam) end; diff --git a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj index 305215e..b9cb569 100644 --- a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj +++ b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj @@ -175,6 +175,15 @@ + + + + + + + + + @@ -184,14 +193,14 @@ - - + + - - + + - - + + @@ -283,15 +292,6 @@ - - - - - - - - - @@ -302,13 +302,13 @@ - + - + - + \ 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 afd4aa5..1518f8d 100644 --- a/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas +++ b/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas @@ -8,8 +8,8 @@ uses type IDataModuleFacturasClienteReport = interface ['{F498AC70-AA38-4C06-B301-85A4AC0B210B}'] - function GetReport(const AListaID: TIntegerList): Binary; - function GetRptPDFFactura(const AID: Integer): Binary; + function GetReport(const AListaID: TIntegerList; AVerDatosCliente: Boolean = true): Binary; + function GetRptPDFFactura(const AID: Integer; AVerDatosCliente: Boolean = true): 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 df43e4d..77604d2 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 = '{5C79DBFB-3749-4E03-8CDE-DE9D4C57D4A9}'; + RID_FacturasCliente = '{CED0F94B-8407-4B71-A940-CD9F5546C129}'; + RID_FacturasCliente_Detalles = '{09F93CCC-0AC0-4637-9AD7-11A92F660FCB}'; { Data table names } nme_ListaAnosFacturas = 'ListaAnosFacturas'; @@ -45,6 +45,7 @@ const fld_FacturasClienteID_CLIENTE = 'ID_CLIENTE'; fld_FacturasClienteNOMBRE_CLIENTE = 'NOMBRE_CLIENTE'; fld_FacturasClienteREFERENCIA_CLIENTE = 'REFERENCIA_CLIENTE'; + fld_FacturasClienteLOPD = 'LOPD'; fld_FacturasClienteNOMBRE_COMERCIAL_CLIENTE = 'NOMBRE_COMERCIAL_CLIENTE'; fld_FacturasClienteNIF_CIF = 'NIF_CIF'; fld_FacturasClienteNOMBRE = 'NOMBRE'; @@ -99,38 +100,39 @@ const idx_FacturasClienteID_CLIENTE = 17; idx_FacturasClienteNOMBRE_CLIENTE = 18; idx_FacturasClienteREFERENCIA_CLIENTE = 19; - idx_FacturasClienteNOMBRE_COMERCIAL_CLIENTE = 20; - idx_FacturasClienteNIF_CIF = 21; - idx_FacturasClienteNOMBRE = 22; - idx_FacturasClienteID_DIRECCION = 23; - idx_FacturasClienteCALLE = 24; - idx_FacturasClientePOBLACION = 25; - idx_FacturasClientePROVINCIA = 26; - idx_FacturasClienteCODIGO_POSTAL = 27; - idx_FacturasClienteFECHA_ALTA = 28; - idx_FacturasClienteFECHA_MODIFICACION = 29; - idx_FacturasClienteUSUARIO = 30; - idx_FacturasClienteID_FORMA_PAGO = 31; - idx_FacturasClienteRECARGO_EQUIVALENCIA = 32; - idx_FacturasClienteID_TIPO_IVA = 33; - idx_FacturasClienteIMPORTE_NETO = 34; - idx_FacturasClienteIMPORTE_PORTE = 35; - idx_FacturasClienteID_AGENTE = 36; - idx_FacturasClienteREFERENCIA_COMISION = 37; - idx_FacturasClienteIGNORAR_CONTABILIDAD = 38; - idx_FacturasClienteID_TIENDA = 39; - idx_FacturasClienteTIENDA = 40; - idx_FacturasClienteID_SUBCUENTA = 41; - idx_FacturasClienteSUBCUENTA = 42; - idx_FacturasClienteID_EJERCICIO = 43; - idx_FacturasClienteESTADO_EJERCICIO = 44; - idx_FacturasClienteASIENTO_PUNTEADO = 45; - idx_FacturasClienteID_CONTRATO = 46; - idx_FacturasClienteREF_CONTRATO = 47; - idx_FacturasClienteVENDEDOR = 48; - idx_FacturasClienteSIN_COMISION = 49; - idx_FacturasClienteTIPO_FACTURA = 50; - idx_FacturasClienteLISTA_NOMBRES = 51; + idx_FacturasClienteLOPD = 20; + idx_FacturasClienteNOMBRE_COMERCIAL_CLIENTE = 21; + idx_FacturasClienteNIF_CIF = 22; + idx_FacturasClienteNOMBRE = 23; + idx_FacturasClienteID_DIRECCION = 24; + idx_FacturasClienteCALLE = 25; + idx_FacturasClientePOBLACION = 26; + idx_FacturasClientePROVINCIA = 27; + idx_FacturasClienteCODIGO_POSTAL = 28; + idx_FacturasClienteFECHA_ALTA = 29; + idx_FacturasClienteFECHA_MODIFICACION = 30; + idx_FacturasClienteUSUARIO = 31; + idx_FacturasClienteID_FORMA_PAGO = 32; + idx_FacturasClienteRECARGO_EQUIVALENCIA = 33; + idx_FacturasClienteID_TIPO_IVA = 34; + idx_FacturasClienteIMPORTE_NETO = 35; + idx_FacturasClienteIMPORTE_PORTE = 36; + idx_FacturasClienteID_AGENTE = 37; + idx_FacturasClienteREFERENCIA_COMISION = 38; + idx_FacturasClienteIGNORAR_CONTABILIDAD = 39; + idx_FacturasClienteID_TIENDA = 40; + idx_FacturasClienteTIENDA = 41; + idx_FacturasClienteID_SUBCUENTA = 42; + idx_FacturasClienteSUBCUENTA = 43; + idx_FacturasClienteID_EJERCICIO = 44; + idx_FacturasClienteESTADO_EJERCICIO = 45; + idx_FacturasClienteASIENTO_PUNTEADO = 46; + idx_FacturasClienteID_CONTRATO = 47; + idx_FacturasClienteREF_CONTRATO = 48; + idx_FacturasClienteVENDEDOR = 49; + idx_FacturasClienteSIN_COMISION = 50; + idx_FacturasClienteTIPO_FACTURA = 51; + idx_FacturasClienteLISTA_NOMBRES = 52; { FacturasCliente_Detalles fields } fld_FacturasCliente_DetallesID = 'ID'; @@ -167,7 +169,7 @@ const type { IListaAnosFacturas } IListaAnosFacturas = interface(IDAStronglyTypedDataTable) - ['{35B9CF8B-1998-4510-99B1-1EC13710F8AB}'] + ['{7BB039B7-6272-44A4-9D97-8C440C2E331D}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -202,7 +204,7 @@ type { IFacturasCliente } IFacturasCliente = interface(IDAStronglyTypedDataTable) - ['{ADFA571C-3DA5-4B91-A0A9-35AFF4CC2018}'] + ['{D08B97D1-FCA0-4F86-85DD-1A1355E36197}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -283,6 +285,10 @@ type procedure SetREFERENCIA_CLIENTEValue(const aValue: String); function GetREFERENCIA_CLIENTEIsNull: Boolean; procedure SetREFERENCIA_CLIENTEIsNull(const aValue: Boolean); + function GetLOPDValue: SmallInt; + procedure SetLOPDValue(const aValue: SmallInt); + function GetLOPDIsNull: Boolean; + procedure SetLOPDIsNull(const aValue: Boolean); function GetNOMBRE_COMERCIAL_CLIENTEValue: String; procedure SetNOMBRE_COMERCIAL_CLIENTEValue(const aValue: String); function GetNOMBRE_COMERCIAL_CLIENTEIsNull: Boolean; @@ -454,6 +460,8 @@ type property NOMBRE_CLIENTEIsNull: Boolean read GetNOMBRE_CLIENTEIsNull write SetNOMBRE_CLIENTEIsNull; property REFERENCIA_CLIENTE: String read GetREFERENCIA_CLIENTEValue write SetREFERENCIA_CLIENTEValue; property REFERENCIA_CLIENTEIsNull: Boolean read GetREFERENCIA_CLIENTEIsNull write SetREFERENCIA_CLIENTEIsNull; + property LOPD: SmallInt read GetLOPDValue write SetLOPDValue; + property LOPDIsNull: Boolean read GetLOPDIsNull write SetLOPDIsNull; property NOMBRE_COMERCIAL_CLIENTE: String read GetNOMBRE_COMERCIAL_CLIENTEValue write SetNOMBRE_COMERCIAL_CLIENTEValue; property NOMBRE_COMERCIAL_CLIENTEIsNull: Boolean read GetNOMBRE_COMERCIAL_CLIENTEIsNull write SetNOMBRE_COMERCIAL_CLIENTEIsNull; property NIF_CIF: String read GetNIF_CIFValue write SetNIF_CIFValue; @@ -606,6 +614,10 @@ type procedure SetREFERENCIA_CLIENTEValue(const aValue: String); virtual; function GetREFERENCIA_CLIENTEIsNull: Boolean; virtual; procedure SetREFERENCIA_CLIENTEIsNull(const aValue: Boolean); virtual; + function GetLOPDValue: SmallInt; virtual; + procedure SetLOPDValue(const aValue: SmallInt); virtual; + function GetLOPDIsNull: Boolean; virtual; + procedure SetLOPDIsNull(const aValue: Boolean); virtual; function GetNOMBRE_COMERCIAL_CLIENTEValue: String; virtual; procedure SetNOMBRE_COMERCIAL_CLIENTEValue(const aValue: String); virtual; function GetNOMBRE_COMERCIAL_CLIENTEIsNull: Boolean; virtual; @@ -776,6 +788,8 @@ type property NOMBRE_CLIENTEIsNull: Boolean read GetNOMBRE_CLIENTEIsNull write SetNOMBRE_CLIENTEIsNull; property REFERENCIA_CLIENTE: String read GetREFERENCIA_CLIENTEValue write SetREFERENCIA_CLIENTEValue; property REFERENCIA_CLIENTEIsNull: Boolean read GetREFERENCIA_CLIENTEIsNull write SetREFERENCIA_CLIENTEIsNull; + property LOPD: SmallInt read GetLOPDValue write SetLOPDValue; + property LOPDIsNull: Boolean read GetLOPDIsNull write SetLOPDIsNull; property NOMBRE_COMERCIAL_CLIENTE: String read GetNOMBRE_COMERCIAL_CLIENTEValue write SetNOMBRE_COMERCIAL_CLIENTEValue; property NOMBRE_COMERCIAL_CLIENTEIsNull: Boolean read GetNOMBRE_COMERCIAL_CLIENTEIsNull write SetNOMBRE_COMERCIAL_CLIENTEIsNull; property NIF_CIF: String read GetNIF_CIFValue write SetNIF_CIFValue; @@ -849,7 +863,7 @@ type { IFacturasCliente_Detalles } IFacturasCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{1DBA415D-060E-4E81-99F9-6BBC34A48D3E}'] + ['{87689EEB-6BF8-4ED2-9742-3AF5F4DDBE64}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1513,6 +1527,27 @@ begin DataTable.Fields[idx_FacturasClienteREFERENCIA_CLIENTE].AsVariant := Null; end; +function TFacturasClienteDataTableRules.GetLOPDValue: SmallInt; +begin + result := DataTable.Fields[idx_FacturasClienteLOPD].AsSmallInt; +end; + +procedure TFacturasClienteDataTableRules.SetLOPDValue(const aValue: SmallInt); +begin + DataTable.Fields[idx_FacturasClienteLOPD].AsSmallInt := aValue; +end; + +function TFacturasClienteDataTableRules.GetLOPDIsNull: boolean; +begin + result := DataTable.Fields[idx_FacturasClienteLOPD].IsNull; +end; + +procedure TFacturasClienteDataTableRules.SetLOPDIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_FacturasClienteLOPD].AsVariant := Null; +end; + function TFacturasClienteDataTableRules.GetNOMBRE_COMERCIAL_CLIENTEValue: String; begin result := DataTable.Fields[idx_FacturasClienteNOMBRE_COMERCIAL_CLIENTE].AsString; diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas index 051d012..fd12b5d 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 = '{9438FFD8-FD2B-4464-9595-56BBA42ACD21}'; + RID_FacturasClienteDelta = '{09E35A03-382A-4D70-8058-B54DCCE256A8}'; + RID_FacturasCliente_DetallesDelta = '{EC1C8D93-0843-41B9-9D1C-034145DA9FB5}'; type { IListaAnosFacturasDelta } IListaAnosFacturasDelta = interface(IListaAnosFacturas) - ['{AF9DCBE5-965F-4954-B3E3-028464D75916}'] + ['{9438FFD8-FD2B-4464-9595-56BBA42ACD21}'] { Property getters and setters } function GetOldANOValue : String; @@ -50,7 +50,7 @@ type { IFacturasClienteDelta } IFacturasClienteDelta = interface(IFacturasCliente) - ['{F7ACAA8D-6710-4ECA-8FBF-0341136DF2CB}'] + ['{09E35A03-382A-4D70-8058-B54DCCE256A8}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -72,6 +72,7 @@ type function GetOldID_CLIENTEValue : Integer; function GetOldNOMBRE_CLIENTEValue : String; function GetOldREFERENCIA_CLIENTEValue : String; + function GetOldLOPDValue : SmallInt; function GetOldNOMBRE_COMERCIAL_CLIENTEValue : String; function GetOldNIF_CIFValue : String; function GetOldNOMBREValue : String; @@ -126,6 +127,7 @@ type property OldID_CLIENTE : Integer read GetOldID_CLIENTEValue; property OldNOMBRE_CLIENTE : String read GetOldNOMBRE_CLIENTEValue; property OldREFERENCIA_CLIENTE : String read GetOldREFERENCIA_CLIENTEValue; + property OldLOPD : SmallInt read GetOldLOPDValue; property OldNOMBRE_COMERCIAL_CLIENTE : String read GetOldNOMBRE_COMERCIAL_CLIENTEValue; property OldNIF_CIF : String read GetOldNIF_CIFValue; property OldNOMBRE : String read GetOldNOMBREValue; @@ -286,6 +288,12 @@ type function GetOldREFERENCIA_CLIENTEIsNull: Boolean; virtual; procedure SetREFERENCIA_CLIENTEValue(const aValue: String); virtual; procedure SetREFERENCIA_CLIENTEIsNull(const aValue: Boolean); virtual; + function GetLOPDValue: SmallInt; virtual; + function GetLOPDIsNull: Boolean; virtual; + function GetOldLOPDValue: SmallInt; virtual; + function GetOldLOPDIsNull: Boolean; virtual; + procedure SetLOPDValue(const aValue: SmallInt); virtual; + procedure SetLOPDIsNull(const aValue: Boolean); virtual; function GetNOMBRE_COMERCIAL_CLIENTEValue: String; virtual; function GetNOMBRE_COMERCIAL_CLIENTEIsNull: Boolean; virtual; function GetOldNOMBRE_COMERCIAL_CLIENTEValue: String; virtual; @@ -560,6 +568,10 @@ type property REFERENCIA_CLIENTEIsNull : Boolean read GetREFERENCIA_CLIENTEIsNull write SetREFERENCIA_CLIENTEIsNull; property OldREFERENCIA_CLIENTE : String read GetOldREFERENCIA_CLIENTEValue; property OldREFERENCIA_CLIENTEIsNull : Boolean read GetOldREFERENCIA_CLIENTEIsNull; + property LOPD : SmallInt read GetLOPDValue write SetLOPDValue; + property LOPDIsNull : Boolean read GetLOPDIsNull write SetLOPDIsNull; + property OldLOPD : SmallInt read GetOldLOPDValue; + property OldLOPDIsNull : Boolean read GetOldLOPDIsNull; property NOMBRE_COMERCIAL_CLIENTE : String read GetNOMBRE_COMERCIAL_CLIENTEValue write SetNOMBRE_COMERCIAL_CLIENTEValue; property NOMBRE_COMERCIAL_CLIENTEIsNull : Boolean read GetNOMBRE_COMERCIAL_CLIENTEIsNull write SetNOMBRE_COMERCIAL_CLIENTEIsNull; property OldNOMBRE_COMERCIAL_CLIENTE : String read GetOldNOMBRE_COMERCIAL_CLIENTEValue; @@ -697,7 +709,7 @@ type { IFacturasCliente_DetallesDelta } IFacturasCliente_DetallesDelta = interface(IFacturasCliente_Detalles) - ['{D779175D-1E98-4B6B-9059-BEC7DCD94A11}'] + ['{EC1C8D93-0843-41B9-9D1C-034145DA9FB5}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_FACTURAValue : Integer; @@ -1572,6 +1584,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteREFERENCIA_CLIENTE] := Null; end; +function TFacturasClienteBusinessProcessorRules.GetLOPDValue: SmallInt; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteLOPD]; +end; + +function TFacturasClienteBusinessProcessorRules.GetLOPDIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteLOPD]); +end; + +function TFacturasClienteBusinessProcessorRules.GetOldLOPDValue: SmallInt; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteLOPD]; +end; + +function TFacturasClienteBusinessProcessorRules.GetOldLOPDIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteLOPD]); +end; + +procedure TFacturasClienteBusinessProcessorRules.SetLOPDValue(const aValue: SmallInt); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteLOPD] := aValue; +end; + +procedure TFacturasClienteBusinessProcessorRules.SetLOPDIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteLOPD] := Null; +end; + function TFacturasClienteBusinessProcessorRules.GetNOMBRE_COMERCIAL_CLIENTEValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_COMERCIAL_CLIENTE]; diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas index dbee8ac..99f6437 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas +++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas @@ -51,6 +51,7 @@ type FListaNombresClientes : TStringList; FImporteMinimo: Currency; FDesglosado : Boolean; + FVerDatosCliente : Boolean; //Genera cada uno de los albaranes a imprimir procedure _GenerarFactura(const ID: integer); overload; @@ -62,8 +63,8 @@ type procedure RecuperarNombresClientes; public - function GenerarFactura(const ListaID : TIntegerArray): Binary; overload; - function GenerarFacturaEnPDF(const ListaID : TIntegerArray): Binary; + function GenerarFactura(const ListaID : TIntegerArray; const VerDatosCliente: Boolean): Binary; overload; + function GenerarFacturaEnPDF(const ListaID : TIntegerArray; const VerDatosCliente: 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; @@ -106,12 +107,14 @@ begin FreeANDNIL(FListaNombresClientes); end; -function TRptFacturasCliente.GenerarFactura(const ListaID: TIntegerArray): Binary; +function TRptFacturasCliente.GenerarFactura(const ListaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; var i: Integer; begin Result := Binary.Create; try + FVerDatosCliente := VerDatosCliente; + //Vamos generando todos y cada una de las facturas recibidas for i := 0 to ListaID.Count - 1 do _GenerarFactura(ListaID.Items[i]); @@ -121,13 +124,14 @@ begin end; end; -function TRptFacturasCliente.GenerarFacturaEnPDF( - const ListaID: TIntegerArray): Binary; +function TRptFacturasCliente.GenerarFacturaEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; var i: Integer; begin Result := Binary.Create; try + FVerDatosCliente := VerDatosCliente; + //Vamos generando todos y cada uno de los presupuestos recibidos for i := 0 to ListaID.Count - 1 do _GenerarFactura(ListaID.Items[i]); @@ -635,7 +639,8 @@ begin raise Exception.Create (('Error Servidor: _GenerarFactura, no encuentra informe ' + rptFacturaCliente)); frxReport.LoadFromFile(AInforme, True); - frxReport.ReportOptions.Name := 'Factura ' + tbl_Cabecera.FieldByName('REFERENCIA').AsString; + frxReport.Variables.Variables['VerDatosCliente'] := FVerDatosCliente; + frxReport.ReportOptions.Name := 'Factura ' + tbl_Cabecera.FieldByName('REFERENCIA').AsString; frxReport.PrepareReport(False); finally FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm index 7b16580..d35f51d 100644 --- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm +++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm @@ -251,6 +251,14 @@ object srvFacturasCliente: TsrvFacturasCliente item DatasetField = 'VENDEDOR' TableField = 'VENDEDOR' + end + item + DatasetField = 'LOPD' + TableField = 'LOPD' + end + item + DatasetField = 'LISTA_NOMBRES' + TableField = 'LISTA_NOMBRES' end> end> Name = 'FacturasCliente' @@ -361,6 +369,10 @@ object srvFacturasCliente: TsrvFacturasCliente DataType = datString Size = 255 end + item + Name = 'LOPD' + DataType = datSmallInt + end item Name = 'NOMBRE_COMERCIAL_CLIENTE' DataType = datString diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas index 5285606..7eb4051 100644 --- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas +++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas @@ -35,8 +35,8 @@ type private protected { IsrvFacturasCliente methods } - function GenerateReport(const FacturaID: TIntegerArray): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; + function GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; end; implementation @@ -78,26 +78,25 @@ begin ConnectionName := dmServer.ConnectionName; end; -function TsrvFacturasCliente.GenerarInformeEnPDF( - const ListaID: TIntegerArray): Binary; +function TsrvFacturasCliente.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; var AReportGenerator : TRptFacturasCliente; begin AReportGenerator := TRptFacturasCliente.Create(nil); try - Result := AReportGenerator.GenerarFacturaEnPDF(ListaID); + Result := AReportGenerator.GenerarFacturaEnPDF(ListaID, VerDatosCliente); finally FreeAndNIL(AReportGenerator); end; end; -function TsrvFacturasCliente.GenerateReport(const FacturaID: TIntegerArray): Binary; +function TsrvFacturasCliente.GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; var AReportGenerator : TRptFacturasCliente; begin AReportGenerator := TRptFacturasCliente.Create(nil); try - Result := AReportGenerator.GenerarFactura(FacturaID); + Result := AReportGenerator.GenerarFactura(FacturaID, VerDatosCliente); finally FreeAndNIL(AReportGenerator); end; diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk index c923f18..7e2d2fa 100644 --- a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk +++ b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk @@ -63,7 +63,8 @@ requires GUISDK_D11R, designide, xmlrtl, - dxCoreD11; + dxCoreD11, + ConCli_FacCli_relation; contains uFacturasClienteViewRegister in 'uFacturasClienteViewRegister.pas', diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj index a769db7..c67ffe6 100644 --- a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj +++ b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj @@ -49,45 +49,46 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fEditorElegirArticulosFacturaCliente
TForm diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm index 71a75f8..13608f4 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm @@ -80,13 +80,17 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente Left = 431 Visible = True ExplicitLeft = 431 - ExplicitWidth = 195 + ExplicitWidth = 209 object TBXItem42: TTBXItem Action = actCambiarSituacion DisplayMode = nbdmImageAndText end + object TBXItem44: TTBXItem + Action = actLOPD + DisplayMode = nbdmImageAndText + end object TBXItem43: TTBXItem - Action = actVerPresupuesto + Action = actVerContrato DisplayMode = nbdmImageAndText end object TBXSeparatorItem17: TTBXSeparatorItem @@ -330,12 +334,19 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente Visible = False OnExecute = actCambiarSituacionExecute end - object actVerPresupuesto: TAction + object actVerContrato: TAction Category = 'Archivo' Caption = 'Ver presupuesto' ImageIndex = 27 - OnExecute = actVerPresupuestoExecute - OnUpdate = actVerPresupuestoUpdate + OnExecute = actVerContratoExecute + OnUpdate = actVerContratoUpdate + end + object actLOPD: TAction + Category = 'Archivo' + Caption = 'GDPR' + ImageIndex = 28 + OnExecute = actLOPDExecute + OnUpdate = actLOPDUpdate end end inherited SmallImages: TPngImageList [5] @@ -1123,6 +1134,29 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente 44AE426082} Name = 'PngImage27' Background = clWindow + end + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 61000000097048597300000AEB00000AEB01828B0D5A000001DA4944415478DA + 63FCFFFF3F032580912C5DF2F33964B539E3DF7DF8F1956403380CE7C85B5929 + CFFAF99ED7FCFCED9BE124192060B7D8D6CE5279E99B876C42674FFC0CFEF9C0 + 7A27D10628FBAF0FB030915F74E7EA6FE6F387FF87FD7A6AB195E83090F55915 + EEE7A23BE7FCD9CFAC170EFF4EFDF6C07A31D18128E1BE3CC8DB597BE1A3BBBF + B98EECFA91FBFDBEF574A0F07FA20C10B09B67EBE366B8E3CDF37F9C47F77CED + FC7CD3AE125D0DC400B3897C9CCCBCEADFD9182F331C4CFC010E6DCB39F29E0E + 3A07599939E477AE7FBFFBE3CF4BBE0C77F27F621820EAB848DFDC447931372B + 9FE68E5DF7577F3C73368E414588D9C6496BB3AA92B8CBDECD9FDEBC7CF9D3F2 + E71DE7BBD85CC928EAB438C4C7556F3A0B1B8BC8B1BD9FFFDE7B753F4C41994B + C3CA48B1E5F09ECFFFEF3F7D19F3FB5AD0725CDE047B41276243A09D85FAAAA7 + CFBFB11CDEFBEA8EA79F98E4C3FBBFB8CF9F7BBDE5EB453F3FE440C31E060CF5 + 4C4ED9F63B6565845D5EBEFEF29F11287AE9C4AF2FAFBF3D32FF753EFE3ABE80 + 86C7028FF5429B101F83FDCF5F7F66797697E1FFCDDB6FA7FFBAE69F4D289A91 + A2B19EC539C7E1C49BC7EC46F71EBDD9FFF9DFD338868B994F4930808181D76E + 413EF33F56D90F0F5ED4323C29FE4E4833080000904EC47A3EA3126900000000 + 49454E44AE426082} + Name = 'PngImage28' + Background = clWindow end> Left = 395 Bitmap = {} diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas index 12bdab8..05e81c2 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas @@ -41,8 +41,10 @@ type TBXItem42: TTBXItem; TBXSeparatorItem17: TTBXSeparatorItem; JsListaFacturasNoModificadas: TJSDialog; - actVerPresupuesto: TAction; + actVerContrato: TAction; TBXItem43: TTBXItem; + actLOPD: TAction; + TBXItem44: TTBXItem; procedure FormShow(Sender: TObject); procedure actEliminarUpdate(Sender: TObject); procedure actNuevaFacturaExecute(Sender: TObject); @@ -52,8 +54,10 @@ type procedure actEnviarMailUpdate(Sender: TObject); procedure actEnviarMailExecute(Sender: TObject); procedure actCambiarSituacionExecute(Sender: TObject); - procedure actVerPresupuestoExecute(Sender: TObject); - procedure actVerPresupuestoUpdate(Sender: TObject); + procedure actVerContratoUpdate(Sender: TObject); + procedure actLOPDExecute(Sender: TObject); + procedure actLOPDUpdate(Sender: TObject); + procedure actVerContratoExecute(Sender: TObject); private FFacturas: IBizFacturaCliente; @@ -87,7 +91,7 @@ implementation uses uDataModuleFacturasCliente, uDataModuleUsuarios, uAlbaranesClienteController, uFactuGES_App, uBizejercicios, uGenerarFacturasCliAlbCliUtils, uEditorElegirSituacion, - uBizAlbaranesCliente, uGestorInformesController, + uBizAlbaranesCliente, uGestorInformesController, uGenerarFacturasCliUtils, uEditorBase, uGridUtils, uDBSelectionListUtils; {$R *.dfm} @@ -213,6 +217,37 @@ begin end; +procedure TfEditorFacturasCliente.actLOPDExecute(Sender: TObject); +var + AFacturas: IBizFacturaCliente; + +begin + inherited; + ViewGrid.SaveGridStatus; + try + SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Facturas as ISeleccionable).SelectedRecords); + AFacturas := (Controller as IFacturasClienteController).ExtraerSeleccionados(Facturas) as IBizFacturaCliente; + finally + ViewGrid.RestoreGridStatus; + end; + + if (Controller as IFacturasClienteController).AsignarLOPD(AFacturas) then + RefrescarInterno; +end; + +procedure TfEditorFacturasCliente.actLOPDUpdate(Sender: TObject); +begin + inherited; + + if HayDatos and Assigned(ViewGrid) then + (Sender as TAction).Enabled := not (dsDataTable.DataTable.State in dsEditModes) + and ViewGrid.esSeleccionCeldaDatos + and (ViewGrid.NumSeleccionados > 0) + else + (Sender as TAction).Enabled := False; + +end; + procedure TfEditorFacturasCliente.actNuevaFacturaExecute(Sender: TObject); begin actNuevo.Execute; @@ -249,16 +284,24 @@ begin end; end; -procedure TfEditorFacturasCliente.actVerPresupuestoExecute(Sender: TObject); +procedure TfEditorFacturasCliente.actVerContratoExecute(Sender: TObject); begin inherited; -// + VerContratoCliDeFactura(FFacturas); end; -procedure TfEditorFacturasCliente.actVerPresupuestoUpdate(Sender: TObject); +procedure TfEditorFacturasCliente.actVerContratoUpdate(Sender: TObject); begin inherited; -// + + if HayDatos and Assigned(ViewGrid) then + (Sender as TAction).Enabled := not (dsDataTable.DataTable.State in dsEditModes) + and ViewGrid.esSeleccionCeldaDatos + and (ViewGrid.NumSeleccionados = 1) + and not FFacturas.ID_CONTRATOIsNull + else + (Sender as TAction).Enabled := False; + end; constructor TfEditorFacturasCliente.Create(AOwner: TComponent); @@ -396,6 +439,7 @@ var Respuesta : Integer; AFacturas: IBizFacturaCliente; AllItems: Boolean; + AVerDatosCliente: Boolean; begin AFacturas := Nil; AllItems := False; @@ -416,6 +460,8 @@ begin inherited; end; 100 : begin // Elemento Seleccionado + AVerDatosCliente := (Application.MessageBox('¿Desea imprimir los datos del cliente?', 'Atención', MB_YESNO) = IDYES); + if AllItems then begin SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Facturas as ISeleccionable).SelectedRecords); @@ -425,7 +471,7 @@ begin AFacturas := Facturas; if Assigned(AFacturas) then - FController.Print(AFacturas, AllItems); + FController.Print(AFacturas, AllItems, AVerDatosCliente); end; end; end; @@ -508,6 +554,7 @@ var Respuesta : Integer; AFacturas: IBizFacturaCliente; AllItems: Boolean; + AVerDatosCliente: Boolean; begin AFacturas := Nil; AllItems := False; @@ -528,6 +575,8 @@ begin inherited; end; 100 : begin // Elemento Seleccionado + AVerDatosCliente := (Application.MessageBox('¿Desea previsualizar los datos del cliente?', 'Atención', MB_YESNO) = IDYES); + if AllItems then begin SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Facturas as ISeleccionable).SelectedRecords); @@ -537,7 +586,7 @@ begin AFacturas := Facturas; if Assigned(AFacturas) then - FController.Preview(AFacturas, AllItems); + FController.Preview(AFacturas, AllItems, AVerDatosCliente); end; end; end; diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm index 0e41740..b6c0a53 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm @@ -21,6 +21,23 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente end> OptionsCustomize.ColumnHidingOnGrouping = False OptionsView.GroupFooters = gfAlwaysVisible + object cxGridViewLOPD: TcxGridDBColumn + Caption = 'GDPR' + DataBinding.FieldName = 'LOPD' + PropertiesClassName = 'TcxImageComboBoxProperties' + Properties.Images = PngImageList + Properties.Items = < + item + Value = 0 + end + item + ImageIndex = 0 + Value = 1 + end> + BestFitMaxWidth = 40 + MinWidth = 40 + Width = 40 + end object cxGridViewTIPO: TcxGridDBColumn DataBinding.FieldName = 'TIPO' PropertiesClassName = 'TcxImageComboBoxProperties' @@ -192,19 +209,43 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente Width = 802 ExplicitWidth = 802 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 = 144 Width = 144 end inherited edtFechaFinFiltro: TcxDateEdit - Left = 367 - ExplicitLeft = 367 + Left = 248 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 248 ExplicitWidth = 273 Width = 273 end + inherited edtFecha2FinFiltro: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end + inherited edtFecha2IniFiltro: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 802 diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas index 1cd69c5..4cd895e 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas @@ -65,6 +65,7 @@ type cxGridViewTIPO_FACTURA: TcxGridDBColumn; cxGridViewVENDEDOR: TcxGridDBColumn; cxGridViewLISTA_NOMBRES: TcxGridDBColumn; + cxGridViewLOPD: TcxGridDBColumn; procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle); diff --git a/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.dfm b/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.dfm index c0e363a..b44a78b 100644 --- a/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.dfm +++ b/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.dfm @@ -1,6 +1,7 @@ object RptRecibosCliente: TRptRecibosCliente OldCreateOrder = True OnCreate = DataModuleCreate + OnDestroy = DataModuleDestroy Height = 405 Width = 593 object DADataCabecera: TDADataSource diff --git a/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.pas b/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.pas index efb3b66..903e098 100644 --- a/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.pas +++ b/Source/Modulos/Recibos de cliente/Reports/uRptRecibosCliente_Server.pas @@ -33,6 +33,7 @@ type schReport: TDASchema; DataDictionary: TDADataDictionary; procedure DataModuleCreate(Sender: TObject); + procedure DataModuleDestroy(Sender: TObject); private FConnection: IDAConnection; FIdEmpresa: Integer; @@ -40,14 +41,15 @@ type FFechaFin: Variant; FFechaVenInicio: Variant; FFechaVenFin: Variant; - FListaIDProveedores: TIntegerArray; - FListaNombresProveedores: TStringList; + FListaIDClientes: TIntegerArray; + FListaNombresClientes: TStringList; FImporteMinimo: Currency; FDesglosado : Boolean; procedure _GenerarRecibo(const ID : Integer); function _GenerarInforme(const TipoInforme: String; const IdEmpresa: Integer; const FechaInicio, FechaFin: Variant; const FechaVenInicio: Variant; FechaVenFin: Variant; const ListaIDClientes: TIntegerArray; const ImporteMinimo: Currency): Binary; procedure IniciarParametrosInforme; + procedure RecuperarNombresClientes; public function GenerarRecibo(const ListaID : TIntegerArray): Binary; @@ -61,7 +63,8 @@ implementation {$R *.dfm} uses - uSistemaFunc, uDataModuleServer, schRecibosClienteClient_Intf; + uSistemaFunc, uDataModuleServer, schRecibosClienteClient_Intf, + uROServer, DataAbstract4_Intf; const rptInforme = 'InfReciboCliente.fr3'; @@ -78,6 +81,13 @@ begin schReport.ConnectionManager := dmServer.ConnectionManager; FConnection := dmServer.DarNuevaConexion; frxReport.EngineOptions.NewSilentMode := simReThrow; + + FListaNombresClientes := TStringList.Create; +end; + +procedure TRptRecibosCliente.DataModuleDestroy(Sender: TObject); +begin + FreeAndNil(FListaNombresClientes); end; function TRptRecibosCliente.GenerarInformeListadoRecibos( @@ -97,9 +107,9 @@ begin FImporteMinimo := ImporteMinimo; FDesglosado := Desglosado; - if Assigned(FListaIDProveedores) then - FListaIDProveedores.Free; - FListaIDProveedores := ListaIDClientes; + if Assigned(FListaIDClientes) then + FListaIDClientes.Free; + FListaIDClientes := ListaIDClientes; //DESGLOSADO POR CLIENTE EN ESTE INFORME NO SE DESGLOSARÁ POR CLIENTE @@ -130,9 +140,9 @@ begin FImporteMinimo := ImporteMinimo; FDesglosado := Desglosado; - if Assigned(FListaIDProveedores) then - FListaIDProveedores.Free; - FListaIDProveedores := ListaIDClientes; + if Assigned(FListaIDClientes) then + FListaIDClientes.Free; + FListaIDClientes := ListaIDClientes; if tbl_InformeListadoRecibos.Active then @@ -182,7 +192,6 @@ begin ATextos := TStringList.Create; try -{ if (not VarIsNull(FFechaInicio)) and (not VarIsNull(FFechaFin)) then ACadena := Format('Fechas de factura desde el %s hasta el %s', [VarToStr(FFechaInicio), VarToStr(FFechaFin)]) else @@ -205,17 +214,17 @@ begin ACadena := ''; end; - if Assigned(FListaIDProveedores) and (FListaIDProveedores.Count > 0) then + if Assigned(FListaIDClientes) and (FListaIDClientes.Count > 0) then begin - RecuperarNombresProveedores; - ACadena := FListaNombresProveedores.Text; + RecuperarNombresClientes; + ACadena := FListaNombresClientes.Text; end else begin - ACadena := 'Todos los proveedores'; + ACadena := 'Todos los clientes'; if FDesglosado then ACadena := ACadena + ' (desglosados)' end; -} + ATextos.Add(ACadena); ACadena := ''; @@ -225,6 +234,96 @@ begin end; end; +procedure TRptRecibosCliente.RecuperarNombresClientes; +var + AContactosService : IsrvContactos; + Intf : IInterface; + AClientID : TGUID; + + ATableNameArray: StringArray; + ATableRequestInfoArray: TableRequestInfoArray; + ATableRequestInfo: TableRequestInfoV5; + AStream: TMemoryStream; + ADataTable: TDAMemDataTable; + i: Integer; + AWhereBuilder : TDAWhereBuilder; + ACondicion : TDAWhereExpression; +begin + CreateGUID(AClientID); + + GetClassFactory('srvContactos').CreateInstance(AClientID, Intf); + + if Assigned(Intf) then + begin + AContactosService := Intf as IsrvContactos; + + ATableNameArray := StringArray.Create; + ATableRequestInfoArray := TableRequestInfoArray.Create; + AWhereBuilder := TDAWhereBuilder.Create; + try + ATableNameArray.Add('Clientes'); + ATableRequestInfo := TableRequestInfoV5.Create; + + with ATableRequestInfo do + begin + IncludeSchema := True; + MaxRecords := -1; + UserFilter := ''; + + AWhereBuilder.Clear; + with AWhereBuilder do + for i := 0 to FListaIDClientes.Count - 1 do + begin + ACondicion := NewBinaryExpression( + NewBinaryExpression(NewField('', 'ID'), NewConstant(FListaIDClientes[i], datInteger), dboEqual), + NewBinaryExpression(NewField('', 'ID_EMPRESA'), NewConstant(FIdEmpresa, datInteger), dboEqual), + dboAnd); + + if not AWhereBuilder.IsEmpty then + Expression := NewBinaryExpression(Expression, ACondicion, dboOr) + else + Expression := ACondicion; + end; + + WhereClause := AWhereBuilder.ExpressionToXmlNode(AWhereBuilder.Expression); + end; + + try + ATableRequestInfoArray.Add(ATableRequestInfo); + AStream := AContactosService.GetData(ATableNameArray, ATableRequestInfoArray); + if Assigned(AStream) then + begin + ADataTable := TDAMemDataTable.Create(nil); + try + ADataTable.Name := 'Clientes'; + ADataTable.LocalDataStreamer := Bin2DataStreamer; + ADataTable.RemoteFetchEnabled := False; + Bin2DataStreamer.ReadDataset(AStream, ADataTable, True); + + ADataTable.Open; + FListaNombresClientes.Clear; + for i := 0 to ADataTable.RecordCount - 1 do + begin + FListaNombresClientes.Add(ADataTable.FieldByName('NOMBRE').AsString); + ADataTable.Next; + end; + + finally + FreeANDNil(ADataTable); + end; + end; + except + on e: Exception do + dmServer.EscribirLog(e.Message); + end; + finally + FreeANDNIL(ATableRequestInfoArray); + FreeANDNIL(ATableNameArray); + FreeANDNIL(AWhereBuilder); + end; + end; +end; + function TRptRecibosCliente._GenerarInforme(const TipoInforme: String; const IdEmpresa: Integer; const FechaInicio, FechaFin: Variant; const FechaVenInicio: Variant; FechaVenFin: Variant; @@ -324,8 +423,7 @@ begin raise Exception.Create (('Error Servidor: _GenerarInforme, no encuentra informe ' + TipoInforme)); frxReport.LoadFromFile(AInforme, True); - frxReport.Variables.Variables['FechaInicio'] := FechaInicio; - frxReport.Variables.Variables['FechaFin'] := FechaFin; + IniciarParametrosInforme; frxReport.PrepareReport(False); frxReport.PreviewPages.SaveToStream(Result); diff --git a/Source/Modulos/Recibos de proveedor/Reports/uRptRecibosProveedor_Server.dfm b/Source/Modulos/Recibos de proveedor/Reports/uRptRecibosProveedor_Server.dfm index 04da435..50109e3 100644 --- a/Source/Modulos/Recibos de proveedor/Reports/uRptRecibosProveedor_Server.dfm +++ b/Source/Modulos/Recibos de proveedor/Reports/uRptRecibosProveedor_Server.dfm @@ -1,6 +1,7 @@ object RptRecibosProveedor: TRptRecibosProveedor OldCreateOrder = True OnCreate = DataModuleCreate + OnDestroy = DataModuleDestroy Height = 405 Width = 511 object frxRichObject1: TfrxRichObject diff --git a/Source/Modulos/Recibos de proveedor/Reports/uRptRecibosProveedor_Server.pas b/Source/Modulos/Recibos de proveedor/Reports/uRptRecibosProveedor_Server.pas index 1704d1e..ad43d0d 100644 --- a/Source/Modulos/Recibos de proveedor/Reports/uRptRecibosProveedor_Server.pas +++ b/Source/Modulos/Recibos de proveedor/Reports/uRptRecibosProveedor_Server.pas @@ -27,6 +27,7 @@ type schReport: TDASchema; DataDictionary: TDADataDictionary; procedure DataModuleCreate(Sender: TObject); + procedure DataModuleDestroy(Sender: TObject); private FConnection: IDAConnection; FIdEmpresa: Integer; @@ -71,10 +72,17 @@ procedure TRptRecibosProveedor.DataModuleCreate(Sender: TObject); begin schReport.ConnectionManager := dmServer.ConnectionManager; FConnection := dmServer.DarNuevaConexion; - frxReport.EngineOptions.NewSilentMode := simReThrow; + frxReport.EngineOptions.NewSilentMode := simReThrow; + + FListaNombresProveedores := TStringList.Create; end; +procedure TRptRecibosProveedor.DataModuleDestroy(Sender: TObject); +begin + FreeAndNil(FListaNombresProveedores); +end; + function TRptRecibosProveedor.GenerarInformeListadoRecibos( const IdEmpresa: Integer; const FechaInicio, FechaFin: Variant; const FechaVenInicio, FechaVenFin: Variant; diff --git a/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas b/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas index 2cc0444..d750b57 100644 --- a/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas +++ b/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas @@ -13,6 +13,7 @@ type function GenerarFacturaCli(const IDContrato : Integer) : Boolean; overload; function GenerarFacturaCli(AContrato : IBizContratoCliente; var AFactura: IBizFacturaCliente) : Boolean; overload; + procedure VerContratoCliDeFactura(AFactura : IBizFacturaCliente); // function ElegirPedidoYGenerarAlbaranCli(var IDAlbaran: Integer) : Boolean; implementation @@ -256,4 +257,26 @@ begin end; end; } + + +procedure VerContratoCliDeFactura(AFactura : IBizFacturaCliente); +var + AContrato : IBizContratoCliente; + +begin + try + if not Assigned(AContratosClienteController) then + Inicializar; + + AContrato := AContratosClienteController.Buscar(AFactura.ID_CONTRATO); + if Assigned(AContrato) then + AContratosClienteController.Ver(AContrato); + + finally + if Assigned(AContratosClienteController) then + Finalizar; + end; +end; + + end. diff --git a/Source/Servicios/FactuGES.RODL b/Source/Servicios/FactuGES.RODL index 9e13a53..e0d7068 100644 --- a/Source/Servicios/FactuGES.RODL +++ b/Source/Servicios/FactuGES.RODL @@ -302,6 +302,8 @@ + + @@ -310,6 +312,8 @@ + + diff --git a/Source/Servicios/FactuGES_Intf.pas b/Source/Servicios/FactuGES_Intf.pas index 199e16f..58c9baf 100644 --- a/Source/Servicios/FactuGES_Intf.pas +++ b/Source/Servicios/FactuGES_Intf.pas @@ -516,8 +516,8 @@ type { IsrvFacturasCliente } IsrvFacturasCliente = interface(IDataAbstractService) ['{56B4FFF0-AB1B-46B2-BA16-ABD5360F6311}'] - function GenerateReport(const FacturaID: TIntegerArray): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; + function GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; end; { CosrvFacturasCliente } @@ -530,8 +530,8 @@ type protected function __GetInterfaceName:string; override; - function GenerateReport(const FacturaID: TIntegerArray): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; + function GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; end; { IsrvFacturasProveedor } @@ -1817,12 +1817,13 @@ begin result := 'srvFacturasCliente'; end; -function TsrvFacturasCliente_Proxy.GenerateReport(const FacturaID: TIntegerArray): Binary; +function TsrvFacturasCliente_Proxy.GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; begin try result := nil; __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerateReport'); __Message.Write('FacturaID', TypeInfo(FactuGES_Intf.TIntegerArray), FacturaID, []); + __Message.Write('VerDatosCliente', TypeInfo(Boolean), VerDatosCliente, []); __Message.Finalize; __TransportChannel.Dispatch(__Message); @@ -1834,12 +1835,13 @@ begin end end; -function TsrvFacturasCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; +function TsrvFacturasCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; begin try result := nil; __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnPDF'); __Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); + __Message.Write('VerDatosCliente', TypeInfo(Boolean), VerDatosCliente, []); __Message.Finalize; __TransportChannel.Dispatch(__Message); diff --git a/Source/Servicios/FactuGES_Invk.pas b/Source/Servicios/FactuGES_Invk.pas index 9887927..81563cc 100644 --- a/Source/Servicios/FactuGES_Invk.pas +++ b/Source/Servicios/FactuGES_Invk.pas @@ -934,9 +934,10 @@ begin end; procedure TsrvFacturasCliente_Invoker.Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerateReport(const FacturaID: TIntegerArray): Binary; } +{ function GenerateReport(const FacturaID: TIntegerArray; const VerDatosCliente: Boolean): Binary; } var FacturaID: FactuGES_Intf.TIntegerArray; + VerDatosCliente: Boolean; lResult: Binary; __lObjectDisposer: TROObjectDisposer; begin @@ -944,8 +945,9 @@ begin lResult := nil; try __Message.Read('FacturaID', TypeInfo(FactuGES_Intf.TIntegerArray), FacturaID, []); + __Message.Read('VerDatosCliente', TypeInfo(Boolean), VerDatosCliente, []); - lResult := (__Instance as IsrvFacturasCliente).GenerateReport(FacturaID); + lResult := (__Instance as IsrvFacturasCliente).GenerateReport(FacturaID, VerDatosCliente); __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvFacturasCliente', 'GenerateReportResponse'); __Message.Write('Result', TypeInfo(Binary), lResult, []); @@ -964,9 +966,10 @@ 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 VerDatosCliente: Boolean): Binary; } var ListaID: FactuGES_Intf.TIntegerArray; + VerDatosCliente: Boolean; lResult: Binary; __lObjectDisposer: TROObjectDisposer; begin @@ -974,8 +977,9 @@ begin lResult := nil; try __Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); + __Message.Read('VerDatosCliente', TypeInfo(Boolean), VerDatosCliente, []); - lResult := (__Instance as IsrvFacturasCliente).GenerarInformeEnPDF(ListaID); + lResult := (__Instance as IsrvFacturasCliente).GenerarInformeEnPDF(ListaID, VerDatosCliente); __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvFacturasCliente', 'GenerarInformeEnPDFResponse'); __Message.Write('Result', TypeInfo(Binary), lResult, []); diff --git a/Source/Servicios/RODLFile.res b/Source/Servicios/RODLFile.res index aa48c3d..82c19ac 100644 Binary files a/Source/Servicios/RODLFile.res and b/Source/Servicios/RODLFile.res differ diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr index 6d9f0d5..94555b1 100644 --- a/Source/Servidor/FactuGES_Server.dpr +++ b/Source/Servidor/FactuGES_Server.dpr @@ -127,18 +127,18 @@ uses schFormasPagoServer_Intf in '..\Modulos\Formas de pago\Model\schFormasPagoServer_Intf.pas', schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas', schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas', - schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas', - schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas', schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas', schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas', schPedidosProveedorClient_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorClient_Intf.pas', schPedidosProveedorServer_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorServer_Intf.pas', schRecibosClienteClient_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteClient_Intf.pas', schRecibosClienteServer_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteServer_Intf.pas', - schContratosClienteClient_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteClient_Intf.pas', - schContratosClienteServer_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteServer_Intf.pas', schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas', - schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas'; + schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas', + schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas', + schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas', + schContratosClienteClient_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteClient_Intf.pas', + schContratosClienteServer_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteServer_Intf.pas'; {$R *.res} {$R ..\Servicios\RODLFile.res} diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj index f183fe8..bac48bb 100644 --- a/Source/Servidor/FactuGES_Server.dproj +++ b/Source/Servidor/FactuGES_Server.dproj @@ -28,7 +28,7 @@ Delphi.Personality - FalseTrueFalseTrueFalse2020FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.0.2.0FactuGES v2(Servidor)2.0.2.0jueves, 27 de febrero de 2020 16:27 + FalseTrueFalseTrueFalse2030FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.0.3.0FactuGES v2(Servidor)2.0.3.0miércoles, 04 de marzo de 2020 17:03 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.res b/Source/Servidor/FactuGES_Server.res index 9047526..3b11f29 100644 Binary files a/Source/Servidor/FactuGES_Server.res and b/Source/Servidor/FactuGES_Server.res differ