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
This commit is contained in:
roberto 2016-08-09 11:13:02 +00:00
parent 37047613d9
commit 8f35afe3e9
5 changed files with 36 additions and 1 deletions

View File

@ -101,6 +101,20 @@ inherited frViewContratosCliente: TfrViewContratosCliente
DataBinding.FieldName = 'NOMBRE' DataBinding.FieldName = 'NOMBRE'
Width = 161 Width = 161
end 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 object cxGridViewIMPORTE_TOTAL: TcxGridDBColumn
Caption = 'Importe total' Caption = 'Importe total'
DataBinding.FieldName = 'IMPORTE_TOTAL' DataBinding.FieldName = 'IMPORTE_TOTAL'

View File

@ -42,6 +42,9 @@ type
cxGridViewREFERENCIA_CLIENTE: TcxGridDBColumn; cxGridViewREFERENCIA_CLIENTE: TcxGridDBColumn;
cxGridViewFACTURA_ASOCIADA: TcxGridDBColumn; cxGridViewFACTURA_ASOCIADA: TcxGridDBColumn;
cxStylePENDIENTESSinFacturas: TcxStyle; cxStylePENDIENTESSinFacturas: TcxStyle;
cxGridViewIMPORTE_IVA: TcxGridDBColumn;
cxGridViewIVA: TcxGridDBColumn;
cxGridViewBASE_IMPONIBLE: TcxGridDBColumn;
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel:
TcxGridLevel); TcxGridLevel);
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;

View File

@ -108,6 +108,20 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente
DataBinding.FieldName = 'NOMBRE' DataBinding.FieldName = 'NOMBRE'
Width = 271 Width = 271
end 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 object cxGridViewIMPORTE_TOTAL: TcxGridDBColumn
Caption = 'Importe total' Caption = 'Importe total'
DataBinding.FieldName = 'IMPORTE_TOTAL' DataBinding.FieldName = 'IMPORTE_TOTAL'

View File

@ -47,6 +47,9 @@ type
cxStyleRECHAZADO: TcxStyle; cxStyleRECHAZADO: TcxStyle;
cxGridViewTIPO: TcxGridDBColumn; cxGridViewTIPO: TcxGridDBColumn;
cxGridViewREFERENCIA_CLIENTE: TcxGridDBColumn; cxGridViewREFERENCIA_CLIENTE: TcxGridDBColumn;
cxGridViewBASE_IMPONIBLE: TcxGridDBColumn;
cxGridViewIMPORTE_IVA: TcxGridDBColumn;
cxGridViewIVA: TcxGridDBColumn;
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel:
TcxGridLevel); TcxGridLevel);
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;

View File

@ -199,8 +199,9 @@ begin
AFactura.ID_EMPRESA := AppFactuGES.EmpresaActiva.ID; AFactura.ID_EMPRESA := AppFactuGES.EmpresaActiva.ID;
AFactura.ID_TIENDA := AppFactuGES.TiendaActiva.ID; AFactura.ID_TIENDA := AppFactuGES.TiendaActiva.ID;
AFactura.TIENDA := AppFactuGES.TiendaActiva.NOMBRE; 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); 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); CopiarDetallesAFactura(AContrato, AFactura, AContrato.Detalles);
//Sustituir por if de guardar //Sustituir por if de guardar