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
@ -101,7 +101,7 @@ begin
|
||||
if not Self.DataTable.Editing then
|
||||
Edit;
|
||||
IMPORTE_DESCUENTO := IMPORTE_NETO * (DESCUENTO/100);
|
||||
BASE_IMPONIBLE := IMPORTE_NETO - IMPORTE_DESCUENTO + IMPORTE_PORTE;
|
||||
BASE_IMPONIBLE := IMPORTE_NETO - IMPORTE_DESCUENTO + IMPORTE_PORTE;
|
||||
end;
|
||||
|
||||
procedure TBizAlbaranCliente.CalcularImporteTotal;
|
||||
|
||||
@ -169,12 +169,12 @@ procedure TfEditorAlbaranCliente.frViewTotales1ePortePropertiesValidate(
|
||||
var Error: Boolean);
|
||||
begin
|
||||
inherited;
|
||||
if not VarIsNull(DisplayValue) then
|
||||
if (not VarIsNull(DisplayValue)) and (Length(DisplayValue) > 0) then
|
||||
FAlbaran.IMPORTE_PORTE := DisplayValue
|
||||
else
|
||||
FAlbaran.IMPORTE_PORTE := 0;
|
||||
|
||||
RecalcularPortePorUnidad;
|
||||
// RecalcularPortePorUnidad; En los documentos de cliente no se desglosa el porte por articulo
|
||||
end;
|
||||
|
||||
function TfEditorAlbaranCliente.GetController: IAlbaranesClienteController;
|
||||
|
||||
@ -270,6 +270,8 @@ begin
|
||||
AArticulosController := NIL;
|
||||
end;
|
||||
end;
|
||||
|
||||
ADetallesController.ActualizarTotales(ADetalles);
|
||||
end;
|
||||
}
|
||||
|
||||
|
||||
@ -169,7 +169,7 @@ procedure TfEditorAlbaranProveedor.frViewTotales1ePortePropertiesValidate(
|
||||
var Error: Boolean);
|
||||
begin
|
||||
inherited;
|
||||
if not VarIsNull(DisplayValue) then
|
||||
if (not VarIsNull(DisplayValue)) and (length(DisplayValue) > 0) then
|
||||
FAlbaran.IMPORTE_PORTE := DisplayValue
|
||||
else
|
||||
FAlbaran.IMPORTE_PORTE := 0;
|
||||
|
||||
@ -223,7 +223,7 @@ begin
|
||||
if (FieldByName(CAMPO_CANTIDAD).AsInteger <> 0) then
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(CAMPO_CANTIDAD).AsInteger := -1;
|
||||
FieldByName(CAMPO_CANTIDAD).AsInteger := (-1) * FieldByName(CAMPO_CANTIDAD).AsInteger;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
|
||||
@ -5,7 +5,7 @@ inherited fEditorCliente: TfEditorCliente
|
||||
ClientHeight = 585
|
||||
ClientWidth = 656
|
||||
ExplicitWidth = 664
|
||||
ExplicitHeight = 619
|
||||
ExplicitHeight = 612
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||
@ -65,11 +65,10 @@ inherited fEditorCliente: TfEditorCliente
|
||||
inherited pgPaginas: TPageControl
|
||||
Width = 656
|
||||
Height = 490
|
||||
ActivePage = pagDatosComerciales
|
||||
ExplicitWidth = 656
|
||||
ExplicitHeight = 490
|
||||
inherited pagGeneral: TTabSheet
|
||||
ExplicitLeft = 0
|
||||
ExplicitTop = 0
|
||||
ExplicitWidth = 648
|
||||
ExplicitHeight = 462
|
||||
inline frViewCliente1: TfrViewCliente
|
||||
@ -206,8 +205,6 @@ inherited fEditorCliente: TfEditorCliente
|
||||
Top = 84
|
||||
ExplicitLeft = 527
|
||||
ExplicitTop = 84
|
||||
ExplicitWidth = 140
|
||||
Width = 140
|
||||
end
|
||||
inherited eFax: TcxDBTextEdit
|
||||
Left = 527
|
||||
@ -294,9 +291,23 @@ inherited fEditorCliente: TfEditorCliente
|
||||
Width = 648
|
||||
LookAndFeel = dxLayoutOfficeLookAndFeel
|
||||
ExplicitWidth = 648
|
||||
inherited eEntidad: TcxDBTextEdit
|
||||
ExplicitWidth = 114
|
||||
Width = 114
|
||||
end
|
||||
inherited eSucursal: TcxDBTextEdit
|
||||
Left = 419
|
||||
ExplicitLeft = 419
|
||||
Left = 418
|
||||
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
|
||||
@ -325,51 +336,67 @@ inherited fEditorCliente: TfEditorCliente
|
||||
LookAndFeel = dxLayoutOfficeLookAndFeel
|
||||
ExplicitWidth = 648
|
||||
inherited Label1: TLabel
|
||||
Left = 378
|
||||
Left = 340
|
||||
Top = 30
|
||||
Width = 206
|
||||
Height = 39
|
||||
ExplicitLeft = 378
|
||||
Width = 229
|
||||
Caption =
|
||||
'Puede indicar el d'#237'a del mes que el cliente desea realizar el pa' +
|
||||
'go de sus recibos.'
|
||||
ExplicitLeft = 340
|
||||
ExplicitTop = 30
|
||||
ExplicitWidth = 206
|
||||
ExplicitHeight = 39
|
||||
ExplicitWidth = 229
|
||||
end
|
||||
inherited eDiasVencimiento: TcxDBSpinEdit
|
||||
Left = 445
|
||||
Top = 75
|
||||
ExplicitLeft = 445
|
||||
ExplicitTop = 75
|
||||
Left = 466
|
||||
Top = 62
|
||||
ExplicitLeft = 466
|
||||
ExplicitTop = 62
|
||||
ExplicitWidth = 160
|
||||
Width = 160
|
||||
end
|
||||
inherited cbRegimenIVA: TcxDBComboBox
|
||||
Top = 30
|
||||
ExplicitTop = 30
|
||||
ExplicitWidth = 121
|
||||
Width = 121
|
||||
end
|
||||
inherited cbRecargoEquivalencia: TcxDBCheckBox
|
||||
Top = 111
|
||||
ExplicitTop = 111
|
||||
ExplicitWidth = 121
|
||||
Width = 121
|
||||
end
|
||||
inherited cbFormaPago: TcxDBLookupComboBox
|
||||
Top = 57
|
||||
ExplicitTop = 57
|
||||
ExplicitWidth = 121
|
||||
Width = 121
|
||||
end
|
||||
inherited bFormasPago: TButton
|
||||
Left = 218
|
||||
Left = 180
|
||||
Top = 57
|
||||
ExplicitLeft = 218
|
||||
ExplicitLeft = 180
|
||||
ExplicitTop = 57
|
||||
end
|
||||
inherited eIVA: TcxDBLookupComboBox
|
||||
Top = 84
|
||||
ExplicitTop = 84
|
||||
ExplicitWidth = 121
|
||||
Width = 121
|
||||
end
|
||||
inherited bTiposIVA: TButton
|
||||
Left = 218
|
||||
Left = 180
|
||||
Top = 84
|
||||
ExplicitLeft = 218
|
||||
ExplicitLeft = 180
|
||||
ExplicitTop = 84
|
||||
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
|
||||
@ -408,15 +435,31 @@ inherited fEditorCliente: TfEditorCliente
|
||||
Width = 648
|
||||
ExplicitWidth = 648
|
||||
inherited ToolButton1: TToolButton
|
||||
Top = 0
|
||||
ExplicitTop = 0
|
||||
ExplicitWidth = 62
|
||||
end
|
||||
inherited ToolButton4: TToolButton
|
||||
Top = 0
|
||||
ExplicitTop = 0
|
||||
ExplicitWidth = 74
|
||||
end
|
||||
inherited ToolButton5: TToolButton
|
||||
Top = 0
|
||||
ExplicitTop = 0
|
||||
end
|
||||
inherited ToolButton2: TToolButton
|
||||
Top = 0
|
||||
ExplicitTop = 0
|
||||
ExplicitWidth = 67
|
||||
end
|
||||
inherited ToolButton6: TToolButton
|
||||
Top = 0
|
||||
ExplicitTop = 0
|
||||
end
|
||||
inherited ToolButton7: TToolButton
|
||||
Top = 0
|
||||
ExplicitTop = 0
|
||||
ExplicitWidth = 117
|
||||
end
|
||||
end
|
||||
@ -451,15 +494,31 @@ inherited fEditorCliente: TfEditorCliente
|
||||
Width = 648
|
||||
ExplicitWidth = 648
|
||||
inherited ToolButton1: TToolButton
|
||||
Top = 0
|
||||
ExplicitTop = 0
|
||||
ExplicitWidth = 62
|
||||
end
|
||||
inherited ToolButton4: TToolButton
|
||||
Top = 0
|
||||
ExplicitTop = 0
|
||||
ExplicitWidth = 74
|
||||
end
|
||||
inherited ToolButton5: TToolButton
|
||||
Top = 0
|
||||
ExplicitTop = 0
|
||||
end
|
||||
inherited ToolButton2: TToolButton
|
||||
Top = 0
|
||||
ExplicitTop = 0
|
||||
ExplicitWidth = 67
|
||||
end
|
||||
inherited ToolButton6: TToolButton
|
||||
Top = 0
|
||||
ExplicitTop = 0
|
||||
end
|
||||
inherited ToolButton7: TToolButton
|
||||
Top = 0
|
||||
ExplicitTop = 0
|
||||
ExplicitWidth = 117
|
||||
end
|
||||
end
|
||||
|
||||
@ -1062,6 +1062,12 @@ begin
|
||||
else
|
||||
AFechaVencimiento := IncDay(AFechaVencimiento, (AFactura.Cliente.VENCIMIENTO_FACTURAS - DayOf(AFechaVencimiento)));
|
||||
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.IMPORTE := AFactura.IMPORTE_TOTAL * (AFormaPago.Plazos.PORCENTAJE / 100);
|
||||
|
||||
@ -136,7 +136,7 @@ begin
|
||||
if not Self.DataTable.Editing then
|
||||
Edit;
|
||||
IMPORTE_DESCUENTO := IMPORTE_NETO * (DESCUENTO/100);
|
||||
BASE_IMPONIBLE := IMPORTE_NETO - IMPORTE_DESCUENTO + IMPORTE_PORTE;
|
||||
BASE_IMPONIBLE := IMPORTE_NETO - IMPORTE_DESCUENTO + IMPORTE_PORTE;
|
||||
end;
|
||||
|
||||
procedure TBizFacturaCliente.CalcularDescuento;
|
||||
|
||||
@ -213,12 +213,12 @@ procedure TfEditorFacturaCliente.frViewTotales1ePortePropertiesValidate(
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if not VarIsNull(DisplayValue) then
|
||||
if (not VarIsNull(DisplayValue)) and (Length(DisplayValue) > 0) then
|
||||
FFactura.IMPORTE_PORTE := DisplayValue
|
||||
else
|
||||
FFactura.IMPORTE_PORTE := 0;
|
||||
|
||||
RecalcularPortePorUnidad;
|
||||
// RecalcularPortePorUnidad; En los documentos de cliente el porte no se desglosa por articulo
|
||||
end;
|
||||
|
||||
function TfEditorFacturaCliente.GetController: IFacturasClienteController;
|
||||
|
||||
@ -96,6 +96,12 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = frViewFacturasCliente1.cxGridViewBASE_IMPONIBLE
|
||||
end
|
||||
item
|
||||
Format = ',0.00 '#8364';-,0.00 '#8364
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = frViewFacturasCliente1.cxGridViewIMPORTE_TOTAL
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
@ -107,6 +113,11 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
|
||||
Format = ',0.00 '#8364';-,0.00 '#8364
|
||||
Kind = skSum
|
||||
Column = frViewFacturasCliente1.cxGridViewBASE_IMPONIBLE
|
||||
end
|
||||
item
|
||||
Format = ',0.00 '#8364';-,0.00 '#8364
|
||||
Kind = skSum
|
||||
Column = frViewFacturasCliente1.cxGridViewIMPORTE_TOTAL
|
||||
end>
|
||||
inherited cxGridViewBASE_IMPONIBLE: TcxGridDBColumn
|
||||
Visible = True
|
||||
@ -130,8 +141,10 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
|
||||
Width = 240
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
Left = 351
|
||||
ExplicitLeft = 351
|
||||
Left = 367
|
||||
ExplicitLeft = 367
|
||||
ExplicitWidth = 244
|
||||
Width = 244
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
|
||||
@ -209,7 +209,7 @@ procedure TfEditorFacturaProveedor.frViewTotales1ePortePropertiesValidate(
|
||||
var Error: Boolean);
|
||||
begin
|
||||
inherited;
|
||||
if not VarIsNull(DisplayValue) then
|
||||
if (not VarIsNull(DisplayValue)) and (length(DisplayValue) > 0) then
|
||||
FFactura.IMPORTE_PORTE := DisplayValue
|
||||
else
|
||||
FFactura.IMPORTE_PORTE := 0;
|
||||
@ -420,4 +420,4 @@ begin
|
||||
end;
|
||||
|
||||
end.
|
||||
| ||||