From 6b422218ea804d5c4810cb2910c3d5716de3c75a Mon Sep 17 00:00:00 2001 From: roberto Date: Tue, 8 Apr 2008 19:12:47 +0000 Subject: [PATCH] =?UTF-8?q?A=C3=B1adimos=20campo=20nombre=5Fcomercial=20a?= =?UTF-8?q?=20proveedores=20y=20clientes,=20asi=20como=20nif=5Fcif=20en=20?= =?UTF-8?q?las=20direcciones=20para=20as=C3=AD=20poder=20usarlas=20para=20?= =?UTF-8?q?facturaci=C3=B3n,=20se=20modifica=20las=20facturas=20de=20prove?= =?UTF-8?q?edor=20y=20cliente=20para=20que=20soporte=20elegir=20una=20dire?= =?UTF-8?q?cci=C3=B3n=20para=20facturar=20se=20guarde=20y=20se=20vea=20tan?= =?UTF-8?q?to=20el=20proveedor=20como=20la=20razon=20social=20de=20la=20fa?= =?UTF-8?q?ctura?= 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.Acana_FactuGES2/trunk@189 f4e31baf-9722-1c47-927c-6f952f962d4b --- Database/scripts/factuges.sql | 26 +- Source/Base/Base.dproj | 82 +-- .../AlbaranesProveedor_Group.groupproj | 46 +- .../uAlbaranesProveedorController.pas | 3 +- .../Views/uViewAlbaranProveedor.dfm | 1 + .../Views/uViewAlbaranProveedor.pas | 2 +- .../Servidor/srvContabilidad_Impl.dfm | 2 +- .../Servidor/srvContabilidad_Impl.pas | 15 +- .../Controller/Contactos_controller.dpk | 2 +- .../Controller/Contactos_controller.dproj | 78 ++- .../View/uIEditorElegirDireccionEntrega.pas | 30 -- .../Controller/uClientesController.pas | 6 +- .../Controller/uContactosController.pas | 57 +- .../Controller/uProveedoresController.pas | 33 +- .../Contactos/Data/uDataModuleClientes.dfm | 111 ++++ .../Contactos/Data/uDataModuleProveedores.dfm | 116 ++++ .../Model/schContactosClient_Intf.pas | 178 +++++-- .../Model/schContactosServer_Intf.pas | 138 ++++- .../Contactos/Model/uBizProveedoresServer.pas | 2 + .../Contactos/Servidor/srvContactos_Impl.dfm | 133 ++--- .../Contactos/Views/Contactos_view.dpk | 2 +- .../Contactos/Views/Contactos_view.dproj | 54 +- .../Views/uContactosViewRegister.pas | 6 +- .../Contactos/Views/uEditorDireccion.dfm | 75 +-- .../Contactos/Views/uEditorDireccion.pas | 2 + .../Views/uEditorElegirDireccionEntrega.dfm | 247 --------- .../Views/uEditorElegirDireccionEntrega.pas | 110 ---- .../Contactos/Views/uEditorProveedor.dfm | 124 +++-- .../Modulos/Contactos/Views/uViewCliente.dfm | 1 - .../Views/uViewDireccionesEntrega.dfm | 20 +- .../Views/uViewDireccionesEntrega.pas | 1 + .../Contactos/Views/uViewProveedor.dfm | 103 ++-- .../Contactos/Views/uViewProveedor.pas | 2 + .../Contactos/Views/uViewProveedores.dfm | 14 + .../Contactos/Views/uViewProveedores.pas | Bin 1014 -> 1064 bytes .../Controller/uFacturasClienteController.pas | 44 +- .../Data/uDataModuleFacturasCliente.dfm | 10 + .../Model/schFacturasClienteClient_Intf.pas | 120 ++++- .../Model/schFacturasClienteServer_Intf.pas | 94 +++- .../Servidor/srvFacturasCliente_Impl.dfm | 18 + .../Views/FacturasCliente_view.dpk | 25 +- .../Views/FacturasCliente_view.dproj | 40 +- .../Views/uEditorFacturaCliente.dfm | 52 +- .../Views/uEditorFacturaCliente.pas | 39 +- .../Views/uViewClienteFactura.dfm | 116 ++++ .../Views/uViewClienteFactura.pas | 30 ++ .../Views/uViewFacturaCliente.dfm | 114 ++-- .../Views/uViewFacturaCliente.pas | 12 +- .../Views/uViewFacturasCliente.dfm | 8 + .../Views/uViewFacturasCliente.pas | Bin 7422 -> 7520 bytes .../uFacturasProveedorController.pas | 134 ++++- .../Data/uDataModuleFacturasProveedor.dfm | 14 + .../FacturasProveedor_Group.groupproj | 76 ++- .../Model/schFacturasProveedorClient_Intf.pas | 173 ++++-- .../Model/schFacturasProveedorServer_Intf.pas | 137 ++++- .../Plugin/FacturasProveedor_plugin.dpk | 4 +- .../Plugin/FacturasProveedor_plugin.dproj | 4 +- .../Servidor/srvFacturasProveedor_Impl.dfm | 93 +++- .../Views/FacturasProveedor_view.dpk | 27 +- .../Views/FacturasProveedor_view.dproj | 45 +- .../Views/uEditorFacturaProveedor.dfm | 76 ++- .../Views/uEditorFacturaProveedor.pas | 40 +- .../Views/uEditorFacturasProveedor.pas | 40 +- .../Views/uViewFacturaProveedor.dfm | 177 ++++--- .../Views/uViewFacturaProveedor.pas | 57 +- .../Views/uViewFacturasProveedor.dfm | 9 +- .../Views/uViewFacturasProveedor.pas | Bin 7549 -> 7649 bytes .../Views/uViewProveedorFactura.dfm | 108 ++++ .../Views/uViewProveedorFactura.pas | 30 ++ Source/Servidor/FactuGES_Server.RES | Bin 23200 -> 23200 bytes Source/Servidor/FactuGES_Server.dpr | 10 +- Source/Servidor/FactuGES_Server.dproj | 501 +++++++++--------- Source/Servidor/FactuGES_Server.rc | 2 +- 73 files changed, 2791 insertions(+), 1510 deletions(-) delete mode 100644 Source/Modulos/Contactos/Controller/View/uIEditorElegirDireccionEntrega.pas delete mode 100644 Source/Modulos/Contactos/Views/uEditorElegirDireccionEntrega.dfm delete mode 100644 Source/Modulos/Contactos/Views/uEditorElegirDireccionEntrega.pas create mode 100644 Source/Modulos/Facturas de cliente/Views/uViewClienteFactura.dfm create mode 100644 Source/Modulos/Facturas de cliente/Views/uViewClienteFactura.pas create mode 100644 Source/Modulos/Facturas de proveedor/Views/uViewProveedorFactura.dfm create mode 100644 Source/Modulos/Facturas de proveedor/Views/uViewProveedorFactura.pas diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index ea9f1f71..66d825eb 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -891,6 +891,7 @@ CREATE TABLE FACTURAS_PROVEEDOR ( REFERENCIA VARCHAR(255), REFERENCIA_PROVEEDOR VARCHAR(255), FECHA_FACTURA DATE, + FECHA_VENCIMIENTO DATE, BASE_IMPONIBLE TIPO_IMPORTE, DESCUENTO TIPO_PORCENTAJE, IMPORTE_DESCUENTO TIPO_IMPORTE, @@ -1194,7 +1195,8 @@ CREATE TABLE PROVEEDORES_DATOS ( CERTIFICACION VARCHAR(255), HOMOLOGADO SMALLINT, IGNORAR_CONTABILIDAD TIPO_ID, - TIENE_SUBCUENTA TIPO_ID + TIENE_SUBCUENTA TIPO_ID, + NOMBRE_COMERCIAL VARCHAR(255) ); CREATE TABLE PROVEEDORES_GRUPOS ( @@ -2228,6 +2230,8 @@ CREATE VIEW V_FACTURAS_CLIENTE( IMPORTE_TOTAL, OBSERVACIONES, ID_CLIENTE, + NOMBRE_CLIENTE, + NOMBRE_COMERCIAL_CLIENTE, NIF_CIF, NOMBRE, CALLE, @@ -2267,6 +2271,8 @@ SELECT FACTURAS_CLIENTE.ID, FACTURAS_CLIENTE.IMPORTE_TOTAL, FACTURAS_CLIENTE.OBSERVACIONES, FACTURAS_CLIENTE.ID_CLIENTE, + V_CLIENTES.NOMBRE, + V_CLIENTES.NOMBRE_COMERCIAL, FACTURAS_CLIENTE.NIF_CIF, FACTURAS_CLIENTE.NOMBRE, FACTURAS_CLIENTE.CALLE, @@ -2294,6 +2300,8 @@ SELECT FACTURAS_CLIENTE.ID, ON (FACTURAS_CLIENTE.ID = V_FAC_CLI_SITUACION.ID_FACTURA) LEFT JOIN COMISIONES_LIQUIDADAS ON (COMISIONES_LIQUIDADAS.ID = FACTURAS_CLIENTE.ID_COMISION_LIQUIDADA) + LEFT JOIN V_CLIENTES + ON (V_CLIENTES.ID = FACTURAS_CLIENTE.ID_CLIENTE) LEFT JOIN CLIENTES_DATOS ON (CLIENTES_DATOS.ID_CLIENTE = FACTURAS_CLIENTE.ID_CLIENTE) LEFT JOIN EMPRESAS_TIENDAS ON (EMPRESAS_TIENDAS.ID = FACTURAS_CLIENTE.ID_TIENDA) @@ -2310,6 +2318,7 @@ CREATE VIEW V_FACTURAS_PROVEEDOR( TIPO, REFERENCIA_PROVEEDOR, FECHA_FACTURA, + FECHA_VENCIMIENTO, SITUACION, BASE_IMPONIBLE, DESCUENTO, @@ -2321,6 +2330,8 @@ CREATE VIEW V_FACTURAS_PROVEEDOR( IMPORTE_TOTAL, OBSERVACIONES, ID_PROVEEDOR, + NOMBRE_PROVEEDOR, + NOMBRE_COMERCIAL_PROVEEDOR, NIF_CIF, NOMBRE, CALLE, @@ -2347,6 +2358,7 @@ SELECT FACTURAS_PROVEEDOR.ID, CASE WHEN (FACTURAS_PROVEEDOR.IMPORTE_TOTAL < 0) THEN 'A' ELSE 'F' END AS TIPO, FACTURAS_PROVEEDOR.REFERENCIA_PROVEEDOR, FACTURAS_PROVEEDOR.FECHA_FACTURA, + FACTURAS_PROVEEDOR.FECHA_VENCIMIENTO, TRIM(V_FAC_PRO_SITUACION.SITUACION), FACTURAS_PROVEEDOR.BASE_IMPONIBLE, FACTURAS_PROVEEDOR.DESCUENTO, @@ -2358,6 +2370,8 @@ SELECT FACTURAS_PROVEEDOR.ID, FACTURAS_PROVEEDOR.IMPORTE_TOTAL, FACTURAS_PROVEEDOR.OBSERVACIONES, FACTURAS_PROVEEDOR.ID_PROVEEDOR, + V_PROVEEDORES.NOMBRE, + V_PROVEEDORES.NOMBRE_COMERCIAL, FACTURAS_PROVEEDOR.NIF_CIF, FACTURAS_PROVEEDOR.NOMBRE, FACTURAS_PROVEEDOR.CALLE, @@ -2381,6 +2395,8 @@ SELECT FACTURAS_PROVEEDOR.ID, FROM V_FAC_PRO_SITUACION LEFT JOIN FACTURAS_PROVEEDOR ON (FACTURAS_PROVEEDOR.ID = V_FAC_PRO_SITUACION.ID_FACTURA) + LEFT JOIN V_PROVEEDORES + ON (V_PROVEEDORES.ID = FACTURAS_PROVEEDOR.ID_PROVEEDOR) LEFT JOIN PROVEEDORES_DATOS ON (PROVEEDORES_DATOS.ID_PROVEEDOR = FACTURAS_PROVEEDOR.ID_PROVEEDOR) LEFT JOIN EMPRESAS_TIENDAS @@ -3018,8 +3034,6 @@ FROM V_PED_PROV_ARTICULOS GROUP BY V_PED_PROV_ARTICULOS.ID_PEDIDO ; - - /* View: V_PROVEEDORES */ CREATE VIEW V_PROVEEDORES( ID, @@ -3058,7 +3072,8 @@ CREATE VIEW V_PROVEEDORES( HOMOLOGADO, CERTIFICACION, IGNORAR_CONTABILIDAD, - TIENE_SUBCUENTA) + TIENE_SUBCUENTA, + NOMBRE_COMERCIAL) AS SELECT V_CONTACTOS.ID, @@ -3097,7 +3112,8 @@ SELECT PROVEEDORES_DATOS.HOMOLOGADO, PROVEEDORES_DATOS.CERTIFICACION, PROVEEDORES_DATOS.IGNORAR_CONTABILIDAD, - PROVEEDORES_DATOS.TIENE_SUBCUENTA + PROVEEDORES_DATOS.TIENE_SUBCUENTA, + PROVEEDORES_DATOS.NOMBRE_COMERCIAL FROM PROVEEDORES_DATOS INNER JOIN V_CONTACTOS ON (PROVEEDORES_DATOS.ID_PROVEEDOR = V_CONTACTOS.ID) diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index 50c04110..5048859e 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -58,47 +58,47 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fConfigurarConexion
diff --git a/Source/Modulos/Albaranes de proveedor/AlbaranesProveedor_Group.groupproj b/Source/Modulos/Albaranes de proveedor/AlbaranesProveedor_Group.groupproj index 98fbf0c9..525b8689 100644 --- a/Source/Modulos/Albaranes de proveedor/AlbaranesProveedor_Group.groupproj +++ b/Source/Modulos/Albaranes de proveedor/AlbaranesProveedor_Group.groupproj @@ -10,7 +10,11 @@ + + + + @@ -131,14 +135,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Albaranes de proveedor/Controller/uAlbaranesProveedorController.pas b/Source/Modulos/Albaranes de proveedor/Controller/uAlbaranesProveedorController.pas index 169b767e..42b1a7c3 100644 --- a/Source/Modulos/Albaranes de proveedor/Controller/uAlbaranesProveedorController.pas +++ b/Source/Modulos/Albaranes de proveedor/Controller/uAlbaranesProveedorController.pas @@ -108,8 +108,7 @@ type procedure VerTodosAlbaranesDev(AAlbarans: IBizAlbaranProveedor); procedure VerDireccionEntrega(AAlbaran : IBizAlbaranProveedor); function Duplicar(AAlbaran: IBizAlbaranProveedor): IBizAlbaranProveedor; - procedure CopiarDireccionEnvio (const ADireccionEnvio: IBizDireccionesContacto; - AAlbaran: IBizAlbaranProveedor); + procedure CopiarDireccionEnvio (const ADireccionEnvio: IBizDireccionesContacto; AAlbaran: IBizAlbaranProveedor); procedure QuitarDireccionEnvio(AAlbaran: IBizAlbaranProveedor); function ExtraerSeleccionados(AAlbaran: IBizAlbaranProveedor) : IBizAlbaranProveedor; diff --git a/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranProveedor.dfm b/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranProveedor.dfm index 83efeeb1..1da0bf98 100644 --- a/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranProveedor.dfm +++ b/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranProveedor.dfm @@ -352,6 +352,7 @@ inherited frViewAlbaranProveedor: TfrViewAlbaranProveedor ExplicitHeight = 32 inherited dxLayoutControl1: TdxLayoutControl Width = 366 + ExplicitWidth = 366 inherited cbTienda: TcxComboBox ExplicitWidth = 376 Width = 376 diff --git a/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranProveedor.pas b/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranProveedor.pas index 7732f1df..d2d19982 100644 --- a/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranProveedor.pas +++ b/Source/Modulos/Albaranes de proveedor/Views/uViewAlbaranProveedor.pas @@ -138,7 +138,7 @@ begin AProveedoresController := NIL; AAlbaranController := NIL; end; -} +} end; procedure TfrViewAlbaranProveedor.actElegirDireccionUpdate(Sender: TObject); diff --git a/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.dfm b/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.dfm index e66e075e..1dd3a5b2 100644 --- a/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.dfm +++ b/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.dfm @@ -505,7 +505,7 @@ object srvContabilidad: TsrvContabilidad 'Integer))'#10'from cont_subcuentas'#10'left join cont_cuentas on cont_cu' + 'entas.id = cont_subcuentas.id_cuenta'#10'where cont_subcuentas.id_ej' + 'ercicio = :ID_EJERCICIO'#10'and cont_cuentas.ref_cuenta = :REF_CUENT' + - 'A'#10'and substr(cont_subcuentas.ref_subcuenta, 4, 5) = :REF_TIENDA'#10 + 'A'#10#10 StatementType = stSQL ColumnMappings = < item diff --git a/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas b/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas index f6beb01f..9ae5cb04 100644 --- a/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas +++ b/Source/Modulos/Contabilidad/Servidor/srvContabilidad_Impl.pas @@ -160,17 +160,8 @@ begin try try - dsData := schContabilidad.NewDataset(AConn, 'DarCodigoContableTienda', ['ID_EMPRESA', 'ID_TIENDA'], [ID_EMPRESA, ID_TIENDA]); - dsData.Active := True; - - if VarIsNull(dsData.FieldValues[0]) then - NumTienda := 0 - else - NumTienda := dsData.FieldValues[0]; - RefTienda := format('%.2d', [NumTienda]); - dsData := NIL; - dsData := schContabilidad.NewDataset(AConn, 'DarMaxRefSubCuenta', ['ID_EJERCICIO', 'REF_CUENTA', 'REF_TIENDA'], [darEjercicioActivo(ID_EMPRESA), REFERENCIA_PROVEEDORES, RefTienda]); + dsData := schContabilidad.NewDataset(AConn, 'DarMaxRefSubCuenta', ['ID_EJERCICIO', 'REF_CUENTA'], [darEjercicioActivo(ID_EMPRESA), REFERENCIA_PROVEEDORES]); dsData.Active := True; if VarIsNull(dsData.FieldValues[0]) then @@ -178,8 +169,8 @@ begin else NumCuenta := dsData.FieldValues[0]; Inc(NumCuenta); - RefSubCuenta := format('%.5d', [NumCuenta]); - RefSubCuenta := IntToStr(REFERENCIA_PROVEEDORES) + RefTienda + RefSubCuenta; + RefSubCuenta := format('%.7d', [NumCuenta]); + RefSubCuenta := IntToStr(REFERENCIA_PROVEEDORES) + RefSubCuenta; dsData := NIL; dsData := schContabilidad.NewDataset(AConn, 'DarIDCuenta', ['ID_EJERCICIO', 'REFERENCIA'], [darEjercicioActivo(ID_EMPRESA), REFERENCIA_PROVEEDORES]); diff --git a/Source/Modulos/Contactos/Controller/Contactos_controller.dpk b/Source/Modulos/Contactos/Controller/Contactos_controller.dpk index ca6c0024..cf06ce3e 100644 --- a/Source/Modulos/Contactos/Controller/Contactos_controller.dpk +++ b/Source/Modulos/Contactos/Controller/Contactos_controller.dpk @@ -61,7 +61,7 @@ contains uIEditorElegirContactos in 'View\uIEditorElegirContactos.pas', uIEditorDireccionContacto in 'View\uIEditorDireccionContacto.pas', uDireccionesContactoController in 'uDireccionesContactoController.pas', - uIEditorElegirDireccionEntrega in 'View\uIEditorElegirDireccionEntrega.pas', + uIEditorElegirDireccion in 'View\uIEditorElegirDireccion.pas', uGruposClienteController in 'uGruposClienteController.pas', uIEditorGruposCliente in 'View\uIEditorGruposCliente.pas', uGruposProveedorController in 'uGruposProveedorController.pas', diff --git a/Source/Modulos/Contactos/Controller/Contactos_controller.dproj b/Source/Modulos/Contactos/Controller/Contactos_controller.dproj index 55487b2e..58c69a19 100644 --- a/Source/Modulos/Contactos/Controller/Contactos_controller.dproj +++ b/Source/Modulos/Contactos/Controller/Contactos_controller.dproj @@ -52,6 +52,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JCL Debug IDE extension JCL Project Analyzer JCL Open and Save IDE dialogs with favorite folders @@ -62,6 +104,23 @@ MainSource + + + + + + + + + + + + + + + + + @@ -73,21 +132,6 @@ - - - - - - - - - - - - - - - @@ -95,7 +139,7 @@ - + @@ -107,8 +151,6 @@ - - diff --git a/Source/Modulos/Contactos/Controller/View/uIEditorElegirDireccionEntrega.pas b/Source/Modulos/Contactos/Controller/View/uIEditorElegirDireccionEntrega.pas deleted file mode 100644 index c99cb9ed..00000000 --- a/Source/Modulos/Contactos/Controller/View/uIEditorElegirDireccionEntrega.pas +++ /dev/null @@ -1,30 +0,0 @@ -unit uIEditorElegirDireccionEntrega; - -interface - -uses - uBizDireccionesContacto, uGUIBase; - -type - IEditorElegirDireccionEntrega = interface - ['{AB909782-25E1-4715-B98A-EA62FB9DC03C}'] - function GetDireccion: IBizDireccionesContacto; - procedure SetDireccion(const Value: IBizDireccionesContacto); - property Direccion: IBizDireccionesContacto read GetDireccion write SetDireccion; - - procedure SetMensaje (const AValue: String); - function GetMensaje: String; - property Mensaje : String read GetMensaje write SetMensaje; - - function GetDireccionSeleccionada: IBizDireccionesContacto; - property DireccionSeleccionada: IBizDireccionesContacto read GetDireccionSeleccionada; - - function ShowModal : Integer; - procedure Release; - end; - - -implementation - -end. - diff --git a/Source/Modulos/Contactos/Controller/uClientesController.pas b/Source/Modulos/Contactos/Controller/uClientesController.pas index 77fe865b..eaf55fd2 100644 --- a/Source/Modulos/Contactos/Controller/uClientesController.pas +++ b/Source/Modulos/Contactos/Controller/uClientesController.pas @@ -57,7 +57,7 @@ implementation uses Forms, Classes, Windows, SysUtils, Controls, cxControls, uDialogUtils, uDataModuleClientes, uEditorRegistryUtils, uDataTableUtils, uDADataTable, DB, schContactosClient_Intf, uEtiquetasContactosReportController, - uIEditorElegirClientes, uIEditorElegirDireccionEntrega, uEditorGridBase, + uIEditorElegirClientes, uIEditorElegirDireccion, uEditorGridBase, Dialogs; { TClientesController } @@ -128,11 +128,11 @@ end; function TClientesController.ElegirDireccionEntrega(ADirecciones: IBizDireccionesContacto; AMensaje: String): IBizDireccionesContacto; var - AEditor : IEditorElegirDireccionEntrega; + AEditor : IEditorElegirDireccion; begin Result := NIL; - CreateEditor('EditorElegirDireccionEntrega', IEditorElegirDireccionEntrega, AEditor); + CreateEditor('EditorElegirDireccion', IEditorElegirDireccion, AEditor); try with AEditor do begin diff --git a/Source/Modulos/Contactos/Controller/uContactosController.pas b/Source/Modulos/Contactos/Controller/uContactosController.pas index 418b36b1..82d44e78 100644 --- a/Source/Modulos/Contactos/Controller/uContactosController.pas +++ b/Source/Modulos/Contactos/Controller/uContactosController.pas @@ -5,7 +5,8 @@ interface uses Windows, Forms, Classes, Controls, Contnrs, SysUtils, uDADataTable, - uBizContactos, uBizContactosDatosBancarios, uIDataModuleContactos; + uBizContactos, uBizContactosDatosBancarios, uIDataModuleContactos, + uBizDireccionesContacto, uDireccionesContactoController; type IContactosController = interface @@ -28,6 +29,7 @@ type function ExtraerSeleccionados(AContactos: IBizContacto) : IBizContacto; procedure SetID_Tienda (AContacto: IBizContacto; const ID_Tienda: Integer); + function ElegirDireccion(AContacto: IBizContacto; AMensaje: String): IBizDireccionesContacto; end; TContactosController = class(TInterfacedObject, IContactosController) @@ -59,13 +61,14 @@ type function ElegirContacto(AContactos : IBizContacto; AMensaje: String; AMultiSelect: Boolean): IBizContacto; virtual; abstract; procedure SetID_Tienda (AContacto: IBizContacto; const ID_Tienda: Integer); + function ElegirDireccion(AContacto: IBizContacto; AMensaje: String): IBizDireccionesContacto; end; implementation uses Dialogs, uEditorRegistryUtils, cxControls, DB, uDAInterfaces, uDataTableUtils, - schContactosClient_Intf, uFactuGES_App, Variants; + schContactosClient_Intf, uFactuGES_App, Variants, JSDialogs, JSDialog; { TContactosController } @@ -126,6 +129,56 @@ begin inherited; end; +function TContactosController.ElegirDireccion(AContacto: IBizContacto; AMensaje: String): IBizDireccionesContacto; +var + JsDialog: TJSDialog; + Respuesta: Integer; + +begin + Result := NIL; + JsDialog := TJSDialog.Create(nil); + try + JsDialog.Content.Add(AMensaje); + JsDialog.Instruction.Text := 'Elija una direci'#243'n...'; + JsDialog.DialogOptions := [doCommandLinks, doModal]; + JsDialog.ButtonBar.Buttons := [cbOk]; + JsDialog.Width := 600; + + //Añadimos la direccion principal del contacto + with JsDialog.CustomButtons.Add do + begin + Caption := AContacto.NOMBRE + ' ' + AContacto.NIF_CIF; + Info.Add(AContacto.CALLE); + Info.Add(AContacto.CODIGO_POSTAL + ' ' + AContacto.POBLACION + ' ' + AContacto.PROVINCIA); + Value := -1; + Default := True; + end; + + //Añadimos el resto de direcciones + AContacto.Direcciones.Datatable.First; + while not AContacto.Direcciones.Datatable.eof do + begin + with JsDialog.CustomButtons.Add do + begin + Caption := AContacto.Direcciones.NOMBRE + ' ' + AContacto.Direcciones.NIF_CIF; + Info.Add(AContacto.Direcciones.CALLE); + Info.Add(AContacto.Direcciones.CODIGO_POSTAL + ' ' + AContacto.Direcciones.POBLACION + ' ' + AContacto.Direcciones.PROVINCIA); + Value := AContacto.Direcciones.ID; + end; + AContacto.Direcciones.DataTable.Next; + end; + AContacto.Direcciones.DataTable.First; + + if JsDialog.Execute <> IDCANCEL then + if JsDialog.CustomButtonResult > 0 then + if AContacto.Direcciones.DataTable.Locate(fld_DireccionesContactoID, JsDialog.CustomButtonResult, []) then + Result := AContacto.Direcciones; + + finally + JsDialog := NIL; + end; +end; + function TContactosController.Eliminar(AContacto: IBizContacto): Boolean; begin Result := False; diff --git a/Source/Modulos/Contactos/Controller/uProveedoresController.pas b/Source/Modulos/Contactos/Controller/uProveedoresController.pas index e5df0fc0..790387f6 100644 --- a/Source/Modulos/Contactos/Controller/uProveedoresController.pas +++ b/Source/Modulos/Contactos/Controller/uProveedoresController.pas @@ -11,7 +11,6 @@ type IProveedoresController = interface(IContactosController) ['{50F10D01-5120-470D-A61D-99FE8A76DF93}'] function BuscarTodosTiendaWeb: IBizProveedor; - function ElegirDireccionEntrega(ADirecciones: IBizDireccionesContacto; AMensaje: String): IBizDireccionesContacto; function EsEliminable(AProveedor: IBizContacto): Boolean; function Eliminar(AProveedor: IBizContacto; AllItems: Boolean = false): Boolean; overload; procedure Preview(AProveedor : IBizProveedor; AllItems: Boolean = false); @@ -32,13 +31,11 @@ type function BuscarTodos: IBizContacto; override; function BuscarTodosTiendaWeb: IBizProveedor; function Nuevo : IBizContacto; override; - function Guardar(AContacto : IBizContacto): Boolean; override; + function Guardar(AContacto : IBizContacto): Boolean; override; procedure Ver(AContacto : IBizContacto); override; procedure VerTodos(AContactos: IBizContacto); override; function ElegirContacto(AContactos : IBizContacto; AMensaje: String; AMultiSelect: Boolean): IBizContacto; override; - function ElegirDireccionEntrega(ADirecciones: IBizDireccionesContacto; - AMensaje: String): IBizDireccionesContacto; function EsEliminable(AProveedor: IBizContacto): Boolean; function Eliminar(AProveedor: IBizContacto; AllItems: Boolean = false): Boolean; overload; procedure Preview(AProveedor : IBizProveedor; AllItems: Boolean = false); @@ -52,8 +49,8 @@ implementation uses Classes, SysUtils, cxControls, Dialogs, uDataModuleProveedores, uEditorRegistryUtils, uDataTableUtils, uDADataTable, DB, schContactosClient_Intf, uEtiquetasContactosReportController, - uIEditorElegirProveedores, Controls, uIEditorElegirDireccionEntrega, - uEditorGridBase; + uIEditorElegirProveedores, Controls, uIEditorElegirDireccion, + uEditorGridBase, JSDialogs, JSDialog, Windows; { TProveedoresController } @@ -114,30 +111,6 @@ begin end; end; -function TProveedoresController.ElegirDireccionEntrega(ADirecciones: IBizDireccionesContacto; - AMensaje: String): IBizDireccionesContacto; -var - AEditor : IEditorElegirDireccionEntrega; -begin - Result := NIL; - ShowHourglassCursor; - try - CreateEditor('EditorElegirDireccionEntrega', IEditorElegirDireccionEntrega, AEditor); - if Assigned(AEditor) then - with AEditor do - begin - Direccion := ADirecciones; - Mensaje := AMensaje; - if IsPositiveResult(ShowModal) then - Result := DireccionSeleccionada; - Release; - end; - finally - AEditor := NIL; - HideHourglassCursor; - end; -end; - function TProveedoresController.Eliminar(AProveedor: IBizContacto; AllItems: Boolean): Boolean; //En el caso de eliminar almenos un elemento del conjunto se devuelve true var diff --git a/Source/Modulos/Contactos/Data/uDataModuleClientes.dfm b/Source/Modulos/Contactos/Data/uDataModuleClientes.dfm index 6e18f45e..760a91f8 100644 --- a/Source/Modulos/Contactos/Data/uDataModuleClientes.dfm +++ b/Source/Modulos/Contactos/Data/uDataModuleClientes.dfm @@ -10,6 +10,117 @@ inherited DataModuleClientes: TDataModuleClientes inherited ds_Contactos: TDADataSource DataSet = tbl_Contactos.Dataset end + inherited tbl_DireccionesContacto: TDAMemDataTable + Fields = < + item + Name = 'ID' + DataType = datAutoInc + GeneratorName = 'GEN_CONTACTOS_DIR_ID' + ServerAutoRefresh = True + DictionaryEntry = 'DireccionesContacto_ID' + InPrimaryKey = True + end + item + Name = 'ID_CONTACTO' + DataType = datInteger + DictionaryEntry = 'DireccionesContacto_ID_CONTACTO' + end + item + Name = 'NIF_CIF' + DataType = datString + Size = 15 + end + item + Name = 'CALLE' + DataType = datString + Size = 255 + DisplayLabel = 'Calle' + DictionaryEntry = 'DireccionesContacto_CALLE' + end + item + Name = 'POBLACION' + DataType = datString + Size = 255 + DisplayLabel = 'Poblaci'#243'n' + DictionaryEntry = 'DireccionesContacto_POBLACION' + end + item + Name = 'PROVINCIA' + DataType = datString + Size = 255 + DisplayLabel = 'Provincia' + DictionaryEntry = 'DireccionesContacto_PROVINCIA' + end + item + Name = 'CODIGO_POSTAL' + DataType = datString + Size = 10 + DisplayLabel = 'C'#243'digo postal' + DictionaryEntry = 'DireccionesContacto_CODIGO_POSTAL' + end + item + Name = 'PERSONA_CONTACTO' + DataType = datString + Size = 255 + DisplayLabel = 'Persona de contacto' + DictionaryEntry = 'DireccionesContacto_PERSONA_CONTACTO' + end + item + Name = 'NOMBRE' + DataType = datString + Size = 255 + DisplayLabel = 'DireccionesContacto_NOMBRE' + DictionaryEntry = 'DireccionesContacto_NOMBRE' + end + item + Name = 'TELEFONO' + DataType = datString + Size = 25 + DisplayLabel = 'Tel'#233'fono' + DictionaryEntry = 'DireccionesContacto_TELEFONO' + end + item + Name = 'MOVIL' + DataType = datString + Size = 25 + DisplayLabel = 'M'#243'vil' + DictionaryEntry = 'Contactos_MOVIL_1' + end + item + Name = 'FAX' + DataType = datString + Size = 25 + DisplayLabel = 'Fax' + DictionaryEntry = 'Contactos_FAX' + end + item + Name = 'EMAIL' + DataType = datString + Size = 255 + DisplayLabel = 'E-mail' + DictionaryEntry = 'DireccionesContacto_EMAIL' + end + item + Name = 'NOTAS' + DataType = datMemo + DisplayLabel = 'Notas' + DictionaryEntry = 'DireccionesContacto_NOTAS' + end + item + Name = 'PORTE' + DataType = datFloat + DisplayLabel = 'Coste del porte' + DictionaryEntry = 'DireccionesContacto_PORTE' + end + item + Name = 'FECHA_ALTA' + DataType = datDateTime + end + item + Name = 'FECHA_MODIFICACION' + DataType = datDateTime + end> + end inherited ds_DireccionesContacto: TDADataSource DataSet = tbl_DireccionesContacto.Dataset end diff --git a/Source/Modulos/Contactos/Data/uDataModuleProveedores.dfm b/Source/Modulos/Contactos/Data/uDataModuleProveedores.dfm index 7cc3c57c..847e3b50 100644 --- a/Source/Modulos/Contactos/Data/uDataModuleProveedores.dfm +++ b/Source/Modulos/Contactos/Data/uDataModuleProveedores.dfm @@ -4,6 +4,117 @@ inherited DataModuleProveedores: TDataModuleProveedores inherited ds_Contactos: TDADataSource DataSet = tbl_Contactos.Dataset end + inherited tbl_DireccionesContacto: TDAMemDataTable + Fields = < + item + Name = 'ID' + DataType = datAutoInc + GeneratorName = 'GEN_CONTACTOS_DIR_ID' + ServerAutoRefresh = True + DictionaryEntry = 'DireccionesContacto_ID' + InPrimaryKey = True + end + item + Name = 'ID_CONTACTO' + DataType = datInteger + DictionaryEntry = 'DireccionesContacto_ID_CONTACTO' + end + item + Name = 'NIF_CIF' + DataType = datString + Size = 15 + end + item + Name = 'CALLE' + DataType = datString + Size = 255 + DisplayLabel = 'Calle' + DictionaryEntry = 'DireccionesContacto_CALLE' + end + item + Name = 'POBLACION' + DataType = datString + Size = 255 + DisplayLabel = 'Poblaci'#243'n' + DictionaryEntry = 'DireccionesContacto_POBLACION' + end + item + Name = 'PROVINCIA' + DataType = datString + Size = 255 + DisplayLabel = 'Provincia' + DictionaryEntry = 'DireccionesContacto_PROVINCIA' + end + item + Name = 'CODIGO_POSTAL' + DataType = datString + Size = 10 + DisplayLabel = 'C'#243'digo postal' + DictionaryEntry = 'DireccionesContacto_CODIGO_POSTAL' + end + item + Name = 'PERSONA_CONTACTO' + DataType = datString + Size = 255 + DisplayLabel = 'Persona de contacto' + DictionaryEntry = 'DireccionesContacto_PERSONA_CONTACTO' + end + item + Name = 'NOMBRE' + DataType = datString + Size = 255 + DisplayLabel = 'DireccionesContacto_NOMBRE' + DictionaryEntry = 'DireccionesContacto_NOMBRE' + end + item + Name = 'TELEFONO' + DataType = datString + Size = 25 + DisplayLabel = 'Tel'#233'fono' + DictionaryEntry = 'DireccionesContacto_TELEFONO' + end + item + Name = 'MOVIL' + DataType = datString + Size = 25 + DisplayLabel = 'M'#243'vil' + DictionaryEntry = 'Contactos_MOVIL_1' + end + item + Name = 'FAX' + DataType = datString + Size = 25 + DisplayLabel = 'Fax' + DictionaryEntry = 'Contactos_FAX' + end + item + Name = 'EMAIL' + DataType = datString + Size = 255 + DisplayLabel = 'E-mail' + DictionaryEntry = 'DireccionesContacto_EMAIL' + end + item + Name = 'NOTAS' + DataType = datMemo + DisplayLabel = 'Notas' + DictionaryEntry = 'DireccionesContacto_NOTAS' + end + item + Name = 'PORTE' + DataType = datFloat + DisplayLabel = 'Coste del porte' + DictionaryEntry = 'DireccionesContacto_PORTE' + end + item + Name = 'FECHA_ALTA' + DataType = datDateTime + end + item + Name = 'FECHA_MODIFICACION' + DataType = datDateTime + end> + end inherited ds_DireccionesContacto: TDADataSource DataSet = tbl_DireccionesContacto.Dataset end @@ -290,6 +401,11 @@ inherited DataModuleProveedores: TDataModuleProveedores item Name = 'TIENE_SUBCUENTA' DataType = datInteger + end + item + Name = 'NOMBRE_COMERCIAL' + DataType = datString + Size = 255 end> Params = <> StreamingOptions = [soDisableEventsWhileStreaming] diff --git a/Source/Modulos/Contactos/Model/schContactosClient_Intf.pas b/Source/Modulos/Contactos/Model/schContactosClient_Intf.pas index 7d581f11..fe9c34b8 100644 --- a/Source/Modulos/Contactos/Model/schContactosClient_Intf.pas +++ b/Source/Modulos/Contactos/Model/schContactosClient_Intf.pas @@ -3,25 +3,25 @@ unit schContactosClient_Intf; interface uses - Classes, DB, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf; + Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf; 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_SubCuentasContacto = '{77E2D0D2-685D-460C-8A5C-B58184819D7B}'; - RID_Contactos = '{059BCFE8-30A4-4BC4-974F-1E240A1F3379}'; - RID_GruposCliente = '{758F5D19-8076-45D9-BB2B-D79D45FFC272}'; - RID_DatosBancarios = '{CC510C73-A596-4F19-8B13-E0809A7EE519}'; - RID_Clientes = '{41895E3B-E13F-4890-9961-CFCF04CAC5D4}'; - RID_Proveedores = '{3BD8FE29-DA71-4E2B-BA0B-4F8CCF53C66C}'; - RID_Empleados = '{10A30112-8DAC-4EED-AFD9-AABC573A83B2}'; - RID_DireccionesContacto = '{3AB78171-440E-4F68-AEF8-F877AB0134DE}'; - RID_ClientesDescuentos = '{0FA9A43D-7A43-4D44-A4CF-24C55D2F3601}'; - RID_ProcedenciasCliente = '{388B32E1-0819-4CF1-B551-6EAF5CDA6CD8}'; - RID_GruposProveedor = '{23CFD460-23AC-473C-A97C-EF9D1E2EE6F4}'; - RID_GruposEmpleado = '{72AB9D68-2DBB-4777-BFE8-CB567B31D695}'; - RID_Contactos_Refresh = '{492FC030-1BEA-4AE1-A00B-0DC1E3DBF855}'; + RID_SubCuentasContacto = '{A665876F-88B1-480D-B671-45BF9CE0354E}'; + RID_Contactos = '{DBF3555C-25B6-4111-B564-08223B7DEDFF}'; + RID_GruposCliente = '{B8A3C655-7B91-441C-A02D-56D6F4515A73}'; + RID_DatosBancarios = '{95A679A6-2656-43A4-AD76-B221555120D1}'; + RID_Clientes = '{B0C7F62A-2118-4C8E-A088-399FB5F4172A}'; + RID_Proveedores = '{905725EC-B1B7-4EEE-878E-5298DA5A4651}'; + RID_Empleados = '{CC3BA198-8F62-4919-9635-F6B9A76A6944}'; + RID_DireccionesContacto = '{25680D30-D90A-4CF6-AF42-3A6607831C93}'; + RID_ClientesDescuentos = '{760ADCE2-83B9-47D1-ADBE-79EBD056D223}'; + RID_ProcedenciasCliente = '{AF653A27-737C-46A1-ADAC-34A2572D34C6}'; + RID_GruposProveedor = '{C9B66220-03F7-4D77-B00D-8ADBC3C50FED}'; + RID_GruposEmpleado = '{E3EAF37B-5015-4CAD-930B-D54819909607}'; + RID_Contactos_Refresh = '{E9F852B8-287F-4A82-92EC-0E1BF028802D}'; { Data table names } nme_SubCuentasContacto = 'SubCuentasContacto'; @@ -258,6 +258,7 @@ const fld_ProveedoresCERTIFICACION = 'CERTIFICACION'; fld_ProveedoresIGNORAR_CONTABILIDAD = 'IGNORAR_CONTABILIDAD'; fld_ProveedoresTIENE_SUBCUENTA = 'TIENE_SUBCUENTA'; + fld_ProveedoresNOMBRE_COMERCIAL = 'NOMBRE_COMERCIAL'; { Proveedores field indexes } idx_ProveedoresID = 0; @@ -297,6 +298,7 @@ const idx_ProveedoresCERTIFICACION = 34; idx_ProveedoresIGNORAR_CONTABILIDAD = 35; idx_ProveedoresTIENE_SUBCUENTA = 36; + idx_ProveedoresNOMBRE_COMERCIAL = 37; { Empleados fields } fld_EmpleadosID = 'ID'; @@ -371,6 +373,7 @@ const { DireccionesContacto fields } fld_DireccionesContactoID = 'ID'; fld_DireccionesContactoID_CONTACTO = 'ID_CONTACTO'; + fld_DireccionesContactoNIF_CIF = 'NIF_CIF'; fld_DireccionesContactoCALLE = 'CALLE'; fld_DireccionesContactoPOBLACION = 'POBLACION'; fld_DireccionesContactoPROVINCIA = 'PROVINCIA'; @@ -389,20 +392,21 @@ const { DireccionesContacto field indexes } idx_DireccionesContactoID = 0; idx_DireccionesContactoID_CONTACTO = 1; - idx_DireccionesContactoCALLE = 2; - idx_DireccionesContactoPOBLACION = 3; - idx_DireccionesContactoPROVINCIA = 4; - idx_DireccionesContactoCODIGO_POSTAL = 5; - idx_DireccionesContactoPERSONA_CONTACTO = 6; - idx_DireccionesContactoNOMBRE = 7; - idx_DireccionesContactoTELEFONO = 8; - idx_DireccionesContactoMOVIL = 9; - idx_DireccionesContactoFAX = 10; - idx_DireccionesContactoEMAIL = 11; - idx_DireccionesContactoNOTAS = 12; - idx_DireccionesContactoPORTE = 13; - idx_DireccionesContactoFECHA_ALTA = 14; - idx_DireccionesContactoFECHA_MODIFICACION = 15; + idx_DireccionesContactoNIF_CIF = 2; + idx_DireccionesContactoCALLE = 3; + idx_DireccionesContactoPOBLACION = 4; + idx_DireccionesContactoPROVINCIA = 5; + idx_DireccionesContactoCODIGO_POSTAL = 6; + idx_DireccionesContactoPERSONA_CONTACTO = 7; + idx_DireccionesContactoNOMBRE = 8; + idx_DireccionesContactoTELEFONO = 9; + idx_DireccionesContactoMOVIL = 10; + idx_DireccionesContactoFAX = 11; + idx_DireccionesContactoEMAIL = 12; + idx_DireccionesContactoNOTAS = 13; + idx_DireccionesContactoPORTE = 14; + idx_DireccionesContactoFECHA_ALTA = 15; + idx_DireccionesContactoFECHA_MODIFICACION = 16; { ClientesDescuentos fields } fld_ClientesDescuentosID = 'ID'; @@ -491,7 +495,7 @@ const type { ISubCuentasContacto } ISubCuentasContacto = interface(IDAStronglyTypedDataTable) - ['{180C71AC-D602-4871-B0B5-30DB9A6F0D3D}'] + ['{A265AC9F-4CE6-4C65-9B80-55A01FAD8DE7}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -535,7 +539,7 @@ type end; { TSubCuentasContactoDataTableRules } - TSubCuentasContactoDataTableRules = class(TDADataTableRules, ISubCuentasContacto) + TSubCuentasContactoDataTableRules = class(TIntfObjectDADataTableRules, ISubCuentasContacto) private protected { Property getters and setters } @@ -586,7 +590,7 @@ type { IContactos } IContactos = interface(IDAStronglyTypedDataTable) - ['{517A8780-E06E-4C96-B076-F9975F834557}'] + ['{B82C612C-9B19-47AC-A153-33F40F1F966C}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -743,7 +747,7 @@ type end; { TContactosDataTableRules } - TContactosDataTableRules = class(TDADataTableRules, IContactos) + TContactosDataTableRules = class(TIntfObjectDADataTableRules, IContactos) private f_NOTAS: IROStrings; procedure NOTAS_OnChange(Sender: TObject); @@ -909,7 +913,7 @@ type { IGruposCliente } IGruposCliente = interface(IDAStronglyTypedDataTable) - ['{DF6B0030-F21D-462F-BAA1-765346227096}'] + ['{F20A31CD-092A-4808-8E35-91F913A0404B}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -929,7 +933,7 @@ type end; { TGruposClienteDataTableRules } - TGruposClienteDataTableRules = class(TDADataTableRules, IGruposCliente) + TGruposClienteDataTableRules = class(TIntfObjectDADataTableRules, IGruposCliente) private protected { Property getters and setters } @@ -956,7 +960,7 @@ type { IDatosBancarios } IDatosBancarios = interface(IDAStronglyTypedDataTable) - ['{71AD9AE5-15E3-4510-920F-C9DCA24935C3}'] + ['{F7E3B1A8-464E-441D-96F9-2A8ABBAB189F}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1018,7 +1022,7 @@ type end; { TDatosBancariosDataTableRules } - TDatosBancariosDataTableRules = class(TDADataTableRules, IDatosBancarios) + TDatosBancariosDataTableRules = class(TIntfObjectDADataTableRules, IDatosBancarios) private protected { Property getters and setters } @@ -1087,7 +1091,7 @@ type { IClientes } IClientes = interface(IDAStronglyTypedDataTable) - ['{D314D401-AE3E-4242-ADBA-7879822029DC}'] + ['{267B0187-B441-4FC0-BDF7-8E14D73A9112}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1328,7 +1332,7 @@ type end; { TClientesDataTableRules } - TClientesDataTableRules = class(TDADataTableRules, IClientes) + TClientesDataTableRules = class(TIntfObjectDADataTableRules, IClientes) private f_NOTAS: IROStrings; procedure NOTAS_OnChange(Sender: TObject); @@ -1578,7 +1582,7 @@ type { IProveedores } IProveedores = interface(IDAStronglyTypedDataTable) - ['{17E80FD0-91B4-4D1C-95ED-3D5C4B42578A}'] + ['{80234880-B682-4597-90DF-CDD58C95F600}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1727,6 +1731,10 @@ type procedure SetTIENE_SUBCUENTAValue(const aValue: Integer); function GetTIENE_SUBCUENTAIsNull: Boolean; procedure SetTIENE_SUBCUENTAIsNull(const aValue: Boolean); + function GetNOMBRE_COMERCIALValue: String; + procedure SetNOMBRE_COMERCIALValue(const aValue: String); + function GetNOMBRE_COMERCIALIsNull: Boolean; + procedure SetNOMBRE_COMERCIALIsNull(const aValue: Boolean); { Properties } @@ -1804,10 +1812,12 @@ type property IGNORAR_CONTABILIDADIsNull: Boolean read GetIGNORAR_CONTABILIDADIsNull write SetIGNORAR_CONTABILIDADIsNull; property TIENE_SUBCUENTA: Integer read GetTIENE_SUBCUENTAValue write SetTIENE_SUBCUENTAValue; property TIENE_SUBCUENTAIsNull: Boolean read GetTIENE_SUBCUENTAIsNull write SetTIENE_SUBCUENTAIsNull; + property NOMBRE_COMERCIAL: String read GetNOMBRE_COMERCIALValue write SetNOMBRE_COMERCIALValue; + property NOMBRE_COMERCIALIsNull: Boolean read GetNOMBRE_COMERCIALIsNull write SetNOMBRE_COMERCIALIsNull; end; { TProveedoresDataTableRules } - TProveedoresDataTableRules = class(TDADataTableRules, IProveedores) + TProveedoresDataTableRules = class(TIntfObjectDADataTableRules, IProveedores) private f_NOTAS: IROStrings; procedure NOTAS_OnChange(Sender: TObject); @@ -1960,6 +1970,10 @@ type procedure SetTIENE_SUBCUENTAValue(const aValue: Integer); virtual; function GetTIENE_SUBCUENTAIsNull: Boolean; virtual; procedure SetTIENE_SUBCUENTAIsNull(const aValue: Boolean); virtual; + function GetNOMBRE_COMERCIALValue: String; virtual; + procedure SetNOMBRE_COMERCIALValue(const aValue: String); virtual; + function GetNOMBRE_COMERCIALIsNull: Boolean; virtual; + procedure SetNOMBRE_COMERCIALIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; @@ -2036,6 +2050,8 @@ type property IGNORAR_CONTABILIDADIsNull: Boolean read GetIGNORAR_CONTABILIDADIsNull write SetIGNORAR_CONTABILIDADIsNull; property TIENE_SUBCUENTA: Integer read GetTIENE_SUBCUENTAValue write SetTIENE_SUBCUENTAValue; property TIENE_SUBCUENTAIsNull: Boolean read GetTIENE_SUBCUENTAIsNull write SetTIENE_SUBCUENTAIsNull; + property NOMBRE_COMERCIAL: String read GetNOMBRE_COMERCIALValue write SetNOMBRE_COMERCIALValue; + property NOMBRE_COMERCIALIsNull: Boolean read GetNOMBRE_COMERCIALIsNull write SetNOMBRE_COMERCIALIsNull; public constructor Create(aDataTable: TDADataTable); override; @@ -2045,7 +2061,7 @@ type { IEmpleados } IEmpleados = interface(IDAStronglyTypedDataTable) - ['{4AC6F410-2F75-4947-8321-5363F1418AA2}'] + ['{0675CA38-A22F-410D-B6C8-8A3C41629E91}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2246,7 +2262,7 @@ type end; { TEmpleadosDataTableRules } - TEmpleadosDataTableRules = class(TDADataTableRules, IEmpleados) + TEmpleadosDataTableRules = class(TIntfObjectDADataTableRules, IEmpleados) private f_NOTAS: IROStrings; f_FORMACION_BASE: IROStrings; @@ -2464,7 +2480,7 @@ type { IDireccionesContacto } IDireccionesContacto = interface(IDAStronglyTypedDataTable) - ['{0BEB43AD-BE78-4F2E-B45C-8E6AE76A186A}'] + ['{BBD6E216-B44C-4757-837E-2C63DBAB1B87}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2474,6 +2490,10 @@ type procedure SetID_CONTACTOValue(const aValue: Integer); function GetID_CONTACTOIsNull: Boolean; procedure SetID_CONTACTOIsNull(const aValue: Boolean); + function GetNIF_CIFValue: String; + procedure SetNIF_CIFValue(const aValue: String); + function GetNIF_CIFIsNull: Boolean; + procedure SetNIF_CIFIsNull(const aValue: Boolean); function GetCALLEValue: String; procedure SetCALLEValue(const aValue: String); function GetCALLEIsNull: Boolean; @@ -2536,6 +2556,8 @@ type property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; property ID_CONTACTO: Integer read GetID_CONTACTOValue write SetID_CONTACTOValue; property ID_CONTACTOIsNull: Boolean read GetID_CONTACTOIsNull write SetID_CONTACTOIsNull; + property NIF_CIF: String read GetNIF_CIFValue write SetNIF_CIFValue; + property NIF_CIFIsNull: Boolean read GetNIF_CIFIsNull write SetNIF_CIFIsNull; property CALLE: String read GetCALLEValue write SetCALLEValue; property CALLEIsNull: Boolean read GetCALLEIsNull write SetCALLEIsNull; property POBLACION: String read GetPOBLACIONValue write SetPOBLACIONValue; @@ -2567,7 +2589,7 @@ type end; { TDireccionesContactoDataTableRules } - TDireccionesContactoDataTableRules = class(TDADataTableRules, IDireccionesContacto) + TDireccionesContactoDataTableRules = class(TIntfObjectDADataTableRules, IDireccionesContacto) private f_NOTAS: IROStrings; procedure NOTAS_OnChange(Sender: TObject); @@ -2581,6 +2603,10 @@ type procedure SetID_CONTACTOValue(const aValue: Integer); virtual; function GetID_CONTACTOIsNull: Boolean; virtual; procedure SetID_CONTACTOIsNull(const aValue: Boolean); virtual; + function GetNIF_CIFValue: String; virtual; + procedure SetNIF_CIFValue(const aValue: String); virtual; + function GetNIF_CIFIsNull: Boolean; virtual; + procedure SetNIF_CIFIsNull(const aValue: Boolean); virtual; function GetCALLEValue: String; virtual; procedure SetCALLEValue(const aValue: String); virtual; function GetCALLEIsNull: Boolean; virtual; @@ -2642,6 +2668,8 @@ type property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; property ID_CONTACTO: Integer read GetID_CONTACTOValue write SetID_CONTACTOValue; property ID_CONTACTOIsNull: Boolean read GetID_CONTACTOIsNull write SetID_CONTACTOIsNull; + property NIF_CIF: String read GetNIF_CIFValue write SetNIF_CIFValue; + property NIF_CIFIsNull: Boolean read GetNIF_CIFIsNull write SetNIF_CIFIsNull; property CALLE: String read GetCALLEValue write SetCALLEValue; property CALLEIsNull: Boolean read GetCALLEIsNull write SetCALLEIsNull; property POBLACION: String read GetPOBLACIONValue write SetPOBLACIONValue; @@ -2679,7 +2707,7 @@ type { IClientesDescuentos } IClientesDescuentos = interface(IDAStronglyTypedDataTable) - ['{9323A474-DBCB-4050-A1F4-229966D7A848}'] + ['{92A3F3B0-C9C4-4D4D-A311-93FDDA3C6C0D}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2717,7 +2745,7 @@ type end; { TClientesDescuentosDataTableRules } - TClientesDescuentosDataTableRules = class(TDADataTableRules, IClientesDescuentos) + TClientesDescuentosDataTableRules = class(TIntfObjectDADataTableRules, IClientesDescuentos) private protected { Property getters and setters } @@ -2762,7 +2790,7 @@ type { IProcedenciasCliente } IProcedenciasCliente = interface(IDAStronglyTypedDataTable) - ['{459BF966-D8AA-44F0-B23A-704860B7AC98}'] + ['{52E73E0C-71AE-443B-86D2-9F0DC0D5FDF7}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2782,7 +2810,7 @@ type end; { TProcedenciasClienteDataTableRules } - TProcedenciasClienteDataTableRules = class(TDADataTableRules, IProcedenciasCliente) + TProcedenciasClienteDataTableRules = class(TIntfObjectDADataTableRules, IProcedenciasCliente) private protected { Property getters and setters } @@ -2809,7 +2837,7 @@ type { IGruposProveedor } IGruposProveedor = interface(IDAStronglyTypedDataTable) - ['{0A10C9D3-D291-47D7-8BE5-15F1178704AB}'] + ['{94B8A3A8-8683-43DA-B13A-1E0DBF3901C4}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2829,7 +2857,7 @@ type end; { TGruposProveedorDataTableRules } - TGruposProveedorDataTableRules = class(TDADataTableRules, IGruposProveedor) + TGruposProveedorDataTableRules = class(TIntfObjectDADataTableRules, IGruposProveedor) private protected { Property getters and setters } @@ -2856,7 +2884,7 @@ type { IGruposEmpleado } IGruposEmpleado = interface(IDAStronglyTypedDataTable) - ['{ADFE0D54-EBBB-444A-9830-D5E39AED2058}'] + ['{B3995733-40B5-4A77-B050-2722DEDEF5E8}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2876,7 +2904,7 @@ type end; { TGruposEmpleadoDataTableRules } - TGruposEmpleadoDataTableRules = class(TDADataTableRules, IGruposEmpleado) + TGruposEmpleadoDataTableRules = class(TIntfObjectDADataTableRules, IGruposEmpleado) private protected { Property getters and setters } @@ -2903,7 +2931,7 @@ type { IContactos_Refresh } IContactos_Refresh = interface(IDAStronglyTypedDataTable) - ['{9355FABF-5007-43F5-BB00-9F0C43DA7FD2}'] + ['{60A8DD40-4B90-40FA-A22C-2FFF67737F64}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -3036,7 +3064,7 @@ type end; { TContactos_RefreshDataTableRules } - TContactos_RefreshDataTableRules = class(TDADataTableRules, IContactos_Refresh) + TContactos_RefreshDataTableRules = class(TIntfObjectDADataTableRules, IContactos_Refresh) private f_NOTAS: IROStrings; procedure NOTAS_OnChange(Sender: TObject); @@ -5750,6 +5778,27 @@ begin DataTable.Fields[idx_ProveedoresTIENE_SUBCUENTA].AsVariant := Null; end; +function TProveedoresDataTableRules.GetNOMBRE_COMERCIALValue: String; +begin + result := DataTable.Fields[idx_ProveedoresNOMBRE_COMERCIAL].AsString; +end; + +procedure TProveedoresDataTableRules.SetNOMBRE_COMERCIALValue(const aValue: String); +begin + DataTable.Fields[idx_ProveedoresNOMBRE_COMERCIAL].AsString := aValue; +end; + +function TProveedoresDataTableRules.GetNOMBRE_COMERCIALIsNull: boolean; +begin + result := DataTable.Fields[idx_ProveedoresNOMBRE_COMERCIAL].IsNull; +end; + +procedure TProveedoresDataTableRules.SetNOMBRE_COMERCIALIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_ProveedoresNOMBRE_COMERCIAL].AsVariant := Null; +end; + { TEmpleadosDataTableRules } constructor TEmpleadosDataTableRules.Create(aDataTable: TDADataTable); @@ -6547,6 +6596,27 @@ begin DataTable.Fields[idx_DireccionesContactoID_CONTACTO].AsVariant := Null; end; +function TDireccionesContactoDataTableRules.GetNIF_CIFValue: String; +begin + result := DataTable.Fields[idx_DireccionesContactoNIF_CIF].AsString; +end; + +procedure TDireccionesContactoDataTableRules.SetNIF_CIFValue(const aValue: String); +begin + DataTable.Fields[idx_DireccionesContactoNIF_CIF].AsString := aValue; +end; + +function TDireccionesContactoDataTableRules.GetNIF_CIFIsNull: boolean; +begin + result := DataTable.Fields[idx_DireccionesContactoNIF_CIF].IsNull; +end; + +procedure TDireccionesContactoDataTableRules.SetNIF_CIFIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_DireccionesContactoNIF_CIF].AsVariant := Null; +end; + function TDireccionesContactoDataTableRules.GetCALLEValue: String; begin result := DataTable.Fields[idx_DireccionesContactoCALLE].AsString; diff --git a/Source/Modulos/Contactos/Model/schContactosServer_Intf.pas b/Source/Modulos/Contactos/Model/schContactosServer_Intf.pas index b66c303a..c7002e1f 100644 --- a/Source/Modulos/Contactos/Model/schContactosServer_Intf.pas +++ b/Source/Modulos/Contactos/Model/schContactosServer_Intf.pas @@ -9,24 +9,24 @@ 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_SubCuentasContactoDelta = '{EE9317EA-5374-4D7D-B6CC-8684FE0D6B21}'; - RID_ContactosDelta = '{51070042-26A2-4A85-8719-F51520E40F38}'; - RID_GruposClienteDelta = '{965A879A-4E61-42F4-83FE-22FA07165FB5}'; - RID_DatosBancariosDelta = '{5BE9B897-D52F-4D7D-AFC9-A502CECEF42E}'; - RID_ClientesDelta = '{87DD5652-478A-4A00-BDAB-33B2C9B40099}'; - RID_ProveedoresDelta = '{B7F03045-3BE9-46AC-A0FB-8D4B288B925E}'; - RID_EmpleadosDelta = '{6B64608B-F25E-4210-B02F-87B0EA062378}'; - RID_DireccionesContactoDelta = '{2B40DFC8-5CAF-4D17-A0EC-7B6E4BB79ACE}'; - RID_ClientesDescuentosDelta = '{9028E6CB-E578-4BBA-BD93-7068CB6EEAF2}'; - RID_ProcedenciasClienteDelta = '{5179E843-F6F3-49F7-9979-6561FDA1C6DF}'; - RID_GruposProveedorDelta = '{BF5E7579-41AA-4BB5-B650-224E079D6344}'; - RID_GruposEmpleadoDelta = '{B5F70E42-EBC8-411A-9DAB-11BCA62B8E74}'; - RID_Contactos_RefreshDelta = '{AE4FA559-4983-41C6-82F3-39C023E9993D}'; + RID_SubCuentasContactoDelta = '{6520A6E9-3616-416C-BAF2-9F4B13AAF858}'; + RID_ContactosDelta = '{A2B38C37-E3AE-4E22-85F7-E76DE13652AB}'; + RID_GruposClienteDelta = '{67072B81-C667-4450-B8E8-9C42A3EE0E3C}'; + RID_DatosBancariosDelta = '{221A80E1-2A34-4D52-963B-4D8A6E8CB277}'; + RID_ClientesDelta = '{A4468099-7600-4411-A559-107949CA1601}'; + RID_ProveedoresDelta = '{0117BBC8-1EBE-40CA-9819-E5990B88B58C}'; + RID_EmpleadosDelta = '{E6D706EA-9D87-4656-BA13-EFEDD8224652}'; + RID_DireccionesContactoDelta = '{AA255A88-7186-42B2-A48E-5729B8789BFB}'; + RID_ClientesDescuentosDelta = '{B4309DDF-8679-46EC-9355-28E776C4AC89}'; + RID_ProcedenciasClienteDelta = '{A8BEF20C-78CE-47DE-8509-46E9442F07A2}'; + RID_GruposProveedorDelta = '{20FC55C8-45F0-46C4-ABCE-7B7B7F339F9A}'; + RID_GruposEmpleadoDelta = '{37AA7500-1C16-43A6-B55D-869846E760D3}'; + RID_Contactos_RefreshDelta = '{8150E144-7B4B-45AC-8DC6-B0879134E571}'; type { ISubCuentasContactoDelta } ISubCuentasContactoDelta = interface(ISubCuentasContacto) - ['{EE9317EA-5374-4D7D-B6CC-8684FE0D6B21}'] + ['{6520A6E9-3616-416C-BAF2-9F4B13AAF858}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldREF_SUBCUENTAValue : String; @@ -120,7 +120,7 @@ type { IContactosDelta } IContactosDelta = interface(IContactos) - ['{51070042-26A2-4A85-8719-F51520E40F38}'] + ['{A2B38C37-E3AE-4E22-85F7-E76DE13652AB}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CATEGORIAValue : Integer; @@ -443,7 +443,7 @@ type { IGruposClienteDelta } IGruposClienteDelta = interface(IGruposCliente) - ['{965A879A-4E61-42F4-83FE-22FA07165FB5}'] + ['{67072B81-C667-4450-B8E8-9C42A3EE0E3C}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -489,7 +489,7 @@ type { IDatosBancariosDelta } IDatosBancariosDelta = interface(IDatosBancarios) - ['{5BE9B897-D52F-4D7D-AFC9-A502CECEF42E}'] + ['{221A80E1-2A34-4D52-963B-4D8A6E8CB277}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CONTACTOValue : Integer; @@ -619,7 +619,7 @@ type { IClientesDelta } IClientesDelta = interface(IClientes) - ['{87DD5652-478A-4A00-BDAB-33B2C9B40099}'] + ['{A4468099-7600-4411-A559-107949CA1601}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CATEGORIAValue : Integer; @@ -1110,7 +1110,7 @@ type { IProveedoresDelta } IProveedoresDelta = interface(IProveedores) - ['{B7F03045-3BE9-46AC-A0FB-8D4B288B925E}'] + ['{0117BBC8-1EBE-40CA-9819-E5990B88B58C}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CATEGORIAValue : Integer; @@ -1149,6 +1149,7 @@ type function GetOldCERTIFICACIONValue : String; function GetOldIGNORAR_CONTABILIDADValue : Integer; function GetOldTIENE_SUBCUENTAValue : Integer; + function GetOldNOMBRE_COMERCIALValue : String; { Properties } property OldID : Integer read GetOldIDValue; @@ -1188,6 +1189,7 @@ type property OldCERTIFICACION : String read GetOldCERTIFICACIONValue; property OldIGNORAR_CONTABILIDAD : Integer read GetOldIGNORAR_CONTABILIDADValue; property OldTIENE_SUBCUENTA : Integer read GetOldTIENE_SUBCUENTAValue; + property OldNOMBRE_COMERCIAL : String read GetOldNOMBRE_COMERCIALValue; end; { TProveedoresBusinessProcessorRules } @@ -1418,6 +1420,12 @@ type function GetOldTIENE_SUBCUENTAIsNull: Boolean; virtual; procedure SetTIENE_SUBCUENTAValue(const aValue: Integer); virtual; procedure SetTIENE_SUBCUENTAIsNull(const aValue: Boolean); virtual; + function GetNOMBRE_COMERCIALValue: String; virtual; + function GetNOMBRE_COMERCIALIsNull: Boolean; virtual; + function GetOldNOMBRE_COMERCIALValue: String; virtual; + function GetOldNOMBRE_COMERCIALIsNull: Boolean; virtual; + procedure SetNOMBRE_COMERCIALValue(const aValue: String); virtual; + procedure SetNOMBRE_COMERCIALIsNull(const aValue: Boolean); virtual; { Properties } property ID : Integer read GetIDValue write SetIDValue; @@ -1568,6 +1576,10 @@ type property TIENE_SUBCUENTAIsNull : Boolean read GetTIENE_SUBCUENTAIsNull write SetTIENE_SUBCUENTAIsNull; property OldTIENE_SUBCUENTA : Integer read GetOldTIENE_SUBCUENTAValue; property OldTIENE_SUBCUENTAIsNull : Boolean read GetOldTIENE_SUBCUENTAIsNull; + property NOMBRE_COMERCIAL : String read GetNOMBRE_COMERCIALValue write SetNOMBRE_COMERCIALValue; + property NOMBRE_COMERCIALIsNull : Boolean read GetNOMBRE_COMERCIALIsNull write SetNOMBRE_COMERCIALIsNull; + property OldNOMBRE_COMERCIAL : String read GetOldNOMBRE_COMERCIALValue; + property OldNOMBRE_COMERCIALIsNull : Boolean read GetOldNOMBRE_COMERCIALIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; @@ -1577,7 +1589,7 @@ type { IEmpleadosDelta } IEmpleadosDelta = interface(IEmpleados) - ['{6B64608B-F25E-4210-B02F-87B0EA062378}'] + ['{E6D706EA-9D87-4656-BA13-EFEDD8224652}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CATEGORIAValue : Integer; @@ -2000,10 +2012,11 @@ type { IDireccionesContactoDelta } IDireccionesContactoDelta = interface(IDireccionesContacto) - ['{2B40DFC8-5CAF-4D17-A0EC-7B6E4BB79ACE}'] + ['{AA255A88-7186-42B2-A48E-5729B8789BFB}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CONTACTOValue : Integer; + function GetOldNIF_CIFValue : String; function GetOldCALLEValue : String; function GetOldPOBLACIONValue : String; function GetOldPROVINCIAValue : String; @@ -2022,6 +2035,7 @@ type { Properties } property OldID : Integer read GetOldIDValue; property OldID_CONTACTO : Integer read GetOldID_CONTACTOValue; + property OldNIF_CIF : String read GetOldNIF_CIFValue; property OldCALLE : String read GetOldCALLEValue; property OldPOBLACION : String read GetOldPOBLACIONValue; property OldPROVINCIA : String read GetOldPROVINCIAValue; @@ -2057,6 +2071,12 @@ type function GetOldID_CONTACTOIsNull: Boolean; virtual; procedure SetID_CONTACTOValue(const aValue: Integer); virtual; procedure SetID_CONTACTOIsNull(const aValue: Boolean); virtual; + function GetNIF_CIFValue: String; virtual; + function GetNIF_CIFIsNull: Boolean; virtual; + function GetOldNIF_CIFValue: String; virtual; + function GetOldNIF_CIFIsNull: Boolean; virtual; + procedure SetNIF_CIFValue(const aValue: String); virtual; + procedure SetNIF_CIFIsNull(const aValue: Boolean); virtual; function GetCALLEValue: String; virtual; function GetCALLEIsNull: Boolean; virtual; function GetOldCALLEValue: String; virtual; @@ -2150,6 +2170,10 @@ type property ID_CONTACTOIsNull : Boolean read GetID_CONTACTOIsNull write SetID_CONTACTOIsNull; property OldID_CONTACTO : Integer read GetOldID_CONTACTOValue; property OldID_CONTACTOIsNull : Boolean read GetOldID_CONTACTOIsNull; + property NIF_CIF : String read GetNIF_CIFValue write SetNIF_CIFValue; + property NIF_CIFIsNull : Boolean read GetNIF_CIFIsNull write SetNIF_CIFIsNull; + property OldNIF_CIF : String read GetOldNIF_CIFValue; + property OldNIF_CIFIsNull : Boolean read GetOldNIF_CIFIsNull; property CALLE : String read GetCALLEValue write SetCALLEValue; property CALLEIsNull : Boolean read GetCALLEIsNull write SetCALLEIsNull; property OldCALLE : String read GetOldCALLEValue; @@ -2215,7 +2239,7 @@ type { IClientesDescuentosDelta } IClientesDescuentosDelta = interface(IClientesDescuentos) - ['{9028E6CB-E578-4BBA-BD93-7068CB6EEAF2}'] + ['{B4309DDF-8679-46EC-9355-28E776C4AC89}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CLIENTEValue : Integer; @@ -2297,7 +2321,7 @@ type { IProcedenciasClienteDelta } IProcedenciasClienteDelta = interface(IProcedenciasCliente) - ['{5179E843-F6F3-49F7-9979-6561FDA1C6DF}'] + ['{A8BEF20C-78CE-47DE-8509-46E9442F07A2}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -2343,7 +2367,7 @@ type { IGruposProveedorDelta } IGruposProveedorDelta = interface(IGruposProveedor) - ['{BF5E7579-41AA-4BB5-B650-224E079D6344}'] + ['{20FC55C8-45F0-46C4-ABCE-7B7B7F339F9A}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -2389,7 +2413,7 @@ type { IGruposEmpleadoDelta } IGruposEmpleadoDelta = interface(IGruposEmpleado) - ['{B5F70E42-EBC8-411A-9DAB-11BCA62B8E74}'] + ['{37AA7500-1C16-43A6-B55D-869846E760D3}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -2435,7 +2459,7 @@ type { IContactos_RefreshDelta } IContactos_RefreshDelta = interface(IContactos_Refresh) - ['{AE4FA559-4983-41C6-82F3-39C023E9993D}'] + ['{8150E144-7B4B-45AC-8DC6-B0879134E571}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldNIF_CIFValue : String; @@ -6466,6 +6490,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresTIENE_SUBCUENTA] := Null; end; +function TProveedoresBusinessProcessorRules.GetNOMBRE_COMERCIALValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresNOMBRE_COMERCIAL]; +end; + +function TProveedoresBusinessProcessorRules.GetNOMBRE_COMERCIALIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresNOMBRE_COMERCIAL]); +end; + +function TProveedoresBusinessProcessorRules.GetOldNOMBRE_COMERCIALValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ProveedoresNOMBRE_COMERCIAL]; +end; + +function TProveedoresBusinessProcessorRules.GetOldNOMBRE_COMERCIALIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ProveedoresNOMBRE_COMERCIAL]); +end; + +procedure TProveedoresBusinessProcessorRules.SetNOMBRE_COMERCIALValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresNOMBRE_COMERCIAL] := aValue; +end; + +procedure TProveedoresBusinessProcessorRules.SetNOMBRE_COMERCIALIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresNOMBRE_COMERCIAL] := Null; +end; + { TEmpleadosBusinessProcessorRules } constructor TEmpleadosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); @@ -7618,6 +7673,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_DireccionesContactoID_CONTACTO] := Null; end; +function TDireccionesContactoBusinessProcessorRules.GetNIF_CIFValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_DireccionesContactoNIF_CIF]; +end; + +function TDireccionesContactoBusinessProcessorRules.GetNIF_CIFIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DireccionesContactoNIF_CIF]); +end; + +function TDireccionesContactoBusinessProcessorRules.GetOldNIF_CIFValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_DireccionesContactoNIF_CIF]; +end; + +function TDireccionesContactoBusinessProcessorRules.GetOldNIF_CIFIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DireccionesContactoNIF_CIF]); +end; + +procedure TDireccionesContactoBusinessProcessorRules.SetNIF_CIFValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_DireccionesContactoNIF_CIF] := aValue; +end; + +procedure TDireccionesContactoBusinessProcessorRules.SetNIF_CIFIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_DireccionesContactoNIF_CIF] := Null; +end; + function TDireccionesContactoBusinessProcessorRules.GetCALLEValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_DireccionesContactoCALLE]; diff --git a/Source/Modulos/Contactos/Model/uBizProveedoresServer.pas b/Source/Modulos/Contactos/Model/uBizProveedoresServer.pas index dfdaa8ac..5f1b5f3a 100644 --- a/Source/Modulos/Contactos/Model/uBizProveedoresServer.pas +++ b/Source/Modulos/Contactos/Model/uBizProveedoresServer.pas @@ -152,6 +152,7 @@ begin ParamByName('GRUPO_PROVEEDOR').Value := aChange.NewValueByName[fld_ProveedoresGRUPO_PROVEEDOR]; ParamByName('IGNORAR_CONTABILIDAD').Value := aChange.NewValueByName[fld_ProveedoresIGNORAR_CONTABILIDAD]; ParamByName('TIENE_SUBCUENTA').Value := aChange.NewValueByName[fld_ProveedoresTIENE_SUBCUENTA]; + ParamByName('NOMBRE_COMERCIAL').Value := aChange.NewValueByName[fld_ProveedoresNOMBRE_COMERCIAL]; Execute; end; @@ -213,6 +214,7 @@ begin ParamByName('GRUPO_PROVEEDOR').Value := aChange.NewValueByName[fld_ProveedoresGRUPO_PROVEEDOR]; ParamByName('IGNORAR_CONTABILIDAD').Value := aChange.NewValueByName[fld_ProveedoresIGNORAR_CONTABILIDAD]; ParamByName('TIENE_SUBCUENTA').Value := aChange.NewValueByName[fld_ProveedoresTIENE_SUBCUENTA]; + ParamByName('NOMBRE_COMERCIAL').Value := aChange.NewValueByName[fld_ProveedoresNOMBRE_COMERCIAL]; Execute; end; diff --git a/Source/Modulos/Contactos/Servidor/srvContactos_Impl.dfm b/Source/Modulos/Contactos/Servidor/srvContactos_Impl.dfm index fa86f492..45a1cbf3 100644 --- a/Source/Modulos/Contactos/Servidor/srvContactos_Impl.dfm +++ b/Source/Modulos/Contactos/Servidor/srvContactos_Impl.dfm @@ -1025,6 +1025,10 @@ object srvContactos: TsrvContactos item DatasetField = 'TIENE_SUBCUENTA' TableField = 'TIENE_SUBCUENTA' + end + item + DatasetField = 'NOMBRE_COMERCIAL' + TableField = 'NOMBRE_COMERCIAL' end> end> Name = 'Proveedores' @@ -1240,6 +1244,11 @@ object srvContactos: TsrvContactos item Name = 'TIENE_SUBCUENTA' DataType = datInteger + end + item + Name = 'NOMBRE_COMERCIAL' + DataType = datString + Size = 255 end> end item @@ -1643,6 +1652,10 @@ object srvContactos: TsrvContactos item DatasetField = 'FECHA_MODIFICACION' TableField = 'FECHA_MODIFICACION' + end + item + DatasetField = 'NIF_CIF' + TableField = 'NIF_CIF' end> end> Name = 'DireccionesContacto' @@ -1660,6 +1673,11 @@ object srvContactos: TsrvContactos DataType = datInteger DictionaryEntry = 'DireccionesContacto_ID_CONTACTO' end + item + Name = 'NIF_CIF' + DataType = datString + Size = 15 + end item Name = 'CALLE' DataType = datString @@ -2912,6 +2930,10 @@ object srvContactos: TsrvContactos item Name = 'TIENE_SUBCUENTA' Value = '' + end + item + Name = 'NOMBRE_COMERCIAL' + Value = '' end> Statements = < item @@ -2921,11 +2943,12 @@ object srvContactos: TsrvContactos 'INSERT'#10' INTO PROVEEDORES_DATOS'#10' (ID_PROVEEDOR, REGIMEN_IVA, ' + 'DESCUENTO, DESCRIPCION_PROVEEDOR,'#10' CODIGO_ASIGNADO, ID_TIPO_I' + 'VA,'#10' ID_FORMA_PAGO, TIENDA_WEB, HOMOLOGADO, CERTIFICACION, GR' + - 'UPO_PROVEEDOR,'#10' IGNORAR_CONTABILIDAD, TIENE_SUBCUENTA)'#10' VALU' + - 'ES'#10' (:ID_PROVEEDOR, :REGIMEN_IVA, :DESCUENTO, :DESCRIPCION_PR' + - 'OVEEDOR,'#10' :CODIGO_ASIGNADO, :ID_TIPO_IVA,'#10' :ID_FORMA_PAGO,' + - ' :TIENDA_WEB, :HOMOLOGADO, :CERTIFICACION, :GRUPO_PROVEEDOR,'#10' ' + - ' :IGNORAR_CONTABILIDAD, :TIENE_SUBCUENTA)'#10 + 'UPO_PROVEEDOR,'#10' IGNORAR_CONTABILIDAD, TIENE_SUBCUENTA, NOMBRE' + + '_COMERCIAL)'#10' VALUES'#10' (:ID_PROVEEDOR, :REGIMEN_IVA, :DESCUENT' + + 'O, :DESCRIPCION_PROVEEDOR,'#10' :CODIGO_ASIGNADO, :ID_TIPO_IVA,'#10' ' + + ' :ID_FORMA_PAGO, :TIENDA_WEB, :HOMOLOGADO, :CERTIFICACION, :GR' + + 'UPO_PROVEEDOR,'#10' :IGNORAR_CONTABILIDAD, :TIENE_SUBCUENTA, :NOM' + + 'BRE_COMERCIAL)'#10 StatementType = stSQL ColumnMappings = <> end> @@ -3005,6 +3028,10 @@ object srvContactos: TsrvContactos Name = 'TIENE_SUBCUENTA' Value = '' end + item + Name = 'NOMBRE_COMERCIAL' + Value = '' + end item Name = 'OLD_ID_PROVEEDOR' Value = '' @@ -3021,8 +3048,9 @@ object srvContactos: TsrvContactos 'D_FORMA_PAGO = :ID_FORMA_PAGO,'#10' TIENDA_WEB = :TIENDA_WEB,'#10' ' + ' HOMOLOGADO = :HOMOLOGADO,'#10' CERTIFICACION = :CERTIFICACION,'#10' ' + ' GRUPO_PROVEEDOR = :GRUPO_PROVEEDOR,'#10' IGNORAR_CONTABILIDAD ' + - '= :IGNORAR_CONTABILIDAD,'#10' TIENE_SUBCUENTA = :TIENE_SUBCUENTA'#10 + - ' WHERE'#10' (ID_PROVEEDOR = :OLD_ID_PROVEEDOR)'#10 + '= :IGNORAR_CONTABILIDAD,'#10' TIENE_SUBCUENTA = :TIENE_SUBCUENTA,' + + #10' NOMBRE_COMERCIAL = :NOMBRE_COMERCIAL'#10' WHERE'#10' (ID_PROVEE' + + 'DOR = :OLD_ID_PROVEEDOR)'#10 StatementType = stSQL ColumnMappings = <> end> @@ -3035,95 +3063,62 @@ object srvContactos: TsrvContactos DataType = datAutoInc GeneratorName = 'GEN_CONTACTOS_DIR_ID' Value = '' - ParamType = daptInput end item Name = 'ID_CONTACTO' - DataType = datInteger Value = '' - ParamType = daptInput end item Name = 'NOMBRE' - DataType = datString - Size = 255 Value = '' - ParamType = daptInput end item Name = 'CALLE' - DataType = datString - Size = 255 Value = '' - ParamType = daptInput end item Name = 'POBLACION' - DataType = datString - Size = 255 Value = '' - ParamType = daptInput end item Name = 'PROVINCIA' - DataType = datString - Size = 255 Value = '' - ParamType = daptInput end item Name = 'CODIGO_POSTAL' - DataType = datString - Size = 10 Value = '' - ParamType = daptInput end item Name = 'PERSONA_CONTACTO' - DataType = datString - Size = 255 Value = '' - ParamType = daptInput end item Name = 'TELEFONO' - DataType = datString - Size = 25 Value = '' - ParamType = daptInput end item Name = 'MOVIL' - DataType = datString - Size = 25 Value = '' - ParamType = daptInput end item Name = 'FAX' - DataType = datString - Size = 25 Value = '' - ParamType = daptInput end item Name = 'EMAIL' - DataType = datString - Size = 255 Value = '' - ParamType = daptInput end item Name = 'NOTAS' - DataType = datMemo Value = '' - ParamType = daptInput end item Name = 'PORTE' - DataType = datFloat Value = '' - ParamType = daptInput + end + item + Name = 'NIF_CIF' + Value = '' end> Statements = < item @@ -3132,10 +3127,10 @@ object srvContactos: TsrvContactos SQL = 'INSERT'#10' INTO CONTACTOS_DIRECCIONES'#10' (ID, ID_CONTACTO, NOMBRE' + ', CALLE, POBLACION, PROVINCIA, CODIGO_POSTAL,'#10' PERSONA_CONTA' + - 'CTO, TELEFONO, MOVIL, FAX, EMAIL, NOTAS, PORTE)'#10' VALUES'#10' (:I' + - 'D, :ID_CONTACTO, :NOMBRE, :CALLE, :POBLACION, :PROVINCIA, :CODIG' + - 'O_POSTAL,'#10' :PERSONA_CONTACTO, :TELEFONO, :MOVIL, :FAX, :EMAI' + - 'L, :NOTAS, :PORTE)' + 'CTO, TELEFONO, MOVIL, FAX, EMAIL, NOTAS, PORTE, NIF_CIF)'#10' VALUE' + + 'S'#10' (:ID, :ID_CONTACTO, :NOMBRE, :CALLE, :POBLACION, :PROVINCI' + + 'A, :CODIGO_POSTAL,'#10' :PERSONA_CONTACTO, :TELEFONO, :MOVIL, :F' + + 'AX, :EMAIL, :NOTAS, :PORTE, :NIF_CIF)'#10 StatementType = stSQL ColumnMappings = <> end> @@ -3165,97 +3160,59 @@ object srvContactos: TsrvContactos Params = < item Name = 'ID_CONTACTO' - DataType = datInteger Value = '' - ParamType = daptInput end item Name = 'NOMBRE' - DataType = datString - Size = 255 Value = '' - ParamType = daptInput end item Name = 'CALLE' - DataType = datString - Size = 255 Value = '' - ParamType = daptInput end item Name = 'POBLACION' - DataType = datString - Size = 255 Value = '' - ParamType = daptInput end item Name = 'PROVINCIA' - DataType = datString - Size = 255 Value = '' - ParamType = daptInput end item Name = 'CODIGO_POSTAL' - DataType = datString - Size = 10 Value = '' - ParamType = daptInput end item Name = 'PERSONA_CONTACTO' - DataType = datString - Size = 255 Value = '' - ParamType = daptInput end item Name = 'TELEFONO' - DataType = datString - Size = 25 Value = '' - ParamType = daptInput end item Name = 'MOVIL' - DataType = datString - Size = 25 Value = '' - ParamType = daptInput end item Name = 'FAX' - DataType = datString - Size = 25 Value = '' - ParamType = daptInput end item Name = 'EMAIL' - DataType = datString - Size = 255 Value = '' - ParamType = daptInput end item Name = 'NOTAS' - DataType = datMemo Value = '' - ParamType = daptInput end item Name = 'PORTE' - DataType = datFloat Value = '' - ParamType = daptInput end item Name = 'OLD_ID' - DataType = datInteger Value = '' - ParamType = daptInput end> Statements = < item @@ -3267,8 +3224,8 @@ object srvContactos: TsrvContactos 'POBLACION, '#10' PROVINCIA = :PROVINCIA, '#10' CODIGO_POSTAL = :CO' + 'DIGO_POSTAL, '#10' PERSONA_CONTACTO = :PERSONA_CONTACTO,'#10' TELE' + 'FONO = :TELEFONO,'#10' MOVIL = :MOVIL,'#10' FAX = :FAX,'#10' EMAIL ' + - '= :EMAIL,'#10' NOTAS = :NOTAS,'#10' PORTE = :PORTE'#10' WHERE'#10' (ID' + - ' = :OLD_ID)' + '= :EMAIL,'#10' NOTAS = :NOTAS,'#10' PORTE = :PORTE,'#10' NIF_CIF = ' + + 'NIF_CIF'#10' WHERE'#10' (ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> diff --git a/Source/Modulos/Contactos/Views/Contactos_view.dpk b/Source/Modulos/Contactos/Views/Contactos_view.dpk index 7e6e2bfc..4dc756b9 100644 --- a/Source/Modulos/Contactos/Views/Contactos_view.dpk +++ b/Source/Modulos/Contactos/Views/Contactos_view.dpk @@ -74,7 +74,7 @@ contains uViewDireccionesEntrega in 'uViewDireccionesEntrega.pas' {frViewDireccionesEntrega: TFrame}, uViewClienteDescuentos in 'uViewClienteDescuentos.pas' {frViewClienteDescuentos: TFrame}, uEditorDireccion in 'uEditorDireccion.pas' {fEditorDireccion}, - uEditorElegirDireccionEntrega in 'uEditorElegirDireccionEntrega.pas' {fEditorElegirDireccionEntrega: TfEditorElegirDireccionEntrega}, + uEditorElegirDireccion in 'uEditorElegirDireccion.pas' {fEditorElegirDireccion: TfEditorElegirDireccionEntrega}, uViewContactoDatosBancarios in 'uViewContactoDatosBancarios.pas' {frViewClienteDatosBancarios: TFrame}, uViewProveedorDatosComerciales in 'uViewProveedorDatosComerciales.pas' {frViewProveedorDatosComerciales: TFrame}, uViewClienteDatosComerciales in 'uViewClienteDatosComerciales.pas' {frViewClienteDatosComerciales: TFrame}, diff --git a/Source/Modulos/Contactos/Views/Contactos_view.dproj b/Source/Modulos/Contactos/Views/Contactos_view.dproj index 98fdad74..21305990 100644 --- a/Source/Modulos/Contactos/Views/Contactos_view.dproj +++ b/Source/Modulos/Contactos/Views/Contactos_view.dproj @@ -49,31 +49,31 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + +
fEditorCliente
@@ -98,8 +98,8 @@
fEditorElegirClientes
TCustomEditor
- -
fEditorElegirDireccionEntrega
+ +
fEditorElegirDireccion
TfEditorElegirDireccionEntrega
diff --git a/Source/Modulos/Contactos/Views/uContactosViewRegister.pas b/Source/Modulos/Contactos/Views/uContactosViewRegister.pas index 8a050de4..cac19389 100644 --- a/Source/Modulos/Contactos/Views/uContactosViewRegister.pas +++ b/Source/Modulos/Contactos/Views/uContactosViewRegister.pas @@ -13,7 +13,7 @@ uses uEditorEmpleados, uEditorElegirCLientes, uEditorCliente, uEditorProveedor, uEditorEmpleado, uEditorElegirProveedores, uEditorDireccion, - uEditorElegirDireccionEntrega, uEditorGruposCliente, uEditorProcedenciasCliente, + uEditorElegirDireccion, uEditorGruposCliente, uEditorProcedenciasCliente, uEditorGruposProveedor, uEditorGruposEmpleado, uEditorFichasEmpleadoReport, uEditorEtiquetasContactosReport; @@ -31,7 +31,7 @@ begin EditorRegistry.RegisterClass(TfEditorElegirProveedores, 'EditorElegirProveedores'); EditorRegistry.RegisterClass(TfEditorDireccion, 'EditorDireccion'); - EditorRegistry.RegisterClass(TfEditorElegirDireccionEntrega, 'EditorElegirDireccionEntrega'); + EditorRegistry.RegisterClass(TfEditorElegirDireccion, 'EditorElegirDireccion'); EditorRegistry.RegisterClass(TfEditorGruposCliente, 'EditorGruposCliente'); EditorRegistry.RegisterClass(TfEditorProcedenciasCliente, 'EditorProcedenciasCliente'); @@ -56,7 +56,7 @@ begin EditorRegistry.UnRegisterClass(TfEditorElegirProveedores); EditorRegistry.UnRegisterClass(TfEditorDireccion); - EditorRegistry.UnRegisterClass(TfEditorElegirDireccionEntrega); + EditorRegistry.UnRegisterClass(TfEditorElegirDireccion); EditorRegistry.UnRegisterClass(TfEditorGruposCliente); EditorRegistry.UnRegisterClass(TfEditorProcedenciasCliente); diff --git a/Source/Modulos/Contactos/Views/uEditorDireccion.dfm b/Source/Modulos/Contactos/Views/uEditorDireccion.dfm index d9a08928..89441e7c 100644 --- a/Source/Modulos/Contactos/Views/uEditorDireccion.dfm +++ b/Source/Modulos/Contactos/Views/uEditorDireccion.dfm @@ -19,13 +19,13 @@ object fEditorDireccion: TfEditorDireccion Left = 8 Top = 8 Width = 322 - Height = 511 + Height = 553 Anchors = [akLeft, akTop, akRight] Shape = bsFrame end object Label1: TLabel Left = 20 - Top = 67 + Top = 93 Width = 110 Height = 13 AutoSize = False @@ -33,7 +33,7 @@ object fEditorDireccion: TfEditorDireccion end object Label2: TLabel Left = 20 - Top = 131 + Top = 157 Width = 110 Height = 13 AutoSize = False @@ -41,7 +41,7 @@ object fEditorDireccion: TfEditorDireccion end object Label3: TLabel Left = 20 - Top = 159 + Top = 185 Width = 110 Height = 13 AutoSize = False @@ -49,7 +49,7 @@ object fEditorDireccion: TfEditorDireccion end object Label4: TLabel Left = 20 - Top = 185 + Top = 211 Width = 110 Height = 13 AutoSize = False @@ -57,7 +57,7 @@ object fEditorDireccion: TfEditorDireccion end object Label5: TLabel Left = 20 - Top = 27 + Top = 53 Width = 110 Height = 13 AutoSize = False @@ -65,7 +65,7 @@ object fEditorDireccion: TfEditorDireccion end object Label6: TLabel Left = 20 - Top = 227 + Top = 263 Width = 109 Height = 13 AutoSize = False @@ -73,7 +73,7 @@ object fEditorDireccion: TfEditorDireccion end object Label7: TLabel Left = 21 - Top = 251 + Top = 287 Width = 109 Height = 13 AutoSize = False @@ -81,7 +81,7 @@ object fEditorDireccion: TfEditorDireccion end object PngSpeedButton3: TPngSpeedButton Left = 304 - Top = 320 + Top = 356 Width = 23 Height = 22 OnClick = PngSpeedButton3Click @@ -106,7 +106,7 @@ object fEditorDireccion: TfEditorDireccion end object Label8: TLabel Left = 21 - Top = 323 + Top = 359 Width = 109 Height = 13 AutoSize = False @@ -114,7 +114,7 @@ object fEditorDireccion: TfEditorDireccion end object Label9: TLabel Left = 21 - Top = 363 + Top = 399 Width = 109 Height = 13 AutoSize = False @@ -122,14 +122,14 @@ object fEditorDireccion: TfEditorDireccion end object Bevel2: TBevel Left = 20 - Top = 457 + Top = 491 Width = 306 Height = 9 Shape = bsBottomLine end object Label10: TLabel Left = 21 - Top = 489 + Top = 523 Width = 156 Height = 13 AutoSize = False @@ -137,7 +137,7 @@ object fEditorDireccion: TfEditorDireccion end object Label11: TLabel Left = 21 - Top = 275 + Top = 311 Width = 109 Height = 13 AutoSize = False @@ -145,12 +145,20 @@ object fEditorDireccion: TfEditorDireccion end object Label12: TLabel Left = 21 - Top = 299 + Top = 335 Width = 109 Height = 13 AutoSize = False Caption = 'Fax:' end + object Label13: TLabel + Left = 20 + Top = 26 + Width = 110 + Height = 13 + AutoSize = False + Caption = 'NIF / CIF:' + end object OKBtn: TButton Left = 343 Top = 7 @@ -160,7 +168,6 @@ object fEditorDireccion: TfEditorDireccion Caption = '&Aceptar' ModalResult = 1 TabOrder = 0 - ExplicitLeft = 350 end object CancelBtn: TButton Left = 343 @@ -172,11 +179,10 @@ object fEditorDireccion: TfEditorDireccion Caption = '&Cancelar' ModalResult = 2 TabOrder = 1 - ExplicitLeft = 350 end object eDireccion: TDBEdit Left = 135 - Top = 65 + Top = 91 Width = 191 Height = 57 AutoSelect = False @@ -187,7 +193,7 @@ object fEditorDireccion: TfEditorDireccion end object ePoblacion: TDBEdit Left = 135 - Top = 128 + Top = 154 Width = 191 Height = 21 DataField = 'POBLACION' @@ -196,7 +202,7 @@ object fEditorDireccion: TfEditorDireccion end object eProvincia: TDBEdit Left = 135 - Top = 156 + Top = 182 Width = 191 Height = 21 DataField = 'PROVINCIA' @@ -205,7 +211,7 @@ object fEditorDireccion: TfEditorDireccion end object eCodigoPostal: TDBEdit Left = 135 - Top = 182 + Top = 208 Width = 191 Height = 21 DataField = 'CODIGO_POSTAL' @@ -213,8 +219,8 @@ object fEditorDireccion: TfEditorDireccion TabOrder = 6 end object eNombre: TDBEdit - Left = 135 - Top = 24 + Left = 136 + Top = 50 Width = 191 Height = 21 DataField = 'NOMBRE' @@ -223,7 +229,7 @@ object fEditorDireccion: TfEditorDireccion end object ePersonaContacto: TDBEdit Left = 135 - Top = 224 + Top = 260 Width = 191 Height = 21 DataField = 'PERSONA_CONTACTO' @@ -232,7 +238,7 @@ object fEditorDireccion: TfEditorDireccion end object eTelefono: TDBEdit Left = 136 - Top = 248 + Top = 284 Width = 191 Height = 21 DataField = 'TELEFONO' @@ -241,7 +247,7 @@ object fEditorDireccion: TfEditorDireccion end object eMail: TcxDBHyperLinkEdit Left = 136 - Top = 320 + Top = 356 DataBinding.DataField = 'EMAIL' DataBinding.DataSource = dsDireccion Properties.OnEditValueChanged = eMailPropertiesEditValueChanged @@ -263,7 +269,7 @@ object fEditorDireccion: TfEditorDireccion end object eNotas: TDBMemo Left = 136 - Top = 360 + Top = 396 Width = 190 Height = 94 DataField = 'NOTAS' @@ -273,7 +279,7 @@ object fEditorDireccion: TfEditorDireccion end object ePortes: TcxDBCurrencyEdit Left = 183 - Top = 486 + Top = 520 DataBinding.DataField = 'PORTE' DataBinding.DataSource = dsDireccion Properties.UseThousandSeparator = True @@ -290,7 +296,7 @@ object fEditorDireccion: TfEditorDireccion end object eMovil: TDBEdit Left = 136 - Top = 272 + Top = 308 Width = 191 Height = 21 DataField = 'MOVIL' @@ -299,13 +305,22 @@ object fEditorDireccion: TfEditorDireccion end object eFax: TDBEdit Left = 136 - Top = 296 + Top = 332 Width = 191 Height = 21 DataField = 'FAX' DataSource = dsDireccion TabOrder = 13 end + object eNifCif: TDBEdit + Left = 136 + Top = 23 + Width = 191 + Height = 21 + DataField = 'NIF_CIF' + DataSource = dsDireccion + TabOrder = 14 + end object dsDireccion: TDADataSource Left = 352 Top = 72 diff --git a/Source/Modulos/Contactos/Views/uEditorDireccion.pas b/Source/Modulos/Contactos/Views/uEditorDireccion.pas index 480fa855..b69794e8 100644 --- a/Source/Modulos/Contactos/Views/uEditorDireccion.pas +++ b/Source/Modulos/Contactos/Views/uEditorDireccion.pas @@ -40,6 +40,8 @@ type eMovil: TDBEdit; Label12: TLabel; eFax: TDBEdit; + Label13: TLabel; + eNifCif: TDBEdit; procedure PngSpeedButton3Click(Sender: TObject); procedure eMailPropertiesEditValueChanged(Sender: TObject); procedure eMailPropertiesValidate(Sender: TObject; diff --git a/Source/Modulos/Contactos/Views/uEditorElegirDireccionEntrega.dfm b/Source/Modulos/Contactos/Views/uEditorElegirDireccionEntrega.dfm deleted file mode 100644 index 09e3b72f..00000000 --- a/Source/Modulos/Contactos/Views/uEditorElegirDireccionEntrega.dfm +++ /dev/null @@ -1,247 +0,0 @@ -object fEditorElegirDireccionEntrega: TfEditorElegirDireccionEntrega - Left = 227 - Top = 108 - BorderStyle = bsDialog - Caption = 'Elegir una direcciones de cliente' - ClientHeight = 383 - ClientWidth = 599 - Color = clBtnFace - ParentFont = True - OldCreateOrder = True - Position = poOwnerFormCenter - PixelsPerInch = 96 - TextHeight = 13 - object JvgWizardHeader1: TJvgWizardHeader - Left = 0 - Top = 0 - Width = 599 - Height = 60 - CaptionFont.Charset = DEFAULT_CHARSET - CaptionFont.Color = clWindowText - CaptionFont.Height = -11 - CaptionFont.Name = 'Tahoma' - CaptionFont.Style = [fsBold] - CommentFont.Charset = DEFAULT_CHARSET - CommentFont.Color = clWindowText - CommentFont.Height = -11 - CommentFont.Name = 'Tahoma' - CommentFont.Style = [] - SymbolFont.Charset = DEFAULT_CHARSET - SymbolFont.Color = clHighlightText - SymbolFont.Height = -35 - SymbolFont.Name = 'Wingdings' - SymbolFont.Style = [fsBold] - Captions.Strings = ( - 'Seleccione una direcci'#243'n del cliente') - Comments.Strings = ( - - 'El cliente dispone de varias direcciones dadas de alta en su fic' + - 'ha. Seleccione la direcci'#243'n del cliente que quiere utilizar.') - Gradient.FromColor = clHighlight - Gradient.ToColor = clWindow - Gradient.Active = False - Gradient.Orientation = fgdVertical - BufferedDraw = False - ExplicitLeft = -57 - ExplicitTop = 27 - ExplicitWidth = 656 - end - inline frViewBarraSeleccion1: TfrViewBarraSeleccion - Left = 0 - Top = 334 - Width = 599 - Height = 49 - Align = alBottom - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - TabOrder = 0 - ReadOnly = False - ExplicitTop = 334 - ExplicitWidth = 599 - inherited JvFooter1: TJvFooter - Width = 599 - ExplicitWidth = 599 - inherited bSeleccionar: TJvFooterBtn - Left = 387 - ExplicitLeft = 387 - end - inherited bCancelar: TJvFooterBtn - Left = 491 - ExplicitLeft = 491 - end - end - inherited BarraSeleccionActionList: TActionList - Top = 11 - inherited actSeleccionar: TAction - OnExecute = frViewBarraSeleccion1actSeleccionarExecute - end - inherited actCancelar: TAction - OnExecute = frViewBarraSeleccion1actCancelarExecute - end - end - end - object DBCtrlGrid1: TDBCtrlGrid - Left = 8 - Top = 66 - Width = 583 - Height = 261 - Margins.Left = 10 - Margins.Top = 10 - Margins.Right = 10 - Margins.Bottom = 0 - AllowDelete = False - AllowInsert = False - Color = clBtnFace - DataSource = dsDirecciones - PanelHeight = 87 - PanelWidth = 566 - ParentColor = False - TabOrder = 1 - SelectedColor = clHighlight - OnDblClick = DBCtrlGrid1DblClick - object eCalle: TDBText - Left = 48 - Top = 28 - Width = 512 - Height = 17 - DataField = 'CALLE' - DataSource = dsDirecciones - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - Transparent = True - OnDblClick = ComponenteDblClick - end - object ePoblacion: TDBText - Left = 70 - Top = 47 - Width = 277 - Height = 17 - DataField = 'POBLACION' - DataSource = dsDirecciones - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - Transparent = True - OnDblClick = ComponenteDblClick - end - object eTelefono: TDBText - Left = 423 - Top = 66 - Width = 137 - Height = 17 - DataField = 'TELEFONO' - DataSource = dsDirecciones - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - Transparent = True - OnDblClick = ComponenteDblClick - end - object eProvincia: TDBText - Left = 423 - Top = 47 - Width = 137 - Height = 17 - DataField = 'PROVINCIA' - DataSource = dsDirecciones - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - Transparent = True - OnDblClick = ComponenteDblClick - end - object ePersonaContacto: TDBText - Left = 124 - Top = 66 - Width = 284 - Height = 17 - DataField = 'PERSONA_CONTACTO' - DataSource = dsDirecciones - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - Transparent = True - OnDblClick = ComponenteDblClick - end - object eNombre: TDBText - Left = 8 - Top = 7 - Width = 345 - Height = 17 - DataField = 'NOMBRE' - DataSource = dsDirecciones - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - Transparent = True - OnDblClick = ComponenteDblClick - end - object eCodigoPostal: TDBText - Left = 353 - Top = 47 - Width = 64 - Height = 17 - DataField = 'CODIGO_POSTAL' - DataSource = dsDirecciones - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - Transparent = True - OnDblClick = ComponenteDblClick - end - object Label1: TLabel - Left = 15 - Top = 28 - Width = 27 - Height = 13 - Caption = 'Calle:' - OnDblClick = ComponenteDblClick - end - object Label2: TLabel - Left = 15 - Top = 47 - Width = 49 - Height = 13 - Caption = 'Poblaci'#243'n:' - OnDblClick = ComponenteDblClick - end - object Label4: TLabel - Left = 15 - Top = 66 - Width = 103 - Height = 13 - Caption = 'Persona de contacto:' - OnDblClick = ComponenteDblClick - end - end - object dsDirecciones: TDADataSource - Left = 24 - Top = 286 - end -end diff --git a/Source/Modulos/Contactos/Views/uEditorElegirDireccionEntrega.pas b/Source/Modulos/Contactos/Views/uEditorElegirDireccionEntrega.pas deleted file mode 100644 index bb13457f..00000000 --- a/Source/Modulos/Contactos/Views/uEditorElegirDireccionEntrega.pas +++ /dev/null @@ -1,110 +0,0 @@ -unit uEditorElegirDireccionEntrega; - -interface - -uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, - Buttons, ExtCtrls, Mask, DBCtrls, DB, uDADataTable, - cxControls, cxContainer, cxEdit, cxTextEdit, cxDBEdit, - uIEditorElegirDireccionEntrega, uCustomView, - uViewBase, uViewBarraSeleccion, JvExControls, JvComponent, JvgWizardHeader, - DBCGrids, uBizDireccionesContacto, uDAInterfaces; - -type - TfEditorElegirDireccionEntrega = class(TForm, IEditorElegirDireccionEntrega) - dsDirecciones: TDADataSource; - frViewBarraSeleccion1: TfrViewBarraSeleccion; - JvgWizardHeader1: TJvgWizardHeader; - DBCtrlGrid1: TDBCtrlGrid; - eCalle: TDBText; - ePoblacion: TDBText; - eTelefono: TDBText; - eProvincia: TDBText; - ePersonaContacto: TDBText; - eNombre: TDBText; - eCodigoPostal: TDBText; - Label1: TLabel; - Label2: TLabel; - Label4: TLabel; - procedure frViewBarraSeleccion1actSeleccionarExecute(Sender: TObject); - procedure frViewBarraSeleccion1actCancelarExecute(Sender: TObject); - procedure DBCtrlGrid1DblClick(Sender: TObject); - procedure ComponenteDblClick(Sender: TObject); - - protected - FDirecciones: IBizDireccionesContacto; - function GetDireccion: IBizDireccionesContacto; - procedure SetDireccion(const Value: IBizDireccionesContacto); - - procedure SetMensaje (const AValue: String); - function GetMensaje: String; - - function GetDireccionSeleccionada: IBizDireccionesContacto; - public - property Mensaje : String read GetMensaje write SetMensaje; - property Direccion: IBizDireccionesContacto read GetDireccion write SetDireccion; - property DireccionSeleccionada: IBizDireccionesContacto read GetDireccionSeleccionada; - - end; - -implementation -{$R *.dfm} - -uses - uDireccionesContactoController; - -{ TfEditorDireccionEntrega } - -procedure TfEditorElegirDireccionEntrega.DBCtrlGrid1DblClick(Sender: TObject); -begin - frViewBarraSeleccion1.actSeleccionar.Execute; -end; - -procedure TfEditorElegirDireccionEntrega.ComponenteDblClick(Sender: TObject); -begin - DBCtrlGrid1DblClick(Sender); -end; - -procedure TfEditorElegirDireccionEntrega.frViewBarraSeleccion1actCancelarExecute( - Sender: TObject); -begin - ModalResult := mrCancel; -end; - -procedure TfEditorElegirDireccionEntrega.frViewBarraSeleccion1actSeleccionarExecute( - Sender: TObject); -begin - ModalResult := mrOk; -end; - -function TfEditorElegirDireccionEntrega.GetDireccion: IBizDireccionesContacto; -begin - Result := FDirecciones; -end; - -function TfEditorElegirDireccionEntrega.GetDireccionSeleccionada: IBizDireccionesContacto; -begin - // Devuelvo el mismo objeto que recibo pero con el punto de lectura - // posicionado en la dirección elegida. - Result := FDirecciones; -end; - -function TfEditorElegirDireccionEntrega.GetMensaje: String; -begin - Result := JvgWizardHeader1.Comments.Text; -end; - -procedure TfEditorElegirDireccionEntrega.SetDireccion(const Value: IBizDireccionesContacto); -begin - FDirecciones := Value; - if Assigned(FDirecciones) then - dsDirecciones.DataTable := FDirecciones.DataTable - else - dsDirecciones.DataTable := NIL; -end; - -procedure TfEditorElegirDireccionEntrega.SetMensaje(const AValue: String); -begin - JvgWizardHeader1.Comments.Text := AValue; -end; - -end. diff --git a/Source/Modulos/Contactos/Views/uEditorProveedor.dfm b/Source/Modulos/Contactos/Views/uEditorProveedor.dfm index fb01ef2b..ef567f72 100644 --- a/Source/Modulos/Contactos/Views/uEditorProveedor.dfm +++ b/Source/Modulos/Contactos/Views/uEditorProveedor.dfm @@ -83,129 +83,129 @@ inherited fEditorProveedor: TfEditorProveedor ExplicitWidth = 634 ExplicitHeight = 461 inherited PngSpeedButton1: TPngSpeedButton - Left = 589 + Left = 572 Top = 218 - ExplicitLeft = 589 + ExplicitLeft = 572 ExplicitTop = 218 end inherited PngSpeedButton2: TPngSpeedButton - Left = 589 + Left = 572 Top = 190 - ExplicitLeft = 589 + ExplicitLeft = 572 ExplicitTop = 190 end inherited PngSpeedButton3: TPngSpeedButton - Left = 589 + Left = 572 Top = 162 - ExplicitLeft = 589 + ExplicitLeft = 572 ExplicitTop = 162 end inherited Label1: TLabel - Left = 391 + Left = 381 Top = 341 Width = 342 - ExplicitLeft = 391 + ExplicitLeft = 381 ExplicitTop = 341 ExplicitWidth = 342 end inherited eCalle: TcxDBTextEdit - Top = 241 - ExplicitTop = 241 + Top = 243 + ExplicitTop = 243 ExplicitWidth = 174 Width = 174 end inherited eProvincia: TcxDBTextEdit - Top = 295 - ExplicitTop = 295 + Top = 297 + ExplicitTop = 297 ExplicitWidth = 174 Width = 174 end inherited ePoblacion: TcxDBTextEdit - Top = 268 - ExplicitTop = 268 + Top = 270 + ExplicitTop = 270 ExplicitWidth = 108 Width = 108 end inherited eCodigoPostal: TcxDBTextEdit - Left = 298 - Top = 268 - ExplicitLeft = 298 - ExplicitTop = 268 + Left = 288 + Top = 270 + ExplicitLeft = 288 + ExplicitTop = 270 end inherited eObservaciones: TcxDBMemo - Top = 424 - ExplicitTop = 424 + Top = 426 + ExplicitTop = 426 ExplicitWidth = 580 ExplicitHeight = 56 Height = 56 Width = 580 end inherited cxDBCheckBox1: TcxDBCheckBox - Left = 391 + Left = 381 Top = 373 - ExplicitLeft = 391 + ExplicitLeft = 381 ExplicitTop = 373 ExplicitWidth = 310 Width = 310 end inherited cxDBCheckBox2: TcxDBCheckBox - Top = 346 - ExplicitTop = 346 + Top = 348 + ExplicitTop = 348 ExplicitWidth = 326 Width = 326 end inherited eCertificaciones: TcxDBTextEdit - Top = 373 - ExplicitTop = 373 + Top = 375 + ExplicitTop = 375 ExplicitWidth = 227 Width = 227 end inherited cbGrupoProveedor: TcxDBComboBox - Top = 138 - ExplicitTop = 138 + Top = 165 + ExplicitTop = 165 ExplicitWidth = 227 Width = 227 end inherited eDescripcionProveedor: TcxDBTextEdit - Top = 84 - ExplicitTop = 84 - ExplicitWidth = 221 - Width = 221 - end - inherited eCodigoAsignado: TcxDBTextEdit Top = 111 ExplicitTop = 111 ExplicitWidth = 221 Width = 221 end + inherited eCodigoAsignado: TcxDBTextEdit + Top = 138 + ExplicitTop = 138 + ExplicitWidth = 221 + Width = 221 + end inherited eTlfParticular: TcxDBTextEdit - Left = 486 + Left = 476 Top = 57 - ExplicitLeft = 486 + ExplicitLeft = 476 ExplicitTop = 57 ExplicitWidth = 172 Width = 172 end inherited eTlfTrabajo: TcxDBTextEdit - Left = 486 + Left = 476 Top = 30 - ExplicitLeft = 486 + ExplicitLeft = 476 ExplicitTop = 30 ExplicitWidth = 172 Width = 172 end inherited eTlfMovil: TcxDBTextEdit - Left = 486 + Left = 476 Top = 84 - ExplicitLeft = 486 + ExplicitLeft = 476 ExplicitTop = 84 ExplicitWidth = 172 Width = 172 end inherited eFax: TcxDBTextEdit - Left = 486 + Left = 476 Top = 111 - ExplicitLeft = 486 + ExplicitLeft = 476 ExplicitTop = 111 ExplicitWidth = 172 Width = 172 @@ -217,35 +217,33 @@ inherited fEditorProveedor: TfEditorProveedor Width = 263 end inherited eNIFCIF: TcxDBTextEdit - Left = 215 Top = 30 - ExplicitLeft = 215 ExplicitTop = 30 ExplicitWidth = 254 Width = 254 end inherited eMailTrabajo: TcxDBHyperLinkEdit - Left = 486 + Left = 476 Top = 162 Properties.Prefix = 'mailto:' - ExplicitLeft = 486 + ExplicitLeft = 476 ExplicitTop = 162 ExplicitWidth = 129 Width = 129 end inherited eMailParticular: TcxDBHyperLinkEdit - Left = 486 + Left = 476 Top = 190 Properties.Prefix = 'mailto:' - ExplicitLeft = 486 + ExplicitLeft = 476 ExplicitTop = 190 ExplicitWidth = 165 Width = 165 end inherited ePaginaWeb: TcxDBHyperLinkEdit - Left = 486 + Left = 476 Top = 217 - ExplicitLeft = 486 + ExplicitLeft = 476 ExplicitTop = 217 ExplicitWidth = 165 Width = 165 @@ -257,15 +255,15 @@ inherited fEditorProveedor: TfEditorProveedor Width = 100 end inherited ePersonaContacto: TcxDBTextEdit - Top = 214 - ExplicitTop = 214 + Top = 216 + ExplicitTop = 216 ExplicitWidth = 253 Width = 253 end inherited frViewTienda1: TfrViewTienda - Left = 391 + Left = 381 Top = 270 - ExplicitLeft = 391 + ExplicitLeft = 381 ExplicitTop = 270 inherited dxLayoutControl1: TdxLayoutControl inherited cbTienda: TcxComboBox @@ -274,6 +272,12 @@ inherited fEditorProveedor: TfEditorProveedor end end end + inherited eNombreComercial: TcxDBTextEdit + Top = 84 + ExplicitTop = 84 + ExplicitWidth = 192 + Width = 192 + end end end end @@ -410,6 +414,18 @@ inherited fEditorProveedor: TfEditorProveedor inherited ToolBar1: TToolBar Width = 634 ExplicitWidth = 634 + inherited ToolButton1: TToolButton + ExplicitWidth = 113 + end + inherited ToolButton4: TToolButton + ExplicitWidth = 113 + end + inherited ToolButton2: TToolButton + ExplicitWidth = 113 + end + inherited ToolButton7: TToolButton + ExplicitWidth = 113 + end end end end diff --git a/Source/Modulos/Contactos/Views/uViewCliente.dfm b/Source/Modulos/Contactos/Views/uViewCliente.dfm index eaefda9d..c1294c14 100644 --- a/Source/Modulos/Contactos/Views/uViewCliente.dfm +++ b/Source/Modulos/Contactos/Views/uViewCliente.dfm @@ -334,7 +334,6 @@ inherited frViewCliente: TfrViewCliente inherited dxLayoutControlContactoGroup1: TdxLayoutGroup object dxLayoutControlContactoItem24: TdxLayoutItem Caption = 'Nombre comercial:' - Visible = False Control = eNombreComercial ControlOptions.ShowBorder = False end diff --git a/Source/Modulos/Contactos/Views/uViewDireccionesEntrega.dfm b/Source/Modulos/Contactos/Views/uViewDireccionesEntrega.dfm index b3d07cf0..931df442 100644 --- a/Source/Modulos/Contactos/Views/uViewDireccionesEntrega.dfm +++ b/Source/Modulos/Contactos/Views/uViewDireccionesEntrega.dfm @@ -15,6 +15,10 @@ inherited frViewDireccionesEntrega: TfrViewDireccionesEntrega OptionsData.DeletingConfirmation = False OptionsData.Editing = False OptionsData.Inserting = False + object cxGridViewNIF_CIF: TcxGridDBColumn + Caption = 'NIF/CIF' + DataBinding.FieldName = 'NIF_CIF' + end object cxGridViewNOMBRE: TcxGridDBColumn Caption = 'Nombre' DataBinding.FieldName = 'NOMBRE' @@ -76,31 +80,15 @@ inherited frViewDireccionesEntrega: TfrViewDireccionesEntrega Width = 583 ExplicitWidth = 583 inherited ToolButton1: TToolButton - Top = 0 - ExplicitTop = 0 ExplicitWidth = 62 end inherited ToolButton4: TToolButton - Top = 0 - ExplicitTop = 0 ExplicitWidth = 74 end - inherited ToolButton5: TToolButton - Top = 0 - ExplicitTop = 0 - end inherited ToolButton2: TToolButton - Top = 0 - ExplicitTop = 0 ExplicitWidth = 67 end - inherited ToolButton6: TToolButton - Top = 0 - ExplicitTop = 0 - end inherited ToolButton7: TToolButton - Top = 0 - ExplicitTop = 0 ExplicitWidth = 117 end end diff --git a/Source/Modulos/Contactos/Views/uViewDireccionesEntrega.pas b/Source/Modulos/Contactos/Views/uViewDireccionesEntrega.pas index 9e6b0567..827bec40 100644 --- a/Source/Modulos/Contactos/Views/uViewDireccionesEntrega.pas +++ b/Source/Modulos/Contactos/Views/uViewDireccionesEntrega.pas @@ -23,6 +23,7 @@ type cxGridViewTELEFONO: TcxGridDBColumn; cxGridViewEMAIL: TcxGridDBColumn; cxGridViewPORTE: TcxGridDBColumn; + cxGridViewNIF_CIF: TcxGridDBColumn; procedure cxGridViewDblClick(Sender: TObject); procedure actEliminarExecute(Sender: TObject); protected diff --git a/Source/Modulos/Contactos/Views/uViewProveedor.dfm b/Source/Modulos/Contactos/Views/uViewProveedor.dfm index 5b953be8..c89527e8 100644 --- a/Source/Modulos/Contactos/Views/uViewProveedor.dfm +++ b/Source/Modulos/Contactos/Views/uViewProveedor.dfm @@ -35,7 +35,7 @@ inherited frViewProveedor: TfrViewProveedor inherited eCalle: TcxDBTextEdit Left = 138 Top = 380 - TabOrder = 7 + TabOrder = 8 ExplicitLeft = 138 ExplicitTop = 380 ExplicitWidth = 264 @@ -44,7 +44,7 @@ inherited frViewProveedor: TfrViewProveedor inherited eProvincia: TcxDBTextEdit Left = 138 Top = 434 - TabOrder = 10 + TabOrder = 11 ExplicitLeft = 138 ExplicitTop = 434 ExplicitWidth = 264 @@ -53,7 +53,7 @@ inherited frViewProveedor: TfrViewProveedor inherited ePoblacion: TcxDBTextEdit Left = 138 Top = 407 - TabOrder = 8 + TabOrder = 9 ExplicitLeft = 138 ExplicitTop = 407 ExplicitWidth = 163 @@ -62,13 +62,13 @@ inherited frViewProveedor: TfrViewProveedor inherited eCodigoPostal: TcxDBTextEdit Left = 307 Top = 407 - TabOrder = 9 + TabOrder = 10 ExplicitLeft = 307 ExplicitTop = 407 end inherited eObservaciones: TcxDBMemo Top = 575 - TabOrder = 22 + TabOrder = 23 ExplicitTop = 575 ExplicitWidth = 630 ExplicitHeight = 20 @@ -97,7 +97,7 @@ inherited frViewProveedor: TfrViewProveedor StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 21 + TabOrder = 22 Width = 310 end object cxDBCheckBox2: TcxDBCheckBox [10] @@ -121,7 +121,7 @@ inherited frViewProveedor: TfrViewProveedor StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 11 + TabOrder = 12 Width = 326 end object eCertificaciones: TcxDBTextEdit [11] @@ -140,12 +140,12 @@ inherited frViewProveedor: TfrViewProveedor StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 12 + TabOrder = 13 Width = 227 end object cbGrupoProveedor: TcxDBComboBox [12] Left = 138 - Top = 136 + Top = 163 DataBinding.DataField = 'GRUPO_PROVEEDOR' DataBinding.DataSource = dsContacto Properties.ImmediatePost = True @@ -164,32 +164,13 @@ inherited frViewProveedor: TfrViewProveedor StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 5 + TabOrder = 6 Width = 227 end object eDescripcionProveedor: TcxDBTextEdit [13] - Left = 138 - Top = 82 - DataBinding.DataField = 'DESCRIPCION_PROVEEDOR' - DataBinding.DataSource = dsContacto - Style.BorderColor = clWindowFrame - Style.BorderStyle = ebs3D - Style.HotTrack = False - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = True - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = True - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = True - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 3 - Width = 221 - end - object eCodigoAsignado: TcxDBTextEdit [14] Left = 138 Top = 109 - DataBinding.DataField = 'CODIGO_ASIGNADO' + DataBinding.DataField = 'DESCRIPCION_PROVEEDOR' DataBinding.DataSource = dsContacto Style.BorderColor = clWindowFrame Style.BorderStyle = ebs3D @@ -205,30 +186,49 @@ inherited frViewProveedor: TfrViewProveedor TabOrder = 4 Width = 221 end + object eCodigoAsignado: TcxDBTextEdit [14] + Left = 138 + Top = 136 + DataBinding.DataField = 'CODIGO_ASIGNADO' + DataBinding.DataSource = dsContacto + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 5 + Width = 221 + end inherited eTlfParticular: TcxDBTextEdit Left = 497 - TabOrder = 14 + TabOrder = 15 ExplicitLeft = 497 ExplicitWidth = 91 Width = 91 end inherited eTlfTrabajo: TcxDBTextEdit Left = 497 - TabOrder = 13 + TabOrder = 14 ExplicitLeft = 497 ExplicitWidth = 127 Width = 127 end inherited eTlfMovil: TcxDBTextEdit Left = 497 - TabOrder = 15 + TabOrder = 16 ExplicitLeft = 497 ExplicitWidth = 155 Width = 155 end inherited eFax: TcxDBTextEdit Left = 497 - TabOrder = 16 + TabOrder = 17 ExplicitLeft = 497 ExplicitWidth = 121 Width = 121 @@ -248,7 +248,7 @@ inherited frViewProveedor: TfrViewProveedor inherited eMailTrabajo: TcxDBHyperLinkEdit Left = 497 Properties.Prefix = 'mailto:' - TabOrder = 17 + TabOrder = 18 ExplicitLeft = 497 ExplicitWidth = 133 Width = 133 @@ -256,14 +256,14 @@ inherited frViewProveedor: TfrViewProveedor inherited eMailParticular: TcxDBHyperLinkEdit Left = 497 Properties.Prefix = 'mailto:' - TabOrder = 18 + TabOrder = 19 ExplicitLeft = 497 ExplicitWidth = 133 Width = 133 end inherited ePaginaWeb: TcxDBHyperLinkEdit Left = 497 - TabOrder = 19 + TabOrder = 20 ExplicitLeft = 497 ExplicitWidth = 133 Width = 133 @@ -277,7 +277,7 @@ inherited frViewProveedor: TfrViewProveedor inherited ePersonaContacto: TcxDBTextEdit Left = 138 Top = 353 - TabOrder = 6 + TabOrder = 7 ExplicitLeft = 138 ExplicitTop = 353 ExplicitWidth = 256 @@ -286,7 +286,7 @@ inherited frViewProveedor: TfrViewProveedor inherited frViewTienda1: TfrViewTienda Left = 402 Width = 290 - TabOrder = 20 + TabOrder = 21 ExplicitLeft = 402 ExplicitWidth = 290 inherited dxLayoutControl1: TdxLayoutControl @@ -298,10 +298,35 @@ inherited frViewProveedor: TfrViewProveedor end end end + object eNombreComercial: TcxDBTextEdit [27] + Left = 138 + Top = 82 + DataBinding.DataField = 'NOMBRE_COMERCIAL' + DataBinding.DataSource = dsContacto + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.Color = clWindow + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 3 + Width = 192 + end inherited dxLayoutControlContactoGroup_Root: TdxLayoutGroup inherited dxLayoutControlContactoGroup9: TdxLayoutGroup inherited dxLayoutControlContactoGroup4: TdxLayoutGroup inherited dxLayoutControlContactoGroup1: TdxLayoutGroup + object dxLayoutControlContactoItem27: TdxLayoutItem + Caption = 'Nombre comercial:' + Control = eNombreComercial + ControlOptions.ShowBorder = False + end object dxLayoutControlContactoItem21: TdxLayoutItem Caption = 'Proveedor de...:' Control = eDescripcionProveedor diff --git a/Source/Modulos/Contactos/Views/uViewProveedor.pas b/Source/Modulos/Contactos/Views/uViewProveedor.pas index e8c84c44..ad5b622c 100644 --- a/Source/Modulos/Contactos/Views/uViewProveedor.pas +++ b/Source/Modulos/Contactos/Views/uViewProveedor.pas @@ -32,6 +32,8 @@ type dxLayoutControlContactoItem24: TdxLayoutItem; eCodigoAsignado: TcxDBTextEdit; dxLayoutControlContactoItem26: TdxLayoutItem; + dxLayoutControlContactoItem27: TdxLayoutItem; + eNombreComercial: TcxDBTextEdit; procedure CustomViewCreate(Sender: TObject); procedure CustomViewDestroy(Sender: TObject); procedure cbGrupoProveedorPropertiesInitPopup(Sender: TObject); diff --git a/Source/Modulos/Contactos/Views/uViewProveedores.dfm b/Source/Modulos/Contactos/Views/uViewProveedores.dfm index f95c6fcd..0a92b6b3 100644 --- a/Source/Modulos/Contactos/Views/uViewProveedores.dfm +++ b/Source/Modulos/Contactos/Views/uViewProveedores.dfm @@ -34,6 +34,10 @@ inherited frViewProveedores: TfrViewProveedores Options.HorzSizing = False Width = 22 end + object cxGridViewNOMBRE_COMERCIAL: TcxGridDBColumn [6] + Caption = 'Nombre comercial' + DataBinding.FieldName = 'NOMBRE_COMERCIAL' + end end end inherited frViewFiltroBase1: TfrViewFiltroBase @@ -44,7 +48,17 @@ inherited frViewProveedores: TfrViewProveedores inherited dxLayoutControl1: TdxLayoutControl Width = 483 ExplicitWidth = 483 + inherited txtFiltroTodo: TcxTextEdit + ExplicitWidth = 273 + Width = 273 + end + inherited edtFechaIniFiltro: TcxDateEdit + ExplicitWidth = 121 + Width = 121 + end inherited edtFechaFinFiltro: TcxDateEdit + Left = 234 + ExplicitLeft = 234 ExplicitWidth = 228 Width = 228 end diff --git a/Source/Modulos/Contactos/Views/uViewProveedores.pas b/Source/Modulos/Contactos/Views/uViewProveedores.pas index 0c6235836581b6db3da6894e4aa5db766fe954e1..14ad6ca8b760b47e2e4a9937bf3c25b232897af5 100644 GIT binary patch delta 40 vcmeyyzJg=Jab_6>h2#qNqRf=A%+zu}e_y8{*LY`tU)LaKPe-508<|}JCg2Ud delta 11 ScmZ3%@r`}MapuWCne_o5W(4K{ diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas index de9cb951..38e545d3 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas @@ -6,7 +6,7 @@ interface uses Classes, SysUtils, uDADataTable, uControllerBase, uIDataModuleFacturasCliente, uClientesController, uDetallesFacturaClienteController, uBizAlbaranesCliente, - uBizFacturasCliente; + uBizFacturasCliente, uBizDireccionesContacto; type IFacturasClienteController = interface(IObservador) @@ -49,6 +49,8 @@ type function ElegirFacturas(AFacturas : IBizFacturaCliente; AMensaje: String; AMultiSelect: Boolean): IBizFacturaCliente; function ExtraerSeleccionados(ARecibosCliente: IBizFacturaCliente) : IBizFacturaCliente; + procedure CopiarDireccion (const ADireccionEnvio: IBizDireccionesContacto; AFactura: IBizFacturaCliente); + procedure SetID_Tienda (AFactura: IBizFacturaCliente; const ID_Tienda: Integer); procedure SetIdSubcuenta (AFactura: IBizFacturaCliente; const IdSubCuenta: Integer); procedure SetIgnorarContabilidad (AFactura: IBizFacturaCliente; const Ignorar: Integer); @@ -112,6 +114,8 @@ type function ElegirFacturas(AFacturas : IBizFacturaCliente; AMensaje: String; AMultiSelect: Boolean): IBizFacturaCliente; function ExtraerSeleccionados(AFacturasCliente: IBizFacturaCliente) : IBizFacturaCliente; + procedure CopiarDireccion (const ADireccionEnvio: IBizDireccionesContacto; AFactura: IBizFacturaCliente); + procedure SetID_Tienda (AFactura: IBizFacturaCliente; const ID_Tienda: Integer); procedure SetIdSubcuenta (AFactura: IBizFacturaCliente; const IdSubCuenta: Integer); procedure SetIgnorarContabilidad (AFactura: IBizFacturaCliente; const Ignorar: Integer); @@ -500,6 +504,44 @@ begin FiltrarEmpresa(Result); end; +procedure TFacturasClienteController.CopiarDireccion( + const ADireccionEnvio: IBizDireccionesContacto; AFactura: IBizFacturaCliente); +var + bEnEdicion : Boolean; +begin + if not Assigned(AFactura) then + raise Exception.Create ('Factura no asignado (CopiarDireccionEnvio)'); + + if not Assigned(ADireccionEnvio) then + raise Exception.Create ('No se ha indicado la dirección (CopiarDireccionEnvio)'); + + if AFactura.DataTable.Active then + AFactura.DataTable.Active := True; + + if ADireccionEnvio.DataTable.Active then + ADireccionEnvio.DataTable.Active := True; + + bEnEdicion := (AFactura.DataTable.State in dsEditModes); + if not bEnEdicion then + AFactura.Edit; + + ShowHourglassCursor; + AFactura.Edit; + try + AFactura.CALLE := ADireccionEnvio.CALLE; + AFactura.POBLACION := ADireccionEnvio.POBLACION; + AFactura.CODIGO_POSTAL := ADireccionEnvio.CODIGO_POSTAL; + AFactura.PROVINCIA := ADireccionEnvio.PROVINCIA; + AFactura.NIF_CIF := ADireccionEnvio.NIF_CIF; + AFactura.NOMBRE := ADireccionEnvio.NOMBRE; + + if not bEnEdicion then + AFactura.Post; + finally + HideHourglassCursor; + end; +end; + constructor TFacturasClienteController.Create; begin inherited; diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm index a147dbc1..57212e2c 100644 --- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm @@ -137,6 +137,16 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente DataType = datInteger DictionaryEntry = 'FacturasCliente_ID_CLIENTE' end + item + Name = 'NOMBRE_CLIENTE' + DataType = datString + Size = 255 + end + item + Name = 'NOMBRE_COMERCIAL_CLIENTE' + DataType = datString + Size = 255 + end item Name = 'NIF_CIF' DataType = datString diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas index 7c3cb5a1..30c4d252 100644 --- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas +++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_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_FacturasCliente = '{002FC909-9064-4D9C-AA64-A28325D42EC4}'; - RID_FacturasCliente_Detalles = '{9A3BDA83-5AEB-4FD6-8914-CFDE2AE53C06}'; + RID_FacturasCliente = '{C39C2786-BDB8-49DE-9EAC-91698C9EBFFA}'; + RID_FacturasCliente_Detalles = '{263850A9-538B-4EC7-B310-3E4C2EE93339}'; { Data table names } nme_FacturasCliente = 'FacturasCliente'; @@ -34,6 +34,8 @@ const fld_FacturasClienteIMPORTE_TOTAL = 'IMPORTE_TOTAL'; fld_FacturasClienteOBSERVACIONES = 'OBSERVACIONES'; fld_FacturasClienteID_CLIENTE = 'ID_CLIENTE'; + fld_FacturasClienteNOMBRE_CLIENTE = 'NOMBRE_CLIENTE'; + fld_FacturasClienteNOMBRE_COMERCIAL_CLIENTE = 'NOMBRE_COMERCIAL_CLIENTE'; fld_FacturasClienteNIF_CIF = 'NIF_CIF'; fld_FacturasClienteNOMBRE = 'NOMBRE'; fld_FacturasClienteCALLE = 'CALLE'; @@ -74,27 +76,29 @@ const idx_FacturasClienteIMPORTE_TOTAL = 14; idx_FacturasClienteOBSERVACIONES = 15; idx_FacturasClienteID_CLIENTE = 16; - idx_FacturasClienteNIF_CIF = 17; - idx_FacturasClienteNOMBRE = 18; - idx_FacturasClienteCALLE = 19; - idx_FacturasClientePOBLACION = 20; - idx_FacturasClientePROVINCIA = 21; - idx_FacturasClienteCODIGO_POSTAL = 22; - idx_FacturasClienteFECHA_ALTA = 23; - idx_FacturasClienteFECHA_MODIFICACION = 24; - idx_FacturasClienteUSUARIO = 25; - idx_FacturasClienteID_FORMA_PAGO = 26; - idx_FacturasClienteRECARGO_EQUIVALENCIA = 27; - idx_FacturasClienteID_TIPO_IVA = 28; - idx_FacturasClienteIMPORTE_NETO = 29; - idx_FacturasClienteIMPORTE_PORTE = 30; - idx_FacturasClienteID_AGENTE = 31; - idx_FacturasClienteREFERENCIA_COMISION = 32; - idx_FacturasClienteIGNORAR_CONTABILIDAD = 33; - idx_FacturasClienteID_TIENDA = 34; - idx_FacturasClienteTIENDA = 35; - idx_FacturasClienteID_SUBCUENTA = 36; - idx_FacturasClienteSUBCUENTA = 37; + idx_FacturasClienteNOMBRE_CLIENTE = 17; + idx_FacturasClienteNOMBRE_COMERCIAL_CLIENTE = 18; + idx_FacturasClienteNIF_CIF = 19; + idx_FacturasClienteNOMBRE = 20; + idx_FacturasClienteCALLE = 21; + idx_FacturasClientePOBLACION = 22; + idx_FacturasClientePROVINCIA = 23; + idx_FacturasClienteCODIGO_POSTAL = 24; + idx_FacturasClienteFECHA_ALTA = 25; + idx_FacturasClienteFECHA_MODIFICACION = 26; + idx_FacturasClienteUSUARIO = 27; + idx_FacturasClienteID_FORMA_PAGO = 28; + idx_FacturasClienteRECARGO_EQUIVALENCIA = 29; + idx_FacturasClienteID_TIPO_IVA = 30; + idx_FacturasClienteIMPORTE_NETO = 31; + idx_FacturasClienteIMPORTE_PORTE = 32; + idx_FacturasClienteID_AGENTE = 33; + idx_FacturasClienteREFERENCIA_COMISION = 34; + idx_FacturasClienteIGNORAR_CONTABILIDAD = 35; + idx_FacturasClienteID_TIENDA = 36; + idx_FacturasClienteTIENDA = 37; + idx_FacturasClienteID_SUBCUENTA = 38; + idx_FacturasClienteSUBCUENTA = 39; { FacturasCliente_Detalles fields } fld_FacturasCliente_DetallesID = 'ID'; @@ -131,7 +135,7 @@ const type { IFacturasCliente } IFacturasCliente = interface(IDAStronglyTypedDataTable) - ['{77B09FE8-CC07-4A1D-87AA-D36AEB54D2BE}'] + ['{DAB1C0BD-33A9-4AFD-B37A-5402F2FAC3A5}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -200,6 +204,14 @@ type procedure SetID_CLIENTEValue(const aValue: Integer); function GetID_CLIENTEIsNull: Boolean; procedure SetID_CLIENTEIsNull(const aValue: Boolean); + function GetNOMBRE_CLIENTEValue: String; + procedure SetNOMBRE_CLIENTEValue(const aValue: String); + function GetNOMBRE_CLIENTEIsNull: Boolean; + procedure SetNOMBRE_CLIENTEIsNull(const aValue: Boolean); + function GetNOMBRE_COMERCIAL_CLIENTEValue: String; + procedure SetNOMBRE_COMERCIAL_CLIENTEValue(const aValue: String); + function GetNOMBRE_COMERCIAL_CLIENTEIsNull: Boolean; + procedure SetNOMBRE_COMERCIAL_CLIENTEIsNull(const aValue: Boolean); function GetNIF_CIFValue: String; procedure SetNIF_CIFValue(const aValue: String); function GetNIF_CIFIsNull: Boolean; @@ -321,6 +333,10 @@ type property OBSERVACIONESIsNull: Boolean read GetOBSERVACIONESIsNull write SetOBSERVACIONESIsNull; property ID_CLIENTE: Integer read GetID_CLIENTEValue write SetID_CLIENTEValue; property ID_CLIENTEIsNull: Boolean read GetID_CLIENTEIsNull write SetID_CLIENTEIsNull; + property NOMBRE_CLIENTE: String read GetNOMBRE_CLIENTEValue write SetNOMBRE_CLIENTEValue; + property NOMBRE_CLIENTEIsNull: Boolean read GetNOMBRE_CLIENTEIsNull write SetNOMBRE_CLIENTEIsNull; + 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; property NIF_CIFIsNull: Boolean read GetNIF_CIFIsNull write SetNIF_CIFIsNull; property NOMBRE: String read GetNOMBREValue write SetNOMBREValue; @@ -439,6 +455,14 @@ type procedure SetID_CLIENTEValue(const aValue: Integer); virtual; function GetID_CLIENTEIsNull: Boolean; virtual; procedure SetID_CLIENTEIsNull(const aValue: Boolean); virtual; + function GetNOMBRE_CLIENTEValue: String; virtual; + procedure SetNOMBRE_CLIENTEValue(const aValue: String); virtual; + function GetNOMBRE_CLIENTEIsNull: Boolean; virtual; + procedure SetNOMBRE_CLIENTEIsNull(const aValue: Boolean); virtual; + function GetNOMBRE_COMERCIAL_CLIENTEValue: String; virtual; + procedure SetNOMBRE_COMERCIAL_CLIENTEValue(const aValue: String); virtual; + function GetNOMBRE_COMERCIAL_CLIENTEIsNull: Boolean; virtual; + procedure SetNOMBRE_COMERCIAL_CLIENTEIsNull(const aValue: Boolean); virtual; function GetNIF_CIFValue: String; virtual; procedure SetNIF_CIFValue(const aValue: String); virtual; function GetNIF_CIFIsNull: Boolean; virtual; @@ -559,6 +583,10 @@ type property OBSERVACIONESIsNull: Boolean read GetOBSERVACIONESIsNull write SetOBSERVACIONESIsNull; property ID_CLIENTE: Integer read GetID_CLIENTEValue write SetID_CLIENTEValue; property ID_CLIENTEIsNull: Boolean read GetID_CLIENTEIsNull write SetID_CLIENTEIsNull; + property NOMBRE_CLIENTE: String read GetNOMBRE_CLIENTEValue write SetNOMBRE_CLIENTEValue; + property NOMBRE_CLIENTEIsNull: Boolean read GetNOMBRE_CLIENTEIsNull write SetNOMBRE_CLIENTEIsNull; + 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; property NIF_CIFIsNull: Boolean read GetNIF_CIFIsNull write SetNIF_CIFIsNull; property NOMBRE: String read GetNOMBREValue write SetNOMBREValue; @@ -610,7 +638,7 @@ type { IFacturasCliente_Detalles } IFacturasCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{5705755D-4FD6-4B5E-B60C-72155D3868DD}'] + ['{D3CAD64F-1C21-4C1F-9BEE-04D8DAD24072}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1178,6 +1206,48 @@ begin DataTable.Fields[idx_FacturasClienteID_CLIENTE].AsVariant := Null; end; +function TFacturasClienteDataTableRules.GetNOMBRE_CLIENTEValue: String; +begin + result := DataTable.Fields[idx_FacturasClienteNOMBRE_CLIENTE].AsString; +end; + +procedure TFacturasClienteDataTableRules.SetNOMBRE_CLIENTEValue(const aValue: String); +begin + DataTable.Fields[idx_FacturasClienteNOMBRE_CLIENTE].AsString := aValue; +end; + +function TFacturasClienteDataTableRules.GetNOMBRE_CLIENTEIsNull: boolean; +begin + result := DataTable.Fields[idx_FacturasClienteNOMBRE_CLIENTE].IsNull; +end; + +procedure TFacturasClienteDataTableRules.SetNOMBRE_CLIENTEIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_FacturasClienteNOMBRE_CLIENTE].AsVariant := Null; +end; + +function TFacturasClienteDataTableRules.GetNOMBRE_COMERCIAL_CLIENTEValue: String; +begin + result := DataTable.Fields[idx_FacturasClienteNOMBRE_COMERCIAL_CLIENTE].AsString; +end; + +procedure TFacturasClienteDataTableRules.SetNOMBRE_COMERCIAL_CLIENTEValue(const aValue: String); +begin + DataTable.Fields[idx_FacturasClienteNOMBRE_COMERCIAL_CLIENTE].AsString := aValue; +end; + +function TFacturasClienteDataTableRules.GetNOMBRE_COMERCIAL_CLIENTEIsNull: boolean; +begin + result := DataTable.Fields[idx_FacturasClienteNOMBRE_COMERCIAL_CLIENTE].IsNull; +end; + +procedure TFacturasClienteDataTableRules.SetNOMBRE_COMERCIAL_CLIENTEIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_FacturasClienteNOMBRE_COMERCIAL_CLIENTE].AsVariant := Null; +end; + function TFacturasClienteDataTableRules.GetNIF_CIFValue: String; begin result := DataTable.Fields[idx_FacturasClienteNIF_CIF].AsString; diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas index c0494a7f..608a4b22 100644 --- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas +++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas @@ -9,13 +9,13 @@ 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_FacturasClienteDelta = '{9F142F33-556F-41B3-A527-27FF1BDAB48E}'; - RID_FacturasCliente_DetallesDelta = '{A97D0506-4C6F-4078-A30F-8768419E7E0F}'; + RID_FacturasClienteDelta = '{46477AC1-BF12-4410-9EA7-3D1C21A049B9}'; + RID_FacturasCliente_DetallesDelta = '{64DA04CA-425B-42E0-A86A-4B521E488AA9}'; type { IFacturasClienteDelta } IFacturasClienteDelta = interface(IFacturasCliente) - ['{9F142F33-556F-41B3-A527-27FF1BDAB48E}'] + ['{46477AC1-BF12-4410-9EA7-3D1C21A049B9}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -34,6 +34,8 @@ type function GetOldIMPORTE_TOTALValue : Currency; function GetOldOBSERVACIONESValue : IROStrings; function GetOldID_CLIENTEValue : Integer; + function GetOldNOMBRE_CLIENTEValue : String; + function GetOldNOMBRE_COMERCIAL_CLIENTEValue : String; function GetOldNIF_CIFValue : String; function GetOldNOMBREValue : String; function GetOldCALLEValue : String; @@ -74,6 +76,8 @@ type property OldIMPORTE_TOTAL : Currency read GetOldIMPORTE_TOTALValue; property OldOBSERVACIONES : IROStrings read GetOldOBSERVACIONESValue; property OldID_CLIENTE : Integer read GetOldID_CLIENTEValue; + property OldNOMBRE_CLIENTE : String read GetOldNOMBRE_CLIENTEValue; + property OldNOMBRE_COMERCIAL_CLIENTE : String read GetOldNOMBRE_COMERCIAL_CLIENTEValue; property OldNIF_CIF : String read GetOldNIF_CIFValue; property OldNOMBRE : String read GetOldNOMBREValue; property OldCALLE : String read GetOldCALLEValue; @@ -205,6 +209,18 @@ type function GetOldID_CLIENTEIsNull: Boolean; virtual; procedure SetID_CLIENTEValue(const aValue: Integer); virtual; procedure SetID_CLIENTEIsNull(const aValue: Boolean); virtual; + function GetNOMBRE_CLIENTEValue: String; virtual; + function GetNOMBRE_CLIENTEIsNull: Boolean; virtual; + function GetOldNOMBRE_CLIENTEValue: String; virtual; + function GetOldNOMBRE_CLIENTEIsNull: Boolean; virtual; + procedure SetNOMBRE_CLIENTEValue(const aValue: String); virtual; + procedure SetNOMBRE_CLIENTEIsNull(const aValue: Boolean); virtual; + function GetNOMBRE_COMERCIAL_CLIENTEValue: String; virtual; + function GetNOMBRE_COMERCIAL_CLIENTEIsNull: Boolean; virtual; + function GetOldNOMBRE_COMERCIAL_CLIENTEValue: String; virtual; + function GetOldNOMBRE_COMERCIAL_CLIENTEIsNull: Boolean; virtual; + procedure SetNOMBRE_COMERCIAL_CLIENTEValue(const aValue: String); virtual; + procedure SetNOMBRE_COMERCIAL_CLIENTEIsNull(const aValue: Boolean); virtual; function GetNIF_CIFValue: String; virtual; function GetNIF_CIFIsNull: Boolean; virtual; function GetOldNIF_CIFValue: String; virtual; @@ -401,6 +417,14 @@ 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 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; + property OldNOMBRE_CLIENTEIsNull : Boolean read GetOldNOMBRE_CLIENTEIsNull; + 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; + property OldNOMBRE_COMERCIAL_CLIENTEIsNull : Boolean read GetOldNOMBRE_COMERCIAL_CLIENTEIsNull; property NIF_CIF : String read GetNIF_CIFValue write SetNIF_CIFValue; property NIF_CIFIsNull : Boolean read GetNIF_CIFIsNull write SetNIF_CIFIsNull; property OldNIF_CIF : String read GetOldNIF_CIFValue; @@ -494,7 +518,7 @@ type { IFacturasCliente_DetallesDelta } IFacturasCliente_DetallesDelta = interface(IFacturasCliente_Detalles) - ['{A97D0506-4C6F-4078-A30F-8768419E7E0F}'] + ['{64DA04CA-425B-42E0-A86A-4B521E488AA9}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_FACTURAValue : Integer; @@ -1233,6 +1257,68 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_CLIENTE] := Null; end; +function TFacturasClienteBusinessProcessorRules.GetNOMBRE_CLIENTEValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_CLIENTE]; +end; + +function TFacturasClienteBusinessProcessorRules.GetNOMBRE_CLIENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_CLIENTE]); +end; + +function TFacturasClienteBusinessProcessorRules.GetOldNOMBRE_CLIENTEValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteNOMBRE_CLIENTE]; +end; + +function TFacturasClienteBusinessProcessorRules.GetOldNOMBRE_CLIENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteNOMBRE_CLIENTE]); +end; + +procedure TFacturasClienteBusinessProcessorRules.SetNOMBRE_CLIENTEValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_CLIENTE] := aValue; +end; + +procedure TFacturasClienteBusinessProcessorRules.SetNOMBRE_CLIENTEIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_CLIENTE] := Null; +end; + +function TFacturasClienteBusinessProcessorRules.GetNOMBRE_COMERCIAL_CLIENTEValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_COMERCIAL_CLIENTE]; +end; + +function TFacturasClienteBusinessProcessorRules.GetNOMBRE_COMERCIAL_CLIENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_COMERCIAL_CLIENTE]); +end; + +function TFacturasClienteBusinessProcessorRules.GetOldNOMBRE_COMERCIAL_CLIENTEValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteNOMBRE_COMERCIAL_CLIENTE]; +end; + +function TFacturasClienteBusinessProcessorRules.GetOldNOMBRE_COMERCIAL_CLIENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteNOMBRE_COMERCIAL_CLIENTE]); +end; + +procedure TFacturasClienteBusinessProcessorRules.SetNOMBRE_COMERCIAL_CLIENTEValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_COMERCIAL_CLIENTE] := aValue; +end; + +procedure TFacturasClienteBusinessProcessorRules.SetNOMBRE_COMERCIAL_CLIENTEIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_COMERCIAL_CLIENTE] := Null; +end; + function TFacturasClienteBusinessProcessorRules.GetNIF_CIFValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNIF_CIF]; diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm index 36a41fc0..dafbbead 100644 --- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm +++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm @@ -174,6 +174,14 @@ object srvFacturasCliente: TsrvFacturasCliente item DatasetField = 'SUBCUENTA' TableField = 'SUBCUENTA' + end + item + DatasetField = 'NOMBRE_CLIENTE' + TableField = 'NOMBRE_CLIENTE' + end + item + DatasetField = 'NOMBRE_COMERCIAL_CLIENTE' + TableField = 'NOMBRE_COMERCIAL_CLIENTE' end> end> Name = 'FacturasCliente' @@ -269,6 +277,16 @@ object srvFacturasCliente: TsrvFacturasCliente DataType = datInteger DictionaryEntry = 'FacturasCliente_ID_CLIENTE' end + item + Name = 'NOMBRE_CLIENTE' + DataType = datString + Size = 255 + end + item + Name = 'NOMBRE_COMERCIAL_CLIENTE' + DataType = datString + Size = 255 + end item Name = 'NIF_CIF' DataType = datString diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk index 6101ab36..4353ed5e 100644 --- a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk +++ b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk @@ -32,7 +32,27 @@ requires Articulos_view, AlbCli_FacCli_relation, Contabilidad_view, - Contabilidad_controller; + Contabilidad_controller, + vcl, + rtl, + dbrtl, + DataAbstract_Core_D11, + vcldb, + dsnap, + adortl, + RemObjects_Core_D11, + PngComponentsD10, + PNG_D10, + vclactnband, + vclx, + cxLibraryD11, + dxThemeD11, + dxGDIPlusD11, + cxEditorsD11, + cxDataD11, + vcljpg, + dxLayoutControlD11, + dxComnD11; contains uFacturasClienteViewRegister in 'uFacturasClienteViewRegister.pas', @@ -44,6 +64,7 @@ contains uEditorFacturasClienteReport in 'uEditorFacturasClienteReport.pas' {fEditorFacturasClientePreview}, uEditorElegirArticulosFacturaCliente in 'uEditorElegirArticulosFacturaCliente.pas' {fEditorElegirArticulosFacturaCliente: TForm}, uViewElegirArticulosFacturasCliente in 'uViewElegirArticulosFacturasCliente.pas' {frViewElegirArticulosFacturasCliente: TFrame}, - uEditorElegirFacturasCliente in 'uEditorElegirFacturasCliente.pas' {fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente}; + uEditorElegirFacturasCliente in 'uEditorElegirFacturasCliente.pas' {fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente}, + uViewClienteFactura in 'uViewClienteFactura.pas' {frViewClienteFactura: TFrame}; end. diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj index 9018a5b9..abe68168 100644 --- a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj +++ b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj @@ -49,14 +49,29 @@ MainSource - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + +
fEditorElegirArticulosFacturaCliente
TForm @@ -77,6 +92,10 @@
fEditorFacturasClientePreview
+ +
frViewClienteFactura
+ TFrame +
frViewDetallesFacturaCliente
TFrame @@ -93,6 +112,11 @@
frViewFacturasCliente
TFrame
+ + + + +