Arreglo de dia de pago del cliente para sus recibos teniendo en cuenta el mes de febrero, el porte desglosado en articulos en los documentos de proveedor y no desglosado en los documentos de cliente, arreglo de error en la generación de un abono a partir de una factura al poner en negativo los detalles, otros cambios menores

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@157 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
roberto 2007-12-05 19:10:31 +00:00
parent c034f36dbf
commit 6215ba48c1
20 changed files with 147 additions and 44 deletions

View File

@ -169,12 +169,12 @@ procedure TfEditorAlbaranCliente.frViewTotales1ePortePropertiesValidate(
var Error: Boolean); var Error: Boolean);
begin begin
inherited; inherited;
if not VarIsNull(DisplayValue) then if (not VarIsNull(DisplayValue)) and (Length(DisplayValue) > 0) then
FAlbaran.IMPORTE_PORTE := DisplayValue FAlbaran.IMPORTE_PORTE := DisplayValue
else else
FAlbaran.IMPORTE_PORTE := 0; FAlbaran.IMPORTE_PORTE := 0;
RecalcularPortePorUnidad; // RecalcularPortePorUnidad; En los documentos de cliente no se desglosa el porte por articulo
end; end;
function TfEditorAlbaranCliente.GetController: IAlbaranesClienteController; function TfEditorAlbaranCliente.GetController: IAlbaranesClienteController;

View File

@ -270,6 +270,8 @@ begin
AArticulosController := NIL; AArticulosController := NIL;
end; end;
end; end;
ADetallesController.ActualizarTotales(ADetalles);
end; end;
} }

View File

@ -169,7 +169,7 @@ procedure TfEditorAlbaranProveedor.frViewTotales1ePortePropertiesValidate(
var Error: Boolean); var Error: Boolean);
begin begin
inherited; inherited;
if not VarIsNull(DisplayValue) then if (not VarIsNull(DisplayValue)) and (length(DisplayValue) > 0) then
FAlbaran.IMPORTE_PORTE := DisplayValue FAlbaran.IMPORTE_PORTE := DisplayValue
else else
FAlbaran.IMPORTE_PORTE := 0; FAlbaran.IMPORTE_PORTE := 0;

View File

@ -223,7 +223,7 @@ begin
if (FieldByName(CAMPO_CANTIDAD).AsInteger <> 0) then if (FieldByName(CAMPO_CANTIDAD).AsInteger <> 0) then
begin begin
Edit; Edit;
FieldByName(CAMPO_CANTIDAD).AsInteger := -1; FieldByName(CAMPO_CANTIDAD).AsInteger := (-1) * FieldByName(CAMPO_CANTIDAD).AsInteger;
end; end;
Next; Next;
end; end;

View File

