diff --git a/Build/BuildRoberto.fbl5 b/Build/BuildRoberto.fbl5 index 2eed09bb..092d543b 100644 Binary files a/Build/BuildRoberto.fbl5 and b/Build/BuildRoberto.fbl5 differ diff --git a/Database/FACTUGES.FDB b/Database/FACTUGES.FDB index 7b5de8cd..507c893e 100644 Binary files a/Database/FACTUGES.FDB and b/Database/FACTUGES.FDB differ diff --git a/Database/VISTAS.SQL b/Database/VISTAS.SQL index 6292f470..a741bc66 100644 --- a/Database/VISTAS.SQL +++ b/Database/VISTAS.SQL @@ -1,6 +1,4 @@ DROP VIEW V_REMESAS_PROVEEDOR; - - DROP VIEW V_VENTAS_ARTICULOS; /* @@ -68,6 +66,8 @@ DROP VIEW V_FAC_PRO_SITUACION; DROP VIEW V_REC_FAC_CLI_COBRADOS; DROP VIEW V_REC_FAC_PRO_PAGADOS; DROP VIEW V_RECIBOS_CLIENTE; +DROP VIEW V_REMESAS_CLIENTE; +DROP VIEW V_REC_CLI_COMPENSADOS; DROP VIEW V_RECIBOS_PROVEEDOR; DROP VIEW V_REC_CLI_SITUACION; DROP VIEW V_REC_PRO_SITUACION; @@ -78,53 +78,8 @@ DROP VIEW V_ALBARANES_PROVEEDOR; DROP VIEW V_PROVEEDORES; DROP VIEW V_CLIENTES; DROP VIEW V_CONTACTOS; -DROP VIEW V_REMESAS_CLIENTE; -CREATE VIEW V_REMESAS_CLIENTE( - ID, - ID_EMPRESA, - REFERENCIA, - FECHA_REMESA, - DESCRIPCION, - ID_DATOS_BANCO, - FECHA_ALTA, - FECHA_MODIFICACION, - USUARIO, - NOMBRE, - ENTIDAD, - SUCURSAL, - DC, - CUENTA, - SUFIJO_N19, - SUFIJO_N58, - IMPORTE_TOTAL) -AS -SELECT - REMESAS_CLIENTE.ID, - REMESAS_CLIENTE.ID_EMPRESA, - REMESAS_CLIENTE.REFERENCIA, - REMESAS_CLIENTE.FECHA_REMESA, - REMESAS_CLIENTE.DESCRIPCION, - REMESAS_CLIENTE.ID_DATOS_BANCO, - REMESAS_CLIENTE.FECHA_ALTA, - REMESAS_CLIENTE.FECHA_MODIFICACION, - REMESAS_CLIENTE.USUARIO, - EMPRESAS_DATOS_BANCO.NOMBRE, - EMPRESAS_DATOS_BANCO.ENTIDAD, - EMPRESAS_DATOS_BANCO.SUCURSAL, - EMPRESAS_DATOS_BANCO.DC, - EMPRESAS_DATOS_BANCO.CUENTA, - EMPRESAS_DATOS_BANCO.SUFIJO_N19, - EMPRESAS_DATOS_BANCO.SUFIJO_N58, - SUM(RECIBOS_CLIENTE.IMPORTE + RECIBOS_CLIENTE.OTROS_GASTOS) as IMPORTE_TOTAL - -FROM - REMESAS_CLIENTE - LEFT OUTER JOIN EMPRESAS_DATOS_BANCO ON (EMPRESAS_DATOS_BANCO.ID = REMESAS_CLIENTE.ID_DATOS_BANCO) - LEFT OUTER JOIN RECIBOS_CLIENTE ON (RECIBOS_CLIENTE.ID_REMESA = REMESAS_CLIENTE.ID) -GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16; - CREATE VIEW V_CONTACTOS( ID, @@ -567,9 +522,20 @@ LEFT JOIN REMESAS_PROVEEDOR ON (REMESAS_PROVEEDOR.ID = RECIBOS_PROVEEDOR.ID_REMESA); +CREATE VIEW V_REC_CLI_COMPENSADOS ( +ID_RECIBO, +IMPORTE_TOTAL_COMPENSADO +) as +select ID_RECIBO_COMPENSADO, SUM((IMPORTE + OTROS_GASTOS)) as IMPORTE_TOTAL +from RECIBOS_CLIENTE +where ID_RECIBO_COMPENSADO is not null +group by ID_RECIBO_COMPENSADO; + CREATE VIEW V_RECIBOS_CLIENTE( ID, + ID_RECIBO_COMPENSADO, + REFERENCIA_REC_COMPENSADO, REFERENCIA, SITUACION, ID_FACTURA, @@ -597,13 +563,20 @@ CREATE VIEW V_RECIBOS_CLIENTE( FECHA_MODIFICACION, USUARIO) AS -SELECT RECIBOS_CLIENTE.ID, RECIBOS_CLIENTE.REFERENCIA, - V_REC_CLI_SITUACION.SITUACION, +SELECT RECIBOS_CLIENTE.ID, + RECIBOS_CLIENTE.ID_RECIBO_COMPENSADO, + RECIBO_COMPENSADO1.REFERENCIA, + RECIBOS_CLIENTE.REFERENCIA, + CASE + WHEN RECIBOS_CLIENTE.ID_RECIBO_COMPENSADO IS NULL + THEN V_REC_CLI_SITUACION.SITUACION + ELSE RECIBO_COMPENSADO2.SITUACION + END, RECIBOS_CLIENTE.ID_FACTURA, RECIBOS_CLIENTE.ID_REMESA, REMESAS_CLIENTE.REFERENCIA as REFERENCIA_REMESA, RECIBOS_CLIENTE.FECHA_EMISION, RECIBOS_CLIENTE.FECHA_VENCIMIENTO, RECIBOS_CLIENTE.DESCRIPCION, RECIBOS_CLIENTE.OBSERVACIONES, RECIBOS_CLIENTE.IMPORTE, RECIBOS_CLIENTE.OTROS_GASTOS, - RECIBOS_CLIENTE.IMPORTE + RECIBOS_CLIENTE.OTROS_GASTOS, + COALESCE(RECIBOS_CLIENTE.IMPORTE, 0) + COALESCE(RECIBOS_CLIENTE.OTROS_GASTOS, 0) + COALESCE(V_REC_CLI_COMPENSADOS.IMPORTE_TOTAL_COMPENSADO, 0), FACTURAS_CLIENTE.FECHA_FACTURA, FORMAS_PAGO.DESCRIPCION, FACTURAS_CLIENTE.IMPORTE_TOTAL, FACTURAS_CLIENTE.ID_EMPRESA, @@ -627,7 +600,61 @@ ON (CONTACTOS.ID = FACTURAS_CLIENTE.ID_CLIENTE) LEFT JOIN CONTACTOS_DATOS_BANCO ON (CONTACTOS_DATOS_BANCO.ID_CONTACTO = CONTACTOS.ID) LEFT JOIN REMESAS_CLIENTE -ON (REMESAS_CLIENTE.ID = RECIBOS_CLIENTE.ID_REMESA); +ON (REMESAS_CLIENTE.ID = RECIBOS_CLIENTE.ID_REMESA) +LEFT JOIN V_REC_CLI_COMPENSADOS +ON (V_REC_CLI_COMPENSADOS.ID_RECIBO = RECIBOS_CLIENTE.ID) +LEFT JOIN RECIBOS_CLIENTE RECIBO_COMPENSADO1 +ON (RECIBO_COMPENSADO1.ID = RECIBOS_CLIENTE.ID_RECIBO_COMPENSADO) +LEFT JOIN V_REC_CLI_SITUACION RECIBO_COMPENSADO2 +ON (RECIBO_COMPENSADO2.ID_RECIBO = RECIBOS_CLIENTE.ID_RECIBO_COMPENSADO); + + + +CREATE VIEW V_REMESAS_CLIENTE( + ID, + ID_EMPRESA, + REFERENCIA, + FECHA_REMESA, + DESCRIPCION, + ID_DATOS_BANCO, + FECHA_ALTA, + FECHA_MODIFICACION, + USUARIO, + NOMBRE, + ENTIDAD, + SUCURSAL, + DC, + CUENTA, + SUFIJO_N19, + SUFIJO_N58, + IMPORTE_TOTAL) +AS +SELECT + REMESAS_CLIENTE.ID, + REMESAS_CLIENTE.ID_EMPRESA, + REMESAS_CLIENTE.REFERENCIA, + REMESAS_CLIENTE.FECHA_REMESA, + REMESAS_CLIENTE.DESCRIPCION, + REMESAS_CLIENTE.ID_DATOS_BANCO, + REMESAS_CLIENTE.FECHA_ALTA, + REMESAS_CLIENTE.FECHA_MODIFICACION, + REMESAS_CLIENTE.USUARIO, + EMPRESAS_DATOS_BANCO.NOMBRE, + EMPRESAS_DATOS_BANCO.ENTIDAD, + EMPRESAS_DATOS_BANCO.SUCURSAL, + EMPRESAS_DATOS_BANCO.DC, + EMPRESAS_DATOS_BANCO.CUENTA, + EMPRESAS_DATOS_BANCO.SUFIJO_N19, + EMPRESAS_DATOS_BANCO.SUFIJO_N58, + SUM(COALESCE(RECIBOS_CLIENTE.IMPORTE,0) + COALESCE(RECIBOS_CLIENTE.OTROS_GASTOS,0) + COALESCE(V_REC_CLI_COMPENSADOS.IMPORTE_TOTAL_COMPENSADO,0)) as IMPORTE_TOTAL + +FROM + REMESAS_CLIENTE + LEFT OUTER JOIN EMPRESAS_DATOS_BANCO ON (EMPRESAS_DATOS_BANCO.ID = REMESAS_CLIENTE.ID_DATOS_BANCO) + LEFT OUTER JOIN RECIBOS_CLIENTE ON (RECIBOS_CLIENTE.ID_REMESA = REMESAS_CLIENTE.ID) + LEFT OUTER JOIN V_REC_CLI_COMPENSADOS ON (V_REC_CLI_COMPENSADOS.ID_RECIBO = RECIBOS_CLIENTE.ID) +GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16; + CREATE VIEW V_REC_FAC_PRO_PAGADOS( @@ -2218,3 +2245,6 @@ FROM LEFT OUTER JOIN EMPRESAS_DATOS_BANCO ON (EMPRESAS_DATOS_BANCO.ID = REMESAS_PROVEEDOR.ID_DATOS_BANCO) LEFT OUTER JOIN RECIBOS_PROVEEDOR ON (RECIBOS_PROVEEDOR.ID_REMESA = REMESAS_PROVEEDOR.ID) GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16; + + + diff --git a/Output/Debug/Cliente/FactuGES.exe b/Output/Debug/Cliente/FactuGES.exe index 69878f20..f1a80542 100644 Binary files a/Output/Debug/Cliente/FactuGES.exe and b/Output/Debug/Cliente/FactuGES.exe differ diff --git a/Output/Debug/Servidor/FactuGES_Server.exe b/Output/Debug/Servidor/FactuGES_Server.exe index 86255c9b..45b9a17d 100644 Binary files a/Output/Debug/Servidor/FactuGES_Server.exe and b/Output/Debug/Servidor/FactuGES_Server.exe differ diff --git a/Output/Debug/Servidor/Informes/InfRemesaProveedor.fr3 b/Output/Debug/Servidor/Informes/InfRemesaProveedor.fr3 index 76deaff1..89084951 100644 --- a/Output/Debug/Servidor/Informes/InfRemesaProveedor.fr3 +++ b/Output/Debug/Servidor/Informes/InfRemesaProveedor.fr3 @@ -1,5 +1,5 @@ - + @@ -48,7 +48,7 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/Source/Cliente/FactuGES.rc b/Source/Cliente/FactuGES.rc index 5d44d4b2..9429ea8f 100644 --- a/Source/Cliente/FactuGES.rc +++ b/Source/Cliente/FactuGES.rc @@ -1,7 +1,7 @@ MAINICON ICON "E:\Codigo (Luis León)\Source\Iconos\Factuges.ico" 1 VERSIONINFO -FILEVERSION 2,1,0,0 -PRODUCTVERSION 2,1,0,0 +FILEVERSION 2,1,1,0 +PRODUCTVERSION 2,1,1,0 FILEFLAGSMASK 0x3FL FILEFLAGS 0x00L FILEOS 0x40004L @@ -13,7 +13,7 @@ BEGIN BLOCK "0C0A04E4" BEGIN VALUE "CompanyName", "Rodax Software S.L.\0" - VALUE "FileVersion", "2.1.0.0\0" + VALUE "FileVersion", "2.1.1.0\0" VALUE "InternalName", "FactuGES\0" VALUE "ProductName", "FactuGES\0" VALUE "ProductVersion", "2.0.6\0" diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res index 92935853..a317f68a 100644 Binary files a/Source/Cliente/FactuGES.res and b/Source/Cliente/FactuGES.res differ diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm index 617aee7d..1f6aaf76 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm @@ -173,9 +173,31 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente ExplicitWidth = 596 inherited dxLayoutControl1: TdxLayoutControl Width = 592 + ExplicitWidth = 592 + inherited txtFiltroTodo: TcxTextEdit + Left = 172 + ExplicitLeft = 172 + ExplicitWidth = 273 + Width = 273 + end + inherited edtFechaIniFiltro: TcxDateEdit + Left = 172 + ExplicitLeft = 172 + ExplicitWidth = 121 + Width = 121 + end inherited edtFechaFinFiltro: TcxDateEdit - Left = 367 - ExplicitLeft = 367 + Left = 413 + ExplicitLeft = 413 + ExplicitWidth = 121 + Width = 121 + end + inherited dxLayoutControl1Group_Root: TdxLayoutGroup + inherited dxLayoutControl1Group1: TdxLayoutGroup + inherited dxLayoutControl1Item2: TdxLayoutItem + Caption = 'Entre la fecha prevista de envio:' + end + end end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel @@ -188,6 +210,10 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente end end end + inherited dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList + Left = 104 + Top = 72 + end end inherited pnlAgrupaciones: TTBXDockablePanel Top = 453 @@ -214,7 +240,7 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente end end inherited dsDataSource: TDADataSource - Top = 32 + Top = 72 end inherited dxComponentPrinter: TdxComponentPrinter inherited dxComponentPrinterLink: TdxGridReportLink @@ -345,8 +371,8 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente Name = 'PngImage3' Background = clWindow end> - Left = 56 - Top = 48 + Left = 64 + Top = 72 Bitmap = {} end end diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.pas index 2a485480..6125f025 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.pas @@ -149,8 +149,12 @@ begin cxGridView.DataController.Filter.Options := [fcoCaseInsensitive, fcoSoftCompare]; FFiltro := AddFilterGrid(fboAnd); - Columna := (cxGridView as TcxGridDBTableView).GetColumnByFieldName('FECHA_ALBARAN'); + Columna := (cxGridView as TcxGridDBTableView).GetColumnByFieldName('FECHA_PREVISTA_ENVIO'); FFiltro.AddItem(Columna, foBetween, varArrayOf([Fecha1, Fecha2]), VarToStr(Fecha1) + ' and ' + VarToStr(Fecha2)); + +// FFiltro.BoolOperatorKind := fboOr; +// Columna := (cxGridView as TcxGridDBTableView).GetColumnByFieldName('FECHA_ALBARAN'); +// FFiltro.AddItem(Columna, foBetween, varArrayOf([Fecha1, Fecha2]), VarToStr(Fecha1) + ' and ' + VarToStr(Fecha2)); end; end; diff --git a/Source/Modulos/Comisiones/Views/Comisiones_view.dpk b/Source/Modulos/Comisiones/Views/Comisiones_view.dpk index 9a6a2c9b..9119edfd 100644 --- a/Source/Modulos/Comisiones/Views/Comisiones_view.dpk +++ b/Source/Modulos/Comisiones/Views/Comisiones_view.dpk @@ -89,7 +89,7 @@ contains uEditorComisiones in 'uEditorComisiones.pas' {fEditorComisiones: TfEditorComisiones}, uViewComision in 'uViewComision.pas' {frViewComision: TFrame}, uEditorComision in 'uEditorComision.pas' {fEditorComision: TfEditorComision}, - uViewFacturasComision in 'uViewFacturasComision.pas' {frViewFacturasComision: TFrame}, - uEditorComisionesReport in 'uEditorComisionesReport.pas' {fEditorComisionesReport: TfEditorComisionesReport}; + uEditorComisionesReport in 'uEditorComisionesReport.pas' {fEditorComisionesReport: TfEditorComisionesReport}, + uViewFacturasComision in 'uViewFacturasComision.pas' {frViewFacturasComision: TFrame}; end. diff --git a/Source/Modulos/Comisiones/Views/uEditorComision.dfm b/Source/Modulos/Comisiones/Views/uEditorComision.dfm index 2007cc2d..6c0b4866 100644 --- a/Source/Modulos/Comisiones/Views/uEditorComision.dfm +++ b/Source/Modulos/Comisiones/Views/uEditorComision.dfm @@ -62,7 +62,7 @@ inherited fEditorComision: TfEditorComision Width = 611 ExplicitWidth = 611 inherited tbxMain: TTBXToolbar - ExplicitWidth = 482 + ExplicitWidth = 488 inherited TBXItem2: TTBXItem Visible = False end @@ -231,9 +231,7 @@ inherited fEditorComision: TfEditorComision object dxLayoutControl1Group1: TdxLayoutGroup AutoAligns = [aaHorizontal] AlignVert = avClient - Caption = - 'Facturas asociadas a la liquidaci'#243'n desglosadas por agente y pro' + - 'veedor' + Caption = 'Facturas asociadas a la liquidaci'#243'n desglosadas por proveedor' object dxLayoutControl1Item1: TdxLayoutItem AutoAligns = [aaHorizontal] AlignVert = avClient diff --git a/Source/Modulos/Comisiones/Views/uViewFacturasComision.dfm b/Source/Modulos/Comisiones/Views/uViewFacturasComision.dfm index 1dc4c208..20999122 100644 --- a/Source/Modulos/Comisiones/Views/uViewFacturasComision.dfm +++ b/Source/Modulos/Comisiones/Views/uViewFacturasComision.dfm @@ -30,6 +30,7 @@ inherited frViewFacturasComision: TfrViewFacturasComision OptionsView.GroupFooters = gfAlwaysVisible inherited cxGridViewID: TcxGridDBColumn DataBinding.FieldName = '' + IsCaptionAssigned = True end object cxGridViewRecID: TcxGridDBColumn DataBinding.FieldName = 'RecID' diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas index beea3599..99202ff4 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas @@ -904,7 +904,7 @@ begin //Eliminamos todos los recibos que tuviera la factura porque sabemos que todos //estarán pendientes (solo permitiremos modificar y eliminar facturas pendientes, //parcialmente pagadas o pagadas no - ARecibos := ARecibosClienteController.BuscarTodosFactura(AFactura.ID); + ARecibos := ARecibosClienteController.BuscarRecibosFactura(AFactura.ID); ARecibosClienteController.EliminarTodo(ARecibos); //Vamos a generar todos los recibos necesarios para la factura diff --git a/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.res b/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.res index 86c94e6a..36f26e23 100644 Binary files a/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.res and b/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.res differ diff --git a/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas b/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas index dc1eeccd..194d989a 100644 --- a/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas +++ b/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas @@ -39,11 +39,13 @@ type property PagosController: IPagosClienteController read GetPagosController write SetPagosController; procedure Anadir(ARecibosCliente : IBizRecibosCliente); + function Eliminar(ARecibosCliente : IBizRecibosCliente): Boolean; + function AnadirPago(ARecibosCliente : IBizRecibosCliente; FechaPago: String =''): Boolean; procedure ModificarPago(ARecibosCliente : IBizRecibosCliente); - function Eliminar(ARecibosCliente : IBizRecibosCliente): Boolean; function EliminarPago(ARecibosCliente : IBizRecibosCliente): Boolean; function EliminarTodo(ARecibosCliente : IBizRecibosCliente): Boolean; + function Guardar(ARecibosCliente : IBizRecibosCliente): Boolean; procedure DescartarCambios(ARecibosCliente : IBizRecibosCliente); function Duplicar(ARecibosCliente: IBizRecibosCliente): IBizRecibosCliente; @@ -52,14 +54,16 @@ type procedure RecuperarCliente(AReciboCliente : IBizRecibosCliente); function Buscar(const ID: Integer): IBizRecibosCliente; - function BuscarTodosRemesa(const ID_REMESA: Integer): IBizRecibosCliente; - function BuscarTodosFactura(const ID_FACTURA: Integer): IBizRecibosCliente; function BuscarTodos: IBizRecibosCliente; - function BuscarTodosPendientesDevueltos: IBizRecibosCliente; + + function BuscarRecibosRemesa(const ID_REMESA: Integer): IBizRecibosCliente; + function BuscarRecibosFactura(const ID_FACTURA: Integer): IBizRecibosCliente; + function BuscarRecibosACompensar(const Recibo: IBizRecibosCliente): IBizRecibosCliente; + function BuscarRecibosARemesar: IBizRecibosCliente; + procedure VerTodos(ARecibosCliente: IBizRecibosCliente); procedure Ver(ARecibosCliente: IBizRecibosCliente); - function Localizar(ARecibosCliente: IBizRecibosCliente; ADescripcion:String): Boolean; - function DarListaRecibosCliente: TStringList; + function ExtraerSeleccionados(ARecibosCliente: IBizRecibosCliente) : IBizRecibosCliente; function ElegirRecibos(ARecibos : IBizRecibosCliente; AMensaje: String; AMultiSelect: Boolean): IBizRecibosCliente; @@ -67,6 +71,9 @@ type procedure QuitarRemesa(ARecibos : IBizRecibosCliente); procedure SetSituacionCobrados(ARecibos : IBizRecibosCliente; WithDeltas: Boolean=False); + function ElegirRecibosCompensados(ARecibo : IBizRecibosCliente): Boolean; + procedure QuitarReciboCompensado(ARecibo : IBizRecibosCliente); + procedure Preview(ARecibosCliente : IBizRecibosCliente); procedure Print(ARecibosCliente : IBizRecibosCliente); end; @@ -108,20 +115,24 @@ type function Nuevo : IBizRecibosCliente; function Buscar(const ID: Integer): IBizRecibosCliente; - function BuscarTodosRemesa(const ID_REMESA: Integer): IBizRecibosCliente; - function BuscarTodosFactura(const ID_FACTURA: Integer): IBizRecibosCliente; function BuscarTodos: IBizRecibosCliente; - function BuscarTodosPendientesDevueltos: IBizRecibosCliente; + + function BuscarRecibosRemesa(const ID_REMESA: Integer): IBizRecibosCliente; + function BuscarRecibosFactura(const ID_FACTURA: Integer): IBizRecibosCliente; + function BuscarRecibosACompensar(const Recibo: IBizRecibosCliente): IBizRecibosCliente; + function BuscarRecibosARemesar: IBizRecibosCliente; + procedure VerTodos(ARecibosCliente: IBizRecibosCliente); procedure Ver(ARecibosCliente: IBizRecibosCliente); - function Localizar(ARecibosCliente: IBizRecibosCliente; ADescripcion:String): Boolean; - function DarListaRecibosCliente: TStringList; function ExtraerSeleccionados(ARecibosCliente: IBizRecibosCliente) : IBizRecibosCliente; function ElegirRecibos(ARecibos : IBizRecibosCliente; AMensaje: String; AMultiSelect: Boolean): IBizRecibosCliente; + function ElegirRecibosCompensados(ARecibo : IBizRecibosCliente): Boolean; procedure AsignarRemesa(ARecibos : IBizRecibosCliente; ID_REMESA: Integer); procedure QuitarRemesa(ARecibos : IBizRecibosCliente); + procedure QuitarReciboCompensado(ARecibo : IBizRecibosCliente); + procedure SetSituacionCobrados(ARecibos : IBizRecibosCliente; WithDeltas: Boolean=False); procedure Preview(ARecibosCliente : IBizRecibosCliente); @@ -261,6 +272,43 @@ begin Result := FDataModule.GetItems; end; +function TRecibosClienteController.BuscarRecibosACompensar(const Recibo: IBizRecibosCliente): IBizRecibosCliente; +begin + if not Assigned(Recibo) then + raise Exception.Create ('IBizReciboCliente no asignado (BuscarRecibosACompensar)'); + + ShowHourglassCursor; + try + Result := BuscarTodos; + with Result.DataTable.Where do + begin + if NotEmpty then + AddOperator(opAND); + + //No podrá compensarse un recibo a si mismo + OpenBraket; + AddText(fld_RecibosClienteID + ' <> ' + IntToStr(Recibo.ID)); + CloseBraket; + + AddOperator(opAND); + + //Solo podrá compensar recibos del mismo cliente + OpenBraket; + AddText(fld_RecibosClienteID_CLIENTE + ' = ' + IntToStr(Recibo.ID_CLIENTE)); + CloseBraket; + + AddOperator(opAND); + + //No podrá compensarse recibos que estan cobrados + OpenBraket; + AddText(fld_RecibosClienteSITUACION + ' <> ''' + CTE_COBRADO + ''''); + CloseBraket; + end; + finally + HideHourglassCursor; + end; +end; + constructor TRecibosClienteController.Create; begin inherited; @@ -275,7 +323,7 @@ begin Result := (FDataModule as IDataModuleRecibosCliente).GetItem(ID); end; -function TRecibosClienteController.BuscarTodosFactura(const ID_FACTURA: Integer): IBizRecibosCliente; +function TRecibosClienteController.BuscarRecibosFactura(const ID_FACTURA: Integer): IBizRecibosCliente; begin ShowHourglassCursor; try @@ -293,7 +341,7 @@ begin end; end; -function TRecibosClienteController.BuscarTodosPendientesDevueltos: IBizRecibosCliente; +function TRecibosClienteController.BuscarRecibosARemesar: IBizRecibosCliente; begin ShowHourglassCursor; try @@ -302,9 +350,15 @@ begin begin if NotEmpty then AddOperator(opAND); + + //Omitimos los recibos compensados OpenBraket; - AddText(fld_RecibosClienteSITUACION + ' = ''' + CTE_PENDIENTE + ''''); - AddText(' OR ' + fld_RecibosClienteSITUACION + ' = ''' + CTE_DEVUELTO + ''''); + AddText(fld_RecibosClienteID_RECIBO_COMPENSADO + ' IS NULL '); + CloseBraket; + AddOperator(opAND); + //Solo dejaremos remesar aquellos recibos que no esten cobrados (Pendientes/Devueltos) + OpenBraket; + AddText(fld_RecibosClienteSITUACION + ' <> ''' + CTE_COBRADO + ''''); CloseBraket; end; finally @@ -312,7 +366,7 @@ begin end; end; -function TRecibosClienteController.BuscarTodosRemesa(const ID_REMESA: Integer): IBizRecibosCliente; +function TRecibosClienteController.BuscarRecibosRemesa(const ID_REMESA: Integer): IBizRecibosCliente; begin ShowHourglassCursor; try @@ -335,28 +389,6 @@ begin Result := Buscar(ID_NULO); end; -function TRecibosClienteController.DarListaRecibosCliente: TStringList; -var - ARecibosCliente: IBizRecibosCliente; -begin - ARecibosCliente := BuscarTodos; - ARecibosCliente.DataTable.Active := True; - Result := TStringList.Create; - try - with Result do - begin - ARecibosCliente.DataTable.First; - while not ARecibosCliente.DataTable.EOF do - begin - Add(ARecibosCliente.DESCRIPCION); - ARecibosCliente.DataTable.Next; - end; - end; - finally - ARecibosCliente := NIL; - end; -end; - function TRecibosClienteController.DarNuevaReferencia(ID_FACTURA: Integer; REFERENCIA: String): String; var ARecibosCliente: IBizRecibosCliente; @@ -364,7 +396,7 @@ var Cadena : String; begin try - ARecibosCliente := BuscarTodosFactura(ID_FACTURA); + ARecibosCliente := BuscarRecibosFactura(ID_FACTURA); ARecibosCliente.DataTable.Active := True; NumReferencia := ARecibosCliente.DataTable.RecordCount; Cadena := Copy(REFERENCIA, 0, Pos('-', REFERENCIA)); @@ -537,6 +569,25 @@ begin end; end; +function TRecibosClienteController.ElegirRecibosCompensados(ARecibo: IBizRecibosCliente): Boolean; +var + ARecibosACompensar: IBizRecibosCliente; +begin + ARecibosACompensar := Self.ElegirRecibos(BuscarRecibosACompensar(ARecibo), 'Elija los recibos que desea compensar', True); + + if Assigned(ARecibosACompensar) then + begin + ShowHourglassCursor; + try + DuplicarRegistros(ARecibosACompensar.DataTable, ARecibo.RecibosCompensados.DataTable, mdrTodos, True, True, False); + Result := True; + finally + HideHourglassCursor; + ARecibosACompensar := Nil; + end; + end; +end; + function TRecibosClienteController.Eliminar(ARecibosCliente: IBizRecibosCliente): Boolean; begin Result := False; @@ -680,24 +731,6 @@ begin end; end; -function TRecibosClienteController.Localizar(ARecibosCliente: IBizRecibosCliente; ADescripcion: String): Boolean; -begin - Result := True; - ShowHourglassCursor; - try - with ARecibosCliente.DataTable do - begin - DisableControls; - First; - if not Locate(fld_RecibosClienteDESCRIPCION, ADescripcion, []) then - Result := False; - EnableControls; - end; - finally - HideHourglassCursor; - end; -end; - procedure TRecibosClienteController.ModificarPago(ARecibosCliente: IBizRecibosCliente); var AEditor : IEditorFechaPago; @@ -729,6 +762,20 @@ begin Result := ARecibo; end; +procedure TRecibosClienteController.QuitarReciboCompensado(ARecibo: IBizRecibosCliente); +var + IdRecibo: Variant; +begin + IdRecibo := ARecibo.RecibosCompensados.ID; + + ARecibo.RecibosCompensados.DataTable.First; + while ARecibo.RecibosCompensados.DataTable.Locate('ID', IdRecibo,[]) do + begin + ARecibo.RecibosCompensados.DataTable.Delete; + ARecibo.RecibosCompensados.DataTable.First; + end; +end; + procedure TRecibosClienteController.QuitarRemesa(ARecibos: IBizRecibosCliente); begin if Assigned(ARecibos) then diff --git a/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.dfm b/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.dfm index 4862c7c0..6ba5b864 100644 --- a/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.dfm +++ b/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.dfm @@ -89,6 +89,29 @@ object DataModuleRecibosCliente: TDataModuleRecibosCliente Lookup = False LookupCache = False end + item + Name = 'ID_RECIBO_COMPENSADO' + DataType = datInteger + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'REFERENCIA_REC_COMPENSADO' + DataType = datString + Size = 255 + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end item Name = 'REFERENCIA' DataType = datString @@ -682,7 +705,7 @@ object DataModuleRecibosCliente: TDataModuleRecibosCliente Name = 'ID' DataType = datInteger BlobType = dabtUnknown - Value = '' + Value = 77 ParamType = daptInput end> MasterMappingMode = mmParams @@ -783,4 +806,309 @@ object DataModuleRecibosCliente: TDataModuleRecibosCliente Left = 384 Top = 112 end + object tbl_RecibosCompensados: TDACDSDataTable + RemoteUpdatesOptions = [] + Fields = < + item + Name = 'ID' + DataType = datInteger + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'ID_RECIBO_COMPENSADO' + DataType = datInteger + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + DictionaryEntry = 'RecibosCliente_REFERENCIA' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'SITUACION' + DataType = datString + Size = 9 + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + DictionaryEntry = 'RecibosCliente_SITUACION' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'ID_FACTURA' + DataType = datInteger + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + DictionaryEntry = 'RecibosCliente_ID_FACTURA' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'FECHA_EMISION' + DataType = datDateTime + BlobType = dabtUnknown + DisplayWidth = 0 + DisplayLabel = 'RecibosCliente_FECHA_EMISION' + Alignment = taLeftJustify + DictionaryEntry = 'RecibosCliente_FECHA_EMISION' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'FECHA_VENCIMIENTO' + DataType = datDateTime + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + DictionaryEntry = 'RecibosCliente_FECHA_VENCIMIENTO' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'IMPORTE' + DataType = datCurrency + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taRightJustify + DictionaryEntry = 'RecibosCliente_IMPORTE' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'OTROS_GASTOS' + DataType = datCurrency + BlobType = dabtUnknown + DisplayWidth = 0 + DisplayLabel = 'RecibosCliente_OTROS_GASTOS' + Alignment = taRightJustify + DictionaryEntry = 'RecibosCliente_OTROS_GASTOS' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'IMPORTE_TOTAL' + DataType = datCurrency + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taRightJustify + DictionaryEntry = 'RecibosCliente_IMPORTE_TOTAL' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'FECHA_FACTURA' + DataType = datDateTime + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + DictionaryEntry = 'RecibosCliente_FECHA_FACTURA' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'IMPORTE_FACTURA' + DataType = datCurrency + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taRightJustify + DictionaryEntry = 'RecibosCliente_IMPORTE_FACTURA' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'ID_CLIENTE' + DataType = datInteger + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + DictionaryEntry = 'RecibosCliente_ID_CLIENTE' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'NOMBRE_CLIENTE' + DataType = datString + Size = 255 + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + DictionaryEntry = 'RecibosCliente_NOMBRE_CLIENTE' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'NIF_CIF_CLIENTE' + DataType = datString + Size = 15 + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + DictionaryEntry = 'RecibosCliente_NIF_CIF_CLIENTE' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'ID_EMPRESA' + DataType = datInteger + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + DictionaryEntry = 'RecibosCliente_ID_EMPRESA' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end> + Params = < + item + Name = 'ID' + DataType = datInteger + BlobType = dabtUnknown + Value = '' + ParamType = daptInput + end> + MasterMappingMode = mmParams + MasterParamsMappings.Strings = ( + 'ID=ID') + StreamingOptions = [soDisableEventsWhileStreaming] + SchemaCall.MethodName = 'GetDatasetSchema' + SchemaCall.Params = < + item + Name = 'Result' + ParamType = fResult + DataType = rtBinary + end + item + Name = 'aDatasetName' + ParamType = fIn + DataType = rtString + Value = 'RecibosCompensados' + end> + DataRequestCall.MethodName = 'GetDatasetDataEx' + DataRequestCall.Params = < + item + Name = 'Result' + ParamType = fResult + DataType = rtBinary + end + item + Name = 'DatasetName' + ParamType = fIn + DataType = rtString + Value = 'RecibosCompensados' + end + item + Name = 'Params' + ParamType = fIn + DataType = rtUserDefined + UserClassName = 'TDADatasetParamArray' + end + item + Name = 'UserFilter' + ParamType = fIn + DataType = rtString + Value = '' + end + item + Name = 'IncludeSchema' + ParamType = fIn + DataType = rtBoolean + Value = False + end + item + Name = 'MaxRecords' + ParamType = fIn + DataType = rtInteger + Value = -1 + end> + DataUpdateCall.MethodName = 'UpdateData' + DataUpdateCall.Params = < + item + Name = 'Result' + ParamType = fResult + DataType = rtBinary + end + item + Name = 'Delta' + ParamType = fIn + DataType = rtBinary + end> + ScriptCall.MethodName = 'GetDatasetScripts' + ScriptCall.Params = < + item + Name = 'Result' + ParamType = fResult + DataType = rtString + Value = '' + end + item + Name = 'DatasetNames' + ParamType = fIn + DataType = rtString + Value = 'RecibosCompensados' + end> + ReadOnly = False + RemoteService = RORemoteService + Adapter = DABinAdapter + MasterSource = ds_RecibosCliente + MasterFields = 'ID' + DetailFields = 'ID_RECIBO_COMPENSADO' + DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] + MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] + LogicalName = 'RecibosCompensados' + IndexDefs = <> + Left = 336 + Top = 304 + end + object ds_RecibosCompensados: TDADataSource + DataTable = tbl_RecibosCompensados + Left = 336 + Top = 248 + end end diff --git a/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.pas b/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.pas index 71902076..063d9378 100644 --- a/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.pas +++ b/Source/Modulos/Recibos de cliente/Data/uDataModuleRecibosCliente.pas @@ -46,11 +46,14 @@ type ds_RecibosCliente: TDADataSource; tbl_PagosCliente: TDACDSDataTable; ds_PagosCliente: TDADataSource; + tbl_RecibosCompensados: TDACDSDataTable; + ds_RecibosCompensados: TDADataSource; procedure DAClientDataModuleCreate(Sender: TObject); protected function DarNombreGenerador(DataSetName: String): String; virtual; function _CloneDataTable (const ADataTable : TDACDSDataTable): TDACDSDataTable; overload; function _GetPagos: IBizPagosCliente; + function _GetRecibosCompensados : IBizRecibosCompensados; public function GetNextID(const DataSetName : String) : Integer; function GetItems: IBizRecibosCliente; @@ -129,6 +132,25 @@ begin end; end; +function TDataModuleRecibosCliente._GetRecibosCompensados: IBizRecibosCompensados; +var + ARecibosCompensados : TDACDSDataTable; +begin + ShowHourglassCursor; + try + ARecibosCompensados := _CloneDataTable(tbl_RecibosCompensados); + with ARecibosCompensados do + begin + BusinessRulesID := BIZ_CLIENT_RECIBOS_COMPENSADOS; + DetailOptions := DetailOptions - + [dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]; + end; + Result := (ARecibosCompensados as IBizRecibosCompensados); + finally + HideHourglassCursor; + end; +end; + function TDataModuleRecibosCliente.GetItems: IBizRecibosCliente; var AIBizRecibosCliente : TDACDSDataTable; @@ -141,6 +163,9 @@ begin with TBizRecibosCliente(AIBizRecibosCliente.BusinessEventsObj) do Pagos := _GetPagos; + with TBizRecibosCliente(AIBizRecibosCliente.BusinessEventsObj) do + RecibosCompensados := _GetRecibosCompensados; + Result := (AIBizRecibosCliente as IBizRecibosCliente); finally HideHourglassCursor; diff --git a/Source/Modulos/Recibos de cliente/Model/schRecibosClienteClient_Intf.pas b/Source/Modulos/Recibos de cliente/Model/schRecibosClienteClient_Intf.pas index a015c4dd..2c522bf4 100644 --- a/Source/Modulos/Recibos de cliente/Model/schRecibosClienteClient_Intf.pas +++ b/Source/Modulos/Recibos de cliente/Model/schRecibosClienteClient_Intf.pas @@ -9,17 +9,21 @@ 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_RecibosCliente = '{4CA0AA50-AB97-400F-933F-794A93288528}'; - RID_RecibosCliente_Refresh = '{7AB9784C-2731-4956-8DF9-7DFD9C4CA6D4}'; - RID_PagosCliente = '{2E518A3E-1897-4098-A728-3CE5AB041B32}'; + RID_RecibosCliente = '{FD980379-FB92-4C95-BE21-ED95A7016410}'; + RID_RecibosCliente_Refresh = '{E53D88F8-4685-45B7-A311-F127B59B66D3}'; + RID_PagosCliente = '{AE00696F-314E-474C-9214-B46E7E252D02}'; + RID_RecibosCompensados = '{8428AEC0-0D77-4FE7-87FF-21D267278BC4}'; { Data table names } nme_RecibosCliente = 'RecibosCliente'; nme_RecibosCliente_Refresh = 'RecibosCliente_Refresh'; nme_PagosCliente = 'PagosCliente'; + nme_RecibosCompensados = 'RecibosCompensados'; { RecibosCliente fields } fld_RecibosClienteID = 'ID'; + fld_RecibosClienteID_RECIBO_COMPENSADO = 'ID_RECIBO_COMPENSADO'; + fld_RecibosClienteREFERENCIA_REC_COMPENSADO = 'REFERENCIA_REC_COMPENSADO'; fld_RecibosClienteREFERENCIA = 'REFERENCIA'; fld_RecibosClienteSITUACION = 'SITUACION'; fld_RecibosClienteID_FACTURA = 'ID_FACTURA'; @@ -49,35 +53,39 @@ const { RecibosCliente field indexes } idx_RecibosClienteID = 0; - idx_RecibosClienteREFERENCIA = 1; - idx_RecibosClienteSITUACION = 2; - idx_RecibosClienteID_FACTURA = 3; - idx_RecibosClienteID_REMESA = 4; - idx_RecibosClienteREFERENCIA_REMESA = 5; - idx_RecibosClienteFECHA_EMISION = 6; - idx_RecibosClienteFECHA_VENCIMIENTO = 7; - idx_RecibosClienteDESCRIPCION = 8; - idx_RecibosClienteOBSERVACIONES = 9; - idx_RecibosClienteIMPORTE = 10; - idx_RecibosClienteOTROS_GASTOS = 11; - idx_RecibosClienteIMPORTE_TOTAL = 12; - idx_RecibosClienteFECHA_FACTURA = 13; - idx_RecibosClienteFORMA_PAGO_FACTURA = 14; - idx_RecibosClienteIMPORTE_FACTURA = 15; - idx_RecibosClienteID_CLIENTE = 16; - idx_RecibosClienteNOMBRE_CLIENTE = 17; - idx_RecibosClienteNIF_CIF_CLIENTE = 18; - idx_RecibosClienteENTIDAD_CLIENTE = 19; - idx_RecibosClienteSUCURSAL_CLIENTE = 20; - idx_RecibosClienteDC_CLIENTE = 21; - idx_RecibosClienteCUENTA_CLIENTE = 22; - idx_RecibosClienteID_EMPRESA = 23; - idx_RecibosClienteFECHA_ALTA = 24; - idx_RecibosClienteFECHA_MODIFICACION = 25; - idx_RecibosClienteUSUARIO = 26; + idx_RecibosClienteID_RECIBO_COMPENSADO = 1; + idx_RecibosClienteREFERENCIA_REC_COMPENSADO = 2; + idx_RecibosClienteREFERENCIA = 3; + idx_RecibosClienteSITUACION = 4; + idx_RecibosClienteID_FACTURA = 5; + idx_RecibosClienteID_REMESA = 6; + idx_RecibosClienteREFERENCIA_REMESA = 7; + idx_RecibosClienteFECHA_EMISION = 8; + idx_RecibosClienteFECHA_VENCIMIENTO = 9; + idx_RecibosClienteDESCRIPCION = 10; + idx_RecibosClienteOBSERVACIONES = 11; + idx_RecibosClienteIMPORTE = 12; + idx_RecibosClienteOTROS_GASTOS = 13; + idx_RecibosClienteIMPORTE_TOTAL = 14; + idx_RecibosClienteFECHA_FACTURA = 15; + idx_RecibosClienteFORMA_PAGO_FACTURA = 16; + idx_RecibosClienteIMPORTE_FACTURA = 17; + idx_RecibosClienteID_CLIENTE = 18; + idx_RecibosClienteNOMBRE_CLIENTE = 19; + idx_RecibosClienteNIF_CIF_CLIENTE = 20; + idx_RecibosClienteENTIDAD_CLIENTE = 21; + idx_RecibosClienteSUCURSAL_CLIENTE = 22; + idx_RecibosClienteDC_CLIENTE = 23; + idx_RecibosClienteCUENTA_CLIENTE = 24; + idx_RecibosClienteID_EMPRESA = 25; + idx_RecibosClienteFECHA_ALTA = 26; + idx_RecibosClienteFECHA_MODIFICACION = 27; + idx_RecibosClienteUSUARIO = 28; { RecibosCliente_Refresh fields } fld_RecibosCliente_RefreshID = 'ID'; + fld_RecibosCliente_RefreshID_RECIBO_COMPENSADO = 'ID_RECIBO_COMPENSADO'; + fld_RecibosCliente_RefreshREFERENCIA_REC_COMPENSADO = 'REFERENCIA_REC_COMPENSADO'; fld_RecibosCliente_RefreshREFERENCIA = 'REFERENCIA'; fld_RecibosCliente_RefreshSITUACION = 'SITUACION'; fld_RecibosCliente_RefreshID_FACTURA = 'ID_FACTURA'; @@ -107,32 +115,34 @@ const { RecibosCliente_Refresh field indexes } idx_RecibosCliente_RefreshID = 0; - idx_RecibosCliente_RefreshREFERENCIA = 1; - idx_RecibosCliente_RefreshSITUACION = 2; - idx_RecibosCliente_RefreshID_FACTURA = 3; - idx_RecibosCliente_RefreshID_REMESA = 4; - idx_RecibosCliente_RefreshREFERENCIA_REMESA = 5; - idx_RecibosCliente_RefreshFECHA_EMISION = 6; - idx_RecibosCliente_RefreshFECHA_VENCIMIENTO = 7; - idx_RecibosCliente_RefreshDESCRIPCION = 8; - idx_RecibosCliente_RefreshOBSERVACIONES = 9; - idx_RecibosCliente_RefreshIMPORTE = 10; - idx_RecibosCliente_RefreshOTROS_GASTOS = 11; - idx_RecibosCliente_RefreshIMPORTE_TOTAL = 12; - idx_RecibosCliente_RefreshFECHA_FACTURA = 13; - idx_RecibosCliente_RefreshFORMA_PAGO_FACTURA = 14; - idx_RecibosCliente_RefreshIMPORTE_FACTURA = 15; - idx_RecibosCliente_RefreshID_CLIENTE = 16; - idx_RecibosCliente_RefreshNOMBRE_CLIENTE = 17; - idx_RecibosCliente_RefreshNIF_CIF_CLIENTE = 18; - idx_RecibosCliente_RefreshENTIDAD_CLIENTE = 19; - idx_RecibosCliente_RefreshSUCURSAL_CLIENTE = 20; - idx_RecibosCliente_RefreshDC_CLIENTE = 21; - idx_RecibosCliente_RefreshCUENTA_CLIENTE = 22; - idx_RecibosCliente_RefreshID_EMPRESA = 23; - idx_RecibosCliente_RefreshFECHA_ALTA = 24; - idx_RecibosCliente_RefreshFECHA_MODIFICACION = 25; - idx_RecibosCliente_RefreshUSUARIO = 26; + idx_RecibosCliente_RefreshID_RECIBO_COMPENSADO = 1; + idx_RecibosCliente_RefreshREFERENCIA_REC_COMPENSADO = 2; + idx_RecibosCliente_RefreshREFERENCIA = 3; + idx_RecibosCliente_RefreshSITUACION = 4; + idx_RecibosCliente_RefreshID_FACTURA = 5; + idx_RecibosCliente_RefreshID_REMESA = 6; + idx_RecibosCliente_RefreshREFERENCIA_REMESA = 7; + idx_RecibosCliente_RefreshFECHA_EMISION = 8; + idx_RecibosCliente_RefreshFECHA_VENCIMIENTO = 9; + idx_RecibosCliente_RefreshDESCRIPCION = 10; + idx_RecibosCliente_RefreshOBSERVACIONES = 11; + idx_RecibosCliente_RefreshIMPORTE = 12; + idx_RecibosCliente_RefreshOTROS_GASTOS = 13; + idx_RecibosCliente_RefreshIMPORTE_TOTAL = 14; + idx_RecibosCliente_RefreshFECHA_FACTURA = 15; + idx_RecibosCliente_RefreshFORMA_PAGO_FACTURA = 16; + idx_RecibosCliente_RefreshIMPORTE_FACTURA = 17; + idx_RecibosCliente_RefreshID_CLIENTE = 18; + idx_RecibosCliente_RefreshNOMBRE_CLIENTE = 19; + idx_RecibosCliente_RefreshNIF_CIF_CLIENTE = 20; + idx_RecibosCliente_RefreshENTIDAD_CLIENTE = 21; + idx_RecibosCliente_RefreshSUCURSAL_CLIENTE = 22; + idx_RecibosCliente_RefreshDC_CLIENTE = 23; + idx_RecibosCliente_RefreshCUENTA_CLIENTE = 24; + idx_RecibosCliente_RefreshID_EMPRESA = 25; + idx_RecibosCliente_RefreshFECHA_ALTA = 26; + idx_RecibosCliente_RefreshFECHA_MODIFICACION = 27; + idx_RecibosCliente_RefreshUSUARIO = 28; { PagosCliente fields } fld_PagosClienteID = 'ID'; @@ -162,13 +172,53 @@ const idx_PagosClienteFECHA_MODIFICACION = 10; idx_PagosClienteUSUARIO = 11; + { RecibosCompensados fields } + fld_RecibosCompensadosID = 'ID'; + fld_RecibosCompensadosID_RECIBO_COMPENSADO = 'ID_RECIBO_COMPENSADO'; + fld_RecibosCompensadosREFERENCIA = 'REFERENCIA'; + fld_RecibosCompensadosSITUACION = 'SITUACION'; + fld_RecibosCompensadosID_FACTURA = 'ID_FACTURA'; + fld_RecibosCompensadosFECHA_EMISION = 'FECHA_EMISION'; + fld_RecibosCompensadosFECHA_VENCIMIENTO = 'FECHA_VENCIMIENTO'; + fld_RecibosCompensadosIMPORTE = 'IMPORTE'; + fld_RecibosCompensadosOTROS_GASTOS = 'OTROS_GASTOS'; + fld_RecibosCompensadosIMPORTE_TOTAL = 'IMPORTE_TOTAL'; + fld_RecibosCompensadosFECHA_FACTURA = 'FECHA_FACTURA'; + fld_RecibosCompensadosIMPORTE_FACTURA = 'IMPORTE_FACTURA'; + fld_RecibosCompensadosID_CLIENTE = 'ID_CLIENTE'; + fld_RecibosCompensadosNOMBRE_CLIENTE = 'NOMBRE_CLIENTE'; + fld_RecibosCompensadosNIF_CIF_CLIENTE = 'NIF_CIF_CLIENTE'; + fld_RecibosCompensadosID_EMPRESA = 'ID_EMPRESA'; + + { RecibosCompensados field indexes } + idx_RecibosCompensadosID = 0; + idx_RecibosCompensadosID_RECIBO_COMPENSADO = 1; + idx_RecibosCompensadosREFERENCIA = 2; + idx_RecibosCompensadosSITUACION = 3; + idx_RecibosCompensadosID_FACTURA = 4; + idx_RecibosCompensadosFECHA_EMISION = 5; + idx_RecibosCompensadosFECHA_VENCIMIENTO = 6; + idx_RecibosCompensadosIMPORTE = 7; + idx_RecibosCompensadosOTROS_GASTOS = 8; + idx_RecibosCompensadosIMPORTE_TOTAL = 9; + idx_RecibosCompensadosFECHA_FACTURA = 10; + idx_RecibosCompensadosIMPORTE_FACTURA = 11; + idx_RecibosCompensadosID_CLIENTE = 12; + idx_RecibosCompensadosNOMBRE_CLIENTE = 13; + idx_RecibosCompensadosNIF_CIF_CLIENTE = 14; + idx_RecibosCompensadosID_EMPRESA = 15; + type { IRecibosCliente } IRecibosCliente = interface(IDAStronglyTypedDataTable) - ['{CBB96EBD-6AFF-4A95-B13E-F3932B8E7D40}'] + ['{83CC449F-496C-4FBB-9BB6-9C10149C97AB}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); + function GetID_RECIBO_COMPENSADOValue: Integer; + procedure SetID_RECIBO_COMPENSADOValue(const aValue: Integer); + function GetREFERENCIA_REC_COMPENSADOValue: String; + procedure SetREFERENCIA_REC_COMPENSADOValue(const aValue: String); function GetREFERENCIAValue: String; procedure SetREFERENCIAValue(const aValue: String); function GetSITUACIONValue: String; @@ -225,6 +275,8 @@ type { Properties } property ID: Integer read GetIDValue write SetIDValue; + property ID_RECIBO_COMPENSADO: Integer read GetID_RECIBO_COMPENSADOValue write SetID_RECIBO_COMPENSADOValue; + property REFERENCIA_REC_COMPENSADO: String read GetREFERENCIA_REC_COMPENSADOValue write SetREFERENCIA_REC_COMPENSADOValue; property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue; property SITUACION: String read GetSITUACIONValue write SetSITUACIONValue; property ID_FACTURA: Integer read GetID_FACTURAValue write SetID_FACTURAValue; @@ -260,6 +312,10 @@ type { Property getters and setters } function GetIDValue: Integer; virtual; procedure SetIDValue(const aValue: Integer); virtual; + function GetID_RECIBO_COMPENSADOValue: Integer; virtual; + procedure SetID_RECIBO_COMPENSADOValue(const aValue: Integer); virtual; + function GetREFERENCIA_REC_COMPENSADOValue: String; virtual; + procedure SetREFERENCIA_REC_COMPENSADOValue(const aValue: String); virtual; function GetREFERENCIAValue: String; virtual; procedure SetREFERENCIAValue(const aValue: String); virtual; function GetSITUACIONValue: String; virtual; @@ -315,6 +371,8 @@ type { Properties } property ID: Integer read GetIDValue write SetIDValue; + property ID_RECIBO_COMPENSADO: Integer read GetID_RECIBO_COMPENSADOValue write SetID_RECIBO_COMPENSADOValue; + property REFERENCIA_REC_COMPENSADO: String read GetREFERENCIA_REC_COMPENSADOValue write SetREFERENCIA_REC_COMPENSADOValue; property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue; property SITUACION: String read GetSITUACIONValue write SetSITUACIONValue; property ID_FACTURA: Integer read GetID_FACTURAValue write SetID_FACTURAValue; @@ -350,10 +408,14 @@ type { IRecibosCliente_Refresh } IRecibosCliente_Refresh = interface(IDAStronglyTypedDataTable) - ['{78DC2902-0367-4495-A26A-A96BE6585E27}'] + ['{9A071F92-FF7C-49CC-8137-1B2B247A73E3}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); + function GetID_RECIBO_COMPENSADOValue: Integer; + procedure SetID_RECIBO_COMPENSADOValue(const aValue: Integer); + function GetREFERENCIA_REC_COMPENSADOValue: String; + procedure SetREFERENCIA_REC_COMPENSADOValue(const aValue: String); function GetREFERENCIAValue: String; procedure SetREFERENCIAValue(const aValue: String); function GetSITUACIONValue: String; @@ -410,6 +472,8 @@ type { Properties } property ID: Integer read GetIDValue write SetIDValue; + property ID_RECIBO_COMPENSADO: Integer read GetID_RECIBO_COMPENSADOValue write SetID_RECIBO_COMPENSADOValue; + property REFERENCIA_REC_COMPENSADO: String read GetREFERENCIA_REC_COMPENSADOValue write SetREFERENCIA_REC_COMPENSADOValue; property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue; property SITUACION: String read GetSITUACIONValue write SetSITUACIONValue; property ID_FACTURA: Integer read GetID_FACTURAValue write SetID_FACTURAValue; @@ -445,6 +509,10 @@ type { Property getters and setters } function GetIDValue: Integer; virtual; procedure SetIDValue(const aValue: Integer); virtual; + function GetID_RECIBO_COMPENSADOValue: Integer; virtual; + procedure SetID_RECIBO_COMPENSADOValue(const aValue: Integer); virtual; + function GetREFERENCIA_REC_COMPENSADOValue: String; virtual; + procedure SetREFERENCIA_REC_COMPENSADOValue(const aValue: String); virtual; function GetREFERENCIAValue: String; virtual; procedure SetREFERENCIAValue(const aValue: String); virtual; function GetSITUACIONValue: String; virtual; @@ -500,6 +568,8 @@ type { Properties } property ID: Integer read GetIDValue write SetIDValue; + property ID_RECIBO_COMPENSADO: Integer read GetID_RECIBO_COMPENSADOValue write SetID_RECIBO_COMPENSADOValue; + property REFERENCIA_REC_COMPENSADO: String read GetREFERENCIA_REC_COMPENSADOValue write SetREFERENCIA_REC_COMPENSADOValue; property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue; property SITUACION: String read GetSITUACIONValue write SetSITUACIONValue; property ID_FACTURA: Integer read GetID_FACTURAValue write SetID_FACTURAValue; @@ -535,7 +605,7 @@ type { IPagosCliente } IPagosCliente = interface(IDAStronglyTypedDataTable) - ['{329ABE2D-6808-4047-BA5E-39059B9475AC}'] + ['{E9F875A0-3C24-4E16-92DB-66F7A125F1AD}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -628,6 +698,125 @@ type end; + { IRecibosCompensados } + IRecibosCompensados = interface(IDAStronglyTypedDataTable) + ['{5EDE9B26-684C-49A4-8403-36159CB4587C}'] + { Property getters and setters } + function GetIDValue: Integer; + procedure SetIDValue(const aValue: Integer); + function GetID_RECIBO_COMPENSADOValue: Integer; + procedure SetID_RECIBO_COMPENSADOValue(const aValue: Integer); + function GetREFERENCIAValue: String; + procedure SetREFERENCIAValue(const aValue: String); + function GetSITUACIONValue: String; + procedure SetSITUACIONValue(const aValue: String); + function GetID_FACTURAValue: Integer; + procedure SetID_FACTURAValue(const aValue: Integer); + function GetFECHA_EMISIONValue: DateTime; + procedure SetFECHA_EMISIONValue(const aValue: DateTime); + function GetFECHA_VENCIMIENTOValue: DateTime; + procedure SetFECHA_VENCIMIENTOValue(const aValue: DateTime); + function GetIMPORTEValue: Currency; + procedure SetIMPORTEValue(const aValue: Currency); + function GetOTROS_GASTOSValue: Currency; + procedure SetOTROS_GASTOSValue(const aValue: Currency); + function GetIMPORTE_TOTALValue: Currency; + procedure SetIMPORTE_TOTALValue(const aValue: Currency); + function GetFECHA_FACTURAValue: DateTime; + procedure SetFECHA_FACTURAValue(const aValue: DateTime); + function GetIMPORTE_FACTURAValue: Currency; + procedure SetIMPORTE_FACTURAValue(const aValue: Currency); + function GetID_CLIENTEValue: Integer; + procedure SetID_CLIENTEValue(const aValue: Integer); + function GetNOMBRE_CLIENTEValue: String; + procedure SetNOMBRE_CLIENTEValue(const aValue: String); + function GetNIF_CIF_CLIENTEValue: String; + procedure SetNIF_CIF_CLIENTEValue(const aValue: String); + function GetID_EMPRESAValue: Integer; + procedure SetID_EMPRESAValue(const aValue: Integer); + + + { Properties } + property ID: Integer read GetIDValue write SetIDValue; + property ID_RECIBO_COMPENSADO: Integer read GetID_RECIBO_COMPENSADOValue write SetID_RECIBO_COMPENSADOValue; + property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue; + property SITUACION: String read GetSITUACIONValue write SetSITUACIONValue; + property ID_FACTURA: Integer read GetID_FACTURAValue write SetID_FACTURAValue; + property FECHA_EMISION: DateTime read GetFECHA_EMISIONValue write SetFECHA_EMISIONValue; + property FECHA_VENCIMIENTO: DateTime read GetFECHA_VENCIMIENTOValue write SetFECHA_VENCIMIENTOValue; + property IMPORTE: Currency read GetIMPORTEValue write SetIMPORTEValue; + property OTROS_GASTOS: Currency read GetOTROS_GASTOSValue write SetOTROS_GASTOSValue; + property IMPORTE_TOTAL: Currency read GetIMPORTE_TOTALValue write SetIMPORTE_TOTALValue; + property FECHA_FACTURA: DateTime read GetFECHA_FACTURAValue write SetFECHA_FACTURAValue; + property IMPORTE_FACTURA: Currency read GetIMPORTE_FACTURAValue write SetIMPORTE_FACTURAValue; + property ID_CLIENTE: Integer read GetID_CLIENTEValue write SetID_CLIENTEValue; + property NOMBRE_CLIENTE: String read GetNOMBRE_CLIENTEValue write SetNOMBRE_CLIENTEValue; + property NIF_CIF_CLIENTE: String read GetNIF_CIF_CLIENTEValue write SetNIF_CIF_CLIENTEValue; + property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue; + end; + + { TRecibosCompensadosDataTableRules } + TRecibosCompensadosDataTableRules = class(TDADataTableRules, IRecibosCompensados) + private + protected + { Property getters and setters } + function GetIDValue: Integer; virtual; + procedure SetIDValue(const aValue: Integer); virtual; + function GetID_RECIBO_COMPENSADOValue: Integer; virtual; + procedure SetID_RECIBO_COMPENSADOValue(const aValue: Integer); virtual; + function GetREFERENCIAValue: String; virtual; + procedure SetREFERENCIAValue(const aValue: String); virtual; + function GetSITUACIONValue: String; virtual; + procedure SetSITUACIONValue(const aValue: String); virtual; + function GetID_FACTURAValue: Integer; virtual; + procedure SetID_FACTURAValue(const aValue: Integer); virtual; + function GetFECHA_EMISIONValue: DateTime; virtual; + procedure SetFECHA_EMISIONValue(const aValue: DateTime); virtual; + function GetFECHA_VENCIMIENTOValue: DateTime; virtual; + procedure SetFECHA_VENCIMIENTOValue(const aValue: DateTime); virtual; + function GetIMPORTEValue: Currency; virtual; + procedure SetIMPORTEValue(const aValue: Currency); virtual; + function GetOTROS_GASTOSValue: Currency; virtual; + procedure SetOTROS_GASTOSValue(const aValue: Currency); virtual; + function GetIMPORTE_TOTALValue: Currency; virtual; + procedure SetIMPORTE_TOTALValue(const aValue: Currency); virtual; + function GetFECHA_FACTURAValue: DateTime; virtual; + procedure SetFECHA_FACTURAValue(const aValue: DateTime); virtual; + function GetIMPORTE_FACTURAValue: Currency; virtual; + procedure SetIMPORTE_FACTURAValue(const aValue: Currency); virtual; + function GetID_CLIENTEValue: Integer; virtual; + procedure SetID_CLIENTEValue(const aValue: Integer); virtual; + function GetNOMBRE_CLIENTEValue: String; virtual; + procedure SetNOMBRE_CLIENTEValue(const aValue: String); virtual; + function GetNIF_CIF_CLIENTEValue: String; virtual; + procedure SetNIF_CIF_CLIENTEValue(const aValue: String); virtual; + function GetID_EMPRESAValue: Integer; virtual; + procedure SetID_EMPRESAValue(const aValue: Integer); virtual; + + { Properties } + property ID: Integer read GetIDValue write SetIDValue; + property ID_RECIBO_COMPENSADO: Integer read GetID_RECIBO_COMPENSADOValue write SetID_RECIBO_COMPENSADOValue; + property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue; + property SITUACION: String read GetSITUACIONValue write SetSITUACIONValue; + property ID_FACTURA: Integer read GetID_FACTURAValue write SetID_FACTURAValue; + property FECHA_EMISION: DateTime read GetFECHA_EMISIONValue write SetFECHA_EMISIONValue; + property FECHA_VENCIMIENTO: DateTime read GetFECHA_VENCIMIENTOValue write SetFECHA_VENCIMIENTOValue; + property IMPORTE: Currency read GetIMPORTEValue write SetIMPORTEValue; + property OTROS_GASTOS: Currency read GetOTROS_GASTOSValue write SetOTROS_GASTOSValue; + property IMPORTE_TOTAL: Currency read GetIMPORTE_TOTALValue write SetIMPORTE_TOTALValue; + property FECHA_FACTURA: DateTime read GetFECHA_FACTURAValue write SetFECHA_FACTURAValue; + property IMPORTE_FACTURA: Currency read GetIMPORTE_FACTURAValue write SetIMPORTE_FACTURAValue; + property ID_CLIENTE: Integer read GetID_CLIENTEValue write SetID_CLIENTEValue; + property NOMBRE_CLIENTE: String read GetNOMBRE_CLIENTEValue write SetNOMBRE_CLIENTEValue; + property NIF_CIF_CLIENTE: String read GetNIF_CIF_CLIENTEValue write SetNIF_CIF_CLIENTEValue; + property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue; + + public + constructor Create(aDataTable: TDADataTable); override; + destructor Destroy; override; + + end; + implementation uses Variants; @@ -653,6 +842,26 @@ begin DataTable.Fields[idx_RecibosClienteID].AsInteger := aValue; end; +function TRecibosClienteDataTableRules.GetID_RECIBO_COMPENSADOValue: Integer; +begin + result := DataTable.Fields[idx_RecibosClienteID_RECIBO_COMPENSADO].AsInteger; +end; + +procedure TRecibosClienteDataTableRules.SetID_RECIBO_COMPENSADOValue(const aValue: Integer); +begin + DataTable.Fields[idx_RecibosClienteID_RECIBO_COMPENSADO].AsInteger := aValue; +end; + +function TRecibosClienteDataTableRules.GetREFERENCIA_REC_COMPENSADOValue: String; +begin + result := DataTable.Fields[idx_RecibosClienteREFERENCIA_REC_COMPENSADO].AsString; +end; + +procedure TRecibosClienteDataTableRules.SetREFERENCIA_REC_COMPENSADOValue(const aValue: String); +begin + DataTable.Fields[idx_RecibosClienteREFERENCIA_REC_COMPENSADO].AsString := aValue; +end; + function TRecibosClienteDataTableRules.GetREFERENCIAValue: String; begin result := DataTable.Fields[idx_RecibosClienteREFERENCIA].AsString; @@ -935,6 +1144,26 @@ begin DataTable.Fields[idx_RecibosCliente_RefreshID].AsInteger := aValue; end; +function TRecibosCliente_RefreshDataTableRules.GetID_RECIBO_COMPENSADOValue: Integer; +begin + result := DataTable.Fields[idx_RecibosCliente_RefreshID_RECIBO_COMPENSADO].AsInteger; +end; + +procedure TRecibosCliente_RefreshDataTableRules.SetID_RECIBO_COMPENSADOValue(const aValue: Integer); +begin + DataTable.Fields[idx_RecibosCliente_RefreshID_RECIBO_COMPENSADO].AsInteger := aValue; +end; + +function TRecibosCliente_RefreshDataTableRules.GetREFERENCIA_REC_COMPENSADOValue: String; +begin + result := DataTable.Fields[idx_RecibosCliente_RefreshREFERENCIA_REC_COMPENSADO].AsString; +end; + +procedure TRecibosCliente_RefreshDataTableRules.SetREFERENCIA_REC_COMPENSADOValue(const aValue: String); +begin + DataTable.Fields[idx_RecibosCliente_RefreshREFERENCIA_REC_COMPENSADO].AsString := aValue; +end; + function TRecibosCliente_RefreshDataTableRules.GetREFERENCIAValue: String; begin result := DataTable.Fields[idx_RecibosCliente_RefreshREFERENCIA].AsString; @@ -1328,9 +1557,182 @@ begin end; +{ TRecibosCompensadosDataTableRules } +constructor TRecibosCompensadosDataTableRules.Create(aDataTable: TDADataTable); +begin + inherited; +end; + +destructor TRecibosCompensadosDataTableRules.Destroy; +begin + inherited; +end; + +function TRecibosCompensadosDataTableRules.GetIDValue: Integer; +begin + result := DataTable.Fields[idx_RecibosCompensadosID].AsInteger; +end; + +procedure TRecibosCompensadosDataTableRules.SetIDValue(const aValue: Integer); +begin + DataTable.Fields[idx_RecibosCompensadosID].AsInteger := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetID_RECIBO_COMPENSADOValue: Integer; +begin + result := DataTable.Fields[idx_RecibosCompensadosID_RECIBO_COMPENSADO].AsInteger; +end; + +procedure TRecibosCompensadosDataTableRules.SetID_RECIBO_COMPENSADOValue(const aValue: Integer); +begin + DataTable.Fields[idx_RecibosCompensadosID_RECIBO_COMPENSADO].AsInteger := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetREFERENCIAValue: String; +begin + result := DataTable.Fields[idx_RecibosCompensadosREFERENCIA].AsString; +end; + +procedure TRecibosCompensadosDataTableRules.SetREFERENCIAValue(const aValue: String); +begin + DataTable.Fields[idx_RecibosCompensadosREFERENCIA].AsString := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetSITUACIONValue: String; +begin + result := DataTable.Fields[idx_RecibosCompensadosSITUACION].AsString; +end; + +procedure TRecibosCompensadosDataTableRules.SetSITUACIONValue(const aValue: String); +begin + DataTable.Fields[idx_RecibosCompensadosSITUACION].AsString := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetID_FACTURAValue: Integer; +begin + result := DataTable.Fields[idx_RecibosCompensadosID_FACTURA].AsInteger; +end; + +procedure TRecibosCompensadosDataTableRules.SetID_FACTURAValue(const aValue: Integer); +begin + DataTable.Fields[idx_RecibosCompensadosID_FACTURA].AsInteger := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetFECHA_EMISIONValue: DateTime; +begin + result := DataTable.Fields[idx_RecibosCompensadosFECHA_EMISION].AsDateTime; +end; + +procedure TRecibosCompensadosDataTableRules.SetFECHA_EMISIONValue(const aValue: DateTime); +begin + DataTable.Fields[idx_RecibosCompensadosFECHA_EMISION].AsDateTime := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetFECHA_VENCIMIENTOValue: DateTime; +begin + result := DataTable.Fields[idx_RecibosCompensadosFECHA_VENCIMIENTO].AsDateTime; +end; + +procedure TRecibosCompensadosDataTableRules.SetFECHA_VENCIMIENTOValue(const aValue: DateTime); +begin + DataTable.Fields[idx_RecibosCompensadosFECHA_VENCIMIENTO].AsDateTime := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetIMPORTEValue: Currency; +begin + result := DataTable.Fields[idx_RecibosCompensadosIMPORTE].AsCurrency; +end; + +procedure TRecibosCompensadosDataTableRules.SetIMPORTEValue(const aValue: Currency); +begin + DataTable.Fields[idx_RecibosCompensadosIMPORTE].AsCurrency := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetOTROS_GASTOSValue: Currency; +begin + result := DataTable.Fields[idx_RecibosCompensadosOTROS_GASTOS].AsCurrency; +end; + +procedure TRecibosCompensadosDataTableRules.SetOTROS_GASTOSValue(const aValue: Currency); +begin + DataTable.Fields[idx_RecibosCompensadosOTROS_GASTOS].AsCurrency := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetIMPORTE_TOTALValue: Currency; +begin + result := DataTable.Fields[idx_RecibosCompensadosIMPORTE_TOTAL].AsCurrency; +end; + +procedure TRecibosCompensadosDataTableRules.SetIMPORTE_TOTALValue(const aValue: Currency); +begin + DataTable.Fields[idx_RecibosCompensadosIMPORTE_TOTAL].AsCurrency := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetFECHA_FACTURAValue: DateTime; +begin + result := DataTable.Fields[idx_RecibosCompensadosFECHA_FACTURA].AsDateTime; +end; + +procedure TRecibosCompensadosDataTableRules.SetFECHA_FACTURAValue(const aValue: DateTime); +begin + DataTable.Fields[idx_RecibosCompensadosFECHA_FACTURA].AsDateTime := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetIMPORTE_FACTURAValue: Currency; +begin + result := DataTable.Fields[idx_RecibosCompensadosIMPORTE_FACTURA].AsCurrency; +end; + +procedure TRecibosCompensadosDataTableRules.SetIMPORTE_FACTURAValue(const aValue: Currency); +begin + DataTable.Fields[idx_RecibosCompensadosIMPORTE_FACTURA].AsCurrency := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetID_CLIENTEValue: Integer; +begin + result := DataTable.Fields[idx_RecibosCompensadosID_CLIENTE].AsInteger; +end; + +procedure TRecibosCompensadosDataTableRules.SetID_CLIENTEValue(const aValue: Integer); +begin + DataTable.Fields[idx_RecibosCompensadosID_CLIENTE].AsInteger := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetNOMBRE_CLIENTEValue: String; +begin + result := DataTable.Fields[idx_RecibosCompensadosNOMBRE_CLIENTE].AsString; +end; + +procedure TRecibosCompensadosDataTableRules.SetNOMBRE_CLIENTEValue(const aValue: String); +begin + DataTable.Fields[idx_RecibosCompensadosNOMBRE_CLIENTE].AsString := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetNIF_CIF_CLIENTEValue: String; +begin + result := DataTable.Fields[idx_RecibosCompensadosNIF_CIF_CLIENTE].AsString; +end; + +procedure TRecibosCompensadosDataTableRules.SetNIF_CIF_CLIENTEValue(const aValue: String); +begin + DataTable.Fields[idx_RecibosCompensadosNIF_CIF_CLIENTE].AsString := aValue; +end; + +function TRecibosCompensadosDataTableRules.GetID_EMPRESAValue: Integer; +begin + result := DataTable.Fields[idx_RecibosCompensadosID_EMPRESA].AsInteger; +end; + +procedure TRecibosCompensadosDataTableRules.SetID_EMPRESAValue(const aValue: Integer); +begin + DataTable.Fields[idx_RecibosCompensadosID_EMPRESA].AsInteger := aValue; +end; + + initialization RegisterDataTableRules(RID_RecibosCliente, TRecibosClienteDataTableRules); RegisterDataTableRules(RID_RecibosCliente_Refresh, TRecibosCliente_RefreshDataTableRules); RegisterDataTableRules(RID_PagosCliente, TPagosClienteDataTableRules); + RegisterDataTableRules(RID_RecibosCompensados, TRecibosCompensadosDataTableRules); end. diff --git a/Source/Modulos/Recibos de cliente/Model/schRecibosClienteServer_Intf.pas b/Source/Modulos/Recibos de cliente/Model/schRecibosClienteServer_Intf.pas index 739761a7..98b21046 100644 --- a/Source/Modulos/Recibos de cliente/Model/schRecibosClienteServer_Intf.pas +++ b/Source/Modulos/Recibos de cliente/Model/schRecibosClienteServer_Intf.pas @@ -9,16 +9,19 @@ const { Delta rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_RecibosClienteDelta = '{F6DA2E5E-D77D-4351-85DF-EA08668F5466}'; - RID_RecibosCliente_RefreshDelta = '{D77FE124-C90E-435C-A2E9-7307C424C438}'; - RID_PagosClienteDelta = '{FFEFE23F-1230-4E8C-AD77-C4389F31B9F6}'; + RID_RecibosClienteDelta = '{7A5E3980-065D-4A44-81E9-FEAF2A9517B0}'; + RID_RecibosCliente_RefreshDelta = '{230B49D3-C4EF-4C00-8E40-01BD41E95CE4}'; + RID_PagosClienteDelta = '{B4C052F8-CA65-4803-877C-195E8157E026}'; + RID_RecibosCompensadosDelta = '{60128DBB-E8CE-4940-994C-31429569D3E3}'; type { IRecibosClienteDelta } IRecibosClienteDelta = interface(IRecibosCliente) - ['{F6DA2E5E-D77D-4351-85DF-EA08668F5466}'] + ['{7A5E3980-065D-4A44-81E9-FEAF2A9517B0}'] { Property getters and setters } function GetOldIDValue : Integer; + function GetOldID_RECIBO_COMPENSADOValue : Integer; + function GetOldREFERENCIA_REC_COMPENSADOValue : String; function GetOldREFERENCIAValue : String; function GetOldSITUACIONValue : String; function GetOldID_FACTURAValue : Integer; @@ -48,6 +51,8 @@ type { Properties } property OldID : Integer read GetOldIDValue; + property OldID_RECIBO_COMPENSADO : Integer read GetOldID_RECIBO_COMPENSADOValue; + property OldREFERENCIA_REC_COMPENSADO : String read GetOldREFERENCIA_REC_COMPENSADOValue; property OldREFERENCIA : String read GetOldREFERENCIAValue; property OldSITUACION : String read GetOldSITUACIONValue; property OldID_FACTURA : Integer read GetOldID_FACTURAValue; @@ -84,6 +89,12 @@ type function GetIDValue: Integer; virtual; function GetOldIDValue: Integer; virtual; procedure SetIDValue(const aValue: Integer); virtual; + function GetID_RECIBO_COMPENSADOValue: Integer; virtual; + function GetOldID_RECIBO_COMPENSADOValue: Integer; virtual; + procedure SetID_RECIBO_COMPENSADOValue(const aValue: Integer); virtual; + function GetREFERENCIA_REC_COMPENSADOValue: String; virtual; + function GetOldREFERENCIA_REC_COMPENSADOValue: String; virtual; + procedure SetREFERENCIA_REC_COMPENSADOValue(const aValue: String); virtual; function GetREFERENCIAValue: String; virtual; function GetOldREFERENCIAValue: String; virtual; procedure SetREFERENCIAValue(const aValue: String); virtual; @@ -166,6 +177,10 @@ type { Properties } property ID : Integer read GetIDValue write SetIDValue; property OldID : Integer read GetOldIDValue; + property ID_RECIBO_COMPENSADO : Integer read GetID_RECIBO_COMPENSADOValue write SetID_RECIBO_COMPENSADOValue; + property OldID_RECIBO_COMPENSADO : Integer read GetOldID_RECIBO_COMPENSADOValue; + property REFERENCIA_REC_COMPENSADO : String read GetREFERENCIA_REC_COMPENSADOValue write SetREFERENCIA_REC_COMPENSADOValue; + property OldREFERENCIA_REC_COMPENSADO : String read GetOldREFERENCIA_REC_COMPENSADOValue; property REFERENCIA : String read GetREFERENCIAValue write SetREFERENCIAValue; property OldREFERENCIA : String read GetOldREFERENCIAValue; property SITUACION : String read GetSITUACIONValue write SetSITUACIONValue; @@ -227,9 +242,11 @@ type { IRecibosCliente_RefreshDelta } IRecibosCliente_RefreshDelta = interface(IRecibosCliente_Refresh) - ['{D77FE124-C90E-435C-A2E9-7307C424C438}'] + ['{230B49D3-C4EF-4C00-8E40-01BD41E95CE4}'] { Property getters and setters } function GetOldIDValue : Integer; + function GetOldID_RECIBO_COMPENSADOValue : Integer; + function GetOldREFERENCIA_REC_COMPENSADOValue : String; function GetOldREFERENCIAValue : String; function GetOldSITUACIONValue : String; function GetOldID_FACTURAValue : Integer; @@ -259,6 +276,8 @@ type { Properties } property OldID : Integer read GetOldIDValue; + property OldID_RECIBO_COMPENSADO : Integer read GetOldID_RECIBO_COMPENSADOValue; + property OldREFERENCIA_REC_COMPENSADO : String read GetOldREFERENCIA_REC_COMPENSADOValue; property OldREFERENCIA : String read GetOldREFERENCIAValue; property OldSITUACION : String read GetOldSITUACIONValue; property OldID_FACTURA : Integer read GetOldID_FACTURAValue; @@ -295,6 +314,12 @@ type function GetIDValue: Integer; virtual; function GetOldIDValue: Integer; virtual; procedure SetIDValue(const aValue: Integer); virtual; + function GetID_RECIBO_COMPENSADOValue: Integer; virtual; + function GetOldID_RECIBO_COMPENSADOValue: Integer; virtual; + procedure SetID_RECIBO_COMPENSADOValue(const aValue: Integer); virtual; + function GetREFERENCIA_REC_COMPENSADOValue: String; virtual; + function GetOldREFERENCIA_REC_COMPENSADOValue: String; virtual; + procedure SetREFERENCIA_REC_COMPENSADOValue(const aValue: String); virtual; function GetREFERENCIAValue: String; virtual; function GetOldREFERENCIAValue: String; virtual; procedure SetREFERENCIAValue(const aValue: String); virtual; @@ -377,6 +402,10 @@ type { Properties } property ID : Integer read GetIDValue write SetIDValue; property OldID : Integer read GetOldIDValue; + property ID_RECIBO_COMPENSADO : Integer read GetID_RECIBO_COMPENSADOValue write SetID_RECIBO_COMPENSADOValue; + property OldID_RECIBO_COMPENSADO : Integer read GetOldID_RECIBO_COMPENSADOValue; + property REFERENCIA_REC_COMPENSADO : String read GetREFERENCIA_REC_COMPENSADOValue write SetREFERENCIA_REC_COMPENSADOValue; + property OldREFERENCIA_REC_COMPENSADO : String read GetOldREFERENCIA_REC_COMPENSADOValue; property REFERENCIA : String read GetREFERENCIAValue write SetREFERENCIAValue; property OldREFERENCIA : String read GetOldREFERENCIAValue; property SITUACION : String read GetSITUACIONValue write SetSITUACIONValue; @@ -438,7 +467,7 @@ type { IPagosClienteDelta } IPagosClienteDelta = interface(IPagosCliente) - ['{FFEFE23F-1230-4E8C-AD77-C4389F31B9F6}'] + ['{B4C052F8-CA65-4803-877C-195E8157E026}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_RECIBOValue : Integer; @@ -542,6 +571,140 @@ type end; + { IRecibosCompensadosDelta } + IRecibosCompensadosDelta = interface(IRecibosCompensados) + ['{60128DBB-E8CE-4940-994C-31429569D3E3}'] + { Property getters and setters } + function GetOldIDValue : Integer; + function GetOldID_RECIBO_COMPENSADOValue : Integer; + function GetOldREFERENCIAValue : String; + function GetOldSITUACIONValue : String; + function GetOldID_FACTURAValue : Integer; + function GetOldFECHA_EMISIONValue : DateTime; + function GetOldFECHA_VENCIMIENTOValue : DateTime; + function GetOldIMPORTEValue : Currency; + function GetOldOTROS_GASTOSValue : Currency; + function GetOldIMPORTE_TOTALValue : Currency; + function GetOldFECHA_FACTURAValue : DateTime; + function GetOldIMPORTE_FACTURAValue : Currency; + function GetOldID_CLIENTEValue : Integer; + function GetOldNOMBRE_CLIENTEValue : String; + function GetOldNIF_CIF_CLIENTEValue : String; + function GetOldID_EMPRESAValue : Integer; + + { Properties } + property OldID : Integer read GetOldIDValue; + property OldID_RECIBO_COMPENSADO : Integer read GetOldID_RECIBO_COMPENSADOValue; + property OldREFERENCIA : String read GetOldREFERENCIAValue; + property OldSITUACION : String read GetOldSITUACIONValue; + property OldID_FACTURA : Integer read GetOldID_FACTURAValue; + property OldFECHA_EMISION : DateTime read GetOldFECHA_EMISIONValue; + property OldFECHA_VENCIMIENTO : DateTime read GetOldFECHA_VENCIMIENTOValue; + property OldIMPORTE : Currency read GetOldIMPORTEValue; + property OldOTROS_GASTOS : Currency read GetOldOTROS_GASTOSValue; + property OldIMPORTE_TOTAL : Currency read GetOldIMPORTE_TOTALValue; + property OldFECHA_FACTURA : DateTime read GetOldFECHA_FACTURAValue; + property OldIMPORTE_FACTURA : Currency read GetOldIMPORTE_FACTURAValue; + property OldID_CLIENTE : Integer read GetOldID_CLIENTEValue; + property OldNOMBRE_CLIENTE : String read GetOldNOMBRE_CLIENTEValue; + property OldNIF_CIF_CLIENTE : String read GetOldNIF_CIF_CLIENTEValue; + property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue; + end; + + { TRecibosCompensadosBusinessProcessorRules } + TRecibosCompensadosBusinessProcessorRules = class(TDABusinessProcessorRules, IRecibosCompensados, IRecibosCompensadosDelta) + private + protected + { Property getters and setters } + function GetIDValue: Integer; virtual; + function GetOldIDValue: Integer; virtual; + procedure SetIDValue(const aValue: Integer); virtual; + function GetID_RECIBO_COMPENSADOValue: Integer; virtual; + function GetOldID_RECIBO_COMPENSADOValue: Integer; virtual; + procedure SetID_RECIBO_COMPENSADOValue(const aValue: Integer); virtual; + function GetREFERENCIAValue: String; virtual; + function GetOldREFERENCIAValue: String; virtual; + procedure SetREFERENCIAValue(const aValue: String); virtual; + function GetSITUACIONValue: String; virtual; + function GetOldSITUACIONValue: String; virtual; + procedure SetSITUACIONValue(const aValue: String); virtual; + function GetID_FACTURAValue: Integer; virtual; + function GetOldID_FACTURAValue: Integer; virtual; + procedure SetID_FACTURAValue(const aValue: Integer); virtual; + function GetFECHA_EMISIONValue: DateTime; virtual; + function GetOldFECHA_EMISIONValue: DateTime; virtual; + procedure SetFECHA_EMISIONValue(const aValue: DateTime); virtual; + function GetFECHA_VENCIMIENTOValue: DateTime; virtual; + function GetOldFECHA_VENCIMIENTOValue: DateTime; virtual; + procedure SetFECHA_VENCIMIENTOValue(const aValue: DateTime); virtual; + function GetIMPORTEValue: Currency; virtual; + function GetOldIMPORTEValue: Currency; virtual; + procedure SetIMPORTEValue(const aValue: Currency); virtual; + function GetOTROS_GASTOSValue: Currency; virtual; + function GetOldOTROS_GASTOSValue: Currency; virtual; + procedure SetOTROS_GASTOSValue(const aValue: Currency); virtual; + function GetIMPORTE_TOTALValue: Currency; virtual; + function GetOldIMPORTE_TOTALValue: Currency; virtual; + procedure SetIMPORTE_TOTALValue(const aValue: Currency); virtual; + function GetFECHA_FACTURAValue: DateTime; virtual; + function GetOldFECHA_FACTURAValue: DateTime; virtual; + procedure SetFECHA_FACTURAValue(const aValue: DateTime); virtual; + function GetIMPORTE_FACTURAValue: Currency; virtual; + function GetOldIMPORTE_FACTURAValue: Currency; virtual; + procedure SetIMPORTE_FACTURAValue(const aValue: Currency); virtual; + function GetID_CLIENTEValue: Integer; virtual; + function GetOldID_CLIENTEValue: Integer; virtual; + procedure SetID_CLIENTEValue(const aValue: Integer); virtual; + function GetNOMBRE_CLIENTEValue: String; virtual; + function GetOldNOMBRE_CLIENTEValue: String; virtual; + procedure SetNOMBRE_CLIENTEValue(const aValue: String); virtual; + function GetNIF_CIF_CLIENTEValue: String; virtual; + function GetOldNIF_CIF_CLIENTEValue: String; virtual; + procedure SetNIF_CIF_CLIENTEValue(const aValue: String); virtual; + function GetID_EMPRESAValue: Integer; virtual; + function GetOldID_EMPRESAValue: Integer; virtual; + procedure SetID_EMPRESAValue(const aValue: Integer); virtual; + + { Properties } + property ID : Integer read GetIDValue write SetIDValue; + property OldID : Integer read GetOldIDValue; + property ID_RECIBO_COMPENSADO : Integer read GetID_RECIBO_COMPENSADOValue write SetID_RECIBO_COMPENSADOValue; + property OldID_RECIBO_COMPENSADO : Integer read GetOldID_RECIBO_COMPENSADOValue; + property REFERENCIA : String read GetREFERENCIAValue write SetREFERENCIAValue; + property OldREFERENCIA : String read GetOldREFERENCIAValue; + property SITUACION : String read GetSITUACIONValue write SetSITUACIONValue; + property OldSITUACION : String read GetOldSITUACIONValue; + property ID_FACTURA : Integer read GetID_FACTURAValue write SetID_FACTURAValue; + property OldID_FACTURA : Integer read GetOldID_FACTURAValue; + property FECHA_EMISION : DateTime read GetFECHA_EMISIONValue write SetFECHA_EMISIONValue; + property OldFECHA_EMISION : DateTime read GetOldFECHA_EMISIONValue; + property FECHA_VENCIMIENTO : DateTime read GetFECHA_VENCIMIENTOValue write SetFECHA_VENCIMIENTOValue; + property OldFECHA_VENCIMIENTO : DateTime read GetOldFECHA_VENCIMIENTOValue; + property IMPORTE : Currency read GetIMPORTEValue write SetIMPORTEValue; + property OldIMPORTE : Currency read GetOldIMPORTEValue; + property OTROS_GASTOS : Currency read GetOTROS_GASTOSValue write SetOTROS_GASTOSValue; + property OldOTROS_GASTOS : Currency read GetOldOTROS_GASTOSValue; + property IMPORTE_TOTAL : Currency read GetIMPORTE_TOTALValue write SetIMPORTE_TOTALValue; + property OldIMPORTE_TOTAL : Currency read GetOldIMPORTE_TOTALValue; + property FECHA_FACTURA : DateTime read GetFECHA_FACTURAValue write SetFECHA_FACTURAValue; + property OldFECHA_FACTURA : DateTime read GetOldFECHA_FACTURAValue; + property IMPORTE_FACTURA : Currency read GetIMPORTE_FACTURAValue write SetIMPORTE_FACTURAValue; + property OldIMPORTE_FACTURA : Currency read GetOldIMPORTE_FACTURAValue; + property ID_CLIENTE : Integer read GetID_CLIENTEValue write SetID_CLIENTEValue; + property OldID_CLIENTE : Integer read GetOldID_CLIENTEValue; + property NOMBRE_CLIENTE : String read GetNOMBRE_CLIENTEValue write SetNOMBRE_CLIENTEValue; + property OldNOMBRE_CLIENTE : String read GetOldNOMBRE_CLIENTEValue; + property NIF_CIF_CLIENTE : String read GetNIF_CIF_CLIENTEValue write SetNIF_CIF_CLIENTEValue; + property OldNIF_CIF_CLIENTE : String read GetOldNIF_CIF_CLIENTEValue; + property ID_EMPRESA : Integer read GetID_EMPRESAValue write SetID_EMPRESAValue; + property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue; + + public + constructor Create(aBusinessProcessor: TDABusinessProcessor); override; + destructor Destroy; override; + + end; + implementation uses @@ -573,6 +736,36 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosClienteID] := aValue; end; +function TRecibosClienteBusinessProcessorRules.GetID_RECIBO_COMPENSADOValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosClienteID_RECIBO_COMPENSADO]; +end; + +function TRecibosClienteBusinessProcessorRules.GetOldID_RECIBO_COMPENSADOValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosClienteID_RECIBO_COMPENSADO]; +end; + +procedure TRecibosClienteBusinessProcessorRules.SetID_RECIBO_COMPENSADOValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosClienteID_RECIBO_COMPENSADO] := aValue; +end; + +function TRecibosClienteBusinessProcessorRules.GetREFERENCIA_REC_COMPENSADOValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosClienteREFERENCIA_REC_COMPENSADO]; +end; + +function TRecibosClienteBusinessProcessorRules.GetOldREFERENCIA_REC_COMPENSADOValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosClienteREFERENCIA_REC_COMPENSADO]; +end; + +procedure TRecibosClienteBusinessProcessorRules.SetREFERENCIA_REC_COMPENSADOValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosClienteREFERENCIA_REC_COMPENSADO] := aValue; +end; + function TRecibosClienteBusinessProcessorRules.GetREFERENCIAValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosClienteREFERENCIA]; @@ -990,6 +1183,36 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCliente_RefreshID] := aValue; end; +function TRecibosCliente_RefreshBusinessProcessorRules.GetID_RECIBO_COMPENSADOValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCliente_RefreshID_RECIBO_COMPENSADO]; +end; + +function TRecibosCliente_RefreshBusinessProcessorRules.GetOldID_RECIBO_COMPENSADOValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCliente_RefreshID_RECIBO_COMPENSADO]; +end; + +procedure TRecibosCliente_RefreshBusinessProcessorRules.SetID_RECIBO_COMPENSADOValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCliente_RefreshID_RECIBO_COMPENSADO] := aValue; +end; + +function TRecibosCliente_RefreshBusinessProcessorRules.GetREFERENCIA_REC_COMPENSADOValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCliente_RefreshREFERENCIA_REC_COMPENSADO]; +end; + +function TRecibosCliente_RefreshBusinessProcessorRules.GetOldREFERENCIA_REC_COMPENSADOValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCliente_RefreshREFERENCIA_REC_COMPENSADO]; +end; + +procedure TRecibosCliente_RefreshBusinessProcessorRules.SetREFERENCIA_REC_COMPENSADOValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCliente_RefreshREFERENCIA_REC_COMPENSADO] := aValue; +end; + function TRecibosCliente_RefreshBusinessProcessorRules.GetREFERENCIAValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCliente_RefreshREFERENCIA]; @@ -1573,9 +1796,262 @@ begin end; +{ TRecibosCompensadosBusinessProcessorRules } +constructor TRecibosCompensadosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); +begin + inherited; +end; + +destructor TRecibosCompensadosBusinessProcessorRules.Destroy; +begin + inherited; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetIDValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosID]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldIDValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosID]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetIDValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosID] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetID_RECIBO_COMPENSADOValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosID_RECIBO_COMPENSADO]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldID_RECIBO_COMPENSADOValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosID_RECIBO_COMPENSADO]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetID_RECIBO_COMPENSADOValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosID_RECIBO_COMPENSADO] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetREFERENCIAValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosREFERENCIA]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldREFERENCIAValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosREFERENCIA]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetREFERENCIAValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosREFERENCIA] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetSITUACIONValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosSITUACION]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldSITUACIONValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosSITUACION]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetSITUACIONValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosSITUACION] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetID_FACTURAValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosID_FACTURA]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldID_FACTURAValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosID_FACTURA]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetID_FACTURAValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosID_FACTURA] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetFECHA_EMISIONValue: DateTime; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosFECHA_EMISION]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldFECHA_EMISIONValue: DateTime; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosFECHA_EMISION]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetFECHA_EMISIONValue(const aValue: DateTime); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosFECHA_EMISION] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetFECHA_VENCIMIENTOValue: DateTime; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosFECHA_VENCIMIENTO]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldFECHA_VENCIMIENTOValue: DateTime; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosFECHA_VENCIMIENTO]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetFECHA_VENCIMIENTOValue(const aValue: DateTime); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosFECHA_VENCIMIENTO] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetIMPORTEValue: Currency; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosIMPORTE]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldIMPORTEValue: Currency; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosIMPORTE]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetIMPORTEValue(const aValue: Currency); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosIMPORTE] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOTROS_GASTOSValue: Currency; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosOTROS_GASTOS]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldOTROS_GASTOSValue: Currency; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosOTROS_GASTOS]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetOTROS_GASTOSValue(const aValue: Currency); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosOTROS_GASTOS] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetIMPORTE_TOTALValue: Currency; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosIMPORTE_TOTAL]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldIMPORTE_TOTALValue: Currency; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosIMPORTE_TOTAL]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetIMPORTE_TOTALValue(const aValue: Currency); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosIMPORTE_TOTAL] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetFECHA_FACTURAValue: DateTime; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosFECHA_FACTURA]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldFECHA_FACTURAValue: DateTime; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosFECHA_FACTURA]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetFECHA_FACTURAValue(const aValue: DateTime); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosFECHA_FACTURA] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetIMPORTE_FACTURAValue: Currency; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosIMPORTE_FACTURA]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldIMPORTE_FACTURAValue: Currency; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosIMPORTE_FACTURA]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetIMPORTE_FACTURAValue(const aValue: Currency); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosIMPORTE_FACTURA] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetID_CLIENTEValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosID_CLIENTE]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldID_CLIENTEValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosID_CLIENTE]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetID_CLIENTEValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosID_CLIENTE] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetNOMBRE_CLIENTEValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosNOMBRE_CLIENTE]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldNOMBRE_CLIENTEValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosNOMBRE_CLIENTE]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetNOMBRE_CLIENTEValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosNOMBRE_CLIENTE] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetNIF_CIF_CLIENTEValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosNIF_CIF_CLIENTE]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldNIF_CIF_CLIENTEValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosNIF_CIF_CLIENTE]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetNIF_CIF_CLIENTEValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosNIF_CIF_CLIENTE] := aValue; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetID_EMPRESAValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosID_EMPRESA]; +end; + +function TRecibosCompensadosBusinessProcessorRules.GetOldID_EMPRESAValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_RecibosCompensadosID_EMPRESA]; +end; + +procedure TRecibosCompensadosBusinessProcessorRules.SetID_EMPRESAValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_RecibosCompensadosID_EMPRESA] := aValue; +end; + + initialization RegisterBusinessProcessorRules(RID_RecibosClienteDelta, TRecibosClienteBusinessProcessorRules); RegisterBusinessProcessorRules(RID_RecibosCliente_RefreshDelta, TRecibosCliente_RefreshBusinessProcessorRules); RegisterBusinessProcessorRules(RID_PagosClienteDelta, TPagosClienteBusinessProcessorRules); + RegisterBusinessProcessorRules(RID_RecibosCompensadosDelta, TRecibosCompensadosBusinessProcessorRules); end. diff --git a/Source/Modulos/Recibos de cliente/Model/uBizRecibosCliente.pas b/Source/Modulos/Recibos de cliente/Model/uBizRecibosCliente.pas index d84eb802..cfea78a8 100644 --- a/Source/Modulos/Recibos de cliente/Model/uBizRecibosCliente.pas +++ b/Source/Modulos/Recibos de cliente/Model/uBizRecibosCliente.pas @@ -31,12 +31,17 @@ uses const BIZ_CLIENT_IBIZRECIBOSCLIENTE = 'Client.IBizRecibosCliente'; + BIZ_CLIENT_RECIBOS_COMPENSADOS = 'Client.RecibosCompensados'; CTE_PENDIENTE = 'PENDIENTE'; CTE_COBRADO = 'COBRADO'; CTE_DEVUELTO = 'DEVUELTO'; type + IBizRecibosCompensados = interface(IRecibosCompensados) + ['{F9C18EAC-6769-428C-ABFB-AD6639F413D9}'] + end; + IBizRecibosCliente = interface(IRecibosCliente) ['{93758493-260C-450D-9018-E5339C2E09B2}'] function EsNuevo : Boolean; @@ -54,13 +59,22 @@ type procedure SetPagos(AValue : IBizPagosCliente); function GetPagos : IBizPagosCliente; property Pagos : IBizPagosCliente read GetPagos write SetPagos; + + function GetRecibosCompensados: IBizRecibosCompensados; + procedure SetRecibosCompensados(const Value: IBizRecibosCompensados); + property RecibosCompensados: IBizRecibosCompensados read GetRecibosCompensados write SetRecibosCompensados; + end; + + TBizRecibosCompensados = class(TRecibosCompensadosDataTableRules, IBizRecibosCompensados) end; TBizRecibosCliente = class(TRecibosClienteDataTableRules, IBizRecibosCliente, ISeleccionable) protected FPagos : IBizPagosCliente; FPagosLink : TDADataSource; - FCliente : IBizCliente; + FRecibosCompensados: IBizRecibosCompensados; + FRecibosCompensadosLink : TDADataSource; + FCliente : IBizCliente; FSeleccionableInterface : ISeleccionable; // No se puede cambiar el cliente por que depende de la factura @@ -75,11 +89,15 @@ type procedure SetPagos(AValue : IBizPagosCliente); function GetPagos : IBizPagosCliente; - procedure OnNewRecord(Sender: TDADataTable); override; + function GetRecibosCompensados: IBizRecibosCompensados; + procedure SetRecibosCompensados(const Value: IBizRecibosCompensados); + + procedure OnNewRecord(Sender: TDADataTable); override; procedure SetID_REMESAValue(const aValue: Integer); override; public + property RecibosCompensados: IBizRecibosCompensados read GetRecibosCompensados write SetRecibosCompensados; property Pagos : IBizPagosCliente read GetPagos write SetPagos; property SeleccionableInterface : ISeleccionable read FSeleccionableInterface write FSeleccionableInterface @@ -87,6 +105,7 @@ type procedure IniciarValoresIBizRecibosClienteNuevo; function EsNuevo : Boolean; + constructor Create(aDataTable: TDADataTable); override; destructor Destroy; override; end; @@ -108,6 +127,11 @@ begin Result := FPagos; end; +function TBizRecibosCliente.GetRecibosCompensados: IBizRecibosCompensados; +begin + Result := FRecibosCompensados; +end; + procedure TBizRecibosCliente.SetID_REMESAValue(const aValue: Integer); begin if (aValue = 0) then @@ -122,6 +146,16 @@ procedure TBizRecibosCliente.SetPagos(AValue: IBizPagosCliente); EnlazarMaestroDetalle(FPagosLink, FPagos); end; +procedure TBizRecibosCliente.SetRecibosCompensados(const Value: IBizRecibosCompensados); +begin + FRecibosCompensados := Value; + EnlazarMaestroDetalle(FRecibosCompensadosLink, FRecibosCompensados); + + if Assigned(FRecibosCompensados) then + if not FRecibosCompensados.DataTable.Active then + FRecibosCompensados.DataTable.Active := True; +end; + function TBizRecibosCliente._GetCliente: IBizCliente; begin Result := FCliente; @@ -136,15 +170,23 @@ constructor TBizRecibosCliente.Create(aDataTable: TDADataTable); begin inherited; FCliente := Nil; + FPagos := Nil; + FRecibosCompensados := Nil; + FPagosLink := TDADataSource.Create(NIL); FPagosLink.DataTable := aDataTable; + FRecibosCompensadosLink := TDADataSource.Create(NIL); + FRecibosCompensadosLink.DataTable := aDataTable; + FSeleccionableInterface := TSeleccionable.Create(aDataTable); end; destructor TBizRecibosCliente.Destroy; begin FPagos := NIL; + FRecibosCompensados := Nil; FreeAndNIL(FPagosLink); + FreeAndNIL(FRecibosCompensadosLink); FSeleccionableInterface := NIL; inherited; end; @@ -170,6 +212,7 @@ end; initialization RegisterDataTableRules(BIZ_CLIENT_IBIZRECIBOSCLIENTE, TBizRecibosCliente); + RegisterDataTableRules(BIZ_CLIENT_RECIBOS_COMPENSADOS, TBizRecibosCompensados); finalization diff --git a/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.dfm b/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.dfm index ca73f3f4..c5eda493 100644 --- a/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.dfm +++ b/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.dfm @@ -22,16 +22,17 @@ object srvRecibosCliente: TsrvRecibosCliente Connection = 'IBX' TargetTable = 'V_RECIBOS_CLIENTE' SQL = - 'SELECT ID,'#10' REFERENCIA,'#10' SITUACION,'#10' ID_FACTUR' + - 'A,'#10' ID_REMESA,'#10' REFERENCIA_REMESA,'#10' FECHA_EMIS' + - 'ION,'#10' FECHA_VENCIMIENTO,'#10' DESCRIPCION,'#10' OBSERV' + - 'ACIONES,'#10' IMPORTE,'#10' OTROS_GASTOS,'#10' IMPORTE_TOT' + - 'AL,'#10' FECHA_FACTURA,'#10' FORMA_PAGO_FACTURA,'#10' IMPO' + - 'RTE_FACTURA,'#10' ID_CLIENTE,'#10' NOMBRE_CLIENTE,'#10' NI' + - 'F_CIF_CLIENTE,'#10' ENTIDAD_CLIENTE,'#10' SUCURSAL_CLIENTE,'#10 + - ' DC_CLIENTE,'#10' CUENTA_CLIENTE,'#10' ID_EMPRESA,'#10' ' + - ' FECHA_ALTA,'#10' FECHA_MODIFICACION,'#10' USUARIO'#10#10'FROM ' + - 'V_RECIBOS_CLIENTE' + 'SELECT ID,'#10' ID_RECIBO_COMPENSADO,'#10' REFERENCIA_REC_CO' + + 'MPENSADO,'#10' REFERENCIA,'#10' SITUACION,'#10' ID_FACTURA' + + ','#10' ID_REMESA,'#10' REFERENCIA_REMESA,'#10' FECHA_EMISI' + + 'ON,'#10' FECHA_VENCIMIENTO,'#10' DESCRIPCION,'#10' OBSERVA' + + 'CIONES,'#10' IMPORTE,'#10' OTROS_GASTOS,'#10' IMPORTE_TOTA' + + 'L,'#10' FECHA_FACTURA,'#10' FORMA_PAGO_FACTURA,'#10' IMPOR' + + 'TE_FACTURA,'#10' ID_CLIENTE,'#10' NOMBRE_CLIENTE,'#10' NIF' + + '_CIF_CLIENTE,'#10' ENTIDAD_CLIENTE,'#10' SUCURSAL_CLIENTE,'#10' ' + + ' DC_CLIENTE,'#10' CUENTA_CLIENTE,'#10' ID_EMPRESA,'#10' ' + + ' FECHA_ALTA,'#10' FECHA_MODIFICACION,'#10' USUARIO'#10#10'FROM V' + + '_RECIBOS_CLIENTE' StatementType = stSQL ColumnMappings = < item @@ -141,6 +142,14 @@ object srvRecibosCliente: TsrvRecibosCliente item DatasetField = 'FECHA_EMISION' TableField = 'FECHA_EMISION' + end + item + DatasetField = 'ID_RECIBO_COMPENSADO' + TableField = 'ID_RECIBO_COMPENSADO' + end + item + DatasetField = 'REFERENCIA_REC_COMPENSADO' + TableField = 'REFERENCIA_REC_COMPENSADO' end> end> Name = 'RecibosCliente' @@ -155,6 +164,29 @@ object srvRecibosCliente: TsrvRecibosCliente Lookup = False LookupCache = False end + item + Name = 'ID_RECIBO_COMPENSADO' + DataType = datInteger + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'REFERENCIA_REC_COMPENSADO' + DataType = datString + Size = 255 + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end item Name = 'REFERENCIA' DataType = datString @@ -445,16 +477,17 @@ object srvRecibosCliente: TsrvRecibosCliente Connection = 'IBX' TargetTable = 'V_RECIBOS_CLIENTE' SQL = - 'SELECT ID,'#10' REFERENCIA,'#10' SITUACION,'#10' ID_FACTUR' + - 'A,'#10' ID_REMESA,'#10' REFERENCIA_REMESA,'#10' FECHA_EMIS' + - 'ION,'#10' FECHA_VENCIMIENTO,'#10' DESCRIPCION,'#10' OBSERV' + - 'ACIONES,'#10' IMPORTE,'#10' OTROS_GASTOS,'#10' IMPORTE_TOT' + - 'AL,'#10' FECHA_FACTURA,'#10' FORMA_PAGO_FACTURA,'#10' IMPO' + - 'RTE_FACTURA,'#10' ID_CLIENTE,'#10' NOMBRE_CLIENTE,'#10' NI' + - 'F_CIF_CLIENTE,'#10' ENTIDAD_CLIENTE,'#10' SUCURSAL_CLIENTE,'#10 + - ' DC_CLIENTE,'#10' CUENTA_CLIENTE,'#10' ID_EMPRESA,'#10' ' + - ' FECHA_ALTA,'#10' FECHA_MODIFICACION,'#10' USUARIO'#10#10'FROM ' + - 'V_RECIBOS_CLIENTE'#10'WHERE'#10' ID = :ID' + 'SELECT ID,'#10' ID_RECIBO_COMPENSADO,'#10' REFERENCIA_REC_CO' + + 'MPENSADO,'#10' REFERENCIA,'#10' SITUACION,'#10' ID_FACTURA' + + ','#10' ID_REMESA,'#10' REFERENCIA_REMESA,'#10' FECHA_EMISI' + + 'ON,'#10' FECHA_VENCIMIENTO,'#10' DESCRIPCION,'#10' OBSERVA' + + 'CIONES,'#10' IMPORTE,'#10' OTROS_GASTOS,'#10' IMPORTE_TOTA' + + 'L,'#10' FECHA_FACTURA,'#10' FORMA_PAGO_FACTURA,'#10' IMPOR' + + 'TE_FACTURA,'#10' ID_CLIENTE,'#10' NOMBRE_CLIENTE,'#10' NIF' + + '_CIF_CLIENTE,'#10' ENTIDAD_CLIENTE,'#10' SUCURSAL_CLIENTE,'#10' ' + + ' DC_CLIENTE,'#10' CUENTA_CLIENTE,'#10' ID_EMPRESA,'#10' ' + + ' FECHA_ALTA,'#10' FECHA_MODIFICACION,'#10' USUARIO'#10#10'FROM V' + + '_RECIBOS_CLIENTE'#10'WHERE'#10' ID = :ID' StatementType = stSQL ColumnMappings = < item @@ -564,6 +597,14 @@ object srvRecibosCliente: TsrvRecibosCliente item DatasetField = 'FECHA_EMISION' TableField = 'FECHA_EMISION' + end + item + DatasetField = 'ID_RECIBO_COMPENSADO' + TableField = 'ID_RECIBO_COMPENSADO' + end + item + DatasetField = 'REFERENCIA_REC_COMPENSADO' + TableField = 'REFERENCIA_REC_COMPENSADO' end> end> Name = 'RecibosCliente_Refresh' @@ -578,6 +619,29 @@ object srvRecibosCliente: TsrvRecibosCliente Lookup = False LookupCache = False end + item + Name = 'ID_RECIBO_COMPENSADO' + DataType = datInteger + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'REFERENCIA_REC_COMPENSADO' + DataType = datString + Size = 255 + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end item Name = 'REFERENCIA' DataType = datString @@ -1055,6 +1119,265 @@ object srvRecibosCliente: TsrvRecibosCliente end> BusinessRulesClient.ScriptLanguage = rslPascalScript BusinessRulesServer.ScriptLanguage = rslPascalScript + end + item + Params = < + item + Name = 'ID' + DataType = datInteger + BlobType = dabtUnknown + Value = '' + ParamType = daptInput + end> + Statements = < + item + Connection = 'IBX' + TargetTable = 'V_RECIBOS_CLIENTE' + SQL = + 'SELECT ID,'#10' ID_RECIBO_COMPENSADO,'#10' REFERENCIA,'#10' ' + + ' SITUACION,'#10' ID_FACTURA,'#10' FECHA_EMISION,'#10' FEC' + + 'HA_VENCIMIENTO,'#10' IMPORTE,'#10' OTROS_GASTOS,'#10' IMPO' + + 'RTE_TOTAL,'#10' FECHA_FACTURA,'#10' IMPORTE_FACTURA,'#10' ' + + 'ID_CLIENTE,'#10' NOMBRE_CLIENTE,'#10' NIF_CIF_CLIENTE,'#10' ' + + ' ID_EMPRESA'#10#10'FROM V_RECIBOS_CLIENTE'#10'WHERE ID_RECIBO_COMPENSADO ' + + '= :ID' + StatementType = stSQL + ColumnMappings = < + item + DatasetField = 'REFERENCIA' + TableField = 'REFERENCIA' + end + item + DatasetField = 'SITUACION' + TableField = 'SITUACION' + end + item + DatasetField = 'ID_FACTURA' + TableField = 'ID_FACTURA' + end + item + DatasetField = 'FECHA_VENCIMIENTO' + TableField = 'FECHA_VENCIMIENTO' + end + item + DatasetField = 'IMPORTE' + TableField = 'IMPORTE' + end + item + DatasetField = 'FECHA_FACTURA' + TableField = 'FECHA_FACTURA' + end + item + DatasetField = 'IMPORTE_FACTURA' + TableField = 'IMPORTE_FACTURA' + end + item + DatasetField = 'NOMBRE_CLIENTE' + TableField = 'NOMBRE_CLIENTE' + end + item + DatasetField = 'NIF_CIF_CLIENTE' + TableField = 'NIF_CIF_CLIENTE' + end + item + DatasetField = 'ID_EMPRESA' + TableField = 'ID_EMPRESA' + end + item + DatasetField = 'OTROS_GASTOS' + TableField = 'OTROS_GASTOS' + end + item + DatasetField = 'ID_CLIENTE' + TableField = 'ID_CLIENTE' + end + item + DatasetField = 'IMPORTE_TOTAL' + TableField = 'IMPORTE_TOTAL' + end + item + DatasetField = 'FECHA_EMISION' + TableField = 'FECHA_EMISION' + end + item + DatasetField = 'ID_RECIBO_COMPENSADO' + TableField = 'ID_RECIBO_COMPENSADO' + end + item + DatasetField = 'ID' + TableField = 'ID' + end> + end> + Name = 'RecibosCompensados' + Fields = < + item + Name = 'ID' + DataType = datInteger + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'ID_RECIBO_COMPENSADO' + DataType = datInteger + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + BlobType = dabtUnknown + DictionaryEntry = 'RecibosCliente_REFERENCIA' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'SITUACION' + DataType = datString + Size = 9 + BlobType = dabtUnknown + DictionaryEntry = 'RecibosCliente_SITUACION' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'ID_FACTURA' + DataType = datInteger + BlobType = dabtUnknown + DictionaryEntry = 'RecibosCliente_ID_FACTURA' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'FECHA_EMISION' + DataType = datDateTime + BlobType = dabtUnknown + DictionaryEntry = 'RecibosCliente_FECHA_EMISION' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'FECHA_VENCIMIENTO' + DataType = datDateTime + BlobType = dabtUnknown + DictionaryEntry = 'RecibosCliente_FECHA_VENCIMIENTO' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'IMPORTE' + DataType = datCurrency + BlobType = dabtUnknown + DictionaryEntry = 'RecibosCliente_IMPORTE' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'OTROS_GASTOS' + DataType = datCurrency + BlobType = dabtUnknown + DictionaryEntry = 'RecibosCliente_OTROS_GASTOS' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'IMPORTE_TOTAL' + DataType = datCurrency + BlobType = dabtUnknown + DictionaryEntry = 'RecibosCliente_IMPORTE_TOTAL' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'FECHA_FACTURA' + DataType = datDateTime + BlobType = dabtUnknown + DictionaryEntry = 'RecibosCliente_FECHA_FACTURA' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'IMPORTE_FACTURA' + DataType = datCurrency + BlobType = dabtUnknown + DictionaryEntry = 'RecibosCliente_IMPORTE_FACTURA' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'ID_CLIENTE' + DataType = datInteger + BlobType = dabtUnknown + DictionaryEntry = 'RecibosCliente_ID_CLIENTE' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'NOMBRE_CLIENTE' + DataType = datString + Size = 255 + BlobType = dabtUnknown + DictionaryEntry = 'RecibosCliente_NOMBRE_CLIENTE' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'NIF_CIF_CLIENTE' + DataType = datString + Size = 15 + BlobType = dabtUnknown + DictionaryEntry = 'RecibosCliente_NIF_CIF_CLIENTE' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'ID_EMPRESA' + DataType = datInteger + BlobType = dabtUnknown + DictionaryEntry = 'RecibosCliente_ID_EMPRESA' + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end> + BusinessRulesClient.ScriptLanguage = rslPascalScript + BusinessRulesServer.ScriptLanguage = rslPascalScript end> Commands = < item @@ -1454,6 +1777,83 @@ object srvRecibosCliente: TsrvRecibosCliente ColumnMappings = <> end> Name = 'Update_PagosCliente' + end + item + Params = < + item + Name = 'ID_RECIBO_COMPENSADO' + DataType = datInteger + BlobType = dabtUnknown + Value = '' + ParamType = daptInput + end + item + Name = 'ID' + DataType = datInteger + BlobType = dabtUnknown + Value = '' + ParamType = daptInput + end> + Statements = < + item + Connection = 'IBX' + TargetTable = 'RECIBOS_CLIENTE' + SQL = + 'UPDATE RECIBOS_CLIENTE'#10'SET ID_RECIBO_COMPENSADO = :ID_RECIBO_COM' + + 'PENSADO'#10'WHERE (ID = :ID)' + StatementType = stSQL + ColumnMappings = <> + end> + Name = 'Insert_RecibosCompensados' + end + item + Params = < + item + Name = 'OLD_ID' + DataType = datInteger + BlobType = dabtUnknown + Value = '' + ParamType = daptInput + end> + Statements = < + item + Connection = 'IBX' + TargetTable = 'RECIBOS_CLIENTE' + SQL = + 'UPDATE RECIBOS_CLIENTE'#10'SET ID_RECIBO_COMPENSADO = Null'#10'WHERE (ID' + + ' = :OLD_ID)' + StatementType = stSQL + ColumnMappings = <> + end> + Name = 'Delete_RecibosCompensados' + end + item + Params = < + item + Name = 'ID_RECIBO_COMPENSADO' + DataType = datInteger + BlobType = dabtUnknown + Value = '' + ParamType = daptInput + end + item + Name = 'OLD_ID' + DataType = datInteger + BlobType = dabtUnknown + Value = '' + ParamType = daptInput + end> + Statements = < + item + Connection = 'IBX' + TargetTable = 'RECIBOS_CLIENTE' + SQL = + 'UPDATE RECIBOS_CLIENTE'#10'SET ID_RECIBO_COMPENSADO = :ID_RECIBO_COM' + + 'PENSADO'#10'WHERE (ID = :OLD_ID)' + StatementType = stSQL + ColumnMappings = <> + end> + Name = 'Update_RecibosCompensados' end> RelationShips = <> UpdateRules = < @@ -2075,4 +2475,15 @@ object srvRecibosCliente: TsrvRecibosCliente Left = 192 Top = 88 end + object bpRecibosCompensados: TDABusinessProcessor + Schema = schRecibosCliente + InsertCommandName = 'Insert_RecibosCompensados' + DeleteCommandName = 'Delete_RecibosCompensados' + UpdateCommandName = 'Update_RecibosCompensados' + ReferencedDataset = 'RecibosCompensados' + ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands] + UpdateMode = updWhereKeyOnly + Left = 192 + Top = 152 + end end diff --git a/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.pas b/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.pas index 4c9ceb1f..ade315a7 100644 --- a/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.pas +++ b/Source/Modulos/Recibos de cliente/Servidor/srvRecibosCliente_Impl.pas @@ -27,6 +27,7 @@ type DABINAdapter: TDABINAdapter; bpRecibosCliente: TDABusinessProcessor; bpPagosCliente: TDABusinessProcessor; + bpRecibosCompensados: TDABusinessProcessor; schRecibosCliente: TDASchema; DADataDictionary: TDADataDictionary; procedure DARemoteServiceBeforeAcquireConnection(Sender: TDARemoteService; diff --git a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dpk b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dpk index 71be4e52..96df6caf 100644 --- a/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dpk +++ b/Source/Modulos/Recibos de cliente/Views/RecibosCliente_view.dpk @@ -95,6 +95,8 @@ contains uViewPagosCliente in 'uViewPagosCliente.pas' {frViewPagosCliente: TFrame}, uEditorElegirRecibosCliente in 'uEditorElegirRecibosCliente.pas' {fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente}, uEditorFechaPago in 'uEditorFechaPago.pas' {fEditorFechaPago}, - uEditorReciboClienteReport in 'uEditorReciboClienteReport.pas' {fEditorReciboClienteReport: TfEditorReciboClienteReport}; + uEditorReciboClienteReport in 'uEditorReciboClienteReport.pas' {fEditorReciboClienteReport: TfEditorReciboClienteReport}, + uViewRecibosCompensados in 'uViewRecibosCompensados.pas' {frViewRecibosCompensados: TFrame}, + uViewReciboImportes in 'uViewReciboImportes.pas' {frViewReciboImportes: TFrame}; end. diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorElegirRecibosCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uEditorElegirRecibosCliente.dfm index 8e6c23bf..00f7309b 100644 --- a/Source/Modulos/Recibos de cliente/Views/uEditorElegirRecibosCliente.dfm +++ b/Source/Modulos/Recibos de cliente/Views/uEditorElegirRecibosCliente.dfm @@ -1,8 +1,8 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente Caption = 'Seleccionar recibos de cliente' ClientWidth = 654 + ExplicitTop = -94 ExplicitWidth = 662 - ExplicitHeight = 240 PixelsPerInch = 96 TextHeight = 13 object JvgWizardHeader1: TJvgWizardHeader [0] @@ -52,12 +52,10 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente inherited TBXDock: TTBXDock Top = 171 Width = 654 - Height = 49 ExplicitTop = 171 ExplicitWidth = 654 - ExplicitHeight = 49 inherited tbxMain: TTBXToolbar - ExplicitWidth = 117 + ExplicitWidth = 126 inherited TBXItem5: TTBXItem Visible = False end @@ -69,12 +67,12 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente end end inherited tbxFiltro: TTBXToolbar - Left = 117 + Left = 126 Top = 23 DockPos = 104 DockRow = 1 Visible = False - ExplicitLeft = 117 + ExplicitLeft = 126 ExplicitTop = 23 inherited TBXItem34: TTBXItem Action = actQuitarFiltro2 @@ -83,10 +81,15 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente inherited tbxMenu: TTBXToolbar ExplicitWidth = 654 end + inherited TBXTMain2: TTBXToolbar + Left = 334 + ExplicitLeft = 334 + end end inherited StatusBar: TJvStatusBar Top = 506 Width = 654 + ExplicitTop = 506 ExplicitWidth = 654 end inline frViewBarraSeleccion1: TfrViewBarraSeleccion [4] @@ -135,18 +138,18 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente end end inherited frViewRecibosCliente1: TfrViewRecibosCliente [5] - Top = 220 + Top = 246 Width = 654 - Height = 286 - ExplicitTop = 220 + Height = 260 + ExplicitTop = 246 ExplicitWidth = 654 - ExplicitHeight = 286 + ExplicitHeight = 260 inherited cxGrid: TcxGrid Width = 654 - Height = 158 + Height = 132 RootLevelOptions.DetailTabsPosition = dtpNone ExplicitWidth = 654 - ExplicitHeight = 389 + ExplicitHeight = 132 inherited cxGridView: TcxGridDBTableView DataController.Summary.FooterSummaryItems = < item @@ -158,6 +161,12 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente Kind = skCount Column = frViewRecibosCliente1.cxGridViewFECHA_EMISION end> + inherited cxGridViewID_RECIBO_COMPENSADO: TcxGridDBColumn + Visible = False + end + inherited cxGridViewREFERENCIA_REC_COMPENSADO: TcxGridDBColumn + Visible = False + end end end inherited frViewFiltroBase1: TfrViewFiltroBase @@ -170,15 +179,45 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente ExplicitWidth = 654 inherited dxLayoutControl1: TdxLayoutControl Width = 650 + ExplicitWidth = 650 + inherited txtFiltroTodo: TcxTextEdit + ExplicitWidth = 393 + Width = 393 + end + inherited edtFechaIniFiltro: TcxDateEdit + ExplicitWidth = 199 + Width = 199 + end + inherited edtFechaFinFiltro: TcxDateEdit + Left = 466 + ExplicitLeft = 466 + ExplicitWidth = 121 + Width = 121 + end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 650 + ExplicitWidth = 650 + inherited tbxBotones: TTBXToolbar + Width = 640 + ExplicitWidth = 640 + end end end end end inherited pnlAgrupaciones: TTBXDockablePanel - Top = 260 + Top = 234 + ExplicitTop = 234 + ExplicitWidth = 654 + inherited TBXAlignmentPanel1: TTBXAlignmentPanel + Width = 654 + ExplicitWidth = 654 + inherited TBXToolbar1: TTBXToolbar + Width = 644 + ExplicitWidth = 644 + end + end end inherited dxComponentPrinter: TdxComponentPrinter inherited dxComponentPrinterLink: TdxGridReportLink @@ -214,7 +253,6 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente ShowCaptionWhenDocked = False SupportedDocks = [dkStandardDock, dkMultiDock] TabOrder = 5 - ExplicitWidth = 128 object Label1: TLabel Left = 296 Top = 50 diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm index d62948be..00d84f0c 100644 --- a/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm +++ b/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.dfm @@ -1,10 +1,11 @@ inherited fEditorReciboCliente: TfEditorReciboCliente Caption = 'Recibo de cliente' - ClientHeight = 596 + ClientHeight = 530 ClientWidth = 691 OnClose = CustomEditorClose + ExplicitLeft = -64 ExplicitWidth = 699 - ExplicitHeight = 630 + ExplicitHeight = 564 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader @@ -42,7 +43,7 @@ inherited fEditorReciboCliente: TfEditorReciboCliente Width = 691 ExplicitWidth = 691 inherited tbxMain: TTBXToolbar - ExplicitWidth = 419 + ExplicitWidth = 425 end inherited tbxMenu: TTBXToolbar ExplicitWidth = 691 @@ -50,14 +51,15 @@ inherited fEditorReciboCliente: TfEditorReciboCliente end inherited pgPaginas: TPageControl Width = 691 - Height = 501 + Height = 335 + ActivePage = pagCompensados ExplicitWidth = 691 - ExplicitHeight = 501 + ExplicitHeight = 335 inherited pagGeneral: TTabSheet ExplicitLeft = 4 ExplicitTop = 24 ExplicitWidth = 683 - ExplicitHeight = 473 + ExplicitHeight = 307 inline frViewReciboCliente1: TfrViewReciboCliente Left = 0 Top = 0 @@ -78,81 +80,70 @@ inherited fEditorReciboCliente: TfEditorReciboCliente Width = 683 Height = 335 ExplicitWidth = 683 - ExplicitHeight = 321 + ExplicitHeight = 335 DesignSize = ( 683 335) - inherited Bevel1: TBevel - Width = 210 - ExplicitWidth = 210 - end inherited eReferencia: TcxDBTextEdit - ExplicitWidth = 50 - Width = 50 + ExplicitWidth = 217 + Width = 217 end inherited eSituacion: TcxDBTextEdit - ExplicitWidth = 216 - Width = 216 + ExplicitWidth = 217 + Width = 217 end inherited edtFechaVencimiento: TcxDBDateEdit - ExplicitWidth = 216 - Width = 216 + ExplicitWidth = 217 + Width = 217 end inherited memObservaciones: TcxDBMemo - Left = 321 - ExplicitLeft = 321 - ExplicitWidth = 211 + ExplicitWidth = 293 ExplicitHeight = 44 Height = 44 - Width = 211 - end - inherited eImporte: TcxDBCurrencyEdit - Properties.OnValidate = frViewReciboCliente1eImportePropertiesValidate - ExplicitWidth = 111 - Width = 111 + Width = 293 end inherited eFechaEmision: TcxDBTextEdit - Left = 397 - ExplicitLeft = 397 - ExplicitWidth = 20 - Width = 20 + Left = 441 + ExplicitLeft = 441 + ExplicitWidth = 253 + Width = 253 end inherited eFormaPago: TcxDBTextEdit - Left = 397 - ExplicitLeft = 397 - ExplicitWidth = 42 - Width = 42 + Left = 441 + ExplicitLeft = 441 + ExplicitWidth = 253 + Width = 253 end inherited eImporteTotal: TcxDBCurrencyEdit - Left = 397 + Left = 441 Style.IsFontAssigned = True - ExplicitLeft = 397 - ExplicitWidth = 182 - Width = 182 + ExplicitLeft = 441 + ExplicitWidth = 253 + Width = 253 end inherited eNombreCliente: TcxDBTextEdit - Left = 397 - ExplicitLeft = 397 - ExplicitWidth = 171 - Width = 171 + Left = 441 + ExplicitLeft = 441 + ExplicitWidth = 286 + Width = 286 end inherited eNifCif: TcxDBTextEdit - Left = 397 - ExplicitLeft = 397 - ExplicitWidth = 147 - Width = 147 + Left = 441 + ExplicitLeft = 441 + ExplicitWidth = 286 + Width = 286 end inherited eEntidad: TcxDBTextEdit - Left = 397 - ExplicitLeft = 397 - ExplicitWidth = 101 - Width = 101 + Left = 441 + ExplicitLeft = 441 + ExplicitWidth = 84 + Width = 84 end inherited eSucursal: TcxDBTextEdit - Left = 524 - ExplicitLeft = 524 - ExplicitWidth = 94 - Width = 94 + Left = 544 + ExplicitLeft = 544 + ExplicitWidth = 81 + Width = 81 end inherited eDC: TcxDBTextEdit Left = 624 @@ -161,39 +152,35 @@ inherited fEditorReciboCliente: TfEditorReciboCliente Width = 37 end inherited eCuenta: TcxDBTextEdit - Left = 397 - ExplicitLeft = 397 - ExplicitWidth = 83 - Width = 83 + Left = 441 + ExplicitLeft = 441 + ExplicitWidth = 286 + Width = 286 end inherited eRemesa: TcxDBTextEdit - ExplicitWidth = 113 - Width = 113 - end - inherited eOtrosGastos: TcxDBCurrencyEdit - ExplicitWidth = 111 - Width = 111 - end - inherited eImporteTotalRecibo: TcxCurrencyEdit - ParentFont = False - Properties.Alignment.Horz = taRightJustify - Style.Font.Style = [fsBold] - Style.IsFontAssigned = True - ExplicitWidth = 111 - Width = 111 + ExplicitWidth = 217 + Width = 217 end inherited edtFechaEmision: TcxDBDateEdit DataBinding.DataField = 'FECHA_EMISION' - ExplicitWidth = 193 - Width = 193 + ExplicitWidth = 217 + Width = 217 + end + inherited rRefReciboCompensado: TcxDBTextEdit + ExplicitWidth = 191 + Width = 191 end end end + end + object pagPagos: TTabSheet + Caption = 'Pagos' + ImageIndex = 2 inline frViewPagosCliente1: TfrViewPagosCliente Left = 0 - Top = 335 + Top = 0 Width = 683 - Height = 138 + Height = 307 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -201,22 +188,21 @@ inherited fEditorReciboCliente: TfEditorReciboCliente Font.Name = 'Tahoma' Font.Style = [] ParentFont = False - TabOrder = 1 + TabOrder = 0 ReadOnly = False - ExplicitTop = 340 ExplicitWidth = 683 - ExplicitHeight = 133 + ExplicitHeight = 307 inherited dxLayoutControl1: TdxLayoutControl Width = 683 - Height = 138 + Height = 307 ExplicitWidth = 683 - ExplicitHeight = 133 + ExplicitHeight = 307 end inherited dxLayoutControl2: TdxLayoutControl Width = 683 - Height = 138 + Height = 307 ExplicitWidth = 683 - ExplicitHeight = 133 + ExplicitHeight = 307 inherited ToolBar1: TToolBar Width = 666 ExplicitWidth = 666 @@ -236,6 +222,7 @@ inherited fEditorReciboCliente: TfEditorReciboCliente inherited ActionListContenido: TActionList inherited actAnadir: TAction OnExecute = frViewPagosCliente1actAnadirExecute + OnUpdate = frViewPagosCliente1actAnadirUpdate end inherited actModificar: TAction OnExecute = frViewPagosCliente1actModificarExecute @@ -248,18 +235,93 @@ inherited fEditorReciboCliente: TfEditorReciboCliente end end end + object pagCompensados: TTabSheet + Caption = 'Recibos compensados' + ImageIndex = 1 + inline frViewRecibosCompensados1: TfrViewRecibosCompensados + Left = 0 + Top = 0 + Width = 683 + Height = 307 + Align = alClient + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 0 + ReadOnly = False + ExplicitWidth = 683 + ExplicitHeight = 307 + inherited cxGrid: TcxGrid + Width = 683 + Height = 282 + ExplicitWidth = 683 + ExplicitHeight = 282 + inherited cxGridView: TcxGridDBTableView + DataController.Summary.FooterSummaryItems = < + item + Format = ',0.00 '#8364';-,0.00 '#8364 + Kind = skSum + Column = frViewRecibosCompensados1.cxGridViewIMPORTE_TOTAL + end> + DataController.Summary.OnAfterSummary = frViewRecibosCompensados1cxGridViewDataControllerSummaryAfterSummary + end + end + inherited ToolBar1: TToolBar + Width = 683 + ExplicitWidth = 683 + end + end + end end inherited StatusBar: TJvStatusBar - Top = 577 + Top = 511 Width = 691 Panels = < item Width = 200 end> - ExplicitTop = 577 + ExplicitTop = 511 ExplicitWidth = 691 end - inherited EditorActionList: TActionList + inline frViewReciboImportes1: TfrViewReciboImportes [4] + Left = 0 + Top = 411 + Width = 691 + Height = 100 + Align = alBottom + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 4 + ReadOnly = False + ExplicitTop = 411 + ExplicitWidth = 691 + inherited dxLayoutControl1: TdxLayoutControl + Width = 691 + ExplicitWidth = 691 + inherited eImporte: TcxDBCurrencyEdit + DataBinding.DataSource = dsDataTable + Properties.OnEditValueChanged = frViewReciboImportes1eImportePropertiesEditValueChanged + ExplicitWidth = 150 + Width = 150 + end + inherited eOtrosGastos: TcxDBCurrencyEdit + DataBinding.DataSource = dsDataTable + Properties.OnEditValueChanged = frViewReciboImportes1eImportePropertiesEditValueChanged + end + inherited eImporteTotalRecibo: TcxCurrencyEdit + ExplicitWidth = 183 + Width = 183 + end + end + end + inherited EditorActionList: TActionList [5] Top = 96 inherited actNuevo: TAction Enabled = False @@ -274,13 +336,19 @@ inherited fEditorReciboCliente: TfEditorReciboCliente Visible = False end end - inherited JvFormStorage: TJvFormStorage + inherited SmallImages: TPngImageList [6] + end + inherited LargeImages: TPngImageList [7] + end + inherited JvFormStorage: TJvFormStorage [8] OnSavePlacement = JvFormStorageSavePlacement OnRestorePlacement = JvFormStorageRestorePlacement end - inherited dsDataTable: TDADataSource + inherited dsDataTable: TDADataSource [9] Left = 8 - Top = 136 + Top = 168 + end + inherited JvAppRegistryStorage: TJvAppRegistryStorage [10] end object DADataSource1: TDADataSource OnDataChange = dsDataTableDataChange diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.pas b/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.pas index 9b4e3d73..eea947b2 100644 --- a/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.pas +++ b/Source/Modulos/Recibos de cliente/Views/uEditorReciboCliente.pas @@ -9,13 +9,18 @@ uses ComCtrls, JvExComCtrls, JvStatusBar, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, JvNavigationPane, uIEditorReciboCliente, uCustomView, uViewBase, uViewReciboCliente, uRecibosClienteController, - uBizRecibosCliente, uViewPagosCliente, dxLayoutLookAndFeels; + uBizRecibosCliente, uViewPagosCliente, dxLayoutLookAndFeels, cxCustomData, + uViewDetallesGenerico, uViewRecibosCompensados, uViewReciboImportes; type TfEditorReciboCliente = class(TfEditorDBItem, IEditorReciboCliente) DADataSource1: TDADataSource; frViewReciboCliente1: TfrViewReciboCliente; + pagCompensados: TTabSheet; + pagPagos: TTabSheet; frViewPagosCliente1: TfrViewPagosCliente; + frViewReciboImportes1: TfrViewReciboImportes; + frViewRecibosCompensados1: TfrViewRecibosCompensados; procedure FormShow(Sender: TObject); procedure dsDataTableDataChange(Sender: TObject; Field: TField); procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction); @@ -32,6 +37,9 @@ type procedure DeshabilitarRecibo; procedure JvFormStorageRestorePlacement(Sender: TObject); procedure JvFormStorageSavePlacement(Sender: TObject); + procedure frViewReciboImportes1eImportePropertiesEditValueChanged(Sender: TObject); + procedure frViewRecibosCompensados1cxGridViewDataControllerSummaryAfterSummary(ASender: TcxDataSummary); + procedure frViewPagosCliente1actAnadirUpdate(Sender: TObject); private FController : IRecibosClienteController; @@ -46,6 +54,7 @@ type function GetViewRecibo: IViewReciboCliente; procedure SetViewRecibo(const Value: IViewReciboCliente); property ViewRecibo: IViewReciboCliente read GetViewRecibo write SetViewRecibo; + procedure CalcularTotal; protected procedure PrevisualizarInterno; override; @@ -65,6 +74,18 @@ uses schRecibosClienteClient_Intf, uEditorFechaPago, uEditorBase; {$R *.dfm} +procedure TfEditorReciboCliente.CalcularTotal; +var + ImporteAux: Double; +begin + + ImporteAux := 0; + if not VarIsNull(frViewRecibosCompensados1.cxGridView.DataController.Summary.FooterSummaryValues[0]) then + ImporteAux := frViewRecibosCompensados1.cxGridView.DataController.Summary.FooterSummaryValues[0]; + + frViewReciboImportes1.eImporteTotalRecibo.Value := frViewReciboImportes1.eImporte.Value + frViewReciboImportes1.eOtrosGastos.Value + ImporteAux; +end; + constructor TfEditorReciboCliente.Create(AOwner: TComponent); begin inherited; @@ -85,8 +106,8 @@ end; procedure TfEditorReciboCliente.DeshabilitarRecibo; begin frViewReciboCliente1.edtFechaVencimiento.Enabled := False; - frViewReciboCliente1.eImporte.Enabled := False; - frViewReciboCliente1.eOtrosGastos.Enabled := False; + frViewReciboImportes1.eImporte.Enabled := False; + frViewReciboImportes1.eOtrosGastos.Enabled := False; end; procedure TfEditorReciboCliente.dsDataTableDataChange(Sender: TObject; Field: TField); @@ -109,20 +130,28 @@ begin raise Exception.Create('No hay ningún almacén asignado'); Recibo.DataTable.Active := True; + CalcularTotal; end; procedure TfEditorReciboCliente.frViewPagosCliente1actAnadirExecute(Sender: TObject); begin inherited; - //En el caso de haber ańadido el cobro del recibo ya no podremos modificarlo - if FController.AnadirPago(Recibo) then + FController.AnadirPago(Recibo); + + //Solo podremos modificar el recibo si esta pendiente o devuelto + if (Recibo.SITUACION = CTE_COBRADO) then DeshabilitarRecibo - //Podremos modificar si anulamos el cobro mediante una devolución else HabilitarRecibo; end; +procedure TfEditorReciboCliente.frViewPagosCliente1actAnadirUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Enabled := not (Recibo.ID_RECIBO_COMPENSADO > 0); +end; + procedure TfEditorReciboCliente.frViewPagosCliente1actEliminarExecute(Sender: TObject); begin inherited; @@ -178,14 +207,27 @@ procedure TfEditorReciboCliente.frViewReciboCliente1eImportePropertiesValidate( begin inherited; - if (DisplayValue > frViewReciboCliente1.eImporte.DataBinding.Field.Value) then + if (DisplayValue > frViewReciboImportes1.eImporte.DataBinding.Field.Value) then begin - DisplayValue := frViewReciboCliente1.eImporte.DataBinding.Field.Value; + DisplayValue := frViewReciboImportes1.eImporte.DataBinding.Field.Value; ErrorText := 'El importe debe ser menor o igual que el actual'; Error := True; end; end; +procedure TfEditorReciboCliente.frViewReciboImportes1eImportePropertiesEditValueChanged( + Sender: TObject); +begin + inherited; + CalcularTotal; +end; + +procedure TfEditorReciboCliente.frViewRecibosCompensados1cxGridViewDataControllerSummaryAfterSummary(ASender: TcxDataSummary); +begin + inherited; + CalcularTotal; +end; + function TfEditorReciboCliente.GetController: IRecibosClienteController; begin Result := FController; @@ -214,8 +256,8 @@ begin if (Length(FRecibo.REFERENCIA_REMESA) = 0) then begin frViewReciboCliente1.edtFechaVencimiento.Enabled := True; - frViewReciboCliente1.eImporte.Enabled := True; - frViewReciboCliente1.eOtrosGastos.Enabled := True; + frViewReciboImportes1.eImporte.Enabled := True; + frViewReciboImportes1.eOtrosGastos.Enabled := True; end; end; @@ -247,6 +289,12 @@ begin FTitulo := 'Nuevo recibo de cliente' else FTitulo := 'Recibo de cliente'; + + if (Recibo.ID_RECIBO_COMPENSADO > 0) then + FTitulo := FTitulo + ' (compensado)'; + + if Length(Recibo.NOMBRE_CLIENTE) > 0 then + FTitulo := FTitulo + ' - ' + Recibo.NOMBRE_CLIENTE; end; inherited PonerTitulos(FTitulo); @@ -261,7 +309,8 @@ end; procedure TfEditorReciboCliente.SetController(const Value: IRecibosClienteController); begin FController := Value; -// if Assigned(FController) then + if Assigned(FController) then + frViewRecibosCompensados1.Controller := FController; // (ViewRecibo as IViewReciboCliente).Controller := (FController as IRecibosClienteController); end; @@ -274,6 +323,7 @@ begin begin FViewRecibo.Recibo := Recibo; frViewPagosCliente1.Pagos := Recibo.Pagos; + frViewRecibosCompensados1.ReciboCliente := FRecibo; if (FRecibo.SITUACION = CTE_COBRADO) then DeshabilitarRecibo diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorRecibosCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uEditorRecibosCliente.dfm index 3749f246..6a075c0a 100644 --- a/Source/Modulos/Recibos de cliente/Views/uEditorRecibosCliente.dfm +++ b/Source/Modulos/Recibos de cliente/Views/uEditorRecibosCliente.dfm @@ -9,7 +9,7 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente inherited JvNavPanelHeader: TJvNavPanelHeader Width = 645 Caption = 'Lista de recibos de cliente' - ExplicitWidth = 638 + ExplicitWidth = 645 inherited Image1: TImage Left = 618 Picture.Data = { @@ -39,9 +39,9 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente end inherited TBXDock: TTBXDock Width = 645 - ExplicitWidth = 638 + ExplicitWidth = 645 inherited tbxMain: TTBXToolbar - ExplicitWidth = 425 + ExplicitWidth = 434 end inherited tbxMenu: TTBXToolbar ExplicitWidth = 645 @@ -50,8 +50,8 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente inherited StatusBar: TJvStatusBar Top = 542 Width = 645 - ExplicitTop = 645 - ExplicitWidth = 638 + ExplicitTop = 542 + ExplicitWidth = 645 end inline frViewRecibosCliente1: TfrViewRecibosCliente [3] Left = 0 @@ -68,13 +68,13 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente TabOrder = 0 ReadOnly = False ExplicitTop = 102 - ExplicitWidth = 638 - ExplicitHeight = 543 + ExplicitWidth = 645 + ExplicitHeight = 440 inherited cxGrid: TcxGrid Width = 645 Height = 312 - ExplicitWidth = 638 - ExplicitHeight = 415 + ExplicitWidth = 645 + ExplicitHeight = 312 inherited cxGridView: TcxGridDBTableView DataController.Summary.DefaultGroupSummaryItems = < item @@ -96,15 +96,15 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente end inherited frViewFiltroBase1: TfrViewFiltroBase Width = 645 - ExplicitWidth = 638 + ExplicitWidth = 645 inherited TBXDock1: TTBXDock Width = 645 - ExplicitWidth = 638 + ExplicitWidth = 645 inherited TBXDockablePanel1: TTBXDockablePanel ExplicitWidth = 645 inherited dxLayoutControl1: TdxLayoutControl Width = 641 - ExplicitWidth = 634 + ExplicitWidth = 641 inherited edtFechaIniFiltro: TcxDateEdit ExplicitWidth = 199 Width = 199 @@ -118,10 +118,10 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 641 - ExplicitWidth = 634 + ExplicitWidth = 641 inherited tbxBotones: TTBXToolbar Width = 631 - ExplicitWidth = 624 + ExplicitWidth = 631 end end end @@ -129,14 +129,14 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente end inherited pnlAgrupaciones: TTBXDockablePanel Top = 414 - ExplicitTop = 517 - ExplicitWidth = 638 + ExplicitTop = 414 + ExplicitWidth = 645 inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 645 - ExplicitWidth = 638 + ExplicitWidth = 645 inherited TBXToolbar1: TTBXToolbar Width = 635 - ExplicitWidth = 628 + ExplicitWidth = 635 end end end diff --git a/Source/Modulos/Recibos de cliente/Views/uViewReciboCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uViewReciboCliente.dfm index c825d320..a7bb7656 100644 --- a/Source/Modulos/Recibos de cliente/Views/uViewReciboCliente.dfm +++ b/Source/Modulos/Recibos de cliente/Views/uViewReciboCliente.dfm @@ -1,28 +1,22 @@ inherited frViewReciboCliente: TfrViewReciboCliente Width = 690 - Height = 332 + Height = 307 ExplicitWidth = 690 - ExplicitHeight = 332 + ExplicitHeight = 307 object dxLayoutControl1: TdxLayoutControl Left = 0 Top = 0 Width = 690 - Height = 332 + Height = 307 Align = alClient ParentBackground = True TabOrder = 0 AutoContentSizes = [acsWidth, acsHeight] LookAndFeel = dxLayoutOfficeLookAndFeel1 + ExplicitHeight = 259 DesignSize = ( 690 - 332) - object Bevel1: TBevel - Left = 120 - Top = 243 - Width = 210 - Height = 9 - Shape = bsBottomLine - end + 307) object eReferencia: TcxDBTextEdit Left = 120 Top = 30 @@ -98,8 +92,8 @@ inherited frViewReciboCliente: TfrViewReciboCliente Width = 129 end object memObservaciones: TcxDBMemo - Left = 331 - Top = 272 + Left = 22 + Top = 240 Anchors = [akLeft, akTop, akRight, akBottom] DataBinding.DataField = 'OBSERVACIONES' DataBinding.DataSource = DADataSource @@ -111,37 +105,12 @@ inherited frViewReciboCliente: TfrViewReciboCliente StyleDisabled.LookAndFeel.NativeStyle = True StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 17 + TabOrder = 6 Height = 49 Width = 274 end - object eImporte: TcxDBCurrencyEdit - Left = 120 - Top = 189 - AutoSize = False - DataBinding.DataField = 'IMPORTE' - DataBinding.DataSource = DADataSource - Properties.Alignment.Horz = taRightJustify - Properties.ReadOnly = False - Properties.UseLeftAlignmentOnEditing = False - Properties.UseThousandSeparator = True - Properties.OnEditValueChanged = eImportePropertiesEditValueChanged - Style.BorderColor = clWindowFrame - Style.BorderStyle = ebs3D - Style.Color = clInfoBk - Style.HotTrack = False - Style.LookAndFeel.NativeStyle = True - Style.TextColor = clWindowText - StyleDisabled.LookAndFeel.NativeStyle = True - StyleDisabled.TextColor = clWindowText - StyleFocused.LookAndFeel.NativeStyle = True - StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 5 - Height = 21 - Width = 194 - end object eFechaEmision: TcxDBTextEdit - Left = 407 + Left = 440 Top = 30 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_FACTURA' @@ -163,11 +132,11 @@ inherited frViewReciboCliente: TfrViewReciboCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 8 + TabOrder = 7 Width = 20 end object eFormaPago: TcxDBTextEdit - Left = 407 + Left = 440 Top = 57 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FORMA_PAGO_FACTURA' @@ -189,11 +158,11 @@ inherited frViewReciboCliente: TfrViewReciboCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 9 + TabOrder = 8 Width = 42 end object eImporteTotal: TcxDBCurrencyEdit - Left = 407 + Left = 440 Top = 84 AutoSize = False DataBinding.DataField = 'IMPORTE_FACTURA' @@ -220,12 +189,12 @@ inherited frViewReciboCliente: TfrViewReciboCliente StyleDisabled.TextColor = clWindowText StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 10 + TabOrder = 9 Height = 21 Width = 182 end object eNombreCliente: TcxDBTextEdit - Left = 407 + Left = 440 Top = 167 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'NOMBRE_CLIENTE' @@ -247,11 +216,11 @@ inherited frViewReciboCliente: TfrViewReciboCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 12 + TabOrder = 11 Width = 171 end object eNifCif: TcxDBTextEdit - Left = 407 + Left = 440 Top = 140 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'NIF_CIF_CLIENTE' @@ -273,11 +242,11 @@ inherited frViewReciboCliente: TfrViewReciboCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 11 + TabOrder = 10 Width = 147 end object eEntidad: TcxDBTextEdit - Left = 407 + Left = 440 Top = 194 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'ENTIDAD_CLIENTE' @@ -299,11 +268,11 @@ inherited frViewReciboCliente: TfrViewReciboCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 13 + TabOrder = 12 Width = 90 end object eSucursal: TcxDBTextEdit - Left = 530 + Left = 554 Top = 194 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'SUCURSAL_CLIENTE' @@ -325,11 +294,11 @@ inherited frViewReciboCliente: TfrViewReciboCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 14 + TabOrder = 13 Width = 75 end object eDC: TcxDBTextEdit - Left = 618 + Left = 635 Top = 194 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'DC_CLIENTE' @@ -351,11 +320,11 @@ inherited frViewReciboCliente: TfrViewReciboCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 15 + TabOrder = 14 Width = 33 end object eCuenta: TcxDBTextEdit - Left = 407 + Left = 440 Top = 221 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'CUENTA_CLIENTE' @@ -377,7 +346,7 @@ inherited frViewReciboCliente: TfrViewReciboCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 16 + TabOrder = 15 Width = 83 end object eRemesa: TcxDBTextEdit @@ -406,46 +375,6 @@ inherited frViewReciboCliente: TfrViewReciboCliente TabOrder = 4 Width = 113 end - object eOtrosGastos: TcxDBCurrencyEdit - Left = 120 - Top = 216 - AutoSize = False - DataBinding.DataField = 'OTROS_GASTOS' - DataBinding.DataSource = DADataSource - Properties.Alignment.Horz = taRightJustify - Properties.ReadOnly = False - Properties.UseLeftAlignmentOnEditing = False - Properties.UseThousandSeparator = True - Properties.OnEditValueChanged = eImportePropertiesEditValueChanged - Style.BorderColor = clWindowFrame - Style.BorderStyle = ebs3D - Style.Color = clWindow - Style.HotTrack = False - Style.LookAndFeel.NativeStyle = True - Style.TextColor = clWindowText - StyleDisabled.LookAndFeel.NativeStyle = True - StyleDisabled.TextColor = clWindowText - StyleFocused.LookAndFeel.NativeStyle = True - StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 6 - Height = 21 - Width = 111 - end - object eImporteTotalRecibo: TcxCurrencyEdit - Left = 120 - Top = 263 - Enabled = False - Style.BorderColor = clWindowFrame - Style.BorderStyle = ebs3D - Style.HotTrack = False - Style.LookAndFeel.NativeStyle = True - Style.TextStyle = [fsBold] - StyleDisabled.LookAndFeel.NativeStyle = True - StyleFocused.LookAndFeel.NativeStyle = True - StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 7 - Width = 121 - end object edtFechaEmision: TcxDBDateEdit Left = 120 Top = 57 @@ -471,14 +400,38 @@ inherited frViewReciboCliente: TfrViewReciboCliente TabOrder = 1 Width = 113 end + object rRefReciboCompensado: TcxDBTextEdit + Left = 120 + Top = 189 + Anchors = [akLeft, akTop, akRight] + DataBinding.DataField = 'REFERENCIA_REC_COMPENSADO' + DataBinding.DataSource = DADataSource + Enabled = False + Properties.ReadOnly = False + Properties.ValidateOnEnter = True + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.Color = clInfoBk + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + StyleDisabled.Color = clMenuBar + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 5 + Width = 191 + end object dxLayoutControl1Group_Root: TdxLayoutGroup ShowCaption = False Hidden = True LayoutDirection = ldHorizontal ShowBorder = False - object dxLayoutControl1Group2: TdxLayoutGroup - AutoAligns = [aaVertical] - AlignHorz = ahClient + object dxLayoutControl1Group3: TdxLayoutGroup ShowCaption = False Hidden = True ShowBorder = False @@ -518,28 +471,22 @@ inherited frViewReciboCliente: TfrViewReciboCliente ControlOptions.ShowBorder = False end end - object dxLayoutControl1Group9: TdxLayoutGroup - Caption = 'Importe del recibo' - object dxLayoutControl1Item6: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahClient - Caption = 'Importe:' - Control = eImporte - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item17: TdxLayoutItem - Caption = 'Otros gastos:' - Control = eOtrosGastos - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item18: TdxLayoutItem - Caption = ' ' - Control = Bevel1 - ControlOptions.ShowBorder = False - end + object dxLayoutControl1Group2: TdxLayoutGroup + Caption = 'Compensado en recibo' object dxLayoutControl1Item4: TdxLayoutItem - Caption = 'Importe total:' - Control = eImporteTotalRecibo + Caption = 'Ref. recibo:' + Control = rRefReciboCompensado + ControlOptions.ShowBorder = False + end + end + object dxLayoutControl1Group7: TdxLayoutGroup + Caption = 'Observaciones' + object dxLayoutControl1Item5: TdxLayoutItem + AutoAligns = [aaHorizontal] + AlignVert = avClient + Caption = 'Observaciones:' + ShowCaption = False + Control = memObservaciones ControlOptions.ShowBorder = False end end @@ -572,73 +519,57 @@ inherited frViewReciboCliente: TfrViewReciboCliente ControlOptions.ShowBorder = False end end - object dxLayoutControl1Group3: TdxLayoutGroup - ShowCaption = False - Hidden = True - ShowBorder = False - object dxLayoutControl1Group6: TdxLayoutGroup - AutoAligns = [aaHorizontal] - AlignVert = avClient - Caption = 'Datos del cliente' - Offsets.Top = 5 - object dxLayoutControl1Item11: TdxLayoutItem - Caption = 'NIF/CIF:' - Control = eNifCif - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item10: TdxLayoutItem - Caption = 'Nombre:' - Control = eNombreCliente - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Group4: TdxLayoutGroup + object dxLayoutControl1Group6: TdxLayoutGroup + AutoAligns = [aaHorizontal] + AlignVert = avClient + Caption = 'Datos del cliente' + Offsets.Top = 5 + object dxLayoutControl1Item11: TdxLayoutItem + Caption = 'NIF/CIF:' + Control = eNifCif + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item10: TdxLayoutItem + Caption = 'Nombre:' + Control = eNombreCliente + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Group4: TdxLayoutGroup + ShowCaption = False + Hidden = True + ShowBorder = False + object dxLayoutControl1Group11: TdxLayoutGroup ShowCaption = False Hidden = True + LayoutDirection = ldHorizontal ShowBorder = False - object dxLayoutControl1Group11: TdxLayoutGroup - ShowCaption = False - Hidden = True - LayoutDirection = ldHorizontal - ShowBorder = False - object dxLayoutControl1Item12: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahClient - Caption = 'Entidad:' - Control = eEntidad - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item13: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahClient - Caption = 'Sucursal:' - Control = eSucursal - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item14: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahRight - Caption = 'DC:' - Control = eDC - ControlOptions.ShowBorder = False - end - end - object dxLayoutControl1Item15: TdxLayoutItem + object dxLayoutControl1Item12: TdxLayoutItem AutoAligns = [aaVertical] AlignHorz = ahClient - Caption = 'C'#243'd. cuenta:' - Control = eCuenta + Caption = 'Entidad:' + Control = eEntidad + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item13: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'Sucursal:' + Control = eSucursal + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item14: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahRight + Caption = 'DC:' + Control = eDC ControlOptions.ShowBorder = False end end - end - object dxLayoutControl1Group7: TdxLayoutGroup - Caption = 'Observaciones' - object dxLayoutControl1Item5: TdxLayoutItem - AutoAligns = [aaHorizontal] - AlignVert = avClient - Caption = 'Observaciones:' - ShowCaption = False - Control = memObservaciones + object dxLayoutControl1Item15: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'C'#243'd. cuenta:' + Control = eCuenta ControlOptions.ShowBorder = False end end diff --git a/Source/Modulos/Recibos de cliente/Views/uViewReciboCliente.pas b/Source/Modulos/Recibos de cliente/Views/uViewReciboCliente.pas index 9ea95657..43826745 100644 --- a/Source/Modulos/Recibos de cliente/Views/uViewReciboCliente.pas +++ b/Source/Modulos/Recibos de cliente/Views/uViewReciboCliente.pas @@ -29,8 +29,6 @@ type edtFechaVencimiento: TcxDBDateEdit; dxLayoutControl1Item5: TdxLayoutItem; memObservaciones: TcxDBMemo; - dxLayoutControl1Item6: TdxLayoutItem; - eImporte: TcxDBCurrencyEdit; dxLayoutControl1Group1: TdxLayoutGroup; dxLayoutControl1Item7: TdxLayoutItem; eFechaEmision: TcxDBTextEdit; @@ -55,23 +53,17 @@ type dxLayoutControl1Group8: TdxLayoutGroup; dxLayoutControl1Item16: TdxLayoutItem; eRemesa: TcxDBTextEdit; - dxLayoutControl1Item17: TdxLayoutItem; - eOtrosGastos: TcxDBCurrencyEdit; dxLayoutControl1Group4: TdxLayoutGroup; - eImporteTotalRecibo: TcxCurrencyEdit; - dxLayoutControl1Item4: TdxLayoutItem; - dxLayoutControl1Group2: TdxLayoutGroup; dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList; dxLayoutOfficeLookAndFeel1: TdxLayoutOfficeLookAndFeel; dxLayoutControl1Group7: TdxLayoutGroup; - dxLayoutControl1Group9: TdxLayoutGroup; - dxLayoutControl1Item18: TdxLayoutItem; - Bevel1: TBevel; dxLayoutControl1Group11: TdxLayoutGroup; dxLayoutControl1Item19: TdxLayoutItem; edtFechaEmision: TcxDBDateEdit; + dxLayoutControl1Item4: TdxLayoutItem; + rRefReciboCompensado: TcxDBTextEdit; + dxLayoutControl1Group2: TdxLayoutGroup; dxLayoutControl1Group3: TdxLayoutGroup; - procedure eImportePropertiesEditValueChanged(Sender: TObject); private FRecibo : IBizRecibosCliente; function GetRecibo: IBizRecibosCliente; @@ -89,12 +81,6 @@ implementation { TfrViewReciboCliente } -procedure TfrViewReciboCliente.eImportePropertiesEditValueChanged(Sender: TObject); -begin - inherited; - eImporteTotalRecibo.Value := eImporte.Value + eOtrosGastos.Value; -end; - function TfrViewReciboCliente.GetRecibo: IBizRecibosCliente; begin Result := FRecibo; diff --git a/Source/Modulos/Recibos de cliente/Views/uViewReciboImportes.dfm b/Source/Modulos/Recibos de cliente/Views/uViewReciboImportes.dfm new file mode 100644 index 00000000..e4ee0c11 --- /dev/null +++ b/Source/Modulos/Recibos de cliente/Views/uViewReciboImportes.dfm @@ -0,0 +1,130 @@ +inherited frViewReciboImportes: TfrViewReciboImportes + Width = 558 + Height = 100 + Align = alBottom + ExplicitWidth = 451 + ExplicitHeight = 100 + object dxLayoutControl1: TdxLayoutControl + AlignWithMargins = True + Left = 0 + Top = 0 + Width = 558 + Height = 217 + Margins.Left = 0 + Margins.Top = 0 + Margins.Right = 0 + Margins.Bottom = 0 + Align = alTop + ParentBackground = True + TabOrder = 0 + AutoContentSizes = [acsWidth, acsHeight] + ExplicitWidth = 451 + object eImporte: TcxDBCurrencyEdit + Left = 93 + Top = 28 + AutoSize = False + DataBinding.DataField = 'IMPORTE' + Properties.Alignment.Horz = taRightJustify + Properties.ReadOnly = False + Properties.UseLeftAlignmentOnEditing = False + Properties.UseThousandSeparator = True + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.Color = clInfoBk + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.TextColor = clWindowText + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 0 + Height = 21 + Width = 150 + end + object eOtrosGastos: TcxDBCurrencyEdit + Left = 93 + Top = 55 + AutoSize = False + DataBinding.DataField = 'OTROS_GASTOS' + Properties.Alignment.Horz = taRightJustify + Properties.ReadOnly = False + Properties.UseLeftAlignmentOnEditing = False + Properties.UseThousandSeparator = True + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.Color = clWindow + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.TextColor = clWindowText + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.TextColor = clWindowText + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 1 + Height = 21 + Width = 183 + end + object eImporteTotalRecibo: TcxCurrencyEdit + Left = 354 + Top = 28 + Enabled = False + Properties.Alignment.Horz = taRightJustify + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.NativeStyle = True + Style.TextStyle = [fsBold] + StyleDisabled.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 2 + Width = 183 + end + object dxLayoutControl1Group_Root: TdxLayoutGroup + ShowCaption = False + Hidden = True + ShowBorder = False + object dxLayoutControl1Group1: TdxLayoutGroup + Caption = 'Importes recibo' + LayoutDirection = ldHorizontal + object dxLayoutControl1Group3: TdxLayoutGroup + ShowCaption = False + Hidden = True + ShowBorder = False + object dxLayoutControl1Item1: TdxLayoutItem + Caption = 'Importe:' + Control = eImporte + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item2: TdxLayoutItem + Caption = 'Otros gastos:' + Control = eOtrosGastos + ControlOptions.ShowBorder = False + end + end + object dxLayoutControl1Item3: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'Importe total:' + Control = eImporteTotalRecibo + ControlOptions.ShowBorder = False + end + end + end + object dxLayoutControl1Group4: TdxLayoutGroup + end + end + object dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList + Left = 40 + Top = 8 + object LookAndFeelIMPORTE_TOTAL: TdxLayoutStandardLookAndFeel + ItemOptions.CaptionOptions.Font.Charset = DEFAULT_CHARSET + ItemOptions.CaptionOptions.Font.Color = clWindowText + ItemOptions.CaptionOptions.Font.Height = -12 + ItemOptions.CaptionOptions.Font.Name = 'Tahoma' + ItemOptions.CaptionOptions.Font.Style = [fsBold] + ItemOptions.CaptionOptions.UseDefaultFont = False + end + end +end diff --git a/Source/Modulos/Recibos de cliente/Views/uViewReciboImportes.pas b/Source/Modulos/Recibos de cliente/Views/uViewReciboImportes.pas new file mode 100644 index 00000000..71b7d53f --- /dev/null +++ b/Source/Modulos/Recibos de cliente/Views/uViewReciboImportes.pas @@ -0,0 +1,37 @@ +unit uViewReciboImportes; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uViewBase, ExtCtrls, StdCtrls, DB, uDADataTable, cxGraphics, + cxTextEdit, cxMaskEdit, cxDropDownEdit, cxDBEdit, cxControls, + cxContainer, cxEdit, cxLabel, cxDBLabel, cxCurrencyEdit, cxSpinEdit, + ComCtrls, dxLayoutControl, dxLayoutLookAndFeels, cxLookupEdit, cxDBLookupEdit, + cxDBLookupComboBox, cxCheckBox; + +type + TfrViewReciboImportes = class(TfrViewBase) + dxLayoutControl1Group_Root: TdxLayoutGroup; + dxLayoutControl1: TdxLayoutControl; + dxLayoutControl1Group1: TdxLayoutGroup; + dxLayoutControl1Group4: TdxLayoutGroup; + dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList; + LookAndFeelIMPORTE_TOTAL: TdxLayoutStandardLookAndFeel; + dxLayoutControl1Item1: TdxLayoutItem; + eImporte: TcxDBCurrencyEdit; + dxLayoutControl1Item2: TdxLayoutItem; + eOtrosGastos: TcxDBCurrencyEdit; + dxLayoutControl1Item3: TdxLayoutItem; + eImporteTotalRecibo: TcxCurrencyEdit; + dxLayoutControl1Group3: TdxLayoutGroup; + public + { Public declarations } + end; + + +implementation + +{$R *.dfm} + +end. diff --git a/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.dfm index e4715978..6eca9de3 100644 --- a/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.dfm +++ b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.dfm @@ -38,6 +38,15 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente DataBinding.FieldName = 'REFERENCIA' Width = 64 end + object cxGridViewID_RECIBO_COMPENSADO: TcxGridDBColumn + Caption = 'Compensado' + DataBinding.FieldName = 'ID_RECIBO_COMPENSADO' + OnCustomDrawCell = cxGridViewID_RECIBO_COMPENSADOCustomDrawCell + end + object cxGridViewREFERENCIA_REC_COMPENSADO: TcxGridDBColumn + Caption = 'Ref. recibo compensado' + DataBinding.FieldName = 'REFERENCIA_REC_COMPENSADO' + end object cxGridViewSITUACION: TcxGridDBColumn Caption = 'Situaci'#243'n' DataBinding.FieldName = 'SITUACION' @@ -150,8 +159,8 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente Width = 199 end inherited edtFechaFinFiltro: TcxDateEdit - Left = 379 - ExplicitLeft = 379 + Left = 327 + ExplicitLeft = 327 end inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited dxLayoutControl1Group1: TdxLayoutGroup @@ -288,6 +297,26 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente 0049454E44AE426082} Name = 'PngImage1' Background = clWindow + end + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 610000000774494D45000000000000000973942E000000097048597300001712 + 0000171201679FD252000001754944415478DA6364C001D6ECBE900CA4E640B9 + 2921AE0673B1A963C4A739C8598FE1DB8FDF0C33966C67505054C06A08232ECD + 3EF6BA0C250B7F315C7FF88F6179E15F86456BF76135841197CD79737F324C4E + E1008BF345BC63B833959561F13A4C4318D13507BBE833E4CEF9C160ACC1C290 + 60C30296734D5FCD70F2A333564318B1D90CD20C02D72E9C04D33C92A60CAFDF + FF6358B8E71B86218CE87E866986D90E738186A92FC397EF0C0C6B8FA21A0232 + E03FBACD5FBEFF07E30A3F36B801323ABE0C3F7FFF67F8FE938161EFC5EF7043 + C00678586B32F8B7FD61887167836BFEF59B81A12E186180A8BA0F58F3E76FFF + 194EDDFE0136A07DDA1AB001C90FEE3F98131BE4C4A092FD9BA12A8A07AC19E4 + 67582C800CE051F0C1D06C636994020F44902171214E0CCA99BF19E25DB8E09A + 91C301161330CDE040448E46649764D85C473160C6114D0CCD581312B221CEFA + 9C589D8D3521E13204047069C69B99608680002ECD380D4036E4C98B77383583 + 000005100EB8572466A60000000049454E44AE426082} + Name = 'PngImage2' + Background = clWindow end> Left = 56 Top = 48 diff --git a/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.pas b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.pas index 350463ea..62090072 100644 --- a/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.pas +++ b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCliente.pas @@ -47,6 +47,8 @@ type actCliente: TAction; TBXItem2: TTBXItem; TBXSeparatorItem1: TTBXSeparatorItem; + cxGridViewREFERENCIA_REC_COMPENSADO: TcxGridDBColumn; + cxGridViewID_RECIBO_COMPENSADO: TcxGridDBColumn; procedure cxGridViewICONOCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); @@ -58,6 +60,9 @@ type var AText: string); procedure actClienteExecute(Sender: TObject); procedure actClienteUpdate(Sender: TObject); + procedure cxGridViewID_RECIBO_COMPENSADOCustomDrawCell( + Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; + AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); private //Filtros relativos a la vista @@ -177,6 +182,22 @@ begin } end; +procedure TfrViewRecibosCliente.cxGridViewID_RECIBO_COMPENSADOCustomDrawCell( + Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; + AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); +var + R : TRect; +begin + inherited; + if not VarIsNull(AViewInfo.Value) then + begin + R := AViewInfo.ContentBounds; + ACanvas.FillRect(R); + ACanvas.DrawImage(PngImageList, R.Left, R.Top, 2); + ADone := True; + end; +end; + procedure TfrViewRecibosCliente.cxGridViewIMPORTE_TOTALGetDisplayText( Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; var AText: string); diff --git a/Source/Modulos/Recibos de cliente/Views/uViewRecibosCompensados.dfm b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCompensados.dfm new file mode 100644 index 00000000..17b62794 --- /dev/null +++ b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCompensados.dfm @@ -0,0 +1,237 @@ +inherited frViewRecibosCompensados: TfrViewRecibosCompensados + Width = 549 + Height = 376 + OnShow = CustomViewShow + ExplicitWidth = 549 + ExplicitHeight = 376 + inherited cxGrid: TcxGrid + Width = 549 + Height = 351 + ExplicitWidth = 549 + ExplicitHeight = 351 + inherited cxGridView: TcxGridDBTableView + DataController.KeyFieldNames = 'RecID' + DataController.Summary.FooterSummaryItems = < + item + Format = ',0.00 '#8364';-,0.00 '#8364 + Kind = skSum + Column = cxGridViewIMPORTE_TOTAL + end> + OptionsCustomize.ColumnMoving = True + OptionsData.Appending = False + OptionsData.CancelOnExit = True + OptionsData.Deleting = False + OptionsData.Editing = False + OptionsData.Inserting = False + OptionsView.Footer = True + OptionsView.GroupFooters = gfAlwaysVisible + object cxGridViewRecId: TcxGridDBColumn [0] + DataBinding.FieldName = 'RecId' + Visible = False + end + object cxGridViewID_RECIBO_COMPENSADO: TcxGridDBColumn + DataBinding.FieldName = 'ID_RECIBO_COMPENSADO' + Visible = False + end + object cxGridViewREFERENCIA: TcxGridDBColumn + Caption = 'Referencia' + DataBinding.FieldName = 'REFERENCIA' + end + object cxGridViewSITUACION: TcxGridDBColumn + Caption = 'Situaci'#243'n' + DataBinding.FieldName = 'SITUACION' + end + object cxGridViewFECHA_EMISION: TcxGridDBColumn + Caption = 'Fecha emisi'#243'n' + DataBinding.FieldName = 'FECHA_EMISION' + end + object cxGridViewFECHA_VENCIMIENTO: TcxGridDBColumn + Caption = 'Fecha vencimiento' + DataBinding.FieldName = 'FECHA_VENCIMIENTO' + end + object cxGridViewNIF_CIF_CLIENTE: TcxGridDBColumn + Caption = 'NIF/CIF' + DataBinding.FieldName = 'NIF_CLIF_CLIENTE' + end + object cxGridViewNOMBRE_CLIENTE: TcxGridDBColumn + Caption = 'Cliente' + DataBinding.FieldName = 'NOMBRE_CLIENTE' + end + object cxGridViewIMPORTE: TcxGridDBColumn + Caption = 'Importe' + DataBinding.FieldName = 'IMPORTE' + end + object cxGridViewOTROS_GASTOS: TcxGridDBColumn + Caption = 'Otros gastos' + DataBinding.FieldName = 'OTROS_GASTOS' + end + object cxGridViewIMPORTE_TOTAL: TcxGridDBColumn + Caption = 'Importe total' + DataBinding.FieldName = 'IMPORTE_TOTAL' + PropertiesClassName = 'TcxCurrencyEditProperties' + Properties.Alignment.Horz = taRightJustify + HeaderAlignmentHorz = taRightJustify + end + end + end + inherited ToolBar1: TToolBar + Width = 549 + ExplicitWidth = 549 + inherited ToolButton1: TToolButton + ExplicitWidth = 62 + end + inherited ToolButton4: TToolButton + ExplicitWidth = 74 + end + inherited ToolButton2: TToolButton + ExplicitWidth = 67 + end + inherited ToolButton7: TToolButton + ExplicitWidth = 117 + end + object ToolButton3: TToolButton + Left = 336 + Top = 2 + Action = actExpandir + AutoSize = True + end + object ToolButton8: TToolButton + Left = 434 + Top = 2 + Action = actContraer + AutoSize = True + end + end + inherited ContenidoImageList: TPngImageList + PngImages = < + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 610000000970485973000017120000171201679FD252000000F84944415478DA + 63FCFFFF3F03084C59BC03C2200072E33C19616C905E46640372623DF06A06AA + 6198B77413C3F99DD3194936E0DFBF7F0CD396EE62D051576128AAEB031B42B4 + 0120CDBFFFFC6398BD720F43B0A70DC3CD7B2FC0869CDB318D91A00130CDBF7F + FF6558B06E3FD80B3040D00064CDBFFF40F0AA6D47C1722083F01A804D3304FF + 63D8B2EF147E03F06906D13B0F9DC56D0058E16F540D20FC07C607CA1D387911 + BB01E991AE043583F847CF5EC16E4052881341CD207CEAE275EC06C406D813D4 + 0CC2E7AFDEC26E40848F2D41CD20B12B37EF603720D8C38AA06610C069809F8B + 39C3A63D2789C994D80D404EA6C400900100F58BBFF09BC1E25C000000004945 + 4E44AE426082} + Name = 'PngImage0' + Background = clWindow + end + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 61000000097048597300000AEB00000AEB01828B0D5A000002854944415478DA + A5935D48536118C7FFAFDB8CCD557E7F34B33167F9119617A91596495D781304 + 451021A651362821B1ABA49B6EA4460961D88542055D84DD6545415992174994 + 9625CC8F9C329D9B5F3BE9CED9D9797BCEA1C932A3A0079EC3CBE13CBFE7FF7F + 9FF330CE39FE2798FAB80BA4E61559EB2551E67B07279AE8D51FA98F2CC99546 + 031A3D6E5FF329993F631D80B52227A6D7929F9BAEA459D1D73BE8DC3330D6B8 + 1AD206641414DA5A6224E1E8ECA47779660955D532EF642F1371BD74331A14FA + 9C27A4439F5D88777DAE1B65FD230D11485786B9363D65FD35C1EB4B9817427E + 9F80C335C05BD53E23B2A934132FB23662B71406C2B14698F38AF0E9EB9473E8 + E3C8655BD686D6F858A5DA3F27B04511E37E0195B5C0A00AD6003FE5259758F0 + 3AD1843C15125218CCB6AD707FF34EAC93973217041154ECF608D8770E188BD8 + 5A01A8A1DEC5F60CF4980CB0A890E8A47AFFF477EC3F037C8EBE975F006ADC37 + 60A7351E3D061DE222C522A5270047AD82DBAB27B21AC09EDA373525E9A52BCB + 7E5F4CB4822509BE80848AB3C0C09A806380EE7CA1BDC55EB4CDE17AF2984932 + 75A60CCA088739742A84CE1E49C1010730F41BA03B27CD595C517CB1FFF92B04 + E6035AF142101DCB12DA743AB413243FA468331D0F01E51780D1154057AAF148 + D92E7BE794778E8DB92634C901116FA6451CAA27214EC06802AE5227AA839ED2 + 45A0729AC6A406182DD9329C10A7B7F57D18D63A93DF99D92076905F4FB4DF56 + A08C20ED9476027CD1209C7BD9FBDC947BC1C0E2C9596A4B003E27E2F8E9301E + AEB507B700334968A6631D019C759C5F627780822413BA194312CDFB41958C13 + 7FDB4052739000430ECEDD913F313B568F9B8B326AC8F7CCBFAEB27A073F0058 + 5538F0EAB25B380000000049454E44AE426082} + Name = 'PngImage1' + Background = clWindow + end + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 610000000970485973000017120000171201679FD2520000015D4944415478DA + 63FCFFFF3F03082CDD7212C22000627C2D1891F98CC80644FB98E3D50C54C3D0 + 3B6521C3F99DD3194936E0DFBF7F0CCBB79D6690161366B04C57058B715C6060 + 24CA0090E6DF7FFE31ACD9759621A4D68281352A97E1F7B2C90C8B2E10E10298 + E6DFBFFF325C5DC2C1F044E912C39B4B4B19984A3AB17BC171E64DACAEE860D0 + 60D0F399C2F0F2D636868587CC18A41A1A18D218F07801DD669866100E699161 + 10D5F6050726411720DB0CD35CDE369B61DED24DD80DF8FDE72FD856107D6319 + 1786E6ED7B4F311C387911BB01611E260C6E73EF80F9110C1F180C182C18C4D5 + BC5034830C3E7AF60A7603029D0D212E00FA7DEDAA2B0C2D2D210C6B6A9EA068 + 06E15317AF6337C0C75E8F2160D92330FF4E8B0B838B4B0D985D5CE907D70CC2 + E7AFDEC26E80BBB50E5CD11FA84B60E181C0FF18AEDCBC83DD0027734D829A41 + 00A701B6C66A0C9BF69C24265362370094D348012003002CB76B52FA97B19500 + 00000049454E44AE426082} + Name = 'PngImage2' + Background = clWindow + end + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 610000000970485973000017120000171201679FD252000001124944415478DA + 63FCFFFF3F03258091620340848147C2FF0B3B1630A24B1223CE08E20CAC0B28 + 0A0098010B361C807BE3E7CF5F0C5FBF7D63F8F2ED3B98D65455C62ADE599ACC + 886240BCBF3D58E19FBFFF18BE7DFFC5F0EDC72F86D6A98B1826D7E760159FD2 + 908B69C0EF3F7F810A7E337C072ABC71FF15C3FC556B1916F69463155FD45B81 + 3060DAF21DFF93835D18BEFF80D8F0FDC71F8647CFDF334C9CB38061E5D446AC + E21B66B7220CE89AB3EE7F6AA80754D16F862F409BDE7FFCC6D0D43F8561DDCC + 76ACE2FB574C4418503771F1FFB4085F86DB0F5EA3847049633BC3C6F97D58C5 + CF6E9B8730A0A86DE6FF6FC0D0FDF4F90BC3E72F5FA1F417867FFFFE33589818 + 601587A78381CF4C941A00005C20FBD97F751C0A0000000049454E44AE426082} + Name = 'PngImage3' + Background = clWindow + end + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 610000000970485973000017120000171201679FD252000000DF4944415478DA + 63FCFFFF3F032580916203600C9E351CFF19FE3130FCFF09A47EFD67F89EFC0B + 2E67E09180D596F3DBE733220C58C5F17F89572FC3FBAF1F1832D73630FCC8FA + CDC84000805CCF886CF314B73A86F7DF3E32546EEC63F8FF0B22F6BBF62FDCA0 + 8482061497CCEFAF676444B619A41946BFF9FC8E61CDBE7D0C7F5AFF32E27501 + F762F6FF309B9135BF06E20347CE33FCEDF987DF059C73D9FE839CFA1F1870A9 + 56C1709BC181F903283EE53F7E17C0386C5D2CFF838C1DB1DA4C542CB03633FF + FFFF8381289BB1BA801880350C48316008BB006F2C509A1B0127B3B6E11C11A1 + 6B0000000049454E44AE426082} + Name = 'PngImage4' + Background = clWindow + end + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 610000000970485973000017120000171201679FD252000000914944415478DA + 63FCFFFF3F032580916203885164E09180D596F3DBE733320265C09220E23312 + FE02C41F80D8158F2520D7430C9838112CF0F7F74F868F4F6F33BC7F7283E1CB + EBC70C770E3C6008413220A1A001C525F3FBEB1919FF010D60041A80AE1904CE + 000D4821E4828F401ADDD91FA1F41F20CE20E4024A6200EC028A63812E2E18F8 + 30187817E0CF0B14E64600B6F869E1FAECCCBE0000000049454E44AE426082} + Name = 'PngImage5' + Background = clWindow + end> + Bitmap = {} + end + inherited ActionListContenido: TActionList + inherited actModificar: TAction + Enabled = False + Visible = False + end + object actExpandir: TAction + Category = 'Operaciones' + Caption = 'Expandir todo' + ImageIndex = 4 + Visible = False + OnExecute = actExpandirExecute + OnUpdate = actExpandirUpdate + end + object actContraer: TAction + Category = 'Operaciones' + Caption = 'Contraer todo' + ImageIndex = 5 + Visible = False + OnExecute = actContraerExecute + OnUpdate = actContraerUpdate + end + end +end diff --git a/Source/Modulos/Recibos de cliente/Views/uViewRecibosCompensados.pas b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCompensados.pas new file mode 100644 index 00000000..38deeb9d --- /dev/null +++ b/Source/Modulos/Recibos de cliente/Views/uViewRecibosCompensados.pas @@ -0,0 +1,193 @@ +unit uViewRecibosCompensados; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, uViewDetallesGenerico, cxStyles, cxCustomData, cxGraphics, cxFilter, + cxData, cxDataStorage, cxEdit, DB, cxDBData, ActnList, ImgList, PngImageList, + uDADataTable, ComCtrls, ToolWin, cxGridLevel, cxGridCustomTableView, + cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, + cxGrid, cxImageComboBox, cxCurrencyEdit, uDataModuleRecibosCliente, + uBizRecibosCliente, uRecibosClienteController, Grids, DBGrids, cxSpinEdit, + dxLayoutControl; + +type + IViewRecibosCompensados = interface + ['{C683669A-002A-432D-BC20-3FA50BEA8721}'] + function GetReciboCliente: IBizRecibosCliente; + procedure SetReciboCliente(const Value: IBizRecibosCliente); + property ReciboCliente: IBizRecibosCliente read GetReciboCliente write SetReciboCliente; + + function GetController : IRecibosClienteController; + procedure SetController (const Value : IRecibosClienteController); + property Controller : IRecibosClienteController read GetController write SetController; + end; + + TfrViewRecibosCompensados = class(TfrViewDetallesGenerico, IViewRecibosCompensados) + actExpandir: TAction; + actContraer: TAction; + ToolButton3: TToolButton; + ToolButton8: TToolButton; + cxGridViewREFERENCIA: TcxGridDBColumn; + cxGridViewIMPORTE_TOTAL: TcxGridDBColumn; + cxGridViewID_RECIBO_COMPENSADO: TcxGridDBColumn; + cxGridViewSITUACION: TcxGridDBColumn; + cxGridViewFECHA_EMISION: TcxGridDBColumn; + cxGridViewFECHA_VENCIMIENTO: TcxGridDBColumn; + cxGridViewNIF_CIF_CLIENTE: TcxGridDBColumn; + cxGridViewNOMBRE_CLIENTE: TcxGridDBColumn; + cxGridViewIMPORTE: TcxGridDBColumn; + cxGridViewOTROS_GASTOS: TcxGridDBColumn; + cxGridViewRecId: TcxGridDBColumn; + procedure actExpandirExecute(Sender: TObject); + procedure actContraerExecute(Sender: TObject); + procedure CustomViewShow(Sender: TObject); + procedure actEliminarUpdate(Sender: TObject); + procedure actExpandirUpdate(Sender: TObject); + procedure actContraerUpdate(Sender: TObject); + procedure actAnadirUpdate(Sender: TObject); + protected + FHayCambios : Boolean; + FReciboCliente : IBizRecibosCliente; + FController : IRecibosClienteController; + + procedure AnadirInterno; override; + procedure EliminarInterno; override; + + function GetReciboCliente: IBizRecibosCliente; + procedure SetReciboCliente(const Value: IBizRecibosCliente); + + function GetModified: Boolean; override; + procedure SetModified(const Value: Boolean); override; + + function GetController : IRecibosClienteController; + procedure SetController (const Value : IRecibosClienteController); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + property ReciboCliente: IBizRecibosCliente read GetReciboCliente write SetReciboCliente; + property Controller : IRecibosClienteController read GetController write SetController; + end; + + +implementation + +{$R *.dfm} + +uses + uCustomView; + +{ TfrViewFacturasReciboCliente } + +procedure TfrViewRecibosCompensados.actAnadirUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Enabled := (ReciboCliente.SITUACION <> CTE_COBRADO); +end; + +procedure TfrViewRecibosCompensados.actContraerExecute(Sender: TObject); +begin + inherited; + cxGridView.ViewData.Collapse(True); +end; + +procedure TfrViewRecibosCompensados.actContraerUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Enabled := HayDatos; +end; + +procedure TfrViewRecibosCompensados.actEliminarUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Enabled := ((cxGridView.Controller.SelectedRowCount > 0) + and (cxGridView.Controller.SelectedRows[0].HasCells) + and (ReciboCliente.SITUACION <> CTE_COBRADO)); +end; + +procedure TfrViewRecibosCompensados.actExpandirExecute(Sender: TObject); +begin + inherited; + cxGridView.ViewData.Expand(True); +end; + +procedure TfrViewRecibosCompensados.actExpandirUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Enabled := HayDatos; +end; + +procedure TfrViewRecibosCompensados.AnadirInterno; +begin + //inherited; // No hacer el comportamiento normal + if FController.ElegirRecibosCompensados(ReciboCliente) then + Modified := True; +end; + +constructor TfrViewRecibosCompensados.Create(AOwner: TComponent); +begin + inherited; + FHayCambios := False; +end; + +procedure TfrViewRecibosCompensados.CustomViewShow(Sender: TObject); +begin + inherited; + cxGridView.OptionsSelection.MultiSelect := False; +end; + +destructor TfrViewRecibosCompensados.Destroy; +begin + inherited; +end; + +procedure TfrViewRecibosCompensados.EliminarInterno; +begin + if cxGridView.Controller.SelectedRowCount > 0 then + if cxGridView.Controller.SelectedRows[0].HasCells then +// ViewGrid._FocusedView.Controller.SelectedRecordCount + FController.QuitarReciboCompensado(ReciboCliente); + Modified := True; +end; + +function TfrViewRecibosCompensados.GetController: IRecibosClienteController; +begin + Result := FController; +end; + +function TfrViewRecibosCompensados.GetModified: Boolean; +begin + Result := FHayCambios or inherited GetModified; +end; + +function TfrViewRecibosCompensados.GetReciboCliente: IBizRecibosCliente; +begin + Result := FReciboCliente; +end; + +procedure TfrViewRecibosCompensados.SetController( + const Value: IRecibosClienteController); +begin + FController := Value; +end; + +procedure TfrViewRecibosCompensados.SetModified(const Value: Boolean); +begin + FHayCambios := Value; + inherited; +end; + +procedure TfrViewRecibosCompensados.SetReciboCliente(const Value: IBizRecibosCliente); +begin + FReciboCliente := Value; + FHayCambios := False; + if Assigned(FReciboCliente) then + dsDetalles.DataTable := FReciboCliente.RecibosCompensados.DataTable + else + dsDetalles.DataTable := NIL; + + actAnchoAutomatico.Execute; +end; + +end. diff --git a/Source/Modulos/Remesas de cliente/Controller/uRemesasClienteController.pas b/Source/Modulos/Remesas de cliente/Controller/uRemesasClienteController.pas index 9cc68380..88b58de2 100644 --- a/Source/Modulos/Remesas de cliente/Controller/uRemesasClienteController.pas +++ b/Source/Modulos/Remesas de cliente/Controller/uRemesasClienteController.pas @@ -270,7 +270,7 @@ var begin Result := False; - ARecibosSeleccionados := (FRecibosClienteController.ElegirRecibos(FRecibosClienteController.BuscarTodosPendientesDevueltos, 'Elija uno o más recibos para incluirlos en esta remesa', True) as IBizRecibosCliente); + ARecibosSeleccionados := (FRecibosClienteController.ElegirRecibos(FRecibosClienteController.BuscarRecibosARemesar, 'Elija uno o más recibos para incluirlos en esta remesa', True) as IBizRecibosCliente); if Assigned(ARecibosSeleccionados) then begin ShowHourglassCursor; @@ -351,7 +351,7 @@ end; procedure TRemesasClienteController.RecuperarRecibos(ARemesaCliente: IBizRemesaCliente); begin - ARemesaCliente.Recibos := RecibosClienteController.BuscarTodosRemesa(ARemesaCliente.ID); + ARemesaCliente.Recibos := RecibosClienteController.BuscarRecibosRemesa(ARemesaCliente.ID); end; function TRemesasClienteController.Existe(const ID: Integer): Boolean; diff --git a/Source/Modulos/Remesas de cliente/Views/RemesasCliente_view.dpk b/Source/Modulos/Remesas de cliente/Views/RemesasCliente_view.dpk index e0613327..9c561c66 100644 --- a/Source/Modulos/Remesas de cliente/Views/RemesasCliente_view.dpk +++ b/Source/Modulos/Remesas de cliente/Views/RemesasCliente_view.dpk @@ -92,7 +92,6 @@ contains uRemesasClienteViewRegister in 'uRemesasClienteViewRegister.pas', uViewRemesaCliente in 'uViewRemesaCliente.pas' {frViewRemesaCliente: TFrame}, uEditorRemesaCliente in 'uEditorRemesaCliente.pas' {fEditorRemesaCliente: TfEditorRemesaCliente}, - uViewRecibosRemesaCliente_2 in 'uViewRecibosRemesaCliente_2.pas' {frViewRecibosRemesaCliente2: TFrame}, uEditorRemesaClienteReport in 'uEditorRemesaClienteReport.pas' {fEditorRemesaClienteReport: TfEditorRemesaClienteReport}, uViewRecibosRemesaCliente in 'uViewRecibosRemesaCliente.pas' {frViewRecibosRemesaCliente: TFrame}; diff --git a/Source/Modulos/Remesas de proveedor/Reports/uRptRemesasProveedor_Server.dfm b/Source/Modulos/Remesas de proveedor/Reports/uRptRemesasProveedor_Server.dfm index ce33707f..1a11a919 100644 --- a/Source/Modulos/Remesas de proveedor/Reports/uRptRemesasProveedor_Server.dfm +++ b/Source/Modulos/Remesas de proveedor/Reports/uRptRemesasProveedor_Server.dfm @@ -101,22 +101,22 @@ object RptRemesasProveedor: TRptRemesasProveedor Connection = 'IBX' TargetTable = 'REMESAS_PROVEEDOR' SQL = - 'SELECT'#10' REMESAS_PROVEEDOR.ID,'#10' REMESAS_PROVEEDOR.ID_EMPRES' + - 'A,'#10' REMESAS_PROVEEDOR.REFERENCIA,'#10' REMESAS_PROVEEDOR.FECHA' + - '_REMESA,'#10' REMESAS_PROVEEDOR.IMPORTE_TOTAL,'#10' EMPRESAS.NOMBR' + - 'E as TITULAR,'#10' EMPRESAS_DATOS_BANCO.ENTIDAD,'#10' EMPRESAS_DAT' + - 'OS_BANCO.SUCURSAL,'#10' EMPRESAS_DATOS_BANCO.DC,'#10' EMPRESAS_DAT' + - 'OS_BANCO.CUENTA,'#10' REMESAS_PROVEEDOR.DESCRIPCION,'#10#10' EMPRESA' + - 'S.NIF_CIF as NIF_CIF_EMPRESA, EMPRESAS.RAZON_SOCIAL,'#10' EMPRESA' + - 'S.CALLE as CALLE_EMPRESA, EMPRESAS.POBLACION as POBLACION_EMPRES' + - 'A,'#10' EMPRESAS.PROVINCIA as PROVINCIA_EMPRESA, EMPRESAS.CODIGO_' + - 'POSTAL as CODIGO_POSTAL_EMPRESA,'#10' EMPRESAS.TELEFONO_1, EMPRES' + - 'AS.FAX, EMPRESAS.MOVIL_1, EMPRESAS.EMAIL_1,'#10' EMPRESAS.PAGINA_' + - 'WEB, EMPRESAS.REGISTRO_MERCANTIL, EMPRESAS.LOGOTIPO'#10#10#10'FROM'#10' REM' + - 'ESAS_PROVEEDOR'#10' LEFT OUTER JOIN EMPRESAS ON (EMPRESAS.ID = REME' + - 'SAS_PROVEEDOR.ID_EMPRESA)'#10' LEFT OUTER JOIN EMPRESAS_DATOS_BANCO' + - ' ON (EMPRESAS_DATOS_BANCO.ID = REMESAS_PROVEEDOR.ID_DATOS_BANCO)' + - #10'WHERE'#10' REMESAS_PROVEEDOR.ID = :ID' + 'SELECT'#10' V_REMESAS_PROVEEDOR.ID,'#10' V_REMESAS_PROVEEDOR.ID_EM' + + 'PRESA,'#10' V_REMESAS_PROVEEDOR.REFERENCIA,'#10' V_REMESAS_PROVEED' + + 'OR.FECHA_REMESA,'#10' V_REMESAS_PROVEEDOR.IMPORTE_TOTAL,'#10' EMPR' + + 'ESAS.NOMBRE as TITULAR,'#10' EMPRESAS_DATOS_BANCO.ENTIDAD,'#10' EM' + + 'PRESAS_DATOS_BANCO.SUCURSAL,'#10' EMPRESAS_DATOS_BANCO.DC,'#10' EM' + + 'PRESAS_DATOS_BANCO.CUENTA,'#10' V_REMESAS_PROVEEDOR.DESCRIPCION,'#10 + + #10' EMPRESAS.NIF_CIF as NIF_CIF_EMPRESA, EMPRESAS.RAZON_SOCIAL,' + + #10' EMPRESAS.CALLE as CALLE_EMPRESA, EMPRESAS.POBLACION as POBL' + + 'ACION_EMPRESA,'#10' EMPRESAS.PROVINCIA as PROVINCIA_EMPRESA, EMPR' + + 'ESAS.CODIGO_POSTAL as CODIGO_POSTAL_EMPRESA,'#10' EMPRESAS.TELEFO' + + 'NO_1, EMPRESAS.FAX, EMPRESAS.MOVIL_1, EMPRESAS.EMAIL_1,'#10' EMPR' + + 'ESAS.PAGINA_WEB, EMPRESAS.REGISTRO_MERCANTIL, EMPRESAS.LOGOTIPO'#10 + + #10#10'FROM'#10' V_REMESAS_PROVEEDOR'#10' LEFT OUTER JOIN EMPRESAS ON (EMPR' + + 'ESAS.ID = V_REMESAS_PROVEEDOR.ID_EMPRESA)'#10' LEFT OUTER JOIN EMPR' + + 'ESAS_DATOS_BANCO ON (EMPRESAS_DATOS_BANCO.ID = V_REMESAS_PROVEED' + + 'OR.ID_DATOS_BANCO)'#10'WHERE'#10' V_REMESAS_PROVEEDOR.ID = :ID' StatementType = stSQL ColumnMappings = < item @@ -524,16 +524,17 @@ object RptRemesasProveedor: TRptRemesasProveedor 'V_RECIBOS_PROVEEDOR.ID_REMESA,'#10' V_RECIBOS_PROVEEDOR.REFERENCI' + 'A_REMESA,'#10' V_RECIBOS_PROVEEDOR.FECHA_VENCIMIENTO,'#10' V_RECIB' + 'OS_PROVEEDOR.DESCRIPCION,'#10' V_RECIBOS_PROVEEDOR.OBSERVACIONES,' + - #10' V_RECIBOS_PROVEEDOR.IMPORTE,'#10' V_RECIBOS_PROVEEDOR.FECHA_' + - 'FACTURA,'#10' V_RECIBOS_PROVEEDOR.REFERENCIA_FACTURA_PROV,'#10' V_' + - 'RECIBOS_PROVEEDOR.FORMA_PAGO_FACTURA,'#10' V_RECIBOS_PROVEEDOR.IM' + - 'PORTE_FACTURA,'#10' V_RECIBOS_PROVEEDOR.ID_EMPRESA,'#10' V_RECIBOS' + - '_PROVEEDOR.NOMBRE_PROVEEDOR,'#10' V_RECIBOS_PROVEEDOR.NIF_CIF_PRO' + - 'VEEDOR,'#10' V_RECIBOS_PROVEEDOR.ENTIDAD_PROVEEDOR,'#10' V_RECIBOS' + - '_PROVEEDOR.SUCURSAL_PROVEEDOR,'#10' V_RECIBOS_PROVEEDOR.DC_PROVEE' + - 'DOR,'#10' V_RECIBOS_PROVEEDOR.CUENTA_PROVEEDOR'#10#10#10'FROM V_RECIBOS_P' + - 'ROVEEDOR'#10'WHERE V_RECIBOS_PROVEEDOR.ID_REMESA = :ID_REMESA'#10'ORDER ' + - 'BY FECHA_VENCIMIENTO' + #10' V_RECIBOS_PROVEEDOR.IMPORTE,'#10' V_RECIBOS_PROVEEDOR.OTROS_' + + 'GASTOS,'#10' V_RECIBOS_PROVEEDOR.IMPORTE_TOTAL,'#10' V_RECIBOS_PRO' + + 'VEEDOR.FECHA_FACTURA,'#10' V_RECIBOS_PROVEEDOR.REFERENCIA_FACTURA' + + '_PROV,'#10' V_RECIBOS_PROVEEDOR.FORMA_PAGO_FACTURA,'#10' V_RECIBOS' + + '_PROVEEDOR.IMPORTE_FACTURA,'#10' V_RECIBOS_PROVEEDOR.ID_EMPRESA,'#10 + + ' V_RECIBOS_PROVEEDOR.NOMBRE_PROVEEDOR,'#10' V_RECIBOS_PROVEEDO' + + 'R.NIF_CIF_PROVEEDOR,'#10' V_RECIBOS_PROVEEDOR.ENTIDAD_PROVEEDOR,'#10 + + ' V_RECIBOS_PROVEEDOR.SUCURSAL_PROVEEDOR,'#10' V_RECIBOS_PROVEE' + + 'DOR.DC_PROVEEDOR,'#10' V_RECIBOS_PROVEEDOR.CUENTA_PROVEEDOR'#10#10#10'FRO' + + 'M V_RECIBOS_PROVEEDOR'#10'WHERE V_RECIBOS_PROVEEDOR.ID_REMESA = :ID_' + + 'REMESA'#10'ORDER BY FECHA_VENCIMIENTO' StatementType = stSQL ColumnMappings = < item @@ -623,6 +624,14 @@ object RptRemesasProveedor: TRptRemesasProveedor item DatasetField = 'REFERENCIA_FACTURA_PROV' TableField = 'REFERENCIA_FACTURA_PROV' + end + item + DatasetField = 'OTROS_GASTOS' + TableField = 'OTROS_GASTOS' + end + item + DatasetField = 'IMPORTE_TOTAL' + TableField = 'IMPORTE_TOTAL' end> end> Name = 'Informe_Detalles' @@ -754,6 +763,28 @@ object RptRemesasProveedor: TRptRemesasProveedor Lookup = False LookupCache = False end + item + Name = 'OTROS_GASTOS' + DataType = datFloat + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end + item + Name = 'IMPORTE_TOTAL' + DataType = datFloat + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end item Name = 'FECHA_FACTURA' DataType = datDateTime @@ -907,7 +938,7 @@ object RptRemesasProveedor: TRptRemesasProveedor PreviewOptions.Zoom = 1.000000000000000000 PrintOptions.Printer = 'Default' ReportOptions.CreateDate = 37871.995398692100000000 - ReportOptions.LastChange = 39267.734660185180000000 + ReportOptions.LastChange = 39269.577914849530000000 ReportOptions.VersionBuild = '1' ReportOptions.VersionMajor = '12' ReportOptions.VersionMinor = '13' diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr index 899444d7..ed2cb505 100644 --- a/Source/Servidor/FactuGES_Server.dpr +++ b/Source/Servidor/FactuGES_Server.dpr @@ -81,8 +81,6 @@ uses uBizComisionesServer in '..\Modulos\Comisiones\Model\uBizComisionesServer.pas', schReportServer_Intf in '..\Modulos\Comisiones\Model\schReportServer_Intf.pas', schReportClient_Intf in '..\Modulos\Comisiones\Model\schReportClient_Intf.pas', - schRecibosClienteClient_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteClient_Intf.pas', - schRecibosClienteServer_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteServer_Intf.pas', srvFacturasProveedor_Impl in '..\Modulos\Facturas de proveedor\Servidor\srvFacturasProveedor_Impl.pas' {srvFacturasProveedor: TDARemoteService}, srvRecibosProveedor_Impl in '..\Modulos\Recibos de proveedor\Servidor\srvRecibosProveedor_Impl.pas' {srvRecibosProveedor: TDARemoteService}, uBizFacturasProveedorServer in '..\Modulos\Facturas de proveedor\Model\uBizFacturasProveedorServer.pas', @@ -119,7 +117,9 @@ uses schAlbaranesProveedorClient_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorClient_Intf.pas', schAlbaranesProveedorServer_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorServer_Intf.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', + schRecibosClienteClient_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteClient_Intf.pas', + schRecibosClienteServer_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteServer_Intf.pas'; {$R *.res} {$R ..\Servicios\RODLFile.res} diff --git a/Source/Servidor/FactuGES_Server.rc b/Source/Servidor/FactuGES_Server.rc index 58c3de6d..6e16d762 100644 --- a/Source/Servidor/FactuGES_Server.rc +++ b/Source/Servidor/FactuGES_Server.rc @@ -1,7 +1,7 @@ MAINICON ICON "E:\Codigo (Luis León)\Source\Iconos\Servidor.ico" 1 VERSIONINFO -FILEVERSION 2,1,0,0 -PRODUCTVERSION 2,1,0,0 +FILEVERSION 2,1,1,0 +PRODUCTVERSION 2,1,1,0 FILEFLAGSMASK 0x3FL FILEFLAGS 0x00L FILEOS 0x40004L @@ -12,9 +12,9 @@ BEGIN BEGIN BLOCK "0C0904E4" BEGIN - VALUE "FileVersion", "2.1.0.0\0" - VALUE "ProductVersion", "2.1.0.0\0" - VALUE "CompileDate", "jueves, 05 de julio de 2007 20:47\0" + VALUE "FileVersion", "2.1.1.0\0" + VALUE "ProductVersion", "2.1.1.0\0" + VALUE "CompileDate", "lunes, 09 de julio de 2007 19:04\0" END END BLOCK "VarFileInfo" diff --git a/Source/Servidor/FactuGES_Server.res b/Source/Servidor/FactuGES_Server.res index e5fb6a5a..50204ed0 100644 Binary files a/Source/Servidor/FactuGES_Server.res and b/Source/Servidor/FactuGES_Server.res differ