diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql
index 0c70f85f..c2150123 100644
--- a/Database/scripts/factuges.sql
+++ b/Database/scripts/factuges.sql
@@ -722,6 +722,7 @@ CREATE TABLE FACTURAS_CLIENTE (
REFERENCIA VARCHAR(255),
FECHA_FACTURA DATE,
FECHA_VENCIMIENTO DATE,
+ FECHA_RETENCION DATE,
BASE_IMPONIBLE TIPO_IMPORTE,
DESCUENTO TIPO_PORCENTAJE,
IMPORTE_DESCUENTO TIPO_IMPORTE,
@@ -749,7 +750,9 @@ CREATE TABLE FACTURAS_CLIENTE (
RECARGO_EQUIVALENCIA TIPO_BOOLEANO,
ID_COMISION_LIQUIDADA TIPO_ID,
DATOS_BANCARIOS VARCHAR(255),
- CLIENTE_FINAL VARCHAR(255)
+ CLIENTE_FINAL VARCHAR(255),
+ RETENCION TIPO_PORCENTAJE,
+ IMPORTE_RETENCION TIPO_IMPORTE
);
CREATE TABLE FACTURAS_CLIENTE_DETALLES (
@@ -2104,6 +2107,7 @@ CREATE VIEW V_FACTURAS_CLIENTE(
ID_COMISION_LIQUIDADA,
FECHA_FACTURA,
FECHA_VENCIMIENTO,
+ FECHA_RETENCION,
SITUACION,
BASE_IMPONIBLE,
DESCUENTO,
@@ -2133,7 +2137,9 @@ CREATE VIEW V_FACTURAS_CLIENTE(
IMPORTE_NETO,
IMPORTE_PORTE,
ID_AGENTE,
- REFERENCIA_COMISION)
+ REFERENCIA_COMISION,
+ RETENCION,
+ IMPORTE_RETENCION)
AS
SELECT FACTURAS_CLIENTE.ID,
FACTURAS_CLIENTE.ID_EMPRESA,
@@ -2142,6 +2148,7 @@ SELECT FACTURAS_CLIENTE.ID,
FACTURAS_CLIENTE.ID_COMISION_LIQUIDADA,
FACTURAS_CLIENTE.FECHA_FACTURA,
FACTURAS_CLIENTE.FECHA_VENCIMIENTO,
+ FACTURAS_CLIENTE.FECHA_RETENCION,
TRIM(V_FAC_CLI_SITUACION.SITUACION),
FACTURAS_CLIENTE.BASE_IMPONIBLE,
FACTURAS_CLIENTE.DESCUENTO,
@@ -2171,7 +2178,9 @@ SELECT FACTURAS_CLIENTE.ID,
FACTURAS_CLIENTE.IMPORTE_NETO,
FACTURAS_CLIENTE.IMPORTE_PORTE,
CLIENTES_DATOS.ID_AGENTE,
- COMISIONES_LIQUIDADAS.REFERENCIA
+ COMISIONES_LIQUIDADAS.REFERENCIA,
+ FACTURAS_CLIENTE.RETENCION,
+ FACTURAS_CLIENTE.IMPORTE_RETENCION
FROM V_FAC_CLI_SITUACION
LEFT JOIN FACTURAS_CLIENTE
ON (FACTURAS_CLIENTE.ID = V_FAC_CLI_SITUACION.ID_FACTURA)
diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj
index 76cfee0f..01cf1c83 100644
--- a/Source/Cliente/FactuGES.dproj
+++ b/Source/Cliente/FactuGES.dproj
@@ -54,7 +54,11 @@
Delphi.Personality
VCLApplication
-FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse1610FalseFalseFalseFalseFalse30821252Rodax Software S.L.1.6.1.0FactuGESFactuGES1.6.1.0
+FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse1620FalseFalseFalseFalseFalse30821252Rodax Software S.L.1.6.2.0FactuGESFactuGES1.6.2.0
+
+
+
+
diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res
index 5d977b05..82607d81 100644
Binary files a/Source/Cliente/FactuGES.res and b/Source/Cliente/FactuGES.res differ
diff --git a/Source/GUIBase/uViewTotales.dfm b/Source/GUIBase/uViewTotales.dfm
index 06987e90..e4894343 100644
--- a/Source/GUIBase/uViewTotales.dfm
+++ b/Source/GUIBase/uViewTotales.dfm
@@ -1,48 +1,56 @@
inherited frViewTotales: TfrViewTotales
- Width = 790
- Height = 303
+ Width = 949
+ Height = 261
Align = alBottom
- ExplicitWidth = 799
- ExplicitHeight = 303
+ ExplicitWidth = 949
+ ExplicitHeight = 261
+ object Bevel5: TBevel
+ Left = 666
+ Top = 109
+ Width = 108
+ Height = 9
+ Shape = bsBottomLine
+ end
object dxLayoutControl1: TdxLayoutControl
AlignWithMargins = True
Left = 0
Top = 0
- Width = 790
- Height = 217
+ Width = 949
+ Height = 261
Margins.Left = 0
Margins.Top = 0
Margins.Right = 0
Margins.Bottom = 0
- Align = alTop
+ Align = alClient
ParentBackground = True
TabOrder = 0
TabStop = False
AutoContentSizes = [acsWidth, acsHeight]
ExplicitWidth = 451
+ ExplicitHeight = 257
object Bevel1: TBevel
- Left = 104
+ Left = 131
Top = 109
Width = 73
Height = 9
Shape = bsBottomLine
end
object Bevel3: TBevel
- Left = 401
+ Left = 499
Top = 28
Width = 3
Height = 122
Shape = bsRightLine
end
object Bevel4: TBevel
- Left = 513
+ Left = 611
Top = 109
Width = 192
Height = 9
Shape = bsBottomLine
end
object ImporteDto: TcxDBCurrencyEdit
- Left = 175
+ Left = 202
Top = 129
AutoSize = False
DataBinding.DataField = 'IMPORTE_DESCUENTO'
@@ -78,7 +86,7 @@ inherited frViewTotales: TfrViewTotales
Width = 87
end
object ImporteIVA: TcxDBCurrencyEdit
- Left = 584
+ Left = 682
Top = 55
AutoSize = False
DataBinding.DataField = 'IMPORTE_IVA'
@@ -113,7 +121,7 @@ inherited frViewTotales: TfrViewTotales
Width = 20
end
object ImporteTotal: TcxDBCurrencyEdit
- Left = 514
+ Left = 612
Top = 129
AutoSize = False
DataBinding.DataField = 'IMPORTE_TOTAL'
@@ -149,7 +157,7 @@ inherited frViewTotales: TfrViewTotales
Width = 90
end
object edtDescuento: TcxDBSpinEdit
- Left = 104
+ Left = 131
Top = 129
AutoSize = False
DataBinding.DataField = 'DESCUENTO'
@@ -183,7 +191,7 @@ inherited frViewTotales: TfrViewTotales
Width = 65
end
object edtIVA: TcxDBSpinEdit
- Left = 513
+ Left = 611
Top = 55
AutoSize = False
DataBinding.DataField = 'IVA'
@@ -224,7 +232,7 @@ inherited frViewTotales: TfrViewTotales
Width = 65
end
object ImporteBase: TcxDBCurrencyEdit
- Left = 513
+ Left = 611
Top = 28
AutoSize = False
DataBinding.DataField = 'BASE_IMPONIBLE'
@@ -259,7 +267,7 @@ inherited frViewTotales: TfrViewTotales
Width = 91
end
object edtRE: TcxDBSpinEdit
- Left = 513
+ Left = 611
Top = 82
AutoSize = False
DataBinding.DataField = 'RE'
@@ -300,7 +308,7 @@ inherited frViewTotales: TfrViewTotales
Width = 65
end
object ImporteRE: TcxDBCurrencyEdit
- Left = 584
+ Left = 682
Top = 82
AutoSize = False
DataBinding.DataField = 'IMPORTE_RE'
@@ -335,12 +343,11 @@ inherited frViewTotales: TfrViewTotales
Width = 20
end
object eImporteNeto: TcxDBCurrencyEdit
- Left = 104
+ Left = 131
Top = 28
AutoSize = False
DataBinding.DataField = 'IMPORTE_NETO'
DataBinding.DataSource = DADataSource
- Enabled = False
ParentFont = False
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = True
@@ -370,7 +377,7 @@ inherited frViewTotales: TfrViewTotales
Width = 158
end
object ePorte: TcxDBCurrencyEdit
- Left = 104
+ Left = 131
Top = 156
AutoSize = False
DataBinding.DataField = 'IMPORTE_PORTE'
@@ -404,7 +411,7 @@ inherited frViewTotales: TfrViewTotales
Width = 158
end
object eIVA: TcxDBLookupComboBox
- Left = 104
+ Left = 131
Top = 55
DataBinding.DataField = 'ID_TIPO_IVA'
DataBinding.DataSource = DADataSource
@@ -439,7 +446,7 @@ inherited frViewTotales: TfrViewTotales
Width = 20
end
object bTiposIVA: TButton
- Left = 253
+ Left = 351
Top = 55
Width = 132
Height = 21
@@ -447,7 +454,7 @@ inherited frViewTotales: TfrViewTotales
TabOrder = 2
end
object cbRecargoEquivalencia: TcxDBCheckBox
- Left = 104
+ Left = 131
Top = 82
Caption = 'Aplicar recargo de equivalencia'
DataBinding.DataField = 'RECARGO_EQUIVALENCIA'
@@ -476,11 +483,113 @@ inherited frViewTotales: TfrViewTotales
TabOrder = 3
Width = 221
end
+ object edtRetencion: TcxDBSpinEdit
+ Left = 676
+ Top = 218
+ AutoSize = False
+ DataBinding.DataField = 'RETENCION'
+ DataBinding.DataSource = DADataSource
+ ParentFont = False
+ Properties.Alignment.Horz = taRightJustify
+ Properties.AssignedValues.EditFormat = True
+ Properties.DisplayFormat = ',0.00 %;-,0.00 %'
+ Properties.ImmediatePost = True
+ Properties.MaxValue = 100.000000000000000000
+ Style.BorderColor = clWindowFrame
+ Style.BorderStyle = ebs3D
+ Style.Font.Charset = DEFAULT_CHARSET
+ Style.Font.Color = clWindowText
+ Style.Font.Height = -11
+ Style.Font.Name = 'Tahoma'
+ Style.Font.Style = []
+ Style.HotTrack = False
+ Style.LookAndFeel.Kind = lfStandard
+ Style.LookAndFeel.NativeStyle = True
+ Style.LookAndFeel.SkinName = ''
+ Style.TextColor = clWindowText
+ Style.ButtonStyle = bts3D
+ Style.IsFontAssigned = True
+ StyleDisabled.LookAndFeel.Kind = lfStandard
+ StyleDisabled.LookAndFeel.NativeStyle = True
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleDisabled.TextColor = clWindowText
+ StyleFocused.LookAndFeel.Kind = lfStandard
+ StyleFocused.LookAndFeel.NativeStyle = True
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.Kind = lfStandard
+ StyleHot.LookAndFeel.NativeStyle = True
+ StyleHot.LookAndFeel.SkinName = ''
+ TabOrder = 14
+ Height = 21
+ Width = 65
+ end
+ object edtImporteRetencion: TcxDBCurrencyEdit
+ Left = 747
+ Top = 218
+ AutoSize = False
+ DataBinding.DataField = 'IMPORTE_RETENCION'
+ DataBinding.DataSource = DADataSource
+ Enabled = False
+ ParentFont = False
+ Properties.Alignment.Horz = taRightJustify
+ Properties.ReadOnly = True
+ Properties.UseLeftAlignmentOnEditing = False
+ Properties.UseThousandSeparator = True
+ Style.BorderColor = clWindowFrame
+ Style.BorderStyle = ebs3D
+ Style.Font.Charset = DEFAULT_CHARSET
+ Style.Font.Color = clWindowText
+ Style.Font.Height = -11
+ Style.Font.Name = 'Tahoma'
+ Style.Font.Style = []
+ Style.HotTrack = False
+ Style.LookAndFeel.NativeStyle = True
+ Style.LookAndFeel.SkinName = ''
+ Style.TextColor = clWindowText
+ Style.IsFontAssigned = True
+ StyleDisabled.LookAndFeel.NativeStyle = True
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleDisabled.TextColor = clWindowText
+ StyleFocused.LookAndFeel.NativeStyle = True
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.NativeStyle = True
+ StyleHot.LookAndFeel.SkinName = ''
+ TabOrder = 15
+ Height = 21
+ Width = 180
+ end
+ object edtFechaRetencion: TcxDBDateEdit
+ Left = 131
+ Top = 218
+ DataBinding.DataField = 'FECHA_RETENCION'
+ DataBinding.DataSource = DADataSource
+ Style.BorderColor = clWindowFrame
+ Style.BorderStyle = ebs3D
+ Style.HotTrack = False
+ Style.LookAndFeel.Kind = lfStandard
+ Style.LookAndFeel.NativeStyle = True
+ Style.LookAndFeel.SkinName = ''
+ Style.ButtonStyle = bts3D
+ Style.PopupBorderStyle = epbsFrame3D
+ StyleDisabled.LookAndFeel.Kind = lfStandard
+ StyleDisabled.LookAndFeel.NativeStyle = True
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.Kind = lfStandard
+ StyleFocused.LookAndFeel.NativeStyle = True
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.Kind = lfStandard
+ StyleHot.LookAndFeel.NativeStyle = True
+ StyleHot.LookAndFeel.SkinName = ''
+ TabOrder = 13
+ Width = 280
+ end
object dxLayoutControl1Group_Root: TdxLayoutGroup
ShowCaption = False
Hidden = True
ShowBorder = False
object dxLayoutControl1Group1: TdxLayoutGroup
+ AutoAligns = [aaHorizontal]
+ AlignVert = avClient
Caption = 'Importes totales'
LayoutDirection = ldHorizontal
object dxLayoutControl1Group2: TdxLayoutGroup
@@ -645,6 +754,35 @@ inherited frViewTotales: TfrViewTotales
end
end
end
+ object dxLayoutControl1Group12: TdxLayoutGroup
+ LayoutDirection = ldHorizontal
+ object dxLayoutControl1Item21: TdxLayoutItem
+ Caption = 'Fecha vto. retenci'#243'n:'
+ Visible = False
+ Control = edtFechaRetencion
+ ControlOptions.ShowBorder = False
+ end
+ object dxLayoutControl1Group11: TdxLayoutGroup
+ AutoAligns = [aaVertical]
+ AlignHorz = ahRight
+ ShowCaption = False
+ Visible = False
+ Hidden = True
+ LayoutDirection = ldHorizontal
+ ShowBorder = False
+ object dxLayoutControl1Item17: TdxLayoutItem
+ Caption = 'Retenci'#243'n (%):'
+ Control = edtRetencion
+ ControlOptions.ShowBorder = False
+ end
+ object dxLayoutControl1Item18: TdxLayoutItem
+ AutoAligns = [aaVertical]
+ AlignHorz = ahClient
+ Control = edtImporteRetencion
+ ControlOptions.ShowBorder = False
+ end
+ end
+ end
end
object dxLayoutControl1Group4: TdxLayoutGroup
end
diff --git a/Source/GUIBase/uViewTotales.pas b/Source/GUIBase/uViewTotales.pas
index 8c992e4e..1be7908c 100644
--- a/Source/GUIBase/uViewTotales.pas
+++ b/Source/GUIBase/uViewTotales.pas
@@ -8,7 +8,7 @@ uses
cxTextEdit, cxMaskEdit, cxDropDownEdit, cxDBEdit, cxControls,
cxContainer, cxEdit, cxLabel, cxDBLabel, cxCurrencyEdit, cxSpinEdit,
ComCtrls, dxLayoutControl, dxLayoutLookAndFeels, cxLookupEdit, cxDBLookupEdit,
- cxDBLookupComboBox, cxCheckBox, uDAInterfaces;
+ cxDBLookupComboBox, cxCheckBox, uDAInterfaces, cxCalendar;
type
TfrViewTotales = class(TfrViewBase)
@@ -59,6 +59,15 @@ type
dsTiposIVA: TDADataSource;
dxLayoutControl1Item16: TdxLayoutItem;
cbRecargoEquivalencia: TcxDBCheckBox;
+ dxLayoutControl1Item17: TdxLayoutItem;
+ edtRetencion: TcxDBSpinEdit;
+ dxLayoutControl1Item18: TdxLayoutItem;
+ edtImporteRetencion: TcxDBCurrencyEdit;
+ Bevel5: TBevel;
+ dxLayoutControl1Group11: TdxLayoutGroup;
+ dxLayoutControl1Item21: TdxLayoutItem;
+ edtFechaRetencion: TcxDBDateEdit;
+ dxLayoutControl1Group12: TdxLayoutGroup;
public
{ Public declarations }
end;
diff --git a/Source/Informes/1/InfFacturaCliente.fr3 b/Source/Informes/1/InfFacturaCliente.fr3
index 83409d71..6870a97e 100644
--- a/Source/Informes/1/InfFacturaCliente.fr3
+++ b/Source/Informes/1/InfFacturaCliente.fr3
@@ -1,10 +1,10 @@
-
+
-
+
@@ -22,7 +22,8 @@
-
+
+
@@ -32,7 +33,12 @@
+
+
+
+
+
@@ -40,14 +46,15 @@
-
-
+
+
+
diff --git a/Source/Informes/1/InfPedidoProveedor.fr3 b/Source/Informes/1/InfPedidoProveedor.fr3
index 1f3cf267..5f3c72c6 100644
--- a/Source/Informes/1/InfPedidoProveedor.fr3
+++ b/Source/Informes/1/InfPedidoProveedor.fr3
@@ -1,5 +1,5 @@
-
+
@@ -36,10 +36,10 @@
-
-
+
+
-
+
diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
index 3e8c2b3c..98191ad9 100644
--- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
+++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
@@ -1100,6 +1100,7 @@ var
ADiaVencimiento: Integer;
ADiasMas: Integer;
BSemaforo: Boolean;
+ AImporteTotal: Double;
begin
if not Assigned(AFactura) then
@@ -1119,6 +1120,10 @@ begin
ARecibos := ARecibosClienteController.BuscarRecibosFactura(AFactura.ID);
ARecibosClienteController.EliminarTodo(ARecibos);
+ //Si hay retención, se generará un recibo por ese importe, y el resto se generarán recibos
+ //según forma de pago
+ AImporteTotal := AFactura.IMPORTE_TOTAL - AFactura.IMPORTE_RETENCION;
+
//Vamos a generar todos los recibos necesarios para la factura
With AFormaPago.Plazos.DataTable do
begin
@@ -1134,7 +1139,7 @@ begin
if AFormaPago.Plazos.RecordCount < 1 then
begin
ARecibos.FECHA_VENCIMIENTO := AFactura.FECHA_VENCIMIENTO;
- ARecibos.IMPORTE := AFactura.IMPORTE_TOTAL;
+ ARecibos.IMPORTE := AImporteTotal;
end
else
begin
@@ -1173,7 +1178,7 @@ begin
end;
AFechaVencimiento := IncDay(AFechaVencimiento, ADiasMas);
ARecibos.FECHA_VENCIMIENTO := AFechaVencimiento;
- ARecibos.IMPORTE := AFactura.IMPORTE_TOTAL * (AFormaPago.Plazos.PORCENTAJE / 100);
+ ARecibos.IMPORTE := AImporteTotal * (AFormaPago.Plazos.PORCENTAJE / 100);
end;
ARecibos.DESCRIPCION := 'Pago de factura ' + AFactura.REFERENCIA + ': son ' + CifraToLetras(ARecibos.IMPORTE);
@@ -1181,6 +1186,20 @@ begin
Inc(i);
Next;
until (eof);
+
+ //Si hay retención generaremos un recibo para dicha retención
+ if AFactura.IMPORTE_RETENCION > 0 then
+ begin
+ ARecibos := ARecibosClienteController.Nuevo;
+ ARecibos.Edit;
+ ARecibos.ID_FACTURA := AFactura.ID;
+ ARecibos.REFERENCIA := AFactura.REFERENCIA + ' - ' + IntToStr(i);
+ ARecibos.FECHA_EMISION := AFactura.FECHA_FACTURA;
+ ARecibos.FECHA_VENCIMIENTO := AFactura.FECHA_RETENCION;
+ ARecibos.IMPORTE := AFactura.IMPORTE_RETENCION;
+ ARecibos.DESCRIPCION := 'Pago de factura de retención ' + AFactura.REFERENCIA + ': son ' + CifraToLetras(ARecibos.IMPORTE);
+ ARecibosClienteController.Guardar(ARecibos);
+ end;
end;
//Liberamos
diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm
index fc349d72..4294301e 100644
--- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm
+++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm
@@ -69,6 +69,10 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente
Name = 'FECHA_VENCIMIENTO'
DataType = datDateTime
end
+ item
+ Name = 'FECHA_RETENCION'
+ DataType = datDateTime
+ end
item
Name = 'SITUACION'
DataType = datString
@@ -258,6 +262,14 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente
DataType = datString
Size = 255
DictionaryEntry = 'FacturasCliente_REFERENCIA_COMISION'
+ end
+ item
+ Name = 'RETENCION'
+ DataType = datFloat
+ end
+ item
+ Name = 'IMPORTE_RETENCION'
+ DataType = datCurrency
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas
index c235eb85..53658ae5 100644
--- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas
+++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas
@@ -3,14 +3,14 @@ unit schFacturasClienteClient_Intf;
interface
uses
- Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
+ Classes, DB, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
- RID_FacturasCliente = '{6398871A-62BF-4C9E-84DC-AE2D59FEBF59}';
- RID_FacturasCliente_Detalles = '{41556FA6-05C4-45B5-9FEF-D01F46998FE6}';
+ RID_FacturasCliente = '{8F2BDC76-1E34-41E2-8738-14BA1E7BC9BA}';
+ RID_FacturasCliente_Detalles = '{15B6D41F-96C1-4C4E-A224-C2D8F87CD524}';
{ Data table names }
nme_FacturasCliente = 'FacturasCliente';
@@ -24,6 +24,7 @@ const
fld_FacturasClienteID_COMISION_LIQUIDADA = 'ID_COMISION_LIQUIDADA';
fld_FacturasClienteFECHA_FACTURA = 'FECHA_FACTURA';
fld_FacturasClienteFECHA_VENCIMIENTO = 'FECHA_VENCIMIENTO';
+ fld_FacturasClienteFECHA_RETENCION = 'FECHA_RETENCION';
fld_FacturasClienteSITUACION = 'SITUACION';
fld_FacturasClienteBASE_IMPONIBLE = 'BASE_IMPONIBLE';
fld_FacturasClienteDESCUENTO = 'DESCUENTO';
@@ -54,6 +55,8 @@ const
fld_FacturasClienteIMPORTE_PORTE = 'IMPORTE_PORTE';
fld_FacturasClienteID_AGENTE = 'ID_AGENTE';
fld_FacturasClienteREFERENCIA_COMISION = 'REFERENCIA_COMISION';
+ fld_FacturasClienteRETENCION = 'RETENCION';
+ fld_FacturasClienteIMPORTE_RETENCION = 'IMPORTE_RETENCION';
{ FacturasCliente field indexes }
idx_FacturasClienteID = 0;
@@ -63,36 +66,39 @@ const
idx_FacturasClienteID_COMISION_LIQUIDADA = 4;
idx_FacturasClienteFECHA_FACTURA = 5;
idx_FacturasClienteFECHA_VENCIMIENTO = 6;
- idx_FacturasClienteSITUACION = 7;
- idx_FacturasClienteBASE_IMPONIBLE = 8;
- idx_FacturasClienteDESCUENTO = 9;
- idx_FacturasClienteIMPORTE_DESCUENTO = 10;
- idx_FacturasClienteIVA = 11;
- idx_FacturasClienteIMPORTE_IVA = 12;
- idx_FacturasClienteRE = 13;
- idx_FacturasClienteIMPORTE_RE = 14;
- idx_FacturasClienteIMPORTE_TOTAL = 15;
- idx_FacturasClienteOBSERVACIONES = 16;
- idx_FacturasClienteID_CLIENTE = 17;
- idx_FacturasClienteNIF_CIF = 18;
- idx_FacturasClienteNOMBRE = 19;
- idx_FacturasClienteID_DIRECCION = 20;
- idx_FacturasClienteCALLE = 21;
- idx_FacturasClientePOBLACION = 22;
- idx_FacturasClientePROVINCIA = 23;
- idx_FacturasClienteCODIGO_POSTAL = 24;
- idx_FacturasClienteDATOS_BANCARIOS = 25;
- idx_FacturasClienteCLIENTE_FINAL = 26;
- idx_FacturasClienteFECHA_ALTA = 27;
- idx_FacturasClienteFECHA_MODIFICACION = 28;
- idx_FacturasClienteUSUARIO = 29;
- idx_FacturasClienteID_FORMA_PAGO = 30;
- idx_FacturasClienteRECARGO_EQUIVALENCIA = 31;
- idx_FacturasClienteID_TIPO_IVA = 32;
- idx_FacturasClienteIMPORTE_NETO = 33;
- idx_FacturasClienteIMPORTE_PORTE = 34;
- idx_FacturasClienteID_AGENTE = 35;
- idx_FacturasClienteREFERENCIA_COMISION = 36;
+ idx_FacturasClienteFECHA_RETENCION = 7;
+ idx_FacturasClienteSITUACION = 8;
+ idx_FacturasClienteBASE_IMPONIBLE = 9;
+ idx_FacturasClienteDESCUENTO = 10;
+ idx_FacturasClienteIMPORTE_DESCUENTO = 11;
+ idx_FacturasClienteIVA = 12;
+ idx_FacturasClienteIMPORTE_IVA = 13;
+ idx_FacturasClienteRE = 14;
+ idx_FacturasClienteIMPORTE_RE = 15;
+ idx_FacturasClienteIMPORTE_TOTAL = 16;
+ idx_FacturasClienteOBSERVACIONES = 17;
+ idx_FacturasClienteID_CLIENTE = 18;
+ idx_FacturasClienteNIF_CIF = 19;
+ idx_FacturasClienteNOMBRE = 20;
+ idx_FacturasClienteID_DIRECCION = 21;
+ idx_FacturasClienteCALLE = 22;
+ idx_FacturasClientePOBLACION = 23;
+ idx_FacturasClientePROVINCIA = 24;
+ idx_FacturasClienteCODIGO_POSTAL = 25;
+ idx_FacturasClienteDATOS_BANCARIOS = 26;
+ idx_FacturasClienteCLIENTE_FINAL = 27;
+ idx_FacturasClienteFECHA_ALTA = 28;
+ idx_FacturasClienteFECHA_MODIFICACION = 29;
+ idx_FacturasClienteUSUARIO = 30;
+ idx_FacturasClienteID_FORMA_PAGO = 31;
+ idx_FacturasClienteRECARGO_EQUIVALENCIA = 32;
+ idx_FacturasClienteID_TIPO_IVA = 33;
+ idx_FacturasClienteIMPORTE_NETO = 34;
+ idx_FacturasClienteIMPORTE_PORTE = 35;
+ idx_FacturasClienteID_AGENTE = 36;
+ idx_FacturasClienteREFERENCIA_COMISION = 37;
+ idx_FacturasClienteRETENCION = 38;
+ idx_FacturasClienteIMPORTE_RETENCION = 39;
{ FacturasCliente_Detalles fields }
fld_FacturasCliente_DetallesID = 'ID';
@@ -131,7 +137,7 @@ const
type
{ IFacturasCliente }
IFacturasCliente = interface(IDAStronglyTypedDataTable)
- ['{841A0CB0-FD20-4D3E-B21C-7E57896A7E3F}']
+ ['{C8AADCF0-C145-435A-A93E-D1B5ECD0BA1B}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -161,6 +167,10 @@ type
procedure SetFECHA_VENCIMIENTOValue(const aValue: DateTime);
function GetFECHA_VENCIMIENTOIsNull: Boolean;
procedure SetFECHA_VENCIMIENTOIsNull(const aValue: Boolean);
+ function GetFECHA_RETENCIONValue: DateTime;
+ procedure SetFECHA_RETENCIONValue(const aValue: DateTime);
+ function GetFECHA_RETENCIONIsNull: Boolean;
+ procedure SetFECHA_RETENCIONIsNull(const aValue: Boolean);
function GetSITUACIONValue: String;
procedure SetSITUACIONValue(const aValue: String);
function GetSITUACIONIsNull: Boolean;
@@ -280,6 +290,14 @@ type
procedure SetREFERENCIA_COMISIONValue(const aValue: String);
function GetREFERENCIA_COMISIONIsNull: Boolean;
procedure SetREFERENCIA_COMISIONIsNull(const aValue: Boolean);
+ function GetRETENCIONValue: Float;
+ procedure SetRETENCIONValue(const aValue: Float);
+ function GetRETENCIONIsNull: Boolean;
+ procedure SetRETENCIONIsNull(const aValue: Boolean);
+ function GetIMPORTE_RETENCIONValue: Currency;
+ procedure SetIMPORTE_RETENCIONValue(const aValue: Currency);
+ function GetIMPORTE_RETENCIONIsNull: Boolean;
+ procedure SetIMPORTE_RETENCIONIsNull(const aValue: Boolean);
{ Properties }
@@ -297,6 +315,8 @@ type
property FECHA_FACTURAIsNull: Boolean read GetFECHA_FACTURAIsNull write SetFECHA_FACTURAIsNull;
property FECHA_VENCIMIENTO: DateTime read GetFECHA_VENCIMIENTOValue write SetFECHA_VENCIMIENTOValue;
property FECHA_VENCIMIENTOIsNull: Boolean read GetFECHA_VENCIMIENTOIsNull write SetFECHA_VENCIMIENTOIsNull;
+ property FECHA_RETENCION: DateTime read GetFECHA_RETENCIONValue write SetFECHA_RETENCIONValue;
+ property FECHA_RETENCIONIsNull: Boolean read GetFECHA_RETENCIONIsNull write SetFECHA_RETENCIONIsNull;
property SITUACION: String read GetSITUACIONValue write SetSITUACIONValue;
property SITUACIONIsNull: Boolean read GetSITUACIONIsNull write SetSITUACIONIsNull;
property BASE_IMPONIBLE: Currency read GetBASE_IMPONIBLEValue write SetBASE_IMPONIBLEValue;
@@ -357,10 +377,14 @@ type
property ID_AGENTEIsNull: Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull;
property REFERENCIA_COMISION: String read GetREFERENCIA_COMISIONValue write SetREFERENCIA_COMISIONValue;
property REFERENCIA_COMISIONIsNull: Boolean read GetREFERENCIA_COMISIONIsNull write SetREFERENCIA_COMISIONIsNull;
+ property RETENCION: Float read GetRETENCIONValue write SetRETENCIONValue;
+ property RETENCIONIsNull: Boolean read GetRETENCIONIsNull write SetRETENCIONIsNull;
+ property IMPORTE_RETENCION: Currency read GetIMPORTE_RETENCIONValue write SetIMPORTE_RETENCIONValue;
+ property IMPORTE_RETENCIONIsNull: Boolean read GetIMPORTE_RETENCIONIsNull write SetIMPORTE_RETENCIONIsNull;
end;
{ TFacturasClienteDataTableRules }
- TFacturasClienteDataTableRules = class(TIntfObjectDADataTableRules, IFacturasCliente)
+ TFacturasClienteDataTableRules = class(TDADataTableRules, IFacturasCliente)
private
f_OBSERVACIONES: IROStrings;
procedure OBSERVACIONES_OnChange(Sender: TObject);
@@ -394,6 +418,10 @@ type
procedure SetFECHA_VENCIMIENTOValue(const aValue: DateTime); virtual;
function GetFECHA_VENCIMIENTOIsNull: Boolean; virtual;
procedure SetFECHA_VENCIMIENTOIsNull(const aValue: Boolean); virtual;
+ function GetFECHA_RETENCIONValue: DateTime; virtual;
+ procedure SetFECHA_RETENCIONValue(const aValue: DateTime); virtual;
+ function GetFECHA_RETENCIONIsNull: Boolean; virtual;
+ procedure SetFECHA_RETENCIONIsNull(const aValue: Boolean); virtual;
function GetSITUACIONValue: String; virtual;
procedure SetSITUACIONValue(const aValue: String); virtual;
function GetSITUACIONIsNull: Boolean; virtual;
@@ -513,6 +541,14 @@ type
procedure SetREFERENCIA_COMISIONValue(const aValue: String); virtual;
function GetREFERENCIA_COMISIONIsNull: Boolean; virtual;
procedure SetREFERENCIA_COMISIONIsNull(const aValue: Boolean); virtual;
+ function GetRETENCIONValue: Float; virtual;
+ procedure SetRETENCIONValue(const aValue: Float); virtual;
+ function GetRETENCIONIsNull: Boolean; virtual;
+ procedure SetRETENCIONIsNull(const aValue: Boolean); virtual;
+ function GetIMPORTE_RETENCIONValue: Currency; virtual;
+ procedure SetIMPORTE_RETENCIONValue(const aValue: Currency); virtual;
+ function GetIMPORTE_RETENCIONIsNull: Boolean; virtual;
+ procedure SetIMPORTE_RETENCIONIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@@ -529,6 +565,8 @@ type
property FECHA_FACTURAIsNull: Boolean read GetFECHA_FACTURAIsNull write SetFECHA_FACTURAIsNull;
property FECHA_VENCIMIENTO: DateTime read GetFECHA_VENCIMIENTOValue write SetFECHA_VENCIMIENTOValue;
property FECHA_VENCIMIENTOIsNull: Boolean read GetFECHA_VENCIMIENTOIsNull write SetFECHA_VENCIMIENTOIsNull;
+ property FECHA_RETENCION: DateTime read GetFECHA_RETENCIONValue write SetFECHA_RETENCIONValue;
+ property FECHA_RETENCIONIsNull: Boolean read GetFECHA_RETENCIONIsNull write SetFECHA_RETENCIONIsNull;
property SITUACION: String read GetSITUACIONValue write SetSITUACIONValue;
property SITUACIONIsNull: Boolean read GetSITUACIONIsNull write SetSITUACIONIsNull;
property BASE_IMPONIBLE: Currency read GetBASE_IMPONIBLEValue write SetBASE_IMPONIBLEValue;
@@ -589,6 +627,10 @@ type
property ID_AGENTEIsNull: Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull;
property REFERENCIA_COMISION: String read GetREFERENCIA_COMISIONValue write SetREFERENCIA_COMISIONValue;
property REFERENCIA_COMISIONIsNull: Boolean read GetREFERENCIA_COMISIONIsNull write SetREFERENCIA_COMISIONIsNull;
+ property RETENCION: Float read GetRETENCIONValue write SetRETENCIONValue;
+ property RETENCIONIsNull: Boolean read GetRETENCIONIsNull write SetRETENCIONIsNull;
+ property IMPORTE_RETENCION: Currency read GetIMPORTE_RETENCIONValue write SetIMPORTE_RETENCIONValue;
+ property IMPORTE_RETENCIONIsNull: Boolean read GetIMPORTE_RETENCIONIsNull write SetIMPORTE_RETENCIONIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@@ -598,7 +640,7 @@ type
{ IFacturasCliente_Detalles }
IFacturasCliente_Detalles = interface(IDAStronglyTypedDataTable)
- ['{49F2E19B-A0E4-4622-8698-5BA5688EA6F4}']
+ ['{F9994FFA-FB1C-4221-A444-441E23C4E2AD}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -696,7 +738,7 @@ type
end;
{ TFacturasCliente_DetallesDataTableRules }
- TFacturasCliente_DetallesDataTableRules = class(TIntfObjectDADataTableRules, IFacturasCliente_Detalles)
+ TFacturasCliente_DetallesDataTableRules = class(TDADataTableRules, IFacturasCliente_Detalles)
private
protected
{ Property getters and setters }
@@ -972,6 +1014,27 @@ begin
DataTable.Fields[idx_FacturasClienteFECHA_VENCIMIENTO].AsVariant := Null;
end;
+function TFacturasClienteDataTableRules.GetFECHA_RETENCIONValue: DateTime;
+begin
+ result := DataTable.Fields[idx_FacturasClienteFECHA_RETENCION].AsDateTime;
+end;
+
+procedure TFacturasClienteDataTableRules.SetFECHA_RETENCIONValue(const aValue: DateTime);
+begin
+ DataTable.Fields[idx_FacturasClienteFECHA_RETENCION].AsDateTime := aValue;
+end;
+
+function TFacturasClienteDataTableRules.GetFECHA_RETENCIONIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_FacturasClienteFECHA_RETENCION].IsNull;
+end;
+
+procedure TFacturasClienteDataTableRules.SetFECHA_RETENCIONIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_FacturasClienteFECHA_RETENCION].AsVariant := Null;
+end;
+
function TFacturasClienteDataTableRules.GetSITUACIONValue: String;
begin
result := DataTable.Fields[idx_FacturasClienteSITUACION].AsString;
@@ -1598,6 +1661,48 @@ begin
DataTable.Fields[idx_FacturasClienteREFERENCIA_COMISION].AsVariant := Null;
end;
+function TFacturasClienteDataTableRules.GetRETENCIONValue: Float;
+begin
+ result := DataTable.Fields[idx_FacturasClienteRETENCION].AsFloat;
+end;
+
+procedure TFacturasClienteDataTableRules.SetRETENCIONValue(const aValue: Float);
+begin
+ DataTable.Fields[idx_FacturasClienteRETENCION].AsFloat := aValue;
+end;
+
+function TFacturasClienteDataTableRules.GetRETENCIONIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_FacturasClienteRETENCION].IsNull;
+end;
+
+procedure TFacturasClienteDataTableRules.SetRETENCIONIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_FacturasClienteRETENCION].AsVariant := Null;
+end;
+
+function TFacturasClienteDataTableRules.GetIMPORTE_RETENCIONValue: Currency;
+begin
+ result := DataTable.Fields[idx_FacturasClienteIMPORTE_RETENCION].AsCurrency;
+end;
+
+procedure TFacturasClienteDataTableRules.SetIMPORTE_RETENCIONValue(const aValue: Currency);
+begin
+ DataTable.Fields[idx_FacturasClienteIMPORTE_RETENCION].AsCurrency := aValue;
+end;
+
+function TFacturasClienteDataTableRules.GetIMPORTE_RETENCIONIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_FacturasClienteIMPORTE_RETENCION].IsNull;
+end;
+
+procedure TFacturasClienteDataTableRules.SetIMPORTE_RETENCIONIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_FacturasClienteIMPORTE_RETENCION].AsVariant := Null;
+end;
+
{ TFacturasCliente_DetallesDataTableRules }
constructor TFacturasCliente_DetallesDataTableRules.Create(aDataTable: TDADataTable);
diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas
index 7fe446a3..dba06cdf 100644
--- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas
+++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas
@@ -9,13 +9,13 @@ const
{ Delta rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
- RID_FacturasClienteDelta = '{4DF9EBCC-478A-4AC5-A507-11E084413331}';
- RID_FacturasCliente_DetallesDelta = '{C026B2FA-D8FB-46B6-B9A9-CD245AB46BBF}';
+ RID_FacturasClienteDelta = '{B00FDA28-E442-4DDF-98FA-DED7AD95E83C}';
+ RID_FacturasCliente_DetallesDelta = '{AA6EC893-0E21-40B3-9BCC-8C857AF39A68}';
type
{ IFacturasClienteDelta }
IFacturasClienteDelta = interface(IFacturasCliente)
- ['{4DF9EBCC-478A-4AC5-A507-11E084413331}']
+ ['{B00FDA28-E442-4DDF-98FA-DED7AD95E83C}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -24,6 +24,7 @@ type
function GetOldID_COMISION_LIQUIDADAValue : Integer;
function GetOldFECHA_FACTURAValue : DateTime;
function GetOldFECHA_VENCIMIENTOValue : DateTime;
+ function GetOldFECHA_RETENCIONValue : DateTime;
function GetOldSITUACIONValue : String;
function GetOldBASE_IMPONIBLEValue : Currency;
function GetOldDESCUENTOValue : Float;
@@ -54,6 +55,8 @@ type
function GetOldIMPORTE_PORTEValue : Currency;
function GetOldID_AGENTEValue : Integer;
function GetOldREFERENCIA_COMISIONValue : String;
+ function GetOldRETENCIONValue : Float;
+ function GetOldIMPORTE_RETENCIONValue : Currency;
{ Properties }
property OldID : Integer read GetOldIDValue;
@@ -63,6 +66,7 @@ type
property OldID_COMISION_LIQUIDADA : Integer read GetOldID_COMISION_LIQUIDADAValue;
property OldFECHA_FACTURA : DateTime read GetOldFECHA_FACTURAValue;
property OldFECHA_VENCIMIENTO : DateTime read GetOldFECHA_VENCIMIENTOValue;
+ property OldFECHA_RETENCION : DateTime read GetOldFECHA_RETENCIONValue;
property OldSITUACION : String read GetOldSITUACIONValue;
property OldBASE_IMPONIBLE : Currency read GetOldBASE_IMPONIBLEValue;
property OldDESCUENTO : Float read GetOldDESCUENTOValue;
@@ -93,6 +97,8 @@ type
property OldIMPORTE_PORTE : Currency read GetOldIMPORTE_PORTEValue;
property OldID_AGENTE : Integer read GetOldID_AGENTEValue;
property OldREFERENCIA_COMISION : String read GetOldREFERENCIA_COMISIONValue;
+ property OldRETENCION : Float read GetOldRETENCIONValue;
+ property OldIMPORTE_RETENCION : Currency read GetOldIMPORTE_RETENCIONValue;
end;
{ TFacturasClienteBusinessProcessorRules }
@@ -144,6 +150,12 @@ type
function GetOldFECHA_VENCIMIENTOIsNull: Boolean; virtual;
procedure SetFECHA_VENCIMIENTOValue(const aValue: DateTime); virtual;
procedure SetFECHA_VENCIMIENTOIsNull(const aValue: Boolean); virtual;
+ function GetFECHA_RETENCIONValue: DateTime; virtual;
+ function GetFECHA_RETENCIONIsNull: Boolean; virtual;
+ function GetOldFECHA_RETENCIONValue: DateTime; virtual;
+ function GetOldFECHA_RETENCIONIsNull: Boolean; virtual;
+ procedure SetFECHA_RETENCIONValue(const aValue: DateTime); virtual;
+ procedure SetFECHA_RETENCIONIsNull(const aValue: Boolean); virtual;
function GetSITUACIONValue: String; virtual;
function GetSITUACIONIsNull: Boolean; virtual;
function GetOldSITUACIONValue: String; virtual;
@@ -323,6 +335,18 @@ type
function GetOldREFERENCIA_COMISIONIsNull: Boolean; virtual;
procedure SetREFERENCIA_COMISIONValue(const aValue: String); virtual;
procedure SetREFERENCIA_COMISIONIsNull(const aValue: Boolean); virtual;
+ function GetRETENCIONValue: Float; virtual;
+ function GetRETENCIONIsNull: Boolean; virtual;
+ function GetOldRETENCIONValue: Float; virtual;
+ function GetOldRETENCIONIsNull: Boolean; virtual;
+ procedure SetRETENCIONValue(const aValue: Float); virtual;
+ procedure SetRETENCIONIsNull(const aValue: Boolean); virtual;
+ function GetIMPORTE_RETENCIONValue: Currency; virtual;
+ function GetIMPORTE_RETENCIONIsNull: Boolean; virtual;
+ function GetOldIMPORTE_RETENCIONValue: Currency; virtual;
+ function GetOldIMPORTE_RETENCIONIsNull: Boolean; virtual;
+ procedure SetIMPORTE_RETENCIONValue(const aValue: Currency); virtual;
+ procedure SetIMPORTE_RETENCIONIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@@ -353,6 +377,10 @@ type
property FECHA_VENCIMIENTOIsNull : Boolean read GetFECHA_VENCIMIENTOIsNull write SetFECHA_VENCIMIENTOIsNull;
property OldFECHA_VENCIMIENTO : DateTime read GetOldFECHA_VENCIMIENTOValue;
property OldFECHA_VENCIMIENTOIsNull : Boolean read GetOldFECHA_VENCIMIENTOIsNull;
+ property FECHA_RETENCION : DateTime read GetFECHA_RETENCIONValue write SetFECHA_RETENCIONValue;
+ property FECHA_RETENCIONIsNull : Boolean read GetFECHA_RETENCIONIsNull write SetFECHA_RETENCIONIsNull;
+ property OldFECHA_RETENCION : DateTime read GetOldFECHA_RETENCIONValue;
+ property OldFECHA_RETENCIONIsNull : Boolean read GetOldFECHA_RETENCIONIsNull;
property SITUACION : String read GetSITUACIONValue write SetSITUACIONValue;
property SITUACIONIsNull : Boolean read GetSITUACIONIsNull write SetSITUACIONIsNull;
property OldSITUACION : String read GetOldSITUACIONValue;
@@ -473,6 +501,14 @@ type
property REFERENCIA_COMISIONIsNull : Boolean read GetREFERENCIA_COMISIONIsNull write SetREFERENCIA_COMISIONIsNull;
property OldREFERENCIA_COMISION : String read GetOldREFERENCIA_COMISIONValue;
property OldREFERENCIA_COMISIONIsNull : Boolean read GetOldREFERENCIA_COMISIONIsNull;
+ property RETENCION : Float read GetRETENCIONValue write SetRETENCIONValue;
+ property RETENCIONIsNull : Boolean read GetRETENCIONIsNull write SetRETENCIONIsNull;
+ property OldRETENCION : Float read GetOldRETENCIONValue;
+ property OldRETENCIONIsNull : Boolean read GetOldRETENCIONIsNull;
+ property IMPORTE_RETENCION : Currency read GetIMPORTE_RETENCIONValue write SetIMPORTE_RETENCIONValue;
+ property IMPORTE_RETENCIONIsNull : Boolean read GetIMPORTE_RETENCIONIsNull write SetIMPORTE_RETENCIONIsNull;
+ property OldIMPORTE_RETENCION : Currency read GetOldIMPORTE_RETENCIONValue;
+ property OldIMPORTE_RETENCIONIsNull : Boolean read GetOldIMPORTE_RETENCIONIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@@ -482,7 +518,7 @@ type
{ IFacturasCliente_DetallesDelta }
IFacturasCliente_DetallesDelta = interface(IFacturasCliente_Detalles)
- ['{C026B2FA-D8FB-46B6-B9A9-CD245AB46BBF}']
+ ['{AA6EC893-0E21-40B3-9BCC-8C857AF39A68}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_FACTURAValue : Integer;
@@ -926,6 +962,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteFECHA_VENCIMIENTO] := Null;
end;
+function TFacturasClienteBusinessProcessorRules.GetFECHA_RETENCIONValue: DateTime;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteFECHA_RETENCION];
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetFECHA_RETENCIONIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteFECHA_RETENCION]);
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetOldFECHA_RETENCIONValue: DateTime;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteFECHA_RETENCION];
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetOldFECHA_RETENCIONIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteFECHA_RETENCION]);
+end;
+
+procedure TFacturasClienteBusinessProcessorRules.SetFECHA_RETENCIONValue(const aValue: DateTime);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteFECHA_RETENCION] := aValue;
+end;
+
+procedure TFacturasClienteBusinessProcessorRules.SetFECHA_RETENCIONIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteFECHA_RETENCION] := Null;
+end;
+
function TFacturasClienteBusinessProcessorRules.GetSITUACIONValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteSITUACION];
@@ -1853,6 +1920,68 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteREFERENCIA_COMISION] := Null;
end;
+function TFacturasClienteBusinessProcessorRules.GetRETENCIONValue: Float;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteRETENCION];
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetRETENCIONIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteRETENCION]);
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetOldRETENCIONValue: Float;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteRETENCION];
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetOldRETENCIONIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteRETENCION]);
+end;
+
+procedure TFacturasClienteBusinessProcessorRules.SetRETENCIONValue(const aValue: Float);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteRETENCION] := aValue;
+end;
+
+procedure TFacturasClienteBusinessProcessorRules.SetRETENCIONIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteRETENCION] := Null;
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetIMPORTE_RETENCIONValue: Currency;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteIMPORTE_RETENCION];
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetIMPORTE_RETENCIONIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteIMPORTE_RETENCION]);
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetOldIMPORTE_RETENCIONValue: Currency;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteIMPORTE_RETENCION];
+end;
+
+function TFacturasClienteBusinessProcessorRules.GetOldIMPORTE_RETENCIONIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteIMPORTE_RETENCION]);
+end;
+
+procedure TFacturasClienteBusinessProcessorRules.SetIMPORTE_RETENCIONValue(const aValue: Currency);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteIMPORTE_RETENCION] := aValue;
+end;
+
+procedure TFacturasClienteBusinessProcessorRules.SetIMPORTE_RETENCIONIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteIMPORTE_RETENCION] := Null;
+end;
+
{ TFacturasCliente_DetallesBusinessProcessorRules }
constructor TFacturasCliente_DetallesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
diff --git a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas
index 0dc6f417..82fbc83a 100644
--- a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas
+++ b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas
@@ -44,6 +44,7 @@ type
procedure CalcularDescuento;
procedure CalcularIVA;
procedure CalcularRE;
+ procedure CalcularRetencion;
procedure CalcularBaseImponible;
procedure AsignarTipoIVA (IDTipoIVA : Integer);
@@ -69,10 +70,11 @@ type
procedure DESCUENTOOnChange(Sender: TDACustomField);
procedure IVAOnChange(Sender: TDACustomField);
procedure REOnChange(Sender: TDACustomField);
+ procedure RetencionOnChange(Sender: TDACustomField);
procedure OnNewRecord(Sender: TDADataTable); override;
- function GetSITUACIONValue: String; override;
+ function GetSITUACIONValue: String; override;
// procedure SetID_FORMA_PAGOValue(const aValue: Integer); override;
procedure SetID_COMISION_LIQUIDADAValue(const aValue: Integer); override;
procedure SetID_TIPO_IVAValue(const aValue: Integer); override;
@@ -154,6 +156,7 @@ begin
CalcularBaseImponible;
CalcularIVA;
CalcularRE;
+ CalcularRetencion;
if not Self.DataTable.Editing then
Edit;
@@ -178,6 +181,13 @@ begin
IMPORTE_RE := (RE / 100) * (BASE_IMPONIBLE - IMPORTE_DESCUENTO);
end;
+procedure TBizFacturaCliente.CalcularRetencion;
+begin
+ if not Self.DataTable.Editing then
+ Edit;
+ IMPORTE_RETENCION := (RETENCION / 100) * (BASE_IMPONIBLE - IMPORTE_DESCUENTO);
+end;
+
constructor TBizFacturaCliente.Create(aDataTable: TDADataTable);
begin
inherited;
@@ -193,6 +203,7 @@ begin
FieldByName(fld_FacturasClienteDESCUENTO).OnChange := DESCUENTOOnChange;
FieldByName(fld_FacturasClienteIVA).OnChange := IVAOnChange;
FieldByName(fld_FacturasClienteRE).OnChange := REOnChange;
+ FieldByName(fld_FacturasClienteRetencion).OnChange := RetencionOnChange;
end;
FDetallesLink := TDADataSource.Create(NIL);
@@ -283,6 +294,11 @@ begin
CalcularImporteTotal;
end;
+procedure TBizFacturaCliente.RetencionOnChange(Sender: TDACustomField);
+begin
+ CalcularImporteTotal;
+end;
+
procedure TBizFacturaCliente.SetCliente(AValue: IBizCliente);
var
bEnEdicion : Boolean;
diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm
index c2c2e64c..76a12a6f 100644
--- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm
+++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm
@@ -20,21 +20,22 @@ object RptFacturasCliente: TRptFacturasCliente
SQL =
'select'#10' v_facturas_cliente.id, v_facturas_cliente.id_empresa,'#10 +
' v_facturas_cliente.referencia, v_facturas_cliente.tipo,'#10' v_' +
- 'facturas_cliente.fecha_factura, v_facturas_cliente.base_imponibl' +
- 'e,'#10' v_facturas_cliente.situacion, v_facturas_cliente.descuento' +
- ','#10' v_facturas_cliente.importe_descuento, v_facturas_cliente.iv' +
- 'a,'#10' v_facturas_cliente.importe_iva, v_facturas_cliente.re,'#10' ' +
- 'v_facturas_cliente.importe_re, v_facturas_cliente.importe_total,' +
- #10' v_facturas_cliente.observaciones, v_facturas_cliente.nif_cif' +
- ','#10' v_facturas_cliente.id_cliente, v_facturas_cliente.nombre,'#10' ' +
- ' v_facturas_cliente.calle, v_facturas_cliente.provincia,'#10' v_f' +
- 'acturas_cliente.poblacion, v_facturas_cliente.codigo_postal,'#10' ' +
- 'v_facturas_cliente.recargo_equivalencia, v_facturas_cliente.impo' +
- 'rte_neto,'#10' v_facturas_cliente.importe_porte, formas_pago.descr' +
- 'ipcion as FORMA_PAGO,'#10' v_facturas_cliente.DATOS_BANCARIOS'#10'from' +
- ' v_facturas_cliente'#10' left outer join formas_pago on (formas_pa' +
- 'go.id = v_facturas_cliente.id_forma_pago)'#10'WHERE V_FACTURAS_CLIEN' +
- 'TE.ID = :ID'#10
+ 'facturas_cliente.fecha_factura, v_facturas_cliente.fecha_VENCIMI' +
+ 'ENTO,'#10' v_facturas_cliente.base_imponible,'#10' v_facturas_client' +
+ 'e.situacion, v_facturas_cliente.descuento,'#10' v_facturas_cliente' +
+ '.importe_descuento, v_facturas_cliente.iva,'#10' v_facturas_client' +
+ 'e.importe_iva, v_facturas_cliente.re,'#10' v_facturas_cliente.impo' +
+ 'rte_re, v_facturas_cliente.importe_total,'#10' v_facturas_cliente.' +
+ 'observaciones, v_facturas_cliente.nif_cif,'#10' v_facturas_cliente' +
+ '.id_cliente, v_facturas_cliente.nombre,'#10' v_facturas_cliente.ca' +
+ 'lle, v_facturas_cliente.provincia,'#10' v_facturas_cliente.poblaci' +
+ 'on, v_facturas_cliente.codigo_postal,'#10' v_facturas_cliente.reca' +
+ 'rgo_equivalencia, v_facturas_cliente.importe_neto,'#10' v_facturas' +
+ '_cliente.importe_porte, formas_pago.descripcion as FORMA_PAGO,'#10' ' +
+ ' v_facturas_cliente.DATOS_BANCARIOS, v_facturas_cliente.RETENCI' +
+ 'ON, v_facturas_cliente.IMPORTE_RETENCION'#10'from v_facturas_cliente' +
+ #10' left outer join formas_pago on (formas_pago.id = v_facturas_' +
+ 'cliente.id_forma_pago)'#10'WHERE V_FACTURAS_CLIENTE.ID = :ID'#10
StatementType = stSQL
ColumnMappings = <
item
@@ -144,6 +145,18 @@ object RptFacturasCliente: TRptFacturasCliente
item
DatasetField = 'DATOS_BANCARIOS'
TableField = 'DATOS_BANCARIOS'
+ end
+ item
+ DatasetField = 'FECHA_VENCIMIENTO'
+ TableField = 'FECHA_VENCIMIENTO'
+ end
+ item
+ DatasetField = 'RETENCION'
+ TableField = 'RETENCION'
+ end
+ item
+ DatasetField = 'IMPORTE_RETENCION'
+ TableField = 'IMPORTE_RETENCION'
end>
end>
Name = 'InformeFacturasCliente'
@@ -175,6 +188,10 @@ object RptFacturasCliente: TRptFacturasCliente
DataType = datDateTime
DictionaryEntry = 'FacturasCliente_FECHA_FACTURA'
end
+ item
+ Name = 'FECHA_VENCIMIENTO'
+ DataType = datDateTime
+ end
item
Name = 'BASE_IMPONIBLE'
DataType = datCurrency
@@ -285,6 +302,14 @@ object RptFacturasCliente: TRptFacturasCliente
Name = 'DATOS_BANCARIOS'
DataType = datString
Size = 255
+ end
+ item
+ Name = 'RETENCION'
+ DataType = datFloat
+ end
+ item
+ Name = 'IMPORTE_RETENCION'
+ DataType = datCurrency
end>
ReadOnly = True
end
@@ -1237,6 +1262,10 @@ object RptFacturasCliente: TRptFacturasCliente
DataType = datDateTime
DictionaryEntry = 'FacturasCliente_FECHA_FACTURA'
end
+ item
+ Name = 'FECHA_VENCIMIENTO'
+ DataType = datDateTime
+ end
item
Name = 'BASE_IMPONIBLE'
DataType = datCurrency
@@ -1347,6 +1376,14 @@ object RptFacturasCliente: TRptFacturasCliente
Name = 'DATOS_BANCARIOS'
DataType = datString
Size = 255
+ end
+ item
+ Name = 'RETENCION'
+ DataType = datFloat
+ end
+ item
+ Name = 'IMPORTE_RETENCION'
+ DataType = datCurrency
end>
Params = <
item
@@ -1404,17 +1441,67 @@ object RptFacturasCliente: TRptFacturasCliente
PreviewOptions.Zoom = 1.000000000000000000
PrintOptions.Printer = 'Por defecto'
PrintOptions.PrintOnSheet = 0
- ReportOptions.CreateDate = 37800.807714351900000000
- ReportOptions.LastChange = 39821.581470081020000000
+ ReportOptions.CreateDate = 39065.872423495400000000
+ ReportOptions.LastChange = 39828.562168217590000000
ScriptLanguage = 'PascalScript'
ScriptText.Strings = (
- 'procedure frxReportOnStartReport(Sender: TfrxComponent);'
+ ''
+ 'procedure DatosEmpresaOnBeforePrint(Sender: TfrxComponent);'
+ 'var'
+ ' Cadena: String;'
'begin'
- ' Set('#39'Pagina'#39', 0);'
- ' Set('#39'TotalPaginas'#39', 0); '
+ '{ DatosEmpresa.Lines.Clear;'
+ ' if ( <> '#39#39') then'
+ ' Cadena := '#39'TLF: '#39' + ;'
+ ' if ( <> '#39#39') then'
+
+ ' Cadena := Cadena + '#39' FAX: '#39' + ;'
+ ' DatosEmpresa.Lines.Add(Cadena);'
+ '}'
'end;'
''
- 'procedure Band1OnBeforePrint(Sender: TfrxComponent);'
+ 'procedure NombreEmpresaOnBeforePrint(Sender: TfrxComponent);'
+ 'begin'
+ '{ NombreEmpresa.Lines.Clear;'
+ ' NombreEmpresa.Lines.Add();'
+ '}'
+ 'end;'
+ ''
+ 'procedure DireccionEnvioOnBeforePrint(Sender: TfrxComponent);'
+ 'var'
+ ' ACadena : String;'
+ 'begin'
+ '{ ACadena := '#39#39';'
+ ' DireccionEnvio.Lines.Clear;'
+ ' if ( <> '#39#39') then'
+ ' ACadena := ;'
+ ''
+ ' if ( <> '#39#39') then'
+
+ ' ACadena := ACadena + '#39' '#39' + ;'
+ ''
+ ' DireccionEnvio.Lines.Add(ACadena);'
+ ' ACadena := '#39#39';'
+ ' DireccionEnvio.Lines.Add();'
+ ' if ( <> '#39#39') then'
+ ' ACadena := + '#39' '#39';'
+ ' if ( <> '#39#39') then'
+ ' ACadena := ACadena + ;'
+ ''
+ ' if (ACadena <> '#39#39') then'
+ ' DireccionEnvio.Lines.Add(ACadena);'
+ ''
+ ' if ( <> '#39#39') then'
+ ' DireccionEnvio.Lines.Add();'
+ ''
+ ' if ( <> '#39#39') then'
+ ' DireccionEnvio.Lines.Add();'
+ '}'
+ 'end;'
+ ''
+ 'procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);'
'begin'
' if not Engine.FinalPass then'
' Set('#39'TotalPaginas'#39', ( + 1));'
@@ -1423,26 +1510,64 @@ object RptFacturasCliente: TRptFacturasCliente
' Set('#39'Pagina'#39', ( + 1)); '
'end;'
''
- 'procedure mContinuaOnBeforePrint(Sender: TfrxComponent);'
+ 'procedure frxReportOnStartReport(Sender: TfrxComponent);'
'begin'
- ' if Engine.FinalPass then'
- ' begin'
+ ' Set('#39'Pagina'#39', 0);'
+ ' Set('#39'TotalPaginas'#39', 0);'
+ ' Set('#39'Capitulo'#39', 0);'
+ ' Set('#39'NumCapitulos'#39', 0); '
+ 'end;'
+ ''
+ 'procedure Memo4OnBeforePrint(Sender: TfrxComponent);'
+ 'begin'
+ ' if (Length() = 0) then'
+ ' Memo4.Visible := False; '
+ 'end;'
+ ''
+ 'procedure Memo22OnBeforePrint(Sender: TfrxComponent);'
+ 'begin'
+ ' if ( = 0) then'
+ ' begin '
+ ' Memo22.Text := '#39'Base imponible:'#39';'
+ ''
+ ' Memo10.Text := '#39'Importe total:'#39';'
+ ' Memo10.Font.Style := fsBold; '
+ ''
- ' //A la vez que salta este salta la asignacion de pagina por ' +
- 'lo que no coincide nunca si no suponemos +1 ' +
- ' ' +
- ' ' +
- ' ' +
- ' '
- ' if (( + 1) = ) then'
- ' begin '
- ' mContinua.Visible := True;'
- ' end '
- ' else'
- ' begin '
- ' mContinua.Visible := False;'
- ' end '
- ' end; '
+ ' Memo9.Text := FormatFloat('#39'#,##0.00 '#8364#39', );'
+ ' Memo9.Font.Style := fsBold; '
+ ' '
+ ' Memo23.Text := '#39'[]% IVA:'#39';'
+ ' Memo25.Text := '#39'[frxDBCabecera."IMPORTE_IVA"]'#39';'
+ ' Memo12.Visible := False;'
+ ' Memo14.Visible := False;'
+ ' Memo16.Visible := False; '
+ ''
+ ' Memo13.Visible := False;'
+ ' Memo15.Visible := False;'
+ ' Memo17.Visible := False;'
+ ' Memo11.Color := $00CCFFCC;'
+ ' end; '
+ 'end;'
+ ''
+ 'procedure Memo39OnBeforePrint(Sender: TfrxComponent);'
+ 'begin'
+ ' Memo39.Clear; '
+ ' if ( = '#39'F'#39') then'
+
+ ' Memo39.Text := '#39'FACTURA'#39' ' +
+ ' '
+ ' else'
+ ' Memo39.Text := '#39'ABONO'#39'; '
+ 'end;'
+ ''
+ 'procedure Picture4OnBeforePrint(Sender: TfrxComponent);'
+ 'begin'
+ ' if ( = 1) then'
+ ' Picture4.Visible := True'
+ ' else'
+ ' Picture4.Visible := False; '
'end;'
''
'begin'
diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm
index 84a1cd4f..bb1ce57a 100644
--- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm
+++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm
@@ -169,6 +169,18 @@ object srvFacturasCliente: TsrvFacturasCliente
item
DatasetField = 'FECHA_VENCIMIENTO'
TableField = 'FECHA_VENCIMIENTO'
+ end
+ item
+ DatasetField = 'RETENCION'
+ TableField = 'RETENCION'
+ end
+ item
+ DatasetField = 'IMPORTE_RETENCION'
+ TableField = 'IMPORTE_RETENCION'
+ end
+ item
+ DatasetField = 'FECHA_RETENCION'
+ TableField = 'FECHA_RETENCION'
end>
end>
Name = 'FacturasCliente'
@@ -212,6 +224,10 @@ object srvFacturasCliente: TsrvFacturasCliente
Name = 'FECHA_VENCIMIENTO'
DataType = datDateTime
end
+ item
+ Name = 'FECHA_RETENCION'
+ DataType = datDateTime
+ end
item
Name = 'SITUACION'
DataType = datString
@@ -371,6 +387,14 @@ object srvFacturasCliente: TsrvFacturasCliente
DataType = datString
Size = 255
DictionaryEntry = 'FacturasCliente_REFERENCIA_COMISION'
+ end
+ item
+ Name = 'RETENCION'
+ DataType = datFloat
+ end
+ item
+ Name = 'IMPORTE_RETENCION'
+ DataType = datCurrency
end>
end
item
@@ -770,6 +794,10 @@ object srvFacturasCliente: TsrvFacturasCliente
Name = 'FECHA_VENCIMIENTO'
Value = ''
end
+ item
+ Name = 'FECHA_RETENCION'
+ Value = ''
+ end
item
Name = 'BASE_IMPONIBLE'
Value = ''
@@ -877,6 +905,14 @@ object srvFacturasCliente: TsrvFacturasCliente
item
Name = 'CLIENTE_FINAL'
Value = ''
+ end
+ item
+ Name = 'RETENCION'
+ Value = ''
+ end
+ item
+ Name = 'IMPORTE_RETENCION'
+ Value = ''
end>
Statements = <
item
@@ -885,24 +921,25 @@ object srvFacturasCliente: TsrvFacturasCliente
TargetTable = 'FACTURAS_CLIENTE'
SQL =
'INSERT INTO FACTURAS_CLIENTE ('#10' ID,'#10' ID_EMPRESA,'#10' REFER' +
- 'ENCIA,'#10' FECHA_FACTURA,'#10' FECHA_VENCIMIENTO,'#10' BASE_IMPONI' +
- 'BLE,'#10' DESCUENTO,'#10' IMPORTE_DESCUENTO,'#10' IVA,'#10' IMPORTE_' +
- 'IVA,'#10' RE,'#10' IMPORTE_RE,'#10' IMPORTE_TOTAL,'#10' OBSERVACIONE' +
- 'S,'#10' ID_CLIENTE,'#10' NIF_CIF,'#10' NOMBRE,'#10' ID_DIRECCION,'#10' ' +
- ' CALLE,'#10' POBLACION,'#10' PROVINCIA,'#10' CODIGO_POSTAL,'#10' FE' +
- 'CHA_ALTA,'#10' FECHA_MODIFICACION,'#10' USUARIO,'#10' ID_FORMA_PAGO' +
- ','#10' RECARGO_EQUIVALENCIA,'#10' ID_TIPO_IVA,'#10' IMPORTE_NETO,'#10' ' +
- ' IMPORTE_PORTE,'#10' DATOS_BANCARIOS,'#10' CLIENTE_FINAL)'#10' VALU' +
- 'ES ('#10' :ID,'#10' :ID_EMPRESA,'#10' :REFERENCIA,'#10' :FECHA_FACTU' +
- 'RA,'#10' :FECHA_VENCIMIENTO,'#10' :BASE_IMPONIBLE,'#10' :DESCUENTO,' +
- #10' :IMPORTE_DESCUENTO,'#10' :IVA,'#10' :IMPORTE_IVA,'#10' :RE,'#10' ' +
- ' :IMPORTE_RE,'#10' :IMPORTE_TOTAL,'#10' :OBSERVACIONES,'#10' :ID_C' +
- 'LIENTE,'#10' :NIF_CIF,'#10' :NOMBRE,'#10' :ID_DIRECCION,'#10' :CALLE' +
- ','#10' :POBLACION,'#10' :PROVINCIA,'#10' :CODIGO_POSTAL,'#10' :FECHA' +
- '_ALTA,'#10' :FECHA_MODIFICACION,'#10' :USUARIO,'#10' :ID_FORMA_PAGO' +
- ','#10' :RECARGO_EQUIVALENCIA,'#10' :ID_TIPO_IVA,'#10' :IMPORTE_NETO' +
- ','#10' :IMPORTE_PORTE,'#10' :DATOS_BANCARIOS,'#10' :CLIENTE_FINAL);' +
- #10
+ 'ENCIA,'#10' FECHA_FACTURA,'#10' FECHA_VENCIMIENTO,'#10' FECHA_RETEN' +
+ 'CION,'#10' BASE_IMPONIBLE,'#10' DESCUENTO,'#10' IMPORTE_DESCUENTO,'#10 +
+ ' IVA,'#10' IMPORTE_IVA,'#10' RE,'#10' IMPORTE_RE,'#10' IMPORTE_TO' +
+ 'TAL,'#10' OBSERVACIONES,'#10' ID_CLIENTE,'#10' NIF_CIF,'#10' NOMBRE,' +
+ #10' ID_DIRECCION,'#10' CALLE,'#10' POBLACION,'#10' PROVINCIA,'#10' ' +
+ 'CODIGO_POSTAL,'#10' FECHA_ALTA,'#10' FECHA_MODIFICACION,'#10' USUAR' +
+ 'IO,'#10' ID_FORMA_PAGO,'#10' RECARGO_EQUIVALENCIA,'#10' ID_TIPO_IVA' +
+ ','#10' IMPORTE_NETO,'#10' IMPORTE_PORTE,'#10' DATOS_BANCARIOS,'#10' ' +
+ 'CLIENTE_FINAL,'#10' RETENCION,'#10' IMPORTE_RETENCION)'#10' VALUES ('#10 +
+ ' :ID,'#10' :ID_EMPRESA,'#10' :REFERENCIA,'#10' :FECHA_FACTURA,'#10' ' +
+ ' :FECHA_VENCIMIENTO,'#10' :FECHA_RETENCION,'#10' :BASE_IMPONIBLE' +
+ ','#10' :DESCUENTO,'#10' :IMPORTE_DESCUENTO,'#10' :IVA,'#10' :IMPORTE' +
+ '_IVA,'#10' :RE,'#10' :IMPORTE_RE,'#10' :IMPORTE_TOTAL,'#10' :OBSERVA' +
+ 'CIONES,'#10' :ID_CLIENTE,'#10' :NIF_CIF,'#10' :NOMBRE,'#10' :ID_DIRE' +
+ 'CCION,'#10' :CALLE,'#10' :POBLACION,'#10' :PROVINCIA,'#10' :CODIGO_P' +
+ 'OSTAL,'#10' :FECHA_ALTA,'#10' :FECHA_MODIFICACION,'#10' :USUARIO,'#10' ' +
+ ' :ID_FORMA_PAGO,'#10' :RECARGO_EQUIVALENCIA,'#10' :ID_TIPO_IVA,'#10 +
+ ' :IMPORTE_NETO,'#10' :IMPORTE_PORTE,'#10' :DATOS_BANCARIOS,'#10' ' +
+ ' :CLIENTE_FINAL,'#10' :RETENCION,'#10' :IMPORTE_RETENCION);'#10
StatementType = stSQL
ColumnMappings = <>
end>
@@ -926,6 +963,10 @@ object srvFacturasCliente: TsrvFacturasCliente
Name = 'FECHA_VENCIMIENTO'
Value = ''
end
+ item
+ Name = 'FECHA_RETENCION'
+ Value = ''
+ end
item
Name = 'BASE_IMPONIBLE'
Value = ''
@@ -1034,6 +1075,14 @@ object srvFacturasCliente: TsrvFacturasCliente
Name = 'CLIENTE_FINAL'
Value = ''
end
+ item
+ Name = 'RETENCION'
+ Value = ''
+ end
+ item
+ Name = 'IMPORTE_RETENCION'
+ Value = ''
+ end
item
Name = 'OLD_ID'
Value = ''
@@ -1045,21 +1094,23 @@ object srvFacturasCliente: TsrvFacturasCliente
SQL =
'UPDATE FACTURAS_CLIENTE'#10' SET'#10' ID_EMPRESA = :ID_EMPRESA,'#10' ' +
'REFERENCIA = :REFERENCIA,'#10' FECHA_FACTURA = :FECHA_FACTURA,'#10' ' +
- ' FECHA_VENCIMIENTO = :FECHA_VENCIMIENTO,'#10' BASE_IMPONIBLE = :' +
- 'BASE_IMPONIBLE,'#10' DESCUENTO = :DESCUENTO,'#10' IMPORTE_DESCUENT' +
- 'O = :IMPORTE_DESCUENTO,'#10' IVA = :IVA,'#10' IMPORTE_IVA = :IMPOR' +
- 'TE_IVA,'#10' RE = :RE,'#10' IMPORTE_RE = :IMPORTE_RE,'#10' IMPORTE_' +
- 'TOTAL = :IMPORTE_TOTAL,'#10' OBSERVACIONES = :OBSERVACIONES,'#10' ' +
- 'ID_CLIENTE = :ID_CLIENTE,'#10' NIF_CIF = :NIF_CIF,'#10' NOMBRE = :' +
- 'NOMBRE,'#10' ID_DIRECCION = :ID_DIRECCION,'#10' CALLE = :CALLE,'#10' ' +
- ' POBLACION = :POBLACION,'#10' PROVINCIA = :PROVINCIA,'#10' CODIGO' +
- '_POSTAL = :CODIGO_POSTAL,'#10' FECHA_ALTA = :FECHA_ALTA,'#10' FECH' +
- 'A_MODIFICACION = :FECHA_MODIFICACION,'#10' USUARIO = :USUARIO,'#10' ' +
- ' ID_FORMA_PAGO = :ID_FORMA_PAGO,'#10' RECARGO_EQUIVALENCIA = :RE' +
- 'CARGO_EQUIVALENCIA,'#10' ID_TIPO_IVA = :ID_TIPO_IVA,'#10' IMPORTE_' +
- 'NETO = :IMPORTE_NETO,'#10' IMPORTE_PORTE = :IMPORTE_PORTE,'#10' DA' +
- 'TOS_BANCARIOS = :DATOS_BANCARIOS,'#10' CLIENTE_FINAL = :CLIENTE_F' +
- 'INAL'#10' WHERE'#10' (ID = :OLD_ID);'#10
+ ' FECHA_VENCIMIENTO = :FECHA_VENCIMIENTO,'#10' FECHA_RETENCION = ' +
+ ':FECHA_RETENCION,'#10' BASE_IMPONIBLE = :BASE_IMPONIBLE,'#10' DESC' +
+ 'UENTO = :DESCUENTO,'#10' IMPORTE_DESCUENTO = :IMPORTE_DESCUENTO,'#10 +
+ ' IVA = :IVA,'#10' IMPORTE_IVA = :IMPORTE_IVA,'#10' RE = :RE,'#10' ' +
+ ' IMPORTE_RE = :IMPORTE_RE,'#10' IMPORTE_TOTAL = :IMPORTE_TOTAL,'#10 +
+ ' OBSERVACIONES = :OBSERVACIONES,'#10' ID_CLIENTE = :ID_CLIENTE' +
+ ','#10' NIF_CIF = :NIF_CIF,'#10' NOMBRE = :NOMBRE,'#10' ID_DIRECCION' +
+ ' = :ID_DIRECCION,'#10' CALLE = :CALLE,'#10' POBLACION = :POBLACION' +
+ ','#10' PROVINCIA = :PROVINCIA,'#10' CODIGO_POSTAL = :CODIGO_POSTAL' +
+ ','#10' FECHA_ALTA = :FECHA_ALTA,'#10' FECHA_MODIFICACION = :FECHA_' +
+ 'MODIFICACION,'#10' USUARIO = :USUARIO,'#10' ID_FORMA_PAGO = :ID_FO' +
+ 'RMA_PAGO,'#10' RECARGO_EQUIVALENCIA = :RECARGO_EQUIVALENCIA,'#10' ' +
+ 'ID_TIPO_IVA = :ID_TIPO_IVA,'#10' IMPORTE_NETO = :IMPORTE_NETO,'#10' ' +
+ ' IMPORTE_PORTE = :IMPORTE_PORTE,'#10' DATOS_BANCARIOS = :DATOS_B' +
+ 'ANCARIOS,'#10' CLIENTE_FINAL = :CLIENTE_FINAL,'#10' RETENCION = :R' +
+ 'ETENCION,'#10' IMPORTE_RETENCION = :IMPORTE_RETENCION'#10' WHERE'#10' (' +
+ 'ID = :OLD_ID);'#10
StatementType = stSQL
ColumnMappings = <>
end>
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.dfm
index 9c6b0a08..21fff879 100644
--- a/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.dfm
+++ b/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.dfm
@@ -54,10 +54,12 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
inherited TBXDock: TTBXDock
Top = 87
Width = 654
+ Height = 72
ExplicitTop = 87
ExplicitWidth = 654
+ ExplicitHeight = 72
inherited tbxMain: TTBXToolbar
- ExplicitWidth = 126
+ ExplicitWidth = 317
inherited TBXSubmenuItem2: TTBXSubmenuItem
Visible = False
end
@@ -72,12 +74,12 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
end
end
inherited tbxFiltro: TTBXToolbar
- Left = 126
+ Left = 317
Top = 23
DockPos = 104
DockRow = 1
Visible = False
- ExplicitLeft = 126
+ ExplicitLeft = 317
ExplicitTop = 23
inherited TBXItem34: TTBXItem
Action = actQuitarFiltro2
@@ -89,6 +91,7 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
inherited TBXTMain2: TTBXToolbar
Left = 334
ExplicitLeft = 334
+ ExplicitHeight = 23
end
end
inherited StatusBar: TJvStatusBar
@@ -141,18 +144,18 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
end
end
inherited frViewFacturasCliente1: TfrViewFacturasCliente [5]
- Top = 162
+ Top = 159
Width = 654
- Height = 449
- ExplicitTop = 162
+ Height = 452
+ ExplicitTop = 159
ExplicitWidth = 654
- ExplicitHeight = 449
+ ExplicitHeight = 452
inherited cxGrid: TcxGrid
Width = 654
- Height = 321
+ Height = 324
RootLevelOptions.DetailTabsPosition = dtpNone
ExplicitWidth = 654
- ExplicitHeight = 321
+ ExplicitHeight = 324
inherited cxGridView: TcxGridDBTableView
DataController.Summary.DefaultGroupSummaryItems = <
item
@@ -184,17 +187,35 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
Width = 654
ExplicitWidth = 654
inherited txtFiltroTodo: TcxTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 273
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 121
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 416
Width = 416
end
+ inherited eLista: TcxComboBox
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 654
@@ -207,8 +228,8 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
- Top = 423
- ExplicitTop = 423
+ Top = 426
+ ExplicitTop = 426
ExplicitWidth = 654
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 654
@@ -224,6 +245,14 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
BuiltInReportLink = True
end
end
+ inherited cxViewGridPopupMenu: TcxGridPopupMenu
+ PopupMenus = <
+ item
+ GridView = frViewFacturasCliente1.cxGridView
+ HitTypes = [gvhtCell]
+ Index = 0
+ end>
+ end
end
inherited EditorActionList: TActionList [8]
Left = 112
@@ -264,6 +293,8 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente
end
inherited JsNuevoAbonoDialog: TJSDialog [18]
end
+ inherited JsListaFacturasNoEliminadas: TJSDialog [19]
+ end
object EditorSeleccionActionList: TActionList
Images = SmallImages
Left = 152
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm
index db8542a1..5c87a90f 100644
--- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm
+++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm
@@ -86,20 +86,20 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end
inherited pgPaginas: TPageControl
Width = 806
- Height = 344
+ Height = 277
OnChanging = pgPaginasChanging
ExplicitWidth = 806
- ExplicitHeight = 344
+ ExplicitHeight = 318
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
ExplicitWidth = 798
- ExplicitHeight = 316
+ ExplicitHeight = 290
inline frViewFacturaCliente1: TfrViewFacturaCliente
Left = 0
Top = 0
Width = 798
- Height = 316
+ Height = 249
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -110,15 +110,15 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
TabOrder = 0
ReadOnly = False
ExplicitWidth = 798
- ExplicitHeight = 316
+ ExplicitHeight = 290
inherited dxLayoutControl1: TdxLayoutControl
Width = 798
- Height = 316
+ Height = 249
ExplicitWidth = 798
- ExplicitHeight = 316
+ ExplicitHeight = 290
DesignSize = (
798
- 316)
+ 249)
inherited Label1: TLabel
Left = 378
Width = 311
@@ -240,11 +240,12 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
object pagContenido: TTabSheet
Caption = 'Contenido'
ImageIndex = 1
+ ExplicitHeight = 290
inline frViewDetallesFacturaCliente1: TfrViewDetallesFacturaCliente
Left = 0
Top = 0
Width = 798
- Height = 316
+ Height = 249
Align = alClient
BiDiMode = bdLeftToRight
Font.Charset = DEFAULT_CHARSET
@@ -257,110 +258,72 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
TabOrder = 0
ReadOnly = False
ExplicitWidth = 798
- ExplicitHeight = 316
+ ExplicitHeight = 290
inherited ToolBar1: TToolBar
Width = 798
- Height = 46
+ Height = 73
ExplicitWidth = 798
- ExplicitHeight = 46
- inherited ToolButton3: TToolButton
+ ExplicitHeight = 73
+ inherited ToolButton2: TToolButton
Wrap = False
+ ExplicitLeft = 231
end
inherited ToolButton4: TToolButton
- Left = 278
+ Left = 345
Top = 0
- Wrap = True
- ExplicitLeft = 278
+ ExplicitLeft = 345
ExplicitTop = 0
end
inherited ToolButton14: TToolButton
- Left = 0
- Wrap = False
- ExplicitLeft = 0
- end
- inherited FontName: TJvFontComboBox
- Left = 65
- Top = 22
- ExplicitLeft = 399
+ Left = 401
+ Top = 0
+ Wrap = True
+ ExplicitLeft = 401
ExplicitTop = 0
end
inherited FontSize: TEdit
- Left = 544
- Top = 0
- Width = 168
- ExplicitLeft = 544
- ExplicitTop = 0
- ExplicitWidth = 168
+ Left = 0
+ Width = 200
+ ExplicitLeft = 0
+ ExplicitWidth = 200
end
inherited UpDown1: TUpDown
- Left = 712
- Top = 0
- ExplicitLeft = 712
- ExplicitTop = 0
+ Left = 216
+ ExplicitLeft = 216
+ end
+ inherited FontName: TJvFontComboBox
+ Left = 233
+ ExplicitLeft = 233
end
inherited ToolButton13: TToolButton
- Left = 0
- Top = 0
- Wrap = True
- ExplicitLeft = 0
- ExplicitTop = 0
- ExplicitHeight = 27
+ Left = 378
+ ExplicitLeft = 378
end
inherited ToolButton6: TToolButton
- Left = 0
- Top = 27
- ExplicitLeft = 0
- ExplicitTop = 27
- end
- inherited ToolButton7: TToolButton
- Left = 66
- Top = 27
- ExplicitLeft = 66
- ExplicitTop = 27
- end
- inherited ToolButton8: TToolButton
- Left = 133
- Top = 27
- ExplicitLeft = 133
- ExplicitTop = 27
- end
- inherited ToolButton12: TToolButton
- Left = 216
- Top = 27
- ExplicitLeft = 216
- ExplicitTop = 27
+ Left = 386
+ ExplicitLeft = 386
end
inherited ToolButton9: TToolButton
- Left = 224
- Top = 27
- ExplicitLeft = 224
- ExplicitTop = 27
+ Wrap = False
end
inherited ToolButton10: TToolButton
Left = 369
- Top = 27
+ Top = 49
ExplicitLeft = 369
- ExplicitTop = 27
- end
- inherited ToolButton11: TToolButton
- Left = 494
- Top = 27
- ExplicitLeft = 494
- ExplicitTop = 27
+ ExplicitTop = 49
end
end
inherited cxGrid: TcxGrid
- Top = 77
+ Top = 99
Width = 798
- Height = 239
- ExplicitTop = 77
+ Height = 150
+ ExplicitTop = 99
ExplicitWidth = 798
- ExplicitHeight = 239
+ ExplicitHeight = 191
end
inherited TBXDock1: TTBXDock
- Top = 51
+ Top = 73
Width = 798
- ExplicitTop = 51
ExplicitWidth = 798
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 798
@@ -390,9 +353,9 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end
inline frViewTotales1: TfrViewTotales [4]
Left = 0
- Top = 426
+ Top = 359
Width = 812
- Height = 163
+ Height = 230
Align = alBottom
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -402,13 +365,15 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ParentFont = False
TabOrder = 4
ReadOnly = False
- ExplicitTop = 426
+ ExplicitTop = 359
ExplicitWidth = 812
- ExplicitHeight = 163
+ ExplicitHeight = 230
inherited dxLayoutControl1: TdxLayoutControl
Width = 812
+ Height = 230
LookAndFeel = frViewFacturaCliente1.dxLayoutOfficeLookAndFeel1
ExplicitWidth = 812
+ ExplicitHeight = 189
inherited Bevel1: TBevel
Top = 111
Width = 73
@@ -416,18 +381,18 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitWidth = 73
end
inherited Bevel3: TBevel
- Left = 368
+ Left = 374
Top = 30
Height = 122
- ExplicitLeft = 368
+ ExplicitLeft = 374
ExplicitTop = 30
ExplicitHeight = 122
end
inherited Bevel4: TBevel
- Left = 480
+ Left = 486
Top = 111
Width = 192
- ExplicitLeft = 480
+ ExplicitLeft = 486
ExplicitTop = 111
ExplicitWidth = 192
end
@@ -443,27 +408,27 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Width = 184
end
inherited ImporteIVA: TcxDBCurrencyEdit
- Left = 551
+ Left = 557
Top = 57
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 551
+ ExplicitLeft = 557
ExplicitTop = 57
ExplicitWidth = 249
Width = 249
end
inherited ImporteTotal: TcxDBCurrencyEdit
- Left = 481
+ Left = 487
Top = 131
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 481
+ ExplicitLeft = 487
ExplicitTop = 131
ExplicitWidth = 319
Width = 319
@@ -478,49 +443,49 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitTop = 131
end
inherited edtIVA: TcxDBSpinEdit
- Left = 480
+ Left = 486
Top = 57
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 480
+ ExplicitLeft = 486
ExplicitTop = 57
end
inherited ImporteBase: TcxDBCurrencyEdit
- Left = 480
+ Left = 486
Top = 30
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 480
+ ExplicitLeft = 486
ExplicitTop = 30
ExplicitWidth = 320
Width = 320
end
inherited edtRE: TcxDBSpinEdit
- Left = 480
+ Left = 486
Top = 84
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 480
+ ExplicitLeft = 486
ExplicitTop = 84
end
inherited ImporteRE: TcxDBCurrencyEdit
- Left = 551
+ Left = 557
Top = 84
Style.LookAndFeel.SkinName = ''
Style.IsFontAssigned = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 551
+ ExplicitLeft = 557
ExplicitTop = 84
ExplicitWidth = 249
Width = 249
@@ -558,9 +523,9 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
Width = 117
end
inherited bTiposIVA: TButton
- Left = 220
+ Left = 226
Top = 57
- ExplicitLeft = 220
+ ExplicitLeft = 226
ExplicitTop = 57
end
inherited cbRecargoEquivalencia: TcxDBCheckBox
@@ -573,9 +538,46 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
ExplicitWidth = 255
Width = 255
end
+ inherited edtRetencion: TcxDBSpinEdit
+ Left = 550
+ Top = 209
+ Style.LookAndFeel.SkinName = ''
+ Style.IsFontAssigned = True
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ ExplicitLeft = 550
+ ExplicitTop = 209
+ end
+ inherited edtImporteRetencion: TcxDBCurrencyEdit
+ Left = 621
+ Top = 209
+ Style.LookAndFeel.SkinName = ''
+ Style.IsFontAssigned = True
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ ExplicitLeft = 621
+ ExplicitTop = 209
+ ExplicitWidth = 152
+ Width = 152
+ end
+ inherited edtFechaRetencion: TcxDBDateEdit
+ Top = 209
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ ExplicitTop = 209
+ ExplicitWidth = 150
+ Width = 150
+ end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup
inherited dxLayoutControl1Group1: TdxLayoutGroup
inherited dxLayoutControl1Group2: TdxLayoutGroup
+ inherited dxLayoutControl1Item16: TdxLayoutItem
+ Visible = False
+ end
inherited dxLayoutControl1Item10: TdxLayoutItem
Visible = False
end
@@ -583,6 +585,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
inherited dxLayoutControl1Group5: TdxLayoutGroup
inherited dxLayoutControl1Group3: TdxLayoutGroup
inherited dxLayoutControl1Group8: TdxLayoutGroup
+ Visible = False
inherited dxLayoutControl1Item7: TdxLayoutItem
Visible = True
end
@@ -590,6 +593,14 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente
end
end
end
+ inherited dxLayoutControl1Group12: TdxLayoutGroup
+ inherited dxLayoutControl1Item21: TdxLayoutItem
+ Visible = True
+ end
+ inherited dxLayoutControl1Group11: TdxLayoutGroup
+ Visible = True
+ end
+ end
end
end
end
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas
index aa8ad996..3ba2765a 100644
--- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas
+++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas
@@ -36,14 +36,11 @@ type
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
procedure frViewClienteFacturaedtlNombrePropertiesChange(Sender: TObject);
procedure pgPaginasChanging(Sender: TObject; var AllowChange: Boolean);
- procedure frViewTotales1edtDescuentoPropertiesValidate(Sender: TObject;
- var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
+// procedure frViewTotales1edtDescuentoPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
procedure frViewTotales1bTiposIVAClick(Sender: TObject);
- procedure frViewTotales1eIVAPropertiesValidate(Sender: TObject;
- var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
- procedure frViewTotales1cbRecargoEquivalenciaPropertiesEditValueChanged(Sender: TObject);
- procedure frViewTotales1ePortePropertiesValidate(Sender: TObject;
- var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
+// procedure frViewTotales1eIVAPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
+// procedure frViewTotales1cbRecargoEquivalenciaPropertiesEditValueChanged(Sender: TObject);
+// procedure frViewTotales1ePortePropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
procedure frViewTotales1ePorteEditing(Sender: TObject; var CanEdit: Boolean);
procedure actEnviarEMailExecute(Sender: TObject);
procedure actEnviarEMailUpdate(Sender: TObject);
@@ -204,6 +201,7 @@ begin
FTiposIVAController.VerTodos(FTiposIVA);
end;
+{
procedure TfEditorFacturaCliente.frViewTotales1cbRecargoEquivalenciaPropertiesEditValueChanged(
Sender: TObject);
begin
@@ -217,7 +215,9 @@ begin
Factura.RECARGO_EQUIVALENCIA := 0;
end;
end;
+}
+{
procedure TfEditorFacturaCliente.frViewTotales1edtDescuentoPropertiesValidate(
Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
var Error: Boolean);
@@ -225,7 +225,8 @@ begin
inherited;
Factura.DESCUENTO := DisplayValue;
end;
-
+}
+{
procedure TfEditorFacturaCliente.frViewTotales1eIVAPropertiesValidate(
Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
var Error: Boolean);
@@ -234,7 +235,7 @@ begin
Factura.Edit;
Factura.ID_TIPO_IVA := ((frViewTotales1.dsTiposIVA.DataTable) as IBizTipoIVA).ID;
end;
-
+}
procedure TfEditorFacturaCliente.frViewTotales1ePorteEditing(Sender: TObject;
var CanEdit: Boolean);
begin
@@ -243,6 +244,7 @@ begin
CanEdit := False;
end;
+{
procedure TfEditorFacturaCliente.frViewTotales1ePortePropertiesValidate(
Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
var Error: Boolean);
@@ -256,6 +258,7 @@ begin
// RecalcularPortePorUnidad; En los documentos de cliente el porte no se desglosa por articulo
end;
+}
function TfEditorFacturaCliente.GetController: IFacturasClienteController;
begin
diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm
index 8874d0f1..fa7e6621 100644
--- a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm
+++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm
@@ -126,6 +126,13 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente
HeaderAlignmentHorz = taRightJustify
Width = 128
end
+ object cxGridViewIMPORTE_RETENCION: TcxGridDBColumn
+ Caption = 'Importe retenido'
+ DataBinding.FieldName = 'IMPORTE_RETENCION'
+ PropertiesClassName = 'TcxCurrencyEditProperties'
+ FooterAlignmentHorz = taRightJustify
+ HeaderAlignmentHorz = taRightJustify
+ end
object cxGridViewREFERENCIA_COMISION: TcxGridDBColumn
Caption = 'Liquidaci'#243'n'
DataBinding.FieldName = 'REFERENCIA_COMISION'
diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas
index eb33789b..69f9f036 100644
--- a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas
+++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas
@@ -56,6 +56,7 @@ type
TBXSeparatorItem2: TTBXSeparatorItem;
cxGridViewTIPO: TcxGridDBColumn;
cxGridViewFECHA_VENCIMIENTO: TcxGridDBColumn;
+ cxGridViewIMPORTE_RETENCION: TcxGridDBColumn;
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
out AStyle: TcxStyle);
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm
index 033075ea..0a979b69 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm
@@ -5,7 +5,6 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
ClientWidth = 700
Position = poDesigned
ExplicitWidth = 708
- ExplicitHeight = 240
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas
index 3cac7edd..65a43718 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas
+++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas
@@ -320,7 +320,7 @@ begin
if Assigned(APedidos) then
if ElegirOpcionesImpresionPedidoProveedor(FImprimirPrecios, FImprimirRefProveedor) then
- FController.Print(APedidos, AllItems);
+ FController.Print(APedidos, AllItems, FImprimirPrecios, FImprimirRefProveedor);
end;
end;
end;
diff --git a/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas b/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas
index c9510429..533a03c4 100644
--- a/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas
+++ b/Source/Modulos/Recibos de cliente/Controller/uRecibosClienteController.pas
@@ -753,10 +753,13 @@ begin
ANuevoReciboCliente := Duplicar(ARecibosCliente);
ANuevoReciboCliente.Edit;
ANuevoReciboCliente.REFERENCIA := DarNuevaReferencia(ARecibosCliente.ID_FACTURA, ARecibosCliente.REFERENCIA);
-// ANuevoReciboCliente.ID := FDataModule.GetNextID(ARecibosCliente.DataTable.LogicalName);
ANuevoReciboCliente.IMPORTE := ImporteRestante;
ANuevoReciboCliente.DESCRIPCION := 'RECIBO ' + ANuevoReciboCliente.REFERENCIA + ' - ' + CifraToLetras(ImporteRestante);
ANuevoReciboCliente.Post;
+
+ ARecibosCliente.Edit;
+ ARecibosCliente.DESCRIPCION := 'RECIBO ' + ARecibosCliente.REFERENCIA + ' - ' + CifraToLetras(ARecibosCliente.IMPORTE);
+ ARecibosCliente.Post;
end;
//Primero debemos hacer el ApplyUpdates del recibo inicial por si fallase
diff --git a/Source/Modulos/Recibos de proveedor/Controller/uRecibosProveedorController.pas b/Source/Modulos/Recibos de proveedor/Controller/uRecibosProveedorController.pas
index 372a5e77..de4bd195 100644
--- a/Source/Modulos/Recibos de proveedor/Controller/uRecibosProveedorController.pas
+++ b/Source/Modulos/Recibos de proveedor/Controller/uRecibosProveedorController.pas
@@ -732,6 +732,10 @@ begin
ANuevoReciboProveedor.IMPORTE := ImporteRestante;
ANuevoReciboProveedor.DESCRIPCION := 'RECIBO ' + ANuevoReciboProveedor.REFERENCIA + ' - ' + CifraToLetras(ImporteRestante);
ANuevoReciboProveedor.Post;
+
+ ARecibosProveedor.Edit;
+ ARecibosProveedor.DESCRIPCION := 'RECIBO ' + ARecibosProveedor.REFERENCIA + ' - ' + CifraToLetras(ARecibosProveedor.IMPORTE);
+ ARecibosProveedor.Post;
end;
ARecibosProveedor.DataTable.ApplyUpdates;
diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES
index eb933b50..bb9d8bc2 100644
Binary files a/Source/Servidor/FactuGES_Server.RES and b/Source/Servidor/FactuGES_Server.RES differ
diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr
index 329b132d..38026e01 100644
--- a/Source/Servidor/FactuGES_Server.dpr
+++ b/Source/Servidor/FactuGES_Server.dpr
@@ -129,10 +129,10 @@ uses
schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas',
schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas',
schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas',
- schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas',
- schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas',
schPedidosProveedorClient_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorClient_Intf.pas',
- schPedidosProveedorServer_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorServer_Intf.pas';
+ schPedidosProveedorServer_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorServer_Intf.pas',
+ schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas',
+ schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas';
{$R *.res}
{$R ..\Servicios\RODLFile.res}
diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj
index 824967ed..1097c82e 100644
--- a/Source/Servidor/FactuGES_Server.dproj
+++ b/Source/Servidor/FactuGES_Server.dproj
@@ -35,7 +35,7 @@
Delphi.Personality
-FalseTrueFalse/standaloneTrueFalse1610FalseFalseFalseFalseFalse308212521.6.1.01.6.1.0viernes, 09 de enero de 2009 17:27FactuGES_Server.dpr
+FalseTrueFalse/standaloneTrueFalse1620FalseFalseFalseFalseFalse308212521.6.2.01.6.2.0viernes, 09 de enero de 2009 18:39FactuGES_Server.dpr
diff --git a/Source/Servidor/uDataModuleServer.dfm b/Source/Servidor/uDataModuleServer.dfm
index 4add0c65..573524be 100644
--- a/Source/Servidor/uDataModuleServer.dfm
+++ b/Source/Servidor/uDataModuleServer.dfm
@@ -39,8 +39,8 @@ object dmServer: TdmServer
Name = 'IBX'
ConnectionString =
'IBX?Server=localhost;Database=C:\Codigo Tecsitel\Output\Debug\Da' +
- 'tabase\FACTUGES.FDB;UserID=sysdba;Password=masterkey;Dialect=3;C' +
- 'harset=ISO8859_1;'
+ 'tabase\FACTUGES2.FDB;UserID=sysdba;Password=masterkey;Dialect=3;' +
+ 'Charset=ISO8859_1;'
ConnectionType = 'Interbase'
Default = True
end>