@ -5,7 +5,7 @@ inherited fEditorCliente: TfEditorCliente
ClientHeight = 585 ClientHeight = 585
ClientWidth = 656 ClientWidth = 656
ExplicitWidth = 664 ExplicitWidth = 664
ExplicitHeight = 619 ExplicitHeight = 612
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader inherited JvNavPanelHeader: TJvNavPanelHeader
@ -65,11 +65,10 @@ inherited fEditorCliente: TfEditorCliente
inherited pgPaginas: TPageControl inherited pgPaginas: TPageControl
Width = 656 Width = 656
Height = 490 Height = 490
ActivePage = pagDatosComerciales
ExplicitWidth = 656 ExplicitWidth = 656
ExplicitHeight = 490 ExplicitHeight = 490
inherited pagGeneral: TTabSheet inherited pagGeneral: TTabSheet
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 648 ExplicitWidth = 648
ExplicitHeight = 462 ExplicitHeight = 462
inline frViewCliente1: TfrViewCliente inline frViewCliente1: TfrViewCliente
@ -206,8 +205,6 @@ inherited fEditorCliente: TfEditorCliente
Top = 84 Top = 84
ExplicitLeft = 527 ExplicitLeft = 527
ExplicitTop = 84 ExplicitTop = 84
ExplicitWidth = 140
Width = 140
end end
inherited eFax: TcxDBTextEdit inherited eFax: TcxDBTextEdit
Left = 527 Left = 527
@ -294,9 +291,23 @@ inherited fEditorCliente: TfEditorCliente
Width = 648 Width = 648
LookAndFeel = dxLayoutOfficeLookAndFeel LookAndFeel = dxLayoutOfficeLookAndFeel
ExplicitWidth = 648 ExplicitWidth = 648
inherited eEntidad: TcxDBTextEdit
ExplicitWidth = 114
Width = 114
end
inherited eSucursal: TcxDBTextEdit inherited eSucursal: TcxDBTextEdit
Left = 419 Left = 418
ExplicitLeft = 419 ExplicitLeft = 418
ExplicitWidth = 112
Width = 112
end
inherited eCuenta: TcxDBTextEdit
ExplicitWidth = 194
Width = 194
end
inherited eTitular: TcxDBTextEdit
ExplicitWidth = 194
Width = 194
end end
end end
end end
@ -325,51 +336,67 @@ inherited fEditorCliente: TfEditorCliente
LookAndFeel = dxLayoutOfficeLookAndFeel LookAndFeel = dxLayoutOfficeLookAndFeel
ExplicitWidth = 648 ExplicitWidth = 648
inherited Label1: TLabel inherited Label1: TLabel
Left = 378 Left = 340
Top = 30 Top = 30
Width = 206 Width = 229
Height = 39 Caption =
ExplicitLeft = 378 'Puede indicar el d'#237'a del mes que el cliente desea realizar el pa' +
'go de sus recibos.'
ExplicitLeft = 340
ExplicitTop = 30 ExplicitTop = 30
ExplicitWidth = 206 ExplicitWidth = 229
ExplicitHeight = 39
end end
inherited eDiasVencimiento: TcxDBSpinEdit inherited eDiasVencimiento: TcxDBSpinEdit
Left = 445 Left = 466
Top = 75 Top = 62
ExplicitLeft = 445 ExplicitLeft = 466
ExplicitTop = 75 ExplicitTop = 62
ExplicitWidth = 160 ExplicitWidth = 160
Width = 160 Width = 160
end end
inherited cbRegimenIVA: TcxDBComboBox inherited cbRegimenIVA: TcxDBComboBox
Top = 30 Top = 30
ExplicitTop = 30 ExplicitTop = 30
ExplicitWidth = 121
Width = 121
end end
inherited cbRecargoEquivalencia: TcxDBCheckBox inherited cbRecargoEquivalencia: TcxDBCheckBox
Top = 111 Top = 111
ExplicitTop = 111 ExplicitTop = 111
ExplicitWidth = 121
Width = 121
end end
inherited cbFormaPago: TcxDBLookupComboBox inherited cbFormaPago: TcxDBLookupComboBox
Top = 57 Top = 57
ExplicitTop = 57 ExplicitTop = 57
ExplicitWidth = 121
Width = 121
end end
inherited bFormasPago: TButton inherited bFormasPago: TButton
Left = 218 Left = 180
Top = 57 Top = 57
ExplicitLeft = 218 ExplicitLeft = 180
ExplicitTop = 57 ExplicitTop = 57
end end
inherited eIVA: TcxDBLookupComboBox inherited eIVA: TcxDBLookupComboBox
Top = 84 Top = 84
ExplicitTop = 84 ExplicitTop = 84
ExplicitWidth = 121
Width = 121
end end
inherited bTiposIVA: TButton inherited bTiposIVA: TButton
Left = 218 Left = 180
Top = 84 Top = 84
ExplicitLeft = 218 ExplicitLeft = 180
ExplicitTop = 84 ExplicitTop = 84
end end
inherited dxLayoutGroup1: TdxLayoutGroup
inherited dxLayoutControl1Group5: TdxLayoutGroup
inherited dxLayoutControl1Item2: TdxLayoutItem
Caption = 'D'#237'a del mes para el pago:'
end
end
end
end end
end end
end end
@ -408,15 +435,31 @@ inherited fEditorCliente: TfEditorCliente
Width = 648 Width = 648
ExplicitWidth = 648 ExplicitWidth = 648
inherited ToolButton1: TToolButton inherited ToolButton1: TToolButton
Top = 0
ExplicitTop = 0
ExplicitWidth = 62 ExplicitWidth = 62
end end
inherited ToolButton4: TToolButton inherited ToolButton4: TToolButton
Top = 0
ExplicitTop = 0
ExplicitWidth = 74 ExplicitWidth = 74
end end
inherited ToolButton5: TToolButton
Top = 0
ExplicitTop = 0
end
inherited ToolButton2: TToolButton inherited ToolButton2: TToolButton
Top = 0
ExplicitTop = 0
ExplicitWidth = 67 ExplicitWidth = 67
end end
inherited ToolButton6: TToolButton
Top = 0
ExplicitTop = 0
end
inherited ToolButton7: TToolButton inherited ToolButton7: TToolButton
Top = 0
ExplicitTop = 0
ExplicitWidth = 117 ExplicitWidth = 117
end end
end end
@ -451,15 +494,31 @@ inherited fEditorCliente: TfEditorCliente
Width = 648 Width = 648
ExplicitWidth = 648 ExplicitWidth = 648
inherited ToolButton1: TToolButton inherited ToolButton1: TToolButton
Top = 0
ExplicitTop = 0
ExplicitWidth = 62 ExplicitWidth = 62
end end
inherited ToolButton4: TToolButton inherited ToolButton4: TToolButton
Top = 0
ExplicitTop = 0
ExplicitWidth = 74 ExplicitWidth = 74
end end
inherited ToolButton5: TToolButton
Top = 0
ExplicitTop = 0
end
inherited ToolButton2: TToolButton inherited ToolButton2: TToolButton
Top = 0
ExplicitTop = 0
ExplicitWidth = 67 ExplicitWidth = 67
end end
inherited ToolButton6: TToolButton
Top = 0
ExplicitTop = 0
end
inherited ToolButton7: TToolButton inherited ToolButton7: TToolButton
Top = 0
ExplicitTop = 0
ExplicitWidth = 117 ExplicitWidth = 117
end end
end end

