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

@ -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;

View File

@ -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;

View File

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

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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.

View File

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

View File

@ -100,7 +100,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; no se suma porque ya se desglosa en los articulos
end;
procedure TBizPedidoProveedor.CalcularImporteTotal;

View File

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

View File

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

View File

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

View File

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

View File

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

Binary file not shown.

View File

@ -14,7 +14,7 @@ BEGIN
BEGIN
VALUE "FileVersion", "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
BLOCK "VarFileInfo"