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:
parent
c034f36dbf
commit
6215ba48c1
@ -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;
|
||||||
|
|||||||
@ -270,6 +270,8 @@ begin
|
|||||||
AArticulosController := NIL;
|
AArticulosController := NIL;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
ADetallesController.ActualizarTotales(ADetalles);
|
||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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.
|
||||||
| |||||||