diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index dacabcf4..ea9f1f71 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -566,6 +566,7 @@ CREATE TABLE CLIENTES_DATOS ( DESCUENTO TIPO_PORCENTAJE, CODIGO_ASIGNADO VARCHAR(255), IGNORAR_CONTABILIDAD TIPO_ID, + TIENE_SUBCUENTA TIPO_ID, PROCEDENCIA_CLIENTE VARCHAR(255) COLLATE ES_ES ); @@ -1192,7 +1193,8 @@ CREATE TABLE PROVEEDORES_DATOS ( CODIGO_ASIGNADO VARCHAR(255), CERTIFICACION VARCHAR(255), HOMOLOGADO SMALLINT, - IGNORAR_CONTABILIDAD TIPO_ID + IGNORAR_CONTABILIDAD TIPO_ID, + TIENE_SUBCUENTA TIPO_ID ); CREATE TABLE PROVEEDORES_GRUPOS ( @@ -1769,50 +1771,52 @@ CREATE VIEW V_CLIENTES( TIENDA_WEB, CODIGO_ASIGNADO, IGNORAR_CONTABILIDAD, + TIENE_SUBCUENTA, PROCEDENCIA_CLIENTE) AS -SELECT - V_CONTACTOS.ID, - V_CONTACTOS.ID_CATEGORIA, - V_CONTACTOS.NIF_CIF, - V_CONTACTOS.NOMBRE, - V_CONTACTOS.PERSONA_CONTACTO, - V_CONTACTOS.CALLE, - V_CONTACTOS.POBLACION, - V_CONTACTOS.PROVINCIA, - V_CONTACTOS.CODIGO_POSTAL, - V_CONTACTOS.TELEFONO_1, - V_CONTACTOS.TELEFONO_2, - V_CONTACTOS.MOVIL_1, - V_CONTACTOS.MOVIL_2, - V_CONTACTOS.FAX, - V_CONTACTOS.EMAIL_1, - V_CONTACTOS.EMAIL_2, - V_CONTACTOS.PAGINA_WEB, - V_CONTACTOS.NOTAS, - V_CONTACTOS.FECHA_ALTA, - V_CONTACTOS.FECHA_MODIFICACION, - V_CONTACTOS.USUARIO, - V_CONTACTOS.ID_EMPRESA, - V_CONTACTOS.REFERENCIA, - V_CONTACTOS.ID_TIENDA, - V_CONTACTOS.TIENDA, - CLIENTES_DATOS.GRUPO_CLIENTE, - CLIENTES_DATOS.NOMBRE_COMERCIAL, - CLIENTES_DATOS.VENCIMIENTO_FACTURAS, - CLIENTES_DATOS.BLOQUEADO, - CLIENTES_DATOS.REGIMEN_IVA, - CLIENTES_DATOS.MOTIVO_BLOQUEO, - CLIENTES_DATOS.RECARGO_EQUIVALENCIA, - CLIENTES_DATOS.ID_TIPO_IVA, - CLIENTES_DATOS.ID_FORMA_PAGO, - CLIENTES_DATOS.TIENDA_WEB, - CLIENTES_DATOS.CODIGO_ASIGNADO, - CLIENTES_DATOS.IGNORAR_CONTABILIDAD, - CLIENTES_DATOS.PROCEDENCIA_CLIENTE -FROM V_CONTACTOS - LEFT OUTER JOIN CLIENTES_DATOS ON (V_CONTACTOS.ID = CLIENTES_DATOS.ID_CLIENTE) -WHERE +SELECT + V_CONTACTOS.ID, + V_CONTACTOS.ID_CATEGORIA, + V_CONTACTOS.NIF_CIF, + V_CONTACTOS.NOMBRE, + V_CONTACTOS.PERSONA_CONTACTO, + V_CONTACTOS.CALLE, + V_CONTACTOS.POBLACION, + V_CONTACTOS.PROVINCIA, + V_CONTACTOS.CODIGO_POSTAL, + V_CONTACTOS.TELEFONO_1, + V_CONTACTOS.TELEFONO_2, + V_CONTACTOS.MOVIL_1, + V_CONTACTOS.MOVIL_2, + V_CONTACTOS.FAX, + V_CONTACTOS.EMAIL_1, + V_CONTACTOS.EMAIL_2, + V_CONTACTOS.PAGINA_WEB, + V_CONTACTOS.NOTAS, + V_CONTACTOS.FECHA_ALTA, + V_CONTACTOS.FECHA_MODIFICACION, + V_CONTACTOS.USUARIO, + V_CONTACTOS.ID_EMPRESA, + V_CONTACTOS.REFERENCIA, + V_CONTACTOS.ID_TIENDA, + V_CONTACTOS.TIENDA, + CLIENTES_DATOS.GRUPO_CLIENTE, + CLIENTES_DATOS.NOMBRE_COMERCIAL, + CLIENTES_DATOS.VENCIMIENTO_FACTURAS, + CLIENTES_DATOS.BLOQUEADO, + CLIENTES_DATOS.REGIMEN_IVA, + CLIENTES_DATOS.MOTIVO_BLOQUEO, + CLIENTES_DATOS.RECARGO_EQUIVALENCIA, + CLIENTES_DATOS.ID_TIPO_IVA, + CLIENTES_DATOS.ID_FORMA_PAGO, + CLIENTES_DATOS.TIENDA_WEB, + CLIENTES_DATOS.CODIGO_ASIGNADO, + CLIENTES_DATOS.IGNORAR_CONTABILIDAD, + CLIENTES_DATOS.TIENE_SUBCUENTA, + CLIENTES_DATOS.PROCEDENCIA_CLIENTE +FROM V_CONTACTOS + LEFT OUTER JOIN CLIENTES_DATOS ON (V_CONTACTOS.ID = CLIENTES_DATOS.ID_CLIENTE) +WHERE V_CONTACTOS.ID_CATEGORIA = 1 ; @@ -3053,49 +3057,51 @@ CREATE VIEW V_PROVEEDORES( TIENDA_WEB, HOMOLOGADO, CERTIFICACION, - IGNORAR_CONTABILIDAD) + IGNORAR_CONTABILIDAD, + TIENE_SUBCUENTA) AS -SELECT - V_CONTACTOS.ID, - V_CONTACTOS.ID_CATEGORIA, - V_CONTACTOS.NIF_CIF, - V_CONTACTOS.NOMBRE, - V_CONTACTOS.PERSONA_CONTACTO, - V_CONTACTOS.CALLE, - V_CONTACTOS.POBLACION, - V_CONTACTOS.PROVINCIA, - V_CONTACTOS.CODIGO_POSTAL, - V_CONTACTOS.TELEFONO_1, - V_CONTACTOS.TELEFONO_2, - V_CONTACTOS.MOVIL_1, - V_CONTACTOS.MOVIL_2, - V_CONTACTOS.FAX, - V_CONTACTOS.EMAIL_1, - V_CONTACTOS.EMAIL_2, - V_CONTACTOS.PAGINA_WEB, - V_CONTACTOS.NOTAS, - V_CONTACTOS.FECHA_ALTA, - V_CONTACTOS.FECHA_MODIFICACION, - V_CONTACTOS.USUARIO, - V_CONTACTOS.ID_EMPRESA, - V_CONTACTOS.REFERENCIA, - V_CONTACTOS.ID_TIENDA, - V_CONTACTOS.TIENDA, - PROVEEDORES_DATOS.DESCUENTO, - PROVEEDORES_DATOS.DESCRIPCION_PROVEEDOR, - PROVEEDORES_DATOS.CODIGO_ASIGNADO, - PROVEEDORES_DATOS.GRUPO_PROVEEDOR, - PROVEEDORES_DATOS.REGIMEN_IVA, - PROVEEDORES_DATOS.ID_TIPO_IVA, - PROVEEDORES_DATOS.ID_FORMA_PAGO, - PROVEEDORES_DATOS.TIENDA_WEB, - PROVEEDORES_DATOS.HOMOLOGADO, - PROVEEDORES_DATOS.CERTIFICACION, - PROVEEDORES_DATOS.IGNORAR_CONTABILIDAD -FROM - PROVEEDORES_DATOS - INNER JOIN V_CONTACTOS ON (PROVEEDORES_DATOS.ID_PROVEEDOR = V_CONTACTOS.ID) -WHERE +SELECT + V_CONTACTOS.ID, + V_CONTACTOS.ID_CATEGORIA, + V_CONTACTOS.NIF_CIF, + V_CONTACTOS.NOMBRE, + V_CONTACTOS.PERSONA_CONTACTO, + V_CONTACTOS.CALLE, + V_CONTACTOS.POBLACION, + V_CONTACTOS.PROVINCIA, + V_CONTACTOS.CODIGO_POSTAL, + V_CONTACTOS.TELEFONO_1, + V_CONTACTOS.TELEFONO_2, + V_CONTACTOS.MOVIL_1, + V_CONTACTOS.MOVIL_2, + V_CONTACTOS.FAX, + V_CONTACTOS.EMAIL_1, + V_CONTACTOS.EMAIL_2, + V_CONTACTOS.PAGINA_WEB, + V_CONTACTOS.NOTAS, + V_CONTACTOS.FECHA_ALTA, + V_CONTACTOS.FECHA_MODIFICACION, + V_CONTACTOS.USUARIO, + V_CONTACTOS.ID_EMPRESA, + V_CONTACTOS.REFERENCIA, + V_CONTACTOS.ID_TIENDA, + V_CONTACTOS.TIENDA, + PROVEEDORES_DATOS.DESCUENTO, + PROVEEDORES_DATOS.DESCRIPCION_PROVEEDOR, + PROVEEDORES_DATOS.CODIGO_ASIGNADO, + PROVEEDORES_DATOS.GRUPO_PROVEEDOR, + PROVEEDORES_DATOS.REGIMEN_IVA, + PROVEEDORES_DATOS.ID_TIPO_IVA, + PROVEEDORES_DATOS.ID_FORMA_PAGO, + PROVEEDORES_DATOS.TIENDA_WEB, + PROVEEDORES_DATOS.HOMOLOGADO, + PROVEEDORES_DATOS.CERTIFICACION, + PROVEEDORES_DATOS.IGNORAR_CONTABILIDAD, + PROVEEDORES_DATOS.TIENE_SUBCUENTA +FROM + PROVEEDORES_DATOS + INNER JOIN V_CONTACTOS ON (PROVEEDORES_DATOS.ID_PROVEEDOR = V_CONTACTOS.ID) +WHERE V_CONTACTOS.ID_CATEGORIA = 2 ; diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index 9837f7e7..50c04110 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -58,47 +58,47 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fConfigurarConexion
diff --git a/Source/Modulos/Contabilidad/Controller/uAsientosController.pas b/Source/Modulos/Contabilidad/Controller/uAsientosController.pas index 85df2002..fa13bfd2 100644 --- a/Source/Modulos/Contabilidad/Controller/uAsientosController.pas +++ b/Source/Modulos/Contabilidad/Controller/uAsientosController.pas @@ -14,7 +14,8 @@ type procedure VerDiario(ADiario: IBizDiario); procedure Ver(AAsiento: IBizAsiento); function Anadir(NumOrden:Integer): IBizAsiento; - function Eliminar(AAsiento : IBizAsiento): Boolean; + function Eliminar(IDAsiento : Integer): Boolean; overload; + function Eliminar(AAsiento : IBizAsiento): Boolean; overload; function Guardar(AAsiento : IBizAsiento): Boolean; procedure DescartarCambios(AAsiento : IBizAsiento); end; @@ -34,7 +35,8 @@ type constructor Create; override; destructor Destroy; override; - function Eliminar(AAsiento : IBizAsiento): Boolean; + function Eliminar(IDAsiento : Integer): Boolean; overload; + function Eliminar(AAsiento : IBizAsiento): Boolean; overload; function Guardar(AAsiento : IBizAsiento): Boolean; virtual; procedure DescartarCambios(AAsiento : IBizAsiento); virtual; function Anadir(NumOrden:Integer): IBizAsiento; @@ -114,6 +116,20 @@ begin inherited; end; +function TAsientosController.Eliminar(IDAsiento: Integer): Boolean; +var + AAsiento : IBizAsiento; +begin + AAsiento := Buscar(IDAsiento); + AAsiento.DataTable.Active := True; + + if not Assigned(AAsiento) then + raise Exception.Create(Format('No se ha encontrado el asiento con ID = %d', [IDAsiento])); + + Result := Eliminar(AAsiento); + AAsiento := NIL; +end; + function TAsientosController.ValidarAsiento(AAsiento: IBizAsiento): Boolean; begin Result := False; diff --git a/Source/Modulos/Contabilidad/Views/uEditorAsiento.dfm b/Source/Modulos/Contabilidad/Views/uEditorAsiento.dfm index 8a58ebe7..eaf80fdf 100644 --- a/Source/Modulos/Contabilidad/Views/uEditorAsiento.dfm +++ b/Source/Modulos/Contabilidad/Views/uEditorAsiento.dfm @@ -129,7 +129,7 @@ inherited fEditorAsiento: TfEditorAsiento Properties.Alignment.Horz = taRightJustify Properties.DisplayFormat = '0' Properties.ImmediatePost = True - Properties.MaxValue = 100.000000000000000000 + Properties.MaxValue = 999999.000000000000000000 Properties.UseLeftAlignmentOnEditing = False Style.BorderColor = clWindowFrame Style.BorderStyle = ebs3D @@ -148,10 +148,10 @@ inherited fEditorAsiento: TfEditorAsiento StyleHot.LookAndFeel.NativeStyle = True TabOrder = 0 Height = 21 - Width = 168 + Width = 298 end object edtFecha: TcxDBDateEdit - Left = 391 + Left = 489 Top = 10 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_ASIENTO' diff --git a/Source/Modulos/Contabilidad/Views/uEditorAsiento.pas b/Source/Modulos/Contabilidad/Views/uEditorAsiento.pas index 06e24fe3..4b1be7bb 100644 --- a/Source/Modulos/Contabilidad/Views/uEditorAsiento.pas +++ b/Source/Modulos/Contabilidad/Views/uEditorAsiento.pas @@ -227,7 +227,7 @@ end; procedure TfEditorAsiento.EliminarInterno; begin - if (Application.MessageBox('¿Desea borrar este asiento?', 'Atención', MB_YESNO) = IDYES) then + if (Application.MessageBox('¿Está seguro que desea borrar este asiento?', 'Atención', MB_YESNO) = IDYES) then begin inherited; if not FController.Eliminar(FAsiento) then diff --git a/Source/Modulos/Contabilidad/Views/uEditorDiario.dfm b/Source/Modulos/Contabilidad/Views/uEditorDiario.dfm index dc9cb80c..bbb6d99b 100644 --- a/Source/Modulos/Contabilidad/Views/uEditorDiario.dfm +++ b/Source/Modulos/Contabilidad/Views/uEditorDiario.dfm @@ -2,7 +2,6 @@ inherited fEditorDiario: TfEditorDiario Left = 489 Top = 325 Caption = 'Libro de diario' - ExplicitHeight = 471 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader @@ -13,7 +12,7 @@ inherited fEditorDiario: TfEditorDiario 000000180806000000E0773DF8000000017352474200AECE1CE9000000046741 4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000 80E8000075300000EA6000003A98000017709CBA513C00000009704859730000 - 17110000171101CA26F33F000001DD49444154484BBD96CB4E42311086F18DF4 + 17100000171001186111DB000001DD49444154484BBD96CB4E42311086F18DF4 297C01972EDC68E2DBF804EEDCB831716F8C1B23BA6001410D12428020720D20 721147BFD13939A92D17459B344C7B3ADF3F336D39674D4412FFD24ECED232AF 5B20F3D66D6CEE3B516F1D2B3CD41AEDBE64F38F5100D8F5762FB85E05D60FBE diff --git a/Source/Modulos/Contabilidad/Views/uEditorDiario.pas b/Source/Modulos/Contabilidad/Views/uEditorDiario.pas index 52498b5b..eb838dcf 100644 --- a/Source/Modulos/Contabilidad/Views/uEditorDiario.pas +++ b/Source/Modulos/Contabilidad/Views/uEditorDiario.pas @@ -85,6 +85,7 @@ procedure TfEditorDiario.ModificarInterno; begin inherited; FController.Ver(FController.Buscar(Diario.ID_ASIENTO)); + actRefrescar.Execute; end; procedure TfEditorDiario.NuevoInterno; @@ -97,6 +98,7 @@ begin Inc(NumOrden); FController.Ver(FController.Anadir(NumOrden)); + actRefrescar.Execute; end; procedure TfEditorDiario.PonerTitulos(const ATitulo: string); @@ -139,22 +141,17 @@ AppFactuGES.ShowCapado; finally actRefrescar.Execute; end; -} +} end; procedure TfEditorDiario.EliminarInterno; begin - -{ - if (Application.MessageBox('¿Desea borrar este almacén?', 'Atención', MB_YESNO) = IDYES) then + if (Application.MessageBox('¿Está seguro que desea borrar el asiento seleccionado?', 'Atención', MB_YESNO) = IDYES) then begin inherited; - //Para que en el caso de no poderse realizar la operación se refresquen - //los datos y no nos permita eliminar un registro a la segunda - if not FController.Eliminar(Asientos) then + if FController.Eliminar(Diario.ID_ASIENTO) then actRefrescar.Execute; end; -} end; procedure TfEditorDiario.actEliminarUpdate(Sender: TObject); diff --git a/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.dfm b/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.dfm index a24624dc..05c2fbd4 100644 --- a/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.dfm +++ b/Source/Modulos/Contabilidad/Views/uViewListaSubCuentas.dfm @@ -27,6 +27,7 @@ inherited frViewListaSubcuentas: TfrViewListaSubcuentas Top = 10 Anchors = [akLeft, akTop, akRight] Properties.DropDownListStyle = lsFixedList + Properties.DropDownRows = 20 Properties.ImmediatePost = True Style.BorderColor = clWindowFrame Style.BorderStyle = ebs3D diff --git a/Source/Modulos/Contactos/Controller/uClientesController.pas b/Source/Modulos/Contactos/Controller/uClientesController.pas index ddc16b2f..77fe865b 100644 --- a/Source/Modulos/Contactos/Controller/uClientesController.pas +++ b/Source/Modulos/Contactos/Controller/uClientesController.pas @@ -18,6 +18,8 @@ type function Eliminar(ACliente: IBizContacto; AllItems: Boolean = false): Boolean; overload; procedure Preview(ACliente : IBizCliente; AllItems: Boolean = false); procedure Print(ACliente : IBizCliente; AllItems: Boolean = false); + procedure SetTieneSubcuenta(ACliente: IBizCliente; AValue: Boolean); + procedure SetIgnorarContabilidad(ACliente: IBizCliente; AValue: Boolean); end; TClientesController = class(TContactosController, IClientesController) @@ -46,6 +48,8 @@ type function Eliminar(ACliente: IBizContacto; AllItems: Boolean = false): Boolean; overload; procedure Preview(ACliente : IBizCliente; AllItems: Boolean = false); procedure Print(ACliente : IBizCliente; AllItems: Boolean = false); + procedure SetTieneSubcuenta(ACliente: IBizCliente; AValue: Boolean); + procedure SetIgnorarContabilidad(ACliente: IBizCliente; AValue: Boolean); end; implementation @@ -295,8 +299,51 @@ begin end; end; -function TClientesController.TieneDatosBancarios( - ACliente: IBizCliente): Boolean; +procedure TClientesController.SetIgnorarContabilidad(ACliente: IBizCliente; AValue: Boolean); +var + AEdit: Boolean; +begin + + with ACliente.DataTable do + begin + AEdit := Editing; + if not AEdit then + Edit; + + if AValue then + ACliente.IGNORAR_CONTABILIDAD := 1 + else + ACliente.IGNORAR_CONTABILIDAD := 0; + Post; + + if AEdit then + Edit; + end; +end; + +procedure TClientesController.SetTieneSubcuenta(ACliente: IBizCliente; AValue: Boolean); +var + AEdit: Boolean; +begin + + with ACliente.DataTable do + begin + AEdit := Editing; + if not AEdit then + Edit; + + if AValue then + ACliente.TIENE_SUBCUENTA := 1 + else + ACliente.TIENE_SUBCUENTA := 0; + Post; + + if AEdit then + Edit; + end; +end; + +function TClientesController.TieneDatosBancarios(ACliente: IBizCliente): Boolean; begin Result := False; diff --git a/Source/Modulos/Contactos/Controller/uProveedoresController.pas b/Source/Modulos/Contactos/Controller/uProveedoresController.pas index 5efcc2dd..e5df0fc0 100644 --- a/Source/Modulos/Contactos/Controller/uProveedoresController.pas +++ b/Source/Modulos/Contactos/Controller/uProveedoresController.pas @@ -16,6 +16,8 @@ type function Eliminar(AProveedor: IBizContacto; AllItems: Boolean = false): Boolean; overload; procedure Preview(AProveedor : IBizProveedor; AllItems: Boolean = false); procedure Print(AProveedor : IBizProveedor; AllItems: Boolean = false); + procedure SetTieneSubcuenta(AProveedor: IBizProveedor; AValue: Boolean); + procedure SetIgnorarContabilidad(AProveedor: IBizProveedor; AValue: Boolean); end; TProveedoresController = class(TContactosController, IProveedoresController) @@ -41,6 +43,8 @@ type function Eliminar(AProveedor: IBizContacto; AllItems: Boolean = false): Boolean; overload; procedure Preview(AProveedor : IBizProveedor; AllItems: Boolean = false); procedure Print(AProveedor : IBizProveedor; AllItems: Boolean = false); + procedure SetTieneSubcuenta(AProveedor: IBizProveedor; AValue: Boolean); + procedure SetIgnorarContabilidad(AProveedor: IBizProveedor; AValue: Boolean); end; implementation @@ -286,6 +290,50 @@ begin end; end; +procedure TProveedoresController.SetIgnorarContabilidad(AProveedor: IBizProveedor; AValue: Boolean); +var + AEdit: Boolean; +begin + + with AProveedor.DataTable do + begin + AEdit := Editing; + if not AEdit then + Edit; + + if AValue then + AProveedor.IGNORAR_CONTABILIDAD := 1 + else + AProveedor.IGNORAR_CONTABILIDAD := 0; + Post; + + if AEdit then + Edit; + end; +end; + +procedure TProveedoresController.SetTieneSubcuenta(AProveedor: IBizProveedor; AValue: Boolean); +var + AEdit: Boolean; +begin + + with AProveedor.DataTable do + begin + AEdit := Editing; + if not AEdit then + Edit; + + if AValue then + AProveedor.TIENE_SUBCUENTA := 1 + else + AProveedor.TIENE_SUBCUENTA := 0; + Post; + + if AEdit then + Edit; + end; +end; + function TProveedoresController.ValidarContacto( AContacto: IBizContacto): Boolean; begin diff --git a/Source/Modulos/Contactos/Data/uDataModuleClientes.dfm b/Source/Modulos/Contactos/Data/uDataModuleClientes.dfm index 8b8f601c..6e18f45e 100644 --- a/Source/Modulos/Contactos/Data/uDataModuleClientes.dfm +++ b/Source/Modulos/Contactos/Data/uDataModuleClientes.dfm @@ -230,7 +230,7 @@ inherited DataModuleClientes: TDataModuleClientes end item Name = 'RECARGO_EQUIVALENCIA' - DataType = datInteger + DataType = datSmallInt DisplayLabel = 'Rec. equiv.' DictionaryEntry = 'Clientes_RECARGO_EQUIVALENCIA' end @@ -262,6 +262,10 @@ inherited DataModuleClientes: TDataModuleClientes DisplayLabel = 'Clientes_IGNORAR_CONTABILIDAD' DictionaryEntry = 'Clientes_IGNORAR_CONTABILIDAD' end + item + Name = 'TIENE_SUBCUENTA' + DataType = datInteger + end item Name = 'PROCEDENCIA_CLIENTE' DataType = datString diff --git a/Source/Modulos/Contactos/Data/uDataModuleProveedores.dfm b/Source/Modulos/Contactos/Data/uDataModuleProveedores.dfm index 3ef6f5ae..7cc3c57c 100644 --- a/Source/Modulos/Contactos/Data/uDataModuleProveedores.dfm +++ b/Source/Modulos/Contactos/Data/uDataModuleProveedores.dfm @@ -286,6 +286,10 @@ inherited DataModuleProveedores: TDataModuleProveedores DataType = datInteger DisplayLabel = 'Proveedores_IGNORAR_CONTABILIDAD' DictionaryEntry = 'Proveedores_IGNORAR_CONTABILIDAD' + end + item + Name = 'TIENE_SUBCUENTA' + DataType = datInteger end> Params = <> StreamingOptions = [soDisableEventsWhileStreaming] diff --git a/Source/Modulos/Contactos/Model/schContactosClient_Intf.pas b/Source/Modulos/Contactos/Model/schContactosClient_Intf.pas index d6246571..7d581f11 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, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf; + Classes, DB, 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 = '{DB425E13-FAB7-4F65-BCE6-7F635A0F5087}'; - RID_Contactos = '{2FD53D3B-9549-4D57-BF96-0D7E015194DA}'; - RID_GruposCliente = '{5BA10D11-88C1-43FF-8164-6365407C5849}'; - RID_DatosBancarios = '{125083CD-E155-4AEF-A32C-154D8196330F}'; - RID_Clientes = '{56F0C91A-FE41-49AA-8071-36AE7986DDC4}'; - RID_Proveedores = '{77D19C57-45FD-402D-88B3-AF41C35B7AE6}'; - RID_Empleados = '{F993E9F9-C0BF-41C4-ACB6-1201725A4C1A}'; - RID_DireccionesContacto = '{6E17DC2B-C076-4E99-937F-20A25A74E550}'; - RID_ClientesDescuentos = '{DC74ADAE-B7D8-4425-AB10-965FCF37492D}'; - RID_ProcedenciasCliente = '{203DC6C2-0EAC-4E13-B0EB-9AE674DEE436}'; - RID_GruposProveedor = '{90396FB9-2C83-477A-A234-2D3130349CD7}'; - RID_GruposEmpleado = '{ED8857AA-842E-4F29-ADB1-F0E3011FE149}'; - RID_Contactos_Refresh = '{1580AAF8-32C8-468C-9DD1-E092DEEBB24F}'; + 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}'; { Data table names } nme_SubCuentasContacto = 'SubCuentasContacto'; @@ -176,6 +176,7 @@ const fld_ClientesTIENDA_WEB = 'TIENDA_WEB'; fld_ClientesCODIGO_ASIGNADO = 'CODIGO_ASIGNADO'; fld_ClientesIGNORAR_CONTABILIDAD = 'IGNORAR_CONTABILIDAD'; + fld_ClientesTIENE_SUBCUENTA = 'TIENE_SUBCUENTA'; fld_ClientesPROCEDENCIA_CLIENTE = 'PROCEDENCIA_CLIENTE'; { Clientes field indexes } @@ -216,7 +217,8 @@ const idx_ClientesTIENDA_WEB = 34; idx_ClientesCODIGO_ASIGNADO = 35; idx_ClientesIGNORAR_CONTABILIDAD = 36; - idx_ClientesPROCEDENCIA_CLIENTE = 37; + idx_ClientesTIENE_SUBCUENTA = 37; + idx_ClientesPROCEDENCIA_CLIENTE = 38; { Proveedores fields } fld_ProveedoresID = 'ID'; @@ -255,6 +257,7 @@ const fld_ProveedoresHOMOLOGADO = 'HOMOLOGADO'; fld_ProveedoresCERTIFICACION = 'CERTIFICACION'; fld_ProveedoresIGNORAR_CONTABILIDAD = 'IGNORAR_CONTABILIDAD'; + fld_ProveedoresTIENE_SUBCUENTA = 'TIENE_SUBCUENTA'; { Proveedores field indexes } idx_ProveedoresID = 0; @@ -293,6 +296,7 @@ const idx_ProveedoresHOMOLOGADO = 33; idx_ProveedoresCERTIFICACION = 34; idx_ProveedoresIGNORAR_CONTABILIDAD = 35; + idx_ProveedoresTIENE_SUBCUENTA = 36; { Empleados fields } fld_EmpleadosID = 'ID'; @@ -487,7 +491,7 @@ const type { ISubCuentasContacto } ISubCuentasContacto = interface(IDAStronglyTypedDataTable) - ['{84D42B58-F588-4B95-9754-F9CA59801A9A}'] + ['{180C71AC-D602-4871-B0B5-30DB9A6F0D3D}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -531,7 +535,7 @@ type end; { TSubCuentasContactoDataTableRules } - TSubCuentasContactoDataTableRules = class(TIntfObjectDADataTableRules, ISubCuentasContacto) + TSubCuentasContactoDataTableRules = class(TDADataTableRules, ISubCuentasContacto) private protected { Property getters and setters } @@ -582,7 +586,7 @@ type { IContactos } IContactos = interface(IDAStronglyTypedDataTable) - ['{FAB53326-3794-4F50-BE06-9918634F36E1}'] + ['{517A8780-E06E-4C96-B076-F9975F834557}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -739,7 +743,7 @@ type end; { TContactosDataTableRules } - TContactosDataTableRules = class(TIntfObjectDADataTableRules, IContactos) + TContactosDataTableRules = class(TDADataTableRules, IContactos) private f_NOTAS: IROStrings; procedure NOTAS_OnChange(Sender: TObject); @@ -905,7 +909,7 @@ type { IGruposCliente } IGruposCliente = interface(IDAStronglyTypedDataTable) - ['{F40E5B41-61DE-49C4-A34D-FB8ED5677356}'] + ['{DF6B0030-F21D-462F-BAA1-765346227096}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -925,7 +929,7 @@ type end; { TGruposClienteDataTableRules } - TGruposClienteDataTableRules = class(TIntfObjectDADataTableRules, IGruposCliente) + TGruposClienteDataTableRules = class(TDADataTableRules, IGruposCliente) private protected { Property getters and setters } @@ -952,7 +956,7 @@ type { IDatosBancarios } IDatosBancarios = interface(IDAStronglyTypedDataTable) - ['{BD7055CC-8133-4ECE-8D7B-2AF3152C7D73}'] + ['{71AD9AE5-15E3-4510-920F-C9DCA24935C3}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1014,7 +1018,7 @@ type end; { TDatosBancariosDataTableRules } - TDatosBancariosDataTableRules = class(TIntfObjectDADataTableRules, IDatosBancarios) + TDatosBancariosDataTableRules = class(TDADataTableRules, IDatosBancarios) private protected { Property getters and setters } @@ -1083,7 +1087,7 @@ type { IClientes } IClientes = interface(IDAStronglyTypedDataTable) - ['{C3AF11E9-4107-41AE-8713-9AB3A4C89963}'] + ['{D314D401-AE3E-4242-ADBA-7879822029DC}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1208,8 +1212,8 @@ type procedure SetMOTIVO_BLOQUEOValue(const aValue: String); function GetMOTIVO_BLOQUEOIsNull: Boolean; procedure SetMOTIVO_BLOQUEOIsNull(const aValue: Boolean); - function GetRECARGO_EQUIVALENCIAValue: Integer; - procedure SetRECARGO_EQUIVALENCIAValue(const aValue: Integer); + function GetRECARGO_EQUIVALENCIAValue: SmallInt; + procedure SetRECARGO_EQUIVALENCIAValue(const aValue: SmallInt); function GetRECARGO_EQUIVALENCIAIsNull: Boolean; procedure SetRECARGO_EQUIVALENCIAIsNull(const aValue: Boolean); function GetID_TIPO_IVAValue: Integer; @@ -1232,6 +1236,10 @@ type procedure SetIGNORAR_CONTABILIDADValue(const aValue: Integer); function GetIGNORAR_CONTABILIDADIsNull: Boolean; procedure SetIGNORAR_CONTABILIDADIsNull(const aValue: Boolean); + function GetTIENE_SUBCUENTAValue: Integer; + procedure SetTIENE_SUBCUENTAValue(const aValue: Integer); + function GetTIENE_SUBCUENTAIsNull: Boolean; + procedure SetTIENE_SUBCUENTAIsNull(const aValue: Boolean); function GetPROCEDENCIA_CLIENTEValue: String; procedure SetPROCEDENCIA_CLIENTEValue(const aValue: String); function GetPROCEDENCIA_CLIENTEIsNull: Boolean; @@ -1301,7 +1309,7 @@ type property REGIMEN_IVAIsNull: Boolean read GetREGIMEN_IVAIsNull write SetREGIMEN_IVAIsNull; property MOTIVO_BLOQUEO: String read GetMOTIVO_BLOQUEOValue write SetMOTIVO_BLOQUEOValue; property MOTIVO_BLOQUEOIsNull: Boolean read GetMOTIVO_BLOQUEOIsNull write SetMOTIVO_BLOQUEOIsNull; - property RECARGO_EQUIVALENCIA: Integer read GetRECARGO_EQUIVALENCIAValue write SetRECARGO_EQUIVALENCIAValue; + property RECARGO_EQUIVALENCIA: SmallInt read GetRECARGO_EQUIVALENCIAValue write SetRECARGO_EQUIVALENCIAValue; property RECARGO_EQUIVALENCIAIsNull: Boolean read GetRECARGO_EQUIVALENCIAIsNull write SetRECARGO_EQUIVALENCIAIsNull; property ID_TIPO_IVA: Integer read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue; property ID_TIPO_IVAIsNull: Boolean read GetID_TIPO_IVAIsNull write SetID_TIPO_IVAIsNull; @@ -1313,12 +1321,14 @@ type property CODIGO_ASIGNADOIsNull: Boolean read GetCODIGO_ASIGNADOIsNull write SetCODIGO_ASIGNADOIsNull; property IGNORAR_CONTABILIDAD: Integer read GetIGNORAR_CONTABILIDADValue write SetIGNORAR_CONTABILIDADValue; 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 PROCEDENCIA_CLIENTE: String read GetPROCEDENCIA_CLIENTEValue write SetPROCEDENCIA_CLIENTEValue; property PROCEDENCIA_CLIENTEIsNull: Boolean read GetPROCEDENCIA_CLIENTEIsNull write SetPROCEDENCIA_CLIENTEIsNull; end; { TClientesDataTableRules } - TClientesDataTableRules = class(TIntfObjectDADataTableRules, IClientes) + TClientesDataTableRules = class(TDADataTableRules, IClientes) private f_NOTAS: IROStrings; procedure NOTAS_OnChange(Sender: TObject); @@ -1447,8 +1457,8 @@ type procedure SetMOTIVO_BLOQUEOValue(const aValue: String); virtual; function GetMOTIVO_BLOQUEOIsNull: Boolean; virtual; procedure SetMOTIVO_BLOQUEOIsNull(const aValue: Boolean); virtual; - function GetRECARGO_EQUIVALENCIAValue: Integer; virtual; - procedure SetRECARGO_EQUIVALENCIAValue(const aValue: Integer); virtual; + function GetRECARGO_EQUIVALENCIAValue: SmallInt; virtual; + procedure SetRECARGO_EQUIVALENCIAValue(const aValue: SmallInt); virtual; function GetRECARGO_EQUIVALENCIAIsNull: Boolean; virtual; procedure SetRECARGO_EQUIVALENCIAIsNull(const aValue: Boolean); virtual; function GetID_TIPO_IVAValue: Integer; virtual; @@ -1471,6 +1481,10 @@ type procedure SetIGNORAR_CONTABILIDADValue(const aValue: Integer); virtual; function GetIGNORAR_CONTABILIDADIsNull: Boolean; virtual; procedure SetIGNORAR_CONTABILIDADIsNull(const aValue: Boolean); virtual; + function GetTIENE_SUBCUENTAValue: Integer; virtual; + procedure SetTIENE_SUBCUENTAValue(const aValue: Integer); virtual; + function GetTIENE_SUBCUENTAIsNull: Boolean; virtual; + procedure SetTIENE_SUBCUENTAIsNull(const aValue: Boolean); virtual; function GetPROCEDENCIA_CLIENTEValue: String; virtual; procedure SetPROCEDENCIA_CLIENTEValue(const aValue: String); virtual; function GetPROCEDENCIA_CLIENTEIsNull: Boolean; virtual; @@ -1539,7 +1553,7 @@ type property REGIMEN_IVAIsNull: Boolean read GetREGIMEN_IVAIsNull write SetREGIMEN_IVAIsNull; property MOTIVO_BLOQUEO: String read GetMOTIVO_BLOQUEOValue write SetMOTIVO_BLOQUEOValue; property MOTIVO_BLOQUEOIsNull: Boolean read GetMOTIVO_BLOQUEOIsNull write SetMOTIVO_BLOQUEOIsNull; - property RECARGO_EQUIVALENCIA: Integer read GetRECARGO_EQUIVALENCIAValue write SetRECARGO_EQUIVALENCIAValue; + property RECARGO_EQUIVALENCIA: SmallInt read GetRECARGO_EQUIVALENCIAValue write SetRECARGO_EQUIVALENCIAValue; property RECARGO_EQUIVALENCIAIsNull: Boolean read GetRECARGO_EQUIVALENCIAIsNull write SetRECARGO_EQUIVALENCIAIsNull; property ID_TIPO_IVA: Integer read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue; property ID_TIPO_IVAIsNull: Boolean read GetID_TIPO_IVAIsNull write SetID_TIPO_IVAIsNull; @@ -1551,6 +1565,8 @@ type property CODIGO_ASIGNADOIsNull: Boolean read GetCODIGO_ASIGNADOIsNull write SetCODIGO_ASIGNADOIsNull; property IGNORAR_CONTABILIDAD: Integer read GetIGNORAR_CONTABILIDADValue write SetIGNORAR_CONTABILIDADValue; 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 PROCEDENCIA_CLIENTE: String read GetPROCEDENCIA_CLIENTEValue write SetPROCEDENCIA_CLIENTEValue; property PROCEDENCIA_CLIENTEIsNull: Boolean read GetPROCEDENCIA_CLIENTEIsNull write SetPROCEDENCIA_CLIENTEIsNull; @@ -1562,7 +1578,7 @@ type { IProveedores } IProveedores = interface(IDAStronglyTypedDataTable) - ['{9029B819-5D9B-4720-9239-CB73E5522DA2}'] + ['{17E80FD0-91B4-4D1C-95ED-3D5C4B42578A}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1707,6 +1723,10 @@ type procedure SetIGNORAR_CONTABILIDADValue(const aValue: Integer); function GetIGNORAR_CONTABILIDADIsNull: Boolean; procedure SetIGNORAR_CONTABILIDADIsNull(const aValue: Boolean); + function GetTIENE_SUBCUENTAValue: Integer; + procedure SetTIENE_SUBCUENTAValue(const aValue: Integer); + function GetTIENE_SUBCUENTAIsNull: Boolean; + procedure SetTIENE_SUBCUENTAIsNull(const aValue: Boolean); { Properties } @@ -1782,10 +1802,12 @@ type property CERTIFICACIONIsNull: Boolean read GetCERTIFICACIONIsNull write SetCERTIFICACIONIsNull; property IGNORAR_CONTABILIDAD: Integer read GetIGNORAR_CONTABILIDADValue write SetIGNORAR_CONTABILIDADValue; 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; end; { TProveedoresDataTableRules } - TProveedoresDataTableRules = class(TIntfObjectDADataTableRules, IProveedores) + TProveedoresDataTableRules = class(TDADataTableRules, IProveedores) private f_NOTAS: IROStrings; procedure NOTAS_OnChange(Sender: TObject); @@ -1934,6 +1956,10 @@ type procedure SetIGNORAR_CONTABILIDADValue(const aValue: Integer); virtual; function GetIGNORAR_CONTABILIDADIsNull: Boolean; virtual; procedure SetIGNORAR_CONTABILIDADIsNull(const aValue: Boolean); virtual; + function GetTIENE_SUBCUENTAValue: Integer; virtual; + procedure SetTIENE_SUBCUENTAValue(const aValue: Integer); virtual; + function GetTIENE_SUBCUENTAIsNull: Boolean; virtual; + procedure SetTIENE_SUBCUENTAIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; @@ -2008,6 +2034,8 @@ type property CERTIFICACIONIsNull: Boolean read GetCERTIFICACIONIsNull write SetCERTIFICACIONIsNull; property IGNORAR_CONTABILIDAD: Integer read GetIGNORAR_CONTABILIDADValue write SetIGNORAR_CONTABILIDADValue; 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; public constructor Create(aDataTable: TDADataTable); override; @@ -2017,7 +2045,7 @@ type { IEmpleados } IEmpleados = interface(IDAStronglyTypedDataTable) - ['{953D050A-130F-4BA1-A7C3-7471CF2E01B7}'] + ['{4AC6F410-2F75-4947-8321-5363F1418AA2}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2218,7 +2246,7 @@ type end; { TEmpleadosDataTableRules } - TEmpleadosDataTableRules = class(TIntfObjectDADataTableRules, IEmpleados) + TEmpleadosDataTableRules = class(TDADataTableRules, IEmpleados) private f_NOTAS: IROStrings; f_FORMACION_BASE: IROStrings; @@ -2436,7 +2464,7 @@ type { IDireccionesContacto } IDireccionesContacto = interface(IDAStronglyTypedDataTable) - ['{F13BCCC1-D68C-483C-95CA-0FDCCD665F41}'] + ['{0BEB43AD-BE78-4F2E-B45C-8E6AE76A186A}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2539,7 +2567,7 @@ type end; { TDireccionesContactoDataTableRules } - TDireccionesContactoDataTableRules = class(TIntfObjectDADataTableRules, IDireccionesContacto) + TDireccionesContactoDataTableRules = class(TDADataTableRules, IDireccionesContacto) private f_NOTAS: IROStrings; procedure NOTAS_OnChange(Sender: TObject); @@ -2651,7 +2679,7 @@ type { IClientesDescuentos } IClientesDescuentos = interface(IDAStronglyTypedDataTable) - ['{6D86E654-37C2-46B7-8C4E-283A75761CF4}'] + ['{9323A474-DBCB-4050-A1F4-229966D7A848}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2689,7 +2717,7 @@ type end; { TClientesDescuentosDataTableRules } - TClientesDescuentosDataTableRules = class(TIntfObjectDADataTableRules, IClientesDescuentos) + TClientesDescuentosDataTableRules = class(TDADataTableRules, IClientesDescuentos) private protected { Property getters and setters } @@ -2734,7 +2762,7 @@ type { IProcedenciasCliente } IProcedenciasCliente = interface(IDAStronglyTypedDataTable) - ['{F4EA7D47-1958-40FD-98CF-85A7EFD46925}'] + ['{459BF966-D8AA-44F0-B23A-704860B7AC98}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2754,7 +2782,7 @@ type end; { TProcedenciasClienteDataTableRules } - TProcedenciasClienteDataTableRules = class(TIntfObjectDADataTableRules, IProcedenciasCliente) + TProcedenciasClienteDataTableRules = class(TDADataTableRules, IProcedenciasCliente) private protected { Property getters and setters } @@ -2781,7 +2809,7 @@ type { IGruposProveedor } IGruposProveedor = interface(IDAStronglyTypedDataTable) - ['{5949BE7B-062B-4353-8F42-652DCB437F31}'] + ['{0A10C9D3-D291-47D7-8BE5-15F1178704AB}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2801,7 +2829,7 @@ type end; { TGruposProveedorDataTableRules } - TGruposProveedorDataTableRules = class(TIntfObjectDADataTableRules, IGruposProveedor) + TGruposProveedorDataTableRules = class(TDADataTableRules, IGruposProveedor) private protected { Property getters and setters } @@ -2828,7 +2856,7 @@ type { IGruposEmpleado } IGruposEmpleado = interface(IDAStronglyTypedDataTable) - ['{2CA5FDD6-5EC3-4890-B749-3447C670D7E4}'] + ['{ADFE0D54-EBBB-444A-9830-D5E39AED2058}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2848,7 +2876,7 @@ type end; { TGruposEmpleadoDataTableRules } - TGruposEmpleadoDataTableRules = class(TIntfObjectDADataTableRules, IGruposEmpleado) + TGruposEmpleadoDataTableRules = class(TDADataTableRules, IGruposEmpleado) private protected { Property getters and setters } @@ -2875,7 +2903,7 @@ type { IContactos_Refresh } IContactos_Refresh = interface(IDAStronglyTypedDataTable) - ['{AD126981-A1FB-4732-AD78-7B4DB9764976}'] + ['{9355FABF-5007-43F5-BB00-9F0C43DA7FD2}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -3008,7 +3036,7 @@ type end; { TContactos_RefreshDataTableRules } - TContactos_RefreshDataTableRules = class(TIntfObjectDADataTableRules, IContactos_Refresh) + TContactos_RefreshDataTableRules = class(TDADataTableRules, IContactos_Refresh) private f_NOTAS: IROStrings; procedure NOTAS_OnChange(Sender: TObject); @@ -4758,14 +4786,14 @@ begin DataTable.Fields[idx_ClientesMOTIVO_BLOQUEO].AsVariant := Null; end; -function TClientesDataTableRules.GetRECARGO_EQUIVALENCIAValue: Integer; +function TClientesDataTableRules.GetRECARGO_EQUIVALENCIAValue: SmallInt; begin - result := DataTable.Fields[idx_ClientesRECARGO_EQUIVALENCIA].AsInteger; + result := DataTable.Fields[idx_ClientesRECARGO_EQUIVALENCIA].AsSmallInt; end; -procedure TClientesDataTableRules.SetRECARGO_EQUIVALENCIAValue(const aValue: Integer); +procedure TClientesDataTableRules.SetRECARGO_EQUIVALENCIAValue(const aValue: SmallInt); begin - DataTable.Fields[idx_ClientesRECARGO_EQUIVALENCIA].AsInteger := aValue; + DataTable.Fields[idx_ClientesRECARGO_EQUIVALENCIA].AsSmallInt := aValue; end; function TClientesDataTableRules.GetRECARGO_EQUIVALENCIAIsNull: boolean; @@ -4884,6 +4912,27 @@ begin DataTable.Fields[idx_ClientesIGNORAR_CONTABILIDAD].AsVariant := Null; end; +function TClientesDataTableRules.GetTIENE_SUBCUENTAValue: Integer; +begin + result := DataTable.Fields[idx_ClientesTIENE_SUBCUENTA].AsInteger; +end; + +procedure TClientesDataTableRules.SetTIENE_SUBCUENTAValue(const aValue: Integer); +begin + DataTable.Fields[idx_ClientesTIENE_SUBCUENTA].AsInteger := aValue; +end; + +function TClientesDataTableRules.GetTIENE_SUBCUENTAIsNull: boolean; +begin + result := DataTable.Fields[idx_ClientesTIENE_SUBCUENTA].IsNull; +end; + +procedure TClientesDataTableRules.SetTIENE_SUBCUENTAIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_ClientesTIENE_SUBCUENTA].AsVariant := Null; +end; + function TClientesDataTableRules.GetPROCEDENCIA_CLIENTEValue: String; begin result := DataTable.Fields[idx_ClientesPROCEDENCIA_CLIENTE].AsString; @@ -5680,6 +5729,27 @@ begin DataTable.Fields[idx_ProveedoresIGNORAR_CONTABILIDAD].AsVariant := Null; end; +function TProveedoresDataTableRules.GetTIENE_SUBCUENTAValue: Integer; +begin + result := DataTable.Fields[idx_ProveedoresTIENE_SUBCUENTA].AsInteger; +end; + +procedure TProveedoresDataTableRules.SetTIENE_SUBCUENTAValue(const aValue: Integer); +begin + DataTable.Fields[idx_ProveedoresTIENE_SUBCUENTA].AsInteger := aValue; +end; + +function TProveedoresDataTableRules.GetTIENE_SUBCUENTAIsNull: boolean; +begin + result := DataTable.Fields[idx_ProveedoresTIENE_SUBCUENTA].IsNull; +end; + +procedure TProveedoresDataTableRules.SetTIENE_SUBCUENTAIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_ProveedoresTIENE_SUBCUENTA].AsVariant := Null; +end; + { TEmpleadosDataTableRules } constructor TEmpleadosDataTableRules.Create(aDataTable: TDADataTable); diff --git a/Source/Modulos/Contactos/Model/schContactosServer_Intf.pas b/Source/Modulos/Contactos/Model/schContactosServer_Intf.pas index d9cd66ab..b66c303a 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 = '{C6BE81D5-C1AD-4485-A854-06F9D2CFA1B1}'; - RID_ContactosDelta = '{FCAB8D51-56C4-40CF-BD46-8F7DCF7B742E}'; - RID_GruposClienteDelta = '{3AB1D597-F64F-4FB9-AF9E-0BEF56CA0978}'; - RID_DatosBancariosDelta = '{EC6C167C-F8EA-4ADD-8A46-3BA7FFA8C946}'; - RID_ClientesDelta = '{6FF774A7-7540-41D7-ACA9-35E54028F8AC}'; - RID_ProveedoresDelta = '{A34837B4-64E6-4ABC-9319-B4D794E1C74E}'; - RID_EmpleadosDelta = '{DF65F592-6966-4033-818C-E275BE726562}'; - RID_DireccionesContactoDelta = '{34BB9A5D-75AF-43EB-8985-3C76C607DDB1}'; - RID_ClientesDescuentosDelta = '{B3DB0447-3DD5-4403-968D-5F536F0AA50A}'; - RID_ProcedenciasClienteDelta = '{D6D98B8C-F89A-4BEF-AE78-777D8050F310}'; - RID_GruposProveedorDelta = '{A7D22925-DA53-4285-A4D9-EDA4EE179413}'; - RID_GruposEmpleadoDelta = '{B7AF0091-09D2-4309-A8B1-AAA0108642BA}'; - RID_Contactos_RefreshDelta = '{DD99CA2A-4B98-4535-B43C-D17EAB8D9915}'; + 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}'; type { ISubCuentasContactoDelta } ISubCuentasContactoDelta = interface(ISubCuentasContacto) - ['{C6BE81D5-C1AD-4485-A854-06F9D2CFA1B1}'] + ['{EE9317EA-5374-4D7D-B6CC-8684FE0D6B21}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldREF_SUBCUENTAValue : String; @@ -120,7 +120,7 @@ type { IContactosDelta } IContactosDelta = interface(IContactos) - ['{FCAB8D51-56C4-40CF-BD46-8F7DCF7B742E}'] + ['{51070042-26A2-4A85-8719-F51520E40F38}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CATEGORIAValue : Integer; @@ -443,7 +443,7 @@ type { IGruposClienteDelta } IGruposClienteDelta = interface(IGruposCliente) - ['{3AB1D597-F64F-4FB9-AF9E-0BEF56CA0978}'] + ['{965A879A-4E61-42F4-83FE-22FA07165FB5}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -489,7 +489,7 @@ type { IDatosBancariosDelta } IDatosBancariosDelta = interface(IDatosBancarios) - ['{EC6C167C-F8EA-4ADD-8A46-3BA7FFA8C946}'] + ['{5BE9B897-D52F-4D7D-AFC9-A502CECEF42E}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CONTACTOValue : Integer; @@ -619,7 +619,7 @@ type { IClientesDelta } IClientesDelta = interface(IClientes) - ['{6FF774A7-7540-41D7-ACA9-35E54028F8AC}'] + ['{87DD5652-478A-4A00-BDAB-33B2C9B40099}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CATEGORIAValue : Integer; @@ -652,12 +652,13 @@ type function GetOldBLOQUEADOValue : SmallInt; function GetOldREGIMEN_IVAValue : String; function GetOldMOTIVO_BLOQUEOValue : String; - function GetOldRECARGO_EQUIVALENCIAValue : Integer; + function GetOldRECARGO_EQUIVALENCIAValue : SmallInt; function GetOldID_TIPO_IVAValue : Integer; function GetOldID_FORMA_PAGOValue : Integer; function GetOldTIENDA_WEBValue : SmallInt; function GetOldCODIGO_ASIGNADOValue : String; function GetOldIGNORAR_CONTABILIDADValue : Integer; + function GetOldTIENE_SUBCUENTAValue : Integer; function GetOldPROCEDENCIA_CLIENTEValue : String; { Properties } @@ -692,12 +693,13 @@ type property OldBLOQUEADO : SmallInt read GetOldBLOQUEADOValue; property OldREGIMEN_IVA : String read GetOldREGIMEN_IVAValue; property OldMOTIVO_BLOQUEO : String read GetOldMOTIVO_BLOQUEOValue; - property OldRECARGO_EQUIVALENCIA : Integer read GetOldRECARGO_EQUIVALENCIAValue; + property OldRECARGO_EQUIVALENCIA : SmallInt read GetOldRECARGO_EQUIVALENCIAValue; property OldID_TIPO_IVA : Integer read GetOldID_TIPO_IVAValue; property OldID_FORMA_PAGO : Integer read GetOldID_FORMA_PAGOValue; property OldTIENDA_WEB : SmallInt read GetOldTIENDA_WEBValue; property OldCODIGO_ASIGNADO : String read GetOldCODIGO_ASIGNADOValue; property OldIGNORAR_CONTABILIDAD : Integer read GetOldIGNORAR_CONTABILIDADValue; + property OldTIENE_SUBCUENTA : Integer read GetOldTIENE_SUBCUENTAValue; property OldPROCEDENCIA_CLIENTE : String read GetOldPROCEDENCIA_CLIENTEValue; end; @@ -893,11 +895,11 @@ type function GetOldMOTIVO_BLOQUEOIsNull: Boolean; virtual; procedure SetMOTIVO_BLOQUEOValue(const aValue: String); virtual; procedure SetMOTIVO_BLOQUEOIsNull(const aValue: Boolean); virtual; - function GetRECARGO_EQUIVALENCIAValue: Integer; virtual; + function GetRECARGO_EQUIVALENCIAValue: SmallInt; virtual; function GetRECARGO_EQUIVALENCIAIsNull: Boolean; virtual; - function GetOldRECARGO_EQUIVALENCIAValue: Integer; virtual; + function GetOldRECARGO_EQUIVALENCIAValue: SmallInt; virtual; function GetOldRECARGO_EQUIVALENCIAIsNull: Boolean; virtual; - procedure SetRECARGO_EQUIVALENCIAValue(const aValue: Integer); virtual; + procedure SetRECARGO_EQUIVALENCIAValue(const aValue: SmallInt); virtual; procedure SetRECARGO_EQUIVALENCIAIsNull(const aValue: Boolean); virtual; function GetID_TIPO_IVAValue: Integer; virtual; function GetID_TIPO_IVAIsNull: Boolean; virtual; @@ -929,6 +931,12 @@ type function GetOldIGNORAR_CONTABILIDADIsNull: Boolean; virtual; procedure SetIGNORAR_CONTABILIDADValue(const aValue: Integer); virtual; procedure SetIGNORAR_CONTABILIDADIsNull(const aValue: Boolean); virtual; + function GetTIENE_SUBCUENTAValue: Integer; virtual; + function GetTIENE_SUBCUENTAIsNull: Boolean; virtual; + function GetOldTIENE_SUBCUENTAValue: Integer; virtual; + function GetOldTIENE_SUBCUENTAIsNull: Boolean; virtual; + procedure SetTIENE_SUBCUENTAValue(const aValue: Integer); virtual; + procedure SetTIENE_SUBCUENTAIsNull(const aValue: Boolean); virtual; function GetPROCEDENCIA_CLIENTEValue: String; virtual; function GetPROCEDENCIA_CLIENTEIsNull: Boolean; virtual; function GetOldPROCEDENCIA_CLIENTEValue: String; virtual; @@ -1061,9 +1069,9 @@ type property MOTIVO_BLOQUEOIsNull : Boolean read GetMOTIVO_BLOQUEOIsNull write SetMOTIVO_BLOQUEOIsNull; property OldMOTIVO_BLOQUEO : String read GetOldMOTIVO_BLOQUEOValue; property OldMOTIVO_BLOQUEOIsNull : Boolean read GetOldMOTIVO_BLOQUEOIsNull; - property RECARGO_EQUIVALENCIA : Integer read GetRECARGO_EQUIVALENCIAValue write SetRECARGO_EQUIVALENCIAValue; + property RECARGO_EQUIVALENCIA : SmallInt read GetRECARGO_EQUIVALENCIAValue write SetRECARGO_EQUIVALENCIAValue; property RECARGO_EQUIVALENCIAIsNull : Boolean read GetRECARGO_EQUIVALENCIAIsNull write SetRECARGO_EQUIVALENCIAIsNull; - property OldRECARGO_EQUIVALENCIA : Integer read GetOldRECARGO_EQUIVALENCIAValue; + property OldRECARGO_EQUIVALENCIA : SmallInt read GetOldRECARGO_EQUIVALENCIAValue; property OldRECARGO_EQUIVALENCIAIsNull : Boolean read GetOldRECARGO_EQUIVALENCIAIsNull; property ID_TIPO_IVA : Integer read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue; property ID_TIPO_IVAIsNull : Boolean read GetID_TIPO_IVAIsNull write SetID_TIPO_IVAIsNull; @@ -1085,6 +1093,10 @@ type property IGNORAR_CONTABILIDADIsNull : Boolean read GetIGNORAR_CONTABILIDADIsNull write SetIGNORAR_CONTABILIDADIsNull; property OldIGNORAR_CONTABILIDAD : Integer read GetOldIGNORAR_CONTABILIDADValue; property OldIGNORAR_CONTABILIDADIsNull : Boolean read GetOldIGNORAR_CONTABILIDADIsNull; + property TIENE_SUBCUENTA : Integer read GetTIENE_SUBCUENTAValue write SetTIENE_SUBCUENTAValue; + 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 PROCEDENCIA_CLIENTE : String read GetPROCEDENCIA_CLIENTEValue write SetPROCEDENCIA_CLIENTEValue; property PROCEDENCIA_CLIENTEIsNull : Boolean read GetPROCEDENCIA_CLIENTEIsNull write SetPROCEDENCIA_CLIENTEIsNull; property OldPROCEDENCIA_CLIENTE : String read GetOldPROCEDENCIA_CLIENTEValue; @@ -1098,7 +1110,7 @@ type { IProveedoresDelta } IProveedoresDelta = interface(IProveedores) - ['{A34837B4-64E6-4ABC-9319-B4D794E1C74E}'] + ['{B7F03045-3BE9-46AC-A0FB-8D4B288B925E}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CATEGORIAValue : Integer; @@ -1136,6 +1148,7 @@ type function GetOldHOMOLOGADOValue : SmallInt; function GetOldCERTIFICACIONValue : String; function GetOldIGNORAR_CONTABILIDADValue : Integer; + function GetOldTIENE_SUBCUENTAValue : Integer; { Properties } property OldID : Integer read GetOldIDValue; @@ -1174,6 +1187,7 @@ type property OldHOMOLOGADO : SmallInt read GetOldHOMOLOGADOValue; property OldCERTIFICACION : String read GetOldCERTIFICACIONValue; property OldIGNORAR_CONTABILIDAD : Integer read GetOldIGNORAR_CONTABILIDADValue; + property OldTIENE_SUBCUENTA : Integer read GetOldTIENE_SUBCUENTAValue; end; { TProveedoresBusinessProcessorRules } @@ -1398,6 +1412,12 @@ type function GetOldIGNORAR_CONTABILIDADIsNull: Boolean; virtual; procedure SetIGNORAR_CONTABILIDADValue(const aValue: Integer); virtual; procedure SetIGNORAR_CONTABILIDADIsNull(const aValue: Boolean); virtual; + function GetTIENE_SUBCUENTAValue: Integer; virtual; + function GetTIENE_SUBCUENTAIsNull: Boolean; virtual; + function GetOldTIENE_SUBCUENTAValue: Integer; virtual; + function GetOldTIENE_SUBCUENTAIsNull: Boolean; virtual; + procedure SetTIENE_SUBCUENTAValue(const aValue: Integer); virtual; + procedure SetTIENE_SUBCUENTAIsNull(const aValue: Boolean); virtual; { Properties } property ID : Integer read GetIDValue write SetIDValue; @@ -1544,6 +1564,10 @@ type property IGNORAR_CONTABILIDADIsNull : Boolean read GetIGNORAR_CONTABILIDADIsNull write SetIGNORAR_CONTABILIDADIsNull; property OldIGNORAR_CONTABILIDAD : Integer read GetOldIGNORAR_CONTABILIDADValue; property OldIGNORAR_CONTABILIDADIsNull : Boolean read GetOldIGNORAR_CONTABILIDADIsNull; + property TIENE_SUBCUENTA : Integer read GetTIENE_SUBCUENTAValue write SetTIENE_SUBCUENTAValue; + property TIENE_SUBCUENTAIsNull : Boolean read GetTIENE_SUBCUENTAIsNull write SetTIENE_SUBCUENTAIsNull; + property OldTIENE_SUBCUENTA : Integer read GetOldTIENE_SUBCUENTAValue; + property OldTIENE_SUBCUENTAIsNull : Boolean read GetOldTIENE_SUBCUENTAIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; @@ -1553,7 +1577,7 @@ type { IEmpleadosDelta } IEmpleadosDelta = interface(IEmpleados) - ['{DF65F592-6966-4033-818C-E275BE726562}'] + ['{6B64608B-F25E-4210-B02F-87B0EA062378}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CATEGORIAValue : Integer; @@ -1976,7 +2000,7 @@ type { IDireccionesContactoDelta } IDireccionesContactoDelta = interface(IDireccionesContacto) - ['{34BB9A5D-75AF-43EB-8985-3C76C607DDB1}'] + ['{2B40DFC8-5CAF-4D17-A0EC-7B6E4BB79ACE}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CONTACTOValue : Integer; @@ -2191,7 +2215,7 @@ type { IClientesDescuentosDelta } IClientesDescuentosDelta = interface(IClientesDescuentos) - ['{B3DB0447-3DD5-4403-968D-5F536F0AA50A}'] + ['{9028E6CB-E578-4BBA-BD93-7068CB6EEAF2}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CLIENTEValue : Integer; @@ -2273,7 +2297,7 @@ type { IProcedenciasClienteDelta } IProcedenciasClienteDelta = interface(IProcedenciasCliente) - ['{D6D98B8C-F89A-4BEF-AE78-777D8050F310}'] + ['{5179E843-F6F3-49F7-9979-6561FDA1C6DF}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -2319,7 +2343,7 @@ type { IGruposProveedorDelta } IGruposProveedorDelta = interface(IGruposProveedor) - ['{A7D22925-DA53-4285-A4D9-EDA4EE179413}'] + ['{BF5E7579-41AA-4BB5-B650-224E079D6344}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -2365,7 +2389,7 @@ type { IGruposEmpleadoDelta } IGruposEmpleadoDelta = interface(IGruposEmpleado) - ['{B7AF0091-09D2-4309-A8B1-AAA0108642BA}'] + ['{B5F70E42-EBC8-411A-9DAB-11BCA62B8E74}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -2411,7 +2435,7 @@ type { IContactos_RefreshDelta } IContactos_RefreshDelta = interface(IContactos_Refresh) - ['{DD99CA2A-4B98-4535-B43C-D17EAB8D9915}'] + ['{AE4FA559-4983-41C6-82F3-39C023E9993D}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldNIF_CIFValue : String; @@ -5027,7 +5051,7 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesMOTIVO_BLOQUEO] := Null; end; -function TClientesBusinessProcessorRules.GetRECARGO_EQUIVALENCIAValue: Integer; +function TClientesBusinessProcessorRules.GetRECARGO_EQUIVALENCIAValue: SmallInt; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesRECARGO_EQUIVALENCIA]; end; @@ -5037,7 +5061,7 @@ begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesRECARGO_EQUIVALENCIA]); end; -function TClientesBusinessProcessorRules.GetOldRECARGO_EQUIVALENCIAValue: Integer; +function TClientesBusinessProcessorRules.GetOldRECARGO_EQUIVALENCIAValue: SmallInt; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_ClientesRECARGO_EQUIVALENCIA]; end; @@ -5047,7 +5071,7 @@ begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ClientesRECARGO_EQUIVALENCIA]); end; -procedure TClientesBusinessProcessorRules.SetRECARGO_EQUIVALENCIAValue(const aValue: Integer); +procedure TClientesBusinessProcessorRules.SetRECARGO_EQUIVALENCIAValue(const aValue: SmallInt); begin BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesRECARGO_EQUIVALENCIA] := aValue; end; @@ -5213,6 +5237,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesIGNORAR_CONTABILIDAD] := Null; end; +function TClientesBusinessProcessorRules.GetTIENE_SUBCUENTAValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesTIENE_SUBCUENTA]; +end; + +function TClientesBusinessProcessorRules.GetTIENE_SUBCUENTAIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesTIENE_SUBCUENTA]); +end; + +function TClientesBusinessProcessorRules.GetOldTIENE_SUBCUENTAValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ClientesTIENE_SUBCUENTA]; +end; + +function TClientesBusinessProcessorRules.GetOldTIENE_SUBCUENTAIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ClientesTIENE_SUBCUENTA]); +end; + +procedure TClientesBusinessProcessorRules.SetTIENE_SUBCUENTAValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesTIENE_SUBCUENTA] := aValue; +end; + +procedure TClientesBusinessProcessorRules.SetTIENE_SUBCUENTAIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesTIENE_SUBCUENTA] := Null; +end; + function TClientesBusinessProcessorRules.GetPROCEDENCIA_CLIENTEValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesPROCEDENCIA_CLIENTE]; @@ -6380,6 +6435,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresIGNORAR_CONTABILIDAD] := Null; end; +function TProveedoresBusinessProcessorRules.GetTIENE_SUBCUENTAValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresTIENE_SUBCUENTA]; +end; + +function TProveedoresBusinessProcessorRules.GetTIENE_SUBCUENTAIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresTIENE_SUBCUENTA]); +end; + +function TProveedoresBusinessProcessorRules.GetOldTIENE_SUBCUENTAValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ProveedoresTIENE_SUBCUENTA]; +end; + +function TProveedoresBusinessProcessorRules.GetOldTIENE_SUBCUENTAIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ProveedoresTIENE_SUBCUENTA]); +end; + +procedure TProveedoresBusinessProcessorRules.SetTIENE_SUBCUENTAValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresTIENE_SUBCUENTA] := aValue; +end; + +procedure TProveedoresBusinessProcessorRules.SetTIENE_SUBCUENTAIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresTIENE_SUBCUENTA] := Null; +end; + { TEmpleadosBusinessProcessorRules } constructor TEmpleadosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); diff --git a/Source/Modulos/Contactos/Model/uBizClientesServer.pas b/Source/Modulos/Contactos/Model/uBizClientesServer.pas index 04e2c1a1..41db3c19 100644 --- a/Source/Modulos/Contactos/Model/uBizClientesServer.pas +++ b/Source/Modulos/Contactos/Model/uBizClientesServer.pas @@ -153,13 +153,15 @@ begin ParamByName('TIENDA_WEB').Value := aChange.NewValueByName[fld_ClientesTIENDA_WEB]; ParamByName('CODIGO_ASIGNADO').Value := aChange.NewValueByName[fld_ClientesCODIGO_ASIGNADO]; ParamByName('IGNORAR_CONTABILIDAD').Value := aChange.NewValueByName[fld_ClientesIGNORAR_CONTABILIDAD]; + ParamByName('TIENE_SUBCUENTA').Value := aChange.NewValueByName[fld_ClientesTIENE_SUBCUENTA]; ParamByName('PROCEDENCIA_CLIENTE').Value := aChange.NewValueByName[fld_ClientesPROCEDENCIA_CLIENTE]; Execute; end; //En caso de no ignorar contabilidad se deberá dar de alta una cuenta para el cliente si el usuario no la ha asignado - if (aChange.NewValueByName[fld_ClientesIGNORAR_CONTABILIDAD] = 0) then + if (aChange.NewValueByName[fld_ClientesIGNORAR_CONTABILIDAD] = 0) + and (aChange.NewValueByName[fld_ClientesTIENE_SUBCUENTA] = 0) then begin with TsrvContabilidad.Create(NIL) do try @@ -216,12 +218,14 @@ begin ParamByName('TIENDA_WEB').Value := aChange.NewValueByName[fld_ClientesTIENDA_WEB]; ParamByName('CODIGO_ASIGNADO').Value := aChange.NewValueByName[fld_ClientesCODIGO_ASIGNADO]; ParamByName('IGNORAR_CONTABILIDAD').Value := aChange.NewValueByName[fld_ClientesIGNORAR_CONTABILIDAD]; - ParamByName('PROCEDENCIA_CLIENTE').Value := aChange.NewValueByName[fld_ClientesPROCEDENCIA_CLIENTE]; + ParamByName('TIENE_SUBCUENTA').Value := aChange.NewValueByName[fld_ClientesTIENE_SUBCUENTA]; + ParamByName('PROCEDENCIA_CLIENTE').Value := aChange.NewValueByName[fld_ClientesPROCEDENCIA_CLIENTE]; Execute; end; //En caso de no ignorar contabilidad se deberá dar de alta una cuenta para el cliente si el usuario no la ha asignado - if (aChange.NewValueByName[fld_ClientesIGNORAR_CONTABILIDAD] = 0) then + if (aChange.NewValueByName[fld_ClientesIGNORAR_CONTABILIDAD] = 0) + and (aChange.NewValueByName[fld_ClientesTIENE_SUBCUENTA] = 0) then begin with TsrvContabilidad.Create(NIL) do try diff --git a/Source/Modulos/Contactos/Model/uBizContactos.pas b/Source/Modulos/Contactos/Model/uBizContactos.pas index 9605dfc8..f7eb8113 100644 --- a/Source/Modulos/Contactos/Model/uBizContactos.pas +++ b/Source/Modulos/Contactos/Model/uBizContactos.pas @@ -100,6 +100,10 @@ type function GetIgnorar_Contabilidad: Integer; procedure SetIgnorar_Contabilidad(const Value: Integer); property IGNORAR_CONTABILIDAD: Integer read GetIgnorar_Contabilidad write SetIgnorar_Contabilidad; + + function GetTiene_Subcuenta: Integer; + procedure SetTiene_Subcuenta(const Value: Integer); + property TIENE_SUBCUENTA: Integer read GetTiene_SubCuenta write SetTiene_Subcuenta; end; IBizProveedor = interface (IBizContacto) @@ -152,6 +156,10 @@ type function GetIgnorar_Contabilidad: Integer; procedure SetIgnorar_Contabilidad(const Value: Integer); property IGNORAR_CONTABILIDAD: Integer read GetIgnorar_Contabilidad write SetIgnorar_Contabilidad; + + function GetTiene_Subcuenta: Integer; + procedure SetTiene_Subcuenta(const Value: Integer); + property TIENE_SUBCUENTA: Integer read GetTiene_SubCuenta write SetTiene_Subcuenta; end; IBizEmpleado = interface (IBizContacto) @@ -270,6 +278,9 @@ type function GetIgnorar_Contabilidad: Integer; procedure SetIgnorar_Contabilidad(const Value: Integer); + function GetTiene_Subcuenta: Integer; + procedure SetTiene_Subcuenta(const Value: Integer); + function GetSubCuentas: IBizSubCuentasContacto; procedure SetSubCuentas(const Value: IBizSubCuentasContacto); @@ -291,6 +302,7 @@ type property TIENDA_WEB: Integer read GetTIENDA_WEBValue write SetTIENDA_WEBValue; property SubCuentas : IBizSubCuentasContacto read GetSubCuentas write SetSubCuentas; property IGNORAR_CONTABILIDAD: Integer read GetIgnorar_Contabilidad write SetIgnorar_Contabilidad; + property TIENE_SUBCUENTA: Integer read GetTiene_SubCuenta write SetTiene_Subcuenta; end; @@ -332,6 +344,9 @@ type function GetIgnorar_Contabilidad: Integer; procedure SetIgnorar_Contabilidad(const Value: Integer); + function GetTiene_Subcuenta: Integer; + procedure SetTiene_Subcuenta(const Value: Integer); + function GetSubCuentas: IBizSubCuentasContacto; procedure SetSubCuentas(const Value: IBizSubCuentasContacto); @@ -351,6 +366,7 @@ type property GRUPO_PROVEEDOR: String read GetGRUPO_PROVEEDORValue write SetGRUPO_PROVEEDORValue; property SubCuentas : IBizSubCuentasContacto read GetSubCuentas write SetSubCuentas; property IGNORAR_CONTABILIDAD: Integer read GetIgnorar_Contabilidad write SetIgnorar_Contabilidad; + property TIENE_SUBCUENTA: Integer read GetTiene_SubCuenta write SetTiene_Subcuenta; end; @@ -611,6 +627,11 @@ begin result := DataTable.Fields[idx_ClientesTIENDA_WEB].AsInteger; end; +function TBizCliente.GetTiene_Subcuenta: Integer; +begin + result := DataTable.Fields[idx_ClientesTIENE_SUBCUENTA].AsInteger; +end; + function TBizCliente.GetVENCIMIENTO_FACTURASValue: Integer; begin result := DataTable.Fields[idx_ClientesVENCIMIENTO_FACTURAS].AsInteger; @@ -637,6 +658,11 @@ begin DataTable.Fields[idx_ClientesTIENDA_WEB].AsInteger := aValue; end; +procedure TBizCliente.SetTiene_Subcuenta(const Value: Integer); +begin + DataTable.Fields[idx_ClientesTIENE_SUBCUENTA].AsInteger := Value; +end; + procedure TBizCliente.SetVENCIMIENTO_FACTURASValue(const aValue: Integer); begin DataTable.Fields[idx_ClientesVENCIMIENTO_FACTURAS].AsInteger := aValue; @@ -653,8 +679,10 @@ begin {$IFDEF CONTABILIDAD} IGNORAR_CONTABILIDAD := 0; + TIENE_SUBCUENTA := 0; {$ELSE} IGNORAR_CONTABILIDAD := 1; + TIENE_SUBCUENTA := 0; {$ENDIF} end; @@ -700,6 +728,11 @@ begin result := DataTable.Fields[idx_ProveedoresTIENDA_WEB].AsInteger; end; +function TBizProveedor.GetTiene_Subcuenta: Integer; +begin + result := DataTable.Fields[idx_ProveedoresTIENE_SUBCUENTA].AsInteger; +end; + procedure TBizProveedor.IniciarValoresContactoNuevo; begin inherited; @@ -708,8 +741,10 @@ begin {$IFDEF CONTABILIDAD} IGNORAR_CONTABILIDAD := 0; + TIENE_SUBCUENTA := 0; {$ELSE} IGNORAR_CONTABILIDAD := 1; + TIENE_SUBCUENTA := 0; {$ENDIF} end; @@ -811,6 +846,11 @@ begin end; +procedure TBizProveedor.SetTiene_Subcuenta(const Value: Integer); +begin + DataTable.Fields[idx_ProveedoresTIENE_SUBCUENTA].AsInteger := Value; +end; + { TBizEmpleado } function TBizEmpleado.GetCATEGORIAValue: String; diff --git a/Source/Modulos/Contactos/Model/uBizProveedoresServer.pas b/Source/Modulos/Contactos/Model/uBizProveedoresServer.pas index c40bad3e..dfdaa8ac 100644 --- a/Source/Modulos/Contactos/Model/uBizProveedoresServer.pas +++ b/Source/Modulos/Contactos/Model/uBizProveedoresServer.pas @@ -151,11 +151,13 @@ begin ParamByName('CERTIFICACION').Value := aChange.NewValueByName[fld_ProveedoresCERTIFICACION]; 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]; Execute; end; //En caso de no ignorar contabilidad se deberá dar de alta una cuenta para el cliente si el usuario no la ha asignado - if (aChange.NewValueByName[fld_ClientesIGNORAR_CONTABILIDAD] = 0) then + if (aChange.NewValueByName[fld_ProveedoresIGNORAR_CONTABILIDAD] = 0) + and (aChange.NewValueByName[fld_ProveedoresTIENE_SUBCUENTA] = 0) then begin with TsrvContabilidad.Create(NIL) do try @@ -210,11 +212,13 @@ begin ParamByName('CERTIFICACION').Value := aChange.NewValueByName[fld_ProveedoresCERTIFICACION]; 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]; Execute; end; //En caso de no ignorar contabilidad se deberá dar de alta una cuenta para el cliente si el usuario no la ha asignado - if (aChange.NewValueByName[fld_ClientesIGNORAR_CONTABILIDAD] = 0) then + if (aChange.NewValueByName[fld_ClientesIGNORAR_CONTABILIDAD] = 0) + and (aChange.NewValueByName[fld_ClientesTIENE_SUBCUENTA] = 0) then begin with TsrvContabilidad.Create(NIL) do try diff --git a/Source/Modulos/Contactos/Servidor/srvContactos_Impl.dfm b/Source/Modulos/Contactos/Servidor/srvContactos_Impl.dfm index e3ae746e..fa86f492 100644 --- a/Source/Modulos/Contactos/Servidor/srvContactos_Impl.dfm +++ b/Source/Modulos/Contactos/Servidor/srvContactos_Impl.dfm @@ -635,6 +635,10 @@ object srvContactos: TsrvContactos DatasetField = 'IGNORAR_CONTABILIDAD' TableField = 'IGNORAR_CONTABILIDAD' end + item + DatasetField = 'TIENE_SUBCUENTA' + TableField = 'TIENE_SUBCUENTA' + end item DatasetField = 'PROCEDENCIA_CLIENTE' TableField = 'PROCEDENCIA_CLIENTE' @@ -826,7 +830,7 @@ object srvContactos: TsrvContactos end item Name = 'RECARGO_EQUIVALENCIA' - DataType = datInteger + DataType = datSmallInt DictionaryEntry = 'Clientes_RECARGO_EQUIVALENCIA' end item @@ -855,6 +859,10 @@ object srvContactos: TsrvContactos DataType = datInteger DictionaryEntry = 'Clientes_IGNORAR_CONTABILIDAD' end + item + Name = 'TIENE_SUBCUENTA' + DataType = datInteger + end item Name = 'PROCEDENCIA_CLIENTE' DataType = datString @@ -1013,6 +1021,10 @@ object srvContactos: TsrvContactos item DatasetField = 'IGNORAR_CONTABILIDAD' TableField = 'IGNORAR_CONTABILIDAD' + end + item + DatasetField = 'TIENE_SUBCUENTA' + TableField = 'TIENE_SUBCUENTA' end> end> Name = 'Proveedores' @@ -1224,6 +1236,10 @@ object srvContactos: TsrvContactos Name = 'IGNORAR_CONTABILIDAD' DataType = datInteger DictionaryEntry = 'Proveedores_IGNORAR_CONTABILIDAD' + end + item + Name = 'TIENE_SUBCUENTA' + DataType = datInteger end> end item @@ -2711,6 +2727,10 @@ object srvContactos: TsrvContactos item Name = 'PROCEDENCIA_CLIENTE' Value = '' + end + item + Name = 'TIENE_SUBCUENTA' + Value = '' end> Statements = < item @@ -2721,11 +2741,12 @@ object srvContactos: TsrvContactos 'ARGO_EQUIVALENCIA,'#10' NOMBRE_COMERCIAL, VENCIMIENTO_FACTURAS, ' + 'BLOQUEADO, MOTIVO_BLOQUEO,'#10' REGIMEN_IVA, ID_TIPO_IVA, ID_FOR' + 'MA_PAGO, TIENDA_WEB, CODIGO_ASIGNADO, IGNORAR_CONTABILIDAD,'#10' ' + - ' PROCEDENCIA_CLIENTE)'#10' VALUES'#10' (:ID_CLIENTE, :GRUPO_CLIENTE,' + - ' :RECARGO_EQUIVALENCIA,'#10' :NOMBRE_COMERCIAL, :VENCIMIENTO_FAC' + - 'TURAS,'#10' :BLOQUEADO, :MOTIVO_BLOQUEO, :REGIMEN_IVA,'#10' :ID_' + - 'TIPO_IVA, :ID_FORMA_PAGO, :TIENDA_WEB, :CODIGO_ASIGNADO, :IGNORA' + - 'R_CONTABILIDAD,'#10' :PROCEDENCIA_CLIENTE)'#10 + ' PROCEDENCIA_CLIENTE, TIENE_SUBCUENTA)'#10' VALUES'#10' (:ID_CLIENTE' + + ', :GRUPO_CLIENTE, :RECARGO_EQUIVALENCIA,'#10' :NOMBRE_COMERCIAL,' + + ' :VENCIMIENTO_FACTURAS,'#10' :BLOQUEADO, :MOTIVO_BLOQUEO, :REGIM' + + 'EN_IVA,'#10' :ID_TIPO_IVA, :ID_FORMA_PAGO, :TIENDA_WEB, :CODIGO_' + + 'ASIGNADO, :IGNORAR_CONTABILIDAD,'#10' :PROCEDENCIA_CLIENTE, :TIE' + + 'NE_SUBCUENTA)'#10 StatementType = stSQL ColumnMappings = <> end> @@ -2805,6 +2826,10 @@ object srvContactos: TsrvContactos Name = 'IGNORAR_CONTABILIDAD' Value = '' end + item + Name = 'TIENE_SUBCUENTA' + Value = '' + end item Name = 'PROCEDENCIA_CLIENTE' Value = '' @@ -2826,8 +2851,9 @@ object srvContactos: TsrvContactos '= :REGIMEN_IVA,'#10' ID_TIPO_IVA = :ID_TIPO_IVA,'#10' ID_FORMA_PAG' + 'O = :ID_FORMA_PAGO,'#10' TIENDA_WEB = :TIENDA_WEB,'#10' CODIGO_ASI' + 'GNADO = :CODIGO_ASIGNADO,'#10' IGNORAR_CONTABILIDAD = :IGNORAR_CO' + - 'NTABILIDAD,'#10' PROCEDENCIA_CLIENTE = :PROCEDENCIA_CLIENTE'#10' WHE' + - 'RE'#10' (ID_CLIENTE = :OLD_ID_CLIENTE)'#10 + 'NTABILIDAD,'#10' TIENE_SUBCUENTA = :TIENE_SUBCUENTA,'#10' PROCEDEN' + + 'CIA_CLIENTE = :PROCEDENCIA_CLIENTE'#10' WHERE'#10' (ID_CLIENTE = :OL' + + 'D_ID_CLIENTE)'#10 StatementType = stSQL ColumnMappings = <> end> @@ -2882,6 +2908,10 @@ object srvContactos: TsrvContactos item Name = 'IGNORAR_CONTABILIDAD' Value = '' + end + item + Name = 'TIENE_SUBCUENTA' + Value = '' end> Statements = < item @@ -2891,11 +2921,11 @@ 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)'#10' VALUES'#10' (:ID_PROVE' + - 'EDOR, :REGIMEN_IVA, :DESCUENTO, :DESCRIPCION_PROVEEDOR,'#10' :COD' + - 'IGO_ASIGNADO, :ID_TIPO_IVA,'#10' :ID_FORMA_PAGO, :TIENDA_WEB, :HO' + - 'MOLOGADO, :CERTIFICACION, :GRUPO_PROVEEDOR,'#10' :IGNORAR_CONTABI' + - 'LIDAD)'#10 + '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 StatementType = stSQL ColumnMappings = <> end> @@ -2971,6 +3001,10 @@ object srvContactos: TsrvContactos Name = 'IGNORAR_CONTABILIDAD' Value = '' end + item + Name = 'TIENE_SUBCUENTA' + Value = '' + end item Name = 'OLD_ID_PROVEEDOR' Value = '' @@ -2987,8 +3021,8 @@ 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' WHERE'#10' (ID_PROVEEDOR = :OLD_ID_PROV' + - 'EEDOR)'#10 + '= :IGNORAR_CONTABILIDAD,'#10' TIENE_SUBCUENTA = :TIENE_SUBCUENTA'#10 + + ' WHERE'#10' (ID_PROVEEDOR = :OLD_ID_PROVEEDOR)'#10 StatementType = stSQL ColumnMappings = <> end> @@ -4216,7 +4250,7 @@ object srvContactos: TsrvContactos end item Name = 'Clientes_RECARGO_EQUIVALENCIA' - DataType = datInteger + DataType = datSmallInt DisplayLabel = 'Rec. equiv.' end item diff --git a/Source/Modulos/Contactos/Views/uEditorCliente.dfm b/Source/Modulos/Contactos/Views/uEditorCliente.dfm index a7915e93..88003d1d 100644 --- a/Source/Modulos/Contactos/Views/uEditorCliente.dfm +++ b/Source/Modulos/Contactos/Views/uEditorCliente.dfm @@ -341,20 +341,20 @@ inherited fEditorCliente: TfEditorCliente LookAndFeel = dxLayoutOfficeLookAndFeel ExplicitWidth = 882 inherited Label1: TLabel - Left = 492 + Left = 465 Top = 30 Width = 281 Caption = 'Puede indicar el d'#237'a del mes que el cliente desea realizar el pa' + 'go de sus recibos.' - ExplicitLeft = 492 + ExplicitLeft = 465 ExplicitTop = 30 ExplicitWidth = 281 end inherited eDiasVencimiento: TcxDBSpinEdit - Left = 618 + Left = 591 Top = 62 - ExplicitLeft = 618 + ExplicitLeft = 591 ExplicitTop = 62 ExplicitWidth = 160 Width = 160 @@ -362,37 +362,29 @@ inherited fEditorCliente: TfEditorCliente inherited cbRegimenIVA: TcxDBComboBox Top = 30 ExplicitTop = 30 - ExplicitWidth = 121 - Width = 121 end inherited cbRecargoEquivalencia: TcxDBCheckBox Top = 111 ExplicitTop = 111 - ExplicitWidth = 121 - Width = 121 end inherited cbFormaPago: TcxDBLookupComboBox Top = 57 ExplicitTop = 57 - ExplicitWidth = 121 - Width = 121 end inherited bFormasPago: TButton - Left = 332 + Left = 305 Top = 57 - ExplicitLeft = 332 + ExplicitLeft = 305 ExplicitTop = 57 end inherited eIVA: TcxDBLookupComboBox Top = 84 ExplicitTop = 84 - ExplicitWidth = 121 - Width = 121 end inherited bTiposIVA: TButton - Left = 332 + Left = 305 Top = 84 - ExplicitLeft = 332 + ExplicitLeft = 305 ExplicitTop = 84 end inherited dxLayoutGroup1: TdxLayoutGroup @@ -439,6 +431,18 @@ inherited fEditorCliente: TfEditorCliente inherited ToolBar1: TToolBar Width = 882 ExplicitWidth = 882 + 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 @@ -514,21 +518,12 @@ inherited fEditorCliente: TfEditorCliente DesignSize = ( 882 516) - inherited eRefSubCuenta: TcxDBTextEdit - ExplicitWidth = 346 - Width = 346 - end inherited BitBtn3: TBitBtn Left = 540 ExplicitLeft = 540 end - inherited eSubCuenta: TcxDBTextEdit - ExplicitWidth = 265 - Width = 265 - end inherited BitBtn1: TBitBtn Left = 656 - Visible = True ExplicitLeft = 656 end inherited BitBtn2: TBitBtn @@ -537,8 +532,6 @@ inherited fEditorCliente: TfEditorCliente end inherited cbIgnorarContabilidad: TcxDBCheckBox DataBinding.DataSource = frViewCliente1.dsContacto - ExplicitWidth = 300 - Width = 300 end end end diff --git a/Source/Modulos/Contactos/Views/uEditorCliente.pas b/Source/Modulos/Contactos/Views/uEditorCliente.pas index a3e96111..08c6350a 100644 --- a/Source/Modulos/Contactos/Views/uEditorCliente.pas +++ b/Source/Modulos/Contactos/Views/uEditorCliente.pas @@ -46,7 +46,8 @@ implementation uses uEditorItem, uEditorBase, uDataModuleUsuarios, uEditorDBItem, cxDBEdit, - uGruposClienteController, uBizGruposCliente, uEditorDBBase, uDialogUtils; + uGruposClienteController, uBizGruposCliente, uEditorDBBase, uDialogUtils, + uClientesController; procedure TfEditorCliente.actGruposClienteExecute(Sender: TObject); var @@ -90,12 +91,21 @@ end; procedure TfEditorCliente.GuardarInterno; begin + //Si tiene al menos una subcuenta asociada se pone el flag el cliente a 1, asi podremos poner un icono en la lista de clientes + //que tengan subcuenta asociada, y comprobar si al modificar no tene ya seleccionada una subcuenta en tal caso la crearemos si el + //usuario lo desea. + if ((Contacto as IBizCliente).SubCuentas.RecordCount <> 0) then + (Controller as IClientesController).SetTieneSubCuenta(Contacto as IBizCliente, True) + else + (Controller as IClientesController).SetTieneSubCuenta(Contacto as IBizCliente, False); - //Si estamos modificando un cliente y se activa la contabilidad, debemos avisar que se asignará una subcuenta al cliente + //Evitamos que cada vez que se añada un cliente te pregunta por defecto se crea y punto. + //Otro caso es al modificar que si que hay que preguntar por si acaso desea asignar el manualmente una subcuenta existente if not Contacto.EsNuevo - and (frViewSubCuentaContacto1.cbIgnorarContabilidad.EditValue = 0) then - if (ShowConfirmMessage('Confirmación de subcuenta', 'Se creará una nueva subcuenta para el cliente' + #10#13 + '¿Esta seguro que desea continuar?') = IDNO) then - frViewSubCuentaContacto1.cbIgnorarContabilidad.EditValue := 1; + and (frViewSubCuentaContacto1.cbIgnorarContabilidad.EditValue = 0) + and ((Contacto as IBizCliente).TIENE_SUBCUENTA = 0) then + if (ShowConfirmMessage('Confirmación de subcuenta', 'El cliente no tiene asignada ninguna subcuenta contable.' + #10#13 + '¿Desea crear una nueva subcuenta para el cliente?') = IDNO) then + (Controller as IClientesController).SetIgnorarContabilidad(Contacto as IBizCliente, True); inherited; end; diff --git a/Source/Modulos/Contactos/Views/uEditorProveedor.dfm b/Source/Modulos/Contactos/Views/uEditorProveedor.dfm index aa26787f..eff56454 100644 --- a/Source/Modulos/Contactos/Views/uEditorProveedor.dfm +++ b/Source/Modulos/Contactos/Views/uEditorProveedor.dfm @@ -269,8 +269,8 @@ inherited fEditorProveedor: TfEditorProveedor ExplicitTop = 270 inherited dxLayoutControl1: TdxLayoutControl inherited cbTienda: TcxComboBox - ExplicitWidth = 376 - Width = 376 + ExplicitWidth = 250 + Width = 250 end end end @@ -405,7 +405,7 @@ inherited fEditorProveedor: TfEditorProveedor end inherited ToolBar1: TToolBar Width = 634 - ExplicitWidth = 640 + ExplicitWidth = 634 inherited ToolButton1: TToolButton ExplicitWidth = 113 end diff --git a/Source/Modulos/Contactos/Views/uEditorProveedor.pas b/Source/Modulos/Contactos/Views/uEditorProveedor.pas index 755b1f78..1675ac40 100644 --- a/Source/Modulos/Contactos/Views/uEditorProveedor.pas +++ b/Source/Modulos/Contactos/Views/uEditorProveedor.pas @@ -28,7 +28,7 @@ type frViewSubCuentaContacto1: TfrViewSubCuentaContacto; procedure actGruposProveedorExecute(Sender: TObject); protected - procedure GuardarInterno; override; + procedure GuardarInterno; override; procedure EliminarInterno; override; procedure SetContacto(const Value: IBizContacto); override; public @@ -43,7 +43,7 @@ implementation { TfEditorProveedor } uses - uDialogUtils, uGruposProveedorController, uBizGruposProveedor; + uDialogUtils, uGruposProveedorController, uBizGruposProveedor, uProveedoresController; procedure TfEditorProveedor.actGruposProveedorExecute(Sender: TObject); var @@ -80,12 +80,21 @@ end; procedure TfEditorProveedor.GuardarInterno; begin + //Si tiene al menos una subcuenta asociada se pone el flag el cliente a 1, asi podremos poner un icono en la lista de proveedores + //que tengan subcuenta asociada, y comprobar si al modificar no tene ya seleccionada una subcuenta en tal caso la crearemos si el + //usuario lo desea. + if ((Contacto as IBizProveedor).SubCuentas.RecordCount <> 0) then + (Controller as IProveedoresController).SetTieneSubCuenta(Contacto as IBizProveedor, True) + else + (Controller as IProveedoresController).SetTieneSubCuenta(Contacto as IBizProveedor, False); - //Si estamos modificando un proveedor y se activa la contabilidad, debemos avisar que se asignará una subcuenta al proveedor + //Evitamos que cada vez que se añada un proveedor te pregunta por defecto se crea y punto. + //Otro caso es al modificar que si que hay que preguntar por si acaso desea asignar el manualmente una subcuenta existente if not Contacto.EsNuevo - and (frViewSubCuentaContacto1.cbIgnorarContabilidad.EditValue = 0) then - if (ShowConfirmMessage('Confirmación de subcuenta', 'Se creará una nueva subcuenta para el proveedor' + #10#13 + '¿Esta seguro que desea continuar?') = IDNO) then - frViewSubCuentaContacto1.cbIgnorarContabilidad.EditValue := 1; + and (frViewSubCuentaContacto1.cbIgnorarContabilidad.EditValue = 0) + and ((Contacto as IBizProveedor).TIENE_SUBCUENTA = 0) then + if (ShowConfirmMessage('Confirmación de subcuenta', 'El proveedor no tiene asignada ninguna subcuenta contable.' + #10#13 + '¿Desea crear una nueva subcuenta para el proveedor?') = IDNO) then + (Controller as IProveedoresController).SetIgnorarContabilidad(Contacto as IBizProveedor, True); inherited; end; diff --git a/Source/Modulos/Contactos/Views/uViewSubCuentaContacto.dfm b/Source/Modulos/Contactos/Views/uViewSubCuentaContacto.dfm index dd5d7f1a..94687524 100644 --- a/Source/Modulos/Contactos/Views/uViewSubCuentaContacto.dfm +++ b/Source/Modulos/Contactos/Views/uViewSubCuentaContacto.dfm @@ -1,5 +1,5 @@ inherited frViewSubCuentaContacto: TfrViewSubCuentaContacto - Width = 487 + Width = 451 Height = 304 Align = alClient AutoSize = True @@ -10,15 +10,14 @@ inherited frViewSubCuentaContacto: TfrViewSubCuentaContacto object layoutApunte: TdxLayoutControl Left = 0 Top = 0 - Width = 487 + Width = 451 Height = 304 Align = alClient ParentBackground = True TabOrder = 0 AutoContentSizes = [acsWidth, acsHeight] - ExplicitWidth = 451 DesignSize = ( - 487 + 451 304) object eRefSubCuenta: TcxDBTextEdit Left = 93 @@ -41,7 +40,7 @@ inherited frViewSubCuentaContacto: TfrViewSubCuentaContacto Width = 346 end object BitBtn3: TBitBtn - Left = 145 + Left = 119 Top = 37 Width = 110 Height = 25 @@ -105,7 +104,7 @@ inherited frViewSubCuentaContacto: TfrViewSubCuentaContacto Width = 265 end object BitBtn1: TBitBtn - Left = 261 + Left = 235 Top = 37 Width = 120 Height = 25 @@ -149,7 +148,7 @@ inherited frViewSubCuentaContacto: TfrViewSubCuentaContacto E000E248D100E407DB00FF00FF00FF00FF00FF00FF00FF00FF00} end object BitBtn2: TBitBtn - Left = 387 + Left = 361 Top = 37 Width = 90 Height = 25 @@ -162,6 +161,7 @@ inherited frViewSubCuentaContacto: TfrViewSubCuentaContacto Top = 10 Caption = 'Ignorar en contabilidad' DataBinding.DataField = 'IGNORAR_CONTABILIDAD' + Properties.ImmediatePost = True Properties.NullStyle = nssUnchecked Properties.ValueChecked = 1 Properties.ValueUnchecked = 0 diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES index e0f8b0a6..ab999d4c 100644 Binary files a/Source/Servidor/FactuGES_Server.RES and b/Source/Servidor/FactuGES_Server.RES differ diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr index 4f7ff3ba..6e717a93 100644 --- a/Source/Servidor/FactuGES_Server.dpr +++ b/Source/Servidor/FactuGES_Server.dpr @@ -101,8 +101,6 @@ uses schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas', schUsuariosClient_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosClient_Intf.pas', schUsuariosServer_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosServer_Intf.pas', - schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas', - schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas', uBizRecibosClienteServer in '..\Modulos\Recibos de cliente\Model\uBizRecibosClienteServer.pas', schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas', schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas', @@ -119,7 +117,9 @@ uses uBizRecibosProveedorServer in '..\Modulos\Recibos de proveedor\Model\uBizRecibosProveedorServer.pas', uRptAlbaranesCliente_Server in '..\Modulos\Albaranes de cliente\Reports\uRptAlbaranesCliente_Server.pas', schRecibosProveedorClient_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorClient_Intf.pas', - schRecibosProveedorServer_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorServer_Intf.pas'; + schRecibosProveedorServer_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorServer_Intf.pas', + schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas', + schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas'; {$R *.res} {$R ..\Servicios\RODLFile.res} diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj index 109b1a07..93e9a190 100644 --- a/Source/Servidor/FactuGES_Server.dproj +++ b/Source/Servidor/FactuGES_Server.dproj @@ -1,254 +1,255 @@ - + - - {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1} - FactuGES_Server.dpr - Debug - AnyCPU - DCC32 - ..\..\Output\Debug\Servidor\FactuGES_Server.exe - - - 7.0 - False - False - 0 - 3 - ..\..\Output\Release\Servidor - RELEASE - - - 7.0 - 3 - ..\..\Output\Debug\Servidor - DEBUG; - True - - - Delphi.Personality - - - FalseTrueFalseTrueFalse1100FalseFalseFalseFalseFalse308212521.1.0.01.1.0.0martes, 25 de marzo de 2008 19:25 - RemObjects Pascal Script - RemObjects SDK 3.0 Integration - FactuGES_Server.dpr - - - - - MainSource - - - - - -
srvEjercicios
- TDataAbstractService -
- - - -
srvEmpresas
- TDARemoteService -
- - - - - - - - - -
srvAlbaranesCliente
- TDataAbstractService -
- - - - -
srvAlbaranesProveedor
- TDataAbstractService -
- - - -
srvAlmacenes
- TDARemoteService -
- - - - - - -
srvContabilidad
- TDataAbstractService -
- - - - - - - -
RptEtiquetasContacto
- TDataModule -
- -
RptFichasEmpleado
- TDataModule -
- -
srvContactos
- TDARemoteService -
- - - - -
RptFacturasCliente
- TDataModule -
- -
srvFacturasCliente
- TDataAbstractService -
- - - - -
srvFacturasProveedor
- TDataAbstractService -
- - - - - - - - - -
srvHistoricoMovimientos
- TDataAbstractService -
- - - -
srvInventario
- TDataAbstractService -
- - - - -
srvPedidosProveedor
- TDataAbstractService -
- - - - -
RptPresupuestosCliente
-
- -
srvPresupuestosCliente
- TDataAbstractService -
- - - - - -
RptRecibosCliente
- TDataModule -
- -
srvRecibosCliente
- TDataAbstractService -
- - - - - -
srvRecibosProveedor
- TDataAbstractService -
- - - -
srvReferencias
- TDataAbstractService -
- - - - -
srvRemesasCliente
- TDataAbstractService -
- - - - -
srvRemesasProveedor
- TDataAbstractService -
- - - - - - -
srvUnidadesMedida
- TDataAbstractService -
- - - -
srvConfiguracion
- TDataAbstractService -
- -
frConexionBD
- TFrame -
- -
frConfGeneral
- TFrame -
- -
fConfiguracion
- TForm -
- -
FrameConfiguracion
- TFrame -
- -
srvLogin
- TDARemoteService -
- -
fAcercaDe
-
- -
dmServer
- TDataModule -
- -
fServerForm
-
- - - - - - - - -
+ + {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1} + FactuGES_Server.dpr + Debug + AnyCPU + DCC32 + ..\..\Output\Debug\Servidor\FactuGES_Server.exe + + + 7.0 + False + False + 0 + 3 + ..\..\Output\Release\Servidor + RELEASE + + + 7.0 + 3 + ..\..\Output\Debug\Servidor + DEBUG; + True + + + Delphi.Personality + + +FalseTrueFalseTrueFalse1100FalseFalseFalseFalseFalse308212521.1.0.01.1.0.0martes, 25 de marzo de 2008 19:25 + + RemObjects Pascal Script - RemObjects SDK 3.0 Integration + FactuGES_Server.dpr + + + + + MainSource + + + + + +
srvEjercicios
+ TDataAbstractService +
+ + + +
srvEmpresas
+ TDARemoteService +
+ + + + + + + + + +
srvAlbaranesCliente
+ TDataAbstractService +
+ + + + +
srvAlbaranesProveedor
+ TDataAbstractService +
+ + + +
srvAlmacenes
+ TDARemoteService +
+ + + + + + +
srvContabilidad
+ TDataAbstractService +
+ + + + + + + +
RptEtiquetasContacto
+ TDataModule +
+ +
RptFichasEmpleado
+ TDataModule +
+ +
srvContactos
+ TDARemoteService +
+ + + + +
RptFacturasCliente
+ TDataModule +
+ +
srvFacturasCliente
+ TDataAbstractService +
+ + + + +
srvFacturasProveedor
+ TDataAbstractService +
+ + + + + + + + + +
srvHistoricoMovimientos
+ TDataAbstractService +
+ + + +
srvInventario
+ TDataAbstractService +
+ + + + +
srvPedidosProveedor
+ TDataAbstractService +
+ + + + +
RptPresupuestosCliente
+
+ +
srvPresupuestosCliente
+ TDataAbstractService +
+ + + + + +
RptRecibosCliente
+ TDataModule +
+ +
srvRecibosCliente
+ TDataAbstractService +
+ + + + + +
srvRecibosProveedor
+ TDataAbstractService +
+ + + +
srvReferencias
+ TDataAbstractService +
+ + + + +
srvRemesasCliente
+ TDataAbstractService +
+ + + + +
srvRemesasProveedor
+ TDataAbstractService +
+ + + + + + +
srvUnidadesMedida
+ TDataAbstractService +
+ + + +
srvConfiguracion
+ TDataAbstractService +
+ +
frConexionBD
+ TFrame +
+ +
frConfGeneral
+ TFrame +
+ +
fConfiguracion
+ TForm +
+ +
FrameConfiguracion
+ TFrame +
+ +
srvLogin
+ TDARemoteService +
+ +
fAcercaDe
+
+ +
dmServer
+ TDataModule +
+ +
fServerForm
+
+ + + + + + + + +