View File

@ -1062,6 +1062,12 @@ begin
else else
AFechaVencimiento := IncDay(AFechaVencimiento, (AFactura.Cliente.VENCIMIENTO_FACTURAS - DayOf(AFechaVencimiento))); AFechaVencimiento := IncDay(AFechaVencimiento, (AFactura.Cliente.VENCIMIENTO_FACTURAS - DayOf(AFechaVencimiento)));
end; end;
//Comprobamos que la fecha de vencimiento no sea febrero si es asi hay que tratarlo
if (AFactura.Cliente.VENCIMIENTO_FACTURAS > 28)
and (MonthOf(AFechaVencimiento) = 3) and (DayOf(AFechaVencimiento) < 3) then
AFechaVencimiento := IncDay(AFechaVencimiento, - DayOf(AFechaVencimiento));
ARecibos.FECHA_VENCIMIENTO := AFechaVencimiento; ARecibos.FECHA_VENCIMIENTO := AFechaVencimiento;
ARecibos.IMPORTE := AFactura.IMPORTE_TOTAL * (AFormaPago.Plazos.PORCENTAJE / 100); ARecibos.IMPORTE := AFactura.IMPORTE_TOTAL * (AFormaPago.Plazos.PORCENTAJE / 100);

View File

@ -213,12 +213,12 @@ procedure TfEditorFacturaCliente.frViewTotales1ePortePropertiesValidate(
begin begin
inherited; inherited;
if not VarIsNull(DisplayValue) then if (not VarIsNull(DisplayValue)) and (Length(DisplayValue) > 0) then
FFactura.IMPORTE_PORTE := DisplayValue FFactura.IMPORTE_PORTE := DisplayValue
else else
FFactura.IMPORTE_PORTE := 0; FFactura.IMPORTE_PORTE := 0;
RecalcularPortePorUnidad; // RecalcularPortePorUnidad; En los documentos de cliente el porte no se desglosa por articulo
end; end;
function TfEditorFacturaCliente.GetController: IFacturasClienteController; function TfEditorFacturaCliente.GetController: IFacturasClienteController;

View File

@ -96,6 +96,12 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
Kind = skSum Kind = skSum
Position = spFooter Position = spFooter
Column = frViewFacturasCliente1.cxGridViewBASE_IMPONIBLE Column = frViewFacturasCliente1.cxGridViewBASE_IMPONIBLE
end
item
Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Position = spFooter
Column = frViewFacturasCliente1.cxGridViewIMPORTE_TOTAL
end> end>
DataController.Summary.FooterSummaryItems = < DataController.Summary.FooterSummaryItems = <
item item
@ -107,6 +113,11 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
Format = ',0.00 '#8364';-,0.00 '#8364 Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum Kind = skSum
Column = frViewFacturasCliente1.cxGridViewBASE_IMPONIBLE Column = frViewFacturasCliente1.cxGridViewBASE_IMPONIBLE
end
item
Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Column = frViewFacturasCliente1.cxGridViewIMPORTE_TOTAL
end> end>
inherited cxGridViewBASE_IMPONIBLE: TcxGridDBColumn inherited cxGridViewBASE_IMPONIBLE: TcxGridDBColumn
Visible = True Visible = True
@ -130,8 +141,10 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
Width = 240 Width = 240
end end
inherited edtFechaFinFiltro: TcxDateEdit inherited edtFechaFinFiltro: TcxDateEdit
Left = 351 Left = 367
ExplicitLeft = 351 ExplicitLeft = 367
ExplicitWidth = 244
Width = 244
end end
end end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel

View File

@ -209,7 +209,7 @@ procedure TfEditorFacturaProveedor.frViewTotales1ePortePropertiesValidate(
var Error: Boolean); var Error: Boolean);
begin begin
inherited; inherited;
if not VarIsNull(DisplayValue) then if (not VarIsNull(DisplayValue)) and (length(DisplayValue) > 0) then
FFactura.IMPORTE_PORTE := DisplayValue FFactura.IMPORTE_PORTE := DisplayValue
else else
FFactura.IMPORTE_PORTE := 0; FFactura.IMPORTE_PORTE := 0;
@ -420,4 +420,4 @@ begin
end; end;
end. end.

