From 99d7e85d65f344e4bc6a397299cefd5a4698c047 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 19 Sep 2008 18:13:32 +0000 Subject: [PATCH] =?UTF-8?q?Ticket=20#118=20->=20En=20un=20albar=C3=A1n,=20?= =?UTF-8?q?poder=20elegir=20entre=20las=20direcciones=20del=20cliente=20y?= =?UTF-8?q?=20sus=20personas=20de=20contacto.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@602 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Database/scripts/factuges.sql | 3 + .../Usuarios/Model/schUsuariosClient_Intf.pas | 24 +- .../Usuarios/Model/schUsuariosServer_Intf.pas | 24 +- Source/Base/Base.dproj | 104 +++--- .../Data/uDataModuleAlbaranesCliente.dfm | 4 + .../Model/AlbaranesCliente_model.dproj | 6 +- .../Model/schAlbaranesClienteClient_Intf.pas | 115 ++++--- .../Model/schAlbaranesClienteServer_Intf.pas | 51 ++- .../Reports/uRptAlbaranesCliente_Server.dfm | 12 +- .../Reports/uRptWordAlbaranCliente.dfm | 12 +- .../Servidor/srvAlbaranesCliente_Impl.dfm | 85 +++-- .../Views/AlbaranesCliente_view.dpk | Bin 2586 -> 2876 bytes .../Views/AlbaranesCliente_view.dproj | 63 ++-- .../Views/uEditorAlbaranCliente.dfm | 101 +++--- .../Views/uEditorAlbaranCliente.pas | 3 - .../Views/uViewAlbaranCliente.dfm | 170 ++++------ .../Views/uViewAlbaranCliente.pas | 63 +--- .../uViewDatosYSeleccionClienteAlbaran.dfm | 174 ++++++++++ .../uViewDatosYSeleccionClienteAlbaran.pas | 181 ++++++++++ .../Contactos/Views/Contactos_view.dpk | 9 +- .../Contactos/Views/Contactos_view.dproj | 94 +++--- .../Views/uViewDatosYSeleccionClienteBase.dfm | 319 ++++++++++++++++++ .../Views/uViewDatosYSeleccionClienteBase.pas | 315 +++++++++++++++++ .../Views/uViewPresupuestoCliente.pas | 2 +- Source/Servidor/FactuGES_Server.RES | Bin 23212 -> 23212 bytes Source/Servidor/FactuGES_Server.dpr | 6 +- Source/Servidor/FactuGES_Server.rc | 2 +- 27 files changed, 1487 insertions(+), 455 deletions(-) create mode 100644 Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.dfm create mode 100644 Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas create mode 100644 Source/Modulos/Contactos/Views/uViewDatosYSeleccionClienteBase.dfm create mode 100644 Source/Modulos/Contactos/Views/uViewDatosYSeleccionClienteBase.pas diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index 0d1c8cd9..8f3b72e4 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -263,6 +263,7 @@ CREATE TABLE ALBARANES_CLIENTE ( ID_FACTURA TIPO_ID, TIPO VARCHAR(1), REFERENCIA VARCHAR(255), + ID_DIRECCION TIPO_ID, CALLE VARCHAR(255), CODIGO_POSTAL VARCHAR(10), POBLACION VARCHAR(255), @@ -1317,6 +1318,7 @@ CREATE VIEW V_ALBARANES_CLIENTE( REF_PEDIDO, ID_FACTURA, REF_FACTURA, + ID_DIRECCION, CALLE, CODIGO_POSTAL, POBLACION, @@ -1358,6 +1360,7 @@ SELECT PEDIDOS_CLIENTE.REFERENCIA AS REF_PEDIDO, ALBARANES_CLIENTE.ID_FACTURA, FACTURAS_CLIENTE.REFERENCIA AS REF_FACTURA, + ALBARANES_CLIENTE.ID_DIRECCION, ALBARANES_CLIENTE.CALLE, ALBARANES_CLIENTE.CODIGO_POSTAL, ALBARANES_CLIENTE.POBLACION, diff --git a/Source/ApplicationBase/Usuarios/Model/schUsuariosClient_Intf.pas b/Source/ApplicationBase/Usuarios/Model/schUsuariosClient_Intf.pas index f6c87fa1..d2fcc86b 100644 --- a/Source/ApplicationBase/Usuarios/Model/schUsuariosClient_Intf.pas +++ b/Source/ApplicationBase/Usuarios/Model/schUsuariosClient_Intf.pas @@ -9,12 +9,12 @@ const { Data table rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_USUARIOS = '{2287F1C0-E6D4-49D4-AB4C-12163784F52F}'; - RID_USUARIOS_EVENTOS = '{30A9A653-7C94-4C9E-9826-57923A79A57B}'; - RID_USUARIOS_LOGON = '{6663D7AD-00A8-471A-9DD6-0A354F14D25B}'; - RID_PERMISOS = '{271B422A-6E39-420F-85DE-835F1D690B83}'; - RID_PERMISOSEX = '{603236F6-99D3-4AD9-8B2B-FE07776B6E4F}'; - RID_PERFILES = '{59A02969-8C95-4F46-BE34-51B288BCF8C9}'; + RID_USUARIOS = '{9341804B-BBFF-4F3F-8BD4-A29AF93F9C1D}'; + RID_USUARIOS_EVENTOS = '{FB1040E9-41A7-42B2-A8F5-23B08BAB3A83}'; + RID_USUARIOS_LOGON = '{EF97ED84-824F-4463-9085-E4D4DC59FF5B}'; + RID_PERMISOS = '{78F02061-1646-47FB-83AC-895F7885BADB}'; + RID_PERMISOSEX = '{2AD42BE2-4190-4361-AD0D-4179A940DEFB}'; + RID_PERFILES = '{790489AB-2711-41CE-B9EE-E1EC9FCBBEE3}'; { Data table names } nme_USUARIOS = 'USUARIOS'; @@ -129,7 +129,7 @@ const type { IUSUARIOS } IUSUARIOS = interface(IDAStronglyTypedDataTable) - ['{2813C411-0CBD-437C-83F3-857491E279DC}'] + ['{75EA3262-FA70-4578-863B-B5CE05706F7E}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -296,7 +296,7 @@ type { IUSUARIOS_EVENTOS } IUSUARIOS_EVENTOS = interface(IDAStronglyTypedDataTable) - ['{EB6F65EF-39D6-4820-9797-B25FD4C792B3}'] + ['{43AFA2E9-922F-47C9-B5F6-2884480327EF}'] { Property getters and setters } function GetAPLICACIONValue: String; procedure SetAPLICACIONValue(const aValue: String); @@ -427,7 +427,7 @@ type { IUSUARIOS_LOGON } IUSUARIOS_LOGON = interface(IDAStronglyTypedDataTable) - ['{F1859EC8-B46A-4505-A1D0-FC3502A3CCC5}'] + ['{ABEE65F6-567E-48E5-97A1-5FF61E3C6561}'] { Property getters and setters } function GetLOGONIDValue: String; procedure SetLOGONIDValue(const aValue: String); @@ -510,7 +510,7 @@ type { IPERMISOS } IPERMISOS = interface(IDAStronglyTypedDataTable) - ['{290DD780-7C7C-4A2E-891E-3A29A6505859}'] + ['{FE6E0A5F-2FAB-494E-90F4-726F4B507144}'] { Property getters and setters } function GetID_USUARIOValue: Integer; procedure SetID_USUARIOValue(const aValue: Integer); @@ -581,7 +581,7 @@ type { IPERMISOSEX } IPERMISOSEX = interface(IDAStronglyTypedDataTable) - ['{8F86DA9F-7DF3-4B17-84F5-0876E21F625D}'] + ['{8110E447-D763-4496-870E-BBCEB378C4CE}'] { Property getters and setters } function GetID_USUARIOValue: Integer; procedure SetID_USUARIOValue(const aValue: Integer); @@ -664,7 +664,7 @@ type { IPERFILES } IPERFILES = interface(IDAStronglyTypedDataTable) - ['{A7B5EBFD-F995-4F8D-8723-7397501F897D}'] + ['{95916150-C565-4807-8A4E-35760EC58AE5}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); diff --git a/Source/ApplicationBase/Usuarios/Model/schUsuariosServer_Intf.pas b/Source/ApplicationBase/Usuarios/Model/schUsuariosServer_Intf.pas index 1390df9f..2f309351 100644 --- a/Source/ApplicationBase/Usuarios/Model/schUsuariosServer_Intf.pas +++ b/Source/ApplicationBase/Usuarios/Model/schUsuariosServer_Intf.pas @@ -9,17 +9,17 @@ const { Delta rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_USUARIOSDelta = '{4AA9CBE4-007A-4CAD-844C-05539CD289CA}'; - RID_USUARIOS_EVENTOSDelta = '{0918F32D-4334-419F-9936-186CC23BC165}'; - RID_USUARIOS_LOGONDelta = '{15D6AADF-D24A-4BAE-96D5-2A26AD60E3DA}'; - RID_PERMISOSDelta = '{CE343111-2CF7-4C07-A7C5-CB72513E533C}'; - RID_PERMISOSEXDelta = '{99649DB7-B027-45F5-A665-76B477807E8D}'; - RID_PERFILESDelta = '{A09AC663-B18E-4894-B84C-9FEA6C000A44}'; + RID_USUARIOSDelta = '{B2CDE2B6-AEA1-4FA3-915F-D16D39393C56}'; + RID_USUARIOS_EVENTOSDelta = '{A9C5CC49-68FB-44C9-82E1-E91B7635E443}'; + RID_USUARIOS_LOGONDelta = '{94752363-8D31-4796-A289-07D791FC4A04}'; + RID_PERMISOSDelta = '{0C3EFDD0-E026-41A9-8411-F879524DC1F6}'; + RID_PERMISOSEXDelta = '{02B025FC-0CFE-41D3-93CF-65E9659AB816}'; + RID_PERFILESDelta = '{00782C74-631D-4032-8177-FBA0607AA4DD}'; type { IUSUARIOSDelta } IUSUARIOSDelta = interface(IUSUARIOS) - ['{4AA9CBE4-007A-4CAD-844C-05539CD289CA}'] + ['{B2CDE2B6-AEA1-4FA3-915F-D16D39393C56}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldUSERNAMEValue : String; @@ -185,7 +185,7 @@ type { IUSUARIOS_EVENTOSDelta } IUSUARIOS_EVENTOSDelta = interface(IUSUARIOS_EVENTOS) - ['{0918F32D-4334-419F-9936-186CC23BC165}'] + ['{A9C5CC49-68FB-44C9-82E1-E91B7635E443}'] { Property getters and setters } function GetOldAPLICACIONValue : String; function GetOldID_USUARIOValue : Integer; @@ -316,7 +316,7 @@ type { IUSUARIOS_LOGONDelta } IUSUARIOS_LOGONDelta = interface(IUSUARIOS_LOGON) - ['{15D6AADF-D24A-4BAE-96D5-2A26AD60E3DA}'] + ['{94752363-8D31-4796-A289-07D791FC4A04}'] { Property getters and setters } function GetOldLOGONIDValue : String; function GetOldID_USUARIOValue : Integer; @@ -398,7 +398,7 @@ type { IPERMISOSDelta } IPERMISOSDelta = interface(IPERMISOS) - ['{CE343111-2CF7-4C07-A7C5-CB72513E533C}'] + ['{0C3EFDD0-E026-41A9-8411-F879524DC1F6}'] { Property getters and setters } function GetOldID_USUARIOValue : Integer; function GetOldMODULOValue : String; @@ -468,7 +468,7 @@ type { IPERMISOSEXDelta } IPERMISOSEXDelta = interface(IPERMISOSEX) - ['{99649DB7-B027-45F5-A665-76B477807E8D}'] + ['{02B025FC-0CFE-41D3-93CF-65E9659AB816}'] { Property getters and setters } function GetOldID_USUARIOValue : Integer; function GetOldMODULOValue : String; @@ -550,7 +550,7 @@ type { IPERFILESDelta } IPERFILESDelta = interface(IPERFILES) - ['{A09AC663-B18E-4894-B84C-9FEA6C000A44}'] + ['{00782C74-631D-4032-8177-FBA0607AA4DD}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldUSERNAMEValue : String; diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index 98224d23..555ae68d 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -44,8 +44,6 @@ Package FalseTrueFalseLibreria base de FactuGESFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 - - Microsoft Office 2000 Sample Automation Server Wrapper Components Microsoft Office XP Sample Automation Server Wrapper Components Base.dpk @@ -55,57 +53,57 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fConfigurarConexion
diff --git a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm index 11a81413..8d48f05c 100644 --- a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm @@ -45,6 +45,10 @@ inherited DataModuleAlbaranesCliente: TDataModuleAlbaranesCliente DataType = datInteger DictionaryEntry = 'AlbaranesCliente_ID_CLIENTE' end + item + Name = 'ID_DIRECCION' + DataType = datInteger + end item Name = 'NOMBRE' DataType = datString diff --git a/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dproj b/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dproj index 60f55a64..a87f440f 100644 --- a/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dproj +++ b/Source/Modulos/Albaranes de cliente/Model/AlbaranesCliente_model.dproj @@ -51,9 +51,9 @@ MainSource - - - + + + diff --git a/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteClient_Intf.pas b/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteClient_Intf.pas index 70197cba..cdd62f60 100644 --- a/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteClient_Intf.pas +++ b/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteClient_Intf.pas @@ -9,8 +9,8 @@ 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_AlbaranesCliente = '{C4ACA983-2E79-43A3-A993-241191F525D6}'; - RID_AlbaranesCliente_Detalles = '{7B5B9AEF-8781-448C-A9BC-13D967D43796}'; + RID_AlbaranesCliente = '{9F51E545-F835-4C02-BB62-FE25951D5FF2}'; + RID_AlbaranesCliente_Detalles = '{C69D472D-E905-4CA1-A3FD-B3E477AB9807}'; { Data table names } nme_AlbaranesCliente = 'AlbaranesCliente'; @@ -20,6 +20,7 @@ const fld_AlbaranesClienteID = 'ID'; fld_AlbaranesClienteID_EMPRESA = 'ID_EMPRESA'; fld_AlbaranesClienteID_CLIENTE = 'ID_CLIENTE'; + fld_AlbaranesClienteID_DIRECCION = 'ID_DIRECCION'; fld_AlbaranesClienteNOMBRE = 'NOMBRE'; fld_AlbaranesClienteFECHA_ALBARAN = 'FECHA_ALBARAN'; fld_AlbaranesClienteREFERENCIA = 'REFERENCIA'; @@ -61,42 +62,43 @@ const idx_AlbaranesClienteID = 0; idx_AlbaranesClienteID_EMPRESA = 1; idx_AlbaranesClienteID_CLIENTE = 2; - idx_AlbaranesClienteNOMBRE = 3; - idx_AlbaranesClienteFECHA_ALBARAN = 4; - idx_AlbaranesClienteREFERENCIA = 5; - idx_AlbaranesClienteREFERENCIA_CLIENTE = 6; - idx_AlbaranesClienteTIPO = 7; - idx_AlbaranesClienteSITUACION = 8; - idx_AlbaranesClienteID_ALMACEN = 9; - idx_AlbaranesClienteNOMBRE_ALMACEN = 10; - idx_AlbaranesClienteID_PEDIDO = 11; - idx_AlbaranesClienteREF_PEDIDO = 12; - idx_AlbaranesClienteID_FACTURA = 13; - idx_AlbaranesClienteREF_FACTURA = 14; - idx_AlbaranesClienteCALLE = 15; - idx_AlbaranesClienteCODIGO_POSTAL = 16; - idx_AlbaranesClientePOBLACION = 17; - idx_AlbaranesClientePROVINCIA = 18; - idx_AlbaranesClientePERSONA_CONTACTO = 19; - idx_AlbaranesClienteTELEFONO = 20; - idx_AlbaranesClienteIMPORTE_NETO = 21; - idx_AlbaranesClienteIMPORTE_PORTE = 22; - idx_AlbaranesClienteDESCUENTO = 23; - idx_AlbaranesClienteIMPORTE_DESCUENTO = 24; - idx_AlbaranesClienteBASE_IMPONIBLE = 25; - idx_AlbaranesClienteIVA = 26; - idx_AlbaranesClienteIMPORTE_IVA = 27; - idx_AlbaranesClienteIMPORTE_TOTAL = 28; - idx_AlbaranesClienteOBSERVACIONES = 29; - idx_AlbaranesClienteINCIDENCIAS = 30; - idx_AlbaranesClienteINCIDENCIAS_ACTIVAS = 31; - idx_AlbaranesClienteFECHA_ALTA = 32; - idx_AlbaranesClienteFECHA_MODIFICACION = 33; - idx_AlbaranesClienteUSUARIO = 34; - idx_AlbaranesClienteID_FORMA_PAGO = 35; - idx_AlbaranesClienteFECHA_PREVISTA_ENVIO = 36; - idx_AlbaranesClienteFECHA_ENVIO = 37; - idx_AlbaranesClienteFECHA_RECEPCION = 38; + idx_AlbaranesClienteID_DIRECCION = 3; + idx_AlbaranesClienteNOMBRE = 4; + idx_AlbaranesClienteFECHA_ALBARAN = 5; + idx_AlbaranesClienteREFERENCIA = 6; + idx_AlbaranesClienteREFERENCIA_CLIENTE = 7; + idx_AlbaranesClienteTIPO = 8; + idx_AlbaranesClienteSITUACION = 9; + idx_AlbaranesClienteID_ALMACEN = 10; + idx_AlbaranesClienteNOMBRE_ALMACEN = 11; + idx_AlbaranesClienteID_PEDIDO = 12; + idx_AlbaranesClienteREF_PEDIDO = 13; + idx_AlbaranesClienteID_FACTURA = 14; + idx_AlbaranesClienteREF_FACTURA = 15; + idx_AlbaranesClienteCALLE = 16; + idx_AlbaranesClienteCODIGO_POSTAL = 17; + idx_AlbaranesClientePOBLACION = 18; + idx_AlbaranesClientePROVINCIA = 19; + idx_AlbaranesClientePERSONA_CONTACTO = 20; + idx_AlbaranesClienteTELEFONO = 21; + idx_AlbaranesClienteIMPORTE_NETO = 22; + idx_AlbaranesClienteIMPORTE_PORTE = 23; + idx_AlbaranesClienteDESCUENTO = 24; + idx_AlbaranesClienteIMPORTE_DESCUENTO = 25; + idx_AlbaranesClienteBASE_IMPONIBLE = 26; + idx_AlbaranesClienteIVA = 27; + idx_AlbaranesClienteIMPORTE_IVA = 28; + idx_AlbaranesClienteIMPORTE_TOTAL = 29; + idx_AlbaranesClienteOBSERVACIONES = 30; + idx_AlbaranesClienteINCIDENCIAS = 31; + idx_AlbaranesClienteINCIDENCIAS_ACTIVAS = 32; + idx_AlbaranesClienteFECHA_ALTA = 33; + idx_AlbaranesClienteFECHA_MODIFICACION = 34; + idx_AlbaranesClienteUSUARIO = 35; + idx_AlbaranesClienteID_FORMA_PAGO = 36; + idx_AlbaranesClienteFECHA_PREVISTA_ENVIO = 37; + idx_AlbaranesClienteFECHA_ENVIO = 38; + idx_AlbaranesClienteFECHA_RECEPCION = 39; { AlbaranesCliente_Detalles fields } fld_AlbaranesCliente_DetallesID = 'ID'; @@ -137,7 +139,7 @@ const type { IAlbaranesCliente } IAlbaranesCliente = interface(IDAStronglyTypedDataTable) - ['{AF7FDCDE-1C18-4F3A-861D-EE8F29667409}'] + ['{B1F8F584-8F71-4CDE-B849-948102A4BD26}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -151,6 +153,10 @@ type procedure SetID_CLIENTEValue(const aValue: Integer); function GetID_CLIENTEIsNull: Boolean; procedure SetID_CLIENTEIsNull(const aValue: Boolean); + function GetID_DIRECCIONValue: Integer; + procedure SetID_DIRECCIONValue(const aValue: Integer); + function GetID_DIRECCIONIsNull: Boolean; + procedure SetID_DIRECCIONIsNull(const aValue: Boolean); function GetNOMBREValue: String; procedure SetNOMBREValue(const aValue: String); function GetNOMBREIsNull: Boolean; @@ -302,6 +308,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 ID_DIRECCION: Integer read GetID_DIRECCIONValue write SetID_DIRECCIONValue; + property ID_DIRECCIONIsNull: Boolean read GetID_DIRECCIONIsNull write SetID_DIRECCIONIsNull; property NOMBRE: String read GetNOMBREValue write SetNOMBREValue; property NOMBREIsNull: Boolean read GetNOMBREIsNull write SetNOMBREIsNull; property FECHA_ALBARAN: DateTime read GetFECHA_ALBARANValue write SetFECHA_ALBARANValue; @@ -397,6 +405,10 @@ type procedure SetID_CLIENTEValue(const aValue: Integer); virtual; function GetID_CLIENTEIsNull: Boolean; virtual; procedure SetID_CLIENTEIsNull(const aValue: Boolean); virtual; + function GetID_DIRECCIONValue: Integer; virtual; + procedure SetID_DIRECCIONValue(const aValue: Integer); virtual; + function GetID_DIRECCIONIsNull: Boolean; virtual; + procedure SetID_DIRECCIONIsNull(const aValue: Boolean); virtual; function GetNOMBREValue: String; virtual; procedure SetNOMBREValue(const aValue: String); virtual; function GetNOMBREIsNull: Boolean; virtual; @@ -547,6 +559,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 ID_DIRECCION: Integer read GetID_DIRECCIONValue write SetID_DIRECCIONValue; + property ID_DIRECCIONIsNull: Boolean read GetID_DIRECCIONIsNull write SetID_DIRECCIONIsNull; property NOMBRE: String read GetNOMBREValue write SetNOMBREValue; property NOMBREIsNull: Boolean read GetNOMBREIsNull write SetNOMBREIsNull; property FECHA_ALBARAN: DateTime read GetFECHA_ALBARANValue write SetFECHA_ALBARANValue; @@ -628,7 +642,7 @@ type { IAlbaranesCliente_Detalles } IAlbaranesCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{80EB5D35-8AC0-4C15-A379-BE154FF2B8E2}'] + ['{B8DAC4EF-F5CD-4E41-A627-9AF6FEBD1F83}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -939,6 +953,27 @@ begin DataTable.Fields[idx_AlbaranesClienteID_CLIENTE].AsVariant := Null; end; +function TAlbaranesClienteDataTableRules.GetID_DIRECCIONValue: Integer; +begin + result := DataTable.Fields[idx_AlbaranesClienteID_DIRECCION].AsInteger; +end; + +procedure TAlbaranesClienteDataTableRules.SetID_DIRECCIONValue(const aValue: Integer); +begin + DataTable.Fields[idx_AlbaranesClienteID_DIRECCION].AsInteger := aValue; +end; + +function TAlbaranesClienteDataTableRules.GetID_DIRECCIONIsNull: boolean; +begin + result := DataTable.Fields[idx_AlbaranesClienteID_DIRECCION].IsNull; +end; + +procedure TAlbaranesClienteDataTableRules.SetID_DIRECCIONIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_AlbaranesClienteID_DIRECCION].AsVariant := Null; +end; + function TAlbaranesClienteDataTableRules.GetNOMBREValue: String; begin result := DataTable.Fields[idx_AlbaranesClienteNOMBRE].AsString; diff --git a/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteServer_Intf.pas b/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteServer_Intf.pas index 91ec85ff..49a1413c 100644 --- a/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteServer_Intf.pas +++ b/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteServer_Intf.pas @@ -9,17 +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_AlbaranesClienteDelta = '{D9971B77-2B74-450A-A0FB-9923C629A09B}'; - RID_AlbaranesCliente_DetallesDelta = '{C5DD9D52-6097-4080-A97E-435B4D387C4E}'; + RID_AlbaranesClienteDelta = '{2E0A5659-946F-468E-AB61-D5C549490842}'; + RID_AlbaranesCliente_DetallesDelta = '{DD10B773-471A-4785-B22A-5C4925E89ADB}'; type { IAlbaranesClienteDelta } IAlbaranesClienteDelta = interface(IAlbaranesCliente) - ['{D9971B77-2B74-450A-A0FB-9923C629A09B}'] + ['{2E0A5659-946F-468E-AB61-D5C549490842}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; function GetOldID_CLIENTEValue : Integer; + function GetOldID_DIRECCIONValue : Integer; function GetOldNOMBREValue : String; function GetOldFECHA_ALBARANValue : DateTime; function GetOldREFERENCIAValue : String; @@ -61,6 +62,7 @@ type property OldID : Integer read GetOldIDValue; property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue; property OldID_CLIENTE : Integer read GetOldID_CLIENTEValue; + property OldID_DIRECCION : Integer read GetOldID_DIRECCIONValue; property OldNOMBRE : String read GetOldNOMBREValue; property OldFECHA_ALBARAN : DateTime read GetOldFECHA_ALBARANValue; property OldREFERENCIA : String read GetOldREFERENCIAValue; @@ -126,6 +128,12 @@ type function GetOldID_CLIENTEIsNull: Boolean; virtual; procedure SetID_CLIENTEValue(const aValue: Integer); virtual; procedure SetID_CLIENTEIsNull(const aValue: Boolean); virtual; + function GetID_DIRECCIONValue: Integer; virtual; + function GetID_DIRECCIONIsNull: Boolean; virtual; + function GetOldID_DIRECCIONValue: Integer; virtual; + function GetOldID_DIRECCIONIsNull: Boolean; virtual; + procedure SetID_DIRECCIONValue(const aValue: Integer); virtual; + procedure SetID_DIRECCIONIsNull(const aValue: Boolean); virtual; function GetNOMBREValue: String; virtual; function GetNOMBREIsNull: Boolean; virtual; function GetOldNOMBREValue: String; virtual; @@ -354,6 +362,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 ID_DIRECCION : Integer read GetID_DIRECCIONValue write SetID_DIRECCIONValue; + property ID_DIRECCIONIsNull : Boolean read GetID_DIRECCIONIsNull write SetID_DIRECCIONIsNull; + property OldID_DIRECCION : Integer read GetOldID_DIRECCIONValue; + property OldID_DIRECCIONIsNull : Boolean read GetOldID_DIRECCIONIsNull; property NOMBRE : String read GetNOMBREValue write SetNOMBREValue; property NOMBREIsNull : Boolean read GetNOMBREIsNull write SetNOMBREIsNull; property OldNOMBRE : String read GetOldNOMBREValue; @@ -507,7 +519,7 @@ type { IAlbaranesCliente_DetallesDelta } IAlbaranesCliente_DetallesDelta = interface(IAlbaranesCliente_Detalles) - ['{C5DD9D52-6097-4080-A97E-435B4D387C4E}'] + ['{DD10B773-471A-4785-B22A-5C4925E89ADB}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_ALBARANValue : Integer; @@ -848,6 +860,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_CLIENTE] := Null; end; +function TAlbaranesClienteBusinessProcessorRules.GetID_DIRECCIONValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_DIRECCION]; +end; + +function TAlbaranesClienteBusinessProcessorRules.GetID_DIRECCIONIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_DIRECCION]); +end; + +function TAlbaranesClienteBusinessProcessorRules.GetOldID_DIRECCIONValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClienteID_DIRECCION]; +end; + +function TAlbaranesClienteBusinessProcessorRules.GetOldID_DIRECCIONIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClienteID_DIRECCION]); +end; + +procedure TAlbaranesClienteBusinessProcessorRules.SetID_DIRECCIONValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_DIRECCION] := aValue; +end; + +procedure TAlbaranesClienteBusinessProcessorRules.SetID_DIRECCIONIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_DIRECCION] := Null; +end; + function TAlbaranesClienteBusinessProcessorRules.GetNOMBREValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteNOMBRE]; diff --git a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm index f6c3f18f..eb45e097 100644 --- a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm +++ b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm @@ -67,12 +67,12 @@ object RptAlbaranesCliente: TRptAlbaranesCliente 'LBARAN,'#10' V_ALBARANES_CLIENTE.REFERENCIA,'#10' V_ALBARANES_CLIENTE.' + 'REFERENCIA_CLIENTE,'#10' V_ALBARANES_CLIENTE.ID_PEDIDO,'#10' V_ALBARAN' + 'ES_CLIENTE.REF_PEDIDO,'#10' V_ALBARANES_CLIENTE.OBSERVACIONES,'#10' V_' + - 'ALBARANES_CLIENTE.IMPORTE_TOTAL,'#10' V_CLIENTES.NIF_CIF, V_CLIENTE' + - 'S.NOMBRE,'#10' V_CLIENTES.PERSONA_CONTACTO, V_CLIENTES.CALLE, V_CLI' + - 'ENTES.POBLACION,'#10' V_CLIENTES.PROVINCIA, V_CLIENTES.CODIGO_POSTA' + - 'L'#10'FROM'#10' V_ALBARANES_CLIENTE'#10' LEFT OUTER JOIN V_CLIENTES ON (V_' + - 'CLIENTES.ID = V_ALBARANES_CLIENTE.ID_CLIENTE)'#10'WHERE V_ALBARANES_' + - 'CLIENTE.ID = :ID'#10 + 'ALBARANES_CLIENTE.IMPORTE_TOTAL,'#10' CONTACTOS.NIF_CIF, CONTACTOS.' + + 'NOMBRE,'#10' V_ALBARANES_CLIENTE.PERSONA_CONTACTO, V_ALBARANES_CLIE' + + 'NTE.CALLE, V_ALBARANES_CLIENTE.POBLACION,'#10' V_ALBARANES_CLIENTE.' + + 'PROVINCIA, V_ALBARANES_CLIENTE.CODIGO_POSTAL'#10'FROM'#10' V_ALBARANES_' + + 'CLIENTE'#10' INNER JOIN CONTACTOS ON (CONTACTOS.ID = V_ALBARANES_C' + + 'LIENTE.ID_CLIENTE)'#10'WHERE V_ALBARANES_CLIENTE.ID = :ID'#10 StatementType = stSQL ColumnMappings = < item diff --git a/Source/Modulos/Albaranes de cliente/Reports/uRptWordAlbaranCliente.dfm b/Source/Modulos/Albaranes de cliente/Reports/uRptWordAlbaranCliente.dfm index d4a5c4b7..ace117e1 100644 --- a/Source/Modulos/Albaranes de cliente/Reports/uRptWordAlbaranCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Reports/uRptWordAlbaranCliente.dfm @@ -22,12 +22,12 @@ object RptWordAlbaranCliente: TRptWordAlbaranCliente 'LBARAN,'#10' V_ALBARANES_CLIENTE.REFERENCIA,'#10' V_ALBARANES_CLIENTE.' + 'REFERENCIA_CLIENTE,'#10' V_ALBARANES_CLIENTE.ID_PEDIDO,'#10' V_ALBARAN' + 'ES_CLIENTE.REF_PEDIDO,'#10' V_ALBARANES_CLIENTE.OBSERVACIONES,'#10' V_' + - 'ALBARANES_CLIENTE.IMPORTE_TOTAL,'#10' V_CLIENTES.NIF_CIF, V_CLIENTE' + - 'S.NOMBRE,'#10' V_CLIENTES.PERSONA_CONTACTO, V_CLIENTES.CALLE, V_CLI' + - 'ENTES.POBLACION,'#10' V_CLIENTES.PROVINCIA, V_CLIENTES.CODIGO_POSTA' + - 'L'#10'FROM'#10' V_ALBARANES_CLIENTE'#10' INNER JOIN V_CLIENTES ON (V_CLIEN' + - 'TES.ID = V_ALBARANES_CLIENTE.ID_CLIENTE)'#10'WHERE V_ALBARANES_CLIEN' + - 'TE.ID = :ID'#10#10 + 'ALBARANES_CLIENTE.IMPORTE_TOTAL,'#10' CONTACTOS.NIF_CIF, CONTACTOS.' + + 'NOMBRE,'#10' V_ALBARANES_CLIENTE.PERSONA_CONTACTO, V_ALBARANES_CLIE' + + 'NTE.CALLE, V_ALBARANES_CLIENTE.POBLACION,'#10' V_ALBARANES_CLIENTE.' + + 'PROVINCIA, V_ALBARANES_CLIENTE.CODIGO_POSTAL'#10'FROM'#10' V_ALBARANES_' + + 'CLIENTE'#10' INNER JOIN CONTACTOS ON (CONTACTOS.ID = V_ALBARANES_CL' + + 'IENTE.ID_CLIENTE)'#10'WHERE V_ALBARANES_CLIENTE.ID = :ID'#10#10 StatementType = stSQL ColumnMappings = < item diff --git a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm index ec58154e..0e9ed4ee 100644 --- a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm +++ b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm @@ -177,6 +177,10 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente item DatasetField = 'FECHA_RECEPCION' TableField = 'FECHA_RECEPCION' + end + item + DatasetField = 'ID_DIRECCION' + TableField = 'ID_DIRECCION' end> end> Name = 'AlbaranesCliente' @@ -199,6 +203,10 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente DataType = datInteger DictionaryEntry = 'AlbaranesCliente_ID_CLIENTE' end + item + Name = 'ID_DIRECCION' + DataType = datInteger + end item Name = 'NOMBRE' DataType = datString @@ -726,21 +734,22 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente SQL = 'INSERT'#10' INTO ALBARANES_CLIENTE'#10' (ID, ID_EMPRESA, ID_CLIENTE,' + ' FECHA_ALBARAN, TIPO, REFERENCIA,'#10' REFERENCIA_CLIENTE, ID_AL' + - 'MACEN, ID_PEDIDO, ID_FACTURA, CALLE,'#10' CODIGO_POSTAL, POBLACI' + - 'ON, PROVINCIA, PERSONA_CONTACTO, '#10' TELEFONO, IMPORTE_NETO, I' + - 'MPORTE_PORTE, DESCUENTO, IMPORTE_DESCUENTO, '#10' BASE_IMPONIBLE' + - ', IVA, IMPORTE_IVA, IMPORTE_TOTAL, OBSERVACIONES, '#10' INCIDENC' + - 'IAS, INCIDENCIAS_ACTIVAS, FECHA_ALTA, FECHA_MODIFICACION, '#10' ' + - 'USUARIO, ID_FORMA_PAGO, FECHA_PREVISTA_ENVIO, FECHA_ENVIO, '#10' ' + - ' FECHA_RECEPCION)'#10' VALUES'#10' (:ID, :ID_EMPRESA, :ID_CLIENTE, :' + - 'FECHA_ALBARAN, :TIPO, :REFERENCIA,'#10' :REFERENCIA_CLIENTE, :ID' + - '_ALMACEN, :ID_PEDIDO, :ID_FACTURA, :CALLE,'#10' :CODIGO_POSTAL, ' + - ':POBLACION, :PROVINCIA, :PERSONA_CONTACTO,'#10' :TELEFONO, :IMPO' + - 'RTE_NETO, :IMPORTE_PORTE, :DESCUENTO, :IMPORTE_DESCUENTO,'#10' :' + - 'BASE_IMPONIBLE, :IVA, :IMPORTE_IVA, :IMPORTE_TOTAL, :OBSERVACION' + - 'ES,'#10' :INCIDENCIAS, :INCIDENCIAS_ACTIVAS, :FECHA_ALTA, :FECHA' + - '_MODIFICACION,'#10' :USUARIO, :ID_FORMA_PAGO, :FECHA_PREVISTA_EN' + - 'VIO, :FECHA_ENVIO, :FECHA_RECEPCION)'#10' '#10' '#10#10 + 'MACEN, ID_PEDIDO, ID_FACTURA, ID_DIRECCION,'#10' CALLE, CODIGO_P' + + 'OSTAL, POBLACION, PROVINCIA, PERSONA_CONTACTO,'#10' TELEFONO, IM' + + 'PORTE_NETO, IMPORTE_PORTE, DESCUENTO, IMPORTE_DESCUENTO, '#10' B' + + 'ASE_IMPONIBLE, IVA, IMPORTE_IVA, IMPORTE_TOTAL, OBSERVACIONES, '#10 + + ' INCIDENCIAS, INCIDENCIAS_ACTIVAS, FECHA_ALTA, FECHA_MODIFIC' + + 'ACION, '#10' USUARIO, ID_FORMA_PAGO, FECHA_PREVISTA_ENVIO, FECHA' + + '_ENVIO, '#10' FECHA_RECEPCION)'#10' VALUES'#10' (:ID, :ID_EMPRESA, :' + + 'ID_CLIENTE, :FECHA_ALBARAN, :TIPO, :REFERENCIA,'#10' :REFERENCIA' + + '_CLIENTE, :ID_ALMACEN, :ID_PEDIDO, :ID_FACTURA, :ID_DIRECCION,'#10' ' + + ' :CALLE, :CODIGO_POSTAL, :POBLACION, :PROVINCIA, :PERSONA_CON' + + 'TACTO,'#10' :TELEFONO, :IMPORTE_NETO, :IMPORTE_PORTE, :DESCUENTO' + + ', :IMPORTE_DESCUENTO,'#10' :BASE_IMPONIBLE, :IVA, :IMPORTE_IVA, ' + + ':IMPORTE_TOTAL, :OBSERVACIONES,'#10' :INCIDENCIAS, :INCIDENCIAS_' + + 'ACTIVAS, :FECHA_ALTA, :FECHA_MODIFICACION,'#10' :USUARIO, :ID_FO' + + 'RMA_PAGO, :FECHA_PREVISTA_ENVIO, :FECHA_ENVIO, :FECHA_RECEPCION)' + + #10' '#10' '#10#10 StatementType = stSQL ColumnMappings = <> end> @@ -801,6 +810,10 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente Name = 'ID_FACTURA' Value = '' end + item + Name = 'ID_DIRECCION' + Value = '' + end item Name = 'CALLE' Value = '' @@ -911,21 +924,21 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente ' ID_CLIENTE = :ID_CLIENTE, '#10' FECHA_ALBARAN = :FECHA_ALBARAN,' + #10' TIPO = :TIPO,'#10' REFERENCIA = :REFERENCIA, '#10' REFERENCIA' + '_CLIENTE = :REFERENCIA_CLIENTE, '#10' ID_ALMACEN = :ID_ALMACEN,'#10' ' + - ' ID_PEDIDO = :ID_PEDIDO,'#10' ID_FACTURA = :ID_FACTURA,'#10' CAL' + - 'LE = :CALLE,'#10' CODIGO_POSTAL = :CODIGO_POSTAL, '#10' POBLACION ' + - '= :POBLACION, '#10' PROVINCIA = :PROVINCIA, '#10' PERSONA_CONTACTO' + - ' = :PERSONA_CONTACTO, '#10' TELEFONO = :TELEFONO, '#10' IMPORTE_NE' + - 'TO = :IMPORTE_NETO, '#10' IMPORTE_PORTE = :IMPORTE_PORTE, '#10' DE' + - 'SCUENTO = :DESCUENTO, '#10' IMPORTE_DESCUENTO = :IMPORTE_DESCUENT' + - 'O, '#10' BASE_IMPONIBLE = :BASE_IMPONIBLE, '#10' IVA = :IVA, '#10' ' + - 'IMPORTE_IVA = :IMPORTE_IVA, '#10' IMPORTE_TOTAL = :IMPORTE_TOTAL,' + - ' '#10' OBSERVACIONES = :OBSERVACIONES, '#10' INCIDENCIAS = :INCIDE' + - 'NCIAS, '#10' INCIDENCIAS_ACTIVAS = :INCIDENCIAS_ACTIVAS, '#10' FEC' + - 'HA_ALTA = :FECHA_ALTA, '#10' FECHA_MODIFICACION = :FECHA_MODIFICA' + - 'CION, '#10' USUARIO = :USUARIO, '#10' ID_FORMA_PAGO = :ID_FORMA_PA' + - 'GO, '#10' FECHA_PREVISTA_ENVIO = :FECHA_PREVISTA_ENVIO, '#10' FECH' + - 'A_ENVIO = :FECHA_ENVIO, '#10' FECHA_RECEPCION = :FECHA_RECEPCION'#10 + - ' WHERE'#10' (ID = :OLD_ID)'#10 + ' ID_PEDIDO = :ID_PEDIDO,'#10' ID_FACTURA = :ID_FACTURA,'#10' ID_' + + 'DIRECCION = :ID_DIRECCION,'#10' CALLE = :CALLE,'#10' CODIGO_POSTAL' + + ' = :CODIGO_POSTAL, '#10' POBLACION = :POBLACION, '#10' PROVINCIA =' + + ' :PROVINCIA, '#10' PERSONA_CONTACTO = :PERSONA_CONTACTO, '#10' TEL' + + 'EFONO = :TELEFONO, '#10' IMPORTE_NETO = :IMPORTE_NETO, '#10' IMPOR' + + 'TE_PORTE = :IMPORTE_PORTE, '#10' DESCUENTO = :DESCUENTO, '#10' IMP' + + 'ORTE_DESCUENTO = :IMPORTE_DESCUENTO, '#10' BASE_IMPONIBLE = :BASE' + + '_IMPONIBLE, '#10' IVA = :IVA, '#10' IMPORTE_IVA = :IMPORTE_IVA, '#10' ' + + ' IMPORTE_TOTAL = :IMPORTE_TOTAL, '#10' OBSERVACIONES = :OBSERVA' + + 'CIONES, '#10' INCIDENCIAS = :INCIDENCIAS, '#10' INCIDENCIAS_ACTIVA' + + 'S = :INCIDENCIAS_ACTIVAS, '#10' FECHA_ALTA = :FECHA_ALTA, '#10' FE' + + 'CHA_MODIFICACION = :FECHA_MODIFICACION, '#10' USUARIO = :USUARIO,' + + ' '#10' ID_FORMA_PAGO = :ID_FORMA_PAGO, '#10' FECHA_PREVISTA_ENVIO ' + + '= :FECHA_PREVISTA_ENVIO, '#10' FECHA_ENVIO = :FECHA_ENVIO, '#10' F' + + 'ECHA_RECEPCION = :FECHA_RECEPCION'#10' WHERE'#10' (ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> @@ -1163,7 +1176,7 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente FailureBehavior = fbRaiseException end> Version = 0 - Left = 48 + Left = 56 Top = 24 end object bpAlbaranesCliente: TDABusinessProcessor @@ -1174,7 +1187,7 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente ReferencedDataset = 'AlbaranesCliente' ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands] UpdateMode = updWhereKeyOnly - Left = 200 + Left = 224 Top = 24 end object bpAlbaranesCliente_Detalles: TDABusinessProcessor @@ -1185,7 +1198,7 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente ReferencedDataset = 'AlbaranesCliente_Detalles' ProcessorOptions = [poPrepareCommands] UpdateMode = updWhereKeyOnly - Left = 200 + Left = 224 Top = 88 end object DADataDictionary: TDADataDictionary @@ -1521,11 +1534,11 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente DataType = datString Size = 255 end> - Left = 48 - Top = 136 + Left = 56 + Top = 144 end object Bin2DataStreamer: TDABin2DataStreamer - Left = 48 + Left = 56 Top = 80 end end diff --git a/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dpk b/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dpk index 89a6fdb700189633f9e23e3ffd8de627b6b5269b..1bcdc056ecf1209c266618ed86005813b23360e7 100644 GIT binary patch delta 303 zcmbOwvPWz~GIPBSFPDOXOJYf)V^VQRQDSmQymNk0YP^e~Ay_7*I4`jP%t}njFDl6a zGlNod{gbj%lS_(G6(?8tWF{3Q7FEJ^SA=Aw=B6UJ?k=7IIi hWacTT6IP~IkXWp)P@Psp&_FAN5a-h3lF95`LI8l=VuSzy delta 24 fcmdlZHcMnfGV>;u)oeW0yj;9osd*`Syj% MainSource - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fEditorAlbaranCliente
@@ -124,6 +133,10 @@
frViewAlbaranesDevCliente
TCustomView
+ +
frViewDatosYSeleccionClienteAlbaran
+ TCustomView +
frViewDetallesAlbaranCliente
TFrame diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm index e282e788..0a5e8b89 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm @@ -172,10 +172,6 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente object pagContenido: TTabSheet Caption = 'Contenido' ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 inline frViewDetallesAlbaranCliente1: TfrViewDetallesAlbaranCliente Left = 0 Top = 0 @@ -217,80 +213,82 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente inherited FontName: TJvFontComboBox Left = 65 Top = 22 - ExplicitLeft = 65 - ExplicitTop = 22 + ExplicitLeft = 399 + ExplicitTop = 0 end inherited FontSize: TEdit - Left = 210 - Top = 22 - ExplicitLeft = 210 - ExplicitTop = 22 + Left = 544 + Top = 0 + ExplicitLeft = 544 + ExplicitTop = 0 end inherited UpDown1: TUpDown - Left = 252 - Top = 22 - ExplicitLeft = 252 - ExplicitTop = 22 + Left = 586 + Top = 0 + ExplicitLeft = 586 + ExplicitTop = 0 end inherited ToolButton13: TToolButton - Left = 269 - Top = 22 - ExplicitLeft = 269 - ExplicitTop = 22 + Left = 0 + Top = 0 + Wrap = True + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitHeight = 30 end inherited ToolButton6: TToolButton - Left = 277 - Top = 22 - ExplicitLeft = 277 - ExplicitTop = 22 + Left = 0 + Top = 30 + ExplicitLeft = 0 + ExplicitTop = 30 end inherited ToolButton7: TToolButton - Left = 343 - Top = 22 - ExplicitLeft = 343 - ExplicitTop = 22 + Left = 66 + Top = 30 + ExplicitLeft = 66 + ExplicitTop = 30 end inherited ToolButton8: TToolButton - Left = 410 - Top = 22 - ExplicitLeft = 410 - ExplicitTop = 22 + Left = 133 + Top = 30 + ExplicitLeft = 133 + ExplicitTop = 30 end inherited ToolButton12: TToolButton - Left = 493 - Top = 22 - ExplicitLeft = 493 - ExplicitTop = 22 + Left = 216 + Top = 30 + ExplicitLeft = 216 + ExplicitTop = 30 end inherited ToolButton9: TToolButton - Left = 501 - Top = 22 - ExplicitLeft = 501 - ExplicitTop = 22 + Left = 224 + Top = 30 + ExplicitLeft = 224 + ExplicitTop = 30 end inherited ToolButton10: TToolButton - Left = 646 - Top = 22 - ExplicitLeft = 646 - ExplicitTop = 22 + Left = 369 + Top = 30 + ExplicitLeft = 369 + ExplicitTop = 30 end inherited ToolButton11: TToolButton - Left = 771 - Top = 22 - ExplicitLeft = 771 - ExplicitTop = 22 + Left = 494 + Top = 30 + ExplicitLeft = 494 + ExplicitTop = 30 end end inherited cxGrid: TcxGrid - Top = 72 + Top = 77 Width = 751 - Height = 306 + Height = 301 ExplicitTop = 77 ExplicitWidth = 751 ExplicitHeight = 301 end inherited TBXDock1: TTBXDock - Top = 46 + Top = 51 Width = 751 ExplicitTop = 51 ExplicitWidth = 751 @@ -312,10 +310,6 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente object pagInicidencias: TTabSheet Caption = 'Incidencias' ImageIndex = 2 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 inline frViewIncidenciasCli: TfrViewIncidencias Left = 0 Top = 0 @@ -574,7 +568,6 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente ExplicitLeft = 93 ExplicitTop = 65 ExplicitWidth = 259 - ExplicitHeight = 0 Width = 259 end inherited dxLayoutControl1Group_Root: TdxLayoutGroup diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas index 614f47f7..05770ac6 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas @@ -348,10 +348,7 @@ begin FController := Value; if Assigned(FController) then - begin - ViewAlbaran.ViewClienteAlbaran.Controller := Controller.ClienteController; frViewDetallesAlbaranCliente1.Controller := Controller.DetallesController; - end; end; procedure TfEditorAlbaranCliente.SetAlbaran(const Value: IBizAlbaranCliente); diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.dfm index 126a0e46..e056a484 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.dfm @@ -59,8 +59,8 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Width = 336 end object memObservaciones: TcxDBMemo - Left = 482 - Top = 387 + Left = 475 + Top = 338 Anchors = [akLeft, akTop, akRight, akBottom] DataBinding.DataField = 'OBSERVACIONES' DataBinding.DataSource = DADataSource @@ -110,98 +110,6 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente TabOrder = 0 Width = 336 end - inline frViewClienteAlbaran: TfrViewDatosYSeleccionCliente - Left = 482 - Top = 28 - Width = 399 - Height = 212 - Align = alTop - AutoSize = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - TabOrder = 17 - ReadOnly = False - ExplicitLeft = 482 - ExplicitTop = 28 - ExplicitWidth = 399 - inherited dxLayoutControl1: TdxLayoutControl - Width = 399 - Align = alTop - ExplicitWidth = 399 - inherited edtlNombre: TcxDBTextEdit - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 325 - Width = 325 - end - inherited edtNIFCIF: TcxDBTextEdit - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 325 - Width = 325 - end - inherited edtCalle: TcxDBTextEdit - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 325 - Width = 325 - end - inherited edtPoblacion: TcxDBTextEdit - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 207 - Width = 207 - end - inherited edtProvincia: TcxDBTextEdit - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 325 - Width = 325 - end - inherited edtCodigoPostal: TcxDBTextEdit - Left = 307 - Style.LookAndFeel.SkinName = '' - StyleDisabled.LookAndFeel.SkinName = '' - StyleFocused.LookAndFeel.SkinName = '' - StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 307 - end - inherited Button3: TBitBtn - Left = 197 - ExplicitLeft = 197 - end - end - inherited DADataSource: TDADataSource - Left = 0 - Top = 65528 - end - inherited ActionList1: TActionList - Top = 65528 - inherited actElegirContacto: TAction - OnUpdate = frViewClienteAlbaranactElegirContactoUpdate - end - inherited actAnadirContacto: TAction - OnUpdate = frViewClienteAlbaranactAnadirContactoUpdate - end - end - inherited PngImageList: TPngImageList - Top = 65528 - end - end object eCalle: TcxDBTextEdit Left = 116 Top = 224 @@ -226,7 +134,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Width = 336 end object eCodigoPostal: TcxDBTextEdit - Left = 387 + Left = 380 Top = 251 DataBinding.DataField = 'CODIGO_POSTAL' DataBinding.DataSource = DADataSource @@ -296,7 +204,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Width = 336 end object bElegirDireccion: TBitBtn - Left = 280 + Left = 273 Top = 359 Width = 172 Height = 23 @@ -305,7 +213,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente TabOrder = 14 end object Button1: TButton - Left = 320 + Left = 313 Top = 138 Width = 132 Height = 23 @@ -374,7 +282,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Width = 198 end object bFormasPago: TButton - Left = 320 + Left = 313 Top = 109 Width = 132 Height = 23 @@ -383,8 +291,8 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente OnClick = bFormasPagoClick end object eFechaRecepcion: TcxDBDateEdit - Left = 616 - Top = 330 + Left = 609 + Top = 281 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_RECEPCION' DataBinding.DataSource = DADataSource @@ -485,8 +393,8 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Width = 336 end object eFechaPrevista: TcxDBDateEdit - Left = 616 - Top = 276 + Left = 609 + Top = 227 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_PREVISTA_ENVIO' DataBinding.DataSource = DADataSource @@ -545,8 +453,8 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Width = 336 end object eFechaEnvio: TcxDBDateEdit - Left = 616 - Top = 303 + Left = 609 + Top = 254 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_ENVIO' DataBinding.DataSource = DADataSource @@ -631,6 +539,56 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente TabOrder = 11 Width = 336 end + inline frViewDatosYSeleccionClienteAlbaran1: TfrViewDatosYSeleccionClienteAlbaran + Left = 475 + Top = 28 + Width = 413 + Height = 163 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 17 + ReadOnly = False + ExplicitLeft = 475 + ExplicitTop = 28 + inherited dxLayoutControl1: TdxLayoutControl + inherited edtlNombre: TcxDBTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 276 + Width = 276 + end + inherited bElegirDireccion: TButton + Left = 373 + ExplicitLeft = 373 + end + inherited edtPersonaContacto: TcxDBTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 403 + Width = 403 + end + inherited bElegirPersonaContacto: TButton + Left = 373 + ExplicitLeft = 373 + end + inherited memDireccion: TcxMemo + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 340 + Width = 340 + end + end + end object dxLayoutControl1Group_Root: TdxLayoutGroup ShowCaption = False Hidden = True @@ -818,7 +776,9 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente object dxLayoutControl1Group2: TdxLayoutGroup Caption = 'Datos del cliente' object dxLayoutControl1Item1: TdxLayoutItem - Control = frViewClienteAlbaran + Caption = 'New Item' + ShowCaption = False + Control = frViewDatosYSeleccionClienteAlbaran1 ControlOptions.AutoColor = True ControlOptions.ShowBorder = False end diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.pas index 2e920efe..27c57008 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.pas @@ -15,7 +15,8 @@ uses // uBizPedidosCliente, uPedidosClienteController, ExtCtrls, cxLookupEdit, cxDBLookupEdit, uBizFormasPago, - cxDBLookupComboBox, uFormasPagoController, uAlmacenesController, uDAInterfaces; + cxDBLookupComboBox, uFormasPagoController, uAlmacenesController, uDAInterfaces, + uViewDatosYSeleccionClienteBase, uViewDatosYSeleccionClienteAlbaran; type IViewAlbaranCliente = interface(IViewBase) @@ -24,9 +25,8 @@ type procedure SetAlbaran(const Value: IBizAlbaranCliente); property Albaran: IBizAlbaranCliente read GetAlbaran write SetAlbaran; - function GetViewClienteAlbaran: TfrViewDatosYSeleccionCliente; - procedure SetViewClienteAlbaran(const Value: TfrViewDatosYSeleccionCliente); - property ViewClienteAlbaran: TfrViewDatosYSeleccionCliente read GetViewClienteAlbaran write SetViewClienteAlbaran; + function GetViewClienteAlbaran: IViewDatosYSeleccionClienteAlbaran; + property ViewClienteAlbaran: IViewDatosYSeleccionClienteAlbaran read GetViewClienteAlbaran; end; TfrViewAlbaranCliente = class(TfrViewBase, IViewAlbaranCliente) @@ -45,8 +45,6 @@ type dxLayoutControl1Group7: TdxLayoutGroup; dxLayoutControl1Group8: TdxLayoutGroup; dxLayoutControl1Group3: TdxLayoutGroup; - dxLayoutControl1Item1: TdxLayoutItem; - frViewClienteAlbaran: TfrViewDatosYSeleccionCliente; dxLayoutControl1Item8: TdxLayoutItem; eCalle: TcxDBTextEdit; dxLayoutControl1Item10: TdxLayoutItem; @@ -99,6 +97,8 @@ type dxLayoutControl1Item11: TdxLayoutItem; cbPoblacion: TcxDBComboBox; dxLayoutControl1Group9: TdxLayoutGroup; + frViewDatosYSeleccionClienteAlbaran1: TfrViewDatosYSeleccionClienteAlbaran; + dxLayoutControl1Item1: TdxLayoutItem; procedure CustomViewCreate(Sender: TObject); procedure CustomViewDestroy(Sender: TObject); procedure actElegirDireccionExecute(Sender: TObject); @@ -115,8 +115,6 @@ type procedure frViewClienteAlbaranactElegirContactoUpdate(Sender: TObject); procedure actElegirDireccionUpdate(Sender: TObject); procedure actVerPedidoCliUpdate(Sender: TObject); - procedure frViewClienteAlbaranButton1Click(Sender: TObject); - procedure frViewClienteAlbaranButton2Click(Sender: TObject); procedure frViewClienteAlbaranactAnadirContactoUpdate(Sender: TObject); procedure cbProvinciaPropertiesInitPopup(Sender: TObject); procedure cbPoblacionPropertiesInitPopup(Sender: TObject); @@ -126,22 +124,21 @@ type FAlmacenesController : IAlmacenesController; // FPedidoAsociado : IBizPedidoCliente; // FPedidoController : IPedidosClienteController; - FViewClienteAlbaran : TfrViewDatosYSeleccionCliente; + FViewClienteAlbaran : IViewDatosYSeleccionClienteAlbaran; FFormasPago : IBizFormaPago; FFormasPagoController : IFormasPagoController; FProvincias : TStringList; FPoblaciones : TStringList; + procedure CargarProvincias; procedure CargarPoblaciones; function GetAlbaran: IBizAlbaranCliente; procedure SetAlbaran(const Value: IBizAlbaranCliente); virtual; - function GetViewClienteAlbaran: TfrViewDatosYSeleccionCliente; - procedure SetViewClienteAlbaran(const Value: TfrViewDatosYSeleccionCliente); - + function GetViewClienteAlbaran: IViewDatosYSeleccionClienteAlbaran; public property Albaran: IBizAlbaranCliente read GetAlbaran write SetAlbaran; - property ViewClienteAlbaran: TfrViewDatosYSeleccionCliente read GetViewClienteAlbaran; + property ViewClienteAlbaran: IViewDatosYSeleccionClienteAlbaran read GetViewClienteAlbaran; end; implementation @@ -320,10 +317,11 @@ begin FFormasPago := Nil; FFormasPagoController := TFormasPagoController.Create; -// FPedidoAsociado := NIL; + + // FPedidoAsociado := NIL; // FPedidoController := TPedidosClienteController.Create; - FViewClienteAlbaran := frViewClienteAlbaran; - FViewClienteAlbaran.MsgElegirCliente := 'Elija el cliente al que se le realizará el Albaran.'; + + FViewClienteAlbaran := frViewDatosYSeleccionClienteAlbaran1; FAlmacenesController := TAlmacenesController.Create; end; @@ -415,34 +413,12 @@ begin } end; -procedure TfrViewAlbaranCliente.frViewClienteAlbaranButton1Click(Sender: TObject); -begin - if Assigned(Albaran) and Assigned(Albaran.Cliente) and - Assigned (Albaran.Detalles) and (Albaran.Detalles.RecordCount > 0) then - begin - if (Application.MessageBox('Los descuentos de los artículos del albarán serán actualizados con los del nuevo cliente seleccionado, ¿Desea continuar?', 'Atención', MB_YESNO) = IDNO) then - Exit; - end; - frViewClienteAlbaran.actElegirContacto.Execute; -end; - -procedure TfrViewAlbaranCliente.frViewClienteAlbaranButton2Click(Sender: TObject); -begin - if Assigned(Albaran) and Assigned(Albaran.Cliente) and - Assigned (Albaran.Detalles) and (Albaran.Detalles.RecordCount > 0) then - begin - if (Application.MessageBox('Los descuentos de los artículos del albarán serán actualizados con los del nuevo cliente seleccionado, ¿Desea continuar?', 'Atención', MB_YESNO) = IDNO) then - Exit; - end; - frViewClienteAlbaran.actAnadirContacto.Execute; -end; - function TfrViewAlbaranCliente.GetAlbaran: IBizAlbaranCliente; begin Result := FAlbaran; end; -function TfrViewAlbaranCliente.GetViewClienteAlbaran: TfrViewDatosYSeleccionCliente; +function TfrViewAlbaranCliente.GetViewClienteAlbaran: IViewDatosYSeleccionClienteAlbaran; begin Result := FViewClienteAlbaran; end; @@ -453,7 +429,7 @@ begin if Assigned(FAlbaran) then begin DADataSource.DataTable := FAlbaran.DataTable; - frViewClienteAlbaran.Cliente := FAlbaran.Cliente; + FViewClienteAlbaran.AlbaranCliente := FAlbaran; FFormasPago := FFormasPagoController.BuscarTodos; dsFormaPago.DataTable := FFormasPago.DataTable; @@ -505,16 +481,11 @@ begin end else begin DADataSource.DataTable := NIL; - frViewClienteAlbaran.Cliente := nil; + FViewClienteAlbaran.AlbaranCliente := NIL; // FPedidoAsociado := NIL; dsFormaPago.DataTable := NIL; dsAlmacenes.DataTable := NIL; end; end; -procedure TfrViewAlbaranCliente.SetViewClienteAlbaran(const Value: TfrViewDatosYSeleccionCliente); -begin - FViewClienteAlbaran := Value; -end; - end. diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.dfm b/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.dfm new file mode 100644 index 00000000..376b514e --- /dev/null +++ b/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.dfm @@ -0,0 +1,174 @@ +inherited frViewDatosYSeleccionClienteAlbaran: TfrViewDatosYSeleccionClienteAlbaran + Height = 163 + ExplicitHeight = 163 + inherited dxLayoutControl1: TdxLayoutControl + Height = 128 + ExplicitTop = 35 + ExplicitWidth = 413 + ExplicitHeight = 128 + DesignSize = ( + 413 + 128) + object edtlNombre: TcxDBTextEdit [0] + Left = 63 + Top = 10 + Anchors = [akLeft, akTop, akRight] + AutoSize = False + DataBinding.DataField = 'NOMBRE' + DataBinding.DataSource = dsCliente + Enabled = False + ParentFont = False + Properties.ReadOnly = True + Properties.UseLeftAlignmentOnEditing = False + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 0 + Height = 21 + Width = 276 + end + object bElegirDireccion: TButton [1] + Left = 380 + Top = 37 + Width = 23 + Height = 25 + Action = actElegirDireccion + TabOrder = 2 + end + object edtPersonaContacto: TcxDBTextEdit [2] + Left = 63 + Top = 89 + Anchors = [akLeft, akTop, akRight] + AutoSize = False + DataBinding.DataField = 'PERSONA_CONTACTO' + DataBinding.DataSource = dsAlbaran + ParentFont = False + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 3 + Height = 21 + Width = 403 + end + object bElegirPersonaContacto: TButton [3] + Left = 380 + Top = 87 + Width = 23 + Height = 25 + Action = actElegirPersonaContacto + TabOrder = 4 + end + object memDireccion: TcxMemo [4] + Left = 63 + Top = 37 + Enabled = False + Properties.ReadOnly = True + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 1 + Height = 44 + Width = 340 + end + inherited dxLayoutControl1Group_Root: TdxLayoutGroup + object dxLayoutControl1Item1: TdxLayoutItem + Caption = 'Nombre:' + Control = edtlNombre + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Group4: TdxLayoutGroup + ShowCaption = False + Hidden = True + LayoutDirection = ldHorizontal + ShowBorder = False + object dxLayoutControl1Item6: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'Direcci'#243'n:' + CaptionOptions.AlignVert = tavTop + Control = memDireccion + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item3: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahRight + CaptionOptions.AlignVert = tavTop + ShowCaption = False + Control = bElegirDireccion + ControlOptions.ShowBorder = False + end + end + object dxLayoutControl1Group2: TdxLayoutGroup + ShowCaption = False + Hidden = True + LayoutDirection = ldHorizontal + ShowBorder = False + object dxLayoutControl1Item4: TdxLayoutItem + AutoAligns = [] + AlignHorz = ahClient + AlignVert = avCenter + Caption = 'Contacto:' + Control = edtPersonaContacto + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item5: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahRight + ShowCaption = False + Control = bElegirPersonaContacto + ControlOptions.ShowBorder = False + end + end + end + end + inherited Panel1: TPanel + ExplicitTop = 0 + inherited bElegirCliente: TBitBtn + ExplicitLeft = 4 + ExplicitTop = 4 + end + inherited bNuevoCliente: TBitBtn + ExplicitLeft = 266 + ExplicitTop = 4 + end + inherited bVerFicha: TBitBtn + ExplicitLeft = 121 + ExplicitTop = 4 + end + end + object dsAlbaran: TDADataSource + Left = 232 + Top = 8 + end +end diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas b/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas new file mode 100644 index 00000000..80fbe9d3 --- /dev/null +++ b/Source/Modulos/Albaranes de cliente/Views/uViewDatosYSeleccionClienteAlbaran.pas @@ -0,0 +1,181 @@ +unit uViewDatosYSeleccionClienteAlbaran; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uViewDatosYSeleccionClienteBase, ImgList, PngImageList, ActnList, DB, + uDAInterfaces, uDADataTable, dxLayoutControl, StdCtrls, Buttons, cxControls, + cxTextEdit, cxContainer, cxEdit, cxDBEdit, ExtCtrls, cxMemo, + uBizAlbaranesCliente; + +type + IViewDatosYSeleccionClienteAlbaran = interface(IViewDatosYSeleccionClienteBase) + ['{41EA09A7-F21A-4D89-AC60-559CB6B430C9}'] + function GetAlbaranCliente: IBizAlbaranCliente; + procedure SetAlbaranCliente(const Value: IBizAlbaranCliente); + property AlbaranCliente: IBizAlbaranCliente read GetAlbaranCliente write SetAlbaranCliente; + end; + + + TfrViewDatosYSeleccionClienteAlbaran = class(TfrViewDatosYSeleccionClienteBase, IViewDatosYSeleccionClienteAlbaran) + dxLayoutControl1Item1: TdxLayoutItem; + edtlNombre: TcxDBTextEdit; + dxLayoutControl1Item3: TdxLayoutItem; + bElegirDireccion: TButton; + dxLayoutControl1Item4: TdxLayoutItem; + edtPersonaContacto: TcxDBTextEdit; + dxLayoutControl1Item5: TdxLayoutItem; + bElegirPersonaContacto: TButton; + dxLayoutControl1Group2: TdxLayoutGroup; + dxLayoutControl1Item6: TdxLayoutItem; + memDireccion: TcxMemo; + dxLayoutControl1Group4: TdxLayoutGroup; + dsAlbaran: TDADataSource; + protected + FAlbaran : IBizAlbaranCliente; + function GetAlbaranCliente: IBizAlbaranCliente; + procedure SetAlbaranCliente(const Value: IBizAlbaranCliente); + + procedure EscribirTextoDireccion; + procedure RefrescarDireccion; + public + procedure ElegirCliente; override; + procedure ElegirDireccionCliente; override; + procedure ElegirPersonaContacto; override; + procedure AnadirNuevoCliente; override; + property AlbaranCliente: IBizAlbaranCliente read GetAlbaranCliente write SetAlbaranCliente; + end; + +implementation + +{$R *.dfm} + +{ TfrViewDatosYSeleccionClienteAlbaran } + +procedure TfrViewDatosYSeleccionClienteAlbaran.AnadirNuevoCliente; +begin + if Assigned(FAlbaran) and Assigned(FCliente) and + Assigned (FAlbaran.Detalles) and (FAlbaran.Detalles.RecordCount > 0) then + begin + if (Application.MessageBox('Los descuentos de los artículos del albarán serán actualizados con los del nuevo cliente seleccionado, ¿Desea continuar?', 'Atención', MB_YESNO) = IDNO) then + Exit; + end; + + inherited; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.ElegirCliente; +begin + if Assigned(FAlbaran) and Assigned(FCliente) and + Assigned (FAlbaran.Detalles) and (FAlbaran.Detalles.RecordCount > 0) then + begin + if (Application.MessageBox('Los descuentos de los artículos del albarán serán actualizados con los del nuevo cliente seleccionado, ¿Desea continuar?', 'Atención', MB_YESNO) = IDNO) then + Exit; + end; + + inherited; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.ElegirDireccionCliente; +begin + inherited; + + if Assigned(FDireccion) then + begin + FAlbaran.Edit; + + if FDireccion.IDIsNull then + begin + FAlbaran.ClearField('ID_DIRECCION'); + FAlbaran.ClearField('IMPORTE_PORTE'); + FAlbaran.ClearField('CALLE'); + FAlbaran.ClearField('POBLACION'); + FAlbaran.ClearField('PROVINCIA'); + FAlbaran.ClearField('CODIGO_POSTAL'); + FAlbaran.ClearField('TELEFONO'); + end + else begin + FAlbaran.ID_DIRECCION := FDireccion.ID; + FAlbaran.CALLE := FDireccion.CALLE; + FAlbaran.POBLACION := FDireccion.POBLACION; + FAlbaran.PROVINCIA := FDireccion.PROVINCIA; + FAlbaran.CODIGO_POSTAL := FDireccion.CODIGO_POSTAL; + FAlbaran.TELEFONO := FDireccion.TELEFONO; + FAlbaran.IMPORTE_PORTE := FDireccion.PORTE; + FAlbaran.PERSONA_CONTACTO := FDireccion.PERSONA_CONTACTO; + end; + EscribirTextoDireccion; + end; + +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.ElegirPersonaContacto; +begin + inherited; + if Assigned(FPersonaContacto) then + begin + FAlbaran.Edit; + FAlbaran.PERSONA_CONTACTO := FPersonaContacto.NOMBRE; + end; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.EscribirTextoDireccion; +var + ACadena : String; +begin + ACadena := ''; + + if Assigned(FDireccion) then + ACadena := Format('%s %s %s %s', + [FDireccion.CALLE, FDireccion.POBLACION, + FDireccion.CODIGO_POSTAL, FDireccion.PROVINCIA]); + + memDireccion.Lines.Clear; + memDireccion.Lines.Text := ACadena; +end; + + +function TfrViewDatosYSeleccionClienteAlbaran.GetAlbaranCliente: IBizAlbaranCliente; +begin + Result := FAlbaran; +end; + + +procedure TfrViewDatosYSeleccionClienteAlbaran.RefrescarDireccion; +begin + FDireccion := FDireccionesController.Nuevo; + + if (not FAlbaran.ID_DIRECCIONIsNull) and + (FDireccionesController.Localizar(FCliente.Direcciones, FAlbaran.ID_DIRECCION)) then + FDireccionesController.CopiarDireccion(FCliente.Direcciones, FDireccion) + else + FDireccionesController.CopiarDireccionFiscal(FCliente, FDireccion); + + EscribirTextoDireccion; +end; + +procedure TfrViewDatosYSeleccionClienteAlbaran.SetAlbaranCliente( + const Value: IBizAlbaranCliente); +begin + FAlbaran := Value; + if Assigned(FAlbaran) then + begin + dsAlbaran.DataTable := FAlbaran.DataTable; + + FCliente := FAlbaran.Cliente; + dsCliente.DataTable := FCliente.DataTable; + + if not FCliente.DataTable.Active then + FCliente.DataTable.Active := True; + + RefrescarDireccion; + end + else begin + dsAlbaran.DataTable := NIL; + FCliente := NIL; + FDireccion := NIL; + end; +end; + +end. diff --git a/Source/Modulos/Contactos/Views/Contactos_view.dpk b/Source/Modulos/Contactos/Views/Contactos_view.dpk index 03179b95..a97ae422 100644 --- a/Source/Modulos/Contactos/Views/Contactos_view.dpk +++ b/Source/Modulos/Contactos/Views/Contactos_view.dpk @@ -66,7 +66,11 @@ requires xmlrtl, cfpack_d11, designide, - ccpackD11; + ccpackD11, + JvStdCtrlsD11R, + JvCtrlsD11R, + dxLayoutControlD11, + dxComnD11; contains uContactosViewRegister in 'uContactosViewRegister.pas', @@ -106,6 +110,7 @@ contains uEditorDireccion in 'uEditorDireccion.pas' {fEditorDireccion: TCustomEditor}, uEditorPersonal in 'uEditorPersonal.pas' {fEditorPersonal: TCustomEditor}, uViewPersonalContacto in 'uViewPersonalContacto.pas' {frViewPersonalContacto: TFrame}, - uEditorElegirDireccionEntrega in 'uEditorElegirDireccionEntrega.pas' {fEditorElegirDireccionEntrega: TCustomEditor}; + uEditorElegirDireccionEntrega in 'uEditorElegirDireccionEntrega.pas' {fEditorElegirDireccionEntrega: TCustomEditor}, + uViewDatosYSeleccionClienteBase in 'uViewDatosYSeleccionClienteBase.pas' {frViewDatosYSeleccionClienteBase: TFrame}; end. diff --git a/Source/Modulos/Contactos/Views/Contactos_view.dproj b/Source/Modulos/Contactos/Views/Contactos_view.dproj index b2bb9b4b..a426e95e 100644 --- a/Source/Modulos/Contactos/Views/Contactos_view.dproj +++ b/Source/Modulos/Contactos/Views/Contactos_view.dproj @@ -49,42 +49,52 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fEditorCliente
@@ -114,7 +124,7 @@ TCustomEditor
-
fuEditorElegirDireccionEntrega
+
fEditorElegirDireccionEntrega
TCustomEditor
@@ -201,6 +211,10 @@
frViewDatosYSeleccionCliente
TFrame
+ +
frViewDatosYSeleccionClienteBase
+ TFrame +
frViewDatosYSeleccionProveedor
TFrame @@ -233,12 +247,6 @@
frViewProveedores
TCustomView
- - - - - -