diff --git a/Database/udfs/funciones.pas b/Database/udfs/funciones.pas
index 2782f42f..f2af4b82 100644
--- a/Database/udfs/funciones.pas
+++ b/Database/udfs/funciones.pas
@@ -8,24 +8,30 @@ implementation
uses
Forms, Classes, SysUtils, StdCtrls, ComCtrls,
- Menus, Windows;
+ Menus, Windows;
function RtfToText(Cadena: PChar): PChar;
var
AStream : TStringStream;
ARichEdit: TRichEdit;
begin
- AStream := TStringStream.Create(Cadena);
- ARichEdit := TRichEdit.CreateParented(HWND(-3));
+ ARichEdit := TRichEdit.CreateParented(HWND_MESSAGE);
try
- ARichEdit.SelectAll;
- ARichEdit.SelText := StrPas(Cadena);
- Result := PChar(ARichEdit.Text);
+ AStream := TStringStream.Create(Cadena);
+ try
+ ARichEdit.SelectAll;
+ ARichEdit.SelText := StrPas(Cadena);
+ Result := PChar(ARichEdit.Text);
+ finally
+ FreeAndNIL(AStream);
+ end;
finally
- FreeAndNIL(AStream);
+ FreeAndNIL(ARichEdit);
end;
end;
end.
+
+
diff --git a/Database/udfs/udf_RtfToText.dll b/Database/udfs/udf_RtfToText.dll
index 1d743306..76f22340 100644
Binary files a/Database/udfs/udf_RtfToText.dll and b/Database/udfs/udf_RtfToText.dll differ
diff --git a/Database/udfs/udf_RtfToText.dproj b/Database/udfs/udf_RtfToText.dproj
index dd470e1c..ef201817 100644
--- a/Database/udfs/udf_RtfToText.dproj
+++ b/Database/udfs/udf_RtfToText.dproj
@@ -24,57 +24,504 @@
Delphi.Personality
-
- False
- True
- False
-
-
- False
- False
- 1
- 0
- 0
- 0
- False
- False
- False
- False
- False
- 3082
- 1252
-
-
-
-
- 1.0.0.0
-
-
-
-
-
- 1.0.0.0
-
-
-
+FalseTrueFalseTrueFalse2000FalseFalseFalseFalseFalse308212522.0.0.02.0.0.0
Muststang Peak EasyListview Runtime Package
RemObjects Pascal Script - RemObjects SDK 3.0 Integration
-
-
- udf_RtfToText.dpr
-
-
+ udf_RtfToText.dpr
-
+
MainSource
-
-
\ No newline at end of file
+
+
+
diff --git a/Database/udfs/udf_RtfToText.res b/Database/udfs/udf_RtfToText.res
index 4f907139..02e0ea39 100644
Binary files a/Database/udfs/udf_RtfToText.res and b/Database/udfs/udf_RtfToText.res differ
diff --git a/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas b/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas
index 6a63b498..fedca586 100644
--- a/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas
+++ b/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas
@@ -34,6 +34,7 @@ type
function DarListaFormasPago: TStringList;
function DarListaTiposIVA: TStringList;
Procedure AsignarIDFormaPago(AEmpresa: IBizEmpresa; const IDFormaPago: Variant);
+ Procedure AsignarIDFormaPagoProveedores(AEmpresa: IBizEmpresa; const IDFormaPago: Variant);
Procedure AsignarIDTipoIVA(AEmpresa: IBizEmpresa; const IDTipoIVA: Variant);
end;
@@ -67,6 +68,7 @@ type
function DarListaFormasPago: TStringList;
function DarListaTiposIVA: TStringList;
Procedure AsignarIDFormaPago(AEmpresa: IBizEmpresa; const IDFormaPago: Variant);
+ Procedure AsignarIDFormaPagoProveedores(AEmpresa: IBizEmpresa; const IDFormaPago: Variant);
Procedure AsignarIDTipoIVA(AEmpresa: IBizEmpresa; const IDTipoIVA: Variant);
property TiendasController : ITiendasEmpresaController read GetTiendasController;
@@ -101,6 +103,22 @@ begin
end;
end;
+procedure TEmpresasController.AsignarIDFormaPagoProveedores(AEmpresa: IBizEmpresa; const IDFormaPago: Variant);
+begin
+ if Assigned(AEmpresa) then
+ begin
+ if not AEmpresa.DataTable.Editing then
+ AEmpresa.DataTable.Edit;
+
+ if EsCadenaVacia(IDFormaPago) then
+ AEmpresa.ID_FORMA_PAGO_PROVEEDORESIsNull := true
+ else
+ AEmpresa.ID_FORMA_PAGO_PROVEEDORES := IDFormaPago;
+
+ AEmpresa.DataTable.Post;
+ end;
+end;
+
procedure TEmpresasController.AsignarIDTipoIVA(AEmpresa: IBizEmpresa;
const IDTipoIVA: Variant);
begin
diff --git a/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm b/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm
index f2088830..3e56a5e6 100644
--- a/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm
+++ b/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm
@@ -188,6 +188,10 @@ inherited DataModuleEmpresas: TDataModuleEmpresas
Name = 'ID_FORMA_PAGO'
DataType = datSmallInt
end
+ item
+ Name = 'ID_FORMA_PAGO_PROVEEDORES'
+ DataType = datSmallInt
+ end
item
Name = 'VALIDEZ_PRESUPUESTOS'
DataType = datSmallInt
diff --git a/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas b/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas
index 8a858e7a..4f101059 100644
--- a/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas
+++ b/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas
@@ -9,9 +9,9 @@ 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_EmpresasTiendas = '{3533FE9D-1F57-4EAD-ADCF-41E9BAE8E0A8}';
- RID_Empresas = '{AB7C71EF-D2F3-43E3-928E-83E62A65AD60}';
- RID_EmpresasDatosBanco = '{6B72546D-7B98-462F-849E-EC7C95FE01B8}';
+ RID_EmpresasTiendas = '{75ED554E-84FB-44E5-ACC7-53A876D86E64}';
+ RID_Empresas = '{10ABDF2A-085A-421B-ADDE-8819A0E88D80}';
+ RID_EmpresasDatosBanco = '{7E305A2F-73A0-43EE-9A45-21CDFA6A3725}';
{ Data table names }
nme_EmpresasTiendas = 'EmpresasTiendas';
@@ -79,6 +79,7 @@ const
fld_EmpresasREGISTRO_MERCANTIL = 'REGISTRO_MERCANTIL';
fld_EmpresasID_TIPO_IVA = 'ID_TIPO_IVA';
fld_EmpresasID_FORMA_PAGO = 'ID_FORMA_PAGO';
+ fld_EmpresasID_FORMA_PAGO_PROVEEDORES = 'ID_FORMA_PAGO_PROVEEDORES';
fld_EmpresasVALIDEZ_PRESUPUESTOS = 'VALIDEZ_PRESUPUESTOS';
fld_EmpresasNUM_ORDEN = 'NUM_ORDEN';
fld_EmpresasID_PERFIL = 'ID_PERFIL';
@@ -108,9 +109,10 @@ const
idx_EmpresasREGISTRO_MERCANTIL = 21;
idx_EmpresasID_TIPO_IVA = 22;
idx_EmpresasID_FORMA_PAGO = 23;
- idx_EmpresasVALIDEZ_PRESUPUESTOS = 24;
- idx_EmpresasNUM_ORDEN = 25;
- idx_EmpresasID_PERFIL = 26;
+ idx_EmpresasID_FORMA_PAGO_PROVEEDORES = 24;
+ idx_EmpresasVALIDEZ_PRESUPUESTOS = 25;
+ idx_EmpresasNUM_ORDEN = 26;
+ idx_EmpresasID_PERFIL = 27;
{ EmpresasDatosBanco fields }
fld_EmpresasDatosBancoID = 'ID';
@@ -137,7 +139,7 @@ const
type
{ IEmpresasTiendas }
IEmpresasTiendas = interface(IDAStronglyTypedDataTable)
- ['{DE6BE283-469C-4253-9A99-60E55A11E17C}']
+ ['{A5E943E3-6466-46DD-B3C1-D4C8BE5FC18A}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -352,7 +354,7 @@ type
{ IEmpresas }
IEmpresas = interface(IDAStronglyTypedDataTable)
- ['{D210073A-3C0F-46FD-97FD-3928459451E7}']
+ ['{9D935CED-1A5C-4ADD-B00B-73C3B31F2D8A}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -448,6 +450,10 @@ type
procedure SetID_FORMA_PAGOValue(const aValue: SmallInt);
function GetID_FORMA_PAGOIsNull: Boolean;
procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean);
+ function GetID_FORMA_PAGO_PROVEEDORESValue: SmallInt;
+ procedure SetID_FORMA_PAGO_PROVEEDORESValue(const aValue: SmallInt);
+ function GetID_FORMA_PAGO_PROVEEDORESIsNull: Boolean;
+ procedure SetID_FORMA_PAGO_PROVEEDORESIsNull(const aValue: Boolean);
function GetVALIDEZ_PRESUPUESTOSValue: SmallInt;
procedure SetVALIDEZ_PRESUPUESTOSValue(const aValue: SmallInt);
function GetVALIDEZ_PRESUPUESTOSIsNull: Boolean;
@@ -511,6 +517,8 @@ type
property ID_TIPO_IVAIsNull: Boolean read GetID_TIPO_IVAIsNull write SetID_TIPO_IVAIsNull;
property ID_FORMA_PAGO: SmallInt read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property ID_FORMA_PAGOIsNull: Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull;
+ property ID_FORMA_PAGO_PROVEEDORES: SmallInt read GetID_FORMA_PAGO_PROVEEDORESValue write SetID_FORMA_PAGO_PROVEEDORESValue;
+ property ID_FORMA_PAGO_PROVEEDORESIsNull: Boolean read GetID_FORMA_PAGO_PROVEEDORESIsNull write SetID_FORMA_PAGO_PROVEEDORESIsNull;
property VALIDEZ_PRESUPUESTOS: SmallInt read GetVALIDEZ_PRESUPUESTOSValue write SetVALIDEZ_PRESUPUESTOSValue;
property VALIDEZ_PRESUPUESTOSIsNull: Boolean read GetVALIDEZ_PRESUPUESTOSIsNull write SetVALIDEZ_PRESUPUESTOSIsNull;
property NUM_ORDEN: SmallInt read GetNUM_ORDENValue write SetNUM_ORDENValue;
@@ -622,6 +630,10 @@ type
procedure SetID_FORMA_PAGOValue(const aValue: SmallInt); virtual;
function GetID_FORMA_PAGOIsNull: Boolean; virtual;
procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean); virtual;
+ function GetID_FORMA_PAGO_PROVEEDORESValue: SmallInt; virtual;
+ procedure SetID_FORMA_PAGO_PROVEEDORESValue(const aValue: SmallInt); virtual;
+ function GetID_FORMA_PAGO_PROVEEDORESIsNull: Boolean; virtual;
+ procedure SetID_FORMA_PAGO_PROVEEDORESIsNull(const aValue: Boolean); virtual;
function GetVALIDEZ_PRESUPUESTOSValue: SmallInt; virtual;
procedure SetVALIDEZ_PRESUPUESTOSValue(const aValue: SmallInt); virtual;
function GetVALIDEZ_PRESUPUESTOSIsNull: Boolean; virtual;
@@ -684,6 +696,8 @@ type
property ID_TIPO_IVAIsNull: Boolean read GetID_TIPO_IVAIsNull write SetID_TIPO_IVAIsNull;
property ID_FORMA_PAGO: SmallInt read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property ID_FORMA_PAGOIsNull: Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull;
+ property ID_FORMA_PAGO_PROVEEDORES: SmallInt read GetID_FORMA_PAGO_PROVEEDORESValue write SetID_FORMA_PAGO_PROVEEDORESValue;
+ property ID_FORMA_PAGO_PROVEEDORESIsNull: Boolean read GetID_FORMA_PAGO_PROVEEDORESIsNull write SetID_FORMA_PAGO_PROVEEDORESIsNull;
property VALIDEZ_PRESUPUESTOS: SmallInt read GetVALIDEZ_PRESUPUESTOSValue write SetVALIDEZ_PRESUPUESTOSValue;
property VALIDEZ_PRESUPUESTOSIsNull: Boolean read GetVALIDEZ_PRESUPUESTOSIsNull write SetVALIDEZ_PRESUPUESTOSIsNull;
property NUM_ORDEN: SmallInt read GetNUM_ORDENValue write SetNUM_ORDENValue;
@@ -699,7 +713,7 @@ type
{ IEmpresasDatosBanco }
IEmpresasDatosBanco = interface(IDAStronglyTypedDataTable)
- ['{DF6BEEB5-1CC8-4419-A432-D1FC275D5852}']
+ ['{7662EC5C-CE6D-4FEF-9F39-A29307FEC214}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -1719,6 +1733,27 @@ begin
DataTable.Fields[idx_EmpresasID_FORMA_PAGO].AsVariant := Null;
end;
+function TEmpresasDataTableRules.GetID_FORMA_PAGO_PROVEEDORESValue: SmallInt;
+begin
+ result := DataTable.Fields[idx_EmpresasID_FORMA_PAGO_PROVEEDORES].AsSmallInt;
+end;
+
+procedure TEmpresasDataTableRules.SetID_FORMA_PAGO_PROVEEDORESValue(const aValue: SmallInt);
+begin
+ DataTable.Fields[idx_EmpresasID_FORMA_PAGO_PROVEEDORES].AsSmallInt := aValue;
+end;
+
+function TEmpresasDataTableRules.GetID_FORMA_PAGO_PROVEEDORESIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_EmpresasID_FORMA_PAGO_PROVEEDORES].IsNull;
+end;
+
+procedure TEmpresasDataTableRules.SetID_FORMA_PAGO_PROVEEDORESIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_EmpresasID_FORMA_PAGO_PROVEEDORES].AsVariant := Null;
+end;
+
function TEmpresasDataTableRules.GetVALIDEZ_PRESUPUESTOSValue: SmallInt;
begin
result := DataTable.Fields[idx_EmpresasVALIDEZ_PRESUPUESTOS].AsSmallInt;
diff --git a/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas b/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas
index d0cfccb9..051fc3d3 100644
--- a/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas
+++ b/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas
@@ -9,14 +9,14 @@ 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_EmpresasTiendasDelta = '{13E84D72-2300-4184-9F8C-B1F4F117CD4A}';
- RID_EmpresasDelta = '{C652CB8F-D35A-4C25-80C6-C18C214FF9F8}';
- RID_EmpresasDatosBancoDelta = '{D8E33A1D-2CF4-408D-A7EE-68711A3EE24F}';
+ RID_EmpresasTiendasDelta = '{4B58C4F4-2B40-45F7-97CF-A69DE7400EC5}';
+ RID_EmpresasDelta = '{1C685D7D-AC4D-43AC-A3B9-95C2B9FA13FB}';
+ RID_EmpresasDatosBancoDelta = '{7077625B-BD29-46F8-AC4F-927850B2B9A2}';
type
{ IEmpresasTiendasDelta }
IEmpresasTiendasDelta = interface(IEmpresasTiendas)
- ['{13E84D72-2300-4184-9F8C-B1F4F117CD4A}']
+ ['{4B58C4F4-2B40-45F7-97CF-A69DE7400EC5}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -231,7 +231,7 @@ type
{ IEmpresasDelta }
IEmpresasDelta = interface(IEmpresas)
- ['{C652CB8F-D35A-4C25-80C6-C18C214FF9F8}']
+ ['{1C685D7D-AC4D-43AC-A3B9-95C2B9FA13FB}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldNIF_CIFValue : String;
@@ -257,6 +257,7 @@ type
function GetOldREGISTRO_MERCANTILValue : String;
function GetOldID_TIPO_IVAValue : SmallInt;
function GetOldID_FORMA_PAGOValue : SmallInt;
+ function GetOldID_FORMA_PAGO_PROVEEDORESValue : SmallInt;
function GetOldVALIDEZ_PRESUPUESTOSValue : SmallInt;
function GetOldNUM_ORDENValue : SmallInt;
function GetOldID_PERFILValue : Integer;
@@ -286,6 +287,7 @@ type
property OldREGISTRO_MERCANTIL : String read GetOldREGISTRO_MERCANTILValue;
property OldID_TIPO_IVA : SmallInt read GetOldID_TIPO_IVAValue;
property OldID_FORMA_PAGO : SmallInt read GetOldID_FORMA_PAGOValue;
+ property OldID_FORMA_PAGO_PROVEEDORES : SmallInt read GetOldID_FORMA_PAGO_PROVEEDORESValue;
property OldVALIDEZ_PRESUPUESTOS : SmallInt read GetOldVALIDEZ_PRESUPUESTOSValue;
property OldNUM_ORDEN : SmallInt read GetOldNUM_ORDENValue;
property OldID_PERFIL : Integer read GetOldID_PERFILValue;
@@ -442,6 +444,12 @@ type
function GetOldID_FORMA_PAGOIsNull: Boolean; virtual;
procedure SetID_FORMA_PAGOValue(const aValue: SmallInt); virtual;
procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean); virtual;
+ function GetID_FORMA_PAGO_PROVEEDORESValue: SmallInt; virtual;
+ function GetID_FORMA_PAGO_PROVEEDORESIsNull: Boolean; virtual;
+ function GetOldID_FORMA_PAGO_PROVEEDORESValue: SmallInt; virtual;
+ function GetOldID_FORMA_PAGO_PROVEEDORESIsNull: Boolean; virtual;
+ procedure SetID_FORMA_PAGO_PROVEEDORESValue(const aValue: SmallInt); virtual;
+ procedure SetID_FORMA_PAGO_PROVEEDORESIsNull(const aValue: Boolean); virtual;
function GetVALIDEZ_PRESUPUESTOSValue: SmallInt; virtual;
function GetVALIDEZ_PRESUPUESTOSIsNull: Boolean; virtual;
function GetOldVALIDEZ_PRESUPUESTOSValue: SmallInt; virtual;
@@ -558,6 +566,10 @@ type
property ID_FORMA_PAGOIsNull : Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull;
property OldID_FORMA_PAGO : SmallInt read GetOldID_FORMA_PAGOValue;
property OldID_FORMA_PAGOIsNull : Boolean read GetOldID_FORMA_PAGOIsNull;
+ property ID_FORMA_PAGO_PROVEEDORES : SmallInt read GetID_FORMA_PAGO_PROVEEDORESValue write SetID_FORMA_PAGO_PROVEEDORESValue;
+ property ID_FORMA_PAGO_PROVEEDORESIsNull : Boolean read GetID_FORMA_PAGO_PROVEEDORESIsNull write SetID_FORMA_PAGO_PROVEEDORESIsNull;
+ property OldID_FORMA_PAGO_PROVEEDORES : SmallInt read GetOldID_FORMA_PAGO_PROVEEDORESValue;
+ property OldID_FORMA_PAGO_PROVEEDORESIsNull : Boolean read GetOldID_FORMA_PAGO_PROVEEDORESIsNull;
property VALIDEZ_PRESUPUESTOS : SmallInt read GetVALIDEZ_PRESUPUESTOSValue write SetVALIDEZ_PRESUPUESTOSValue;
property VALIDEZ_PRESUPUESTOSIsNull : Boolean read GetVALIDEZ_PRESUPUESTOSIsNull write SetVALIDEZ_PRESUPUESTOSIsNull;
property OldVALIDEZ_PRESUPUESTOS : SmallInt read GetOldVALIDEZ_PRESUPUESTOSValue;
@@ -579,7 +591,7 @@ type
{ IEmpresasDatosBancoDelta }
IEmpresasDatosBancoDelta = interface(IEmpresasDatosBanco)
- ['{D8E33A1D-2CF4-408D-A7EE-68711A3EE24F}']
+ ['{7077625B-BD29-46F8-AC4F-927850B2B9A2}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -2002,6 +2014,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_FORMA_PAGO] := Null;
end;
+function TEmpresasBusinessProcessorRules.GetID_FORMA_PAGO_PROVEEDORESValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_FORMA_PAGO_PROVEEDORES];
+end;
+
+function TEmpresasBusinessProcessorRules.GetID_FORMA_PAGO_PROVEEDORESIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_FORMA_PAGO_PROVEEDORES]);
+end;
+
+function TEmpresasBusinessProcessorRules.GetOldID_FORMA_PAGO_PROVEEDORESValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasID_FORMA_PAGO_PROVEEDORES];
+end;
+
+function TEmpresasBusinessProcessorRules.GetOldID_FORMA_PAGO_PROVEEDORESIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasID_FORMA_PAGO_PROVEEDORES]);
+end;
+
+procedure TEmpresasBusinessProcessorRules.SetID_FORMA_PAGO_PROVEEDORESValue(const aValue: SmallInt);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_FORMA_PAGO_PROVEEDORES] := aValue;
+end;
+
+procedure TEmpresasBusinessProcessorRules.SetID_FORMA_PAGO_PROVEEDORESIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_FORMA_PAGO_PROVEEDORES] := Null;
+end;
+
function TEmpresasBusinessProcessorRules.GetVALIDEZ_PRESUPUESTOSValue: SmallInt;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasVALIDEZ_PRESUPUESTOS];
diff --git a/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm b/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm
index ea5a14f0..6a07179f 100644
--- a/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm
+++ b/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm
@@ -303,6 +303,10 @@ object srvEmpresas: TsrvEmpresas
item
DatasetField = 'ID_PERFIL'
TableField = 'ID_PERFIL'
+ end
+ item
+ DatasetField = 'ID_FORMA_PAGO_PROVEEDORES'
+ TableField = 'ID_FORMA_PAGO_PROVEEDORES'
end>
end>
Name = 'Empresas'
@@ -446,6 +450,10 @@ object srvEmpresas: TsrvEmpresas
Name = 'ID_FORMA_PAGO'
DataType = datSmallInt
end
+ item
+ Name = 'ID_FORMA_PAGO_PROVEEDORES'
+ DataType = datSmallInt
+ end
item
Name = 'VALIDEZ_PRESUPUESTOS'
DataType = datSmallInt
@@ -577,98 +585,144 @@ object srvEmpresas: TsrvEmpresas
end
item
Name = 'NIF_CIF'
+ DataType = datString
+ Size = 15
Value = ''
end
item
Name = 'NOMBRE'
+ DataType = datString
+ Size = 255
Value = ''
end
item
Name = 'RAZON_SOCIAL'
+ DataType = datString
+ Size = 255
Value = ''
end
item
Name = 'CALLE'
+ DataType = datString
+ Size = 255
Value = ''
end
item
Name = 'POBLACION'
+ DataType = datString
+ Size = 255
Value = ''
end
item
Name = 'PROVINCIA'
+ DataType = datString
+ Size = 255
Value = ''
end
item
Name = 'CODIGO_POSTAL'
+ DataType = datString
+ Size = 10
Value = ''
end
item
Name = 'TELEFONO_1'
+ DataType = datString
+ Size = 25
Value = ''
end
item
Name = 'TELEFONO_2'
+ DataType = datString
+ Size = 25
Value = ''
end
item
Name = 'MOVIL_1'
+ DataType = datString
+ Size = 25
Value = ''
end
item
Name = 'MOVIL_2'
+ DataType = datString
+ Size = 25
Value = ''
end
item
Name = 'FAX'
+ DataType = datString
+ Size = 25
Value = ''
end
item
Name = 'EMAIL_1'
+ DataType = datString
+ Size = 255
Value = ''
end
item
Name = 'EMAIL_2'
+ DataType = datString
+ Size = 255
Value = ''
end
item
Name = 'PAGINA_WEB'
+ DataType = datString
+ Size = 255
Value = ''
end
item
Name = 'NOTAS'
+ DataType = datMemo
Value = ''
end
item
Name = 'FECHA_ALTA'
+ DataType = datDateTime
Value = ''
end
item
Name = 'FECHA_MODIFICACION'
+ DataType = datDateTime
Value = ''
end
item
Name = 'USUARIO'
+ DataType = datString
+ Size = 30
Value = ''
end
item
Name = 'LOGOTIPO'
+ DataType = datBlob
Value = ''
end
item
Name = 'REGISTRO_MERCANTIL'
+ DataType = datString
+ Size = 255
Value = ''
end
item
Name = 'ID_TIPO_IVA'
+ DataType = datSmallInt
Value = ''
end
item
Name = 'ID_FORMA_PAGO'
+ DataType = datSmallInt
Value = ''
end
item
Name = 'VALIDEZ_PRESUPUESTOS'
+ DataType = datSmallInt
+ Value = ''
+ end
+ item
+ Name = 'ID_FORMA_PAGO_PROVEEDORES'
+ DataType = datSmallInt
Value = ''
end>
Statements = <
@@ -682,12 +736,13 @@ object srvEmpresas: TsrvEmpresas
'FONO_2, MOVIL_1, MOVIL_2, '#10' FAX, EMAIL_1, EMAIL_2, PAGINA_WE' +
'B, NOTAS, FECHA_ALTA, '#10' FECHA_MODIFICACION, USUARIO, LOGOTIP' +
'O, REGISTRO_MERCANTIL, '#10' ID_TIPO_IVA, ID_FORMA_PAGO, VALIDEZ' +
- '_PRESUPUESTOS)'#10' VALUES'#10' (:ID,:NIF_CIF, :NOMBRE, :RAZON_SOCIA' +
- 'L, :CALLE, :POBLACION,'#10' :PROVINCIA, :CODIGO_POSTAL, :TELEFON' +
- 'O_1, :TELEFONO_2, '#10' :MOVIL_1, :MOVIL_2, :FAX, :EMAIL_1, :EMA' +
- 'IL_2, :PAGINA_WEB, '#10' :NOTAS, :FECHA_ALTA, :FECHA_MODIFICACIO' +
- 'N, :USUARIO, '#10' :LOGOTIPO, :REGISTRO_MERCANTIL, :ID_TIPO_IVA,' +
- ' :ID_FORMA_PAGO, '#10' :VALIDEZ_PRESUPUESTOS)'#10
+ '_PRESUPUESTOS, ID_FORMA_PAGO_PROVEEDORES)'#10' VALUES'#10' (:ID,:NIF' +
+ '_CIF, :NOMBRE, :RAZON_SOCIAL, :CALLE, :POBLACION,'#10' :PROVINCI' +
+ 'A, :CODIGO_POSTAL, :TELEFONO_1, :TELEFONO_2, '#10' :MOVIL_1, :MO' +
+ 'VIL_2, :FAX, :EMAIL_1, :EMAIL_2, :PAGINA_WEB, '#10' :NOTAS, :FEC' +
+ 'HA_ALTA, :FECHA_MODIFICACION, :USUARIO, '#10' :LOGOTIPO, :REGIST' +
+ 'RO_MERCANTIL, :ID_TIPO_IVA, :ID_FORMA_PAGO, '#10' :VALIDEZ_PRESU' +
+ 'PUESTOS, :ID_FORMA_PAGO_PROVEEDORES)'#10
StatementType = stSQL
ColumnMappings = <>
end>
@@ -849,6 +904,11 @@ object srvEmpresas: TsrvEmpresas
DataType = datSmallInt
Value = ''
end
+ item
+ Name = 'ID_FORMA_PAGO_PROVEEDORES'
+ DataType = datSmallInt
+ Value = ''
+ end
item
Name = 'OLD_ID'
Value = ''
@@ -870,8 +930,9 @@ object srvEmpresas: TsrvEmpresas
'CHA_MODIFICACION, '#10' USUARIO = :USUARIO, '#10' LOGOTIPO = :LOGO' +
'TIPO, '#10' REGISTRO_MERCANTIL = :REGISTRO_MERCANTIL, '#10' ID_TIP' +
'O_IVA = :ID_TIPO_IVA, '#10' ID_FORMA_PAGO = :ID_FORMA_PAGO, '#10' ' +
- 'VALIDEZ_PRESUPUESTOS = :VALIDEZ_PRESUPUESTOS'#10' WHERE'#10' (ID = :' +
- 'OLD_ID)'#10
+ 'VALIDEZ_PRESUPUESTOS = :VALIDEZ_PRESUPUESTOS,'#10' ID_FORMA_PAGO_' +
+ 'PROVEEDORES = :ID_FORMA_PAGO_PROVEEDORES'#10' WHERE'#10' (ID = :OLD_' +
+ 'ID)'#10
StatementType = stSQL
ColumnMappings = <>
end>
diff --git a/Source/ApplicationBase/Empresas/Views/uViewEmpresa.dfm b/Source/ApplicationBase/Empresas/Views/uViewEmpresa.dfm
index cee4c116..aa0e6424 100644
--- a/Source/ApplicationBase/Empresas/Views/uViewEmpresa.dfm
+++ b/Source/ApplicationBase/Empresas/Views/uViewEmpresa.dfm
@@ -35,7 +35,7 @@ inherited frViewEmpresa: TfrViewEmpresa
end
object eCalle: TcxDBTextEdit
Left = 195
- Top = 247
+ Top = 274
DataBinding.DataField = 'CALLE'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
@@ -52,12 +52,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 6
+ TabOrder = 7
Width = 84
end
object cbProvincia: TcxDBComboBox
Left = 195
- Top = 274
+ Top = 301
DataBinding.DataField = 'PROVINCIA'
DataBinding.DataSource = DADataSource
Properties.OnInitPopup = eProvinciaPropertiesInitPopup
@@ -77,12 +77,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 7
+ TabOrder = 8
Width = 106
end
object cbPoblacion: TcxDBComboBox
Left = 195
- Top = 301
+ Top = 328
DataBinding.DataField = 'POBLACION'
DataBinding.DataSource = DADataSource
Properties.OnInitPopup = ePoblacionPropertiesInitPopup
@@ -102,12 +102,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 9
+ TabOrder = 10
Width = 100
end
object eCodigoPostal: TcxDBTextEdit
Left = 369
- Top = 274
+ Top = 301
DataBinding.DataField = 'CODIGO_POSTAL'
DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame
@@ -124,7 +124,7 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 8
+ TabOrder = 9
Width = 65
end
object ePaginaWeb: TcxDBTextEdit
@@ -146,7 +146,7 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 17
+ TabOrder = 18
Width = 165
end
object eMailParticular: TcxDBTextEdit
@@ -168,7 +168,7 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 16
+ TabOrder = 17
Width = 165
end
object eMailTrabajo: TcxDBTextEdit
@@ -190,7 +190,7 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 15
+ TabOrder = 16
Width = 129
end
object eTlfParticular: TcxDBTextEdit
@@ -212,7 +212,7 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 12
+ TabOrder = 13
Width = 91
end
object eTlfTrabajo: TcxDBTextEdit
@@ -234,7 +234,7 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 11
+ TabOrder = 12
Width = 127
end
object eTlfMovil: TcxDBTextEdit
@@ -256,7 +256,7 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 13
+ TabOrder = 14
Width = 155
end
object eFax: TcxDBTextEdit
@@ -278,7 +278,7 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 14
+ TabOrder = 15
Width = 391
end
object eNombre: TcxDBTextEdit
@@ -367,7 +367,7 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 18
+ TabOrder = 19
Height = 100
Width = 140
end
@@ -427,7 +427,7 @@ inherited frViewEmpresa: TfrViewEmpresa
end
inline frViewObservaciones1: TfrViewObservaciones
Left = 22
- Top = 358
+ Top = 385
Width = 521
Height = 150
Font.Charset = DEFAULT_CHARSET
@@ -436,10 +436,10 @@ inherited frViewEmpresa: TfrViewEmpresa
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
- TabOrder = 10
+ TabOrder = 11
ReadOnly = False
ExplicitLeft = 22
- ExplicitTop = 358
+ ExplicitTop = 385
inherited memObservaciones: TcxDBMemo
DataBinding.DataField = 'NOTAS'
DataBinding.DataSource = DADataSource
@@ -447,7 +447,7 @@ inherited frViewEmpresa: TfrViewEmpresa
end
object eValidez: TcxDBSpinEdit
Left = 195
- Top = 190
+ Top = 217
DataBinding.DataField = 'VALIDEZ_PRESUPUESTOS'
DataBinding.DataSource = DADataSource
Properties.Alignment.Horz = taRightJustify
@@ -464,9 +464,36 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
- TabOrder = 5
+ TabOrder = 6
Width = 121
end
+ object cbFormaPagoProveedores: TcxComboBox
+ Left = 195
+ Top = 190
+ Anchors = [akLeft, akTop, akRight]
+ Properties.DropDownListStyle = lsEditFixedList
+ Properties.DropDownRows = 25
+ Properties.ImmediatePost = True
+ 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 = 5
+ Width = 239
+ end
object dxLayoutControl1Group_Root: TdxLayoutGroup
ShowCaption = False
Hidden = True
@@ -504,10 +531,15 @@ inherited frViewEmpresa: TfrViewEmpresa
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item18: TdxLayoutItem
- Caption = 'Forma de pago por defecto:'
+ Caption = 'Forma de pago para clientes:'
Control = cbFormaPago
ControlOptions.ShowBorder = False
end
+ object dxLayoutControl1Item22: TdxLayoutItem
+ Caption = 'Forma pago para proveedores'
+ Control = cbFormaPagoProveedores
+ ControlOptions.ShowBorder = False
+ end
object dxLayoutControl1Item21: TdxLayoutItem
Caption = 'Meses de validez en presupuestos:'
Control = eValidez
diff --git a/Source/ApplicationBase/Empresas/Views/uViewEmpresa.pas b/Source/ApplicationBase/Empresas/Views/uViewEmpresa.pas
index 0757c429..ab601a87 100644
--- a/Source/ApplicationBase/Empresas/Views/uViewEmpresa.pas
+++ b/Source/ApplicationBase/Empresas/Views/uViewEmpresa.pas
@@ -86,6 +86,8 @@ type
dxLayoutControl1Item8: TdxLayoutItem;
eValidez: TcxDBSpinEdit;
dxLayoutControl1Item21: TdxLayoutItem;
+ dxLayoutControl1Item22: TdxLayoutItem;
+ cbFormaPagoProveedores: TcxComboBox;
procedure actAnadirExecute(Sender: TObject);
procedure actEliminarExecute(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject);
@@ -93,6 +95,7 @@ type
procedure eProvinciaPropertiesInitPopup(Sender: TObject);
procedure ePoblacionPropertiesInitPopup(Sender: TObject);
procedure FormaPagoEditValueChanged(Sender: TObject);
+ procedure FormaPagoProveedoresEditValueChanged(Sender: TObject);
procedure TipoIVAEditValueChanged(Sender: TObject);
procedure CustomViewShow(Sender: TObject);
@@ -247,13 +250,20 @@ var
begin
inherited;
- //Activamos la forma de pago que tenga la empresa
+ //Activamos la forma de pago para clientes que tenga la empresa
cbFormaPago.ItemIndex := 0;
for i := 0 to FFormasPago.Count - 1 do
if IntToStr(FEmpresa.ID_FORMA_PAGO) = FFormasPago.Values[FFormasPago.Names[i]] then
cbFormaPago.ItemIndex := i;
+ //Activamos la forma de pago para proveedores que tenga la empresa
+ cbFormaPagoProveedores.ItemIndex := 0;
+ for i := 0 to FFormasPago.Count - 1 do
+ if IntToStr(FEmpresa.ID_FORMA_PAGO_PROVEEDORES) = FFormasPago.Values[FFormasPago.Names[i]] then
+ cbFormaPagoProveedores.ItemIndex := i;
+
cbFormaPago.Properties.OnEditValueChanged := FormaPagoEditValueChanged;
+ cbFormaPagoProveedores.Properties.OnEditValueChanged := FormaPagoProveedoresEditValueChanged;
//Activamos el tipo iva que tenga la empresa
cbTipoIVA.ItemIndex := 0;
@@ -319,6 +329,17 @@ begin
Controller.AsignarIDFormaPago(FEmpresa, IDFormaPago);
end;
+procedure TfrViewEmpresa.FormaPagoProveedoresEditValueChanged(Sender: TObject);
+var
+ IDFormaPago: String;
+begin
+ IDFormaPago := '';
+ if Assigned(FFormasPago) then
+ IDFormaPago := FFormasPago.Values[cbFormaPagoProveedores.EditValue];
+
+ Controller.AsignarIDFormaPagoProveedores(FEmpresa, IDFormaPago);
+end;
+
function TfrViewEmpresa.GetController: IEmpresasController;
begin
Result := FController;
@@ -351,6 +372,19 @@ begin
end;
end;
+ if Assigned(FFormasPago) then
+ with cbFormaPagoProveedores.Properties.Items do
+ begin
+ BeginUpdate;
+ try
+ Clear;
+ for i := 0 to FFormasPago.Count - 1 do
+ Add(FFormasPago.Names[i]);
+ finally
+ EndUpdate;
+ end;
+ end;
+
FTiposIVA := FController.DarListaTiposIVA;
if Assigned(FTiposIVA) then
with cbTipoIVA.Properties.Items do
diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj
index 59a3917a..66a9ccb7 100644
--- a/Source/Base/Base.dproj
+++ b/Source/Base/Base.dproj
@@ -58,56 +58,56 @@
MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
TForm
diff --git a/Source/Base/Base.res b/Source/Base/Base.res
index 1641339f..8b251f31 100644
Binary files a/Source/Base/Base.res and b/Source/Base/Base.res differ
diff --git a/Source/Base/Controladores/uControllerDetallesBase.pas b/Source/Base/Controladores/uControllerDetallesBase.pas
index 2584893b..6bef0a55 100644
--- a/Source/Base/Controladores/uControllerDetallesBase.pas
+++ b/Source/Base/Controladores/uControllerDetallesBase.pas
@@ -755,6 +755,8 @@ begin
FieldByName(CAMPO_CANTIDAD).AsVariant := Null;
FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := Null;
FieldByName(CAMPO_IMPORTE_TOTAL).AsVariant := Null;
+ FieldByName(CAMPO_INCREMENTO).AsVariant := Null;
+ FieldByName(CAMPO_DECREMENTO).AsVariant := Null;
FieldByName(CAMPO_DESCUENTO).AsVariant := Null;
FieldByName(CAMPO_IMPORTE_PORTE).AsVariant := Null;
diff --git a/Source/Base/Utiles/uCalculosUtils.pas b/Source/Base/Utiles/uCalculosUtils.pas
index c7a713f3..bf2fc394 100644
--- a/Source/Base/Utiles/uCalculosUtils.pas
+++ b/Source/Base/Utiles/uCalculosUtils.pas
@@ -14,6 +14,8 @@ const
CAMPO_CANTIDAD = 'CANTIDAD';
CAMPO_IMPORTE_UNIDAD = 'IMPORTE_UNIDAD';
CAMPO_IMPORTE_TOTAL = 'IMPORTE_TOTAL';
+ CAMPO_INCREMENTO = 'INCREMENTO';
+ CAMPO_DECREMENTO = 'DECREMENTO';
CAMPO_DESCUENTO = 'DESCUENTO';
CAMPO_IMPORTE_PORTE = 'IMPORTE_PORTE';
CAMPO_VISIBLE = 'VISIBLE'; //Se usará para saber si un concepto se debe sumar o no
@@ -25,27 +27,61 @@ const
procedure DesglosarPorte(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
function DarTotalPorte(ADetalles: IDAStronglyTypedDataTable): Double;
+ function CalcularImporteNeto (const ImporteUnidad: Double = 0; const Incremento: Double = 0; const Decremento: Double = 0): Double;
implementation
uses
- SysUtils, DB, Variants, cxControls;
+ SysUtils, DB, Variants, cxControls, uNumUtils;
+
+function CalcularImporteNeto (const ImporteUnidad: Double = 0; const Incremento: Double = 0; const Decremento: Double = 0): Double;
+var
+ PorcentajeIncrementar: Double;
+ ValorADecrementar: Double;
+
+begin
+//Regla de 3 escalar el precio complementario pedido por José Luís
+//1000x40% = 1000 - 400 = 600: 1000 = 0,6 -> precio coste: 0,6
+ PorcentajeIncrementar := ((100 - Incremento)/100);
+//Desactivamos a petición José Luís
+// ValorADecrementar := ImporteUnidad * (Decremento/100);
+ Result := RoundCurrency(ImporteUnidad/PorcentajeIncrementar);
+end;
function CalcularLineaConcepto (const ADataTable : TDADataTable): Double;
var
- ImporteTotal : Double;
+ AField: TDAField;
+ ImporteTotal, ImporteNeto, Incremento, Decremento, Descuento, ImportePorte : Double;
begin
with ADataTable do
begin
- if (VarIsNull(FieldByName(CAMPO_DESCUENTO).AsVariant)) then
- ImporteTotal := FieldByName(CAMPO_CANTIDAD).asFloat * FieldByName(CAMPO_IMPORTE_UNIDAD).AsFloat
- else
- ImporteTotal := FieldByName(CAMPO_CANTIDAD).asFloat * (FieldByName(CAMPO_IMPORTE_UNIDAD).AsFloat - (FieldByName(CAMPO_IMPORTE_UNIDAD).AsFloat * (FieldByName(CAMPO_DESCUENTO).AsFloat/100)));
+ Incremento := 0;
+ Decremento := 0;
+ Descuento := 0;
+ ImportePorte := 0;
+ ImporteNeto := FieldByName(CAMPO_IMPORTE_UNIDAD).AsFloat;
- if (VarIsNull(FieldByName(CAMPO_IMPORTE_PORTE).AsVariant)) then
- ImporteTotal := ImporteTotal
- else
- ImporteTotal := ImporteTotal + (FieldByName(CAMPO_CANTIDAD).asFloat * FieldByName(CAMPO_IMPORTE_PORTE).AsFloat);
+ //Validamos la existencia del campo incremento, por si no está activo en otros módulos que no sean (presupuestos y contratos)
+ AField := FindField(CAMPO_INCREMENTO);
+ if Assigned(AField) then
+ if (not VarIsNull(AField.AsVariant)) then
+ Incremento := AField.AsFloat;
+
+ //Validamos la existencia del campo decremento, por si no está activo en otros módulos que no sean (presupuestos y contratos)
+ AField := FindField(CAMPO_DECREMENTO);
+ if Assigned(AField) then
+ if (not VarIsNull(AField.AsVariant)) then
+ Decremento := AField.AsFloat;
+
+ ImporteNeto := CalcularImporteNeto(ImporteNeto, Incremento, Decremento);
+
+ if (not VarIsNull(FieldByName(CAMPO_DESCUENTO).AsVariant)) then
+ Descuento := ImporteNeto * (FieldByName(CAMPO_DESCUENTO).AsFloat/100);
+
+ if (not VarIsNull(FieldByName(CAMPO_IMPORTE_PORTE).AsVariant)) then
+ ImportePorte := FieldByName(CAMPO_CANTIDAD).asFloat * FieldByName(CAMPO_IMPORTE_PORTE).AsFloat;
+
+ ImporteTotal := (RoundCurrency(ImporteNeto - Descuento) * FieldByName(CAMPO_CANTIDAD).asFloat) + ImportePorte;
end;
Result := ImporteTotal;
diff --git a/Source/Cliente/FactuGES.dpr b/Source/Cliente/FactuGES.dpr
index 953a0006..26dad992 100644
--- a/Source/Cliente/FactuGES.dpr
+++ b/Source/Cliente/FactuGES.dpr
@@ -1,7 +1,6 @@
program FactuGES;
uses
- ExceptionLog,
Forms,
Windows,
SysUtils,
diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj
index 3e47fdbe..a374c720 100644
--- a/Source/Cliente/FactuGES.dproj
+++ b/Source/Cliente/FactuGES.dproj
@@ -43,7 +43,7 @@
$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib
$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib
$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib
- DEBUG;EUREKALOG;EUREKALOG_VER6
+ DEBUG;
True
True
3
@@ -52,7 +52,8 @@
Delphi.Personality
VCLApplication
-FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse3000FalseFalseFalseFalseFalse30821252Rodax Software S.L.3.0.0.0FactuGESFactuGES3.0.0.0
+FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse3400FalseFalseFalseFalseFalse30821252Rodax Software S.L.3.4.0.0FactuGESFactuGES3.4.0.0
+
File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found
FactuGES.dprFalse
@@ -80,7 +81,7 @@
diff --git a/Source/Modulos/Facturas de proveedor/Plugin/uPluginFacturasProveedor.pas b/Source/Modulos/Facturas de proveedor/Plugin/uPluginFacturasProveedor.pas
index da198ef0..0d196a3e 100644
--- a/Source/Modulos/Facturas de proveedor/Plugin/uPluginFacturasProveedor.pas
+++ b/Source/Modulos/Facturas de proveedor/Plugin/uPluginFacturasProveedor.pas
@@ -75,7 +75,7 @@ begin
try
ShowHourglassCursor;
try
- AFacturas := AFacturasProveedorController.BuscarTodos; // BuscarDelContrato(ID_Contrato);
+ AFacturas := Nil; //BuscarDelContrato(ID_Contrato);
finally
HideHourglassCursor;
end;
diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm
index 62d17e34..7ae43402 100644
--- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm
+++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm
@@ -208,6 +208,8 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
ExplicitHeight = 228
inherited memObservaciones: TcxDBMemo
DataBinding.DataSource = frViewFacturaProveedor1.DADataSource
+ ExplicitWidth = 671
+ ExplicitHeight = 20
Height = 228
Width = 671
end
@@ -218,10 +220,6 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
object pagContenido: TTabSheet
Caption = 'Contenido'
ImageIndex = 1
- ExplicitLeft = 0
- ExplicitTop = 0
- ExplicitWidth = 0
- ExplicitHeight = 0
inline frViewDetallesFacturaProveedor1: TfrViewDetallesFacturaProveedor
Left = 0
Top = 0
@@ -340,18 +338,6 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited ToolBar1: TToolBar
Width = 732
ExplicitWidth = 732
- inherited ToolButton1: TToolButton
- ExplicitWidth = 113
- end
- inherited ToolButton4: TToolButton
- ExplicitWidth = 113
- end
- inherited ToolButton2: TToolButton
- ExplicitWidth = 113
- end
- inherited ToolButton7: TToolButton
- ExplicitWidth = 113
- end
end
end
end
@@ -625,6 +611,10 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor
inherited PnlComentario: TPanel [5]
Width = 746
ExplicitWidth = 746
+ inherited lbComentario: TLabel
+ Width = 736
+ Height = 25
+ end
end
inherited EditorActionList: TActionList [9]
Left = 8
diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas
index caf53af5..5b6a9f0d 100644
--- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas
+++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas
@@ -298,6 +298,10 @@ begin
if not (FFactura.DataTable.State in dsEditModes) then
FFactura.DataTable.Edit;
+ //Preguntamos si quiere cambiar la forma de pago por la que tenga en su ficha
+ if (ShowConfirmMessage('Cambio forma de pago', '¿Desea actualizar la forma de pago a la asignada en la ficha del proveedor seleccionado?') = IDYES) then
+ FFactura.ID_FORMA_PAGO := FFactura.Proveedor.ID_FORMA_PAGO;
+
//En el caso de Acana no se cambia para que el IVA y la FORMA DE PAGO por defecto sea el de la empresa.
// Actualizar IVA y RE a partir del tipo de IVA del proveedor.
{ Factura.IVA := FTiposIVA.IVA; //((frViewTotales1.dsTiposIVA.DataTable) as IBizTipoIVA).IVA;
diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewElegirArticulosFacturasProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uViewElegirArticulosFacturasProveedor.dfm
index 295279a3..85400f0d 100644
--- a/Source/Modulos/Facturas de proveedor/Views/uViewElegirArticulosFacturasProveedor.dfm
+++ b/Source/Modulos/Facturas de proveedor/Views/uViewElegirArticulosFacturasProveedor.dfm
@@ -21,14 +21,26 @@ inherited frViewElegirArticulosFacturasProveedor: TfrViewElegirArticulosFacturas
inherited TBXDockablePanel1: TTBXDockablePanel
inherited dxLayoutControl1: TdxLayoutControl
inherited txtFiltroTodo: TcxTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 273
Width = 273
- end
+ 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 = 121
Width = 121
end
diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewElegirArticulosFacturasProveedor.pas b/Source/Modulos/Facturas de proveedor/Views/uViewElegirArticulosFacturasProveedor.pas
index 235b2973..b1e89a48 100644
Binary files a/Source/Modulos/Facturas de proveedor/Views/uViewElegirArticulosFacturasProveedor.pas and b/Source/Modulos/Facturas de proveedor/Views/uViewElegirArticulosFacturasProveedor.pas differ
diff --git a/Source/Modulos/Formas de pago/Model/schFormasPagoClient_Intf.pas b/Source/Modulos/Formas de pago/Model/schFormasPagoClient_Intf.pas
index d13f69d1..299484d5 100644
--- a/Source/Modulos/Formas de pago/Model/schFormasPagoClient_Intf.pas
+++ b/Source/Modulos/Formas de pago/Model/schFormasPagoClient_Intf.pas
@@ -9,9 +9,9 @@ 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_ListaFormasPago = '{2B3ABE15-A405-4394-A2E1-ABE8557CC213}';
- RID_FormasPago = '{5691CFDF-40DA-4B7E-A1BB-0F3742347583}';
- RID_FormasPagoPlazos = '{807478A5-FF90-416D-822E-280382B76115}';
+ RID_ListaFormasPago = '{5F37E412-6E80-4264-9A93-95C631125E95}';
+ RID_FormasPago = '{74C6C49A-D2E9-4EE1-B803-53F7D9EFFE69}';
+ RID_FormasPagoPlazos = '{2E110066-0953-4ADE-A03C-D005CFA1BB59}';
{ Data table names }
nme_ListaFormasPago = 'ListaFormasPago';
@@ -65,7 +65,7 @@ const
type
{ IListaFormasPago }
IListaFormasPago = interface(IDAStronglyTypedDataTable)
- ['{2C5FADC5-48E4-4697-A72D-1B93FF2068F1}']
+ ['{E73A0F94-5B53-4004-B7B2-C7221E8D2BB4}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -112,7 +112,7 @@ type
{ IFormasPago }
IFormasPago = interface(IDAStronglyTypedDataTable)
- ['{58C39D48-70C7-46A4-B465-9EA5F97DB50D}']
+ ['{775A9FC6-1901-4226-8C54-3AD1A0A85113}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -255,7 +255,7 @@ type
{ IFormasPagoPlazos }
IFormasPagoPlazos = interface(IDAStronglyTypedDataTable)
- ['{61EB507B-9EA5-4E9C-8D3D-DEAE5F1073BD}']
+ ['{1C424FE8-50D4-49C4-9F9E-17784982D49A}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
diff --git a/Source/Modulos/Formas de pago/Model/schFormasPagoServer_Intf.pas b/Source/Modulos/Formas de pago/Model/schFormasPagoServer_Intf.pas
index 8c4bd779..5806e887 100644
--- a/Source/Modulos/Formas de pago/Model/schFormasPagoServer_Intf.pas
+++ b/Source/Modulos/Formas de pago/Model/schFormasPagoServer_Intf.pas
@@ -9,14 +9,14 @@ 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_ListaFormasPagoDelta = '{BD6D4DED-0109-4CD2-B6D9-99208EA6157D}';
- RID_FormasPagoDelta = '{257D7005-3F68-4FA7-94BD-4EDB95ED361F}';
- RID_FormasPagoPlazosDelta = '{46BB2583-A6D4-4A62-BB44-BAC8789FD0A2}';
+ RID_ListaFormasPagoDelta = '{D922AD1D-B882-416E-A3A8-AACDE765D2A8}';
+ RID_FormasPagoDelta = '{CA83064A-0FD3-4C51-BC91-198E3C270D3E}';
+ RID_FormasPagoPlazosDelta = '{453E8FC4-63FD-4078-B61D-D560968EB725}';
type
{ IListaFormasPagoDelta }
IListaFormasPagoDelta = interface(IListaFormasPago)
- ['{BD6D4DED-0109-4CD2-B6D9-99208EA6157D}']
+ ['{D922AD1D-B882-416E-A3A8-AACDE765D2A8}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldDESCRIPCIONValue : String;
@@ -62,7 +62,7 @@ type
{ IFormasPagoDelta }
IFormasPagoDelta = interface(IFormasPago)
- ['{257D7005-3F68-4FA7-94BD-4EDB95ED361F}']
+ ['{CA83064A-0FD3-4C51-BC91-198E3C270D3E}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldREFERENCIAValue : String;
@@ -204,7 +204,7 @@ type
{ IFormasPagoPlazosDelta }
IFormasPagoPlazosDelta = interface(IFormasPagoPlazos)
- ['{46BB2583-A6D4-4A62-BB44-BAC8789FD0A2}']
+ ['{453E8FC4-63FD-4078-B61D-D560968EB725}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_FORMA_PAGOValue : Integer;
diff --git a/Source/Modulos/Formas de pago/Servidor/srvFormasPago_Impl.dfm b/Source/Modulos/Formas de pago/Servidor/srvFormasPago_Impl.dfm
index 46436186..852c6631 100644
--- a/Source/Modulos/Formas de pago/Servidor/srvFormasPago_Impl.dfm
+++ b/Source/Modulos/Formas de pago/Servidor/srvFormasPago_Impl.dfm
@@ -14,8 +14,8 @@ object srvFormasPago: TsrvFormasPago
DiagramData =
''#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10
+ '00" Top="0,00" />'#13#10' '#13#10' '#13#10''#13#10
end
object DataDictionary: TDADataDictionary
Fields = <
@@ -138,7 +138,11 @@ object srvFormasPago: TsrvFormasPago
item
Connection = 'IBX'
TargetTable = 'FORMAS_PAGO'
- StatementType = stAutoSQL
+ SQL =
+ 'SELECT '#10' ID, REFERENCIA, DESCRIPCION, TITULAR, ENTIDAD, SUCUR' +
+ 'SAL, '#10' DC, CUENTA, ID_SUBCUENTA, IGNORAR_CONTABILIDAD'#10' FROM'#10 +
+ ' FORMAS_PAGO'#10' WHERE {Where}'#10' order by 2'#10
+ StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ID'
diff --git a/Source/Modulos/Historico de movimientos/Views/uViewHistoricoMovimientos.dfm b/Source/Modulos/Historico de movimientos/Views/uViewHistoricoMovimientos.dfm
index 55addfa5..ea190e64 100644
--- a/Source/Modulos/Historico de movimientos/Views/uViewHistoricoMovimientos.dfm
+++ b/Source/Modulos/Historico de movimientos/Views/uViewHistoricoMovimientos.dfm
@@ -25,7 +25,6 @@ inherited frViewHistoricoMovimientos: TfrViewHistoricoMovimientos
Column = cxGridViewFECHA
end>
OptionsCustomize.ColumnHidingOnGrouping = False
- OptionsCustomize.GroupBySorting = True
object cxGridViewID_ALMACEN: TcxGridDBColumn
DataBinding.FieldName = 'ID_ALMACEN'
Visible = False
diff --git a/Source/Modulos/Inventario/Views/uEditorElegirArticulosCatalogo.dfm b/Source/Modulos/Inventario/Views/uEditorElegirArticulosCatalogo.dfm
index e8773f8b..96af0d4a 100644
--- a/Source/Modulos/Inventario/Views/uEditorElegirArticulosCatalogo.dfm
+++ b/Source/Modulos/Inventario/Views/uEditorElegirArticulosCatalogo.dfm
@@ -2,13 +2,4 @@ inherited fEditorElegirArticulosCatalogo: TfEditorElegirArticulosCatalogo
Caption = 'fEditorElegirArticulosCatalogo'
PixelsPerInch = 96
TextHeight = 13
- inherited pnlHeader: TPanel
- inherited lblTitle: TLabel
- Width = 606
- end
- inherited lblComments: TLabel
- Width = 581
- Height = 27
- end
- end
end
diff --git a/Source/Modulos/Pedidos a proveedor/Controller/uDetallesPedidoProveedorController.pas b/Source/Modulos/Pedidos a proveedor/Controller/uDetallesPedidoProveedorController.pas
index a6451e0b..7c0e8785 100644
--- a/Source/Modulos/Pedidos a proveedor/Controller/uDetallesPedidoProveedorController.pas
+++ b/Source/Modulos/Pedidos a proveedor/Controller/uDetallesPedidoProveedorController.pas
@@ -69,7 +69,7 @@ begin
if Assigned(ADetalles) then
begin
try
- AArticulos := (FArticulosController.BuscarTodos as IBizArticulo);
+ AArticulos := (FArticulosController.BuscarTodosPorProveedor as IBizArticulo);
//Si nueva fila es false, quiere decir que se sustituye un determinado artículo, por ello la lista a seleccionar no debe ser multiselect
if ANuevaFila then
diff --git a/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas b/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas
index 7b5f51fe..9eb87ffc 100644
--- a/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas
+++ b/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas
@@ -4,7 +4,7 @@ interface
uses
- SysUtils, uDADataTable,
+ SysUtils, uDADataTable, Classes,
uControllerBase, uIDataModulePedidosProveedor, uProveedoresController,
uDetallesPedidoProveedorController, uBizPedidosProveedor, uGestorDocumentosController;
@@ -54,6 +54,9 @@ type
function CambiarSituacion(APedido: IBizPedidoProveedor; ASituacion : String; AFechaPagado: TDateTime = 0; DoPost : Boolean = True): Boolean; overload;
function CambiarSituacion(APedido: IBizPedidoProveedor): Boolean; overload;
+ function DarListaAnosPedidos: TStringList;
+ procedure FiltrarAno(APedido: IBizPedidoProveedor; ADynWhereDataTable: WideString; const Ano: String);
+
function ExtraerSeleccionados(APedido: IBizPedidoProveedor) : IBizPedidoProveedor;
function ElegirPedidos(APedido: IBizPedidoProveedor; AMensaje: String; AMultiSelect: Boolean): IBizPedidoProveedor;
procedure RecuperarProveedor(APedido: IBizPedidoProveedor);
@@ -130,6 +133,10 @@ type
function ExtraerSeleccionados(APedido: IBizPedidoProveedor) : IBizPedidoProveedor;
function ElegirPedidos(APedido: IBizPedidoProveedor; AMensaje: String; AMultiSelect: Boolean): IBizPedidoProveedor;
+
+ function DarListaAnosPedidos: TStringList;
+ procedure FiltrarAno(APedido: IBizPedidoProveedor; ADynWhereDataTable: WideString; const Ano: String);
+
end;
@@ -142,7 +149,7 @@ uses
uBizDetallesPedidoProveedor, uBizContactos, uDataTableUtils, uDataModuleUsuarios,
schPedidosProveedorClient_Intf, uDAInterfaces, uPedidosProveedorReportController,
uDateUtils, uIEditorPedidoProveedor, uIEditorElegirPedidosProveedor,
- Dialogs, uIEditorDireccionEntregaPedidoProveedor, Classes, FactuGES_Intf,
+ Dialogs, uIEditorDireccionEntregaPedidoProveedor, FactuGES_Intf,
uIEditorSituacionPedidoProveedor, Variants, uStringsUtils, uSistemaFunc, uEMailUtils, uDialogElegirEMail;
{ TPedidosProveedorController }
@@ -237,6 +244,11 @@ begin
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
end;
+function TPedidosProveedorController.DarListaAnosPedidos: TStringList;
+begin
+ Result := FDataModule.GetAnosItems;
+end;
+
procedure TPedidosProveedorController.DescartarCambios(APedido: IBizPedidoProveedor);
begin
if not Assigned(APedido) then
@@ -609,7 +621,8 @@ procedure TPedidosProveedorController.EnviarPedidoPorEMail(APedido: IBizPedidoPr
var
AReportController : IPedidosProveedorReportController;
AFicheroTMP : TFileName;
- ATituloEnvio : String;
+ AsuntoEnvio : String;
+ ACuerpoEnvio : String;
AEMail : String;
AListaEmail : TStringList;
begin
@@ -638,13 +651,14 @@ begin
ShowHourglassCursor;
// solicita por José Luís que el asunto del correo y el documento adunto sean igual que la referencia del pedido impreso
- ATituloEnvio := 'Pedido ref.' + Copy(APedido.REF_CON_CLIENTE, 8, 6) + '-' + APedido.REF_VENDEDOR + '-' + APedido.NOMBRE_CLIENTE + '-' + APedido.DESCRIPCION_GENERAL;
+ AsuntoEnvio := 'Pedido ref-' + Copy(APedido.REF_CON_CLIENTE, 8, 6) + '-' + APedido.REF_VENDEDOR + '-' + Copy(APedido.NOMBRE_CLIENTE, 1, 8) + '-' + APedido.DESCRIPCION_GENERAL;
+ ACuerpoEnvio := 'Pedido ref-' + Copy(APedido.REF_CON_CLIENTE, 8, 6) + '-' + APedido.REF_VENDEDOR + '-' + APedido.NOMBRE_CLIENTE + '-' + APedido.DESCRIPCION_GENERAL;
- AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(ATituloEnvio));
+ AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(AsuntoEnvio));
AReportController := TPedidosProveedorReportController.Create;
try
AReportController.ExportToPDF(APedido.ID, AFicheroTMP);
- SendMailMAPI(ATituloEnvio, ATituloEnvio, AFicheroTMP, '', '', APedido.Proveedor.NOMBRE, AEMail);
+ SendMailMAPI(AsuntoEnvio, ACuerpoEnvio, AFicheroTMP, '', '', APedido.Proveedor.NOMBRE, AEMail);
finally
DeleteFile(AFicheroTMP);
AReportController := NIL;
@@ -665,7 +679,8 @@ begin
if not Assigned(APedido) then
raise Exception.Create ('Pedido no asignado: EsModificable');
- Result := (APedido.SITUACION <> SITUACION_PEDIDO_RECIBIDO);
+// Result := (APedido.SITUACION <> SITUACION_PEDIDO_RECIBIDO);
+ Result := True;
end;
procedure TPedidosProveedorController.RecalcularImportes(APedido: IBizPedidoProveedor);
@@ -750,6 +765,35 @@ begin
Result := ASeleccionados;
end;
+procedure TPedidosProveedorController.FiltrarAno(APedido: IBizPedidoProveedor; ADynWhereDataTable: WideString; const Ano: String);
+var
+ Condicion: TDAWhereExpression;
+ FechaIni: String;
+ FechaFin: String;
+
+begin
+ APedido.DataTable.DynamicWhere.Clear;
+ APedido.DataTable.DynamicWhere.Xml := ADynWhereDataTable;
+
+ if (Ano <> 'Todos') then
+ begin
+ // Filtrar las facturas actuales por empresa
+ FechaIni := '01/01/' + Ano;
+ FechaFin := '31/12/' + Ano;
+ with APedido.DataTable.DynamicWhere do
+ begin
+ // (FECHA_INICIO between FECHA_FIN)
+ Condicion := NewBinaryExpression(NewField('', fld_PedidosProveedorFECHA_PEDIDO), NewConstant(FechaIni, datString), dboGreaterOrEqual);
+ Condicion := NewBinaryExpression(NewBinaryExpression(NewField('', fld_PedidosProveedorFECHA_PEDIDO), NewConstant(FechaFin, datString), dboLessOrEqual), Condicion, dboAnd);
+
+ if IsEmpty then
+ Expression := Condicion
+ else
+ Expression := NewBinaryExpression(Condicion, Expression, dboAnd);
+ end;
+ end;
+end;
+
procedure TPedidosProveedorController.FiltrarEmpresa(APedido: IBizPedidoProveedor);
var
Condicion: TDAWhereExpression;
diff --git a/Source/Modulos/Pedidos a proveedor/Data/PedidosProveedor_data.dproj b/Source/Modulos/Pedidos a proveedor/Data/PedidosProveedor_data.dproj
index 4d9b92fc..2ff99049 100644
--- a/Source/Modulos/Pedidos a proveedor/Data/PedidosProveedor_data.dproj
+++ b/Source/Modulos/Pedidos a proveedor/Data/PedidosProveedor_data.dproj
@@ -48,8 +48,8 @@
MainSource
-
-
+
+
diff --git a/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.dfm
index 8d689ea4..e75d5ce8 100644
--- a/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.dfm
@@ -108,6 +108,7 @@ inherited DataModulePedidosProveedor: TDataModulePedidosProveedor
DataType = datString
Size = 255
DisplayLabel = 'Almac'#233'n'
+ ServerAutoRefresh = True
DictionaryEntry = 'PedidosProveedor_NOMBRE_ALMACEN'
end
item
@@ -309,6 +310,24 @@ inherited DataModulePedidosProveedor: TDataModulePedidosProveedor
DataType = datInteger
DisplayLabel = 'PedidosProveedor_ID_DIRECCION_CLIENTE'
DictionaryEntry = 'PedidosProveedor_ID_DIRECCION_CLIENTE'
+ end
+ item
+ Name = 'UBICACION'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'ID_ALBARAN'
+ DataType = datInteger
+ end
+ item
+ Name = 'REF_ALB_PROV'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'NUM_BULTOS'
+ DataType = datSmallInt
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
@@ -398,4 +417,26 @@ inherited DataModulePedidosProveedor: TDataModulePedidosProveedor
Left = 296
Top = 32
end
+ object tbl_ListaAnosPedidos: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'ANO'
+ DataType = datString
+ Size = 255
+ end>
+ Params = <>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = rda_PedidosProveedor
+ LogicalName = 'ListaAnosPedidos'
+ IndexDefs = <>
+ Left = 448
+ Top = 80
+ end
+ object ds_ListaAnosPedidos: TDADataSource
+ DataSet = tbl_ListaAnosPedidos.Dataset
+ DataTable = tbl_ListaAnosPedidos
+ Left = 448
+ Top = 24
+ end
end
diff --git a/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.pas b/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.pas
index 685aa837..cf7f0b5d 100644
--- a/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.pas
+++ b/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.pas
@@ -22,6 +22,8 @@ type
ds_PedidosProveedor: TDADataSource;
tbl_PedidosProveedor_Detalles: TDAMemDataTable;
ds_PedidosProveedor_Detalles: TDADataSource;
+ tbl_ListaAnosPedidos: TDAMemDataTable;
+ ds_ListaAnosPedidos: TDADataSource;
procedure DAClientDataModuleCreate(Sender: TObject);
private
@@ -31,6 +33,7 @@ type
procedure AsignarClaseNegocio(var APedido: TDAMemDataTable); virtual;
public
+ function GetAnosItems : TStringList;
function GetItems : IBizPedidoProveedor; virtual;
function GetItem(const ID : Integer) : IBizPedidoProveedor;
function NewItem : IBizPedidoProveedor;
@@ -120,6 +123,30 @@ begin
end;
}
+function TDataModulePedidosProveedor.GetAnosItems: TStringList;
+var
+ AListaAnos: TStringList;
+begin
+ AListaAnos := TStringList.Create;
+ ShowHourglassCursor;
+ try
+ with tbl_ListaAnosPedidos do
+ begin
+ Open;
+ First;
+ while not eof do
+ begin
+ AListaAnos.Add(Format('%s=%s', [Fields[0].AsString, Fields[0].AsString]));
+ Next;
+ end;
+ Close;
+ end;
+ Result := AListaAnos;
+ finally
+ HideHourglassCursor;
+ end;
+end;
+
function TDataModulePedidosProveedor.GetItem(const ID: Integer): IBizPedidoProveedor;
var
Condicion: TDAWhereExpression;
diff --git a/Source/Modulos/Pedidos a proveedor/Model/Data/uIDataModulePedidosProveedor.pas b/Source/Modulos/Pedidos a proveedor/Model/Data/uIDataModulePedidosProveedor.pas
index 1de6a02c..0c95d186 100644
--- a/Source/Modulos/Pedidos a proveedor/Model/Data/uIDataModulePedidosProveedor.pas
+++ b/Source/Modulos/Pedidos a proveedor/Model/Data/uIDataModulePedidosProveedor.pas
@@ -3,11 +3,12 @@ unit uIDataModulePedidosProveedor;
interface
uses
- uBizPedidosProveedor, uBizDetallesPedidoProveedor;
+ Classes, uBizPedidosProveedor, uBizDetallesPedidoProveedor;
type
IDataModulePedidosProveedor = interface
['{280AA760-26CC-4962-AB08-6C473199DF86}']
+ function GetAnosItems : TStringList;
function GetItems: IBizPedidoProveedor;
function GetItem(const ID : Integer) : IBizPedidoProveedor;
function NewItem : IBizPedidoProveedor;
diff --git a/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorClient_Intf.pas b/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorClient_Intf.pas
index 17e21b69..978fad62 100644
--- a/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorClient_Intf.pas
+++ b/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorClient_Intf.pas
@@ -9,13 +9,21 @@ 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_PedidosProveedor = '{58B2C19E-AEB1-4CD8-B790-6AA6CA2BF9B0}';
- RID_PedidosProveedor_Detalles = '{B905D026-0E6B-41AC-902B-8CC0114EC138}';
+ RID_ListaAnosPedidos = '{C5B775EF-575F-430B-A202-A1764F733C67}';
+ RID_PedidosProveedor = '{CF019B0A-5E31-412E-BD45-B1ECA75AB33D}';
+ RID_PedidosProveedor_Detalles = '{45FDF374-A233-4352-99BE-1DBD2A81C694}';
{ Data table names }
+ nme_ListaAnosPedidos = 'ListaAnosPedidos';
nme_PedidosProveedor = 'PedidosProveedor';
nme_PedidosProveedor_Detalles = 'PedidosProveedor_Detalles';
+ { ListaAnosPedidos fields }
+ fld_ListaAnosPedidosANO = 'ANO';
+
+ { ListaAnosPedidos field indexes }
+ idx_ListaAnosPedidosANO = 0;
+
{ PedidosProveedor fields }
fld_PedidosProveedorID = 'ID';
fld_PedidosProveedorID_EMPRESA = 'ID_EMPRESA';
@@ -61,6 +69,10 @@ const
fld_PedidosProveedorREF_VENDEDOR = 'REF_VENDEDOR';
fld_PedidosProveedorDESCRIPCION_GENERAL = 'DESCRIPCION_GENERAL';
fld_PedidosProveedorID_DIRECCION_CLIENTE = 'ID_DIRECCION_CLIENTE';
+ fld_PedidosProveedorUBICACION = 'UBICACION';
+ fld_PedidosProveedorID_ALBARAN = 'ID_ALBARAN';
+ fld_PedidosProveedorREF_ALB_PROV = 'REF_ALB_PROV';
+ fld_PedidosProveedorNUM_BULTOS = 'NUM_BULTOS';
{ PedidosProveedor field indexes }
idx_PedidosProveedorID = 0;
@@ -107,6 +119,10 @@ const
idx_PedidosProveedorREF_VENDEDOR = 41;
idx_PedidosProveedorDESCRIPCION_GENERAL = 42;
idx_PedidosProveedorID_DIRECCION_CLIENTE = 43;
+ idx_PedidosProveedorUBICACION = 44;
+ idx_PedidosProveedorID_ALBARAN = 45;
+ idx_PedidosProveedorREF_ALB_PROV = 46;
+ idx_PedidosProveedorNUM_BULTOS = 47;
{ PedidosProveedor_Detalles fields }
fld_PedidosProveedor_DetallesID = 'ID';
@@ -137,9 +153,44 @@ const
idx_PedidosProveedor_DetallesIMPORTE_PORTE = 11;
type
+ { IListaAnosPedidos }
+ IListaAnosPedidos = interface(IDAStronglyTypedDataTable)
+ ['{E5A9637D-EC99-41BB-A9A8-89A0A6AFB4FF}']
+ { Property getters and setters }
+ function GetANOValue: String;
+ procedure SetANOValue(const aValue: String);
+ function GetANOIsNull: Boolean;
+ procedure SetANOIsNull(const aValue: Boolean);
+
+
+ { Properties }
+ property ANO: String read GetANOValue write SetANOValue;
+ property ANOIsNull: Boolean read GetANOIsNull write SetANOIsNull;
+ end;
+
+ { TListaAnosPedidosDataTableRules }
+ TListaAnosPedidosDataTableRules = class(TIntfObjectDADataTableRules, IListaAnosPedidos)
+ private
+ protected
+ { Property getters and setters }
+ function GetANOValue: String; virtual;
+ procedure SetANOValue(const aValue: String); virtual;
+ function GetANOIsNull: Boolean; virtual;
+ procedure SetANOIsNull(const aValue: Boolean); virtual;
+
+ { Properties }
+ property ANO: String read GetANOValue write SetANOValue;
+ property ANOIsNull: Boolean read GetANOIsNull write SetANOIsNull;
+
+ public
+ constructor Create(aDataTable: TDADataTable); override;
+ destructor Destroy; override;
+
+ end;
+
{ IPedidosProveedor }
IPedidosProveedor = interface(IDAStronglyTypedDataTable)
- ['{F4E8CE3C-F0D7-4241-A767-C4656449EA4A}']
+ ['{4B514240-A227-449A-8FEB-075F2EE571C1}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -315,6 +366,22 @@ type
procedure SetID_DIRECCION_CLIENTEValue(const aValue: Integer);
function GetID_DIRECCION_CLIENTEIsNull: Boolean;
procedure SetID_DIRECCION_CLIENTEIsNull(const aValue: Boolean);
+ function GetUBICACIONValue: String;
+ procedure SetUBICACIONValue(const aValue: String);
+ function GetUBICACIONIsNull: Boolean;
+ procedure SetUBICACIONIsNull(const aValue: Boolean);
+ function GetID_ALBARANValue: Integer;
+ procedure SetID_ALBARANValue(const aValue: Integer);
+ function GetID_ALBARANIsNull: Boolean;
+ procedure SetID_ALBARANIsNull(const aValue: Boolean);
+ function GetREF_ALB_PROVValue: String;
+ procedure SetREF_ALB_PROVValue(const aValue: String);
+ function GetREF_ALB_PROVIsNull: Boolean;
+ procedure SetREF_ALB_PROVIsNull(const aValue: Boolean);
+ function GetNUM_BULTOSValue: SmallInt;
+ procedure SetNUM_BULTOSValue(const aValue: SmallInt);
+ function GetNUM_BULTOSIsNull: Boolean;
+ procedure SetNUM_BULTOSIsNull(const aValue: Boolean);
{ Properties }
@@ -406,6 +473,14 @@ type
property DESCRIPCION_GENERALIsNull: Boolean read GetDESCRIPCION_GENERALIsNull write SetDESCRIPCION_GENERALIsNull;
property ID_DIRECCION_CLIENTE: Integer read GetID_DIRECCION_CLIENTEValue write SetID_DIRECCION_CLIENTEValue;
property ID_DIRECCION_CLIENTEIsNull: Boolean read GetID_DIRECCION_CLIENTEIsNull write SetID_DIRECCION_CLIENTEIsNull;
+ property UBICACION: String read GetUBICACIONValue write SetUBICACIONValue;
+ property UBICACIONIsNull: Boolean read GetUBICACIONIsNull write SetUBICACIONIsNull;
+ property ID_ALBARAN: Integer read GetID_ALBARANValue write SetID_ALBARANValue;
+ property ID_ALBARANIsNull: Boolean read GetID_ALBARANIsNull write SetID_ALBARANIsNull;
+ property REF_ALB_PROV: String read GetREF_ALB_PROVValue write SetREF_ALB_PROVValue;
+ property REF_ALB_PROVIsNull: Boolean read GetREF_ALB_PROVIsNull write SetREF_ALB_PROVIsNull;
+ property NUM_BULTOS: SmallInt read GetNUM_BULTOSValue write SetNUM_BULTOSValue;
+ property NUM_BULTOSIsNull: Boolean read GetNUM_BULTOSIsNull write SetNUM_BULTOSIsNull;
end;
{ TPedidosProveedorDataTableRules }
@@ -591,6 +666,22 @@ type
procedure SetID_DIRECCION_CLIENTEValue(const aValue: Integer); virtual;
function GetID_DIRECCION_CLIENTEIsNull: Boolean; virtual;
procedure SetID_DIRECCION_CLIENTEIsNull(const aValue: Boolean); virtual;
+ function GetUBICACIONValue: String; virtual;
+ procedure SetUBICACIONValue(const aValue: String); virtual;
+ function GetUBICACIONIsNull: Boolean; virtual;
+ procedure SetUBICACIONIsNull(const aValue: Boolean); virtual;
+ function GetID_ALBARANValue: Integer; virtual;
+ procedure SetID_ALBARANValue(const aValue: Integer); virtual;
+ function GetID_ALBARANIsNull: Boolean; virtual;
+ procedure SetID_ALBARANIsNull(const aValue: Boolean); virtual;
+ function GetREF_ALB_PROVValue: String; virtual;
+ procedure SetREF_ALB_PROVValue(const aValue: String); virtual;
+ function GetREF_ALB_PROVIsNull: Boolean; virtual;
+ procedure SetREF_ALB_PROVIsNull(const aValue: Boolean); virtual;
+ function GetNUM_BULTOSValue: SmallInt; virtual;
+ procedure SetNUM_BULTOSValue(const aValue: SmallInt); virtual;
+ function GetNUM_BULTOSIsNull: Boolean; virtual;
+ procedure SetNUM_BULTOSIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@@ -681,6 +772,14 @@ type
property DESCRIPCION_GENERALIsNull: Boolean read GetDESCRIPCION_GENERALIsNull write SetDESCRIPCION_GENERALIsNull;
property ID_DIRECCION_CLIENTE: Integer read GetID_DIRECCION_CLIENTEValue write SetID_DIRECCION_CLIENTEValue;
property ID_DIRECCION_CLIENTEIsNull: Boolean read GetID_DIRECCION_CLIENTEIsNull write SetID_DIRECCION_CLIENTEIsNull;
+ property UBICACION: String read GetUBICACIONValue write SetUBICACIONValue;
+ property UBICACIONIsNull: Boolean read GetUBICACIONIsNull write SetUBICACIONIsNull;
+ property ID_ALBARAN: Integer read GetID_ALBARANValue write SetID_ALBARANValue;
+ property ID_ALBARANIsNull: Boolean read GetID_ALBARANIsNull write SetID_ALBARANIsNull;
+ property REF_ALB_PROV: String read GetREF_ALB_PROVValue write SetREF_ALB_PROVValue;
+ property REF_ALB_PROVIsNull: Boolean read GetREF_ALB_PROVIsNull write SetREF_ALB_PROVIsNull;
+ property NUM_BULTOS: SmallInt read GetNUM_BULTOSValue write SetNUM_BULTOSValue;
+ property NUM_BULTOSIsNull: Boolean read GetNUM_BULTOSIsNull write SetNUM_BULTOSIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@@ -690,7 +789,7 @@ type
{ IPedidosProveedor_Detalles }
IPedidosProveedor_Detalles = interface(IDAStronglyTypedDataTable)
- ['{2AF8F5AA-54B9-4788-A3BF-C3ED73BD4A7C}']
+ ['{789E8F18-CF69-4A33-ADE4-FE287BD2F6E3}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -859,6 +958,39 @@ implementation
uses Variants, uROBinaryHelpers;
+{ TListaAnosPedidosDataTableRules }
+constructor TListaAnosPedidosDataTableRules.Create(aDataTable: TDADataTable);
+begin
+ inherited;
+end;
+
+destructor TListaAnosPedidosDataTableRules.Destroy;
+begin
+ inherited;
+end;
+
+function TListaAnosPedidosDataTableRules.GetANOValue: String;
+begin
+ result := DataTable.Fields[idx_ListaAnosPedidosANO].AsString;
+end;
+
+procedure TListaAnosPedidosDataTableRules.SetANOValue(const aValue: String);
+begin
+ DataTable.Fields[idx_ListaAnosPedidosANO].AsString := aValue;
+end;
+
+function TListaAnosPedidosDataTableRules.GetANOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_ListaAnosPedidosANO].IsNull;
+end;
+
+procedure TListaAnosPedidosDataTableRules.SetANOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_ListaAnosPedidosANO].AsVariant := Null;
+end;
+
+
{ TPedidosProveedorDataTableRules }
constructor TPedidosProveedorDataTableRules.Create(aDataTable: TDADataTable);
var
@@ -1806,6 +1938,90 @@ begin
DataTable.Fields[idx_PedidosProveedorID_DIRECCION_CLIENTE].AsVariant := Null;
end;
+function TPedidosProveedorDataTableRules.GetUBICACIONValue: String;
+begin
+ result := DataTable.Fields[idx_PedidosProveedorUBICACION].AsString;
+end;
+
+procedure TPedidosProveedorDataTableRules.SetUBICACIONValue(const aValue: String);
+begin
+ DataTable.Fields[idx_PedidosProveedorUBICACION].AsString := aValue;
+end;
+
+function TPedidosProveedorDataTableRules.GetUBICACIONIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PedidosProveedorUBICACION].IsNull;
+end;
+
+procedure TPedidosProveedorDataTableRules.SetUBICACIONIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PedidosProveedorUBICACION].AsVariant := Null;
+end;
+
+function TPedidosProveedorDataTableRules.GetID_ALBARANValue: Integer;
+begin
+ result := DataTable.Fields[idx_PedidosProveedorID_ALBARAN].AsInteger;
+end;
+
+procedure TPedidosProveedorDataTableRules.SetID_ALBARANValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_PedidosProveedorID_ALBARAN].AsInteger := aValue;
+end;
+
+function TPedidosProveedorDataTableRules.GetID_ALBARANIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PedidosProveedorID_ALBARAN].IsNull;
+end;
+
+procedure TPedidosProveedorDataTableRules.SetID_ALBARANIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PedidosProveedorID_ALBARAN].AsVariant := Null;
+end;
+
+function TPedidosProveedorDataTableRules.GetREF_ALB_PROVValue: String;
+begin
+ result := DataTable.Fields[idx_PedidosProveedorREF_ALB_PROV].AsString;
+end;
+
+procedure TPedidosProveedorDataTableRules.SetREF_ALB_PROVValue(const aValue: String);
+begin
+ DataTable.Fields[idx_PedidosProveedorREF_ALB_PROV].AsString := aValue;
+end;
+
+function TPedidosProveedorDataTableRules.GetREF_ALB_PROVIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PedidosProveedorREF_ALB_PROV].IsNull;
+end;
+
+procedure TPedidosProveedorDataTableRules.SetREF_ALB_PROVIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PedidosProveedorREF_ALB_PROV].AsVariant := Null;
+end;
+
+function TPedidosProveedorDataTableRules.GetNUM_BULTOSValue: SmallInt;
+begin
+ result := DataTable.Fields[idx_PedidosProveedorNUM_BULTOS].AsSmallInt;
+end;
+
+procedure TPedidosProveedorDataTableRules.SetNUM_BULTOSValue(const aValue: SmallInt);
+begin
+ DataTable.Fields[idx_PedidosProveedorNUM_BULTOS].AsSmallInt := aValue;
+end;
+
+function TPedidosProveedorDataTableRules.GetNUM_BULTOSIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PedidosProveedorNUM_BULTOS].IsNull;
+end;
+
+procedure TPedidosProveedorDataTableRules.SetNUM_BULTOSIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PedidosProveedorNUM_BULTOS].AsVariant := Null;
+end;
+
{ TPedidosProveedor_DetallesDataTableRules }
constructor TPedidosProveedor_DetallesDataTableRules.Create(aDataTable: TDADataTable);
@@ -2072,6 +2288,7 @@ end;
initialization
+ RegisterDataTableRules(RID_ListaAnosPedidos, TListaAnosPedidosDataTableRules);
RegisterDataTableRules(RID_PedidosProveedor, TPedidosProveedorDataTableRules);
RegisterDataTableRules(RID_PedidosProveedor_Detalles, TPedidosProveedor_DetallesDataTableRules);
diff --git a/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorServer_Intf.pas b/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorServer_Intf.pas
index c0872f65..9fbe0e81 100644
--- a/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorServer_Intf.pas
+++ b/Source/Modulos/Pedidos a proveedor/Model/schPedidosProveedorServer_Intf.pas
@@ -9,13 +9,48 @@ 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_PedidosProveedorDelta = '{F34FE69A-8AF9-46AF-9AF3-0A13824904D4}';
- RID_PedidosProveedor_DetallesDelta = '{4CB09F4E-031E-45EE-B815-3C144A0D50F2}';
+ RID_ListaAnosPedidosDelta = '{95D5F3C7-2C97-4833-B997-3310381E0677}';
+ RID_PedidosProveedorDelta = '{B20DB610-3AD2-45BC-AE64-E65AC581EA0A}';
+ RID_PedidosProveedor_DetallesDelta = '{3B702A8D-48D7-4621-9B8F-12DE7F5F299D}';
type
+ { IListaAnosPedidosDelta }
+ IListaAnosPedidosDelta = interface(IListaAnosPedidos)
+ ['{95D5F3C7-2C97-4833-B997-3310381E0677}']
+ { Property getters and setters }
+ function GetOldANOValue : String;
+
+ { Properties }
+ property OldANO : String read GetOldANOValue;
+ end;
+
+ { TListaAnosPedidosBusinessProcessorRules }
+ TListaAnosPedidosBusinessProcessorRules = class(TDABusinessProcessorRules, IListaAnosPedidos, IListaAnosPedidosDelta)
+ private
+ protected
+ { Property getters and setters }
+ function GetANOValue: String; virtual;
+ function GetANOIsNull: Boolean; virtual;
+ function GetOldANOValue: String; virtual;
+ function GetOldANOIsNull: Boolean; virtual;
+ procedure SetANOValue(const aValue: String); virtual;
+ procedure SetANOIsNull(const aValue: Boolean); virtual;
+
+ { Properties }
+ property ANO : String read GetANOValue write SetANOValue;
+ property ANOIsNull : Boolean read GetANOIsNull write SetANOIsNull;
+ property OldANO : String read GetOldANOValue;
+ property OldANOIsNull : Boolean read GetOldANOIsNull;
+
+ public
+ constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
+ destructor Destroy; override;
+
+ end;
+
{ IPedidosProveedorDelta }
IPedidosProveedorDelta = interface(IPedidosProveedor)
- ['{F34FE69A-8AF9-46AF-9AF3-0A13824904D4}']
+ ['{B20DB610-3AD2-45BC-AE64-E65AC581EA0A}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -61,6 +96,10 @@ type
function GetOldREF_VENDEDORValue : String;
function GetOldDESCRIPCION_GENERALValue : String;
function GetOldID_DIRECCION_CLIENTEValue : Integer;
+ function GetOldUBICACIONValue : String;
+ function GetOldID_ALBARANValue : Integer;
+ function GetOldREF_ALB_PROVValue : String;
+ function GetOldNUM_BULTOSValue : SmallInt;
{ Properties }
property OldID : Integer read GetOldIDValue;
@@ -107,6 +146,10 @@ type
property OldREF_VENDEDOR : String read GetOldREF_VENDEDORValue;
property OldDESCRIPCION_GENERAL : String read GetOldDESCRIPCION_GENERALValue;
property OldID_DIRECCION_CLIENTE : Integer read GetOldID_DIRECCION_CLIENTEValue;
+ property OldUBICACION : String read GetOldUBICACIONValue;
+ property OldID_ALBARAN : Integer read GetOldID_ALBARANValue;
+ property OldREF_ALB_PROV : String read GetOldREF_ALB_PROVValue;
+ property OldNUM_BULTOS : SmallInt read GetOldNUM_BULTOSValue;
end;
{ TPedidosProveedorBusinessProcessorRules }
@@ -380,6 +423,30 @@ type
function GetOldID_DIRECCION_CLIENTEIsNull: Boolean; virtual;
procedure SetID_DIRECCION_CLIENTEValue(const aValue: Integer); virtual;
procedure SetID_DIRECCION_CLIENTEIsNull(const aValue: Boolean); virtual;
+ function GetUBICACIONValue: String; virtual;
+ function GetUBICACIONIsNull: Boolean; virtual;
+ function GetOldUBICACIONValue: String; virtual;
+ function GetOldUBICACIONIsNull: Boolean; virtual;
+ procedure SetUBICACIONValue(const aValue: String); virtual;
+ procedure SetUBICACIONIsNull(const aValue: Boolean); virtual;
+ function GetID_ALBARANValue: Integer; virtual;
+ function GetID_ALBARANIsNull: Boolean; virtual;
+ function GetOldID_ALBARANValue: Integer; virtual;
+ function GetOldID_ALBARANIsNull: Boolean; virtual;
+ procedure SetID_ALBARANValue(const aValue: Integer); virtual;
+ procedure SetID_ALBARANIsNull(const aValue: Boolean); virtual;
+ function GetREF_ALB_PROVValue: String; virtual;
+ function GetREF_ALB_PROVIsNull: Boolean; virtual;
+ function GetOldREF_ALB_PROVValue: String; virtual;
+ function GetOldREF_ALB_PROVIsNull: Boolean; virtual;
+ procedure SetREF_ALB_PROVValue(const aValue: String); virtual;
+ procedure SetREF_ALB_PROVIsNull(const aValue: Boolean); virtual;
+ function GetNUM_BULTOSValue: SmallInt; virtual;
+ function GetNUM_BULTOSIsNull: Boolean; virtual;
+ function GetOldNUM_BULTOSValue: SmallInt; virtual;
+ function GetOldNUM_BULTOSIsNull: Boolean; virtual;
+ procedure SetNUM_BULTOSValue(const aValue: SmallInt); virtual;
+ procedure SetNUM_BULTOSIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@@ -558,6 +625,22 @@ type
property ID_DIRECCION_CLIENTEIsNull : Boolean read GetID_DIRECCION_CLIENTEIsNull write SetID_DIRECCION_CLIENTEIsNull;
property OldID_DIRECCION_CLIENTE : Integer read GetOldID_DIRECCION_CLIENTEValue;
property OldID_DIRECCION_CLIENTEIsNull : Boolean read GetOldID_DIRECCION_CLIENTEIsNull;
+ property UBICACION : String read GetUBICACIONValue write SetUBICACIONValue;
+ property UBICACIONIsNull : Boolean read GetUBICACIONIsNull write SetUBICACIONIsNull;
+ property OldUBICACION : String read GetOldUBICACIONValue;
+ property OldUBICACIONIsNull : Boolean read GetOldUBICACIONIsNull;
+ property ID_ALBARAN : Integer read GetID_ALBARANValue write SetID_ALBARANValue;
+ property ID_ALBARANIsNull : Boolean read GetID_ALBARANIsNull write SetID_ALBARANIsNull;
+ property OldID_ALBARAN : Integer read GetOldID_ALBARANValue;
+ property OldID_ALBARANIsNull : Boolean read GetOldID_ALBARANIsNull;
+ property REF_ALB_PROV : String read GetREF_ALB_PROVValue write SetREF_ALB_PROVValue;
+ property REF_ALB_PROVIsNull : Boolean read GetREF_ALB_PROVIsNull write SetREF_ALB_PROVIsNull;
+ property OldREF_ALB_PROV : String read GetOldREF_ALB_PROVValue;
+ property OldREF_ALB_PROVIsNull : Boolean read GetOldREF_ALB_PROVIsNull;
+ property NUM_BULTOS : SmallInt read GetNUM_BULTOSValue write SetNUM_BULTOSValue;
+ property NUM_BULTOSIsNull : Boolean read GetNUM_BULTOSIsNull write SetNUM_BULTOSIsNull;
+ property OldNUM_BULTOS : SmallInt read GetOldNUM_BULTOSValue;
+ property OldNUM_BULTOSIsNull : Boolean read GetOldNUM_BULTOSIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@@ -567,7 +650,7 @@ type
{ IPedidosProveedor_DetallesDelta }
IPedidosProveedor_DetallesDelta = interface(IPedidosProveedor_Detalles)
- ['{4CB09F4E-031E-45EE-B815-3C144A0D50F2}']
+ ['{3B702A8D-48D7-4621-9B8F-12DE7F5F299D}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_PEDIDOValue : Integer;
@@ -736,6 +819,49 @@ implementation
uses
Variants, uROBinaryHelpers, uDAInterfaces;
+{ TListaAnosPedidosBusinessProcessorRules }
+constructor TListaAnosPedidosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
+begin
+ inherited;
+end;
+
+destructor TListaAnosPedidosBusinessProcessorRules.Destroy;
+begin
+ inherited;
+end;
+
+function TListaAnosPedidosBusinessProcessorRules.GetANOValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_ListaAnosPedidosANO];
+end;
+
+function TListaAnosPedidosBusinessProcessorRules.GetANOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ListaAnosPedidosANO]);
+end;
+
+function TListaAnosPedidosBusinessProcessorRules.GetOldANOValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_ListaAnosPedidosANO];
+end;
+
+function TListaAnosPedidosBusinessProcessorRules.GetOldANOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ListaAnosPedidosANO]);
+end;
+
+procedure TListaAnosPedidosBusinessProcessorRules.SetANOValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_ListaAnosPedidosANO] := aValue;
+end;
+
+procedure TListaAnosPedidosBusinessProcessorRules.SetANOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_ListaAnosPedidosANO] := Null;
+end;
+
+
{ TPedidosProveedorBusinessProcessorRules }
constructor TPedidosProveedorBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
var
@@ -2125,6 +2251,130 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorID_DIRECCION_CLIENTE] := Null;
end;
+function TPedidosProveedorBusinessProcessorRules.GetUBICACIONValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorUBICACION];
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetUBICACIONIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorUBICACION]);
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetOldUBICACIONValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedorUBICACION];
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetOldUBICACIONIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedorUBICACION]);
+end;
+
+procedure TPedidosProveedorBusinessProcessorRules.SetUBICACIONValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorUBICACION] := aValue;
+end;
+
+procedure TPedidosProveedorBusinessProcessorRules.SetUBICACIONIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorUBICACION] := Null;
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetID_ALBARANValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorID_ALBARAN];
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetID_ALBARANIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorID_ALBARAN]);
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetOldID_ALBARANValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedorID_ALBARAN];
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetOldID_ALBARANIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedorID_ALBARAN]);
+end;
+
+procedure TPedidosProveedorBusinessProcessorRules.SetID_ALBARANValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorID_ALBARAN] := aValue;
+end;
+
+procedure TPedidosProveedorBusinessProcessorRules.SetID_ALBARANIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorID_ALBARAN] := Null;
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetREF_ALB_PROVValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorREF_ALB_PROV];
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetREF_ALB_PROVIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorREF_ALB_PROV]);
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetOldREF_ALB_PROVValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedorREF_ALB_PROV];
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetOldREF_ALB_PROVIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedorREF_ALB_PROV]);
+end;
+
+procedure TPedidosProveedorBusinessProcessorRules.SetREF_ALB_PROVValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorREF_ALB_PROV] := aValue;
+end;
+
+procedure TPedidosProveedorBusinessProcessorRules.SetREF_ALB_PROVIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorREF_ALB_PROV] := Null;
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetNUM_BULTOSValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorNUM_BULTOS];
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetNUM_BULTOSIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorNUM_BULTOS]);
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetOldNUM_BULTOSValue: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedorNUM_BULTOS];
+end;
+
+function TPedidosProveedorBusinessProcessorRules.GetOldNUM_BULTOSIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedorNUM_BULTOS]);
+end;
+
+procedure TPedidosProveedorBusinessProcessorRules.SetNUM_BULTOSValue(const aValue: SmallInt);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorNUM_BULTOS] := aValue;
+end;
+
+procedure TPedidosProveedorBusinessProcessorRules.SetNUM_BULTOSIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedorNUM_BULTOS] := Null;
+end;
+
{ TPedidosProveedor_DetallesBusinessProcessorRules }
constructor TPedidosProveedor_DetallesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
@@ -2511,6 +2761,7 @@ end;
initialization
+ RegisterBusinessProcessorRules(RID_ListaAnosPedidosDelta, TListaAnosPedidosBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_PedidosProveedorDelta, TPedidosProveedorBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_PedidosProveedor_DetallesDelta, TPedidosProveedor_DetallesBusinessProcessorRules);
diff --git a/Source/Modulos/Pedidos a proveedor/PedidosProveedor_Group.groupproj b/Source/Modulos/Pedidos a proveedor/PedidosProveedor_Group.groupproj
index 488ad49e..f1bbc588 100644
--- a/Source/Modulos/Pedidos a proveedor/PedidosProveedor_Group.groupproj
+++ b/Source/Modulos/Pedidos a proveedor/PedidosProveedor_Group.groupproj
@@ -11,9 +11,14 @@
+
+
+
+
+
@@ -21,6 +26,7 @@
+
@@ -69,6 +75,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -231,14 +255,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.dfm b/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.dfm
index a4ee30e6..0c2b4973 100644
--- a/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.dfm
@@ -12,6 +12,32 @@ object srvPedidosProveedor: TsrvPedidosProveedor
ConnectionManager = dmServer.ConnectionManager
DataDictionary = DADataDictionary
Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ ConnectionType = 'Interbase'
+ Default = True
+ Name = 'IBX'
+ SQL =
+ 'select ANO from'#10'(select distinct(substr(FECHA_PEDIDO, 1,4)) as A' +
+ 'NO'#10'from pedidos_proveedor'#10'order by 1 desc)'#10#10'UNION ALL'#10#10'select di' +
+ 'stinct '#39'Todos'#39' as ANO'#10'from empresas'#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'ANO'
+ TableField = 'ANO'
+ end>
+ end>
+ Name = 'ListaAnosPedidos'
+ Fields = <
+ item
+ Name = 'ANO'
+ DataType = datString
+ Size = 255
+ end>
+ end
item
Params = <>
Statements = <
@@ -195,6 +221,22 @@ object srvPedidosProveedor: TsrvPedidosProveedor
item
DatasetField = 'NOMBRE_COMERCIAL'
TableField = 'NOMBRE_COMERCIAL'
+ end
+ item
+ DatasetField = 'UBICACION'
+ TableField = 'UBICACION'
+ end
+ item
+ DatasetField = 'ID_ALBARAN'
+ TableField = 'ID_ALBARAN'
+ end
+ item
+ DatasetField = 'REF_ALB_PROV'
+ TableField = 'REF_ALB_PROV'
+ end
+ item
+ DatasetField = 'NUM_BULTOS'
+ TableField = 'NUM_BULTOS'
end>
end>
Name = 'PedidosProveedor'
@@ -271,6 +313,7 @@ object srvPedidosProveedor: TsrvPedidosProveedor
Name = 'NOMBRE_ALMACEN'
DataType = datString
Size = 255
+ ServerAutoRefresh = True
DictionaryEntry = 'PedidosProveedor_NOMBRE_ALMACEN'
end
item
@@ -439,6 +482,24 @@ object srvPedidosProveedor: TsrvPedidosProveedor
Name = 'ID_DIRECCION_CLIENTE'
DataType = datInteger
DictionaryEntry = 'PedidosProveedor_ID_DIRECCION_CLIENTE'
+ end
+ item
+ Name = 'UBICACION'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'ID_ALBARAN'
+ DataType = datInteger
+ end
+ item
+ Name = 'REF_ALB_PROV'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'NUM_BULTOS'
+ DataType = datSmallInt
end>
end
item
@@ -767,11 +828,6 @@ object srvPedidosProveedor: TsrvPedidosProveedor
end
item
Params = <
- item
- Name = 'ID_DIRECCION_CLIENTE'
- DataType = datInteger
- Value = ''
- end
item
Name = 'ID'
DataType = datAutoInc
@@ -941,6 +997,27 @@ object srvPedidosProveedor: TsrvPedidosProveedor
DataType = datString
Size = 255
Value = ''
+ end
+ item
+ Name = 'ID_DIRECCION_CLIENTE'
+ DataType = datInteger
+ Value = ''
+ end
+ item
+ Name = 'UBICACION'
+ DataType = datString
+ Size = 255
+ Value = ''
+ end
+ item
+ Name = 'ID_ALBARAN'
+ DataType = datInteger
+ Value = ''
+ end
+ item
+ Name = 'NUM_BULTOS'
+ DataType = datSmallInt
+ Value = ''
end>
Statements = <
item
@@ -955,16 +1032,17 @@ object srvPedidosProveedor: TsrvPedidosProveedor
', '#10' TELEFONO, ID_CONTRATO_CLIENTE, IMPORTE_NETO, IMPORTE_POR' +
'TE,'#10' DESCUENTO, IMPORTE_DESCUENTO, BASE_IMPONIBLE, IVA, '#10' ' +
' IMPORTE_IVA, ID_FORMA_PAGO, ID_TIENDA, ID_VENDEDOR, DESCRIPCIO' +
- 'N_GENERAL,'#10' ID_DIRECCION_CLIENTE)'#10' VALUES'#10' (:ID, :ID_EMP' +
- 'RESA, CURRENT_TIMESTAMP, :ID_PROVEEDOR,'#10' :USUARIO, :OBSERVAC' +
- 'IONES, :REFERENCIA, :FECHA_ENVIO,'#10' :FECHA_PEDIDO, :FECHA_CON' +
- 'FIRMACION, :FECHA_ENTREGA, :INCIDENCIAS,'#10' :IMPORTE_TOTAL, :I' +
- 'NCIDENCIAS_ACTIVAS, :ID_ALMACEN, :CALLE,'#10' :POBLACION, :PROVI' +
- 'NCIA, :CODIGO_POSTAL, :PERSONA_CONTACTO,'#10' :TELEFONO, :ID_CON' +
- 'TRATO_CLIENTE, :IMPORTE_NETO, :IMPORTE_PORTE,'#10' :DESCUENTO, :' +
- 'IMPORTE_DESCUENTO, :BASE_IMPONIBLE, :IVA,'#10' :IMPORTE_IVA, :ID' +
- '_FORMA_PAGO, :ID_TIENDA, :ID_VENDEDOR, :DESCRIPCION_GENERAL,'#10' ' +
- ' :ID_DIRECCION_CLIENTE)'#10' '#10' '#10' '#10' '#10#10
+ 'N_GENERAL,'#10' ID_DIRECCION_CLIENTE, UBICACION, ID_ALBARAN, NUM' +
+ '_BULTOS)'#10' VALUES'#10' (:ID, :ID_EMPRESA, CURRENT_TIMESTAMP, :ID_' +
+ 'PROVEEDOR,'#10' :USUARIO, :OBSERVACIONES, :REFERENCIA, :FECHA_EN' +
+ 'VIO,'#10' :FECHA_PEDIDO, :FECHA_CONFIRMACION, :FECHA_ENTREGA, :I' +
+ 'NCIDENCIAS,'#10' :IMPORTE_TOTAL, :INCIDENCIAS_ACTIVAS, :ID_ALMAC' +
+ 'EN, :CALLE,'#10' :POBLACION, :PROVINCIA, :CODIGO_POSTAL, :PERSON' +
+ 'A_CONTACTO,'#10' :TELEFONO, :ID_CONTRATO_CLIENTE, :IMPORTE_NETO,' +
+ ' :IMPORTE_PORTE,'#10' :DESCUENTO, :IMPORTE_DESCUENTO, :BASE_IMPO' +
+ 'NIBLE, :IVA,'#10' :IMPORTE_IVA, :ID_FORMA_PAGO, :ID_TIENDA, :ID_' +
+ 'VENDEDOR, :DESCRIPCION_GENERAL,'#10' :ID_DIRECCION_CLIENTE, :UBI' +
+ 'CACION, :ID_ALBARAN, :NUM_BULTOS)'#10' '#10' '#10' '#10' '#10#10
StatementType = stSQL
ColumnMappings = <>
end>
@@ -1034,11 +1112,6 @@ object srvPedidosProveedor: TsrvPedidosProveedor
DataType = datSmallInt
Value = ''
end
- item
- Name = 'ID_DIRECCION_CLIENTE'
- DataType = datInteger
- Value = ''
- end
item
Name = 'ID_ALMACEN'
DataType = datInteger
@@ -1141,6 +1214,27 @@ object srvPedidosProveedor: TsrvPedidosProveedor
Size = 255
Value = ''
end
+ item
+ Name = 'ID_DIRECCION_CLIENTE'
+ DataType = datInteger
+ Value = ''
+ end
+ item
+ Name = 'UBICACION'
+ DataType = datString
+ Size = 255
+ Value = ''
+ end
+ item
+ Name = 'ID_ALBARAN'
+ DataType = datInteger
+ Value = ''
+ end
+ item
+ Name = 'NUM_BULTOS'
+ DataType = datSmallInt
+ Value = ''
+ end
item
Name = 'OLD_ID'
Value = ''
@@ -1168,8 +1262,9 @@ object srvPedidosProveedor: TsrvPedidosProveedor
'= :IVA, '#10' IMPORTE_IVA = :IMPORTE_IVA, '#10' ID_FORMA_PAGO = :I' +
'D_FORMA_PAGO,'#10' ID_TIENDA = :ID_TIENDA,'#10' ID_VENDEDOR = :ID_' +
'VENDEDOR,'#10' DESCRIPCION_GENERAL = :DESCRIPCION_GENERAL,'#10' ID' +
- '_DIRECCION_CLIENTE = :ID_DIRECCION_CLIENTE'#10' WHERE'#10' (ID = :OL' +
- 'D_ID)'#10
+ '_DIRECCION_CLIENTE = :ID_DIRECCION_CLIENTE,'#10' UBICACION = :UBI' +
+ 'CACION,'#10' ID_ALBARAN = :ID_ALBARAN,'#10' NUM_BULTOS = :NUM_BULT' +
+ 'OS'#10' WHERE'#10' (ID = :OLD_ID)'#10
StatementType = stSQL
ColumnMappings = <>
end>
diff --git a/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dpk b/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dpk
index 9761b068..a793f450 100644
Binary files a/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dpk and b/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dpk differ
diff --git a/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj b/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj
index f58c19ec..af5fe38a 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj
+++ b/Source/Modulos/Pedidos a proveedor/Views/PedidosProveedor_view.dproj
@@ -49,29 +49,30 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
TfEditorDireccionEntregaPedidoProveedor
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorDireccionEntregaPedidoProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uEditorDireccionEntregaPedidoProveedor.dfm
index 79bb2a87..938b4e80 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uEditorDireccionEntregaPedidoProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorDireccionEntregaPedidoProveedor.dfm
@@ -94,7 +94,7 @@ object fEditorDireccionEntregaPedidoProveedor: TfEditorDireccionEntregaPedidoPro
ModalResult = 2
TabOrder = 1
end
- object eDireccion: TDBEdit
+ object eDireccion2: TDBEdit
Left = 135
Top = 23
Width = 210
@@ -150,6 +150,15 @@ object fEditorDireccionEntregaPedidoProveedor: TfEditorDireccionEntregaPedidoPro
DataSource = dsDireccion
TabOrder = 7
end
+ object eDireccion: TcxDBMemo
+ Left = 134
+ Top = 22
+ DataBinding.DataField = 'CALLE'
+ DataBinding.DataSource = dsDireccion
+ TabOrder = 8
+ Height = 58
+ Width = 211
+ end
object dsDireccion: TDADataSource
Left = 16
Top = 46
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorDireccionEntregaPedidoProveedor.pas b/Source/Modulos/Pedidos a proveedor/Views/uEditorDireccionEntregaPedidoProveedor.pas
index ba70f998..7e3b48fd 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uEditorDireccionEntregaPedidoProveedor.pas
+++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorDireccionEntregaPedidoProveedor.pas
@@ -5,14 +5,15 @@ interface
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls, Mask, DBCtrls, DB, uDADataTable,
cxControls, cxContainer, cxEdit, cxTextEdit, cxDBEdit,
- uIEditorDireccionEntregaPedidoProveedor, uBizPedidosProveedor, uDAInterfaces;
+ uIEditorDireccionEntregaPedidoProveedor, uBizPedidosProveedor, uDAInterfaces,
+ cxMemo;
type
TfEditorDireccionEntregaPedidoProveedor = class(TForm, IEditorDireccionEntregaPedidoProveedor)
OKBtn: TButton;
CancelBtn: TButton;
Bevel1: TBevel;
- eDireccion: TDBEdit;
+ eDireccion2: TDBEdit;
ePoblacion: TDBEdit;
eProvincia: TDBEdit;
eCodigoPostal: TDBEdit;
@@ -25,6 +26,7 @@ type
ePersonaContacto: TDBEdit;
Label7: TLabel;
eTelefono: TDBEdit;
+ eDireccion: TcxDBMemo;
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
@@ -54,7 +56,7 @@ begin
//En el caso de cancelar se recuperan los valores iniciales
if (Self.ModalResult <> mrOk) and (dsDireccion.DataTable.State in dsEditModes) then
begin
- eDireccion.Field.Value := pDireccion;
+ eDireccion.EditValue := pDireccion;
ePoblacion.Field.Value := pPoblacion;
eProvincia.Field.Value := pProvincia;
eCodigoPostal.Field.Value := pCodigoPostal;
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorElegirPedidosProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uEditorElegirPedidosProveedor.dfm
index 1d012a73..ccb9b14d 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uEditorElegirPedidosProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorElegirPedidosProveedor.dfm
@@ -2,7 +2,6 @@ inherited fEditorElegirPedidosProveedor: TfEditorElegirPedidosProveedor
Caption = 'Seleccionar pedido de cliente'
ClientWidth = 656
ExplicitWidth = 664
- ExplicitHeight = 478
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
@@ -26,7 +25,7 @@ inherited fEditorElegirPedidosProveedor: TfEditorElegirPedidosProveedor
ExplicitHeight = 49
inherited tbxMain: TTBXToolbar
Align = alRight
- ExplicitWidth = 269
+ ExplicitWidth = 126
inherited TBXItem2: TTBXItem
Visible = False
end
@@ -44,11 +43,11 @@ inherited fEditorElegirPedidosProveedor: TfEditorElegirPedidosProveedor
end
end
inherited tbxFiltro: TTBXToolbar
- Left = 269
+ Left = 126
Top = 23
DockPos = 115
DockRow = 1
- ExplicitLeft = 269
+ ExplicitLeft = 126
ExplicitTop = 23
inherited TBXItem34: TTBXItem
Action = actQuitarFiltro2
@@ -75,7 +74,7 @@ inherited fEditorElegirPedidosProveedor: TfEditorElegirPedidosProveedor
end
inline frViewBarraSeleccion1: TfrViewBarraSeleccion [3]
Left = 0
- Top = 376
+ Top = 531
Width = 656
Height = 49
Align = alBottom
@@ -87,7 +86,7 @@ inherited fEditorElegirPedidosProveedor: TfEditorElegirPedidosProveedor
ParentFont = False
TabOrder = 4
ReadOnly = False
- ExplicitTop = 376
+ ExplicitTop = 531
ExplicitWidth = 656
inherited JvFooter1: TJvFooter
Width = 656
@@ -114,16 +113,16 @@ inherited fEditorElegirPedidosProveedor: TfEditorElegirPedidosProveedor
inherited frViewPedidosProveedor1: TfrViewPedidosProveedor [4]
Top = 140
Width = 656
- Height = 236
+ Height = 391
ExplicitTop = 140
ExplicitWidth = 656
- ExplicitHeight = 236
+ ExplicitHeight = 391
inherited cxGrid: TcxGrid
Width = 656
- Height = 108
+ Height = 263
RootLevelOptions.DetailTabsPosition = dtpNone
ExplicitWidth = 656
- ExplicitHeight = 108
+ ExplicitHeight = 263
inherited cxGridView: TcxGridDBTableView
DataController.Summary.DefaultGroupSummaryItems = <
item
@@ -151,8 +150,28 @@ inherited fEditorElegirPedidosProveedor: TfEditorElegirPedidosProveedor
inherited dxLayoutControl1: TdxLayoutControl
Width = 656
ExplicitWidth = 656
+ inherited txtFiltroTodo: TcxTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ ExplicitWidth = 457
+ Width = 457
+ end
+ inherited edtFechaIniFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ ExplicitWidth = 240
+ Width = 240
+ end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 300
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 300
ExplicitWidth = 404
Width = 404
@@ -169,8 +188,8 @@ inherited fEditorElegirPedidosProveedor: TfEditorElegirPedidosProveedor
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
- Top = 210
- ExplicitTop = 210
+ Top = 365
+ ExplicitTop = 365
ExplicitWidth = 656
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 656
@@ -255,9 +274,17 @@ inherited fEditorElegirPedidosProveedor: TfEditorElegirPedidosProveedor
inherited actDuplicar: TAction
Visible = False
end
+ inherited actExportarExcel: TAction
+ Enabled = False
+ Visible = False
+ end
inherited actRecibirPedido: TAction
Visible = False
end
+ inherited actEnviarEMail: TAction
+ Enabled = False
+ Visible = False
+ end
end
inherited dsDataTable: TDADataSource
Left = 8
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm
index c09f1246..dbda36cb 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm
@@ -12,6 +12,7 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
inherited JvNavPanelHeader: TJvNavPanelHeader
Width = 922
Caption = 'Nuevo pedido a proveedor'
+ ExplicitTop = 49
ExplicitWidth = 922
inherited Image1: TImage
Left = 895
@@ -76,6 +77,7 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
Height = 491
TabOrder = 1
OnChanging = pgPaginasChanging
+ ExplicitTop = 109
ExplicitWidth = 916
ExplicitHeight = 491
inherited pagGeneral: TTabSheet
@@ -178,8 +180,8 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
Width = 238
end
inherited bModificar: TBitBtn
- Left = 292
- ExplicitLeft = 292
+ Left = 342
+ ExplicitLeft = 342
end
inherited txtDireccion: TStaticText
Width = 238
@@ -195,6 +197,20 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
ExplicitWidth = 551
Width = 551
end
+ inherited cbUbicacion: TcxDBComboBox
+ Left = 323
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ ExplicitLeft = 323
+ ExplicitWidth = 183
+ Width = 183
+ end
+ inherited eNumBultos: TcxDBSpinEdit
+ Left = 401
+ ExplicitLeft = 401
+ end
end
end
inherited cbFormaPago: TcxDBLookupComboBox
@@ -359,9 +375,9 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
Top = 50
Width = 908
Height = 413
- ExplicitTop = 53
+ ExplicitTop = 50
ExplicitWidth = 908
- ExplicitHeight = 401
+ ExplicitHeight = 413
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
Options.Editing = True
@@ -649,6 +665,7 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
end
inherited PnlComentario: TPanel [5]
Width = 922
+ ExplicitTop = 76
ExplicitWidth = 922
inherited lbComentario: TLabel
Width = 912
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.pas b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.pas
index 07ce0e33..22b97764 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.pas
+++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.pas
@@ -151,7 +151,7 @@ begin
Pedido.DataTable.Active := True;
pgPaginas.ActivePage := pagGeneral;
- if Assigned(Pedido) and not Pedido.ID_ALMACENIsNull then
+ if Assigned(Pedido) and (Pedido.ID_ALMACEN > 0) then
frViewPedidoProveedor1.frViewDireccionEntregaPedidoProv1.CambioDireccionAlmacen;
end;
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm
index 0f0740b7..2ca4de57 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm
@@ -52,14 +52,26 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
DisplayMode = nbdmImageAndText
end
end
+ inherited tbxFiltro: TTBXToolbar
+ ExplicitWidth = 431
+ inherited lblAno: TTBXLabelItem
+ Visible = True
+ end
+ inherited cbxListaAnos: TTBXComboBoxItem
+ Visible = True
+ end
+ inherited sepAno: TTBXSeparatorItem
+ Visible = True
+ end
+ end
inherited tbxMenu: TTBXToolbar
ExplicitWidth = 700
end
inherited TBXTMain2: TTBXToolbar
- Left = 343
+ Left = 431
DockPos = 343
Visible = True
- ExplicitLeft = 343
+ ExplicitLeft = 431
ExplicitWidth = 119
object TBXItem39: TTBXItem
Action = actRecibirPedido
@@ -144,12 +156,14 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
Width = 240
end
inherited edtFechaFinFiltro: TcxDateEdit
- Left = 349
+ Left = 371
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 349
+ ExplicitLeft = 371
+ ExplicitWidth = 294
+ Width = 294
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas
index 8d7676f1..edb41d0d 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas
+++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas
@@ -34,6 +34,7 @@ type
procedure actEliminarUpdate(Sender: TObject);
procedure actEnviarEMailExecute(Sender: TObject);
procedure actEnviarEMailUpdate(Sender: TObject);
+ procedure OnListaAnosChange(Sender: TObject; const Text: string);
protected
FPedidos: IBizPedidoProveedor;
@@ -51,6 +52,7 @@ type
procedure ImprimirInterno; override;
procedure PrevisualizarInterno; override;
+ procedure RefrescarInterno; override;
procedure AsignarVista; virtual;
public
procedure PonerTitulos(const ATitulo: string = ''); override;
@@ -66,9 +68,10 @@ implementation
uses
uDataModulePedidosProveedor, uDataModuleUsuarios, uFactuGES_App, uEditorDBBase,
// uInventarioController, uBizInventario,
- uDialogUtils, uGridUtils, uDBSelectionListUtils;
+ uDialogUtils, uGridUtils, uDBSelectionListUtils,
// uAlbaranesProveedorController, uBizAlbaranesProveedor,
-// uGenerarPedidosProvUtils, uGenerarAlbaranesProvUtils;
+// uGenerarPedidosProvUtils,
+ uGenerarAlbaranesProvUtils;
{$R *.dfm}
@@ -108,16 +111,16 @@ end;
procedure TfEditorPedidosProveedor.actRecibirPedidoExecute(Sender: TObject);
begin
-
inherited;
-// RecibirPedidoProv(FPedidos);
-
+ GenerarAlbaranProv(FPedidos.ID);
+{
try
FController.CambiarSituacion(FPedidos, SITUACION_PEDIDO_RECIBIDO, Now);
except
on E : Exception do
ShowErrorMessage('Error al cambiar la situación del pedido', E.Message, E);
end;
+}
actRefrescar.Execute;
end;
@@ -222,6 +225,8 @@ end;
procedure TfEditorPedidosProveedor.FormShow(Sender: TObject);
begin
+ cbxListaAnos.OnChange := OnListaAnosChange; //OJO SIEMPRE ANTES DEL INHERITED
+
inherited;
if not Assigned(ViewGrid) then
@@ -304,6 +309,14 @@ begin
actRefrescar.Execute;
end;
+procedure TfEditorPedidosProveedor.OnListaAnosChange(Sender: TObject;
+ const Text: string);
+begin
+ Controller.FiltrarAno(Pedidos, DynWhereDataTable, Text);
+ if Pedidos.DataTable.Active then
+ RefrescarInterno;
+end;
+
procedure TfEditorPedidosProveedor.PonerTitulos(const ATitulo: string);
var
FTitulo : String;
@@ -358,17 +371,39 @@ begin
end;
+procedure TfEditorPedidosProveedor.RefrescarInterno;
+begin
+ //Volvemos a cargar los años de los pedidos
+ if Assigned(FController) then
+ ListaAnos := FController.DarListaAnosPedidos;
+
+ inherited;
+
+ inherited;
+end;
+
procedure TfEditorPedidosProveedor.SetController(const Value: IPedidosProveedorController);
begin
FController := Value;
+
+ if Assigned(FController) then
+ ListaAnos := FController.DarListaAnosPedidos;
end;
procedure TfEditorPedidosProveedor.SetPedidos(const Value: IBizPedidoProveedor);
begin
FPedidos := Value;
- dsDataTable.DataTable := FPedidos.DataTable;
- if Assigned(ViewGrid) then
- (ViewGrid as IViewPedidosProveedor).Pedidos := Pedidos;
+
+ if Assigned(FPedidos) then
+ begin
+ //Se guarda el where de la sentencia origen, por si el editor tiene filtros que
+ //afecten a este where y en un futuro se desea volver al where origen (filtro de año))
+ DynWhereDataTable := FPedidos.DataTable.DynamicWhere.Xml;
+
+ dsDataTable.DataTable := FPedidos.DataTable;
+ if Assigned(ViewGrid) then
+ (ViewGrid as IViewPedidosProveedor).Pedidos := Pedidos;
+ end;
end;
end.
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewDetallesPedidoProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uViewDetallesPedidoProveedor.dfm
index 61f88497..8e5b982b 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uViewDetallesPedidoProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uViewDetallesPedidoProveedor.dfm
@@ -1,9 +1,6 @@
inherited frViewDetallesPedidoProveedor: TfrViewDetallesPedidoProveedor
inherited cxGrid: TcxGrid
inherited cxGridView: TcxGridDBTableView
- inherited cxGridViewDESCRIPCION: TcxGridDBColumn
- Properties.PlainText = True
- end
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
Properties.ReadOnly = False
end
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewDetallesPedidoProveedor.pas b/Source/Modulos/Pedidos a proveedor/Views/uViewDetallesPedidoProveedor.pas
index 483abea3..e6ed397b 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uViewDetallesPedidoProveedor.pas
+++ b/Source/Modulos/Pedidos a proveedor/Views/uViewDetallesPedidoProveedor.pas
@@ -11,7 +11,7 @@ uses
cxGrid, cxImageComboBox, cxTextEdit, cxMaskEdit, cxCheckBox, cxCurrencyEdit,
Grids, DBGrids, StdCtrls, ExtCtrls, cxRichEdit, ExtActns, StdActns,
JvExStdCtrls, JvCombobox, JvColorCombo, TB2Item, TBX, TB2Dock, TB2Toolbar,
- uControllerDetallesArticulos, uBizPedidosProveedor, uDAInterfaces;
+ uControllerDetallesArticulos, uBizPedidosProveedor, uDAInterfaces, cxMemo;
type
IViewDetallesPedidoProveedor = interface(IViewDetallesArticulos)
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.dfm b/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.dfm
index bd89bbf9..bee56d29 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.dfm
@@ -31,7 +31,7 @@ inherited frViewDireccionEntregaPedidoProv: TfrViewDireccionEntregaPedidoProv
Width = 287
Height = 17
Action = actOtro
- TabOrder = 4
+ TabOrder = 6
end
object cbLista: TcxDBLookupComboBox
Left = 25
@@ -70,7 +70,7 @@ inherited frViewDireccionEntregaPedidoProv: TfrViewDireccionEntregaPedidoProv
Width = 180
Height = 25
Caption = 'Modificar la direcci'#243'n...'
- TabOrder = 6
+ TabOrder = 8
OnClick = bModificarClick
end
object txtDireccion: TStaticText
@@ -80,7 +80,7 @@ inherited frViewDireccionEntregaPedidoProv: TfrViewDireccionEntregaPedidoProv
Height = 177
AutoSize = False
BevelKind = bkFlat
- TabOrder = 5
+ TabOrder = 7
OnDblClick = txtDireccionDblClick
end
object rdxDestinoCliente: TRadioButton
@@ -89,7 +89,7 @@ inherited frViewDireccionEntregaPedidoProv: TfrViewDireccionEntregaPedidoProv
Width = 566
Height = 17
Action = actListaCliente
- TabOrder = 2
+ TabOrder = 4
end
object cbListaDireccionesCliente: TcxDBLookupComboBox
Left = 25
@@ -128,9 +128,45 @@ inherited frViewDireccionEntregaPedidoProv: TfrViewDireccionEntregaPedidoProv
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.NativeStyle = True
- TabOrder = 3
+ TabOrder = 5
Width = 551
end
+ object cbUbicacion: TcxDBComboBox
+ Left = 510
+ Top = 33
+ DataBinding.DataField = 'UBICACION'
+ DataBinding.DataSource = dsPedido
+ Properties.ImmediatePost = True
+ Properties.OnInitPopup = cbUbicacionPropertiesInitPopup
+ Properties.OnValidate = cbUbicacionPropertiesValidate
+ 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 = 2
+ Width = 183
+ end
+ object eNumBultos: TcxDBSpinEdit
+ Left = 775
+ Top = 33
+ DataBinding.DataField = 'NUM_BULTOS'
+ DataBinding.DataSource = dsPedido
+ TabOrder = 3
+ Width = 121
+ end
object dxLayoutGroup1: TdxLayoutGroup
ShowCaption = False
Hidden = True
@@ -142,12 +178,31 @@ inherited frViewDireccionEntregaPedidoProv: TfrViewDireccionEntregaPedidoProv
ControlOptions.AutoColor = True
ControlOptions.ShowBorder = False
end
- object dxLayoutControl1Item3: TdxLayoutItem
- Caption = 'New Item'
- Offsets.Left = 15
+ object dxLayoutControl1Group1: TdxLayoutGroup
ShowCaption = False
- Control = cbLista
- ControlOptions.ShowBorder = False
+ Hidden = True
+ LayoutDirection = ldHorizontal
+ ShowBorder = False
+ object dxLayoutControl1Item3: TdxLayoutItem
+ AutoAligns = [aaVertical]
+ Caption = 'New Item'
+ Offsets.Left = 15
+ ShowCaption = False
+ Control = cbLista
+ ControlOptions.ShowBorder = False
+ end
+ object dxLayoutControl1Item7: TdxLayoutItem
+ AutoAligns = [aaVertical]
+ AlignHorz = ahClient
+ Caption = 'Ubicaci'#243'n:'
+ Control = cbUbicacion
+ ControlOptions.ShowBorder = False
+ end
+ object dxLayoutControl1Item8: TdxLayoutItem
+ Caption = 'N. Bultos:'
+ Control = eNumBultos
+ ControlOptions.ShowBorder = False
+ end
end
object dxLayoutControl1Item4: TdxLayoutItem
ShowCaption = False
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.pas b/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.pas
index 0e47b0b0..f0d7c9c1 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.pas
+++ b/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.pas
@@ -9,7 +9,8 @@ uses
cxDBLookupEdit, cxDBLookupComboBox, StdCtrls, cxControls, DB, uDADataTable,
ActnList, uBizAlmacenes, uAlmacenesController, uPedidosProveedorController,
Buttons, uDAInterfaces, uClientesController, uDireccionesContactoController,
- uBizContactosDirecciones, uBizContratosCliente, uContratosClienteController;
+ uBizContactosDirecciones, uBizContratosCliente, uContratosClienteController,
+ cxDBEdit, uUbicacionesAlmacenController, cxSpinEdit;
type
IViewDireccionEntregaPedidoProv = interface(IViewBase)
@@ -45,6 +46,11 @@ type
cbListaDireccionesCliente: TcxDBLookupComboBox;
dsDireccionesCliente: TDADataSource;
actListaCliente: TAction;
+ dxLayoutControl1Item7: TdxLayoutItem;
+ cbUbicacion: TcxDBComboBox;
+ dxLayoutControl1Group1: TdxLayoutGroup;
+ eNumBultos: TcxDBSpinEdit;
+ dxLayoutControl1Item8: TdxLayoutItem;
procedure actListaExecute(Sender: TObject);
procedure actOtroExecute(Sender: TObject);
procedure cbListaPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
@@ -53,9 +59,13 @@ type
procedure txtDireccionDblClick(Sender: TObject);
procedure actListaClienteExecute(Sender: TObject);
procedure actBotonElegirDirClienteUpdate(Sender: TObject);
+ procedure cbUbicacionPropertiesInitPopup(Sender: TObject);
+ procedure cbUbicacionPropertiesValidate(Sender: TObject;
+ var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
protected
FAlmacenesController : IAlmacenesController;
FAlmacenes: IBizAlmacen;
+ FUbicacionesController: IUbicacionesAlmacenController;
FDireccionesCliente : IBizContactosDirecciones;
FPedido : IBizPedidoProveedor;
FController : IPedidosProveedorController;
@@ -79,7 +89,7 @@ implementation
{$R *.dfm}
uses
- uEditorRegistryUtils, uCustomView, uStringsUtils, uFactuGES_App;
+ uEditorRegistryUtils, uCustomView, uStringsUtils, uFactuGES_App, uBizUbicacionesAlmacen;
procedure TfrViewDireccionEntregaPedidoProv.actBotonElegirDirClienteUpdate(
Sender: TObject);
@@ -174,11 +184,56 @@ begin
CambioDireccionAlmacen;
end;
+procedure TfrViewDireccionEntregaPedidoProv.cbUbicacionPropertiesInitPopup(
+ Sender: TObject);
+begin
+ inherited;
+ with cbubicacion.Properties.Items do
+ begin
+ BeginUpdate;
+ try
+ Clear;
+ AddStrings(FUbicacionesController.DarListaUbicacionesAlmacen);
+ finally
+ EndUpdate;
+ end;
+ end;
+end;
+
+procedure TfrViewDireccionEntregaPedidoProv.cbUbicacionPropertiesValidate(
+ Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
+ var Error: Boolean);
+var
+ AUbicacion : IBizUbicacionAlmacen;
+begin
+ inherited;
+ with (Sender as TcxDBComboBox) do
+ begin
+ if (Length(DisplayValue) > 0) then //and (DisplayValue <> (Contacto as IBizCliente).PROCEDENCIA_CLIENTE) then
+ if Properties.LookupItems.IndexOf(DisplayValue) < 0 then
+ begin
+ Properties.LookupItems.BeginUpdate;
+ AUbicacion := FUbicacionesController.BuscarTodos;
+ AUbicacion.DataTable.Active := True;
+ try
+ FUbicacionesController.Anadir(AUbicacion);
+ AUbicacion.DESCRIPCION := DisplayValue;
+ FUbicacionesController.Guardar(AUbicacion);
+ Properties.LookupItems.Add(DisplayValue);
+ finally
+ Properties.LookupItems.EndUpdate;
+ AUbicacion := NIL;
+ end;
+ end;
+ end;
+end;
+
constructor TfrViewDireccionEntregaPedidoProv.Create(AOwner: TComponent);
begin
inherited;
FController := TPedidosProveedorController.Create;
FAlmacenesController := TAlmacenesController.Create;
+ FUbicacionesController := TUbicacionesAlmacenController.Create;
FAlmacenes := FAlmacenesController.BuscarTodos;
FAlmacenes.DataTable.Active := True;
dsAlmacenes.DataTable := FAlmacenes.DataTable;
@@ -196,6 +251,7 @@ begin
FDireccionesCliente := NIL;
FAlmacenesController := Nil;
+ FUbicacionesController := Nil;
FAlmacenes := Nil;
FController := NIL;
inherited;
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.dfm
index 51af737e..33dc9274 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.dfm
@@ -30,22 +30,36 @@ inherited frViewElegirArticulosPedidosProveedor: TfrViewElegirArticulosPedidosPr
Width = 565
ExplicitWidth = 565
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 = 205
Width = 205
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 565
+ ExplicitWidth = 565
inherited tbxBotones: TTBXToolbar
Width = 555
+ ExplicitWidth = 555
end
end
end
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.pas b/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.pas
index 17fd9fdc..624d799f 100644
Binary files a/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.pas and b/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.pas differ
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidoProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidoProveedor.dfm
index 3d51c072..e61e2ec8 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidoProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidoProveedor.dfm
@@ -180,11 +180,37 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
Height = 166
ExplicitWidth = 273
ExplicitHeight = 166
+ inherited rdxDestino1: TRadioButton
+ Width = 255
+ ExplicitWidth = 255
+ end
+ inherited rdxDestino2: TRadioButton
+ Width = 287
+ ExplicitWidth = 287
+ end
+ inherited cbLista: TcxDBLookupComboBox
+ ExplicitWidth = 425
+ Width = 425
+ end
inherited bModificar: TBitBtn
- Left = 314
- Top = 190
- ExplicitLeft = 314
- ExplicitTop = 190
+ Left = 318
+ Top = 159
+ ExplicitLeft = 318
+ ExplicitTop = 159
+ end
+ inherited txtDireccion: TStaticText
+ Width = 551
+ Height = 177
+ ExplicitWidth = 551
+ ExplicitHeight = 177
+ end
+ inherited rdxDestinoCliente: TRadioButton
+ Width = 566
+ ExplicitWidth = 566
+ end
+ inherited cbListaDireccionesCliente: TcxDBLookupComboBox
+ ExplicitWidth = 551
+ Width = 551
end
end
inherited ActionList1: TActionList
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.dfm
index 58ac67a0..36417706 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.dfm
@@ -124,10 +124,16 @@ inherited frViewPedidosProveedor: TfrViewPedidosProveedor
end
object cxGridViewNOMBRE_ALMACEN: TcxGridDBColumn
DataBinding.FieldName = 'NOMBRE_ALMACEN'
- Visible = False
- VisibleForCustomization = False
Width = 48
end
+ object cxGridViewUBICACION: TcxGridDBColumn
+ Caption = 'Ubicaci'#243'n'
+ DataBinding.FieldName = 'UBICACION'
+ end
+ object cxGridViewNUM_BULTOS: TcxGridDBColumn
+ Caption = 'N.Bultos'
+ DataBinding.FieldName = 'NUM_BULTOS'
+ end
object cxGridViewCALLE: TcxGridDBColumn
DataBinding.FieldName = 'CALLE'
Visible = False
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.pas b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.pas
index d74dfe54..159d0b4d 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.pas
+++ b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.pas
@@ -61,6 +61,8 @@ type
cxGridViewREF_CON_CLIENTE: TcxGridDBColumn;
cxGridViewNOMBRE_CLIENTE: TcxGridDBColumn;
cxGridViewNOMBRE_COMERCIAL: TcxGridDBColumn;
+ cxGridViewUBICACION: TcxGridDBColumn;
+ cxGridViewNUM_BULTOS: TcxGridDBColumn;
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel:
TcxGridLevel);
procedure cxGridViewCODIGOCustomDrawCell(Sender: TcxCustomGridTableView;
diff --git a/Source/Modulos/Presupuestos de cliente/Data/PresupuestosCliente_data.dproj b/Source/Modulos/Presupuestos de cliente/Data/PresupuestosCliente_data.dproj
index 3f0706af..3127d45b 100644
--- a/Source/Modulos/Presupuestos de cliente/Data/PresupuestosCliente_data.dproj
+++ b/Source/Modulos/Presupuestos de cliente/Data/PresupuestosCliente_data.dproj
@@ -49,7 +49,7 @@
MainSource
-
+
diff --git a/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm
index 97474119..1ef011d9 100644
--- a/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm
@@ -291,18 +291,23 @@ inherited DataModulePresupuestosCliente: TDataModulePresupuestosCliente
item
Name = 'CALIDADES'
DataType = datMemo
+ BlobType = dabtBlob
DisplayLabel = 'Calidades'
+ DictionaryEntry = 'PresupuestosCliente_CALIDADES'
end
item
Name = 'REFERENCIA_CLIENTE'
DataType = datString
Size = 255
+ DisplayLabel = 'PedidosCliente_REFERENCIA_CLIENTE'
+ DictionaryEntry = 'PresupuestosCliente_REFERENCIA_CLIENTE'
end
item
Name = 'LISTA_NOMBRES'
DataType = datString
Size = 255
DisplayLabel = 'Otros nombres'
+ DictionaryEntry = 'PresupuestosCliente_LISTA_NOMBRES'
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
@@ -343,7 +348,7 @@ inherited DataModulePresupuestosCliente: TDataModulePresupuestosCliente
item
Name = 'PROPIEDAD'
DataType = datString
- Size = 2000
+ Size = 255
end
item
Name = 'CONCEPTO'
@@ -362,16 +367,16 @@ inherited DataModulePresupuestosCliente: TDataModulePresupuestosCliente
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
end
- item
- Name = 'VISIBLE2'
- DataType = datSmallInt
- DisplayLabel = #191'Visible?'
- end
item
Name = 'VISIBLE'
DataType = datSmallInt
DisplayLabel = #191'Valorado?'
end
+ item
+ Name = 'VISIBLE2'
+ DataType = datSmallInt
+ DisplayLabel = #191'Visible?'
+ end
item
Name = 'ID_ARTICULO'
DataType = datInteger
@@ -381,6 +386,14 @@ inherited DataModulePresupuestosCliente: TDataModulePresupuestosCliente
DataType = datString
Size = 2
end
+ item
+ Name = 'INCREMENTO'
+ DataType = datFloat
+ end
+ item
+ Name = 'DECREMENTO'
+ DataType = datFloat
+ end
item
Name = 'DESCUENTO'
DataType = datFloat
diff --git a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas
index bc56a94a..3aac314d 100644
--- a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas
+++ b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas
@@ -9,12 +9,12 @@ 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_Valores = '{69845B8B-862E-4186-A539-0491EC6224F3}';
- RID_Propiedades = '{895EC925-C718-4589-BD6E-3B98E68C7469}';
- RID_ListaAnosPresupuestos = '{4258D9C8-6F6E-4C32-B278-7DDE0FCE6843}';
- RID_PresupuestosCliente = '{52ACB41F-F244-4D13-9769-9202F76311C0}';
- RID_CapitulosPresupuesto = '{A1E223AB-6F46-437F-B40F-7CCF8AD46DEA}';
- RID_PresupuestosCliente_Detalles = '{BFF68D7B-A862-4E85-AA60-7BD45944AEC5}';
+ RID_Valores = '{B97FDFCF-3DC5-4FBD-A7CA-D8410AE6D1A2}';
+ RID_Propiedades = '{EC5DE5CF-02CE-44C1-B361-0AAFF7B78ADC}';
+ RID_ListaAnosPresupuestos = '{92B72FB6-5806-4F60-A078-A8BF296A4802}';
+ RID_PresupuestosCliente = '{5F381B4C-4432-4E10-B498-A9D9093769AC}';
+ RID_CapitulosPresupuesto = '{ABB90CA8-CFFC-4FA2-94D3-FE61B70DE842}';
+ RID_PresupuestosCliente_Detalles = '{215F3858-E25C-4697-B36E-6E4862292811}';
{ Data table names }
nme_Valores = 'Valores';
@@ -184,10 +184,12 @@ const
fld_PresupuestosCliente_DetallesCANTIDAD = 'CANTIDAD';
fld_PresupuestosCliente_DetallesIMPORTE_UNIDAD = 'IMPORTE_UNIDAD';
fld_PresupuestosCliente_DetallesIMPORTE_TOTAL = 'IMPORTE_TOTAL';
- fld_PresupuestosCliente_DetallesVISIBLE2 = 'VISIBLE2';
fld_PresupuestosCliente_DetallesVISIBLE = 'VISIBLE';
+ fld_PresupuestosCliente_DetallesVISIBLE2 = 'VISIBLE2';
fld_PresupuestosCliente_DetallesID_ARTICULO = 'ID_ARTICULO';
fld_PresupuestosCliente_DetallesTIPO_ARTICULO = 'TIPO_ARTICULO';
+ fld_PresupuestosCliente_DetallesINCREMENTO = 'INCREMENTO';
+ fld_PresupuestosCliente_DetallesDECREMENTO = 'DECREMENTO';
fld_PresupuestosCliente_DetallesDESCUENTO = 'DESCUENTO';
fld_PresupuestosCliente_DetallesIMPORTE_PORTE = 'IMPORTE_PORTE';
fld_PresupuestosCliente_DetallesREFERENCIA = 'REFERENCIA';
@@ -203,19 +205,21 @@ const
idx_PresupuestosCliente_DetallesCANTIDAD = 6;
idx_PresupuestosCliente_DetallesIMPORTE_UNIDAD = 7;
idx_PresupuestosCliente_DetallesIMPORTE_TOTAL = 8;
- idx_PresupuestosCliente_DetallesVISIBLE2 = 9;
- idx_PresupuestosCliente_DetallesVISIBLE = 10;
+ idx_PresupuestosCliente_DetallesVISIBLE = 9;
+ idx_PresupuestosCliente_DetallesVISIBLE2 = 10;
idx_PresupuestosCliente_DetallesID_ARTICULO = 11;
idx_PresupuestosCliente_DetallesTIPO_ARTICULO = 12;
- idx_PresupuestosCliente_DetallesDESCUENTO = 13;
- idx_PresupuestosCliente_DetallesIMPORTE_PORTE = 14;
- idx_PresupuestosCliente_DetallesREFERENCIA = 15;
- idx_PresupuestosCliente_DetallesREFERENCIA_PROVEEDOR = 16;
+ idx_PresupuestosCliente_DetallesINCREMENTO = 13;
+ idx_PresupuestosCliente_DetallesDECREMENTO = 14;
+ idx_PresupuestosCliente_DetallesDESCUENTO = 15;
+ idx_PresupuestosCliente_DetallesIMPORTE_PORTE = 16;
+ idx_PresupuestosCliente_DetallesREFERENCIA = 17;
+ idx_PresupuestosCliente_DetallesREFERENCIA_PROVEEDOR = 18;
type
{ IValores }
IValores = interface(IDAStronglyTypedDataTable)
- ['{4A86E969-6E16-450C-A82B-D645B8E298C4}']
+ ['{1F250F6D-3212-402A-9D52-3FFEF4F656F4}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -322,7 +326,7 @@ type
{ IPropiedades }
IPropiedades = interface(IDAStronglyTypedDataTable)
- ['{B33EF001-F0B3-4377-A019-646EB05608B0}']
+ ['{0986E005-7249-4D17-80E3-4D7E14429CCB}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -369,7 +373,7 @@ type
{ IListaAnosPresupuestos }
IListaAnosPresupuestos = interface(IDAStronglyTypedDataTable)
- ['{4F552890-7869-406F-B323-DDC2C6BBAABD}']
+ ['{F1CE9770-4F7E-47B9-9E11-CF91133C609D}']
{ Property getters and setters }
function GetANOValue: String;
procedure SetANOValue(const aValue: String);
@@ -404,7 +408,7 @@ type
{ IPresupuestosCliente }
IPresupuestosCliente = interface(IDAStronglyTypedDataTable)
- ['{302CF5F9-CA89-4181-9EE0-29CE9C739B7E}']
+ ['{632DB14E-4E7E-4FBA-BAB3-0E0A4F4358F1}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -955,7 +959,7 @@ type
{ ICapitulosPresupuesto }
ICapitulosPresupuesto = interface(IDAStronglyTypedDataTable)
- ['{1D0F3A1A-E5C1-487E-8EF0-0496F49E0D34}']
+ ['{AE4D0841-3455-4F06-BCC4-F5CB620D6E6F}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -1110,7 +1114,7 @@ type
{ IPresupuestosCliente_Detalles }
IPresupuestosCliente_Detalles = interface(IDAStronglyTypedDataTable)
- ['{ECFB879A-6B6E-4125-A97B-14BA365AFB4E}']
+ ['{2DD0D791-E9A1-4501-8382-B10F87D19770}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@@ -1148,14 +1152,14 @@ type
procedure SetIMPORTE_TOTALValue(const aValue: Currency);
function GetIMPORTE_TOTALIsNull: Boolean;
procedure SetIMPORTE_TOTALIsNull(const aValue: Boolean);
- function GetVISIBLE2Value: SmallInt;
- procedure SetVISIBLE2Value(const aValue: SmallInt);
- function GetVISIBLE2IsNull: Boolean;
- procedure SetVISIBLE2IsNull(const aValue: Boolean);
function GetVISIBLEValue: SmallInt;
procedure SetVISIBLEValue(const aValue: SmallInt);
function GetVISIBLEIsNull: Boolean;
procedure SetVISIBLEIsNull(const aValue: Boolean);
+ function GetVISIBLE2Value: SmallInt;
+ procedure SetVISIBLE2Value(const aValue: SmallInt);
+ function GetVISIBLE2IsNull: Boolean;
+ procedure SetVISIBLE2IsNull(const aValue: Boolean);
function GetID_ARTICULOValue: Integer;
procedure SetID_ARTICULOValue(const aValue: Integer);
function GetID_ARTICULOIsNull: Boolean;
@@ -1164,6 +1168,14 @@ type
procedure SetTIPO_ARTICULOValue(const aValue: String);
function GetTIPO_ARTICULOIsNull: Boolean;
procedure SetTIPO_ARTICULOIsNull(const aValue: Boolean);
+ function GetINCREMENTOValue: Float;
+ procedure SetINCREMENTOValue(const aValue: Float);
+ function GetINCREMENTOIsNull: Boolean;
+ procedure SetINCREMENTOIsNull(const aValue: Boolean);
+ function GetDECREMENTOValue: Float;
+ procedure SetDECREMENTOValue(const aValue: Float);
+ function GetDECREMENTOIsNull: Boolean;
+ procedure SetDECREMENTOIsNull(const aValue: Boolean);
function GetDESCUENTOValue: Float;
procedure SetDESCUENTOValue(const aValue: Float);
function GetDESCUENTOIsNull: Boolean;
@@ -1201,14 +1213,18 @@ type
property IMPORTE_UNIDADIsNull: Boolean read GetIMPORTE_UNIDADIsNull write SetIMPORTE_UNIDADIsNull;
property IMPORTE_TOTAL: Currency read GetIMPORTE_TOTALValue write SetIMPORTE_TOTALValue;
property IMPORTE_TOTALIsNull: Boolean read GetIMPORTE_TOTALIsNull write SetIMPORTE_TOTALIsNull;
- property VISIBLE2: SmallInt read GetVISIBLE2Value write SetVISIBLE2Value;
- property VISIBLE2IsNull: Boolean read GetVISIBLE2IsNull write SetVISIBLE2IsNull;
property VISIBLE: SmallInt read GetVISIBLEValue write SetVISIBLEValue;
property VISIBLEIsNull: Boolean read GetVISIBLEIsNull write SetVISIBLEIsNull;
+ property VISIBLE2: SmallInt read GetVISIBLE2Value write SetVISIBLE2Value;
+ property VISIBLE2IsNull: Boolean read GetVISIBLE2IsNull write SetVISIBLE2IsNull;
property ID_ARTICULO: Integer read GetID_ARTICULOValue write SetID_ARTICULOValue;
property ID_ARTICULOIsNull: Boolean read GetID_ARTICULOIsNull write SetID_ARTICULOIsNull;
property TIPO_ARTICULO: String read GetTIPO_ARTICULOValue write SetTIPO_ARTICULOValue;
property TIPO_ARTICULOIsNull: Boolean read GetTIPO_ARTICULOIsNull write SetTIPO_ARTICULOIsNull;
+ property INCREMENTO: Float read GetINCREMENTOValue write SetINCREMENTOValue;
+ property INCREMENTOIsNull: Boolean read GetINCREMENTOIsNull write SetINCREMENTOIsNull;
+ property DECREMENTO: Float read GetDECREMENTOValue write SetDECREMENTOValue;
+ property DECREMENTOIsNull: Boolean read GetDECREMENTOIsNull write SetDECREMENTOIsNull;
property DESCUENTO: Float read GetDESCUENTOValue write SetDESCUENTOValue;
property DESCUENTOIsNull: Boolean read GetDESCUENTOIsNull write SetDESCUENTOIsNull;
property IMPORTE_PORTE: Currency read GetIMPORTE_PORTEValue write SetIMPORTE_PORTEValue;
@@ -1260,14 +1276,14 @@ type
procedure SetIMPORTE_TOTALValue(const aValue: Currency); virtual;
function GetIMPORTE_TOTALIsNull: Boolean; virtual;
procedure SetIMPORTE_TOTALIsNull(const aValue: Boolean); virtual;
- function GetVISIBLE2Value: SmallInt; virtual;
- procedure SetVISIBLE2Value(const aValue: SmallInt); virtual;
- function GetVISIBLE2IsNull: Boolean; virtual;
- procedure SetVISIBLE2IsNull(const aValue: Boolean); virtual;
function GetVISIBLEValue: SmallInt; virtual;
procedure SetVISIBLEValue(const aValue: SmallInt); virtual;
function GetVISIBLEIsNull: Boolean; virtual;
procedure SetVISIBLEIsNull(const aValue: Boolean); virtual;
+ function GetVISIBLE2Value: SmallInt; virtual;
+ procedure SetVISIBLE2Value(const aValue: SmallInt); virtual;
+ function GetVISIBLE2IsNull: Boolean; virtual;
+ procedure SetVISIBLE2IsNull(const aValue: Boolean); virtual;
function GetID_ARTICULOValue: Integer; virtual;
procedure SetID_ARTICULOValue(const aValue: Integer); virtual;
function GetID_ARTICULOIsNull: Boolean; virtual;
@@ -1276,6 +1292,14 @@ type
procedure SetTIPO_ARTICULOValue(const aValue: String); virtual;
function GetTIPO_ARTICULOIsNull: Boolean; virtual;
procedure SetTIPO_ARTICULOIsNull(const aValue: Boolean); virtual;
+ function GetINCREMENTOValue: Float; virtual;
+ procedure SetINCREMENTOValue(const aValue: Float); virtual;
+ function GetINCREMENTOIsNull: Boolean; virtual;
+ procedure SetINCREMENTOIsNull(const aValue: Boolean); virtual;
+ function GetDECREMENTOValue: Float; virtual;
+ procedure SetDECREMENTOValue(const aValue: Float); virtual;
+ function GetDECREMENTOIsNull: Boolean; virtual;
+ procedure SetDECREMENTOIsNull(const aValue: Boolean); virtual;
function GetDESCUENTOValue: Float; virtual;
procedure SetDESCUENTOValue(const aValue: Float); virtual;
function GetDESCUENTOIsNull: Boolean; virtual;
@@ -1312,14 +1336,18 @@ type
property IMPORTE_UNIDADIsNull: Boolean read GetIMPORTE_UNIDADIsNull write SetIMPORTE_UNIDADIsNull;
property IMPORTE_TOTAL: Currency read GetIMPORTE_TOTALValue write SetIMPORTE_TOTALValue;
property IMPORTE_TOTALIsNull: Boolean read GetIMPORTE_TOTALIsNull write SetIMPORTE_TOTALIsNull;
- property VISIBLE2: SmallInt read GetVISIBLE2Value write SetVISIBLE2Value;
- property VISIBLE2IsNull: Boolean read GetVISIBLE2IsNull write SetVISIBLE2IsNull;
property VISIBLE: SmallInt read GetVISIBLEValue write SetVISIBLEValue;
property VISIBLEIsNull: Boolean read GetVISIBLEIsNull write SetVISIBLEIsNull;
+ property VISIBLE2: SmallInt read GetVISIBLE2Value write SetVISIBLE2Value;
+ property VISIBLE2IsNull: Boolean read GetVISIBLE2IsNull write SetVISIBLE2IsNull;
property ID_ARTICULO: Integer read GetID_ARTICULOValue write SetID_ARTICULOValue;
property ID_ARTICULOIsNull: Boolean read GetID_ARTICULOIsNull write SetID_ARTICULOIsNull;
property TIPO_ARTICULO: String read GetTIPO_ARTICULOValue write SetTIPO_ARTICULOValue;
property TIPO_ARTICULOIsNull: Boolean read GetTIPO_ARTICULOIsNull write SetTIPO_ARTICULOIsNull;
+ property INCREMENTO: Float read GetINCREMENTOValue write SetINCREMENTOValue;
+ property INCREMENTOIsNull: Boolean read GetINCREMENTOIsNull write SetINCREMENTOIsNull;
+ property DECREMENTO: Float read GetDECREMENTOValue write SetDECREMENTOValue;
+ property DECREMENTOIsNull: Boolean read GetDECREMENTOIsNull write SetDECREMENTOIsNull;
property DESCUENTO: Float read GetDESCUENTOValue write SetDESCUENTOValue;
property DESCUENTOIsNull: Boolean read GetDESCUENTOIsNull write SetDESCUENTOIsNull;
property IMPORTE_PORTE: Currency read GetIMPORTE_PORTEValue write SetIMPORTE_PORTEValue;
@@ -2991,27 +3019,6 @@ begin
DataTable.Fields[idx_PresupuestosCliente_DetallesIMPORTE_TOTAL].AsVariant := Null;
end;
-function TPresupuestosCliente_DetallesDataTableRules.GetVISIBLE2Value: SmallInt;
-begin
- result := DataTable.Fields[idx_PresupuestosCliente_DetallesVISIBLE2].AsSmallInt;
-end;
-
-procedure TPresupuestosCliente_DetallesDataTableRules.SetVISIBLE2Value(const aValue: SmallInt);
-begin
- DataTable.Fields[idx_PresupuestosCliente_DetallesVISIBLE2].AsSmallInt := aValue;
-end;
-
-function TPresupuestosCliente_DetallesDataTableRules.GetVISIBLE2IsNull: boolean;
-begin
- result := DataTable.Fields[idx_PresupuestosCliente_DetallesVISIBLE2].IsNull;
-end;
-
-procedure TPresupuestosCliente_DetallesDataTableRules.SetVISIBLE2IsNull(const aValue: Boolean);
-begin
- if aValue then
- DataTable.Fields[idx_PresupuestosCliente_DetallesVISIBLE2].AsVariant := Null;
-end;
-
function TPresupuestosCliente_DetallesDataTableRules.GetVISIBLEValue: SmallInt;
begin
result := DataTable.Fields[idx_PresupuestosCliente_DetallesVISIBLE].AsSmallInt;
@@ -3033,6 +3040,27 @@ begin
DataTable.Fields[idx_PresupuestosCliente_DetallesVISIBLE].AsVariant := Null;
end;
+function TPresupuestosCliente_DetallesDataTableRules.GetVISIBLE2Value: SmallInt;
+begin
+ result := DataTable.Fields[idx_PresupuestosCliente_DetallesVISIBLE2].AsSmallInt;
+end;
+
+procedure TPresupuestosCliente_DetallesDataTableRules.SetVISIBLE2Value(const aValue: SmallInt);
+begin
+ DataTable.Fields[idx_PresupuestosCliente_DetallesVISIBLE2].AsSmallInt := aValue;
+end;
+
+function TPresupuestosCliente_DetallesDataTableRules.GetVISIBLE2IsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PresupuestosCliente_DetallesVISIBLE2].IsNull;
+end;
+
+procedure TPresupuestosCliente_DetallesDataTableRules.SetVISIBLE2IsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PresupuestosCliente_DetallesVISIBLE2].AsVariant := Null;
+end;
+
function TPresupuestosCliente_DetallesDataTableRules.GetID_ARTICULOValue: Integer;
begin
result := DataTable.Fields[idx_PresupuestosCliente_DetallesID_ARTICULO].AsInteger;
@@ -3075,6 +3103,48 @@ begin
DataTable.Fields[idx_PresupuestosCliente_DetallesTIPO_ARTICULO].AsVariant := Null;
end;
+function TPresupuestosCliente_DetallesDataTableRules.GetINCREMENTOValue: Float;
+begin
+ result := DataTable.Fields[idx_PresupuestosCliente_DetallesINCREMENTO].AsFloat;
+end;
+
+procedure TPresupuestosCliente_DetallesDataTableRules.SetINCREMENTOValue(const aValue: Float);
+begin
+ DataTable.Fields[idx_PresupuestosCliente_DetallesINCREMENTO].AsFloat := aValue;
+end;
+
+function TPresupuestosCliente_DetallesDataTableRules.GetINCREMENTOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PresupuestosCliente_DetallesINCREMENTO].IsNull;
+end;
+
+procedure TPresupuestosCliente_DetallesDataTableRules.SetINCREMENTOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PresupuestosCliente_DetallesINCREMENTO].AsVariant := Null;
+end;
+
+function TPresupuestosCliente_DetallesDataTableRules.GetDECREMENTOValue: Float;
+begin
+ result := DataTable.Fields[idx_PresupuestosCliente_DetallesDECREMENTO].AsFloat;
+end;
+
+procedure TPresupuestosCliente_DetallesDataTableRules.SetDECREMENTOValue(const aValue: Float);
+begin
+ DataTable.Fields[idx_PresupuestosCliente_DetallesDECREMENTO].AsFloat := aValue;
+end;
+
+function TPresupuestosCliente_DetallesDataTableRules.GetDECREMENTOIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_PresupuestosCliente_DetallesDECREMENTO].IsNull;
+end;
+
+procedure TPresupuestosCliente_DetallesDataTableRules.SetDECREMENTOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_PresupuestosCliente_DetallesDECREMENTO].AsVariant := Null;
+end;
+
function TPresupuestosCliente_DetallesDataTableRules.GetDESCUENTOValue: Float;
begin
result := DataTable.Fields[idx_PresupuestosCliente_DetallesDESCUENTO].AsFloat;
diff --git a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas
index 813b93cb..bed82f90 100644
--- a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas
+++ b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas
@@ -9,17 +9,17 @@ 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_ValoresDelta = '{687FCBCD-2F9D-4E98-8515-FD5E9FCEE32A}';
- RID_PropiedadesDelta = '{784A3DDA-A3AF-49BB-A49C-7EEF41AA4565}';
- RID_ListaAnosPresupuestosDelta = '{881F141B-82C6-448C-80E9-D26A157B293A}';
- RID_PresupuestosClienteDelta = '{C5E20CDB-A1E1-42F8-B46F-25C93C4957F6}';
- RID_CapitulosPresupuestoDelta = '{17439B2D-6084-4A58-8AB1-6437324028C0}';
- RID_PresupuestosCliente_DetallesDelta = '{D011385B-63AE-4484-AF6A-DE0CA4F3E913}';
+ RID_ValoresDelta = '{8A602FA2-F0F7-48FF-9D5C-450DD49824A0}';
+ RID_PropiedadesDelta = '{ED1FE07A-4D3A-42CA-B260-9C0F63280666}';
+ RID_ListaAnosPresupuestosDelta = '{1C36675B-4471-4B14-BE62-E6B8B99DBBC9}';
+ RID_PresupuestosClienteDelta = '{FB71F4AF-2DC1-41AF-BB17-E817422E50C9}';
+ RID_CapitulosPresupuestoDelta = '{FE29C9E0-026F-4C67-8D59-3D9ECA83E94E}';
+ RID_PresupuestosCliente_DetallesDelta = '{E0A8A450-F599-49A7-80FA-05390499C535}';
type
{ IValoresDelta }
IValoresDelta = interface(IValores)
- ['{687FCBCD-2F9D-4E98-8515-FD5E9FCEE32A}']
+ ['{8A602FA2-F0F7-48FF-9D5C-450DD49824A0}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -125,7 +125,7 @@ type
{ IPropiedadesDelta }
IPropiedadesDelta = interface(IPropiedades)
- ['{784A3DDA-A3AF-49BB-A49C-7EEF41AA4565}']
+ ['{ED1FE07A-4D3A-42CA-B260-9C0F63280666}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldDESCRIPCIONValue : String;
@@ -171,7 +171,7 @@ type
{ IListaAnosPresupuestosDelta }
IListaAnosPresupuestosDelta = interface(IListaAnosPresupuestos)
- ['{881F141B-82C6-448C-80E9-D26A157B293A}']
+ ['{1C36675B-4471-4B14-BE62-E6B8B99DBBC9}']
{ Property getters and setters }
function GetOldANOValue : String;
@@ -205,7 +205,7 @@ type
{ IPresupuestosClienteDelta }
IPresupuestosClienteDelta = interface(IPresupuestosCliente)
- ['{C5E20CDB-A1E1-42F8-B46F-25C93C4957F6}']
+ ['{FB71F4AF-2DC1-41AF-BB17-E817422E50C9}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer;
@@ -760,7 +760,7 @@ type
{ ICapitulosPresupuestoDelta }
ICapitulosPresupuestoDelta = interface(ICapitulosPresupuesto)
- ['{17439B2D-6084-4A58-8AB1-6437324028C0}']
+ ['{FE29C9E0-026F-4C67-8D59-3D9ECA83E94E}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldPOSICIONValue : Integer;
@@ -914,7 +914,7 @@ type
{ IPresupuestosCliente_DetallesDelta }
IPresupuestosCliente_DetallesDelta = interface(IPresupuestosCliente_Detalles)
- ['{D011385B-63AE-4484-AF6A-DE0CA4F3E913}']
+ ['{E0A8A450-F599-49A7-80FA-05390499C535}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_PRESUPUESTOValue : Integer;
@@ -925,10 +925,12 @@ type
function GetOldCANTIDADValue : Currency;
function GetOldIMPORTE_UNIDADValue : Currency;
function GetOldIMPORTE_TOTALValue : Currency;
- function GetOldVISIBLE2Value : SmallInt;
function GetOldVISIBLEValue : SmallInt;
+ function GetOldVISIBLE2Value : SmallInt;
function GetOldID_ARTICULOValue : Integer;
function GetOldTIPO_ARTICULOValue : String;
+ function GetOldINCREMENTOValue : Float;
+ function GetOldDECREMENTOValue : Float;
function GetOldDESCUENTOValue : Float;
function GetOldIMPORTE_PORTEValue : Currency;
function GetOldREFERENCIAValue : String;
@@ -944,10 +946,12 @@ type
property OldCANTIDAD : Currency read GetOldCANTIDADValue;
property OldIMPORTE_UNIDAD : Currency read GetOldIMPORTE_UNIDADValue;
property OldIMPORTE_TOTAL : Currency read GetOldIMPORTE_TOTALValue;
- property OldVISIBLE2 : SmallInt read GetOldVISIBLE2Value;
property OldVISIBLE : SmallInt read GetOldVISIBLEValue;
+ property OldVISIBLE2 : SmallInt read GetOldVISIBLE2Value;
property OldID_ARTICULO : Integer read GetOldID_ARTICULOValue;
property OldTIPO_ARTICULO : String read GetOldTIPO_ARTICULOValue;
+ property OldINCREMENTO : Float read GetOldINCREMENTOValue;
+ property OldDECREMENTO : Float read GetOldDECREMENTOValue;
property OldDESCUENTO : Float read GetOldDESCUENTOValue;
property OldIMPORTE_PORTE : Currency read GetOldIMPORTE_PORTEValue;
property OldREFERENCIA : String read GetOldREFERENCIAValue;
@@ -1013,18 +1017,18 @@ type
function GetOldIMPORTE_TOTALIsNull: Boolean; virtual;
procedure SetIMPORTE_TOTALValue(const aValue: Currency); virtual;
procedure SetIMPORTE_TOTALIsNull(const aValue: Boolean); virtual;
- function GetVISIBLE2Value: SmallInt; virtual;
- function GetVISIBLE2IsNull: Boolean; virtual;
- function GetOldVISIBLE2Value: SmallInt; virtual;
- function GetOldVISIBLE2IsNull: Boolean; virtual;
- procedure SetVISIBLE2Value(const aValue: SmallInt); virtual;
- procedure SetVISIBLE2IsNull(const aValue: Boolean); virtual;
function GetVISIBLEValue: SmallInt; virtual;
function GetVISIBLEIsNull: Boolean; virtual;
function GetOldVISIBLEValue: SmallInt; virtual;
function GetOldVISIBLEIsNull: Boolean; virtual;
procedure SetVISIBLEValue(const aValue: SmallInt); virtual;
procedure SetVISIBLEIsNull(const aValue: Boolean); virtual;
+ function GetVISIBLE2Value: SmallInt; virtual;
+ function GetVISIBLE2IsNull: Boolean; virtual;
+ function GetOldVISIBLE2Value: SmallInt; virtual;
+ function GetOldVISIBLE2IsNull: Boolean; virtual;
+ procedure SetVISIBLE2Value(const aValue: SmallInt); virtual;
+ procedure SetVISIBLE2IsNull(const aValue: Boolean); virtual;
function GetID_ARTICULOValue: Integer; virtual;
function GetID_ARTICULOIsNull: Boolean; virtual;
function GetOldID_ARTICULOValue: Integer; virtual;
@@ -1037,6 +1041,18 @@ type
function GetOldTIPO_ARTICULOIsNull: Boolean; virtual;
procedure SetTIPO_ARTICULOValue(const aValue: String); virtual;
procedure SetTIPO_ARTICULOIsNull(const aValue: Boolean); virtual;
+ function GetINCREMENTOValue: Float; virtual;
+ function GetINCREMENTOIsNull: Boolean; virtual;
+ function GetOldINCREMENTOValue: Float; virtual;
+ function GetOldINCREMENTOIsNull: Boolean; virtual;
+ procedure SetINCREMENTOValue(const aValue: Float); virtual;
+ procedure SetINCREMENTOIsNull(const aValue: Boolean); virtual;
+ function GetDECREMENTOValue: Float; virtual;
+ function GetDECREMENTOIsNull: Boolean; virtual;
+ function GetOldDECREMENTOValue: Float; virtual;
+ function GetOldDECREMENTOIsNull: Boolean; virtual;
+ procedure SetDECREMENTOValue(const aValue: Float); virtual;
+ procedure SetDECREMENTOIsNull(const aValue: Boolean); virtual;
function GetDESCUENTOValue: Float; virtual;
function GetDESCUENTOIsNull: Boolean; virtual;
function GetOldDESCUENTOValue: Float; virtual;
@@ -1099,14 +1115,14 @@ type
property IMPORTE_TOTALIsNull : Boolean read GetIMPORTE_TOTALIsNull write SetIMPORTE_TOTALIsNull;
property OldIMPORTE_TOTAL : Currency read GetOldIMPORTE_TOTALValue;
property OldIMPORTE_TOTALIsNull : Boolean read GetOldIMPORTE_TOTALIsNull;
- property VISIBLE2 : SmallInt read GetVISIBLE2Value write SetVISIBLE2Value;
- property VISIBLE2IsNull : Boolean read GetVISIBLE2IsNull write SetVISIBLE2IsNull;
- property OldVISIBLE2 : SmallInt read GetOldVISIBLE2Value;
- property OldVISIBLE2IsNull : Boolean read GetOldVISIBLE2IsNull;
property VISIBLE : SmallInt read GetVISIBLEValue write SetVISIBLEValue;
property VISIBLEIsNull : Boolean read GetVISIBLEIsNull write SetVISIBLEIsNull;
property OldVISIBLE : SmallInt read GetOldVISIBLEValue;
property OldVISIBLEIsNull : Boolean read GetOldVISIBLEIsNull;
+ property VISIBLE2 : SmallInt read GetVISIBLE2Value write SetVISIBLE2Value;
+ property VISIBLE2IsNull : Boolean read GetVISIBLE2IsNull write SetVISIBLE2IsNull;
+ property OldVISIBLE2 : SmallInt read GetOldVISIBLE2Value;
+ property OldVISIBLE2IsNull : Boolean read GetOldVISIBLE2IsNull;
property ID_ARTICULO : Integer read GetID_ARTICULOValue write SetID_ARTICULOValue;
property ID_ARTICULOIsNull : Boolean read GetID_ARTICULOIsNull write SetID_ARTICULOIsNull;
property OldID_ARTICULO : Integer read GetOldID_ARTICULOValue;
@@ -1115,6 +1131,14 @@ type
property TIPO_ARTICULOIsNull : Boolean read GetTIPO_ARTICULOIsNull write SetTIPO_ARTICULOIsNull;
property OldTIPO_ARTICULO : String read GetOldTIPO_ARTICULOValue;
property OldTIPO_ARTICULOIsNull : Boolean read GetOldTIPO_ARTICULOIsNull;
+ property INCREMENTO : Float read GetINCREMENTOValue write SetINCREMENTOValue;
+ property INCREMENTOIsNull : Boolean read GetINCREMENTOIsNull write SetINCREMENTOIsNull;
+ property OldINCREMENTO : Float read GetOldINCREMENTOValue;
+ property OldINCREMENTOIsNull : Boolean read GetOldINCREMENTOIsNull;
+ property DECREMENTO : Float read GetDECREMENTOValue write SetDECREMENTOValue;
+ property DECREMENTOIsNull : Boolean read GetDECREMENTOIsNull write SetDECREMENTOIsNull;
+ property OldDECREMENTO : Float read GetOldDECREMENTOValue;
+ property OldDECREMENTOIsNull : Boolean read GetOldDECREMENTOIsNull;
property DESCUENTO : Float read GetDESCUENTOValue write SetDESCUENTOValue;
property DESCUENTOIsNull : Boolean read GetDESCUENTOIsNull write SetDESCUENTOIsNull;
property OldDESCUENTO : Float read GetOldDESCUENTOValue;
@@ -3540,37 +3564,6 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesIMPORTE_TOTAL] := Null;
end;
-function TPresupuestosCliente_DetallesBusinessProcessorRules.GetVISIBLE2Value: SmallInt;
-begin
- result := BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesVISIBLE2];
-end;
-
-function TPresupuestosCliente_DetallesBusinessProcessorRules.GetVISIBLE2IsNull: Boolean;
-begin
- result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesVISIBLE2]);
-end;
-
-function TPresupuestosCliente_DetallesBusinessProcessorRules.GetOldVISIBLE2Value: SmallInt;
-begin
- result := BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosCliente_DetallesVISIBLE2];
-end;
-
-function TPresupuestosCliente_DetallesBusinessProcessorRules.GetOldVISIBLE2IsNull: Boolean;
-begin
- result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosCliente_DetallesVISIBLE2]);
-end;
-
-procedure TPresupuestosCliente_DetallesBusinessProcessorRules.SetVISIBLE2Value(const aValue: SmallInt);
-begin
- BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesVISIBLE2] := aValue;
-end;
-
-procedure TPresupuestosCliente_DetallesBusinessProcessorRules.SetVISIBLE2IsNull(const aValue: Boolean);
-begin
- if aValue then
- BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesVISIBLE2] := Null;
-end;
-
function TPresupuestosCliente_DetallesBusinessProcessorRules.GetVISIBLEValue: SmallInt;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesVISIBLE];
@@ -3602,6 +3595,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesVISIBLE] := Null;
end;
+function TPresupuestosCliente_DetallesBusinessProcessorRules.GetVISIBLE2Value: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesVISIBLE2];
+end;
+
+function TPresupuestosCliente_DetallesBusinessProcessorRules.GetVISIBLE2IsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesVISIBLE2]);
+end;
+
+function TPresupuestosCliente_DetallesBusinessProcessorRules.GetOldVISIBLE2Value: SmallInt;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosCliente_DetallesVISIBLE2];
+end;
+
+function TPresupuestosCliente_DetallesBusinessProcessorRules.GetOldVISIBLE2IsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosCliente_DetallesVISIBLE2]);
+end;
+
+procedure TPresupuestosCliente_DetallesBusinessProcessorRules.SetVISIBLE2Value(const aValue: SmallInt);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesVISIBLE2] := aValue;
+end;
+
+procedure TPresupuestosCliente_DetallesBusinessProcessorRules.SetVISIBLE2IsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesVISIBLE2] := Null;
+end;
+
function TPresupuestosCliente_DetallesBusinessProcessorRules.GetID_ARTICULOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesID_ARTICULO];
@@ -3664,6 +3688,68 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesTIPO_ARTICULO] := Null;
end;
+function TPresupuestosCliente_DetallesBusinessProcessorRules.GetINCREMENTOValue: Float;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesINCREMENTO];
+end;
+
+function TPresupuestosCliente_DetallesBusinessProcessorRules.GetINCREMENTOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesINCREMENTO]);
+end;
+
+function TPresupuestosCliente_DetallesBusinessProcessorRules.GetOldINCREMENTOValue: Float;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosCliente_DetallesINCREMENTO];
+end;
+
+function TPresupuestosCliente_DetallesBusinessProcessorRules.GetOldINCREMENTOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosCliente_DetallesINCREMENTO]);
+end;
+
+procedure TPresupuestosCliente_DetallesBusinessProcessorRules.SetINCREMENTOValue(const aValue: Float);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesINCREMENTO] := aValue;
+end;
+
+procedure TPresupuestosCliente_DetallesBusinessProcessorRules.SetINCREMENTOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesINCREMENTO] := Null;
+end;
+
+function TPresupuestosCliente_DetallesBusinessProcessorRules.GetDECREMENTOValue: Float;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesDECREMENTO];
+end;
+
+function TPresupuestosCliente_DetallesBusinessProcessorRules.GetDECREMENTOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesDECREMENTO]);
+end;
+
+function TPresupuestosCliente_DetallesBusinessProcessorRules.GetOldDECREMENTOValue: Float;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosCliente_DetallesDECREMENTO];
+end;
+
+function TPresupuestosCliente_DetallesBusinessProcessorRules.GetOldDECREMENTOIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosCliente_DetallesDECREMENTO]);
+end;
+
+procedure TPresupuestosCliente_DetallesBusinessProcessorRules.SetDECREMENTOValue(const aValue: Float);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesDECREMENTO] := aValue;
+end;
+
+procedure TPresupuestosCliente_DetallesBusinessProcessorRules.SetDECREMENTOIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesDECREMENTO] := Null;
+end;
+
function TPresupuestosCliente_DetallesBusinessProcessorRules.GetDESCUENTOValue: Float;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosCliente_DetallesDESCUENTO];
diff --git a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosClienteServer.pas b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosClienteServer.pas
index c22a8390..256ca259 100644
--- a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosClienteServer.pas
+++ b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosClienteServer.pas
@@ -84,7 +84,7 @@ begin
GetClassFactory('srvReferencias').CreateInstance(AClientID, Intf);
AReferenciasService := Intf as IsrvReferencias;
- Result := AReferenciasService.DarNuevaReferencia(ACodigoReferencia, -1, ID_TIENDA)
+ Result := AReferenciasService.DarNuevaReferencia(ACodigoReferencia, ID_EMPRESA, ID_TIENDA)
end;
function TBizPresupuestosClienteServer.IncrementarReferencia: Boolean;
@@ -99,7 +99,7 @@ begin
GetClassFactory('srvReferencias').CreateInstance(AClientID, Intf);
AReferenciasService := Intf as IsrvReferencias;
- Result := AReferenciasService.IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, -1, ID_TIENDA)
+ Result := AReferenciasService.IncrementarValorReferencia(ACodigoReferencia, Self.REFERENCIA, ID_EMPRESA, ID_TIENDA)
end;
initialization
diff --git a/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj b/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj
index 03a19a53..ddf8b33e 100644
--- a/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj
+++ b/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj
@@ -17,6 +17,7 @@
+
@@ -251,14 +252,23 @@
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm
index 30c1e9b2..0a250598 100644
--- a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm
@@ -598,6 +598,18 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
item
DatasetField = 'VISIBLE2'
TableField = 'VISIBLE2'
+ end
+ item
+ DatasetField = 'INCREMENTO'
+ TableField = 'INCREMENTO'
+ end
+ item
+ DatasetField = 'DECREMENTO'
+ TableField = 'DECREMENTO'
+ end
+ item
+ DatasetField = 'IMPORTE_NETO'
+ TableField = 'IMPORTE_NETO'
end>
end>
Name = 'Informe_Capitulos_Detalles'
@@ -636,7 +648,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
item
Name = 'PROPIEDAD'
DataType = datString
- Size = 50
+ Size = 255
end
item
Name = 'CONCEPTO'
@@ -651,6 +663,18 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
Name = 'IMPORTE_UNIDAD'
DataType = datCurrency
end
+ item
+ Name = 'INCREMENTO'
+ DataType = datCurrency
+ end
+ item
+ Name = 'DECREMENTO'
+ DataType = datCurrency
+ end
+ item
+ Name = 'IMPORTE_NETO'
+ DataType = datCurrency
+ end
item
Name = 'DESCUENTO'
DataType = datCurrency
@@ -664,11 +688,11 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
DataType = datCurrency
end
item
- Name = 'VISIBLE'
+ Name = 'VISIBLE2'
DataType = datSmallInt
end
item
- Name = 'VISIBLE2'
+ Name = 'VISIBLE'
DataType = datSmallInt
end>
ReadOnly = True
@@ -884,7 +908,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
PrintOptions.Printer = 'Por defecto'
PrintOptions.PrintOnSheet = 0
ReportOptions.CreateDate = 39065.872423495400000000
- ReportOptions.LastChange = 41589.784037662040000000
+ ReportOptions.LastChange = 44396.827522094910000000
ScriptLanguage = 'PascalScript'
ShowProgress = False
StoreInDFM = False
@@ -1598,7 +1622,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
item
Name = 'PROPIEDAD'
DataType = datString
- Size = 50
+ Size = 255
end
item
Name = 'CONCEPTO'
@@ -1613,6 +1637,18 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
Name = 'IMPORTE_UNIDAD'
DataType = datCurrency
end
+ item
+ Name = 'INCREMENTO'
+ DataType = datCurrency
+ end
+ item
+ Name = 'DECREMENTO'
+ DataType = datCurrency
+ end
+ item
+ Name = 'IMPORTE_NETO'
+ DataType = datCurrency
+ end
item
Name = 'DESCUENTO'
DataType = datCurrency
@@ -1626,18 +1662,18 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
DataType = datCurrency
end
item
- Name = 'VISIBLE'
+ Name = 'VISIBLE2'
DataType = datSmallInt
end
item
- Name = 'VISIBLE2'
+ Name = 'VISIBLE'
DataType = datSmallInt
end>
Params = <
item
Name = 'ID_PRE_CON'
DataType = datInteger
- Value = ''
+ Value = '11'
end>
MasterMappingMode = mmWhere
MasterParamsMappings.Strings = (
diff --git a/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm b/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm
index 132e52d7..3f9698a5 100644
--- a/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm
@@ -733,13 +733,14 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
'IMPORTE_TOTAL,'#10' PRESUPUESTOS_CLIENTE_DETALLES.VISIBLE, PRESUP' +
'UESTOS_CLIENTE_DETALLES.VISIBLE2,'#10#10' PRESUPUESTOS_CLIENTE_DETA' +
'LLES.ID_ARTICULO, PRESUPUESTOS_CLIENTE_DETALLES.TIPO_ARTICULO,'#10' ' +
- ' PRESUPUESTOS_CLIENTE_DETALLES.DESCUENTO,'#10' PRESUPUESTOS_CLI' +
- 'ENTE_DETALLES.IMPORTE_PORTE, ARTICULOS.REFERENCIA,'#10' '#39#39' as REF' +
- 'ERENCIA_PROVEEDOR /*Es necesario para que no fallen los detalles' +
- ' porque los detalles son comunes para la rama de cliente y de pr' +
- 'oveedor*/'#10#10'FROM PRESUPUESTOS_CLIENTE_DETALLES'#10'LEFT JOIN ARTICULO' +
- 'S ON PRESUPUESTOS_CLIENTE_DETALLES.ID_ARTICULO = ARTICULOS.ID'#10'wh' +
- 'ere {where}'#10'ORDER BY POSICION;'#10#10#10
+ ' PRESUPUESTOS_CLIENTE_DETALLES.INCREMENTO,'#10' PRESUPUESTOS_CL' +
+ 'IENTE_DETALLES.DECREMENTO,'#10' PRESUPUESTOS_CLIENTE_DETALLES.DES' +
+ 'CUENTO,'#10' PRESUPUESTOS_CLIENTE_DETALLES.IMPORTE_PORTE, ARTICUL' +
+ 'OS.REFERENCIA,'#10' '#39#39' as REFERENCIA_PROVEEDOR /*Es necesario par' +
+ 'a que no fallen los detalles porque los detalles son comunes par' +
+ 'a la rama de cliente y de proveedor*/'#10#10'FROM PRESUPUESTOS_CLIENTE' +
+ '_DETALLES'#10'LEFT JOIN ARTICULOS ON PRESUPUESTOS_CLIENTE_DETALLES.I' +
+ 'D_ARTICULO = ARTICULOS.ID'#10'where {where}'#10'ORDER BY POSICION;'#10#10#10
StatementType = stSQL
ColumnMappings = <
item
@@ -811,6 +812,14 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
item
DatasetField = 'VISIBLE2'
TableField = 'VISIBLE2'
+ end
+ item
+ DatasetField = 'INCREMENTO'
+ TableField = 'INCREMENTO'
+ end
+ item
+ DatasetField = 'DECREMENTO'
+ TableField = 'DECREMENTO'
end>
end>
Name = 'PresupuestosCliente_Detalles'
@@ -837,7 +846,7 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
item
Name = 'PROPIEDAD'
DataType = datString
- Size = 2000
+ Size = 255
end
item
Name = 'CONCEPTO'
@@ -856,16 +865,16 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
end
- item
- Name = 'VISIBLE2'
- DataType = datSmallInt
- DisplayLabel = #191'Visible?'
- end
item
Name = 'VISIBLE'
DataType = datSmallInt
DisplayLabel = #191'Valorado?'
end
+ item
+ Name = 'VISIBLE2'
+ DataType = datSmallInt
+ DisplayLabel = #191'Visible?'
+ end
item
Name = 'ID_ARTICULO'
DataType = datInteger
@@ -875,6 +884,14 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
DataType = datString
Size = 2
end
+ item
+ Name = 'INCREMENTO'
+ DataType = datFloat
+ end
+ item
+ Name = 'DECREMENTO'
+ DataType = datFloat
+ end
item
Name = 'DESCUENTO'
DataType = datFloat
@@ -1079,6 +1096,11 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
DataType = datString
Size = 255
Value = ''
+ end
+ item
+ Name = 'ID_EMPRESA'
+ DataType = datInteger
+ Value = ''
end>
Statements = <
item
@@ -1094,17 +1116,17 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
'TO, IMPORTE_DESCUENTO, BASE_IMPONIBLE, ID_TIPO_IVA, IVA, IMPORTE' +
'_IVA,'#10' RE, IMPORTE_RE, RECARGO_EQUIVALENCIA, IMPORTE_TOTAL, ' +
'ID_FORMA_PAGO, ID_TIENDA, ID_VENDEDOR,'#10' ID_CONTRATO, NO_VALO' +
- 'RADO, TIPO_PRESUPUESTO, CALIDADES, REFERENCIA_CLIENTE)'#10' VALUES'#10 +
- ' (:ID,'#10' :FECHA_PRESUPUESTO, :FECHA_VIGENCIA, :FECHA_DECIS' +
- 'ION, :REFERENCIA,'#10' :SITUACION, :ID_CLIENTE, :ID_DIRECCION, :' +
- 'PERSONA_CONTACTO,'#10' :FORMA_PAGO, :PLAZO_ENTREGA, :OBSERVACION' +
- 'ES, :INCIDENCIAS,'#10' :INCIDENCIAS_ACTIVAS, CURRENT_TIMESTAMP, ' +
- ':USUARIO, :IMPORTE_NETO, :IMPORTE_PORTE,'#10' :DESCUENTO, :IMPOR' +
- 'TE_DESCUENTO, :BASE_IMPONIBLE, :ID_TIPO_IVA, :IVA, :IMPORTE_IVA,' +
- #10' :RE, :IMPORTE_RE, :RECARGO_EQUIVALENCIA, :IMPORTE_TOTAL, :' +
- 'ID_FORMA_PAGO, :ID_TIENDA, :ID_VENDEDOR,'#10' :ID_CONTRATO, :NO_' +
- 'VALORADO, :TIPO_PRESUPUESTO, :CALIDADES, :REFERENCIA_CLIENTE)'#10' ' +
- ' '#10#10#10#10#10
+ 'RADO, TIPO_PRESUPUESTO, CALIDADES, REFERENCIA_CLIENTE,'#10' ID_E' +
+ 'MPRESA)'#10' VALUES'#10' (:ID,'#10' :FECHA_PRESUPUESTO, :FECHA_VIGEN' +
+ 'CIA, :FECHA_DECISION, :REFERENCIA,'#10' :SITUACION, :ID_CLIENTE,' +
+ ' :ID_DIRECCION, :PERSONA_CONTACTO,'#10' :FORMA_PAGO, :PLAZO_ENTR' +
+ 'EGA, :OBSERVACIONES, :INCIDENCIAS,'#10' :INCIDENCIAS_ACTIVAS, CU' +
+ 'RRENT_TIMESTAMP, :USUARIO, :IMPORTE_NETO, :IMPORTE_PORTE,'#10' :' +
+ 'DESCUENTO, :IMPORTE_DESCUENTO, :BASE_IMPONIBLE, :ID_TIPO_IVA, :I' +
+ 'VA, :IMPORTE_IVA,'#10' :RE, :IMPORTE_RE, :RECARGO_EQUIVALENCIA, ' +
+ ':IMPORTE_TOTAL, :ID_FORMA_PAGO, :ID_TIENDA, :ID_VENDEDOR,'#10' :' +
+ 'ID_CONTRATO, :NO_VALORADO, :TIPO_PRESUPUESTO, :CALIDADES, :REFER' +
+ 'ENCIA_CLIENTE,'#10' :ID_EMPRESA)'#10' '#10#10#10#10#10
StatementType = stSQL
ColumnMappings = <>
end>
@@ -1313,6 +1335,11 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
Size = 255
Value = ''
end
+ item
+ Name = 'ID_EMPRESA'
+ DataType = datInteger
+ Value = ''
+ end
item
Name = 'OLD_ID'
Value = ''
@@ -1342,8 +1369,8 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
' ID_TIENDA = :ID_TIENDA,'#10' ID_VENDEDOR = :ID_VENDEDOR,'#10' ' +
'ID_CONTRATO = :ID_CONTRATO,'#10' NO_VALORADO = :NO_VALORADO,'#10' ' +
'TIPO_PRESUPUESTO = :TIPO_PRESUPUESTO,'#10' CALIDADES = :CALIDADES' +
- ','#10' REFERENCIA_CLIENTE = :REFERENCIA_CLIENTE'#10' WHERE'#10' (ID =' +
- ' :OLD_ID)'#10#10
+ ','#10' REFERENCIA_CLIENTE = :REFERENCIA_CLIENTE,'#10' ID_EMPRESA =' +
+ ' :ID_EMPRESA'#10' WHERE'#10' (ID = :OLD_ID)'#10#10
StatementType = stSQL
ColumnMappings = <>
end>
@@ -1421,6 +1448,16 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
Size = 2
Value = ''
end
+ item
+ Name = 'INCREMENTO'
+ DataType = datFloat
+ Value = ''
+ end
+ item
+ Name = 'DECREMENTO'
+ DataType = datFloat
+ Value = ''
+ end
item
Name = 'DESCUENTO'
DataType = datFloat
@@ -1440,11 +1477,12 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
'INSERT'#10' INTO PRESUPUESTOS_CLIENTE_DETALLES'#10' (ID, ID_PRESUPUE' +
'STO, POSICION, TIPO_DETALLE, PROPIEDAD, CONCEPTO, CANTIDAD,'#10' ' +
' IMPORTE_UNIDAD, IMPORTE_TOTAL, VISIBLE, VISIBLE2, ID_ARTICULO, ' +
- 'TIPO_ARTICULO,'#10' DESCUENTO, IMPORTE_PORTE, FECHA_ALTA)'#10' VALU' +
- 'ES'#10' (:ID, :ID_PRESUPUESTO, :POSICION, :TIPO_DETALLE, :PROPIED' +
- 'AD, :CONCEPTO,'#10' :CANTIDAD, :IMPORTE_UNIDAD, :IMPORTE_TOTAL, ' +
- ':VISIBLE, :VISIBLE2,'#10' :ID_ARTICULO, :TIPO_ARTICULO, :DESCUEN' +
- 'TO, :IMPORTE_PORTE, CURRENT_TIMESTAMP)'#10
+ 'TIPO_ARTICULO,'#10' INCREMENTO, DECREMENTO, DESCUENTO, IMPORTE_P' +
+ 'ORTE, FECHA_ALTA)'#10' VALUES'#10' (:ID, :ID_PRESUPUESTO, :POSICION,' +
+ ' :TIPO_DETALLE, :PROPIEDAD, :CONCEPTO,'#10' :CANTIDAD, :IMPORTE_' +
+ 'UNIDAD, :IMPORTE_TOTAL, :VISIBLE, :VISIBLE2,'#10' :ID_ARTICULO, ' +
+ ':TIPO_ARTICULO, :INCREMENTO, :DECREMENTO, :DESCUENTO, :IMPORTE_P' +
+ 'ORTE, CURRENT_TIMESTAMP)'#10
StatementType = stSQL
ColumnMappings = <>
end>
@@ -1474,8 +1512,7 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
Params = <
item
Name = 'ID'
- DataType = datAutoInc
- GeneratorName = 'GEN_PRESUPUESTOS_CLI_DETALLE_ID'
+ DataType = datInteger
Value = ''
end
item
@@ -1542,6 +1579,16 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
Size = 2
Value = ''
end
+ item
+ Name = 'INCREMENTO'
+ DataType = datFloat
+ Value = ''
+ end
+ item
+ Name = 'DECREMENTO'
+ DataType = datFloat
+ Value = ''
+ end
item
Name = 'DESCUENTO'
DataType = datFloat
@@ -1568,9 +1615,10 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente
'ONCEPTO = :CONCEPTO, '#10' CANTIDAD = :CANTIDAD, '#10' IMPORTE_UNI' +
'DAD = :IMPORTE_UNIDAD,'#10' IMPORTE_TOTAL = :IMPORTE_TOTAL, '#10' ' +
'VISIBLE = :VISIBLE, '#10' VISIBLE2 = :VISIBLE2,'#10' ID_ARTICULO =' +
- ' :ID_ARTICULO, '#10' TIPO_ARTICULO = :TIPO_ARTICULO,'#10' DESCUENT' +
- 'O = :DESCUENTO, '#10' IMPORTE_PORTE = :IMPORTE_PORTE,'#10' FECHA_M' +
- 'ODIFICACION = CURRENT_TIMESTAMP'#10' WHERE'#10' (ID = :OLD_ID)'#10
+ ' :ID_ARTICULO, '#10' TIPO_ARTICULO = :TIPO_ARTICULO,'#10' INCREMEN' +
+ 'TO = :INCREMENTO,'#10' DECREMENTO = :DECREMENTO,'#10' DESCUENTO = ' +
+ ':DESCUENTO, '#10' IMPORTE_PORTE = :IMPORTE_PORTE,'#10' FECHA_MODIF' +
+ 'ICACION = CURRENT_TIMESTAMP'#10' WHERE'#10' (ID = :OLD_ID)'#10
StatementType = stSQL
ColumnMappings = <>
end>
diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.dfm
index 9a98b7b7..3c996489 100644
--- a/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.dfm
@@ -48,19 +48,25 @@ inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente
VisibleForCustomization = False
Width = 54
end
- inherited cxGridViewDESCUENTO: TcxGridDBColumn [13]
- VisibleForCustomization = False
- Width = 31
+ inherited cxGridViewINCREMENTO: TcxGridDBColumn [13]
+ DataBinding.FieldName = 'INCREMENTO'
+ Visible = True
end
- inherited cxGridViewIMPORTENETO: TcxGridDBColumn [14]
- Visible = False
- VisibleForCustomization = False
+ inherited cxGridViewDECREMENTO: TcxGridDBColumn [14]
+ DataBinding.FieldName = 'DECREMENTO'
+ end
+ inherited cxGridViewIMPORTENETO: TcxGridDBColumn [15]
Width = 29
end
- inherited cxGridViewIMPORTEPORTE: TcxGridDBColumn [15]
+ inherited cxGridViewDESCUENTO: TcxGridDBColumn [16]
+ Width = 31
end
- inherited cxGridViewIMPORTETOTAL: TcxGridDBColumn [16]
- VisibleForCustomization = False
+ inherited cxGridViewIMP_UNIDAD_DTO: TcxGridDBColumn [17]
+ Properties.Alignment.Vert = taBottomJustify
+ end
+ inherited cxGridViewIMPORTEPORTE: TcxGridDBColumn [18]
+ end
+ inherited cxGridViewIMPORTETOTAL: TcxGridDBColumn [19]
Width = 46
end
end
diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm
index 5ef218f6..d7f27e25 100644
--- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm
@@ -130,6 +130,13 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente
BestFitMaxWidth = 65
Width = 65
end
+ object cxGridViewVENDEDOR: TcxGridDBColumn
+ Caption = 'Vendedor'
+ DataBinding.FieldName = 'VENDEDOR'
+ PropertiesClassName = 'TcxTextEditProperties'
+ Properties.Alignment.Horz = taRightJustify
+ HeaderAlignmentHorz = taRightJustify
+ end
end
inherited cxGridLevel: TcxGridLevel
Caption = 'Todos'
@@ -153,15 +160,27 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente
Width = 903
ExplicitWidth = 903
inherited txtFiltroTodo: TcxTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 806
Width = 806
end
inherited edtFechaIniFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 285
Width = 285
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 389
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 389
ExplicitWidth = 504
Width = 504
diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas
index fbe48bc3..5e6a77bd 100644
--- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas
+++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas
@@ -48,6 +48,7 @@ type
cxGridViewTIPO: TcxGridDBColumn;
cxGridViewColumn1: TcxGridDBColumn;
cxGridViewLISTA_NOMBRES: TcxGridDBColumn;
+ cxGridViewVENDEDOR: TcxGridDBColumn;
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel:
TcxGridLevel);
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
diff --git a/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/uGenerarFacturasCliAlbCliUtils.pas b/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/uGenerarFacturasCliAlbCliUtils.pas
index 49a0495b..cec2374d 100644
--- a/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/uGenerarFacturasCliAlbCliUtils.pas
+++ b/Source/Modulos/Relaciones/Albaranes de cliente - Facturas de cliente/uGenerarFacturasCliAlbCliUtils.pas
@@ -3,7 +3,7 @@ unit uGenerarFacturasCliAlbCliUtils;
interface
uses
- Windows, SysUtils, Classes, uBizAlbaranesCliente, pngimage, JSDialog;
+ Windows, SysUtils, Classes, uBizAlbaranesCliente, uBizFacturasCliente, pngimage, JSDialog;
type
TdmGenerarFacturasCli = class(TDataModule)
@@ -11,8 +11,8 @@ type
end;
function GenerarFacturaCli(const IDAlbaran : Integer) : Boolean; overload;
- function GenerarFacturaCli(AAlbaran : IBizAlbaranCliente) : Boolean; overload;
- function GenerarFacturaCli : Boolean; overload;
+ function GenerarFacturaCli(AAlbaran : IBizAlbaranCliente; Const ATipo: String = CTE_TIPO_FACTURA) : Boolean; overload;
+ function GenerarFacturaCli (Const ATipo: String = CTE_TIPO_FACTURA): Boolean; overload;
implementation
@@ -20,7 +20,6 @@ implementation
uses
uDialogUtils,
- uBizFacturasCliente,
uBizDetallesFacturaCliente,
uAlbaranesClienteController, uDetallesFacturaClienteController,
uFacturasClienteController;
@@ -177,7 +176,7 @@ begin
end;
end;
-function GenerarFacturaCli(AAlbaran : IBizAlbaranCliente) : Boolean; overload;
+function GenerarFacturaCli(AAlbaran : IBizAlbaranCliente; Const ATipo: String = CTE_TIPO_FACTURA) : Boolean; overload;
var
AFacturasNuevas : IBizFacturaCliente;
i: Integer;
@@ -188,21 +187,22 @@ begin
Inicializar;
if not Assigned(AAlbaran) then
- raise Exception.Create('Albarán de proveedor no asignado (GenerarFacturaCli)');
+ raise Exception.Create('Albarán/es no asignado (GenerarFacturaCli)');
if not AAlbaran.DataTable.Active then
AAlbaran.DataTable.Active := True;
try
AFacturasNuevas := AFacturasClienteController.Nuevo(False);
- if AFacturasClienteController.Anadir(AFacturasNuevas, AAlbaran) then
+ if AFacturasClienteController.Anadir(AFacturasNuevas, AAlbaran, ATipo) then
begin
if AFacturasNuevas.DataTable.RecordCount = 1 then
begin
- if AFacturasNuevas.TIPO = CTE_TIPO_FACTURA then
- ShowInfoMessage('La factura se ha dado de alta con el código ' + AFacturasNuevas.REFERENCIA)
- else
- ShowInfoMessage('El abono se ha dado de alta con el código ' + AFacturasNuevas.REFERENCIA);
+ if (AFacturasNuevas.TIPO = CTE_TIPO_FACTURA)
+ then ShowInfoMessage('La factura se ha dado de alta con el código ' + AFacturasNuevas.REFERENCIA)
+ else if (AFacturasNuevas.TIPO = CTE_TIPO_ABONO)
+ then ShowInfoMessage('El abono se ha dado de alta con el código ' + AFacturasNuevas.REFERENCIA)
+ else ShowInfoMessage('La proforma se ha dado de alta con el código ' + AFacturasNuevas.REFERENCIA);
end
else begin
with dmGenerarFacturasCli.JsListaFacturasGeneradas.Content do
@@ -228,7 +228,7 @@ begin
end;
end;
-function GenerarFacturaCli : Boolean; overload;
+function GenerarFacturaCli (Const ATipo: String = CTE_TIPO_FACTURA): Boolean; overload;
var
AAlbaranes : IBizAlbaranCliente;
begin
@@ -242,7 +242,7 @@ begin
+ #10#13 + 'Si elige albaranes de clientes diferentes se dará de alta una factura por cada uno de ellos.' , True);
if Assigned(AAlbaranes) then
- Result := GenerarFacturaCli(AAlbaranes);
+ Result := GenerarFacturaCli(AAlbaranes, ATipo);
if Assigned(AAlbaranesClienteController) then
Finalizar;
diff --git a/Source/Modulos/Relaciones/Contratos de cliente - Albaranes de cliente/uGenerarAlbaranesCliUtils.pas b/Source/Modulos/Relaciones/Contratos de cliente - Albaranes de cliente/uGenerarAlbaranesCliUtils.pas
index eda34c36..a0d5471d 100644
--- a/Source/Modulos/Relaciones/Contratos de cliente - Albaranes de cliente/uGenerarAlbaranesCliUtils.pas
+++ b/Source/Modulos/Relaciones/Contratos de cliente - Albaranes de cliente/uGenerarAlbaranesCliUtils.pas
@@ -24,7 +24,7 @@ uses
uDialogUtils, uBizDetallesContratoCliente, uBizDetallesAlbaranCliente,
uContratosClienteController, uAlbaranesClienteController, uClientesController,
uDetallesAlbaranClienteController, uControllerDetallesBase,
- uBizContactos, schAlbaranesClienteClient_Intf,
+ uBizContactos, schAlbaranesClienteClient_Intf, uCalculosUtils,
schContratosClienteClient_Intf, uBizDetallesPresupuestoCliente;
var
@@ -51,6 +51,7 @@ begin
AAlbaranesClienteController.RecuperarCliente(AAlbaran);
AAlbaran.Cliente.Open;
+ AAlbaran.REFERENCIA_CLIENTE := AContrato.REFERENCIA_CLIENTE;
// AAlbaran.NIF_CIF := AContrato.NIF_CIF;
AAlbaran.NOMBRE := AContrato.NOMBRE;
AAlbaran.CALLE := AContrato.CALLE;
@@ -133,7 +134,7 @@ begin
if not AArticulos.CANTIDADIsNull then
ADetalles.CANTIDAD := AArticulos.CANTIDAD;
if not AArticulos.IMPORTE_UNIDADIsNull then
- ADetalles.IMPORTE_UNIDAD := AArticulos.IMPORTE_UNIDAD;
+ ADetalles.IMPORTE_UNIDAD := CalcularImporteNeto(AArticulos.IMPORTE_UNIDAD, AArticulos.INCREMENTO, AArticulos.DECREMENTO);
if not AArticulos.IMPORTE_TOTALIsNull then
ADetalles.IMPORTE_TOTAL := AArticulos.IMPORTE_TOTAL;
if not AArticulos.DESCUENTOIsNull then
diff --git a/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas b/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas
index c324a9a0..3fc789c7 100644
--- a/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas
+++ b/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas
@@ -23,7 +23,7 @@ uses
uDialogUtils, uBizDetallesContratoCliente, uBizDetallesFacturaCliente,
uContratosClienteController, uFacturasClienteController, uClientesController,
uDetallesFacturaClienteController, uControllerDetallesBase,
- uBizContactos, schFacturasClienteClient_Intf,
+ uBizContactos, schFacturasClienteClient_Intf, uCalculosUtils,
schContratosClienteClient_Intf, uBizDetallesPresupuestoCliente;
var
@@ -121,7 +121,7 @@ begin
if not AArticulos.CANTIDADIsNull then
ADetalles.CANTIDAD := AArticulos.CANTIDAD;
if not AArticulos.IMPORTE_UNIDADIsNull then
- ADetalles.IMPORTE_UNIDAD := AArticulos.IMPORTE_UNIDAD;
+ ADetalles.IMPORTE_UNIDAD := CalcularImporteNeto(AArticulos.IMPORTE_UNIDAD, AArticulos.INCREMENTO, AArticulos.DECREMENTO);
if not AArticulos.IMPORTE_TOTALIsNull then
ADetalles.IMPORTE_TOTAL := AArticulos.IMPORTE_TOTAL;
if not AArticulos.DESCUENTOIsNull then
diff --git a/Source/Modulos/Relaciones/Contratos de cliente - Pedidos de proveedor/uGenerarPedidosProvUtils.pas b/Source/Modulos/Relaciones/Contratos de cliente - Pedidos de proveedor/uGenerarPedidosProvUtils.pas
index b5188585..f0f83f9b 100644
--- a/Source/Modulos/Relaciones/Contratos de cliente - Pedidos de proveedor/uGenerarPedidosProvUtils.pas
+++ b/Source/Modulos/Relaciones/Contratos de cliente - Pedidos de proveedor/uGenerarPedidosProvUtils.pas
@@ -52,6 +52,9 @@ begin
// APedido.Cliente.Open;
// APedido.NIF_CIF := AContrato.NIF_CIF;
+//Se solicita que no se copie dirección del cliente en el pedido, por defecto será el almacen de acana
+ APedido.ID_ALMACEN := 1;
+{
APedido.ID_ALMACEN := 0;
APedido.ID_DIRECCION_CLIENTE := 0;
@@ -63,7 +66,7 @@ begin
APedido.PERSONA_CONTACTO := AContrato.PERSONA_CONTACTO;
APedido.TELEFONO := AContrato.TELEFONO;
APedido.DESCRIPCION_GENERAL := AContrato.REFERENCIA_CLIENTE;
-
+}
// APedido.DataTable.FieldByName(fld_FacturasClientePLAZO_ENTREGA).AsVariant := AContrato.DataTable.FieldByName(fld_ContratosClientePLAZO_ENTREGA).AsVariant;
// APedido.DataTable.FieldByName(fld_AlbaranesClienteOBSERVACIONES).AsVariant := AContrato.DataTable.FieldByName(fld_ContratosClienteOBSERVACIONES).AsVariant;
diff --git a/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/PedProv_AlbProv_relation.dpk b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/PedProv_AlbProv_relation.dpk
index b6a71642..2c76b903 100644
--- a/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/PedProv_AlbProv_relation.dpk
+++ b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/PedProv_AlbProv_relation.dpk
@@ -25,26 +25,32 @@ package PedProv_AlbProv_relation;
{$IMPLICITBUILD OFF}
requires
- rtl,
- Base,
- ControllerBase,
Contactos_model,
Contactos_controller,
- PNG_D10,
- vcl,
- JSDialog100,
- vclx,
- vclactnband,
- xmlrtl,
- designide,
PedidosProveedor_model,
AlbaranesProveedor_controller,
AlbaranesProveedor_model,
PedidosProveedor_controller,
Inventario_controller,
- Inventario_model;
+ Inventario_model,
+ Base,
+ rtl,
+ vcl,
+ vcljpg,
+ cxLibraryD11,
+ dxThemeD11,
+ dxGDIPlusD11,
+ dxCoreD11,
+ vclx,
+ cxEditorsD11,
+ cxDataD11,
+ dbrtl,
+ vcldb,
+ Almacenes_model,
+ Almacenes_controller;
contains
- uGenerarAlbaranesProvUtils in 'uGenerarAlbaranesProvUtils.pas';
+ uGenerarAlbaranesProvUtils in 'uGenerarAlbaranesProvUtils.pas',
+ uDialogRecepcionPedido in 'uDialogRecepcionPedido.pas';
end.
diff --git a/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/PedProv_AlbProv_relation.dproj b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/PedProv_AlbProv_relation.dproj
index 170ff2dc..9fe2a575 100644
--- a/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/PedProv_AlbProv_relation.dproj
+++ b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/PedProv_AlbProv_relation.dproj
@@ -1,4 +1,5 @@
-
+
+
{69494a8c-0a35-41ea-b8ec-ea790bfc0662}
PedProv_AlbProv_relation.dpk
@@ -36,50 +37,552 @@
..\..\..\Lib;..\..\Lib
..\..\..\Lib;..\..\Lib
..\..\..\Lib;..\..\Lib
- DEBUG
Delphi.Personality
Package
-
- False
- True
- False
-
-
- False
- False
- False
-
-
- True
- False
- 1
- 0
- 0
- 0
- False
- False
- False
- False
- False
- 3082
- 1252
-
-
-
-
- 1.0.0.0
-
-
-
-
-
- 1.0.0.0
-
-
-
+FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -188,36 +691,521 @@
SMExport suite: data export from dataset. Written by Mike Shkolnik/Scalabium, 1998-2004.
Intraweb 8.0 Design Package for Borland Development Studio 2006
Internet Explorer Components
-
-
- PedProv_AlbProv_relation.dpk
-
-
+ PedProv_AlbProv_relation.dpk
-
+
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
\ No newline at end of file
+
+
diff --git a/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/PedProv_AlbProv_relation.res b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/PedProv_AlbProv_relation.res
new file mode 100644
index 00000000..86c94e6a
Binary files /dev/null and b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/PedProv_AlbProv_relation.res differ
diff --git a/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uDialogRecepcionPedido.dfm b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uDialogRecepcionPedido.dfm
new file mode 100644
index 00000000..13674dd8
--- /dev/null
+++ b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uDialogRecepcionPedido.dfm
@@ -0,0 +1,133 @@
+inherited fDialogRecepcionPedido: TfDialogRecepcionPedido
+ Caption = 'Recepci'#243'n de pedido'
+ ClientHeight = 262
+ ClientWidth = 423
+ OnCloseQuery = FormCloseQuery
+ OnDestroy = FormDestroy
+ ExplicitWidth = 429
+ ExplicitHeight = 294
+ PixelsPerInch = 96
+ TextHeight = 13
+ inherited Bevel2: TBevel
+ Width = 423
+ ExplicitWidth = 393
+ end
+ inherited Bevel3: TBevel
+ Top = 218
+ Width = 423
+ ExplicitTop = 195
+ ExplicitWidth = 393
+ end
+ inherited pnlBotones: TPanel
+ Top = 220
+ Width = 423
+ ExplicitTop = 220
+ ExplicitWidth = 423
+ inherited btnAceptar: TButton
+ Left = 236
+ ExplicitLeft = 236
+ end
+ inherited btnCancelar: TButton
+ Left = 315
+ ExplicitLeft = 315
+ end
+ end
+ inherited pnlHeader: TPanel
+ Width = 423
+ ExplicitWidth = 423
+ inherited lblTitle: TLabel
+ Width = 373
+ Caption = 'Indique las siguiente informaci'#243'n del albar'#225'n recibido'
+ ExplicitWidth = 301
+ end
+ inherited lblComments: TLabel
+ Width = 348
+ Height = 27
+ Visible = False
+ end
+ end
+ inherited pnlCuerpo: TPanel
+ Width = 423
+ Height = 152
+ ExplicitWidth = 423
+ ExplicitHeight = 152
+ object Label2: TLabel
+ Left = 25
+ Top = 23
+ Width = 97
+ Height = 13
+ Caption = 'Fecha de recepci'#243'n:'
+ end
+ object Label3: TLabel
+ Left = 25
+ Top = 63
+ Width = 44
+ Height = 13
+ Caption = 'Almac'#233'n:'
+ end
+ object Label4: TLabel
+ Left = 243
+ Top = 23
+ Width = 88
+ Height = 13
+ Caption = 'N'#250'mero de bultos:'
+ end
+ object Label1: TLabel
+ Left = 25
+ Top = 103
+ Width = 49
+ Height = 13
+ Caption = 'Ubicaci'#243'n:'
+ end
+ object eNumBultos: TcxSpinEdit
+ Left = 338
+ Top = 20
+ Properties.LargeIncrement = 1.000000000000000000
+ Properties.MaxValue = 8.000000000000000000
+ Properties.MinValue = 1.000000000000000000
+ TabOrder = 0
+ Value = 1
+ Width = 51
+ end
+ object eFechaRecepcion: TcxDateEdit
+ Left = 128
+ Top = 20
+ TabOrder = 1
+ Width = 90
+ end
+ object cbubicacion: TcxComboBox
+ Left = 128
+ Top = 98
+ Properties.OnInitPopup = cbubicacionPropertiesInitPopup
+ Properties.OnValidate = cbubicacionPropertiesValidate
+ TabOrder = 2
+ Width = 261
+ end
+ object cbAlmacenes: TcxLookupComboBox
+ Left = 128
+ Top = 59
+ Properties.KeyFieldNames = 'ID'
+ Properties.ListColumns = <
+ item
+ FieldName = 'NOMBRE'
+ end>
+ Properties.ListOptions.ShowHeader = False
+ Properties.ListSource = dsAlmacenes
+ TabOrder = 3
+ Width = 261
+ end
+ end
+ inherited ActionListDialog: TActionList
+ Top = 48
+ inherited actAceptar: TAction
+ OnExecute = actAceptarExecute
+ end
+ inherited actCancelar: TAction
+ OnExecute = actCancelarExecute
+ end
+ end
+ object dsAlmacenes: TDADataSource
+ Left = 80
+ Top = 120
+ end
+end
diff --git a/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uDialogRecepcionPedido.pas b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uDialogRecepcionPedido.pas
new file mode 100644
index 00000000..652fcc9a
--- /dev/null
+++ b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uDialogRecepcionPedido.pas
@@ -0,0 +1,177 @@
+unit uDialogRecepcionPedido;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uDialogBase, ActnList, StdCtrls, ExtCtrls, cxControls, cxContainer,
+ cxEdit, cxTextEdit, cxMaskEdit, cxSpinEdit, jpeg, cxGraphics, cxDropDownEdit,
+ cxCalendar, DateUtils, uBizUbicacionesAlmacen, uBizAlmacenes, uUbicacionesAlmacenController,
+ uAlmacenesController, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, DB,
+ uDAInterfaces, uDADataTable;
+
+type
+ TfDialogRecepcionPedido = class(TfDialogBase)
+ eNumBultos: TcxSpinEdit;
+ Label2: TLabel;
+ Label3: TLabel;
+ Label4: TLabel;
+ eFechaRecepcion: TcxDateEdit;
+ Label1: TLabel;
+ cbubicacion: TcxComboBox;
+ cbAlmacenes: TcxLookupComboBox;
+ dsAlmacenes: TDADataSource;
+ procedure cbubicacionPropertiesInitPopup(Sender: TObject);
+ procedure cbubicacionPropertiesValidate(Sender: TObject;
+ var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
+ procedure FormDestroy(Sender: TObject);
+ procedure actAceptarExecute(Sender: TObject);
+ procedure actCancelarExecute(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
+
+ private
+ FAlmacenes: IBizAlmacen;
+ FUbicacionesController: IUbicacionesAlmacenController;
+ FAlmacenesController: IAlmacenesController;
+
+ public
+ FNumPedidos: Integer;
+
+ end;
+
+ function ElegirOpcionesRecepcionPedido(const NumeroPedidos: Integer; var AFechaRecepcion: TDateTime; var ABultos: Integer; var AUbicacion : String; var AAlmacen: Variant): Boolean;
+
+implementation
+{$R *.dfm}
+uses uDialogUtils;
+
+function ElegirOpcionesRecepcionPedido(const NumeroPedidos: Integer; var AFechaRecepcion: TDateTime; var ABultos: Integer; var AUbicacion : String; var AAlmacen: Variant): Boolean;
+var
+ AEditor : TfDialogRecepcionPedido;
+begin
+ AEditor := TfDialogRecepcionPedido.Create(NIL);
+ try
+ AEditor.FNumPedidos := NumeroPedidos;
+ AEditor.eFechaRecepcion.Date := DateOf(Date);
+ AEditor.cbAlmacenes.EditValue := AAlmacen;
+ AEditor.cbubicacion.EditValue := AUbicacion;
+
+ Result := (AEditor.ShowModal = mrOk);
+ if Result then
+ begin
+ AFechaRecepcion := AEditor.eFechaRecepcion.Date;
+ ABultos := AEditor.eNumBultos.Value;
+ AUbicacion := AEditor.cbubicacion.EditValue;
+ AAlmacen := AEditor.cbAlmacenes.EditValue;
+ end;
+ finally
+ AEditor.Release;
+ end;
+end;
+
+procedure TfDialogRecepcionPedido.actAceptarExecute(Sender: TObject);
+begin
+ inherited;
+ ModalResult := mrOk
+end;
+
+procedure TfDialogRecepcionPedido.actCancelarExecute(Sender: TObject);
+begin
+ inherited;
+ ModalResult := mrCancel;
+end;
+
+procedure TfDialogRecepcionPedido.cbubicacionPropertiesInitPopup(Sender: TObject);
+begin
+ inherited;
+ with cbubicacion.Properties.Items do
+ begin
+ BeginUpdate;
+ try
+ Clear;
+ AddStrings(FUbicacionesController.DarListaUbicacionesAlmacen);
+ finally
+ EndUpdate;
+ end;
+ end;
+end;
+
+procedure TfDialogRecepcionPedido.cbubicacionPropertiesValidate(Sender: TObject;
+ var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
+var
+ AUbicacion : IBizUbicacionAlmacen;
+begin
+ inherited;
+ with (Sender as TcxComboBox) do
+ begin
+ if (Length(DisplayValue) > 0) then //and (DisplayValue <> (Contacto as IBizCliente).PROCEDENCIA_CLIENTE) then
+ if Properties.LookupItems.IndexOf(DisplayValue) < 0 then
+ begin
+ Properties.LookupItems.BeginUpdate;
+ AUbicacion := FUbicacionesController.BuscarTodos;
+ AUbicacion.DataTable.Active := True;
+ try
+ FUbicacionesController.Anadir(AUbicacion);
+ AUbicacion.DESCRIPCION := DisplayValue;
+ FUbicacionesController.Guardar(AUbicacion);
+ Properties.LookupItems.Add(DisplayValue);
+ finally
+ Properties.LookupItems.EndUpdate;
+ AUbicacion := NIL;
+ end;
+ end;
+ end;
+end;
+
+procedure TfDialogRecepcionPedido.FormCloseQuery(Sender: TObject;
+ var CanClose: Boolean);
+begin
+ inherited;
+
+
+
+ if (ModalResult = mrOk) then
+ begin
+
+ if (cbAlmacenes.EditValue = 0) then
+ if (FNumPedidos = 1) then
+ begin
+ if (ShowConfirmMessage('Dirección de entrega', 'Si no elige almacén de entrega se supondrá que la entrega se realiza en la dirección establecida en el pedido seleccionado, ¿Desea continuar?') = IDNO) then
+ begin
+ CanClose := False;
+ cbAlmacenes.SetFocus;
+ end;
+ end
+ else begin
+ ShowErrorMessage('Dirección de entrega', 'Debe elegir un almacen de destino para los pedidos seleccionados.');
+ CanClose := False;
+ cbAlmacenes.SetFocus;
+ end;
+
+ end;
+
+
+end;
+
+procedure TfDialogRecepcionPedido.FormDestroy(Sender: TObject);
+begin
+ FAlmacenes := Nil;
+ FUbicacionesController := Nil;
+ FAlmacenesController := Nil;
+ inherited;
+end;
+
+procedure TfDialogRecepcionPedido.FormShow(Sender: TObject);
+begin
+ inherited;
+ FUbicacionesController := TUbicacionesAlmacenController.Create;
+ FAlmacenesController := TAlmacenesController.Create;
+
+ FAlmacenes := FAlmacenesController.BuscarTodos;
+ dsAlmacenes.DataTable := FAlmacenes.DataTable;
+ if not FAlmacenes.DataTable.Active then
+ FAlmacenes.DataTable.Active := True;
+end;
+
+end.
diff --git a/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uGenerarAlbaranesProvUtils.dfm b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uGenerarAlbaranesProvUtils.dfm
index fcd1cccd..6d1e19e8 100644
--- a/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uGenerarAlbaranesProvUtils.dfm
+++ b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uGenerarAlbaranesProvUtils.dfm
@@ -32,7 +32,7 @@ object dmGenerarAlbaranesProv: TdmGenerarAlbaranesProv
FD84C20B8417C3AA789405239826E0CBCE4F98979E10344C33B0BE630473D312
82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA
1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082}
- Instruction.Text = 'Se ha generado el albar'#195#161'n...'
+ Instruction.Text = 'Se han generado los albaranes'
Instruction.Glyph.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00
00001C0806000000720DDF940000000970485973000017120000171201679FD2
@@ -68,6 +68,12 @@ object dmGenerarAlbaranesProv: TdmGenerarAlbaranesProv
Caption = 'Continuar'
Value = 200
Cancel = True
+ end
+ item
+ Caption = 'Ver el albar'#225'n'
+ Value = 100
+ Info.Strings = (
+ 'Mostrar el albar'#225'n que se ha generado')
end>
ButtonBar.Buttons = []
ButtonBar.Cancel = cbOK
diff --git a/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uGenerarAlbaranesProvUtils.pas b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uGenerarAlbaranesProvUtils.pas
index c6f1d2ef..9090a51b 100644
--- a/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uGenerarAlbaranesProvUtils.pas
+++ b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uGenerarAlbaranesProvUtils.pas
@@ -12,6 +12,7 @@ type
function GenerarAlbaranProv(const IDPedido : Integer) : Boolean; overload;
function GenerarAlbaranProv(APedido : IBizPedidoProveedor) : Boolean; overload;
+ function GenerarAlbaranesProv(APedidos : IBizPedidoProveedor) : Boolean; overload;
function GenerarAlbaranProv : Boolean; overload;
function RecibirPedidoProv(APedido: IBizPedidoProveedor): Boolean; overload;
function RecibirPedidoProv: Boolean; overload;
@@ -26,16 +27,16 @@ uses
uAlbaranesProveedorController, uProveedoresController,
uDetallesAlbaranProveedorController, uControllerDetallesBase,
uBizAlbaranesProveedor, uBizContactos, schPedidosProveedorClient_Intf,
- schAlbaranesProveedorClient_Intf, uInventarioController, uBizInventario;
+ schAlbaranesProveedorClient_Intf, uBizInventario, uDialogRecepcionPedido;
var
- dmGenerarAlbaranesCli: TdmGenerarAlbaranesProv;
+ dmGenerarAlbaranesProv: TdmGenerarAlbaranesProv;
APedidosProveedorController : IPedidosProveedorController;
ADetallesPedidosProveedorController : IDetallesPedidoProveedorController;
AAlbaranesProveedorController : IAlbaranesProveedorController;
ADetallesAlbaranesController : IDetallesAlbaranProveedorController;
AProveedoresController : IProveedoresController;
- AInventarioController : IInventarioController;
+// AInventarioController : IInventarioController;
{ Métodos auxiliares }
procedure CopiarPedidoAAlbaran(APedido: IBizPedidoProveedor;
@@ -71,7 +72,7 @@ begin
AAlbaran.ID_FORMA_PAGO := APedido.ID_FORMA_PAGO;
end;
-procedure CopiarArticulosPendAAlbaran(
+{procedure CopiarArticulosPendAAlbaran(
APedido: IBizPedidoProveedor;
AAlbaran: IBizAlbaranProveedor;
AArticulosPendientes: IBizDetallesPedidoProveedorPend);
@@ -129,28 +130,29 @@ begin
ADetallesController.EndUpdate(ADetalles);
ADetallesController := NIL;
end;
-end;
+end;}
+
procedure Inicializar;
begin
- dmGenerarAlbaranesCli := TdmGenerarAlbaranesProv.Create(nil);
+ dmGenerarAlbaranesProv := TdmGenerarAlbaranesProv.Create(nil);
APedidosProveedorController := TPedidosProveedorController.Create;
ADetallesPedidosProveedorController := TDetallesPedidoProveedorController.Create;
AAlbaranesProveedorController := TAlbaranesProveedorController.Create;
ADetallesAlbaranesController := TDetallesAlbaranProveedorController.Create;
AProveedoresController := TProveedoresController.Create;
- AInventarioController := TInventarioController.Create;
+// AInventarioController := TInventarioController.Create;
end;
procedure Finalizar;
begin
- FreeAndNIL(dmGenerarAlbaranesCli);
+ FreeAndNIL(dmGenerarAlbaranesProv);
APedidosProveedorController := nil;
ADetallesPedidosProveedorController := nil;
AAlbaranesProveedorController := nil;
ADetallesAlbaranesController := nil;
AProveedoresController := nil;
- AInventarioController := nil;
+// AInventarioController := nil;
end;
@@ -163,7 +165,7 @@ begin
Inicializar;
APedido := APedidosProveedorController.Buscar(IDPedido);
- Result := GenerarAlbaranProv(APedido);
+ Result := GenerarAlbaranesProv(APedido);
if Assigned(APedidosProveedorController) then
Finalizar;
@@ -176,13 +178,13 @@ function GenerarAlbaranProv(APedido : IBizPedidoProveedor) : Boolean; overload;
var
ARespuesta : Integer;
AAlbaran : IBizAlbaranProveedor;
- AArticulosPendientes: IBizDetallesPedidoProveedorPend;
+// AArticulosPendientes: IBizDetallesPedidoProveedorPend;
begin
Result := False;
if not Assigned(APedido) then
- raise Exception.Create('Pedido de proveedor no asignado (GenerarAlbaranProv)');
+ raise Exception.Create('Pedido/s de proveedor no asignado/s (GenerarAlbaranProv)');
if not APedido.DataTable.Active then
APedido.DataTable.Active := True;
@@ -191,33 +193,33 @@ begin
if not Assigned(APedidosProveedorController) then
Inicializar;
- AArticulosPendientes := ADetallesPedidosProveedorController.ArticulosPendientes(APedido.ID);
- if not Assigned(AArticulosPendientes) then
- raise Exception.Create('Error al recuperar los artículos sin albarán del pedido (GenerarAlbaranProv)');
+// AArticulosPendientes := ADetallesPedidosProveedorController.ArticulosPendientes(APedido.ID);
+// if not Assigned(AArticulosPendientes) then
+// raise Exception.Create('Error al recuperar los artículos sin albarán del pedido (GenerarAlbaranProv)');
- AArticulosPendientes.DataTable.Active := True;
- if AArticulosPendientes.DataTable.RecordCount = 0 then
- begin
- ARespuesta := ShowConfirmMessage('Generar albarán a partir del pedido', 'Todos los artículos de este pedido ya figuran en uno o más albaranes de proveedor.' +
- #10#13 + '¿Desea generar de todas formas otro albarán para este pedido?');
- if (ARespuesta = IDNO) then
- Exit; // Aunque es un exit, se ejecuta la parte del finally antes de salir.
- end;
+// AArticulosPendientes.DataTable.Active := True;
+// if AArticulosPendientes.DataTable.RecordCount = 0 then
+// begin
+// ARespuesta := ShowConfirmMessage('Generar albarán a partir del pedido', 'Todos los artículos de este pedido ya figuran en uno o más albaranes de proveedor.' +
+// #10#13 + '¿Desea generar de todas formas otro albarán para este pedido?');
+// if (ARespuesta = IDNO) then
+// Exit; // Aunque es un exit, se ejecuta la parte del finally antes de salir.
+// end;
AAlbaran := AAlbaranesProveedorController.Nuevo;
CopiarPedidoAAlbaran(APedido, AAlbaran);
- CopiarArticulosPendAAlbaran(APedido, AAlbaran, AArticulosPendientes);
+// CopiarArticulosPendAAlbaran(APedido, AAlbaran, AArticulosPendientes);
//Sustituir por if de guardar
if AAlbaranesProveedorController.Guardar(AAlbaran) then
begin
// ShowWarningMessage('Todos los artículos que contiene el pedido no están en el catálogo, y por lo tanto no se puede generar el albarán');
- with dmGenerarAlbaranesCli.JsListaAlbaranesGenerados do
+ with dmGenerarAlbaranesProv.JsListaAlbaranesGenerados do
begin
Instruction.Text := 'Se ha generado el albarán';
Content.Clear;
- Content.Add(Format('Se ha generado correctamente el albarán %s a partir del pedido de cliente' + #10#13, [AAlbaran.REFERENCIA]));
+ Content.Add(Format('Se ha generado correctamente el albarán %s a partir del pedido de proveedor' + #10#13, [AAlbaran.REFERENCIA]));
Execute;
ARespuesta := CustomButtonResult;
@@ -233,7 +235,7 @@ begin
Result := True;
finally
- AArticulosPendientes := NIL;
+// AArticulosPendientes := NIL;
if Assigned(APedidosProveedorController) then
Finalizar;
end;
@@ -241,18 +243,20 @@ end;
function GenerarAlbaranProv : Boolean; overload;
var
- APedido : IBizPedidoProveedor;
+ APedidos : IBizPedidoProveedor;
+
begin
Result := False;
try
if not Assigned(APedidosProveedorController) then
Inicializar;
- APedido := APedidosProveedorController.ElegirPedidos(APedidosProveedorController.BuscarPendientesRecepcion,
+ APedidos := APedidosProveedorController.ElegirPedidos(APedidosProveedorController.BuscarPendientesRecepcion,
'Elija el pedido de proveedor que desea utilizar para dar de alta el albarán correspondiente.'
- , False);
- if Assigned(APedido) then
- Result := GenerarAlbaranProv(APedido);
+ , True);
+
+ if Assigned(APedidos) then
+ Result := GenerarAlbaranesProv(APedidos);
finally
if Assigned(APedidosProveedorController) then
@@ -265,11 +269,12 @@ var
bGenerarAlbaran : Boolean;
ARespuesta : Integer;
- AArticulosPendientes: IBizDetallesPedidoProveedorPend;
+// AArticulosPendientes: IBizDetallesPedidoProveedorPend;
AAlbaran : IBizAlbaranProveedor;
AInventarioRecibido: IBizInventario;
begin
+{
Result := False;
bGenerarAlbaran := False;
AInventarioRecibido := NIL;
@@ -326,6 +331,7 @@ begin
Finalizar;
// actRefrescar.Execute;
+}
end;
function RecibirPedidoProv: Boolean; overload;
@@ -349,4 +355,80 @@ begin
end;
end;
+function GenerarAlbaranesProv(APedidos : IBizPedidoProveedor) : Boolean; overload;
+var
+ AAlbaranesNuevos : IBizAlbaranProveedor;
+ AFechaRecepcion: TDateTime;
+ ANumBultos: Integer;
+ AUbicacion: String;
+ AAlmacen: Variant;
+ i: Integer;
+ ARespuesta : Integer;
+
+begin
+ Result := False;
+
+ if not Assigned(APedidosProveedorController) then
+ Inicializar;
+
+ if not Assigned(APedidos) then
+ raise Exception.Create('Pedidos de proveedor no asignado (GenerarAlbaranesProv)');
+
+ if not APedidos.DataTable.Active then
+ APedidos.DataTable.Active := True;
+
+ AAlmacen := APedidos.ID_ALMACEN;
+ AUbicacion := APedidos.UBICACION;
+ if ElegirOpcionesRecepcionPedido(APedidos.DataTable.RecordCount, AFechaRecepcion, ANumBultos, AUbicacion, AAlmacen) then
+ begin
+ try
+ AAlbaranesNuevos := AAlbaranesProveedorController.Nuevo(False);
+ if AAlbaranesProveedorController.Anadir(AAlbaranesNuevos, APedidos, ANumBultos, AUbicacion, AAlmacen, AFechaRecepcion) then
+ begin
+ if AAlbaranesNuevos.DataTable.RecordCount = 1 then
+ begin
+ with dmGenerarAlbaranesProv.JsListaAlbaranesGenerados do
+ begin
+ Instruction.Text := 'Se ha generado el albarán';
+
+ Content.Clear;
+ Content.Add(Format('Se ha generado correctamente el albarán %s a partir del pedido de proveedor' + #10#13,
+ [AAlbaranesNuevos.REFERENCIA]));
+ end;
+ end
+ else begin
+ dmGenerarAlbaranesProv.JsListaAlbaranesGenerados.CustomButtons[1].Destroy;
+ with dmGenerarAlbaranesProv.JsListaAlbaranesGenerados.Content do
+ begin
+ Clear;
+ AAlbaranesNuevos.DataTable.Last;
+ for i := 0 to AAlbaranesNuevos.DataTable.RecordCount - 1 do
+ begin
+ if Length(AAlbaranesNuevos.REFERENCIA) > 0 then
+ Add(AAlbaranesNuevos.REFERENCIA + ': ' + AAlbaranesNuevos.NOMBRE);
+ AAlbaranesNuevos.DataTable.Prior;
+ end;
+ end;
+ end;
+
+
+ dmGenerarAlbaranesProv.JsListaAlbaranesGenerados.Execute;
+ ARespuesta := dmGenerarAlbaranesProv.JsListaAlbaranesGenerados.CustomButtonResult;
+ case ARespuesta of
+ 100 : begin
+ // Ver el albarán
+ AAlbaranesProveedorController.Ver(AAlbaranesNuevos);
+ end;
+ 200 : // Continuar;
+ end;
+ end;
+
+ finally
+ AAlbaranesNuevos := NIL;
+ end;
+ end;
+end;
+
+
+
end.
diff --git a/Source/Modulos/Relaciones/Presupuestos de cliente - Contratos de cliente/uGenerarContratosCliUtils.pas b/Source/Modulos/Relaciones/Presupuestos de cliente - Contratos de cliente/uGenerarContratosCliUtils.pas
index 8b21739c..f0e4ebe2 100644
--- a/Source/Modulos/Relaciones/Presupuestos de cliente - Contratos de cliente/uGenerarContratosCliUtils.pas
+++ b/Source/Modulos/Relaciones/Presupuestos de cliente - Contratos de cliente/uGenerarContratosCliUtils.pas
@@ -253,6 +253,10 @@ begin
ADetalles.IMPORTE_UNIDAD := AArticulos.IMPORTE_UNIDAD;
if not AArticulos.IMPORTE_TOTALIsNull then
ADetalles.IMPORTE_TOTAL := AArticulos.IMPORTE_TOTAL;
+ if not AArticulos.INCREMENTOIsNull then
+ ADetalles.INCREMENTO := AArticulos.INCREMENTO;
+ if not AArticulos.DECREMENTOIsNull then
+ ADetalles.DECREMENTO := AArticulos.DECREMENTO;
if not AArticulos.DESCUENTOIsNull then
ADetalles.DESCUENTO := AArticulos.DESCUENTO;
if not AArticulos.IMPORTE_PORTEIsNull then
diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr
index 0ccb3f07..049dc295 100644
--- a/Source/Servidor/FactuGES_Server.dpr
+++ b/Source/Servidor/FactuGES_Server.dpr
@@ -92,8 +92,6 @@ uses
schEjerciciosServer_Intf in '..\ApplicationBase\Ejercicios\Model\schEjerciciosServer_Intf.pas',
schUsuariosClient_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosClient_Intf.pas',
schUsuariosServer_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosServer_Intf.pas',
- schAlmacenesClient_Intf in '..\Modulos\Almacenes\Model\schAlmacenesClient_Intf.pas',
- schAlmacenesServer_Intf in '..\Modulos\Almacenes\Model\schAlmacenesServer_Intf.pas',
srvGestorDocumentos_Impl in '..\Modulos\Gestion de documentos\Servidor\srvGestorDocumentos_Impl.pas' {srvGestorDocumentos: TDataAbstractService},
uStringsUtils in '..\Base\Utiles\uStringsUtils.pas',
uSistemaFunc in '..\Base\Utiles\uSistemaFunc.pas',
@@ -107,16 +105,10 @@ uses
srvContratosCliente_Impl in '..\Modulos\Contratos de cliente\Servidor\srvContratosCliente_Impl.pas' {srvContratosCliente: TDataAbstractService},
uBizContratosClienteServer in '..\Modulos\Contratos de cliente\Model\uBizContratosClienteServer.pas',
uRptContratosCliente_Server in '..\Modulos\Contratos de cliente\Reports\uRptContratosCliente_Server.pas' {RptContratosCliente},
- schAlbaranesProveedorClient_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorClient_Intf.pas',
- schAlbaranesProveedorServer_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorServer_Intf.pas',
schInventarioClient_Intf in '..\Modulos\Inventario\Model\schInventarioClient_Intf.pas',
schInventarioServer_Intf in '..\Modulos\Inventario\Model\schInventarioServer_Intf.pas',
schFamiliasClient_Intf in '..\Modulos\Familias\Model\schFamiliasClient_Intf.pas',
schFamiliasServer_Intf in '..\Modulos\Familias\Model\schFamiliasServer_Intf.pas',
- schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas',
- schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas',
- schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas',
- schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas',
uRptListadosContactos_Server in '..\Modulos\Contactos\Reports\uRptListadosContactos_Server.pas' {RptListadosContactos: TDataModule},
uRptPedidosProveedor_Server in '..\Modulos\Pedidos a proveedor\Reports\uRptPedidosProveedor_Server.pas' {RptPedidosProveedor: TDataModule},
schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas',
@@ -127,16 +119,24 @@ uses
schRecibosClienteServer_Intf in '..\Modulos\Recibos de cliente\Model\schRecibosClienteServer_Intf.pas',
schRecibosProveedorClient_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorClient_Intf.pas',
schRecibosProveedorServer_Intf in '..\Modulos\Recibos de proveedor\Model\schRecibosProveedorServer_Intf.pas',
- schFormasPagoClient_Intf in '..\Modulos\Formas de pago\Model\schFormasPagoClient_Intf.pas',
- schFormasPagoServer_Intf in '..\Modulos\Formas de pago\Model\schFormasPagoServer_Intf.pas',
- schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas',
- schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas',
schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas',
schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas',
schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas',
schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas',
+ schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas',
+ schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas',
+ schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas',
+ schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas',
+ schFormasPagoClient_Intf in '..\Modulos\Formas de pago\Model\schFormasPagoClient_Intf.pas',
+ schFormasPagoServer_Intf in '..\Modulos\Formas de pago\Model\schFormasPagoServer_Intf.pas',
+ schAlmacenesClient_Intf in '..\Modulos\Almacenes\Model\schAlmacenesClient_Intf.pas',
+ schAlmacenesServer_Intf in '..\Modulos\Almacenes\Model\schAlmacenesServer_Intf.pas',
+ schAlbaranesProveedorClient_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorClient_Intf.pas',
+ schAlbaranesProveedorServer_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorServer_Intf.pas',
schPedidosProveedorClient_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorClient_Intf.pas',
schPedidosProveedorServer_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorServer_Intf.pas',
+ schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas',
+ schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas',
schContratosClienteClient_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteClient_Intf.pas',
schContratosClienteServer_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteServer_Intf.pas';
diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj
index 8ed0d116..9adaabe0 100644
--- a/Source/Servidor/FactuGES_Server.dproj
+++ b/Source/Servidor/FactuGES_Server.dproj
@@ -1,301 +1,298 @@
-
+
-
- {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}
- FactuGES_Server.dpr
- Debug
- AnyCPU
- DCC32
- ..\..\Output\Debug\Servidor\FactuGES_Server.exe
-
-
- 7.0
- False
- False
- 0
- 3
- ..\..\Output\Release\Servidor
- RELEASE
-
-
- 7.0
- 3
- ..\..\Output\Debug\Servidor
- DEBUG;_VER6
- True
-
-
- Delphi.Personality
-
-
-FalseTrueFalseTrueFalse3000FalseFalseFalseFalseFalse30821252Rodax Software S.L.3.0.0.0FactuGES (Servidor)3.0.0.0lunes, 25 de mayo de 2020 17:26
-
-
-
- File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found
- FactuGES_Server.dpr
-
-
-
-
- MainSource
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDARemoteService
-
-
-
- TRORemoteDataModule
-
-
-
-
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDARemoteService
-
-
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDARemoteService
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
- TFrame
-
-
-
- TFrame
-
-
-
- TForm
-
-
-
- TFrame
-
-
-
- TDARemoteService
-
-
-
-
-
-
- TDataModule
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}
+ FactuGES_Server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Output\Debug\Servidor\FactuGES_Server.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ 3
+ ..\..\Output\Release\Servidor
+ RELEASE
+
+
+ 7.0
+ 3
+ ..\..\Output\Debug\Servidor
+ DEBUG;_VER6;
+ True
+
+
+ Delphi.Personality
+
+
+ FalseTrueFalseTrueFalse3400FalseFalseFalseFalseFalse30821252Rodax Software S.L.3.4.0.0FactuGES (Servidor)3.4.0.0domingo, 23 de enero de 2022 17:34
+ File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found
+ FactuGES_Server.dpr
+
+
+
+
+ MainSource
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDARemoteService
+
+
+
+ TRORemoteDataModule
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+ TFrame
+
+
+
+ TFrame
+
+
+
+ TForm
+
+
+
+ TFrame
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+ TDataModule
+
+
+
+
+
+
+
+
+
+
+
+
+