View File

@ -97,6 +97,12 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor
Kind = skSum Kind = skSum
Position = spFooter Position = spFooter
Column = frViewFacturasProveedor1.cxGridViewIMPORTE_TOTAL Column = frViewFacturasProveedor1.cxGridViewIMPORTE_TOTAL
end
item
Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Position = spFooter
Column = frViewFacturasProveedor1.cxGridViewBASE_IMPONIBLE
end> end>
DataController.Summary.FooterSummaryItems = < DataController.Summary.FooterSummaryItems = <
item item
@ -108,6 +114,11 @@ inherited fEditorFacturasProveedor: TfEditorFacturasProveedor
Format = '0 facturas' Format = '0 facturas'
Kind = skCount Kind = skCount
Column = frViewFacturasProveedor1.cxGridViewREFERENCIA Column = frViewFacturasProveedor1.cxGridViewREFERENCIA
end
item
Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Column = frViewFacturasProveedor1.cxGridViewBASE_IMPONIBLE
end> end>
end end
end end

View File

@ -100,7 +100,7 @@ begin
if not Self.DataTable.Editing then if not Self.DataTable.Editing then
Edit; Edit;
IMPORTE_DESCUENTO := IMPORTE_NETO * (DESCUENTO/100); IMPORTE_DESCUENTO := IMPORTE_NETO * (DESCUENTO/100);
BASE_IMPONIBLE := IMPORTE_NETO - IMPORTE_DESCUENTO + IMPORTE_PORTE; BASE_IMPONIBLE := IMPORTE_NETO - IMPORTE_DESCUENTO; // + IMPORTE_PORTE; no se suma porque ya se desglosa en los articulos
end; end;
procedure TBizPedidoProveedor.CalcularImporteTotal; procedure TBizPedidoProveedor.CalcularImporteTotal;

View File

@ -148,7 +148,7 @@ procedure TfEditorPedidoProveedor.frViewTotales1ePortePropertiesValidate(
var Error: Boolean); var Error: Boolean);
begin begin
inherited; inherited;
if not VarIsNull(DisplayValue) then if (not VarIsNull(DisplayValue)) and (length(DisplayValue) > 0) then
FPedido.IMPORTE_PORTE := DisplayValue FPedido.IMPORTE_PORTE := DisplayValue
else else
FPedido.IMPORTE_PORTE := 0; FPedido.IMPORTE_PORTE := 0;
@ -304,4 +304,4 @@ begin
end; end;
end. end.

