From 8f35afe3e95dfc40e9f752f9e06349d883983c67 Mon Sep 17 00:00:00 2001 From: roberto Date: Tue, 9 Aug 2016 11:13:02 +0000 Subject: [PATCH] Tareas #1435: Al pasar de contrato a factura el iva establecido en el contrato se pierde y pone el de por defecto de la empresa, debe mantener el del contrato git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoDesign_FactuGES/trunk@115 93f398dd-4eb6-7a46-baf6-13f46f578da2 --- .../Views/uViewContratosCliente.dfm | 14 ++++++++++++++ .../Views/uViewContratosCliente.pas | 3 +++ .../Views/uViewPresupuestosCliente.dfm | 14 ++++++++++++++ .../Views/uViewPresupuestosCliente.pas | 3 +++ .../uGenerarFacturasCliUtils.pas | 3 ++- 5 files changed, 36 insertions(+), 1 deletion(-) diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm index 561e1de..48d6489 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.dfm @@ -101,6 +101,20 @@ inherited frViewContratosCliente: TfrViewContratosCliente DataBinding.FieldName = 'NOMBRE' Width = 161 end + object cxGridViewBASE_IMPONIBLE: TcxGridDBColumn + Caption = 'Base imponible' + DataBinding.FieldName = 'BASE_IMPONIBLE' + HeaderAlignmentHorz = taRightJustify + end + object cxGridViewIVA: TcxGridDBColumn + DataBinding.FieldName = 'IVA' + HeaderAlignmentHorz = taRightJustify + end + object cxGridViewIMPORTE_IVA: TcxGridDBColumn + Caption = 'Importe IVA' + DataBinding.FieldName = 'IMPORTE_IVA' + HeaderAlignmentHorz = taRightJustify + end object cxGridViewIMPORTE_TOTAL: TcxGridDBColumn Caption = 'Importe total' DataBinding.FieldName = 'IMPORTE_TOTAL' diff --git a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas index 9ebc572..9636d85 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uViewContratosCliente.pas @@ -42,6 +42,9 @@ type cxGridViewREFERENCIA_CLIENTE: TcxGridDBColumn; cxGridViewFACTURA_ASOCIADA: TcxGridDBColumn; cxStylePENDIENTESSinFacturas: TcxStyle; + cxGridViewIMPORTE_IVA: TcxGridDBColumn; + cxGridViewIVA: TcxGridDBColumn; + cxGridViewBASE_IMPONIBLE: TcxGridDBColumn; procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm index ace94b8..330c32d 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm @@ -108,6 +108,20 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente DataBinding.FieldName = 'NOMBRE' Width = 271 end + object cxGridViewBASE_IMPONIBLE: TcxGridDBColumn + Caption = 'Base Imponible' + DataBinding.FieldName = 'BASE_IMPONIBLE' + HeaderAlignmentHorz = taRightJustify + end + object cxGridViewIVA: TcxGridDBColumn + DataBinding.FieldName = 'IVA' + HeaderAlignmentHorz = taRightJustify + end + object cxGridViewIMPORTE_IVA: TcxGridDBColumn + Caption = 'Importe IVA' + DataBinding.FieldName = 'IMPORTE_IVA' + HeaderAlignmentHorz = taRightJustify + end object cxGridViewIMPORTE_TOTAL: TcxGridDBColumn Caption = 'Importe total' DataBinding.FieldName = 'IMPORTE_TOTAL' diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas index 160b3ce..77a1cc9 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas @@ -47,6 +47,9 @@ type cxStyleRECHAZADO: TcxStyle; cxGridViewTIPO: TcxGridDBColumn; cxGridViewREFERENCIA_CLIENTE: TcxGridDBColumn; + cxGridViewBASE_IMPONIBLE: TcxGridDBColumn; + cxGridViewIMPORTE_IVA: TcxGridDBColumn; + cxGridViewIVA: TcxGridDBColumn; procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; diff --git a/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas b/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas index 580db6d..7a395ee 100644 --- a/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas +++ b/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas @@ -199,8 +199,9 @@ begin AFactura.ID_EMPRESA := AppFactuGES.EmpresaActiva.ID; AFactura.ID_TIENDA := AppFactuGES.TiendaActiva.ID; AFactura.TIENDA := AppFactuGES.TiendaActiva.NOMBRE; +//Solicitado por Angélica, al generar una factura a partir del contrato, que se copie el IVA asignado en el contrato +// AFactura.ID_TIPO_IVA := AppFactuGES.EmpresaActiva.ID_TIPO_IVA; //SIEMPRE SE ASIGNARÄ EL IVA DE LA EMPRESA ACTIVA CopiarContratoAFactura(AContrato, AFactura); - AFactura.ID_TIPO_IVA := AppFactuGES.EmpresaActiva.ID_TIPO_IVA; //SIEMPRE SE ASIGNARÄ EL IVA DE LA EMPRESA ACTIVA CopiarDetallesAFactura(AContrato, AFactura, AContrato.Detalles); //Sustituir por if de guardar