View File

@ -280,6 +280,10 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
object pagPortada: TTabSheet object pagPortada: TTabSheet
Caption = 'Portada' Caption = 'Portada'
ImageIndex = 3 ImageIndex = 3
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object edtPortada: TcxDBRichEdit object edtPortada: TcxDBRichEdit
Left = 0 Left = 0
Top = 0 Top = 0

View File

@ -152,12 +152,12 @@ procedure TfEditorPresupuestoCliente.frViewTotales1ePortePropertiesValidate(
var Error: Boolean); var Error: Boolean);
begin begin
inherited; inherited;
if not VarIsNull(DisplayValue) then if (not VarIsNull(DisplayValue)) and (Length(DisplayValue) > 0) then
FPresupuesto.IMPORTE_PORTE := DisplayValue FPresupuesto.IMPORTE_PORTE := DisplayValue
else else
FPresupuesto.IMPORTE_PORTE := 0; FPresupuesto.IMPORTE_PORTE := 0;
RecalcularPortePorUnidad; // RecalcularPortePorUnidad; En los documentos de cliente no se desglosa el porte por articulo
end; end;
function TfEditorPresupuestoCliente.GetController: IPresupuestosClienteController; function TfEditorPresupuestoCliente.GetController: IPresupuestosClienteController;

View File

@ -79,14 +79,18 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente
DataController.Summary.DefaultGroupSummaryItems = < DataController.Summary.DefaultGroupSummaryItems = <
item item
Format = ',0.00 '#8364';-,0.00 '#8364 Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Position = spFooter Position = spFooter
Column = frViewRecibosCliente1.cxGridViewIMPORTE_TOTAL Column = frViewRecibosCliente1.cxGridViewIMPORTE_TOTAL
end
item
Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Position = spFooter
Column = frViewRecibosCliente1.cxGridViewIMPORTE
end> end>
DataController.Summary.FooterSummaryItems = < DataController.Summary.FooterSummaryItems = <
item item
Format = ',0.00 '#8364';-,0.00 '#8364 Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Column = frViewRecibosCliente1.cxGridViewIMPORTE_TOTAL Column = frViewRecibosCliente1.cxGridViewIMPORTE_TOTAL
end end
item item

View File

@ -3,7 +3,7 @@ inherited fEditorRecibosProveedor: TfEditorRecibosProveedor
ClientHeight = 664 ClientHeight = 664
ClientWidth = 638 ClientWidth = 638
ExplicitWidth = 646 ExplicitWidth = 646
ExplicitHeight = 698 ExplicitHeight = 691
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader inherited JvNavPanelHeader: TJvNavPanelHeader
@ -79,14 +79,18 @@ inherited fEditorRecibosProveedor: TfEditorRecibosProveedor
DataController.Summary.DefaultGroupSummaryItems = < DataController.Summary.DefaultGroupSummaryItems = <
item item
Format = ',0.00 '#8364';-,0.00 '#8364 Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Position = spFooter Position = spFooter
Column = frViewRecibosProveedor1.cxGridViewIMPORTE_TOTAL Column = frViewRecibosProveedor1.cxGridViewIMPORTE_TOTAL
end
item
Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Position = spFooter
Column = frViewRecibosProveedor1.cxGridViewIMPORTE
end> end>
DataController.Summary.FooterSummaryItems = < DataController.Summary.FooterSummaryItems = <
item item
Format = ',0.00 '#8364';-,0.00 '#8364 Format = ',0.00 '#8364';-,0.00 '#8364
Kind = skSum
Column = frViewRecibosProveedor1.cxGridViewIMPORTE_TOTAL Column = frViewRecibosProveedor1.cxGridViewIMPORTE_TOTAL
end end
item item

Binary file not shown.

View File

@ -14,7 +14,7 @@ BEGIN
BEGIN BEGIN
VALUE "FileVersion", "1.0.0.0\0" VALUE "FileVersion", "1.0.0.0\0"
VALUE "ProductVersion", "1.0.0.0\0" VALUE "ProductVersion", "1.0.0.0\0"
VALUE "CompileDate", "domingo, 25 de noviembre de 2007 17:47\0" VALUE "CompileDate", "miércoles, 05 de diciembre de 2007 20:03\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"