Version 4.6.1 Descuentos automáticos de cliente a nivel de capítulo, Nuevo perfil para cada tienda en el que solo se verá presupuestos, capitulos en ingles

git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoDesign_FactuGES/trunk@191 93f398dd-4eb6-7a46-baf6-13f46f578da2
This commit is contained in:
roberto 2024-04-19 15:09:52 +00:00
parent 93c7bfd982
commit c5e705ea53
184 changed files with 7212 additions and 1341 deletions

View File

@ -203,6 +203,18 @@ inherited DataModuleEmpresas: TDataModuleEmpresas
item item
Name = 'ID_PERFIL' Name = 'ID_PERFIL'
DataType = datInteger DataType = datInteger
end
item
Name = 'DESCUENTO_LINEA'
DataType = datFloat
end
item
Name = 'DESCUENTO_CAPITULO'
DataType = datFloat
end
item
Name = 'DESCUENTO_GENERAL'
DataType = datFloat
end> end>
Params = <> Params = <>
StreamingOptions = [soDisableEventsWhileStreaming] StreamingOptions = [soDisableEventsWhileStreaming]

View File

@ -9,10 +9,10 @@ const
{ Data table rules ids { Data table rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_EmpresasTiendas = '{7846BBE0-04FC-42FE-B6E1-87982D99298D}'; RID_EmpresasTiendas = '{4C4FA7F6-204A-438F-82C2-AF65734D61B0}';
RID_DarNombre = '{30F80B13-9686-43DF-AD79-CF2BA063FC0D}'; RID_DarNombre = '{1B3D70B2-DD90-4609-A25F-754C97E09ED5}';
RID_Empresas = '{3DD75D7B-B6BF-4F23-8315-A79A8D0FEBF1}'; RID_Empresas = '{5F373B9A-CA15-4D2E-B260-9EDE5F248296}';
RID_EmpresasDatosBanco = '{8F6E24FD-A920-4DF1-A800-33A13DAAA5A9}'; RID_EmpresasDatosBanco = '{39ABFFCC-227F-479F-9AB7-49F94878185B}';
{ Data table names } { Data table names }
nme_EmpresasTiendas = 'EmpresasTiendas'; nme_EmpresasTiendas = 'EmpresasTiendas';
@ -91,6 +91,9 @@ const
fld_EmpresasVALIDEZ_PRESUPUESTOS = 'VALIDEZ_PRESUPUESTOS'; fld_EmpresasVALIDEZ_PRESUPUESTOS = 'VALIDEZ_PRESUPUESTOS';
fld_EmpresasPRECIO_PUNTO = 'PRECIO_PUNTO'; fld_EmpresasPRECIO_PUNTO = 'PRECIO_PUNTO';
fld_EmpresasID_PERFIL = 'ID_PERFIL'; fld_EmpresasID_PERFIL = 'ID_PERFIL';
fld_EmpresasDESCUENTO_LINEA = 'DESCUENTO_LINEA';
fld_EmpresasDESCUENTO_CAPITULO = 'DESCUENTO_CAPITULO';
fld_EmpresasDESCUENTO_GENERAL = 'DESCUENTO_GENERAL';
{ Empresas field indexes } { Empresas field indexes }
idx_EmpresasID = 0; idx_EmpresasID = 0;
@ -121,6 +124,9 @@ const
idx_EmpresasVALIDEZ_PRESUPUESTOS = 25; idx_EmpresasVALIDEZ_PRESUPUESTOS = 25;
idx_EmpresasPRECIO_PUNTO = 26; idx_EmpresasPRECIO_PUNTO = 26;
idx_EmpresasID_PERFIL = 27; idx_EmpresasID_PERFIL = 27;
idx_EmpresasDESCUENTO_LINEA = 28;
idx_EmpresasDESCUENTO_CAPITULO = 29;
idx_EmpresasDESCUENTO_GENERAL = 30;
{ EmpresasDatosBanco fields } { EmpresasDatosBanco fields }
fld_EmpresasDatosBancoID = 'ID'; fld_EmpresasDatosBancoID = 'ID';
@ -147,7 +153,7 @@ const
type type
{ IEmpresasTiendas } { IEmpresasTiendas }
IEmpresasTiendas = interface(IDAStronglyTypedDataTable) IEmpresasTiendas = interface(IDAStronglyTypedDataTable)
['{29F8DDC0-32B5-4D18-889E-7CD5295C4768}'] ['{8E1E9E05-E47F-4291-BE76-D7F259D77914}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -362,7 +368,7 @@ type
{ IDarNombre } { IDarNombre }
IDarNombre = interface(IDAStronglyTypedDataTable) IDarNombre = interface(IDAStronglyTypedDataTable)
['{F9833C20-3E16-439F-AF60-1188C3F7FA77}'] ['{AB4CA25B-32EB-42F9-911F-BE1EDC6A1B5A}']
{ Property getters and setters } { Property getters and setters }
function GetNOMBREValue: String; function GetNOMBREValue: String;
procedure SetNOMBREValue(const aValue: String); procedure SetNOMBREValue(const aValue: String);
@ -397,7 +403,7 @@ type
{ IEmpresas } { IEmpresas }
IEmpresas = interface(IDAStronglyTypedDataTable) IEmpresas = interface(IDAStronglyTypedDataTable)
['{2E98270D-135A-465B-B784-E826CFED21AD}'] ['{4AEFB8E8-4B06-4D1C-BF6E-32BB0D8A5651}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -509,6 +515,18 @@ type
procedure SetID_PERFILValue(const aValue: Integer); procedure SetID_PERFILValue(const aValue: Integer);
function GetID_PERFILIsNull: Boolean; function GetID_PERFILIsNull: Boolean;
procedure SetID_PERFILIsNull(const aValue: Boolean); procedure SetID_PERFILIsNull(const aValue: Boolean);
function GetDESCUENTO_LINEAValue: Float;
procedure SetDESCUENTO_LINEAValue(const aValue: Float);
function GetDESCUENTO_LINEAIsNull: Boolean;
procedure SetDESCUENTO_LINEAIsNull(const aValue: Boolean);
function GetDESCUENTO_CAPITULOValue: Float;
procedure SetDESCUENTO_CAPITULOValue(const aValue: Float);
function GetDESCUENTO_CAPITULOIsNull: Boolean;
procedure SetDESCUENTO_CAPITULOIsNull(const aValue: Boolean);
function GetDESCUENTO_GENERALValue: Float;
procedure SetDESCUENTO_GENERALValue(const aValue: Float);
function GetDESCUENTO_GENERALIsNull: Boolean;
procedure SetDESCUENTO_GENERALIsNull(const aValue: Boolean);
{ Properties } { Properties }
@ -568,6 +586,12 @@ type
property PRECIO_PUNTOIsNull: Boolean read GetPRECIO_PUNTOIsNull write SetPRECIO_PUNTOIsNull; property PRECIO_PUNTOIsNull: Boolean read GetPRECIO_PUNTOIsNull write SetPRECIO_PUNTOIsNull;
property ID_PERFIL: Integer read GetID_PERFILValue write SetID_PERFILValue; property ID_PERFIL: Integer read GetID_PERFILValue write SetID_PERFILValue;
property ID_PERFILIsNull: Boolean read GetID_PERFILIsNull write SetID_PERFILIsNull; property ID_PERFILIsNull: Boolean read GetID_PERFILIsNull write SetID_PERFILIsNull;
property DESCUENTO_LINEA: Float read GetDESCUENTO_LINEAValue write SetDESCUENTO_LINEAValue;
property DESCUENTO_LINEAIsNull: Boolean read GetDESCUENTO_LINEAIsNull write SetDESCUENTO_LINEAIsNull;
property DESCUENTO_CAPITULO: Float read GetDESCUENTO_CAPITULOValue write SetDESCUENTO_CAPITULOValue;
property DESCUENTO_CAPITULOIsNull: Boolean read GetDESCUENTO_CAPITULOIsNull write SetDESCUENTO_CAPITULOIsNull;
property DESCUENTO_GENERAL: Float read GetDESCUENTO_GENERALValue write SetDESCUENTO_GENERALValue;
property DESCUENTO_GENERALIsNull: Boolean read GetDESCUENTO_GENERALIsNull write SetDESCUENTO_GENERALIsNull;
end; end;
{ TEmpresasDataTableRules } { TEmpresasDataTableRules }
@ -689,6 +713,18 @@ type
procedure SetID_PERFILValue(const aValue: Integer); virtual; procedure SetID_PERFILValue(const aValue: Integer); virtual;
function GetID_PERFILIsNull: Boolean; virtual; function GetID_PERFILIsNull: Boolean; virtual;
procedure SetID_PERFILIsNull(const aValue: Boolean); virtual; procedure SetID_PERFILIsNull(const aValue: Boolean); virtual;
function GetDESCUENTO_LINEAValue: Float; virtual;
procedure SetDESCUENTO_LINEAValue(const aValue: Float); virtual;
function GetDESCUENTO_LINEAIsNull: Boolean; virtual;
procedure SetDESCUENTO_LINEAIsNull(const aValue: Boolean); virtual;
function GetDESCUENTO_CAPITULOValue: Float; virtual;
procedure SetDESCUENTO_CAPITULOValue(const aValue: Float); virtual;
function GetDESCUENTO_CAPITULOIsNull: Boolean; virtual;
procedure SetDESCUENTO_CAPITULOIsNull(const aValue: Boolean); virtual;
function GetDESCUENTO_GENERALValue: Float; virtual;
procedure SetDESCUENTO_GENERALValue(const aValue: Float); virtual;
function GetDESCUENTO_GENERALIsNull: Boolean; virtual;
procedure SetDESCUENTO_GENERALIsNull(const aValue: Boolean); virtual;
{ Properties } { Properties }
property ID: Integer read GetIDValue write SetIDValue; property ID: Integer read GetIDValue write SetIDValue;
@ -747,6 +783,12 @@ type
property PRECIO_PUNTOIsNull: Boolean read GetPRECIO_PUNTOIsNull write SetPRECIO_PUNTOIsNull; property PRECIO_PUNTOIsNull: Boolean read GetPRECIO_PUNTOIsNull write SetPRECIO_PUNTOIsNull;
property ID_PERFIL: Integer read GetID_PERFILValue write SetID_PERFILValue; property ID_PERFIL: Integer read GetID_PERFILValue write SetID_PERFILValue;
property ID_PERFILIsNull: Boolean read GetID_PERFILIsNull write SetID_PERFILIsNull; property ID_PERFILIsNull: Boolean read GetID_PERFILIsNull write SetID_PERFILIsNull;
property DESCUENTO_LINEA: Float read GetDESCUENTO_LINEAValue write SetDESCUENTO_LINEAValue;
property DESCUENTO_LINEAIsNull: Boolean read GetDESCUENTO_LINEAIsNull write SetDESCUENTO_LINEAIsNull;
property DESCUENTO_CAPITULO: Float read GetDESCUENTO_CAPITULOValue write SetDESCUENTO_CAPITULOValue;
property DESCUENTO_CAPITULOIsNull: Boolean read GetDESCUENTO_CAPITULOIsNull write SetDESCUENTO_CAPITULOIsNull;
property DESCUENTO_GENERAL: Float read GetDESCUENTO_GENERALValue write SetDESCUENTO_GENERALValue;
property DESCUENTO_GENERALIsNull: Boolean read GetDESCUENTO_GENERALIsNull write SetDESCUENTO_GENERALIsNull;
public public
constructor Create(aDataTable: TDADataTable); override; constructor Create(aDataTable: TDADataTable); override;
@ -756,7 +798,7 @@ type
{ IEmpresasDatosBanco } { IEmpresasDatosBanco }
IEmpresasDatosBanco = interface(IDAStronglyTypedDataTable) IEmpresasDatosBanco = interface(IDAStronglyTypedDataTable)
['{7933C562-157E-4235-85D5-849DCC1B27E3}'] ['{3F059FA8-12F1-4A1D-AE6F-FC2170CBBCCA}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -1893,6 +1935,69 @@ begin
DataTable.Fields[idx_EmpresasID_PERFIL].AsVariant := Null; DataTable.Fields[idx_EmpresasID_PERFIL].AsVariant := Null;
end; end;
function TEmpresasDataTableRules.GetDESCUENTO_LINEAValue: Float;
begin
result := DataTable.Fields[idx_EmpresasDESCUENTO_LINEA].AsFloat;
end;
procedure TEmpresasDataTableRules.SetDESCUENTO_LINEAValue(const aValue: Float);
begin
DataTable.Fields[idx_EmpresasDESCUENTO_LINEA].AsFloat := aValue;
end;
function TEmpresasDataTableRules.GetDESCUENTO_LINEAIsNull: boolean;
begin
result := DataTable.Fields[idx_EmpresasDESCUENTO_LINEA].IsNull;
end;
procedure TEmpresasDataTableRules.SetDESCUENTO_LINEAIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_EmpresasDESCUENTO_LINEA].AsVariant := Null;
end;
function TEmpresasDataTableRules.GetDESCUENTO_CAPITULOValue: Float;
begin
result := DataTable.Fields[idx_EmpresasDESCUENTO_CAPITULO].AsFloat;
end;
procedure TEmpresasDataTableRules.SetDESCUENTO_CAPITULOValue(const aValue: Float);
begin
DataTable.Fields[idx_EmpresasDESCUENTO_CAPITULO].AsFloat := aValue;
end;
function TEmpresasDataTableRules.GetDESCUENTO_CAPITULOIsNull: boolean;
begin
result := DataTable.Fields[idx_EmpresasDESCUENTO_CAPITULO].IsNull;
end;
procedure TEmpresasDataTableRules.SetDESCUENTO_CAPITULOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_EmpresasDESCUENTO_CAPITULO].AsVariant := Null;
end;
function TEmpresasDataTableRules.GetDESCUENTO_GENERALValue: Float;
begin
result := DataTable.Fields[idx_EmpresasDESCUENTO_GENERAL].AsFloat;
end;
procedure TEmpresasDataTableRules.SetDESCUENTO_GENERALValue(const aValue: Float);
begin
DataTable.Fields[idx_EmpresasDESCUENTO_GENERAL].AsFloat := aValue;
end;
function TEmpresasDataTableRules.GetDESCUENTO_GENERALIsNull: boolean;
begin
result := DataTable.Fields[idx_EmpresasDESCUENTO_GENERAL].IsNull;
end;
procedure TEmpresasDataTableRules.SetDESCUENTO_GENERALIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_EmpresasDESCUENTO_GENERAL].AsVariant := Null;
end;
{ TEmpresasDatosBancoDataTableRules } { TEmpresasDatosBancoDataTableRules }
constructor TEmpresasDatosBancoDataTableRules.Create(aDataTable: TDADataTable); constructor TEmpresasDatosBancoDataTableRules.Create(aDataTable: TDADataTable);

View File

@ -9,15 +9,15 @@ const
{ Delta rules ids { Delta rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_EmpresasTiendasDelta = '{5F6B8574-3D34-4053-9C3D-C9D54E35385B}'; RID_EmpresasTiendasDelta = '{618E8840-4B86-4EE9-88FE-4FA9C2445473}';
RID_DarNombreDelta = '{0FE165AC-2657-4B35-8198-CA4352B14F63}'; RID_DarNombreDelta = '{D2935D05-E8BE-43D9-85C8-70DC72FB4162}';
RID_EmpresasDelta = '{ED3707F2-AED9-42AA-A712-2982BE6DE6E7}'; RID_EmpresasDelta = '{ACD89FCF-13DA-4466-9A1F-BBBAD5DD4061}';
RID_EmpresasDatosBancoDelta = '{86C78EE4-9661-47CA-B3DB-ECF4F3A8DD27}'; RID_EmpresasDatosBancoDelta = '{AD2EEB97-FA9B-4280-8BEA-C3EC24371A05}';
type type
{ IEmpresasTiendasDelta } { IEmpresasTiendasDelta }
IEmpresasTiendasDelta = interface(IEmpresasTiendas) IEmpresasTiendasDelta = interface(IEmpresasTiendas)
['{5F6B8574-3D34-4053-9C3D-C9D54E35385B}'] ['{618E8840-4B86-4EE9-88FE-4FA9C2445473}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer; function GetOldID_EMPRESAValue : Integer;
@ -232,7 +232,7 @@ type
{ IDarNombreDelta } { IDarNombreDelta }
IDarNombreDelta = interface(IDarNombre) IDarNombreDelta = interface(IDarNombre)
['{0FE165AC-2657-4B35-8198-CA4352B14F63}'] ['{D2935D05-E8BE-43D9-85C8-70DC72FB4162}']
{ Property getters and setters } { Property getters and setters }
function GetOldNOMBREValue : String; function GetOldNOMBREValue : String;
@ -266,7 +266,7 @@ type
{ IEmpresasDelta } { IEmpresasDelta }
IEmpresasDelta = interface(IEmpresas) IEmpresasDelta = interface(IEmpresas)
['{ED3707F2-AED9-42AA-A712-2982BE6DE6E7}'] ['{ACD89FCF-13DA-4466-9A1F-BBBAD5DD4061}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldNIF_CIFValue : String; function GetOldNIF_CIFValue : String;
@ -296,6 +296,9 @@ type
function GetOldVALIDEZ_PRESUPUESTOSValue : SmallInt; function GetOldVALIDEZ_PRESUPUESTOSValue : SmallInt;
function GetOldPRECIO_PUNTOValue : Currency; function GetOldPRECIO_PUNTOValue : Currency;
function GetOldID_PERFILValue : Integer; function GetOldID_PERFILValue : Integer;
function GetOldDESCUENTO_LINEAValue : Float;
function GetOldDESCUENTO_CAPITULOValue : Float;
function GetOldDESCUENTO_GENERALValue : Float;
{ Properties } { Properties }
property OldID : Integer read GetOldIDValue; property OldID : Integer read GetOldIDValue;
@ -326,6 +329,9 @@ type
property OldVALIDEZ_PRESUPUESTOS : SmallInt read GetOldVALIDEZ_PRESUPUESTOSValue; property OldVALIDEZ_PRESUPUESTOS : SmallInt read GetOldVALIDEZ_PRESUPUESTOSValue;
property OldPRECIO_PUNTO : Currency read GetOldPRECIO_PUNTOValue; property OldPRECIO_PUNTO : Currency read GetOldPRECIO_PUNTOValue;
property OldID_PERFIL : Integer read GetOldID_PERFILValue; property OldID_PERFIL : Integer read GetOldID_PERFILValue;
property OldDESCUENTO_LINEA : Float read GetOldDESCUENTO_LINEAValue;
property OldDESCUENTO_CAPITULO : Float read GetOldDESCUENTO_CAPITULOValue;
property OldDESCUENTO_GENERAL : Float read GetOldDESCUENTO_GENERALValue;
end; end;
{ TEmpresasBusinessProcessorRules } { TEmpresasBusinessProcessorRules }
@ -503,6 +509,24 @@ type
function GetOldID_PERFILIsNull: Boolean; virtual; function GetOldID_PERFILIsNull: Boolean; virtual;
procedure SetID_PERFILValue(const aValue: Integer); virtual; procedure SetID_PERFILValue(const aValue: Integer); virtual;
procedure SetID_PERFILIsNull(const aValue: Boolean); virtual; procedure SetID_PERFILIsNull(const aValue: Boolean); virtual;
function GetDESCUENTO_LINEAValue: Float; virtual;
function GetDESCUENTO_LINEAIsNull: Boolean; virtual;
function GetOldDESCUENTO_LINEAValue: Float; virtual;
function GetOldDESCUENTO_LINEAIsNull: Boolean; virtual;
procedure SetDESCUENTO_LINEAValue(const aValue: Float); virtual;
procedure SetDESCUENTO_LINEAIsNull(const aValue: Boolean); virtual;
function GetDESCUENTO_CAPITULOValue: Float; virtual;
function GetDESCUENTO_CAPITULOIsNull: Boolean; virtual;
function GetOldDESCUENTO_CAPITULOValue: Float; virtual;
function GetOldDESCUENTO_CAPITULOIsNull: Boolean; virtual;
procedure SetDESCUENTO_CAPITULOValue(const aValue: Float); virtual;
procedure SetDESCUENTO_CAPITULOIsNull(const aValue: Boolean); virtual;
function GetDESCUENTO_GENERALValue: Float; virtual;
function GetDESCUENTO_GENERALIsNull: Boolean; virtual;
function GetOldDESCUENTO_GENERALValue: Float; virtual;
function GetOldDESCUENTO_GENERALIsNull: Boolean; virtual;
procedure SetDESCUENTO_GENERALValue(const aValue: Float); virtual;
procedure SetDESCUENTO_GENERALIsNull(const aValue: Boolean); virtual;
{ Properties } { Properties }
property ID : Integer read GetIDValue write SetIDValue; property ID : Integer read GetIDValue write SetIDValue;
@ -617,6 +641,18 @@ type
property ID_PERFILIsNull : Boolean read GetID_PERFILIsNull write SetID_PERFILIsNull; property ID_PERFILIsNull : Boolean read GetID_PERFILIsNull write SetID_PERFILIsNull;
property OldID_PERFIL : Integer read GetOldID_PERFILValue; property OldID_PERFIL : Integer read GetOldID_PERFILValue;
property OldID_PERFILIsNull : Boolean read GetOldID_PERFILIsNull; property OldID_PERFILIsNull : Boolean read GetOldID_PERFILIsNull;
property DESCUENTO_LINEA : Float read GetDESCUENTO_LINEAValue write SetDESCUENTO_LINEAValue;
property DESCUENTO_LINEAIsNull : Boolean read GetDESCUENTO_LINEAIsNull write SetDESCUENTO_LINEAIsNull;
property OldDESCUENTO_LINEA : Float read GetOldDESCUENTO_LINEAValue;
property OldDESCUENTO_LINEAIsNull : Boolean read GetOldDESCUENTO_LINEAIsNull;
property DESCUENTO_CAPITULO : Float read GetDESCUENTO_CAPITULOValue write SetDESCUENTO_CAPITULOValue;
property DESCUENTO_CAPITULOIsNull : Boolean read GetDESCUENTO_CAPITULOIsNull write SetDESCUENTO_CAPITULOIsNull;
property OldDESCUENTO_CAPITULO : Float read GetOldDESCUENTO_CAPITULOValue;
property OldDESCUENTO_CAPITULOIsNull : Boolean read GetOldDESCUENTO_CAPITULOIsNull;
property DESCUENTO_GENERAL : Float read GetDESCUENTO_GENERALValue write SetDESCUENTO_GENERALValue;
property DESCUENTO_GENERALIsNull : Boolean read GetDESCUENTO_GENERALIsNull write SetDESCUENTO_GENERALIsNull;
property OldDESCUENTO_GENERAL : Float read GetOldDESCUENTO_GENERALValue;
property OldDESCUENTO_GENERALIsNull : Boolean read GetOldDESCUENTO_GENERALIsNull;
public public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override; constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@ -626,7 +662,7 @@ type
{ IEmpresasDatosBancoDelta } { IEmpresasDatosBancoDelta }
IEmpresasDatosBancoDelta = interface(IEmpresasDatosBanco) IEmpresasDatosBancoDelta = interface(IEmpresasDatosBanco)
['{86C78EE4-9661-47CA-B3DB-ECF4F3A8DD27}'] ['{AD2EEB97-FA9B-4280-8BEA-C3EC24371A05}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer; function GetOldID_EMPRESAValue : Integer;
@ -2216,6 +2252,99 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_PERFIL] := Null; BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_PERFIL] := Null;
end; end;
function TEmpresasBusinessProcessorRules.GetDESCUENTO_LINEAValue: Float;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasDESCUENTO_LINEA];
end;
function TEmpresasBusinessProcessorRules.GetDESCUENTO_LINEAIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasDESCUENTO_LINEA]);
end;
function TEmpresasBusinessProcessorRules.GetOldDESCUENTO_LINEAValue: Float;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasDESCUENTO_LINEA];
end;
function TEmpresasBusinessProcessorRules.GetOldDESCUENTO_LINEAIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasDESCUENTO_LINEA]);
end;
procedure TEmpresasBusinessProcessorRules.SetDESCUENTO_LINEAValue(const aValue: Float);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasDESCUENTO_LINEA] := aValue;
end;
procedure TEmpresasBusinessProcessorRules.SetDESCUENTO_LINEAIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasDESCUENTO_LINEA] := Null;
end;
function TEmpresasBusinessProcessorRules.GetDESCUENTO_CAPITULOValue: Float;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasDESCUENTO_CAPITULO];
end;
function TEmpresasBusinessProcessorRules.GetDESCUENTO_CAPITULOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasDESCUENTO_CAPITULO]);
end;
function TEmpresasBusinessProcessorRules.GetOldDESCUENTO_CAPITULOValue: Float;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasDESCUENTO_CAPITULO];
end;
function TEmpresasBusinessProcessorRules.GetOldDESCUENTO_CAPITULOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasDESCUENTO_CAPITULO]);
end;
procedure TEmpresasBusinessProcessorRules.SetDESCUENTO_CAPITULOValue(const aValue: Float);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasDESCUENTO_CAPITULO] := aValue;
end;
procedure TEmpresasBusinessProcessorRules.SetDESCUENTO_CAPITULOIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasDESCUENTO_CAPITULO] := Null;
end;
function TEmpresasBusinessProcessorRules.GetDESCUENTO_GENERALValue: Float;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasDESCUENTO_GENERAL];
end;
function TEmpresasBusinessProcessorRules.GetDESCUENTO_GENERALIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasDESCUENTO_GENERAL]);
end;
function TEmpresasBusinessProcessorRules.GetOldDESCUENTO_GENERALValue: Float;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasDESCUENTO_GENERAL];
end;
function TEmpresasBusinessProcessorRules.GetOldDESCUENTO_GENERALIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasDESCUENTO_GENERAL]);
end;
procedure TEmpresasBusinessProcessorRules.SetDESCUENTO_GENERALValue(const aValue: Float);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasDESCUENTO_GENERAL] := aValue;
end;
procedure TEmpresasBusinessProcessorRules.SetDESCUENTO_GENERALIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasDESCUENTO_GENERAL] := Null;
end;
{ TEmpresasDatosBancoBusinessProcessorRules } { TEmpresasDatosBancoBusinessProcessorRules }
constructor TEmpresasDatosBancoBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); constructor TEmpresasDatosBancoBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);

View File

@ -335,6 +335,18 @@ object srvEmpresas: TsrvEmpresas
item item
DatasetField = 'ID_PERFIL' DatasetField = 'ID_PERFIL'
TableField = 'ID_PERFIL' TableField = 'ID_PERFIL'
end
item
DatasetField = 'DESCUENTO_CAPITULO'
TableField = 'DESCUENTO_CAPITULO'
end
item
DatasetField = 'DESCUENTO_GENERAL'
TableField = 'DESCUENTO_GENERAL'
end
item
DatasetField = 'DESCUENTO_LINEA'
TableField = 'DESCUENTO_LINEA'
end> end>
end> end>
Name = 'Empresas' Name = 'Empresas'
@ -493,6 +505,18 @@ object srvEmpresas: TsrvEmpresas
item item
Name = 'ID_PERFIL' Name = 'ID_PERFIL'
DataType = datInteger DataType = datInteger
end
item
Name = 'DESCUENTO_LINEA'
DataType = datFloat
end
item
Name = 'DESCUENTO_CAPITULO'
DataType = datFloat
end
item
Name = 'DESCUENTO_GENERAL'
DataType = datFloat
end> end>
end end
item item
@ -752,6 +776,21 @@ object srvEmpresas: TsrvEmpresas
Name = 'PRECIO_PUNTO' Name = 'PRECIO_PUNTO'
DataType = datCurrency DataType = datCurrency
Value = '' Value = ''
end
item
Name = 'DESCUENTO_LINEA'
DataType = datFloat
Value = ''
end
item
Name = 'DESCUENTO_CAPITULO'
DataType = datFloat
Value = ''
end
item
Name = 'DESCUENTO_GENERAL'
DataType = datFloat
Value = ''
end> end>
Statements = < Statements = <
item item
@ -764,13 +803,15 @@ object srvEmpresas: TsrvEmpresas
'FONO_2, MOVIL_1, MOVIL_2, '#10' FAX, EMAIL_1, EMAIL_2, PAGINA_WE' + 'FONO_2, MOVIL_1, MOVIL_2, '#10' FAX, EMAIL_1, EMAIL_2, PAGINA_WE' +
'B, NOTAS, FECHA_ALTA, '#10' FECHA_MODIFICACION, USUARIO, LOGOTIP' + 'B, NOTAS, FECHA_ALTA, '#10' FECHA_MODIFICACION, USUARIO, LOGOTIP' +
'O, REGISTRO_MERCANTIL, '#10' ID_TIPO_IVA, ID_FORMA_PAGO, VALIDEZ' + 'O, REGISTRO_MERCANTIL, '#10' ID_TIPO_IVA, ID_FORMA_PAGO, VALIDEZ' +
'_PRESUPUESTOS, PRECIO_PUNTO'#10' )'#10' VALUES'#10' (:ID, :NIF_CIF, ' + '_PRESUPUESTOS, PRECIO_PUNTO,'#10' DESCUENTO_LINEA, DESCUENTO_CAP' +
':NOMBRE, :RAZON_SOCIAL, :CALLE, :POBLACION,'#10' :PROVINCIA, :CO' + 'ITULO, DESCUENTO_GENERAL'#10' )'#10' VALUES'#10' (:ID, :NIF_CIF, :NO' +
'DIGO_POSTAL, :TELEFONO_1, :TELEFONO_2, '#10' :MOVIL_1, :MOVIL_2,' + 'MBRE, :RAZON_SOCIAL, :CALLE, :POBLACION,'#10' :PROVINCIA, :CODIG' +
' :FAX, :EMAIL_1, :EMAIL_2, :PAGINA_WEB, '#10' :NOTAS, :FECHA_ALT' + 'O_POSTAL, :TELEFONO_1, :TELEFONO_2, '#10' :MOVIL_1, :MOVIL_2, :F' +
'A, :FECHA_MODIFICACION, :USUARIO, '#10' :LOGOTIPO, :REGISTRO_MER' + 'AX, :EMAIL_1, :EMAIL_2, :PAGINA_WEB, '#10' :NOTAS, :FECHA_ALTA, ' +
'CANTIL, :ID_TIPO_IVA, :ID_FORMA_PAGO, '#10' :VALIDEZ_PRESUPUESTO' + ':FECHA_MODIFICACION, :USUARIO, '#10' :LOGOTIPO, :REGISTRO_MERCAN' +
'S, :PRECIO_PUNTO)'#10 'TIL, :ID_TIPO_IVA, :ID_FORMA_PAGO, '#10' :VALIDEZ_PRESUPUESTOS, ' +
':PRECIO_PUNTO, :DESCUENTO_LINEA,'#10' :DESCUENTO_CAPITULO, :DESC' +
'UENTO_GENERAL)'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = <> ColumnMappings = <>
end> end>
@ -938,6 +979,21 @@ object srvEmpresas: TsrvEmpresas
DataType = datCurrency DataType = datCurrency
Value = '' Value = ''
end end
item
Name = 'DESCUENTO_LINEA'
DataType = datFloat
Value = ''
end
item
Name = 'DESCUENTO_CAPITULO'
DataType = datFloat
Value = ''
end
item
Name = 'DESCUENTO_GENERAL'
DataType = datFloat
Value = ''
end
item item
Name = 'OLD_ID' Name = 'OLD_ID'
Value = '' Value = ''
@ -960,7 +1016,9 @@ object srvEmpresas: TsrvEmpresas
'TIPO, '#10' REGISTRO_MERCANTIL = :REGISTRO_MERCANTIL, '#10' ID_TIP' + 'TIPO, '#10' REGISTRO_MERCANTIL = :REGISTRO_MERCANTIL, '#10' ID_TIP' +
'O_IVA = :ID_TIPO_IVA, '#10' ID_FORMA_PAGO = :ID_FORMA_PAGO, '#10' ' + 'O_IVA = :ID_TIPO_IVA, '#10' ID_FORMA_PAGO = :ID_FORMA_PAGO, '#10' ' +
'VALIDEZ_PRESUPUESTOS = :VALIDEZ_PRESUPUESTOS, '#10' PRECIO_PUNTO ' + 'VALIDEZ_PRESUPUESTOS = :VALIDEZ_PRESUPUESTOS, '#10' PRECIO_PUNTO ' +
'= :PRECIO_PUNTO'#10' WHERE'#10' (ID = :OLD_ID)'#10 '= :PRECIO_PUNTO,'#10' DESCUENTO_LINEA = :DESCUENTO_LINEA,'#10' DES' +
'CUENTO_CAPITULO = :DESCUENTO_CAPITULO,'#10' DESCUENTO_GENERAL = :' +
'DESCUENTO_GENERAL'#10' WHERE'#10' (ID = :OLD_ID)'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = <> ColumnMappings = <>
end> end>

View File

@ -88,7 +88,6 @@ inherited fEditorEmpresa: TfEditorEmpresa
inherited pgPaginas: TPageControl inherited pgPaginas: TPageControl
Width = 668 Width = 668
Height = 420 Height = 420
ActivePage = pagTiendas
ExplicitTop = 112 ExplicitTop = 112
ExplicitWidth = 668 ExplicitWidth = 668
ExplicitHeight = 420 ExplicitHeight = 420
@ -121,233 +120,265 @@ inherited fEditorEmpresa: TfEditorEmpresa
ExplicitHeight = 392 ExplicitHeight = 392
inherited PngSpeedButton1: TPngSpeedButton inherited PngSpeedButton1: TPngSpeedButton
Left = 596 Left = 596
Top = 276 Top = 295
ExplicitLeft = 596 ExplicitLeft = 596
ExplicitTop = 276 ExplicitTop = 295
end end
inherited PngSpeedButton2: TPngSpeedButton inherited PngSpeedButton2: TPngSpeedButton
Left = 596 Left = 596
Top = 248 Top = 267
ExplicitLeft = 596 ExplicitLeft = 596
ExplicitTop = 248 ExplicitTop = 267
end end
inherited eCalle: TcxDBTextEdit inherited eCalle: TcxDBTextEdit
Top = 251 Top = 351
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 251 ExplicitTop = 351
ExplicitWidth = 84 ExplicitWidth = 84
Width = 84 Width = 84
end end
inherited cbProvincia: TcxDBComboBox inherited cbProvincia: TcxDBComboBox
Top = 278 Top = 378
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 278 ExplicitTop = 378
ExplicitWidth = 106 ExplicitWidth = 106
Width = 106 Width = 106
end end
inherited cbPoblacion: TcxDBComboBox inherited cbPoblacion: TcxDBComboBox
Top = 305 Top = 405
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 305 ExplicitTop = 405
ExplicitWidth = 100 ExplicitWidth = 100
Width = 100 Width = 100
end end
inherited eCodigoPostal: TcxDBTextEdit inherited eCodigoPostal: TcxDBTextEdit
Left = 341 Left = 356
Top = 278 Top = 378
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 341 ExplicitLeft = 356
ExplicitTop = 278 ExplicitTop = 378
end end
inherited ePaginaWeb: TcxDBTextEdit inherited ePaginaWeb: TcxDBTextEdit
Left = 529 Left = 544
Top = 197 Top = 216
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 529 ExplicitLeft = 544
ExplicitTop = 197 ExplicitTop = 216
ExplicitWidth = 165 ExplicitWidth = 165
Width = 165 Width = 165
end end
inherited eMailParticular: TcxDBTextEdit inherited eMailParticular: TcxDBTextEdit
Left = 529 Left = 544
Top = 170 Top = 189
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 529 ExplicitLeft = 544
ExplicitTop = 170 ExplicitTop = 189
ExplicitWidth = 165 ExplicitWidth = 165
Width = 165 Width = 165
end end
inherited eMailTrabajo: TcxDBTextEdit inherited eMailTrabajo: TcxDBTextEdit
Left = 529 Left = 544
Top = 143 Top = 162
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 529 ExplicitLeft = 544
ExplicitTop = 143 ExplicitTop = 162
ExplicitWidth = 129 ExplicitWidth = 129
Width = 129 Width = 129
end end
inherited eTlfParticular: TcxDBTextEdit inherited eTlfParticular: TcxDBTextEdit
Left = 529 Left = 544
Top = 38 Top = 57
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 529 ExplicitLeft = 544
ExplicitTop = 38 ExplicitTop = 57
ExplicitWidth = 91 ExplicitWidth = 91
Width = 91 Width = 91
end end
inherited eTlfTrabajo: TcxDBTextEdit inherited eTlfTrabajo: TcxDBTextEdit
Left = 529 Left = 544
Top = 11 Top = 30
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 529 ExplicitLeft = 544
ExplicitTop = 11 ExplicitTop = 30
ExplicitWidth = 127 ExplicitWidth = 127
Width = 127 Width = 127
end end
inherited eTlfMovil: TcxDBTextEdit inherited eTlfMovil: TcxDBTextEdit
Left = 529 Left = 544
Top = 65 Top = 84
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 529 ExplicitLeft = 544
ExplicitTop = 65 ExplicitTop = 84
ExplicitWidth = 155 ExplicitWidth = 155
Width = 155 Width = 155
end end
inherited eFax: TcxDBTextEdit inherited eFax: TcxDBTextEdit
Left = 529 Left = 544
Top = 92 Top = 111
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 529 ExplicitLeft = 544
ExplicitTop = 92 ExplicitTop = 111
ExplicitWidth = 121 ExplicitWidth = 121
Width = 121 Width = 121
end end
inherited eNombre: TcxDBTextEdit inherited eNombre: TcxDBTextEdit
Top = 11 Top = 30
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 11 ExplicitTop = 30
ExplicitWidth = 108 ExplicitWidth = 108
Width = 108 Width = 108
end end
inherited eNIFCIF: TcxDBTextEdit inherited eNIFCIF: TcxDBTextEdit
Top = 38 Top = 57
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 38 ExplicitTop = 57
ExplicitWidth = 108 ExplicitWidth = 108
Width = 108 Width = 108
end end
inherited memRegistroMercantil: TcxDBMemo inherited memRegistroMercantil: TcxDBMemo
Top = 65 Top = 84
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 65 ExplicitTop = 84
ExplicitWidth = 76 ExplicitWidth = 76
Width = 76 Width = 76
end end
inherited cxDBImage1: TcxDBImage inherited cxDBImage1: TcxDBImage
Left = 434 Left = 449
Top = 248 Top = 267
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 434 ExplicitLeft = 449
ExplicitTop = 248 ExplicitTop = 267
ExplicitWidth = 140 ExplicitWidth = 140
ExplicitHeight = 100 ExplicitHeight = 100
Height = 100 Height = 100
Width = 140 Width = 140
end end
inherited cbFormaPago: TcxComboBox inherited cbFormaPago: TcxComboBox
Top = 146 Top = 165
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 146 ExplicitTop = 165
ExplicitWidth = 359 ExplicitWidth = 359
Width = 359 Width = 359
end end
inherited cbTipoIVA: TcxComboBox inherited cbTipoIVA: TcxComboBox
Top = 119 Top = 138
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 119 ExplicitTop = 138
ExplicitWidth = 202 ExplicitWidth = 202
Width = 202 Width = 202
end end
inherited frViewObservaciones1: TfrViewObservaciones inherited frViewObservaciones1: TfrViewObservaciones
Top = 356 Top = 456
Width = 521 Width = 521
Height = 150 Height = 150
ExplicitTop = 356 ExplicitTop = 456
ExplicitWidth = 521 ExplicitWidth = 521
ExplicitHeight = 150 ExplicitHeight = 150
inherited memObservaciones: TcxDBMemo inherited memObservaciones: TcxDBMemo
DataBinding.DataSource = frViewEmpresa1.DADataSource DataBinding.DataSource = frViewEmpresa1.DADataSource
ExplicitWidth = 399
ExplicitHeight = 20
Height = 150 Height = 150
Width = 521 Width = 521
end end
end end
inherited eValidez: TcxDBSpinEdit inherited eValidez: TcxDBSpinEdit
Top = 173 Top = 192
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 173 ExplicitTop = 192
ExplicitWidth = 121 ExplicitWidth = 121
Width = 121 Width = 121
end end
inherited ePrecioPunto: TcxDBCurrencyEdit inherited ePrecioPunto: TcxDBCurrencyEdit
Top = 200 Top = 219
ExplicitTop = 200 ExplicitTop = 219
ExplicitWidth = 121 ExplicitWidth = 121
Width = 121 Width = 121
end end
inherited eDescuento: TcxDBSpinEdit
Top = 246
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 246
ExplicitWidth = 865
Width = 865
end
inherited eDescuentoLinea: TcxDBSpinEdit
Top = 300
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 300
ExplicitWidth = 865
Width = 865
end
inherited eDescuentoCapitulo: TcxDBSpinEdit
Top = 273
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 273
ExplicitWidth = 865
Width = 865
end
end end
end end
end end
@ -406,11 +437,6 @@ inherited fEditorEmpresa: TfEditorEmpresa
Height = 367 Height = 367
ExplicitWidth = 660 ExplicitWidth = 660
ExplicitHeight = 367 ExplicitHeight = 367
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewCODIGO_CONTABLE: TcxGridDBColumn
VisibleForCustomization = False
end
end
end end
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 660 Width = 660

View File

@ -58,7 +58,7 @@ implementation
{$INCLUDE ..\..\..\FactuGES.inc} {$INCLUDE ..\..\..\FactuGES.inc}
uses uses
uCustomEditor, uDataModuleEmpresas; uCustomEditor, uDataModuleEmpresas, uFactuGES_App;
{ {
******************************* TfEditorEmpresa ******************************* ******************************* TfEditorEmpresa *******************************
@ -143,6 +143,11 @@ begin
if not Assigned(Empresa) then if not Assigned(Empresa) then
raise Exception.Create('No hay ningún Empresa asignado'); raise Exception.Create('No hay ningún Empresa asignado');
if (AppFactuGES.UsuarioActivo.ID_PERFIL <> CTE_PERFIL_ADMINISTRADOR) then
begin
pagTiendas.TabVisible := False;
end;
Empresa.DataTable.Active := True; Empresa.DataTable.Active := True;
pgPaginas.ActivePage := pagGeneral; pgPaginas.ActivePage := pagGeneral;
// frViewEmpresa1.cbFormaPago.Properties.OnEditValueChanged := frViewEmpresa1.FormaPagoEditValueChanged; // frViewEmpresa1.cbFormaPago.Properties.OnEditValueChanged := frViewEmpresa1.FormaPagoEditValueChanged;

View File

@ -35,7 +35,7 @@ inherited frViewEmpresa: TfrViewEmpresa
end end
object eCalle: TcxDBTextEdit object eCalle: TcxDBTextEdit
Left = 195 Left = 195
Top = 274 Top = 355
DataBinding.DataField = 'CALLE' DataBinding.DataField = 'CALLE'
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame Style.BorderColor = clWindowFrame
@ -52,12 +52,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 7 TabOrder = 10
Width = 84 Width = 84
end end
object cbProvincia: TcxDBComboBox object cbProvincia: TcxDBComboBox
Left = 195 Left = 195
Top = 301 Top = 382
DataBinding.DataField = 'PROVINCIA' DataBinding.DataField = 'PROVINCIA'
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
Properties.OnInitPopup = eProvinciaPropertiesInitPopup Properties.OnInitPopup = eProvinciaPropertiesInitPopup
@ -77,12 +77,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 8 TabOrder = 11
Width = 106 Width = 106
end end
object cbPoblacion: TcxDBComboBox object cbPoblacion: TcxDBComboBox
Left = 195 Left = 195
Top = 328 Top = 409
DataBinding.DataField = 'POBLACION' DataBinding.DataField = 'POBLACION'
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
Properties.OnInitPopup = ePoblacionPropertiesInitPopup Properties.OnInitPopup = ePoblacionPropertiesInitPopup
@ -102,12 +102,12 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 10 TabOrder = 13
Width = 100 Width = 100
end end
object eCodigoPostal: TcxDBTextEdit object eCodigoPostal: TcxDBTextEdit
Left = 369 Left = 497
Top = 301 Top = 382
DataBinding.DataField = 'CODIGO_POSTAL' DataBinding.DataField = 'CODIGO_POSTAL'
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
Style.BorderColor = clWindowFrame Style.BorderColor = clWindowFrame
@ -124,11 +124,11 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 9 TabOrder = 12
Width = 65 Width = 65
end end
object ePaginaWeb: TcxDBTextEdit object ePaginaWeb: TcxDBTextEdit
Left = 559 Left = 687
Top = 220 Top = 220
DataBinding.DataField = 'PAGINA_WEB' DataBinding.DataField = 'PAGINA_WEB'
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
@ -146,11 +146,11 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 18 TabOrder = 21
Width = 165 Width = 165
end end
object eMailParticular: TcxDBTextEdit object eMailParticular: TcxDBTextEdit
Left = 559 Left = 687
Top = 193 Top = 193
DataBinding.DataField = 'EMAIL_2' DataBinding.DataField = 'EMAIL_2'
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
@ -168,11 +168,11 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 17 TabOrder = 20
Width = 165 Width = 165
end end
object eMailTrabajo: TcxDBTextEdit object eMailTrabajo: TcxDBTextEdit
Left = 559 Left = 687
Top = 166 Top = 166
DataBinding.DataField = 'EMAIL_1' DataBinding.DataField = 'EMAIL_1'
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
@ -190,11 +190,11 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 16 TabOrder = 19
Width = 129 Width = 129
end end
object eTlfParticular: TcxDBTextEdit object eTlfParticular: TcxDBTextEdit
Left = 559 Left = 687
Top = 55 Top = 55
DataBinding.DataField = 'TELEFONO_2' DataBinding.DataField = 'TELEFONO_2'
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
@ -212,11 +212,11 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 13 TabOrder = 16
Width = 91 Width = 91
end end
object eTlfTrabajo: TcxDBTextEdit object eTlfTrabajo: TcxDBTextEdit
Left = 559 Left = 687
Top = 28 Top = 28
DataBinding.DataField = 'TELEFONO_1' DataBinding.DataField = 'TELEFONO_1'
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
@ -234,11 +234,11 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 12 TabOrder = 15
Width = 127 Width = 127
end end
object eTlfMovil: TcxDBTextEdit object eTlfMovil: TcxDBTextEdit
Left = 559 Left = 687
Top = 82 Top = 82
DataBinding.DataField = 'MOVIL_1' DataBinding.DataField = 'MOVIL_1'
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
@ -256,11 +256,11 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 14 TabOrder = 17
Width = 155 Width = 155
end end
object eFax: TcxDBTextEdit object eFax: TcxDBTextEdit
Left = 559 Left = 687
Top = 109 Top = 109
DataBinding.DataField = 'FAX' DataBinding.DataField = 'FAX'
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
@ -278,7 +278,7 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 15 TabOrder = 18
Width = 391 Width = 391
end end
object eNombre: TcxDBTextEdit object eNombre: TcxDBTextEdit
@ -352,7 +352,7 @@ inherited frViewEmpresa: TfrViewEmpresa
Width = 76 Width = 76
end end
object cxDBImage1: TcxDBImage object cxDBImage1: TcxDBImage
Left = 464 Left = 592
Top = 277 Top = 277
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
Properties.Stretch = True Properties.Stretch = True
@ -367,7 +367,7 @@ inherited frViewEmpresa: TfrViewEmpresa
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 19 TabOrder = 22
Height = 100 Height = 100
Width = 140 Width = 140
end end
@ -427,7 +427,7 @@ inherited frViewEmpresa: TfrViewEmpresa
end end
inline frViewObservaciones1: TfrViewObservaciones inline frViewObservaciones1: TfrViewObservaciones
Left = 22 Left = 22
Top = 385 Top = 466
Width = 521 Width = 521
Height = 150 Height = 150
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -436,10 +436,10 @@ inherited frViewEmpresa: TfrViewEmpresa
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
Font.Style = [] Font.Style = []
ParentFont = False ParentFont = False
TabOrder = 11 TabOrder = 14
ReadOnly = False ReadOnly = False
ExplicitLeft = 22 ExplicitLeft = 22
ExplicitTop = 385 ExplicitTop = 466
inherited memObservaciones: TcxDBMemo inherited memObservaciones: TcxDBMemo
DataBinding.DataField = 'NOTAS' DataBinding.DataField = 'NOTAS'
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
@ -477,6 +477,94 @@ inherited frViewEmpresa: TfrViewEmpresa
TabOrder = 6 TabOrder = 6
Width = 121 Width = 121
end end
object eDescuento: TcxDBSpinEdit
Left = 195
Top = 244
DataBinding.DataField = 'DESCUENTO_GENERAL'
DataBinding.DataSource = DADataSource
Properties.Alignment.Horz = taRightJustify
Properties.AssignedValues.MinValue = True
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
Properties.MaxValue = 100.000000000000000000
Properties.UseLeftAlignmentOnEditing = False
Properties.ValueType = vtFloat
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
Style.ButtonStyle = bts3D
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 = 7
Width = 865
end
object eDescuentoLinea: TcxDBSpinEdit
Left = 195
Top = 298
DataBinding.DataField = 'DESCUENTO_LINEA'
DataBinding.DataSource = DADataSource
Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
Properties.MaxValue = 100.000000000000000000
Properties.UseLeftAlignmentOnEditing = False
Properties.ValueType = vtFloat
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
Style.ButtonStyle = bts3D
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 = 9
Width = 865
end
object eDescuentoCapitulo: TcxDBSpinEdit
Left = 195
Top = 271
DataBinding.DataField = 'DESCUENTO_CAPITULO'
DataBinding.DataSource = DADataSource
Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
Properties.MaxValue = 100.000000000000000000
Properties.UseLeftAlignmentOnEditing = False
Properties.ValueType = vtFloat
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
Style.ButtonStyle = bts3D
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 = 8
Width = 865
end
object dxLayoutControl1Group_Root: TdxLayoutGroup object dxLayoutControl1Group_Root: TdxLayoutGroup
ShowCaption = False ShowCaption = False
Hidden = True Hidden = True
@ -528,6 +616,21 @@ inherited frViewEmpresa: TfrViewEmpresa
Control = ePrecioPunto Control = ePrecioPunto
ControlOptions.ShowBorder = False ControlOptions.ShowBorder = False
end end
object dxLayoutControl1Item23: TdxLayoutItem
Caption = 'Descuento especial general:'
Control = eDescuento
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item25: TdxLayoutItem
Caption = 'Descuento cap'#237'tulo:'
Control = eDescuentoCapitulo
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item24: TdxLayoutItem
Caption = 'Descuento linea:'
Control = eDescuentoLinea
ControlOptions.ShowBorder = False
end
end end
object dxLayoutControl1Group3: TdxLayoutGroup object dxLayoutControl1Group3: TdxLayoutGroup
AutoAligns = [aaHorizontal] AutoAligns = [aaHorizontal]

View File

@ -89,6 +89,12 @@ type
dxLayoutControl1Item21: TdxLayoutItem; dxLayoutControl1Item21: TdxLayoutItem;
ePrecioPunto: TcxDBCurrencyEdit; ePrecioPunto: TcxDBCurrencyEdit;
dxLayoutControl1Item22: TdxLayoutItem; dxLayoutControl1Item22: TdxLayoutItem;
dxLayoutControl1Item23: TdxLayoutItem;
eDescuento: TcxDBSpinEdit;
dxLayoutControl1Item24: TdxLayoutItem;
eDescuentoLinea: TcxDBSpinEdit;
dxLayoutControl1Item25: TdxLayoutItem;
eDescuentoCapitulo: TcxDBSpinEdit;
procedure actAnadirExecute(Sender: TObject); procedure actAnadirExecute(Sender: TObject);
procedure actEliminarExecute(Sender: TObject); procedure actEliminarExecute(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject); procedure actEliminarUpdate(Sender: TObject);

View File

@ -10,20 +10,25 @@ uses
const const
CTE_PERFIL_ADMINISTRADOR = 3; CTE_PERFIL_ADMINISTRADOR = 3;
CTE_PERFIL_GERENCIA = 2; CTE_PERFIL_GERENCIA = 2;
CTE_PERFIL_VENDEDOR_GRADEN = 7;
CTE_PERFIL_VENDEDOR_MARBELLA = 9;
CTE_PERFIL_VENDEDOR_DONOSTI = 10;
CTE_PERFIL_VENDEDOR_BILBAO = 11;
CTE_PERFIL_VENDEDOR_GRADEN_UECKO = 6;
CTE_PERFIL_VENDEDOR_GRADEN_UECKO2 = 12; CTE_PERFIL_VENDEDOR_GRADEN_UECKO2 = 12;
CTE_PERFIL_COMPRAS = 8; CTE_PERFIL_COMPRAS = 8;
CTE_PERFIL_USUARIO = 5;
CTE_EMPRESA_ABETO = 1; CTE_EMPRESA_ABETO = 1;
CTE_EMPRESA_GRADEN = 2; CTE_EMPRESA_GRADEN = 2;
CTE_EMPRESA_GRADEN_MARBELLA = 6; CTE_EMPRESA_GRADEN_MARBELLA = 6;
CTE_EMPRESA_GRADEN_DONOSTI = 10; CTE_EMPRESA_GRADEN_DONOSTI = 10;
CTE_EMPRESA_GRADEN_BILBAO = 15; CTE_EMPRESA_GRADEN_BILBAO = 15;
CTE_EMPRESA_GRADEN_BARCELONA = 20;
CTE_PERFIL_TODO_INI = 40;
CTE_PERFIL_TODO_FIN = 49;
CTE_PERFIL_PRESUPUESTOS_INI = 30;
CTE_PERFIL_PRESUPUESTOS_FIN = 39;
CTE_PERFIL_VENDEDOR_INI = 50;
CTE_PERFIL_VENDEDOR_FIN = 69;
type type
TAppFactuGES_Event = procedure; TAppFactuGES_Event = procedure;

View File

@ -58,55 +58,55 @@
<DelphiCompile Include="Base.dpk"> <DelphiCompile Include="Base.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\Modulos\Contratos de cliente\adortl.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\cxDataD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\cxEditorsD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\cxExtEditorsD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\cxGridD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\cxLibraryD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\cxPageControlD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\DataAbstract_Core_D11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\dbrtl.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\dclIndyCore.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\designide.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\dsnap.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\dxGDIPlusD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\dxPSCoreD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\dxThemeD11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\GUISDK_D11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\IndyCore.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\IndyProtocols.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\IndySystem.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\Jcl.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\JclVcl.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\JSDialog100.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\JvCmpD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\JvCoreD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\JvCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\JvDlgsD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\JvMMD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\JvNetD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\JvPageCompsD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\JvStdCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\JvSystemD11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\pckMD5.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\pckUCDataConnector.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\pckUserControl_RT.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\PluginSDK_D11R.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\PngComponentsD10.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\PNG_D10.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\RemObjects_Core_D11.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\rtl.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\TB2k_D10.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\tbx_d10.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\vcl.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\vclactnband.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\vcldb.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\vcljpg.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\VclSmp.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\vclx.dcp" />
<DCCReference Include="..\Modulos\Contratos de cliente\xmlrtl.dcp" />
<DCCReference Include="..\Servicios\FactuGES_Intf.pas" /> <DCCReference Include="..\Servicios\FactuGES_Intf.pas" />
<DCCReference Include="C:\Documents and Settings\Usuario\adortl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxDataD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxEditorsD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxExtEditorsD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxGridD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxLibraryD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxPageControlD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\DataAbstract_Core_D11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dbrtl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dclIndyCore.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\designide.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dsnap.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dxGDIPlusD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dxPSCoreD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dxThemeD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\GUISDK_D11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\IndyCore.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\IndyProtocols.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\IndySystem.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Jcl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JclVcl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JSDialog100.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvCmpD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvCoreD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvCtrlsD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvDlgsD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvMMD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvNetD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvPageCompsD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvStdCtrlsD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvSystemD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\pckMD5.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\pckUCDataConnector.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\pckUserControl_RT.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\PluginSDK_D11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\PngComponentsD10.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\PNG_D10.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\RemObjects_Core_D11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\TB2k_D10.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\tbx_d10.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vclactnband.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vcldb.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vcljpg.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\VclSmp.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vclx.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\xmlrtl.dcp" />
<DCCReference Include="Conexion\uConfigurarConexion.pas"> <DCCReference Include="Conexion\uConfigurarConexion.pas">
<Form>fConfigurarConexion</Form> <Form>fConfigurarConexion</Form>
<DesignClass>TForm</DesignClass> <DesignClass>TForm</DesignClass>

View File

@ -52,9 +52,7 @@
<Borland.Personality>Delphi.Personality</Borland.Personality> <Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType> <Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject> <BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">4</VersionInfo><VersionInfo Name="MinorVer">5</VersionInfo><VersionInfo Name="Release">4</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">4.5.4.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">4.5.4.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages> <BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">4</VersionInfo><VersionInfo Name="MinorVer">6</VersionInfo><VersionInfo Name="Release">1</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">4.6.1.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">4.6.1.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages> <Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages>

Binary file not shown.

View File

@ -267,12 +267,16 @@ object fPantallaPrincipal: TfPantallaPrincipal
object actMenuCompras: TAction object actMenuCompras: TAction
Category = 'Menus' Category = 'Menus'
Caption = 'Compras' Caption = 'Compras'
Enabled = False
Visible = False
OnExecute = actMenuComprasExecute OnExecute = actMenuComprasExecute
OnUpdate = actMenuComprasUpdate OnUpdate = actMenuComprasUpdate
end end
object actMenuLogistica: TAction object actMenuLogistica: TAction
Category = 'Menus' Category = 'Menus'
Caption = 'Log'#237'stica' Caption = 'Log'#237'stica'
Enabled = False
Visible = False
OnExecute = actMenuLogisticaExecute OnExecute = actMenuLogisticaExecute
end end
object actMenuVentas: TAction object actMenuVentas: TAction
@ -296,22 +300,30 @@ object fPantallaPrincipal: TfPantallaPrincipal
object actConfigurar: TAction object actConfigurar: TAction
Category = 'Opciones' Category = 'Opciones'
Caption = 'Configurar FactuGES...' Caption = 'Configurar FactuGES...'
Enabled = False
Visible = False
OnExecute = actConfigurarExecute OnExecute = actConfigurarExecute
end end
object actMenuContabilidad: TAction object actMenuContabilidad: TAction
Category = 'Menus' Category = 'Menus'
Caption = 'Contabilidad' Caption = 'Contabilidad'
Enabled = False
Visible = False
OnExecute = actMenuContabilidadExecute OnExecute = actMenuContabilidadExecute
OnUpdate = actMenuComprasUpdate OnUpdate = actMenuComprasUpdate
end end
object actMenuEmpresa: TAction object actMenuEmpresa: TAction
Category = 'Menus' Category = 'Menus'
Caption = 'Empresa' Caption = 'Empresa'
Enabled = False
Visible = False
OnExecute = actMenuEmpresaExecute OnExecute = actMenuEmpresaExecute
end end
object actMenuInformes: TAction object actMenuInformes: TAction
Category = 'Menus' Category = 'Menus'
Caption = 'Informes' Caption = 'Informes'
Enabled = False
Visible = False
OnExecute = actMenuInformesExecute OnExecute = actMenuInformesExecute
OnUpdate = actMenuComprasUpdate OnUpdate = actMenuComprasUpdate
end end
@ -618,6 +630,8 @@ object fPantallaPrincipal: TfPantallaPrincipal
object Administracin1: TMenuItem object Administracin1: TMenuItem
Tag = 1 Tag = 1
Caption = 'Administraci'#243'n' Caption = 'Administraci'#243'n'
Enabled = False
Visible = False
object Usuarios1: TMenuItem object Usuarios1: TMenuItem
Caption = 'Usuarios' Caption = 'Usuarios'
OnClick = Usuarios1Click OnClick = Usuarios1Click
@ -654,8 +668,12 @@ object fPantallaPrincipal: TfPantallaPrincipal
Tag = 200 Tag = 200
Caption = '-' Caption = '-'
end end
object N11: TMenuItem
Tag = 400
Caption = '-'
end
object N6: TMenuItem object N6: TMenuItem
Tag = 300 Tag = 1100
Caption = '-' Caption = '-'
end end
end end

View File

@ -95,6 +95,7 @@ type
actMenuInformes: TAction; actMenuInformes: TAction;
actInformacionEmpresa: TAction; actInformacionEmpresa: TAction;
cxLocalizer1: TcxLocalizer; cxLocalizer1: TcxLocalizer;
N11: TMenuItem;
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure Salir1Click(Sender: TObject); procedure Salir1Click(Sender: TObject);
procedure actSalirExecute(Sender: TObject); procedure actSalirExecute(Sender: TObject);
@ -194,64 +195,93 @@ end;
procedure TfPantallaPrincipal.FormShow(Sender: TObject); procedure TfPantallaPrincipal.FormShow(Sender: TObject);
begin begin
//Los usuarios SOLO PRESUPUESTOS verán solo clientes y presupuestos de la empresa asignada o todas
if ((AppFactuGES.UsuarioActivo.ID_PERFIL >= CTE_PERFIL_PRESUPUESTOS_INI)
and (AppFactuGES.UsuarioActivo.ID_PERFIL <= CTE_PERFIL_PRESUPUESTOS_FIN)) then
begin
//no verá nada más que presupuestos
end;
//Los usuarios SOLO VENDEDOR verán solo ventas y caja
if ((AppFactuGES.UsuarioActivo.ID_PERFIL >= CTE_PERFIL_VENDEDOR_INI)
and (AppFactuGES.UsuarioActivo.ID_PERFIL <= CTE_PERFIL_VENDEDOR_FIN)) then
begin
actMenuContabilidad.Visible := True;
actMenuContabilidad.Enabled := True;
end;
//El usuario vendedor de graden solo podrá ver ventas y caja (Graden-Vendedor(2)) //El usuario vendedor de graden solo podrá ver ventas y caja (Graden-Vendedor(2))
if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_GRADEN) if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_GRADEN_UECKO2) then
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_MARBELLA)
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_DONOSTI)
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_BILBAO)
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_GRADEN_UECKO)
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_GRADEN_UECKO2) then
begin begin
Compras1.Enabled := False; actMenuLogistica.Visible := True;
Compras1.Visible := False; actMenuLogistica.Enabled := True;
Logistica1.Enabled := False; actMenuContabilidad.Visible := True;
Logistica1.Visible := False; actMenuContabilidad.Enabled := True;
ConfigurarFactuGES1.Enabled := False; end;
ConfigurarFactuGES1.Visible := False;
end //Los usuarios TOTAL verán todo menos contabilidad, informes y logística
//El usuario normal de uecko solo no verá contabilidad if ((AppFactuGES.UsuarioActivo.ID_PERFIL >= CTE_PERFIL_TODO_INI)
else if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_USUARIO) then and (AppFactuGES.UsuarioActivo.ID_PERFIL <= CTE_PERFIL_TODO_FIN)) then
begin begin
Contabilidad1.Enabled := False; actMenuCompras.Visible := True;
Contabilidad1.Visible := False; actMenuCompras.Enabled := True;
ConfigurarFactuGES1.Enabled := False; actMenuEmpresa.Visible := True;
ConfigurarFactuGES1.Visible := False; actMenuEmpresa.Enabled := True;
actMenuEmpresa.Visible := True;
actMenuEmpresa.Enabled := True;
end; end;
//El usuario COMPRAS //El usuario COMPRAS
if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_COMPRAS) then if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_COMPRAS) then
begin begin
Contabilidad1.Enabled := False; //Esta condición tiene que ser dinámica ya que solo será visible en la empresa abeto ya que en graden no tiene sentido
Contabilidad1.Visible := False; //se mete en RefrescarUI
Ventas1.Enabled := False; {if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO) then
Ventas1.Visible := False; begin
ConfigurarFactuGES1.Enabled := False; actMenuLogistica.Visible := True;
ConfigurarFactuGES1.Visible := False; actMenuLogistica.Enabled := True;
end;}
actMenuCompras.Visible := True;
actMenuCompras.Enabled := True;
actMenuVentas.Visible := False;
actMenuVentas.Enabled := False;
end; end;
//El usuario GERENCIA) //El usuario GERENCIA)
if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_GERENCIA) if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_GERENCIA)
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_ADMINISTRADOR) then or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_ADMINISTRADOR) then
begin begin
Informes1.Enabled := True; //Esta condición tiene que ser dinámica ya que solo será visible en la empresa abeto ya que en graden no tiene sentido
Informes1.Visible := True; //se mete en RefrescarUI
end {if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO) then
else
begin begin
Informes1.Enabled := False; actMenuLogistica.Visible := True;
Informes1.Visible := False; actMenuLogistica.Enabled := True;
end; end;}
actMenuCompras.Visible := True;
actMenuCompras.Enabled := True;
actMenuInformes.Visible := True;
actMenuInformes.Enabled := True;
actMenuContabilidad.Visible := True;
actMenuContabilidad.Enabled := True;
actMenuEmpresa.Visible := True;
actMenuEmpresa.Enabled := True;
//SOLO ADMINISTRADOR
if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_ADMINISTRADOR) then
begin
actConfigurar.Visible := True;
actConfigurar.Enabled := True;
Administracin1.Visible := True;
Administracin1.Enabled := True;
end;
end;
InicializarUI; InicializarUI;
//Solo verá administracion de usuarios el perfil Administrador(3), están en la tabla usuarios
if (AppFactuGES.UsuarioActivo.ID_PERFIL <> CTE_PERFIL_ADMINISTRADOR) then
begin
// Perfiles1.Visible := False;
Administracin1.Visible := False;
end;
end; end;
procedure TfPantallaPrincipal.RefrescarUI; procedure TfPantallaPrincipal.RefrescarUI;
@ -265,8 +295,13 @@ begin
begin begin
ATitulo := AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + ATitulo; ATitulo := AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + ATitulo;
actMenuLogistica.Enabled := AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO; //AQUI MENUS DINAMICOS SEGUN EMPRESA Y PERFIL
actMenuLogistica.Visible := AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO; actMenuLogistica.Visible := (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO)
and ((AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_COMPRAS)
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_GERENCIA)
or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_ADMINISTRADOR));
actMenuLogistica.Enabled := actMenuLogistica.Visible;
end; end;

View File

@ -58,34 +58,34 @@
<DelphiCompile Include="GUIBase.dpk"> <DelphiCompile Include="GUIBase.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\Modulos\Contactos\Base.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\Base.dcp" />
<DCCReference Include="..\Modulos\Contactos\ccpackD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\ccpackD11.dcp" />
<DCCReference Include="..\Modulos\Contactos\cxDataD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\cxDataD11.dcp" />
<DCCReference Include="..\Modulos\Contactos\cxEditorsD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\cxEditorsD11.dcp" />
<DCCReference Include="..\Modulos\Contactos\cxExportD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\cxExportD11.dcp" />
<DCCReference Include="..\Modulos\Contactos\cxLibraryD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\cxLibraryD11.dcp" />
<DCCReference Include="..\Modulos\Contactos\dbrtl.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dbrtl.dcp" />
<DCCReference Include="..\Modulos\Contactos\dxGDIPlusD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dxGDIPlusD11.dcp" />
<DCCReference Include="..\Modulos\Contactos\dxLayoutControlD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dxLayoutControlD11.dcp" />
<DCCReference Include="..\Modulos\Contactos\dxPScxCommonD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dxPScxCommonD11.dcp" />
<DCCReference Include="..\Modulos\Contactos\dxPScxGrid6LnkD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dxPScxGrid6LnkD11.dcp" />
<DCCReference Include="..\Modulos\Contactos\dxThemeD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dxThemeD11.dcp" />
<DCCReference Include="..\Modulos\Contactos\frx11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\frx11.dcp" />
<DCCReference Include="..\Modulos\Contactos\frxe11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\frxe11.dcp" />
<DCCReference Include="..\Modulos\Contactos\fs11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\fs11.dcp" />
<DCCReference Include="..\Modulos\Contactos\JvAppFrmD11R.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\JvAppFrmD11R.dcp" />
<DCCReference Include="..\Modulos\Contactos\JvCtrlsD11R.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\JvCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Contactos\JvGlobusD11R.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\JvGlobusD11R.dcp" />
<DCCReference Include="..\Modulos\Contactos\PngComponentsD10.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\PngComponentsD10.dcp" />
<DCCReference Include="..\Modulos\Contactos\PNG_D10.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\PNG_D10.dcp" />
<DCCReference Include="..\Modulos\Contactos\rtl.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
<DCCReference Include="..\Modulos\Contactos\tb2k_d10.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\tb2k_d10.dcp" />
<DCCReference Include="..\Modulos\Contactos\tbx_d10.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\tbx_d10.dcp" />
<DCCReference Include="..\Modulos\Contactos\vcl.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" />
<DCCReference Include="..\Modulos\Contactos\vclactnband.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\vclactnband.dcp" />
<DCCReference Include="..\Modulos\Contactos\vcldb.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\vcldb.dcp" />
<DCCReference Include="..\Modulos\Contactos\vcljpg.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\vcljpg.dcp" />
<DCCReference Include="..\Modulos\Contactos\vclx.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\vclx.dcp" />
<DCCReference Include="uDialogBase.pas"> <DCCReference Include="uDialogBase.pas">
<Form>fDialogBase</Form> <Form>fDialogBase</Form>
</DCCReference> </DCCReference>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -34,7 +34,7 @@ implementation
{$R *.dfm} {$R *.dfm}
uses uses
Forms, Dialogs, SysUtils, Forms, Dialogs, SysUtils, uFactuGES_App,
uAlbaranesClienteController, uBizAlbaranesCliente, uAlbaranesClienteViewRegister; uAlbaranesClienteController, uBizAlbaranesCliente, uAlbaranesClienteViewRegister;
function GetModule : TModuleController; function GetModule : TModuleController;
@ -71,6 +71,18 @@ constructor TPluginAlbaranesCliente.Create(AOwner: TComponent);
begin begin
inherited; inherited;
uAlbaranesClienteViewRegister.RegisterViews; uAlbaranesClienteViewRegister.RegisterViews;
//Los usuarios SOLO PRESUPUESTOS verán solo clientes y presupuestos de la empresa asignada o todas
if ((AppFactuGES.UsuarioActivo.ID_PERFIL >= CTE_PERFIL_PRESUPUESTOS_INI)
and (AppFactuGES.UsuarioActivo.ID_PERFIL <= CTE_PERFIL_PRESUPUESTOS_FIN)) then
begin
actAlbaranesCliente.Enabled := False;
actAlbaranesCliente.Visible := False;
actAlbaranesDevCliente.Enabled := False;
actAlbaranesDevCliente.Visible := False;
end;
end; end;
destructor TPluginAlbaranesCliente.Destroy; destructor TPluginAlbaranesCliente.Destroy;

View File

@ -283,6 +283,11 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
DataType = datString DataType = datString
Size = 10 Size = 10
end end
item
Name = 'CONCEPTO_EN'
DataType = datString
Size = 1000
end
item item
Name = 'CONCEPTO' Name = 'CONCEPTO'
DataType = datString DataType = datString
@ -874,15 +879,18 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
'.ID_ALBARAN,'#10' ALBARANES_CLIENTE_DETALLES.POSICION, ALBARAN' + '.ID_ALBARAN,'#10' ALBARANES_CLIENTE_DETALLES.POSICION, ALBARAN' +
'ES_CLIENTE_DETALLES.TIPO_DETALLE,'#10'/*'#10' ALBARANES_CLIENTE_DE' + 'ES_CLIENTE_DETALLES.TIPO_DETALLE,'#10'/*'#10' ALBARANES_CLIENTE_DE' +
'TALLES.CONCEPTO as CONCEPTO_RTF,'#10' F_RTFTOTEXT(ALBARANES_CL' + 'TALLES.CONCEPTO as CONCEPTO_RTF,'#10' F_RTFTOTEXT(ALBARANES_CL' +
'IENTE_DETALLES.CONCEPTO) as CONCEPTO,'#10'*/'#10' ALBARANES_CLIENT' + 'IENTE_DETALLES.CONCEPTO) as CONCEPTO,'#10'*/'#10' ARTICULOS_IDIOMA' +
'E_DETALLES.CONCEPTO,'#10' ALBARANES_CLIENTE_DETALLES.CANTIDAD,' + 'S.DESCRIPCION as CONCEPTO_EN,'#10' ALBARANES_CLIENTE_DETALLES.' +
#10' ALBARANES_CLIENTE_DETALLES.DESCUENTO, ALBARANES_CLIENTE_' + 'CONCEPTO,'#10' ALBARANES_CLIENTE_DETALLES.CANTIDAD,'#10' ALB' +
'DETALLES.VISIBLE,'#10' ALBARANES_CLIENTE_DETALLES.IMPORTE_UNID' + 'ARANES_CLIENTE_DETALLES.DESCUENTO, ALBARANES_CLIENTE_DETALLES.VI' +
'AD, ALBARANES_CLIENTE_DETALLES.IMPORTE_TOTAL,'#10' ARTICULOS.R' + 'SIBLE,'#10' ALBARANES_CLIENTE_DETALLES.IMPORTE_UNIDAD, ALBARAN' +
'EFERENCIA, ARTICULOS.FAMILIA, ARTICULOS.REFERENCIA_PROV as REFER' + 'ES_CLIENTE_DETALLES.IMPORTE_TOTAL,'#10' ARTICULOS.REFERENCIA, ' +
'ENCIA_PROVEEDOR'#10#10'FROM ALBARANES_CLIENTE_DETALLES'#10'LEFT JOIN ARTIC' + 'ARTICULOS.FAMILIA, ARTICULOS.REFERENCIA_PROV as REFERENCIA_PROVE' +
'ULOS ON (ALBARANES_CLIENTE_DETALLES.ID_ARTICULO = ARTICULOS.ID)'#10 + 'EDOR'#10#10'FROM ALBARANES_CLIENTE_DETALLES'#10'LEFT JOIN ARTICULOS ON (AL' +
'WHERE ID_ALBARAN = :ID_ALBARAN'#10'ORDER BY POSICION'#10 'BARANES_CLIENTE_DETALLES.ID_ARTICULO = ARTICULOS.ID)'#10'LEFT JOIN A' +
'RTICULOS_IDIOMAS ON (ALBARANES_CLIENTE_DETALLES.ID_ARTICULO = AR' +
'TICULOS_IDIOMAS.ID_ARTICULO)'#10'WHERE ID_ALBARAN = :ID_ALBARAN'#10'ORDE' +
'R BY POSICION'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = < ColumnMappings = <
item item
@ -936,6 +944,11 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
item item
DatasetField = 'VISIBLE' DatasetField = 'VISIBLE'
TableField = 'VISIBLE' TableField = 'VISIBLE'
end
item
DatasetField = 'CONCEPTO_EN'
TableField = '<unknown>'
SQLOrigin = 'CONCEPTO_EN'
end> end>
end> end>
Name = 'Informe_Detalles' Name = 'Informe_Detalles'
@ -957,6 +970,11 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
DataType = datString DataType = datString
Size = 10 Size = 10
end end
item
Name = 'CONCEPTO_EN'
DataType = datString
Size = 1000
end
item item
Name = 'CONCEPTO' Name = 'CONCEPTO'
DataType = datString DataType = datString

View File

@ -31,6 +31,12 @@ inherited frViewElegirArticulosAlbaranesCliente: TfrViewElegirArticulosAlbaranes
ExplicitWidth = 121 ExplicitWidth = 121
Width = 121 Width = 121
end end
inherited txtFiltroTodo2: TcxTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
end
end end
end end
end end

View File

@ -23,6 +23,7 @@
<Projects Include="..\Pedidos a proveedor\Views\PedidosProveedor_view.dproj" /> <Projects Include="..\Pedidos a proveedor\Views\PedidosProveedor_view.dproj" />
<Projects Include="..\Relaciones\Albaranes de proveedor - Facturas de proveedor\AlbProv_FacProv_relation.dproj" /> <Projects Include="..\Relaciones\Albaranes de proveedor - Facturas de proveedor\AlbProv_FacProv_relation.dproj" />
<Projects Include="..\Relaciones\Pedidos de proveedor - Albaranes de proveedor\PedProv_AlbProv_relation.dproj" /> <Projects Include="..\Relaciones\Pedidos de proveedor - Albaranes de proveedor\PedProv_AlbProv_relation.dproj" />
<Projects Include="..\Remesas de cliente\Views\RemesasCliente_view.dproj" />
<Projects Include="Controller\AlbaranesProveedor_controller.dproj" /> <Projects Include="Controller\AlbaranesProveedor_controller.dproj" />
<Projects Include="Data\AlbaranesProveedor_data.dproj" /> <Projects Include="Data\AlbaranesProveedor_data.dproj" />
<Projects Include="Model\AlbaranesProveedor_model.dproj" /> <Projects Include="Model\AlbaranesProveedor_model.dproj" />
@ -251,14 +252,23 @@
<Target Name="FacturasCliente_controller:Make"> <Target Name="FacturasCliente_controller:Make">
<MSBuild Projects="..\Facturas de cliente\Controller\FacturasCliente_controller.dproj" Targets="Make" /> <MSBuild Projects="..\Facturas de cliente\Controller\FacturasCliente_controller.dproj" Targets="Make" />
</Target> </Target>
<Target Name="RemesasCliente_view">
<MSBuild Projects="..\Remesas de cliente\Views\RemesasCliente_view.dproj" Targets="" />
</Target>
<Target Name="RemesasCliente_view:Clean">
<MSBuild Projects="..\Remesas de cliente\Views\RemesasCliente_view.dproj" Targets="Clean" />
</Target>
<Target Name="RemesasCliente_view:Make">
<MSBuild Projects="..\Remesas de cliente\Views\RemesasCliente_view.dproj" Targets="Make" />
</Target>
<Target Name="Build"> <Target Name="Build">
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_view;Articulos_view;AlbaranesProveedor_model;AlbaranesProveedor_data;AlbaranesProveedor_controller;AlbaranesProveedor_view;AlbaranesProveedor_plugin;FactuGES;FactuGES_Server;FacturasProveedor_view;Contabilidad_view;Contactos_controller;FacturasProveedor_controller;PedidosProveedor_model;PedidosProveedor_data;PedidosProveedor_controller;PedidosProveedor_view;PedProv_AlbProv_relation;AlbProv_FacProv_relation;FacturasProveedor_model;FacturasCliente_controller" /> <CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_view;Articulos_view;AlbaranesProveedor_model;AlbaranesProveedor_data;AlbaranesProveedor_controller;AlbaranesProveedor_view;AlbaranesProveedor_plugin;FactuGES;FactuGES_Server;FacturasProveedor_view;Contabilidad_view;Contactos_controller;FacturasProveedor_controller;PedidosProveedor_model;PedidosProveedor_data;PedidosProveedor_controller;PedidosProveedor_view;PedProv_AlbProv_relation;AlbProv_FacProv_relation;FacturasProveedor_model;FacturasCliente_controller;RemesasCliente_view" />
</Target> </Target>
<Target Name="Clean"> <Target Name="Clean">
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_view:Clean;Articulos_view:Clean;AlbaranesProveedor_model:Clean;AlbaranesProveedor_data:Clean;AlbaranesProveedor_controller:Clean;AlbaranesProveedor_view:Clean;AlbaranesProveedor_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;FacturasProveedor_view:Clean;Contabilidad_view:Clean;Contactos_controller:Clean;FacturasProveedor_controller:Clean;PedidosProveedor_model:Clean;PedidosProveedor_data:Clean;PedidosProveedor_controller:Clean;PedidosProveedor_view:Clean;PedProv_AlbProv_relation:Clean;AlbProv_FacProv_relation:Clean;FacturasProveedor_model:Clean;FacturasCliente_controller:Clean" /> <CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_view:Clean;Articulos_view:Clean;AlbaranesProveedor_model:Clean;AlbaranesProveedor_data:Clean;AlbaranesProveedor_controller:Clean;AlbaranesProveedor_view:Clean;AlbaranesProveedor_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;FacturasProveedor_view:Clean;Contabilidad_view:Clean;Contactos_controller:Clean;FacturasProveedor_controller:Clean;PedidosProveedor_model:Clean;PedidosProveedor_data:Clean;PedidosProveedor_controller:Clean;PedidosProveedor_view:Clean;PedProv_AlbProv_relation:Clean;AlbProv_FacProv_relation:Clean;FacturasProveedor_model:Clean;FacturasCliente_controller:Clean;RemesasCliente_view:Clean" />
</Target> </Target>
<Target Name="Make"> <Target Name="Make">
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_view:Make;Articulos_view:Make;AlbaranesProveedor_model:Make;AlbaranesProveedor_data:Make;AlbaranesProveedor_controller:Make;AlbaranesProveedor_view:Make;AlbaranesProveedor_plugin:Make;FactuGES:Make;FactuGES_Server:Make;FacturasProveedor_view:Make;Contabilidad_view:Make;Contactos_controller:Make;FacturasProveedor_controller:Make;PedidosProveedor_model:Make;PedidosProveedor_data:Make;PedidosProveedor_controller:Make;PedidosProveedor_view:Make;PedProv_AlbProv_relation:Make;AlbProv_FacProv_relation:Make;FacturasProveedor_model:Make;FacturasCliente_controller:Make" /> <CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_view:Make;Articulos_view:Make;AlbaranesProveedor_model:Make;AlbaranesProveedor_data:Make;AlbaranesProveedor_controller:Make;AlbaranesProveedor_view:Make;AlbaranesProveedor_plugin:Make;FactuGES:Make;FactuGES_Server:Make;FacturasProveedor_view:Make;Contabilidad_view:Make;Contactos_controller:Make;FacturasProveedor_controller:Make;PedidosProveedor_model:Make;PedidosProveedor_data:Make;PedidosProveedor_controller:Make;PedidosProveedor_view:Make;PedProv_AlbProv_relation:Make;AlbProv_FacProv_relation:Make;FacturasProveedor_model:Make;FacturasCliente_controller:Make;RemesasCliente_view:Make" />
</Target> </Target>
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" /> <Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
</Project> </Project>

View File

@ -4,7 +4,7 @@ interface
uses uses
SysUtils, uDADataTable, uEditorDBItem, SysUtils, uDADataTable, uEditorDBItem, Classes,
uControllerBase, uIDataModuleAlbaranesProveedor, uProveedoresController, uControllerBase, uIDataModuleAlbaranesProveedor, uProveedoresController,
uDetallesAlbaranProveedorController, uBizAlbaranesProveedor, uDetallesAlbaranProveedorController, uBizAlbaranesProveedor,
uBizDireccionesContacto, uBizInventario, uBizDireccionesContacto, uBizInventario,
@ -56,6 +56,10 @@ type
procedure Preview(AAlbaran : IBizAlbaranProveedor; AllItems: Boolean = false); procedure Preview(AAlbaran : IBizAlbaranProveedor; AllItems: Boolean = false);
procedure Print(AAlbaran : IBizAlbaranProveedor; AllItems: Boolean = false); procedure Print(AAlbaran : IBizAlbaranProveedor; AllItems: Boolean = false);
function DarListaAnosAlbaranes: TStringList;
procedure FiltrarAno(AAlbaran: IBizAlbaranProveedor; ADynWhereDataTable: WideString; const Ano: String);
end; end;
TAlbaranesProveedorController = class(TControllerBase, IAlbaranesProveedorController) TAlbaranesProveedorController = class(TControllerBase, IAlbaranesProveedorController)
@ -122,6 +126,9 @@ type
procedure Preview(AAlbaran : IBizAlbaranProveedor; AllItems: Boolean = false); procedure Preview(AAlbaran : IBizAlbaranProveedor; AllItems: Boolean = false);
procedure Print(AAlbaran : IBizAlbaranProveedor; AllItems: Boolean = false); procedure Print(AAlbaran : IBizAlbaranProveedor; AllItems: Boolean = false);
function DarListaAnosAlbaranes: TStringList;
procedure FiltrarAno(AAlbaran: IBizAlbaranProveedor; ADynWhereDataTable: WideString; const Ano: String);
end; end;
implementation implementation
@ -135,7 +142,7 @@ uses
uIEditorElegirAlbaranesProveedor, uIEditorDireccionEntregaAlbaranProveedor, uIEditorElegirAlbaranesProveedor, uIEditorDireccionEntregaAlbaranProveedor,
schContactosClient_Intf, Forms, schPedidosProveedorClient_Intf, uFactuGES_App, schContactosClient_Intf, Forms, schPedidosProveedorClient_Intf, uFactuGES_App,
uPedidosProveedorController, uBizDetallesPedidoProveedor, uPedidosProveedorController, uBizDetallesPedidoProveedor,
uArticulosController, uBizArticulos, uControllerDetallesBase, Classes, uArticulosController, uBizArticulos, uControllerDetallesBase,
schArticulosClient_Intf, uControllerDetallesArticulos, Variants, uDialogUtils, schArticulosClient_Intf, uControllerDetallesArticulos, Variants, uDialogUtils,
uIEditorAlbaranDevProveedor, uAlbaranesProveedorReportController, uIEditorAlbaranDevProveedor, uAlbaranesProveedorReportController,
schInventarioClient_Intf; schInventarioClient_Intf;
@ -732,6 +739,11 @@ begin
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf); Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
end; end;
function TAlbaranesProveedorController.DarListaAnosAlbaranes: TStringList;
begin
Result := FDataModule.GetAnosItems;
end;
procedure TAlbaranesProveedorController.DescartarCambios(AAlbaran: IBizAlbaranProveedor); procedure TAlbaranesProveedorController.DescartarCambios(AAlbaran: IBizAlbaranProveedor);
begin begin
if not Assigned(AAlbaran) then if not Assigned(AAlbaran) then
@ -1128,6 +1140,36 @@ begin
Result := ASeleccionados; Result := ASeleccionados;
end; end;
procedure TAlbaranesProveedorController.FiltrarAno(AAlbaran: IBizAlbaranProveedor; ADynWhereDataTable: WideString; const Ano: String);
var
Condicion: TDAWhereExpression;
FechaIni: String;
FechaFin: String;
begin
AAlbaran.DataTable.DynamicWhere.Clear;
AAlbaran.DataTable.DynamicWhere.Xml := ADynWhereDataTable;
if (Ano <> 'Todos') then
begin
// Filtrar las facturas actuales por empresa
FechaIni := '01/01/' + Ano;
FechaFin := '31/12/' + Ano;
with AAlbaran.DataTable.DynamicWhere do
begin
// (FECHA_INICIO between FECHA_FIN)
Condicion := NewBinaryExpression(NewField('', fld_AlbaranesProveedorFECHA_ALBARAN), NewConstant(FechaIni, datString), dboGreaterOrEqual);
Condicion := NewBinaryExpression(NewBinaryExpression(NewField('', fld_AlbaranesProveedorFECHA_ALBARAN), NewConstant(FechaFin, datString), dboLessOrEqual), Condicion, dboAnd);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Condicion, Expression, dboAnd);
end;
end;
end;
procedure TAlbaranesProveedorController.FiltrarEmpresa(AAlbaran: IBizAlbaranProveedor); procedure TAlbaranesProveedorController.FiltrarEmpresa(AAlbaran: IBizAlbaranProveedor);
var var
Condicion: TDAWhereExpression; Condicion: TDAWhereExpression;

View File

@ -404,4 +404,26 @@ inherited DataModuleAlbaranesProveedor: TDataModuleAlbaranesProveedor
Left = 328 Left = 328
Top = 40 Top = 40
end end
object tbl_ListaAnosAlbaranes: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'ANO'
DataType = datString
Size = 255
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_AlbaranesProveedor
LogicalName = 'ListaAnosAlbaranes'
IndexDefs = <>
Left = 320
Top = 176
end
object ds_ListaAnosAlbaranes: TDADataSource
DataSet = tbl_ListaAnosAlbaranes.Dataset
DataTable = tbl_ListaAnosAlbaranes
Left = 200
Top = 176
end
end end

View File

@ -20,6 +20,8 @@ type
ds_AlbaranesProveedor: TDADataSource; ds_AlbaranesProveedor: TDADataSource;
tbl_AlbaranesProveedor_Detalles: TDAMemDataTable; tbl_AlbaranesProveedor_Detalles: TDAMemDataTable;
ds_AlbaranesProveedor_Detalles: TDADataSource; ds_AlbaranesProveedor_Detalles: TDADataSource;
tbl_ListaAnosAlbaranes: TDAMemDataTable;
ds_ListaAnosAlbaranes: TDADataSource;
procedure DAClientDataModuleCreate(Sender: TObject); procedure DAClientDataModuleCreate(Sender: TObject);
private private
@ -29,6 +31,7 @@ type
procedure AsignarClaseNegocio(var APedido: TDAMemDataTable); virtual; procedure AsignarClaseNegocio(var APedido: TDAMemDataTable); virtual;
public public
function GetAnosItems : TStringList;
function GetItems : IBizAlbaranProveedor; virtual; function GetItems : IBizAlbaranProveedor; virtual;
function GetItem(const ID : Integer) : IBizAlbaranProveedor; function GetItem(const ID : Integer) : IBizAlbaranProveedor;
function NewItem : IBizAlbaranProveedor; function NewItem : IBizAlbaranProveedor;
@ -86,6 +89,30 @@ begin
end; end;
end; end;
function TDataModuleAlbaranesProveedor.GetAnosItems: TStringList;
var
AListaAnos: TStringList;
begin
AListaAnos := TStringList.Create;
ShowHourglassCursor;
try
with tbl_ListaAnosAlbaranes 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 TDataModuleAlbaranesProveedor.GetItem(const ID: Integer): IBizAlbaranProveedor; function TDataModuleAlbaranesProveedor.GetItem(const ID: Integer): IBizAlbaranProveedor;
var var
Condicion: TDAWhereExpression; Condicion: TDAWhereExpression;

View File

@ -3,11 +3,12 @@ unit uIDataModuleAlbaranesProveedor;
interface interface
uses uses
uBizAlbaranesProveedor; Classes, uBizAlbaranesProveedor;
type type
IDataModuleAlbaranesProveedor = interface IDataModuleAlbaranesProveedor = interface
['{2BAD8B3B-B57D-475C-B528-F82B320B2332}'] ['{2BAD8B3B-B57D-475C-B528-F82B320B2332}']
function GetAnosItems : TStringList;
function GetItems: IBizAlbaranProveedor; function GetItems: IBizAlbaranProveedor;
function GetItem(const ID : Integer) : IBizAlbaranProveedor; function GetItem(const ID : Integer) : IBizAlbaranProveedor;
function NewItem : IBizAlbaranProveedor; function NewItem : IBizAlbaranProveedor;

View File

@ -9,13 +9,21 @@ const
{ Data table rules ids { Data table rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_AlbaranesProveedor = '{8D693350-AF81-4654-A37F-D2986ECCB27F}'; RID_ListaAnosAlbaranes = '{28CED4BC-33F4-40F4-83E4-E08848FC1E4E}';
RID_AlbaranesProveedor_Detalles = '{FC1C8D83-798D-4686-8D2B-778C5C58D58E}'; RID_AlbaranesProveedor = '{92B5A6D8-07B2-43EB-93AB-DFDF49ADBCBC}';
RID_AlbaranesProveedor_Detalles = '{C52C3E9A-131F-4B9B-BD01-3C1324709B9A}';
{ Data table names } { Data table names }
nme_ListaAnosAlbaranes = 'ListaAnosAlbaranes';
nme_AlbaranesProveedor = 'AlbaranesProveedor'; nme_AlbaranesProveedor = 'AlbaranesProveedor';
nme_AlbaranesProveedor_Detalles = 'AlbaranesProveedor_Detalles'; nme_AlbaranesProveedor_Detalles = 'AlbaranesProveedor_Detalles';
{ ListaAnosAlbaranes fields }
fld_ListaAnosAlbaranesANO = 'ANO';
{ ListaAnosAlbaranes field indexes }
idx_ListaAnosAlbaranesANO = 0;
{ AlbaranesProveedor fields } { AlbaranesProveedor fields }
fld_AlbaranesProveedorID = 'ID'; fld_AlbaranesProveedorID = 'ID';
fld_AlbaranesProveedorID_EMPRESA = 'ID_EMPRESA'; fld_AlbaranesProveedorID_EMPRESA = 'ID_EMPRESA';
@ -135,9 +143,44 @@ const
idx_AlbaranesProveedor_DetallesID_PEDIDO = 15; idx_AlbaranesProveedor_DetallesID_PEDIDO = 15;
type type
{ IListaAnosAlbaranes }
IListaAnosAlbaranes = interface(IDAStronglyTypedDataTable)
['{33C9DD4C-B066-4E1E-BAC2-D33101CD5DF7}']
{ 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;
{ TListaAnosAlbaranesDataTableRules }
TListaAnosAlbaranesDataTableRules = class(TIntfObjectDADataTableRules, IListaAnosAlbaranes)
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;
{ IAlbaranesProveedor } { IAlbaranesProveedor }
IAlbaranesProveedor = interface(IDAStronglyTypedDataTable) IAlbaranesProveedor = interface(IDAStronglyTypedDataTable)
['{814A087C-ECE6-4813-BEA6-CB74E108D40A}'] ['{3499891E-76EE-4361-ADB9-AAD05B52D9BE}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -628,7 +671,7 @@ type
{ IAlbaranesProveedor_Detalles } { IAlbaranesProveedor_Detalles }
IAlbaranesProveedor_Detalles = interface(IDAStronglyTypedDataTable) IAlbaranesProveedor_Detalles = interface(IDAStronglyTypedDataTable)
['{809FC030-BF60-4508-8C02-3D946FE5FDDD}'] ['{C2D2EEEB-4B4B-487D-BAA5-601DF6526278}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -845,6 +888,39 @@ implementation
uses Variants, uROBinaryHelpers; uses Variants, uROBinaryHelpers;
{ TListaAnosAlbaranesDataTableRules }
constructor TListaAnosAlbaranesDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TListaAnosAlbaranesDataTableRules.Destroy;
begin
inherited;
end;
function TListaAnosAlbaranesDataTableRules.GetANOValue: String;
begin
result := DataTable.Fields[idx_ListaAnosAlbaranesANO].AsString;
end;
procedure TListaAnosAlbaranesDataTableRules.SetANOValue(const aValue: String);
begin
DataTable.Fields[idx_ListaAnosAlbaranesANO].AsString := aValue;
end;
function TListaAnosAlbaranesDataTableRules.GetANOIsNull: boolean;
begin
result := DataTable.Fields[idx_ListaAnosAlbaranesANO].IsNull;
end;
procedure TListaAnosAlbaranesDataTableRules.SetANOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ListaAnosAlbaranesANO].AsVariant := Null;
end;
{ TAlbaranesProveedorDataTableRules } { TAlbaranesProveedorDataTableRules }
constructor TAlbaranesProveedorDataTableRules.Create(aDataTable: TDADataTable); constructor TAlbaranesProveedorDataTableRules.Create(aDataTable: TDADataTable);
var var
@ -2037,6 +2113,7 @@ end;
initialization initialization
RegisterDataTableRules(RID_ListaAnosAlbaranes, TListaAnosAlbaranesDataTableRules);
RegisterDataTableRules(RID_AlbaranesProveedor, TAlbaranesProveedorDataTableRules); RegisterDataTableRules(RID_AlbaranesProveedor, TAlbaranesProveedorDataTableRules);
RegisterDataTableRules(RID_AlbaranesProveedor_Detalles, TAlbaranesProveedor_DetallesDataTableRules); RegisterDataTableRules(RID_AlbaranesProveedor_Detalles, TAlbaranesProveedor_DetallesDataTableRules);

View File

@ -9,13 +9,48 @@ const
{ Delta rules ids { Delta rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_AlbaranesProveedorDelta = '{07B3E1E2-AE10-4702-B53E-35EA2E9BA458}'; RID_ListaAnosAlbaranesDelta = '{EB7BC9BB-BE99-4924-938C-57444404FC70}';
RID_AlbaranesProveedor_DetallesDelta = '{630BE931-8C66-4EA3-B692-DAD59C0E5F0A}'; RID_AlbaranesProveedorDelta = '{FDC593A7-FCEB-4038-B70B-3278EA632968}';
RID_AlbaranesProveedor_DetallesDelta = '{C4CAA354-B990-4830-BF20-21B9958F343D}';
type type
{ IListaAnosAlbaranesDelta }
IListaAnosAlbaranesDelta = interface(IListaAnosAlbaranes)
['{EB7BC9BB-BE99-4924-938C-57444404FC70}']
{ Property getters and setters }
function GetOldANOValue : String;
{ Properties }
property OldANO : String read GetOldANOValue;
end;
{ TListaAnosAlbaranesBusinessProcessorRules }
TListaAnosAlbaranesBusinessProcessorRules = class(TDABusinessProcessorRules, IListaAnosAlbaranes, IListaAnosAlbaranesDelta)
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;
{ IAlbaranesProveedorDelta } { IAlbaranesProveedorDelta }
IAlbaranesProveedorDelta = interface(IAlbaranesProveedor) IAlbaranesProveedorDelta = interface(IAlbaranesProveedor)
['{07B3E1E2-AE10-4702-B53E-35EA2E9BA458}'] ['{FDC593A7-FCEB-4038-B70B-3278EA632968}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer; function GetOldID_EMPRESAValue : Integer;
@ -507,7 +542,7 @@ type
{ IAlbaranesProveedor_DetallesDelta } { IAlbaranesProveedor_DetallesDelta }
IAlbaranesProveedor_DetallesDelta = interface(IAlbaranesProveedor_Detalles) IAlbaranesProveedor_DetallesDelta = interface(IAlbaranesProveedor_Detalles)
['{630BE931-8C66-4EA3-B692-DAD59C0E5F0A}'] ['{C4CAA354-B990-4830-BF20-21B9958F343D}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_ALBARANValue : Integer; function GetOldID_ALBARANValue : Integer;
@ -724,6 +759,49 @@ implementation
uses uses
Variants, uROBinaryHelpers, uDAInterfaces; Variants, uROBinaryHelpers, uDAInterfaces;
{ TListaAnosAlbaranesBusinessProcessorRules }
constructor TListaAnosAlbaranesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
begin
inherited;
end;
destructor TListaAnosAlbaranesBusinessProcessorRules.Destroy;
begin
inherited;
end;
function TListaAnosAlbaranesBusinessProcessorRules.GetANOValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ListaAnosAlbaranesANO];
end;
function TListaAnosAlbaranesBusinessProcessorRules.GetANOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ListaAnosAlbaranesANO]);
end;
function TListaAnosAlbaranesBusinessProcessorRules.GetOldANOValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ListaAnosAlbaranesANO];
end;
function TListaAnosAlbaranesBusinessProcessorRules.GetOldANOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ListaAnosAlbaranesANO]);
end;
procedure TListaAnosAlbaranesBusinessProcessorRules.SetANOValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ListaAnosAlbaranesANO] := aValue;
end;
procedure TListaAnosAlbaranesBusinessProcessorRules.SetANOIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ListaAnosAlbaranesANO] := Null;
end;
{ TAlbaranesProveedorBusinessProcessorRules } { TAlbaranesProveedorBusinessProcessorRules }
constructor TAlbaranesProveedorBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); constructor TAlbaranesProveedorBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
var var
@ -2468,6 +2546,7 @@ end;
initialization initialization
RegisterBusinessProcessorRules(RID_ListaAnosAlbaranesDelta, TListaAnosAlbaranesBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_AlbaranesProveedorDelta, TAlbaranesProveedorBusinessProcessorRules); RegisterBusinessProcessorRules(RID_AlbaranesProveedorDelta, TAlbaranesProveedorBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_AlbaranesProveedor_DetallesDelta, TAlbaranesProveedor_DetallesBusinessProcessorRules); RegisterBusinessProcessorRules(RID_AlbaranesProveedor_DetallesDelta, TAlbaranesProveedor_DetallesBusinessProcessorRules);

View File

@ -12,6 +12,32 @@ object srvAlbaranesProveedor: TsrvAlbaranesProveedor
ConnectionManager = dmServer.ConnectionManager ConnectionManager = dmServer.ConnectionManager
DataDictionary = DADataDictionary DataDictionary = DADataDictionary
Datasets = < Datasets = <
item
Params = <>
Statements = <
item
ConnectionType = 'Interbase'
Default = True
Name = 'IBX'
SQL =
'select ANO from'#10'(select distinct(substr(FECHA_ALBARAN, 1,4)) as ' +
'ANO'#10'from albaranes_proveedor'#10'order by 1 desc)'#10#10'UNION ALL'#10#10'select' +
' distinct '#39'Todos'#39' as ANO'#10'from empresas'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ANO'
TableField = 'ANO'
end>
end>
Name = 'ListaAnosAlbaranes'
Fields = <
item
Name = 'ANO'
DataType = datString
Size = 255
end>
end
item item
Params = <> Params = <>
Statements = < Statements = <

View File

@ -2,7 +2,7 @@ inherited fEditorAlbaranesProveedor: TfEditorAlbaranesProveedor
Caption = 'Lista de albaranes de proveedor' Caption = 'Lista de albaranes de proveedor'
ClientWidth = 606 ClientWidth = 606
ExplicitWidth = 614 ExplicitWidth = 614
ExplicitHeight = 482 ExplicitHeight = 240
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader inherited JvNavPanelHeader: TJvNavPanelHeader
@ -127,10 +127,24 @@ inherited fEditorAlbaranesProveedor: TfEditorAlbaranesProveedor
inherited tbxMain: TTBXToolbar inherited tbxMain: TTBXToolbar
ExplicitWidth = 606 ExplicitWidth = 606
end end
inherited tbxFiltro: TTBXToolbar
ExplicitWidth = 379
inherited lblAno: TTBXLabelItem
Visible = True
end
inherited cbxListaAnos: TTBXComboBoxItem
Visible = True
end
inherited sepAno: TTBXSeparatorItem
Visible = True
end
end
inherited tbxMenu: TTBXToolbar inherited tbxMenu: TTBXToolbar
ExplicitWidth = 606 ExplicitWidth = 606
end end
inherited TBXTMain2: TTBXToolbar inherited TBXTMain2: TTBXToolbar
Left = 379
ExplicitLeft = 379
object TBXItem39: TTBXItem object TBXItem39: TTBXItem
Action = actGenerarFactura Action = actGenerarFactura
DisplayMode = nbdmImageAndText DisplayMode = nbdmImageAndText

View File

@ -27,6 +27,7 @@ type
procedure actGenerarFacturaExecute(Sender: TObject); procedure actGenerarFacturaExecute(Sender: TObject);
procedure actGenerarFacturaUpdate(Sender: TObject); procedure actGenerarFacturaUpdate(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject); procedure actEliminarUpdate(Sender: TObject);
procedure OnListaAnosChange(Sender: TObject; const Text: string);
protected protected
FAlbaranes: IBizAlbaranProveedor; FAlbaranes: IBizAlbaranProveedor;
@ -44,6 +45,7 @@ type
procedure DuplicarInterno; override; procedure DuplicarInterno; override;
procedure PrevisualizarInterno; override; procedure PrevisualizarInterno; override;
procedure ImprimirInterno; override; procedure ImprimirInterno; override;
procedure RefrescarInterno; override;
//Si queremos crear otra vista para el editor heredado solo tendriamos que //Si queremos crear otra vista para el editor heredado solo tendriamos que
//sobreescribir este metodo //sobreescribir este metodo
@ -180,6 +182,8 @@ end;
procedure TfEditorAlbaranesProveedor.FormShow(Sender: TObject); procedure TfEditorAlbaranesProveedor.FormShow(Sender: TObject);
begin begin
cbxListaAnos.OnChange := OnListaAnosChange; //OJO SIEMPRE ANTES DEL INHERITED
inherited; inherited;
if not Assigned(ViewGrid) then if not Assigned(ViewGrid) then
@ -278,6 +282,14 @@ begin
end; end;
end; end;
procedure TfEditorAlbaranesProveedor.OnListaAnosChange(Sender: TObject;
const Text: string);
begin
Controller.FiltrarAno(Albaranes, DynWhereDataTable, Text);
if Albaranes.DataTable.Active then
RefrescarInterno;
end;
procedure TfEditorAlbaranesProveedor.PonerTitulos(const ATitulo: string); procedure TfEditorAlbaranesProveedor.PonerTitulos(const ATitulo: string);
var var
FTitulo : String; FTitulo : String;
@ -331,17 +343,37 @@ begin
end; end;
end; end;
procedure TfEditorAlbaranesProveedor.RefrescarInterno;
begin
//Volvemos a cargar los años de las facturas
if Assigned(FController) then
ListaAnos := FController.DarListaAnosAlbaranes;
inherited;
end;
procedure TfEditorAlbaranesProveedor.SetController(const Value: IAlbaranesProveedorController); procedure TfEditorAlbaranesProveedor.SetController(const Value: IAlbaranesProveedorController);
begin begin
FController := Value; FController := Value;
if Assigned(FController) then
ListaAnos := FController.DarListaAnosAlbaranes;
end; end;
procedure TfEditorAlbaranesProveedor.SetAlbaranes(const Value: IBizAlbaranProveedor); procedure TfEditorAlbaranesProveedor.SetAlbaranes(const Value: IBizAlbaranProveedor);
begin begin
FAlbaranes := Value; FAlbaranes := Value;
if Assigned(FAlbaranes) 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 := FAlbaranes.DataTable.DynamicWhere.Xml;
dsDataTable.DataTable := FAlbaranes.DataTable; dsDataTable.DataTable := FAlbaranes.DataTable;
if Assigned(ViewGrid) then if Assigned(ViewGrid) then
(ViewGrid as IViewAlbaranesProveedor).Albaranes := Albaranes; (ViewGrid as IViewAlbaranesProveedor).Albaranes := Albaranes;
end;
end; end;
end. end.

View File

@ -1,5 +1,6 @@
inherited fEditorElegirArticulosAlbaranProveedor: TfEditorElegirArticulosAlbaranProveedor inherited fEditorElegirArticulosAlbaranProveedor: TfEditorElegirArticulosAlbaranProveedor
Caption = 'fEditorElegirArticulosAlbaranProveedor' Caption = 'fEditorElegirArticulosAlbaranProveedor'
ExplicitHeight = 482
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
inherited pnlHeader: TPanel inherited pnlHeader: TPanel

View File

@ -15,6 +15,7 @@ uses
type type
TfEditorElegirArticulosAlbaranProveedor = class(TfEditorElegirArticulos, IEditorElegirArticulosAlbaranesProveedor) TfEditorElegirArticulosAlbaranProveedor = class(TfEditorElegirArticulos, IEditorElegirArticulosAlbaranesProveedor)
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure FormShow(Sender: TObject);
private private
FProveedor: IBizProveedor; FProveedor: IBizProveedor;
function GetProveedor: IBizProveedor; function GetProveedor: IBizProveedor;
@ -32,7 +33,7 @@ type
implementation implementation
{$R *.dfm} {$R *.dfm}
uses uViewElegirArticulosAlbaranesProveedor; uses uViewElegirArticulosAlbaranesProveedor, uBizArticulos;
{ TfEditorElegirArticulosAlbaranProveedor } { TfEditorElegirArticulosAlbaranProveedor }
@ -48,6 +49,21 @@ begin
inherited; inherited;
end; end;
procedure TfEditorElegirArticulosAlbaranProveedor.FormShow(Sender: TObject);
var
i: integer;
begin
inherited;
i := -1;
repeat
inc(i);
until (cbxListaAnos.Strings[i] = CTE_TARIFA_COMPRAS) or (i = cbxListaAnos.Strings.Count - 1);
if (cbxListaAnos.Strings[i] = CTE_TARIFA_COMPRAS) then
cbxListaAnos.ItemIndex := i;
end;
function TfEditorElegirArticulosAlbaranProveedor.GetProveedor: IBizProveedor; function TfEditorElegirArticulosAlbaranProveedor.GetProveedor: IBizProveedor;
begin begin
Result := FProveedor; Result := FProveedor;

View File

@ -4,6 +4,8 @@ inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaran
ExplicitHeight = 414 ExplicitHeight = 414
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Height = 286 Height = 286
RootLevelOptions.DetailTabsPosition = dtpTop
ExplicitWidth = 720
ExplicitHeight = 286 ExplicitHeight = 286
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
inherited cxGridViewNOMBRE_PROVEEDOR: TcxGridDBColumn inherited cxGridViewNOMBRE_PROVEEDOR: TcxGridDBColumn
@ -43,9 +45,6 @@ inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaran
inherited cxGridLevel1: TcxGridLevel inherited cxGridLevel1: TcxGridLevel
Visible = False Visible = False
end end
inherited cxGridLevel2: TcxGridLevel
Visible = False
end
end end
inherited frViewFiltroBase1: TfrViewFiltroBase inherited frViewFiltroBase1: TfrViewFiltroBase
inherited TBXDockablePanel1: TTBXDockablePanel inherited TBXDockablePanel1: TTBXDockablePanel
@ -67,31 +66,44 @@ inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaran
Width = 121 Width = 121
end end
inherited edtFechaFinFiltro: TcxDateEdit inherited edtFechaFinFiltro: TcxDateEdit
Left = 549 Left = 443
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 549 ExplicitLeft = 443
ExplicitWidth = 121 ExplicitWidth = 121
Width = 121 Width = 121
end end
inherited txtFiltroTodo2: TcxTextEdit inherited txtFiltroTodo2: TcxTextEdit
Left = 548 Left = 443
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 548 ExplicitLeft = 443
ExplicitWidth = 223 ExplicitWidth = 223
Width = 223 Width = 223
end end
end end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
ExplicitWidth = 720
inherited tbxBotones: TTBXToolbar
ExplicitWidth = 710
end
end
end end
end end
inherited pnlAgrupaciones: TTBXDockablePanel inherited pnlAgrupaciones: TTBXDockablePanel
Top = 388 Top = 388
ExplicitTop = 388 ExplicitTop = 388
ExplicitWidth = 720
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
ExplicitWidth = 720
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 710
end
end
end end
inherited dxComponentPrinter: TdxComponentPrinter inherited dxComponentPrinter: TdxComponentPrinter
inherited dxComponentPrinterLink: TdxGridReportLink inherited dxComponentPrinterLink: TdxGridReportLink

View File

@ -48,6 +48,9 @@ type
property PrecioPunto : Currency read GetPrecioPunto write SetPrecioPunto; property PrecioPunto : Currency read GetPrecioPunto write SetPrecioPunto;
procedure AsignarTarifa(AArticulos: IBizArticulo); procedure AsignarTarifa(AArticulos: IBizArticulo);
procedure Comisionable(AArticulos: IBizArticulo; Valor: Integer); procedure Comisionable(AArticulos: IBizArticulo; Valor: Integer);
function DarListaTarifasArticulos: TStringList;
procedure FiltrarTarifa(AArticulo: IBizArticulo; ADynWhereDataTable: WideString; const Tarifa: String);
end; end;
TArticulosController = class(TControllerBase, IArticulosController) TArticulosController = class(TControllerBase, IArticulosController)
@ -105,6 +108,9 @@ type
procedure AnadirProveedor(AArticulo : IBizArticulo); procedure AnadirProveedor(AArticulo : IBizArticulo);
procedure VerProveedor(AArticulo : IBizArticulo); procedure VerProveedor(AArticulo : IBizArticulo);
function DarListaTarifasArticulos: TStringList;
procedure FiltrarTarifa(AArticulo: IBizArticulo; ADynWhereDataTable: WideString; const Tarifa: String);
procedure AsignarTarifa(AArticulos: IBizArticulo); procedure AsignarTarifa(AArticulos: IBizArticulo);
procedure Comisionable(AArticulos: IBizArticulo; Valor: Integer); procedure Comisionable(AArticulos: IBizArticulo; Valor: Integer);
@ -413,6 +419,11 @@ begin
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf); Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
end; end;
function TArticulosController.DarListaTarifasArticulos: TStringList;
begin
Result := FDataModule.GetTarifasItems;
end;
procedure TArticulosController.DescartarCambios(AArticulo: IBizArticulo); procedure TArticulosController.DescartarCambios(AArticulo: IBizArticulo);
begin begin
if not Assigned(AArticulo) then if not Assigned(AArticulo) then
@ -678,6 +689,32 @@ begin
end; end;
end; end;
procedure TArticulosController.FiltrarTarifa(AArticulo: IBizArticulo;
ADynWhereDataTable: WideString; const Tarifa: String);
var
Condicion: TDAWhereExpression;
begin
AArticulo.DataTable.DynamicWhere.Clear;
AArticulo.DataTable.DynamicWhere.Xml := ADynWhereDataTable;
if (Tarifa <> 'Todos') then
begin
// Filtrar los articulos actuales por tarifa
with AArticulo.DataTable.DynamicWhere do
begin
// (TARIFA = TARIFA)
Condicion := NewBinaryExpression(NewField('', fld_ArticulosTARIFA), NewConstant(Tarifa, datString), dboEqual);
if IsEmpty then
Expression := Condicion
else
Expression := NewBinaryExpression(Condicion, Expression, dboAnd);
end;
end;
end;
function TArticulosController.GetPrecioPunto: Currency; function TArticulosController.GetPrecioPunto: Currency;
begin begin
Result := FPrecioPunto; Result := FPrecioPunto;

View File

@ -20,6 +20,7 @@ type
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); overload; procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); overload;
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ADescuento: Float; const AAll: Boolean = False); overload; procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ADescuento: Float; const AAll: Boolean = False); overload;
/// procedure ActualizarDescuentoCapitulos(ADetalles: IDAStronglyTypedDataTable; ADescuentoCapitulo: Float); overload;
procedure QuitarPrecioDetalles(ADetalles: IDAStronglyTypedDataTable; const AAll: Boolean = False); procedure QuitarPrecioDetalles(ADetalles: IDAStronglyTypedDataTable; const AAll: Boolean = False);
procedure CambiarSignoDetalles(ADetalles: IDAStronglyTypedDataTable; const AAll: Boolean = True); procedure CambiarSignoDetalles(ADetalles: IDAStronglyTypedDataTable; const AAll: Boolean = True);
procedure AnadirConceptoInicial(ADetalles: IDAStronglyTypedDataTable; AConcepto: String); procedure AnadirConceptoInicial(ADetalles: IDAStronglyTypedDataTable; AConcepto: String);
@ -46,6 +47,7 @@ type
procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; const ANuevaFila :Boolean = True); procedure AnadirArticulos(ADetalles: IDAStronglyTypedDataTable; const ANuevaFila :Boolean = True);
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); overload; procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); overload;
procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ADescuento: Float; const AAll: Boolean = False); overload; procedure ActualizarDetalles(ADetalles: IDAStronglyTypedDataTable; ADescuento: Float; const AAll: Boolean = False); overload;
// procedure ActualizarDescuentoCapitulos(ADetalles: IDAStronglyTypedDataTable; ADescuentoCapitulo: Float); overload;
procedure QuitarPrecioDetalles(ADetalles: IDAStronglyTypedDataTable; const AAll: Boolean = False); procedure QuitarPrecioDetalles(ADetalles: IDAStronglyTypedDataTable; const AAll: Boolean = False);
procedure CambiarSignoDetalles(ADetalles: IDAStronglyTypedDataTable; const AAll: Boolean = True); procedure CambiarSignoDetalles(ADetalles: IDAStronglyTypedDataTable; const AAll: Boolean = True);
procedure AnadirConceptoInicial(ADetalles: IDAStronglyTypedDataTable; AConcepto: String); procedure AnadirConceptoInicial(ADetalles: IDAStronglyTypedDataTable; AConcepto: String);
@ -150,6 +152,55 @@ begin
end; end;
end; end;
{procedure TControllerDetallesArticulos.ActualizarDescuentoCapitulos(
ADetalles: IDAStronglyTypedDataTable; ADescuentoCapitulo: Float);
var
ACantidad: Float;
ACambiar : Boolean;
begin
if Assigned(ADetalles) then
begin
BeginUpdate(ADetalles);
try
ADetalles.DataTable.First;
with ADetalles.DataTable do
begin
while not EOF do
begin
{
ACambiar := True;
if (ADetalles.DataTable.FieldByName(CAMPO_TIPO).AsString = TIPO_DETALLE_CONCEPTO) then
begin
if (not AAll) and (ADetalles.DataTable.FieldByName('CANTIDAD').IsNull and ADetalles.DataTable.FieldByName('IMPORTE_UNIDAD').IsNull) then
ACambiar := False;
if ACambiar then
begin
Edit;
try
// Cuando el descuento es 0, quitar cualquier valor en el campo.
if (ADescuento <> 0) then
ADetalles.DataTable.FieldByName('DESCUENTO').AsFloat := ADescuento
else
ADetalles.DataTable.FieldByName('DESCUENTO').Clear;
except
on E: Exception do
ShowMessage(E.Message);
end;
end;
end;
Next;
end;
//Volvemos a dejarlo al principio
ADetalles.DataTable.First;
end;
finally
EndUpdate(ADetalles);
end;
end;
end;
}
procedure TControllerDetallesArticulos.Add(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo; const ACantidad: Float); procedure TControllerDetallesArticulos.Add(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo; const ACantidad: Float);
begin begin
if Assigned(ADetalles) and Assigned(AArticulos) then if Assigned(ADetalles) and Assigned(AArticulos) then

View File

@ -173,13 +173,13 @@ inherited DataModuleArticulos: TDataModuleArticulos
RemoteDataAdapter = rda_Articulos RemoteDataAdapter = rda_Articulos
LogicalName = 'Articulos' LogicalName = 'Articulos'
IndexDefs = <> IndexDefs = <>
Left = 232 Left = 288
Top = 112 Top = 112
end end
object ds_Articulos: TDADataSource object ds_Articulos: TDADataSource
DataSet = tbl_Articulos.Dataset DataSet = tbl_Articulos.Dataset
DataTable = tbl_Articulos DataTable = tbl_Articulos
Left = 232 Left = 288
Top = 32 Top = 32
end end
object tbl_ArticulosParaCliente: TDAMemDataTable object tbl_ArticulosParaCliente: TDAMemDataTable
@ -534,4 +534,26 @@ inherited DataModuleArticulos: TDataModuleArticulos
Left = 80 Left = 80
Top = 232 Top = 232
end end
object tbl_ListaTarifasArticulos: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'TARIFA'
DataType = datString
Size = 255
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Articulos
LogicalName = 'ListaTarifasArticulos'
IndexDefs = <>
Left = 184
Top = 112
end
object ds_ListaTarifasArticulos: TDADataSource
DataSet = tbl_ListaTarifasArticulos.Dataset
DataTable = tbl_ListaTarifasArticulos
Left = 184
Top = 40
end
end end

View File

@ -26,6 +26,8 @@ type
ds_ArticulosParaCompra: TDADataSource; ds_ArticulosParaCompra: TDADataSource;
tbl_Articulos_Idiomas: TDAMemDataTable; tbl_Articulos_Idiomas: TDAMemDataTable;
ds_Articulos_Idiomas: TDADataSource; ds_Articulos_Idiomas: TDADataSource;
tbl_ListaTarifasArticulos: TDAMemDataTable;
ds_ListaTarifasArticulos: TDADataSource;
procedure DAClientDataModuleCreate(Sender: TObject); procedure DAClientDataModuleCreate(Sender: TObject);
private private
function _GetProveedores : IBizArticulosProveedores; function _GetProveedores : IBizArticulosProveedores;
@ -39,6 +41,7 @@ type
function GetItems (IDCliente: Integer) : IBizArticulo; overload; function GetItems (IDCliente: Integer) : IBizArticulo; overload;
function GetItem(const ID : Integer; AClienteID: Integer = -1) : IBizArticulo; function GetItem(const ID : Integer; AClienteID: Integer = -1) : IBizArticulo;
function NewItem : IBizArticulo; function NewItem : IBizArticulo;
function GetTarifasItems : TStringList;
end; end;
implementation implementation
@ -150,6 +153,30 @@ begin
end; end;
function TDataModuleArticulos.GetTarifasItems: TStringList;
var
AListaTarifas: TStringList;
begin
AListaTarifas := TStringList.Create;
ShowHourglassCursor;
try
with tbl_ListaTarifasArticulos do
begin
Open;
First;
while not eof do
begin
AListaTarifas.Add(Format('%s=%s', [Fields[0].AsString, Fields[0].AsString]));
Next;
end;
Close;
end;
Result := AListaTarifas;
finally
HideHourglassCursor;
end;
end;
function TDataModuleArticulos.GetItems (const Tipo: TEnumArticulos): IBizArticulo; function TDataModuleArticulos.GetItems (const Tipo: TEnumArticulos): IBizArticulo;
var var
AArticulo : TDAMemDataTable; AArticulo : TDAMemDataTable;

View File

@ -3,7 +3,7 @@ unit uIDataModuleArticulos;
interface interface
uses uses
uBizArticulos; uBizArticulos, Classes;
type type
TEnumArticulos = (txArticulo, txProveedor); TEnumArticulos = (txArticulo, txProveedor);
@ -14,6 +14,7 @@ type
function GetItems (IDCliente: Integer) : IBizArticulo; overload; function GetItems (IDCliente: Integer) : IBizArticulo; overload;
function GetItem(const ID : Integer; AClienteID: Integer = -1) : IBizArticulo; function GetItem(const ID : Integer; AClienteID: Integer = -1) : IBizArticulo;
function NewItem : IBizArticulo; function NewItem : IBizArticulo;
function GetTarifasItems : TStringList;
end; end;
implementation implementation

View File

@ -9,15 +9,17 @@ const
{ Data table rules ids { Data table rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_Articulos_Idiomas = '{FF976C7B-EBD6-4E27-B5E1-961E6854704D}'; RID_Articulos_Idiomas = '{EC2DDBB0-8435-446E-8C58-E315C9B2A233}';
RID_Articulos_Proveedores = '{431A1BC5-BE84-492F-8540-CB499261AF04}'; RID_Articulos_Proveedores = '{FF1A517E-E230-4B37-B3EB-ACB7779BD563}';
RID_Articulos = '{3AE5088F-4443-4472-9004-2F6F4089E7B1}'; RID_ListaTarifasArticulos = '{7C5AEF6B-3CFC-43E8-8D4A-CECB8B900A80}';
RID_ArticulosParaCompra = '{7363EFB0-083D-4E2B-8C6D-6D662D7DAE9E}'; RID_Articulos = '{C72E42FA-0317-47D7-BCAF-0AFE5B9EE859}';
RID_ArticulosParaCliente = '{7E34DAD2-041B-43EB-B8AF-9AE62B6A8AD9}'; RID_ArticulosParaCompra = '{3C19BFAF-E05D-4DFC-8F5A-B0787DCF089C}';
RID_ArticulosParaCliente = '{A54A3C06-7CF1-4560-A471-7779C252E7F7}';
{ Data table names } { Data table names }
nme_Articulos_Idiomas = 'Articulos_Idiomas'; nme_Articulos_Idiomas = 'Articulos_Idiomas';
nme_Articulos_Proveedores = 'Articulos_Proveedores'; nme_Articulos_Proveedores = 'Articulos_Proveedores';
nme_ListaTarifasArticulos = 'ListaTarifasArticulos';
nme_Articulos = 'Articulos'; nme_Articulos = 'Articulos';
nme_ArticulosParaCompra = 'ArticulosParaCompra'; nme_ArticulosParaCompra = 'ArticulosParaCompra';
nme_ArticulosParaCliente = 'ArticulosParaCliente'; nme_ArticulosParaCliente = 'ArticulosParaCliente';
@ -60,6 +62,12 @@ const
idx_Articulos_ProveedoresPRECIO_PVP_TOTAL = 9; idx_Articulos_ProveedoresPRECIO_PVP_TOTAL = 9;
idx_Articulos_ProveedoresFECHA_ACTUALIZACION = 10; idx_Articulos_ProveedoresFECHA_ACTUALIZACION = 10;
{ ListaTarifasArticulos fields }
fld_ListaTarifasArticulosTARIFA = 'TARIFA';
{ ListaTarifasArticulos field indexes }
idx_ListaTarifasArticulosTARIFA = 0;
{ Articulos fields } { Articulos fields }
fld_ArticulosID = 'ID'; fld_ArticulosID = 'ID';
fld_ArticulosID_EMPRESA = 'ID_EMPRESA'; fld_ArticulosID_EMPRESA = 'ID_EMPRESA';
@ -215,7 +223,7 @@ const
type type
{ IArticulos_Idiomas } { IArticulos_Idiomas }
IArticulos_Idiomas = interface(IDAStronglyTypedDataTable) IArticulos_Idiomas = interface(IDAStronglyTypedDataTable)
['{5CF7707F-6357-4F67-85E7-B40EC6B2D465}'] ['{8AF5F0E1-B591-4171-851D-BF115E25AE93}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -286,7 +294,7 @@ type
{ IArticulos_Proveedores } { IArticulos_Proveedores }
IArticulos_Proveedores = interface(IDAStronglyTypedDataTable) IArticulos_Proveedores = interface(IDAStronglyTypedDataTable)
['{122F1464-09F8-4211-83D5-15A7D00C25DE}'] ['{D08203D8-E127-4277-8950-7089276C5435}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -439,9 +447,44 @@ type
end; end;
{ IListaTarifasArticulos }
IListaTarifasArticulos = interface(IDAStronglyTypedDataTable)
['{6B1B2D29-5AA3-453F-8128-5A24C4BD2AA2}']
{ Property getters and setters }
function GetTARIFAValue: String;
procedure SetTARIFAValue(const aValue: String);
function GetTARIFAIsNull: Boolean;
procedure SetTARIFAIsNull(const aValue: Boolean);
{ Properties }
property TARIFA: String read GetTARIFAValue write SetTARIFAValue;
property TARIFAIsNull: Boolean read GetTARIFAIsNull write SetTARIFAIsNull;
end;
{ TListaTarifasArticulosDataTableRules }
TListaTarifasArticulosDataTableRules = class(TIntfObjectDADataTableRules, IListaTarifasArticulos)
private
protected
{ Property getters and setters }
function GetTARIFAValue: String; virtual;
procedure SetTARIFAValue(const aValue: String); virtual;
function GetTARIFAIsNull: Boolean; virtual;
procedure SetTARIFAIsNull(const aValue: Boolean); virtual;
{ Properties }
property TARIFA: String read GetTARIFAValue write SetTARIFAValue;
property TARIFAIsNull: Boolean read GetTARIFAIsNull write SetTARIFAIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
{ IArticulos } { IArticulos }
IArticulos = interface(IDAStronglyTypedDataTable) IArticulos = interface(IDAStronglyTypedDataTable)
['{8399951F-A9F2-4EB8-B927-9244EC0BDB10}'] ['{75FEAD02-AAC9-49C3-A92A-62C0345AD6B2}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -764,7 +807,7 @@ type
{ IArticulosParaCompra } { IArticulosParaCompra }
IArticulosParaCompra = interface(IDAStronglyTypedDataTable) IArticulosParaCompra = interface(IDAStronglyTypedDataTable)
['{52EADC56-D283-47D4-AD3A-D5F201780C91}'] ['{B9652ADC-0856-43C3-A22C-90391FEA0E16}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -1087,7 +1130,7 @@ type
{ IArticulosParaCliente } { IArticulosParaCliente }
IArticulosParaCliente = interface(IDAStronglyTypedDataTable) IArticulosParaCliente = interface(IDAStronglyTypedDataTable)
['{9921A374-526A-4E37-9297-0994E5837D52}'] ['{1FBE0784-F083-4FAB-8587-3A831D4CA31E}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -1691,6 +1734,39 @@ begin
end; end;
{ TListaTarifasArticulosDataTableRules }
constructor TListaTarifasArticulosDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TListaTarifasArticulosDataTableRules.Destroy;
begin
inherited;
end;
function TListaTarifasArticulosDataTableRules.GetTARIFAValue: String;
begin
result := DataTable.Fields[idx_ListaTarifasArticulosTARIFA].AsString;
end;
procedure TListaTarifasArticulosDataTableRules.SetTARIFAValue(const aValue: String);
begin
DataTable.Fields[idx_ListaTarifasArticulosTARIFA].AsString := aValue;
end;
function TListaTarifasArticulosDataTableRules.GetTARIFAIsNull: boolean;
begin
result := DataTable.Fields[idx_ListaTarifasArticulosTARIFA].IsNull;
end;
procedure TListaTarifasArticulosDataTableRules.SetTARIFAIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ListaTarifasArticulosTARIFA].AsVariant := Null;
end;
{ TArticulosDataTableRules } { TArticulosDataTableRules }
constructor TArticulosDataTableRules.Create(aDataTable: TDADataTable); constructor TArticulosDataTableRules.Create(aDataTable: TDADataTable);
var var
@ -3233,6 +3309,7 @@ end;
initialization initialization
RegisterDataTableRules(RID_Articulos_Idiomas, TArticulos_IdiomasDataTableRules); RegisterDataTableRules(RID_Articulos_Idiomas, TArticulos_IdiomasDataTableRules);
RegisterDataTableRules(RID_Articulos_Proveedores, TArticulos_ProveedoresDataTableRules); RegisterDataTableRules(RID_Articulos_Proveedores, TArticulos_ProveedoresDataTableRules);
RegisterDataTableRules(RID_ListaTarifasArticulos, TListaTarifasArticulosDataTableRules);
RegisterDataTableRules(RID_Articulos, TArticulosDataTableRules); RegisterDataTableRules(RID_Articulos, TArticulosDataTableRules);
RegisterDataTableRules(RID_ArticulosParaCompra, TArticulosParaCompraDataTableRules); RegisterDataTableRules(RID_ArticulosParaCompra, TArticulosParaCompraDataTableRules);
RegisterDataTableRules(RID_ArticulosParaCliente, TArticulosParaClienteDataTableRules); RegisterDataTableRules(RID_ArticulosParaCliente, TArticulosParaClienteDataTableRules);

View File

@ -9,16 +9,17 @@ const
{ Delta rules ids { Delta rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_Articulos_IdiomasDelta = '{DB541D7C-9B1F-4358-9504-8F10113CCF7A}'; RID_Articulos_IdiomasDelta = '{38E210AA-8232-4300-A96F-ED028623C190}';
RID_Articulos_ProveedoresDelta = '{8A1FDBC8-885F-4BA1-AA0E-8C236BF74B39}'; RID_Articulos_ProveedoresDelta = '{6587054B-0F59-4158-9295-8F7023CE40C8}';
RID_ArticulosDelta = '{2D354317-1F99-4930-89AB-E5FD6AEC2B71}'; RID_ListaTarifasArticulosDelta = '{3FDB9251-9A22-42DC-894A-233314C811BA}';
RID_ArticulosParaCompraDelta = '{5FED3076-3926-4603-8DE4-AC073CE208A0}'; RID_ArticulosDelta = '{A491BB8F-64EC-450D-BB97-E22A3018C5E2}';
RID_ArticulosParaClienteDelta = '{FCF586E3-6CBD-4E54-A100-CBF2F271A3A3}'; RID_ArticulosParaCompraDelta = '{336711E2-0B91-449D-B73B-8EEEA7964DDC}';
RID_ArticulosParaClienteDelta = '{51BF9CD3-BFA0-430E-B414-B52520891AD8}';
type type
{ IArticulos_IdiomasDelta } { IArticulos_IdiomasDelta }
IArticulos_IdiomasDelta = interface(IArticulos_Idiomas) IArticulos_IdiomasDelta = interface(IArticulos_Idiomas)
['{DB541D7C-9B1F-4358-9504-8F10113CCF7A}'] ['{38E210AA-8232-4300-A96F-ED028623C190}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_ARTICULOValue : Integer; function GetOldID_ARTICULOValue : Integer;
@ -88,7 +89,7 @@ type
{ IArticulos_ProveedoresDelta } { IArticulos_ProveedoresDelta }
IArticulos_ProveedoresDelta = interface(IArticulos_Proveedores) IArticulos_ProveedoresDelta = interface(IArticulos_Proveedores)
['{8A1FDBC8-885F-4BA1-AA0E-8C236BF74B39}'] ['{6587054B-0F59-4158-9295-8F7023CE40C8}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_ARTICULOValue : Integer; function GetOldID_ARTICULOValue : Integer;
@ -240,9 +241,43 @@ type
end; end;
{ IListaTarifasArticulosDelta }
IListaTarifasArticulosDelta = interface(IListaTarifasArticulos)
['{3FDB9251-9A22-42DC-894A-233314C811BA}']
{ Property getters and setters }
function GetOldTARIFAValue : String;
{ Properties }
property OldTARIFA : String read GetOldTARIFAValue;
end;
{ TListaTarifasArticulosBusinessProcessorRules }
TListaTarifasArticulosBusinessProcessorRules = class(TDABusinessProcessorRules, IListaTarifasArticulos, IListaTarifasArticulosDelta)
private
protected
{ Property getters and setters }
function GetTARIFAValue: String; virtual;
function GetTARIFAIsNull: Boolean; virtual;
function GetOldTARIFAValue: String; virtual;
function GetOldTARIFAIsNull: Boolean; virtual;
procedure SetTARIFAValue(const aValue: String); virtual;
procedure SetTARIFAIsNull(const aValue: Boolean); virtual;
{ Properties }
property TARIFA : String read GetTARIFAValue write SetTARIFAValue;
property TARIFAIsNull : Boolean read GetTARIFAIsNull write SetTARIFAIsNull;
property OldTARIFA : String read GetOldTARIFAValue;
property OldTARIFAIsNull : Boolean read GetOldTARIFAIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
destructor Destroy; override;
end;
{ IArticulosDelta } { IArticulosDelta }
IArticulosDelta = interface(IArticulos) IArticulosDelta = interface(IArticulos)
['{2D354317-1F99-4930-89AB-E5FD6AEC2B71}'] ['{A491BB8F-64EC-450D-BB97-E22A3018C5E2}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer; function GetOldID_EMPRESAValue : Integer;
@ -565,7 +600,7 @@ type
{ IArticulosParaCompraDelta } { IArticulosParaCompraDelta }
IArticulosParaCompraDelta = interface(IArticulosParaCompra) IArticulosParaCompraDelta = interface(IArticulosParaCompra)
['{5FED3076-3926-4603-8DE4-AC073CE208A0}'] ['{336711E2-0B91-449D-B73B-8EEEA7964DDC}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer; function GetOldID_EMPRESAValue : Integer;
@ -888,7 +923,7 @@ type
{ IArticulosParaClienteDelta } { IArticulosParaClienteDelta }
IArticulosParaClienteDelta = interface(IArticulosParaCliente) IArticulosParaClienteDelta = interface(IArticulosParaCliente)
['{FCF586E3-6CBD-4E54-A100-CBF2F271A3A3}'] ['{51BF9CD3-BFA0-430E-B414-B52520891AD8}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer; function GetOldID_EMPRESAValue : Integer;
@ -1643,6 +1678,49 @@ begin
end; end;
{ TListaTarifasArticulosBusinessProcessorRules }
constructor TListaTarifasArticulosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
begin
inherited;
end;
destructor TListaTarifasArticulosBusinessProcessorRules.Destroy;
begin
inherited;
end;
function TListaTarifasArticulosBusinessProcessorRules.GetTARIFAValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ListaTarifasArticulosTARIFA];
end;
function TListaTarifasArticulosBusinessProcessorRules.GetTARIFAIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ListaTarifasArticulosTARIFA]);
end;
function TListaTarifasArticulosBusinessProcessorRules.GetOldTARIFAValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ListaTarifasArticulosTARIFA];
end;
function TListaTarifasArticulosBusinessProcessorRules.GetOldTARIFAIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ListaTarifasArticulosTARIFA]);
end;
procedure TListaTarifasArticulosBusinessProcessorRules.SetTARIFAValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ListaTarifasArticulosTARIFA] := aValue;
end;
procedure TListaTarifasArticulosBusinessProcessorRules.SetTARIFAIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ListaTarifasArticulosTARIFA] := Null;
end;
{ TArticulosBusinessProcessorRules } { TArticulosBusinessProcessorRules }
constructor TArticulosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); constructor TArticulosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
var var
@ -3888,6 +3966,7 @@ end;
initialization initialization
RegisterBusinessProcessorRules(RID_Articulos_IdiomasDelta, TArticulos_IdiomasBusinessProcessorRules); RegisterBusinessProcessorRules(RID_Articulos_IdiomasDelta, TArticulos_IdiomasBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_Articulos_ProveedoresDelta, TArticulos_ProveedoresBusinessProcessorRules); RegisterBusinessProcessorRules(RID_Articulos_ProveedoresDelta, TArticulos_ProveedoresBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_ListaTarifasArticulosDelta, TListaTarifasArticulosBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_ArticulosDelta, TArticulosBusinessProcessorRules); RegisterBusinessProcessorRules(RID_ArticulosDelta, TArticulosBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_ArticulosParaCompraDelta, TArticulosParaCompraBusinessProcessorRules); RegisterBusinessProcessorRules(RID_ArticulosParaCompraDelta, TArticulosParaCompraBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_ArticulosParaClienteDelta, TArticulosParaClienteBusinessProcessorRules); RegisterBusinessProcessorRules(RID_ArticulosParaClienteDelta, TArticulosParaClienteBusinessProcessorRules);

View File

@ -8,6 +8,7 @@ uses
const const
BIZ_CLIENT_ARTICULO = 'Client.Articulo'; BIZ_CLIENT_ARTICULO = 'Client.Articulo';
CTE_TARIFA_COMPRAS = 'Compras';
type type
IBizArticulo = interface(IArticulos) IBizArticulo = interface(IArticulos)

View File

@ -55,7 +55,7 @@ object PluginArticulos: TPluginArticulos
object N1: TMenuItem object N1: TMenuItem
Caption = 'Datos' Caption = 'Datos'
object Articulos1: TMenuItem object Articulos1: TMenuItem
Tag = 1000 Tag = 13000
Action = actArticulos Action = actArticulos
end end
end end

View File

@ -31,7 +31,7 @@ implementation
{$R *.dfm} {$R *.dfm}
uses uses
Forms, Dialogs, SysUtils, Forms, Dialogs, SysUtils, uFactuGES_App,
uArticulosController, uBizArticulos, uArticulosViewRegister; uArticulosController, uBizArticulos, uArticulosViewRegister;
function GetModule : TModuleController; function GetModule : TModuleController;

View File

@ -279,6 +279,31 @@ object srvArticulos: TsrvArticulos
DataType = datDateTime DataType = datDateTime
end> end>
end end
item
Params = <>
Statements = <
item
ConnectionType = 'Interbase'
Default = True
Name = 'IBX'
SQL =
'select distinct TARIFA'#10'from articulos'#10'where TARIFA IS NOT NULL'#10'a' +
'nd strlen(TRIM(TARIFA))>0'#10'order by 1 desc'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'TARIFA'
TableField = 'TARIFA'
end>
end>
Name = 'ListaTarifasArticulos'
Fields = <
item
Name = 'TARIFA'
DataType = datString
Size = 255
end>
end
item item
Params = <> Params = <>
Statements = < Statements = <

View File

@ -55,37 +55,37 @@
<DelphiCompile Include="Articulos_view.dpk"> <DelphiCompile Include="Articulos_view.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\..\Contactos\adortl.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\adortl.dcp" />
<DCCReference Include="..\..\Contactos\Articulos_controller.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\Articulos_controller.dcp" />
<DCCReference Include="..\..\Contactos\Articulos_model.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\Articulos_model.dcp" />
<DCCReference Include="..\..\Contactos\Contactos_view.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\Contactos_view.dcp" />
<DCCReference Include="..\..\Contactos\cxDataD11.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\cxDataD11.dcp" />
<DCCReference Include="..\..\Contactos\cxEditorsD11.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\cxEditorsD11.dcp" />
<DCCReference Include="..\..\Contactos\cxExportD11.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\cxExportD11.dcp" />
<DCCReference Include="..\..\Contactos\cxExtEditorsD11.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\cxExtEditorsD11.dcp" />
<DCCReference Include="..\..\Contactos\cxGridD11.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\cxGridD11.dcp" />
<DCCReference Include="..\..\Contactos\cxLibraryD11.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\cxLibraryD11.dcp" />
<DCCReference Include="..\..\Contactos\cxPageControlD11.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\cxPageControlD11.dcp" />
<DCCReference Include="..\..\Contactos\DataAbstract_Core_D11.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\DataAbstract_Core_D11.dcp" />
<DCCReference Include="..\..\Contactos\dbrtl.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\dbrtl.dcp" />
<DCCReference Include="..\..\Contactos\dsnap.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\dsnap.dcp" />
<DCCReference Include="..\..\Contactos\dxCoreD11.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\dxCoreD11.dcp" />
<DCCReference Include="..\..\Contactos\dxGDIPlusD11.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\dxGDIPlusD11.dcp" />
<DCCReference Include="..\..\Contactos\dxThemeD11.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\dxThemeD11.dcp" />
<DCCReference Include="..\..\Contactos\Familias_controller.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\Familias_controller.dcp" />
<DCCReference Include="..\..\Contactos\GUIBase.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\GUIBase.dcp" />
<DCCReference Include="..\..\Contactos\PngComponentsD10.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\PngComponentsD10.dcp" />
<DCCReference Include="..\..\Contactos\PNG_D10.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\PNG_D10.dcp" />
<DCCReference Include="..\..\Contactos\RemObjects_Core_D11.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\RemObjects_Core_D11.dcp" />
<DCCReference Include="..\..\Contactos\rtl.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\rtl.dcp" />
<DCCReference Include="..\..\Contactos\SubFamilias_controller.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\SubFamilias_controller.dcp" />
<DCCReference Include="..\..\Contactos\Tarifas_controller.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\Tarifas_controller.dcp" />
<DCCReference Include="..\..\Contactos\UnidadesMedida_controller.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\UnidadesMedida_controller.dcp" />
<DCCReference Include="..\..\Contactos\vcl.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\vcl.dcp" />
<DCCReference Include="..\..\Contactos\vclactnband.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\vclactnband.dcp" />
<DCCReference Include="..\..\Contactos\vcldb.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\vcldb.dcp" />
<DCCReference Include="..\..\Contactos\vcljpg.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\vcljpg.dcp" />
<DCCReference Include="..\..\Contactos\vclx.dcp" /> <DCCReference Include="..\..\Pedidos a proveedor\vclx.dcp" />
<DCCReference Include="uArticulosViewRegister.pas" /> <DCCReference Include="uArticulosViewRegister.pas" />
<DCCReference Include="uEditorArticulo.pas"> <DCCReference Include="uEditorArticulo.pas">
<Form>fEditorArticulo</Form> <Form>fEditorArticulo</Form>

View File

@ -25,11 +25,21 @@ inherited fEditorArticulos: TfEditorArticulos
end end
end end
inherited TBXDock: TTBXDock inherited TBXDock: TTBXDock
Height = 105
ExplicitHeight = 105
inherited tbxMain: TTBXToolbar inherited tbxMain: TTBXToolbar
ExplicitWidth = 543 ExplicitWidth = 543
end end
inherited tbxFiltro: TTBXToolbar inherited tbxFiltro: TTBXToolbar
ExplicitWidth = 406 ExplicitWidth = 572
inherited lblAno: TTBXLabelItem
Caption = 'Tarifas:'
Visible = True
end
inherited cbxListaAnos: TTBXComboBoxItem
EditWidth = 120
Visible = True
end
inherited tbxEditFiltro: TTBXEditItem inherited tbxEditFiltro: TTBXEditItem
EditOptions = [tboUseEditWhenVertical] EditOptions = [tboUseEditWhenVertical]
end end
@ -39,11 +49,14 @@ inherited fEditorArticulos: TfEditorArticulos
end end
end end
inherited TBXTMain2: TTBXToolbar inherited TBXTMain2: TTBXToolbar
Left = 406 Left = 191
Top = 79
DockPos = 275 DockPos = 275
Visible = True Visible = True
ExplicitLeft = 406 ExplicitLeft = 191
ExplicitWidth = 137 ExplicitTop = 79
ExplicitWidth = 352
ExplicitHeight = 26
object TBXItem38: TTBXItem object TBXItem38: TTBXItem
Action = actAsignarTarifa Action = actAsignarTarifa
DisplayMode = nbdmImageAndText DisplayMode = nbdmImageAndText

View File

@ -34,6 +34,7 @@ type
procedure actNoComisionableUpdate(Sender: TObject); procedure actNoComisionableUpdate(Sender: TObject);
procedure actComisionableExecute(Sender: TObject); procedure actComisionableExecute(Sender: TObject);
procedure actComisionableUpdate(Sender: TObject); procedure actComisionableUpdate(Sender: TObject);
procedure OnListaTarifasChange(Sender: TObject; const Text: string);
private private
FArticulos: IBizArticulo; FArticulos: IBizArticulo;
FController : IArticulosController; FController : IArticulosController;
@ -49,6 +50,7 @@ type
procedure ImprimirInterno; override; procedure ImprimirInterno; override;
procedure PrevisualizarInterno; override; procedure PrevisualizarInterno; override;
procedure DuplicarInterno; override; procedure DuplicarInterno; override;
procedure RefrescarInterno; override;
//Si queremos crear otra vista para el editor heredado solo tendriamos que //Si queremos crear otra vista para el editor heredado solo tendriamos que
//sobreescribir este metodo //sobreescribir este metodo
@ -76,6 +78,8 @@ uses
} }
procedure TfEditorArticulos.FormShow(Sender: TObject); procedure TfEditorArticulos.FormShow(Sender: TObject);
begin begin
cbxListaAnos.OnChange := OnListaTarifasChange; //OJO SIEMPRE ANTES DEL INHERITED
inherited; inherited;
if not Assigned(ViewGrid) then if not Assigned(ViewGrid) then
@ -118,6 +122,14 @@ begin
FController.Ver(Articulos); FController.Ver(Articulos);
end; end;
procedure TfEditorArticulos.OnListaTarifasChange(Sender: TObject;
const Text: string);
begin
Controller.FiltrarTarifa(Articulos, DynWhereDataTable, Text);
if Articulos.DataTable.Active then
RefrescarInterno;
end;
procedure TfEditorArticulos.PonerTitulos(const ATitulo: string); procedure TfEditorArticulos.PonerTitulos(const ATitulo: string);
var var
FTitulo : String; FTitulo : String;
@ -131,17 +143,37 @@ begin
inherited; inherited;
end; end;
procedure TfEditorArticulos.RefrescarInterno;
begin
//Volvemos a cargar las tarifas de los presupuestos
if Assigned(FController) then
ListaAnos := FController.DarListaTarifasArticulos;
inherited;
end;
procedure TfEditorArticulos.SetArticulos(const Value: IBizArticulo); procedure TfEditorArticulos.SetArticulos(const Value: IBizArticulo);
begin begin
FArticulos := Value; FArticulos := Value;
if Assigned(FArticulos) 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 tarifa))
DynWhereDataTable := FArticulos.DataTable.DynamicWhere.Xml;
dsDataTable.DataTable := FArticulos.DataTable; dsDataTable.DataTable := FArticulos.DataTable;
if Assigned(ViewGrid) then if Assigned(ViewGrid) then
(ViewGrid as IViewArticulos).Articulos := Articulos; (ViewGrid as IViewArticulos).Articulos := Articulos;
end;
end; end;
procedure TfEditorArticulos.SetController(const Value: IArticulosController); procedure TfEditorArticulos.SetController(const Value: IArticulosController);
begin begin
FController := Value; FController := Value;
if Assigned(FController) then
ListaAnos := FController.DarListaTarifasArticulos;
end; end;
destructor TfEditorArticulos.Destroy; destructor TfEditorArticulos.Destroy;

View File

@ -19,27 +19,22 @@ inherited fEditorElegirArticulos: TfEditorElegirArticulos
inherited TBXDock: TTBXDock inherited TBXDock: TTBXDock
Top = 91 Top = 91
Width = 656 Width = 656
Height = 53
ExplicitTop = 91 ExplicitTop = 91
ExplicitWidth = 656 ExplicitWidth = 656
ExplicitHeight = 53
inherited tbxMain: TTBXToolbar inherited tbxMain: TTBXToolbar
Align = alLeft Align = alLeft
DockPos = -6 DockPos = -6
ExplicitWidth = 142 ExplicitWidth = 142
ExplicitHeight = 27
inherited TBXItem36: TTBXItem inherited TBXItem36: TTBXItem
Action = actAnchoAuto2 Action = actAnchoAuto2
end end
end end
inherited tbxFiltro: TTBXToolbar inherited tbxFiltro: TTBXToolbar
Left = 142 Left = 84
Top = 26
Align = alLeft Align = alLeft
DockPos = 101 DockPos = 101
DockRow = 1 DockRow = 1
ExplicitLeft = 142 ExplicitLeft = 84
ExplicitTop = 26
inherited TBXItem34: TTBXItem inherited TBXItem34: TTBXItem
Action = actQuitarFiltro2 Action = actQuitarFiltro2
end end
@ -48,13 +43,11 @@ inherited fEditorElegirArticulos: TfEditorElegirArticulos
ExplicitWidth = 656 ExplicitWidth = 656
end end
inherited TBXTMain2: TTBXToolbar inherited TBXTMain2: TTBXToolbar
Left = 536 Left = 304
Top = 26
DockPos = 536 DockPos = 536
DockRow = 1 DockRow = 1
Visible = False Visible = False
ExplicitLeft = 536 ExplicitLeft = 304
ExplicitTop = 26
end end
end end
inherited StatusBar: TJvStatusBar inherited StatusBar: TJvStatusBar
@ -120,7 +113,7 @@ inherited fEditorElegirArticulos: TfEditorElegirArticulos
AlignWithMargins = True AlignWithMargins = True
Left = 25 Left = 25
Top = 8 Top = 8
Width = 606 Width = 131
Height = 13 Height = 13
Margins.Left = 0 Margins.Left = 0
Margins.Top = 0 Margins.Top = 0
@ -134,20 +127,17 @@ inherited fEditorElegirArticulos: TfEditorElegirArticulos
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
Font.Style = [fsBold] Font.Style = [fsBold]
ParentFont = False ParentFont = False
ExplicitWidth = 131
end end
object lblComments: TLabel object lblComments: TLabel
AlignWithMargins = True AlignWithMargins = True
Left = 50 Left = 50
Top = 29 Top = 29
Width = 581 Width = 3
Height = 27 Height = 13
Margins.Left = 25 Margins.Left = 25
Margins.Top = 0 Margins.Top = 0
Margins.Right = 0 Margins.Right = 0
Align = alClient Align = alClient
ExplicitWidth = 3
ExplicitHeight = 13
end end
end end
inherited EditorActionList: TActionList [5] inherited EditorActionList: TActionList [5]

View File

@ -1,14 +1,13 @@
inherited frViewArticulos: TfrViewArticulos inherited frViewArticulos: TfrViewArticulos
Width = 896 Width = 720
Height = 680 Height = 527
OnCreate = CustomViewCreate OnCreate = CustomViewCreate
OnShow = CustomViewShow OnShow = CustomViewShow
ExplicitWidth = 896 ExplicitWidth = 720
ExplicitHeight = 680 ExplicitHeight = 527
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 896 Width = 720
Height = 552 Height = 399
RootLevelOptions.DetailTabsPosition = dtpTop
OnActiveTabChanged = cxGridActiveTabChanged OnActiveTabChanged = cxGridActiveTabChanged
ExplicitWidth = 896 ExplicitWidth = 896
ExplicitHeight = 552 ExplicitHeight = 552
@ -182,28 +181,24 @@ inherited frViewArticulos: TfrViewArticulos
end end
end end
inherited cxGridLevel: TcxGridLevel inherited cxGridLevel: TcxGridLevel
Caption = 'Todos' Caption = 'TARIFA 2024'
end end
object cxGridLevel1: TcxGridLevel object cxGridLevel1: TcxGridLevel
Tag = 1 Tag = 1
Caption = 'TARIFA 2024' Caption = 'COMPRAS'
end end
object cxGridLevel2: TcxGridLevel object cxGridLevel2: TcxGridLevel
Tag = 2 Tag = 2
Caption = 'COMPRAS'
end
object cxGridLevel3: TcxGridLevel
Tag = 3
Caption = 'OTRAS TARIFAS' Caption = 'OTRAS TARIFAS'
end end
end end
inherited frViewFiltroBase1: TfrViewFiltroBase inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 896 Width = 720
ExplicitWidth = 896 ExplicitWidth = 896
inherited TBXDockablePanel1: TTBXDockablePanel inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 896 ExplicitWidth = 896
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 896 Width = 720
ExplicitWidth = 896 ExplicitWidth = 896
inherited txtFiltroTodo: TcxTextEdit inherited txtFiltroTodo: TcxTextEdit
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
@ -223,23 +218,23 @@ inherited frViewArticulos: TfrViewArticulos
Width = 250 Width = 250
end end
inherited edtFechaFinFiltro: TcxDateEdit inherited edtFechaFinFiltro: TcxDateEdit
Left = 511 Left = 413
Enabled = False Enabled = False
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 511 ExplicitLeft = 413
ExplicitWidth = 250 ExplicitWidth = 250
Width = 250 Width = 250
end end
inherited txtFiltroTodo2: TcxTextEdit inherited txtFiltroTodo2: TcxTextEdit
Left = 511 Left = 413
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 511 ExplicitLeft = 413
ExplicitWidth = 250 ExplicitWidth = 250
Width = 250 Width = 250
end end
@ -256,25 +251,25 @@ inherited frViewArticulos: TfrViewArticulos
end end
end end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 896 Width = 720
ExplicitWidth = 896 ExplicitWidth = 896
inherited tbxBotones: TTBXToolbar inherited tbxBotones: TTBXToolbar
Width = 886 Width = 710
ExplicitWidth = 886 ExplicitWidth = 886
end end
end end
end end
end end
inherited pnlAgrupaciones: TTBXDockablePanel inherited pnlAgrupaciones: TTBXDockablePanel
Top = 654 Top = 501
Visible = True Visible = True
ExplicitTop = 654 ExplicitTop = 654
ExplicitWidth = 896 ExplicitWidth = 896
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 896 Width = 720
ExplicitWidth = 896 ExplicitWidth = 896
inherited TBXToolbar1: TTBXToolbar inherited TBXToolbar1: TTBXToolbar
Width = 886 Width = 710
ExplicitWidth = 886 ExplicitWidth = 886
object TBXSeparatorItem1: TTBXSeparatorItem object TBXSeparatorItem1: TTBXSeparatorItem
end end

View File

@ -47,7 +47,6 @@ type
cxGridLevel1: TcxGridLevel; cxGridLevel1: TcxGridLevel;
cxGridLevel2: TcxGridLevel; cxGridLevel2: TcxGridLevel;
cxGridViewUNIDAD_MEDIDA: TcxGridDBColumn; cxGridViewUNIDAD_MEDIDA: TcxGridDBColumn;
cxGridLevel3: TcxGridLevel;
procedure cxGridViewIDCustomDrawCell( procedure cxGridViewIDCustomDrawCell(
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
@ -165,11 +164,11 @@ begin
FFiltro := AddFilterGrid(fboAnd); FFiltro := AddFilterGrid(fboAnd);
case cxGrid.ActiveLevel.Index of case cxGrid.ActiveLevel.Index of
1 : FFiltro.AddItem(cxGridViewTARIFA, foEqual, 'TARIFA 2024', 'TARIFA 2024'); 0 : FFiltro.AddItem(cxGridViewTARIFA, foEqual, 'TARIFA 2024', 'TARIFA 2024');
2 : FFiltro.AddItem(cxGridViewTARIFA, foEqual, 'COMPRAS', 'COMPRAS'); 1 : FFiltro.AddItem(cxGridViewTARIFA, foEqual, 'COMPRAS', 'COMPRAS');
3 : begin 2 : begin
FFiltro.AddItem(cxGridViewTARIFA, foNotEqual, NULL, 'ARTICULOS CON TARIFA ASIGNADA'); // FFiltro.AddItem(cxGridViewTARIFA, foNotEqual, NULL, 'ARTICULOS CON TARIFA ASIGNADA');
FFiltro := AddFilterGrid(fboAnd); // FFiltro := AddFilterGrid(fboAnd);
FFiltro.AddItem(cxGridViewTARIFA, foNotEqual, 'COMPRAS', 'OTRAS TARIFAS'); FFiltro.AddItem(cxGridViewTARIFA, foNotEqual, 'COMPRAS', 'OTRAS TARIFAS');
FFiltro := AddFilterGrid(fboAnd); FFiltro := AddFilterGrid(fboAnd);
FFiltro.AddItem(cxGridViewTARIFA, foNotEqual, 'TARIFA 2024', 'OTRAS TARIFAS'); FFiltro.AddItem(cxGridViewTARIFA, foNotEqual, 'TARIFA 2024', 'OTRAS TARIFAS');
@ -181,7 +180,8 @@ procedure TfrViewArticulos.AnadirOtrosFiltros;
begin begin
inherited; inherited;
AnadirFiltroTarifa; // Se pasa a realizar como lista años
// AnadirFiltroTarifa;
//Finalmente activamos el filtro si tenemos algo //Finalmente activamos el filtro si tenemos algo
if cxGridView.DataController.Filter.IsEmpty if cxGridView.DataController.Filter.IsEmpty

View File

@ -24,6 +24,7 @@ type
function darClienteGraden(const ID: Integer): IBizContacto; function darClienteGraden(const ID: Integer): IBizContacto;
function AsignarPrecioPunto(AClientes : IBizCliente; APrecioPunto: Variant; AllItems: Boolean = false): Boolean; function AsignarPrecioPunto(AClientes : IBizCliente; APrecioPunto: Variant; AllItems: Boolean = false): Boolean;
function AsignarComercial(AClientes : IBizCliente; AID_AGENTE: Variant; AllItems: Boolean = false): Boolean; function AsignarComercial(AClientes : IBizCliente; AID_AGENTE: Variant; AllItems: Boolean = false): Boolean;
function AsignarDescuentoCapitulo(AClientes : IBizCliente; ADescuentoCapitulo: Variant; AllItems: Boolean = false): Boolean;
end; end;
TClientesController = class(TContactosController, IClientesController) TClientesController = class(TContactosController, IClientesController)
@ -59,6 +60,7 @@ type
function darClienteGraden(const ID: Integer): IBizContacto; function darClienteGraden(const ID: Integer): IBizContacto;
function AsignarPrecioPunto(AClientes : IBizCliente; APrecioPunto: Variant; AllItems: Boolean = false): Boolean; function AsignarPrecioPunto(AClientes : IBizCliente; APrecioPunto: Variant; AllItems: Boolean = false): Boolean;
function AsignarComercial(AClientes : IBizCliente; AID_AGENTE: Variant; AllItems: Boolean = false): Boolean; function AsignarComercial(AClientes : IBizCliente; AID_AGENTE: Variant; AllItems: Boolean = false): Boolean;
function AsignarDescuentoCapitulo(AClientes : IBizCliente; ADescuentoCapitulo: Variant; AllItems: Boolean = false): Boolean;
end; end;
implementation implementation
@ -116,6 +118,49 @@ begin
end; end;
function TClientesController.AsignarDescuentoCapitulo(AClientes: IBizCliente;
ADescuentoCapitulo: Variant; AllItems: Boolean): Boolean;
begin
if not Assigned(AClientes) then
raise Exception.Create ('AClientes no asignado');
ShowHourglassCursor;
try
if not AClientes.DataTable.Active then
AClientes.DataTable.Active := True;
if (AClientes.State in dsEditModes) then
AClientes.Cancel;
//Siempre cambiaremos de situacion el seleccionado
AClientes.DataTable.Edit;
AClientes.DESCUENTO_CAPITULO := ADescuentoCapitulo;
AClientes.DataTable.Post;
//En el caso de querer cambiar todos los items del objeto AClientes
if AllItems then
begin
with AClientes.DataTable do
begin
First;
while not EOF do
begin
AClientes.DataTable.Edit;
AClientes.DESCUENTO_CAPITULO := ADescuentoCapitulo;
AClientes.DataTable.Post;
Next;
end;
end;
end;
AClientes.DataTable.ApplyUpdates;
Result := True;
finally
HideHourglassCursor;
end;
end;
function TClientesController.AsignarPrecioPunto(AClientes: IBizCliente; APrecioPunto: Variant; AllItems: Boolean): Boolean; function TClientesController.AsignarPrecioPunto(AClientes: IBizCliente; APrecioPunto: Variant; AllItems: Boolean): Boolean;
begin begin
if not Assigned(AClientes) then if not Assigned(AClientes) then

View File

@ -353,6 +353,10 @@ inherited DataModuleClientes: TDataModuleClientes
DisplayLabel = 'Clientes_DELEGACION' DisplayLabel = 'Clientes_DELEGACION'
ServerAutoRefresh = True ServerAutoRefresh = True
DictionaryEntry = 'Clientes_DELEGACION' DictionaryEntry = 'Clientes_DELEGACION'
end
item
Name = 'DESCUENTO_CAPITULO'
DataType = datFloat
end> end>
Params = <> Params = <>
StreamingOptions = [soDisableEventsWhileStreaming] StreamingOptions = [soDisableEventsWhileStreaming]

View File

@ -9,24 +9,24 @@ const
{ Data table rules ids { Data table rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_DarEmpresasContacto = '{6B5B8230-A9E2-4670-BC39-CF4AD008ECBC}'; RID_DarEmpresasContacto = '{D2260045-5EA2-445E-BD5A-00B439D26E3C}';
RID_PersonalContacto = '{12609813-2B5C-4244-9FC4-59234A7A0F30}'; RID_PersonalContacto = '{E7B4A8C5-D0B5-4198-88FB-0FE344B47561}';
RID_DarTiendaDeUsuario = '{08D9853A-7E8F-4905-8EFD-DE19623B19E6}'; RID_DarTiendaDeUsuario = '{7FDBC141-D073-425E-8B6B-344226FDED8F}';
RID_SubCuentasContacto = '{49C305EF-E410-450D-908E-CB9DF836B39C}'; RID_SubCuentasContacto = '{6FB220D7-AD68-410D-855E-406CC8B64C5B}';
RID_Contactos = '{65E2EAEB-D584-4A1F-906E-A411460ACE90}'; RID_Contactos = '{574727E9-E45C-4013-AA7A-D618CFB784D7}';
RID_GruposCliente = '{45CD2184-EBF1-4CDD-9951-5F4C0B2817BB}'; RID_GruposCliente = '{7D11D206-A5F2-48D8-BC68-F79BBA326860}';
RID_DatosBancarios = '{19204393-B7E0-466A-80D3-0B118E1FAF54}'; RID_DatosBancarios = '{85FB44EA-ADA5-4D36-957C-47D83CB1446A}';
RID_ContactosDirecciones = '{E78ED0F1-35CB-414A-8938-A5D162BDF470}'; RID_ContactosDirecciones = '{5AD62CD9-4752-4AF1-9446-2175BE9F0E68}';
RID_Clientes = '{85F5A4B9-6599-4911-B6F9-A5362F9939A0}'; RID_Clientes = '{17B3A1E3-F2CE-4919-B7B8-34ECCFA3D33E}';
RID_Proveedores = '{1D148D2E-D154-48F3-8255-9A7136C2AB23}'; RID_Proveedores = '{05E8549B-18CE-420F-A0DC-0F5E8BF230AC}';
RID_Comerciales = '{E49EB455-93CE-4F08-AB81-9CF1E9BDB466}'; RID_Comerciales = '{A3E835BE-B037-485E-9B2F-E4764A48A4BB}';
RID_Instaladores = '{1056503A-BEF9-4FBB-B224-3BE286972474}'; RID_Instaladores = '{B0A219BC-CE5D-4E2B-9B92-C0457C32D917}';
RID_Vendedores = '{FD1BC176-2266-4A27-9832-C994440B4D1E}'; RID_Vendedores = '{96E45877-1FF8-48C4-8BD2-4016D06701FC}';
RID_DireccionesContacto = '{190A97AD-5847-4669-AF68-C37DD44BD0B5}'; RID_DireccionesContacto = '{FFF2865B-F57F-4633-A39E-35B8BDDF018F}';
RID_ClientesDescuentos = '{B4E6E5DA-E22A-4306-821A-3CB1BC46A189}'; RID_ClientesDescuentos = '{788242EA-B70E-4C1D-94A0-E7F2F3731BF9}';
RID_ProcedenciasCliente = '{11497381-2D0D-4F17-8EF3-5768CF2AC18E}'; RID_ProcedenciasCliente = '{FDDCA58A-27BC-48D3-90F7-F4086DD3F373}';
RID_GruposProveedor = '{F3063D56-E8B2-418B-8EA4-C8505F6335E2}'; RID_GruposProveedor = '{FCE44575-FFF9-454C-9300-B9BC387FB125}';
RID_Contactos_Refresh = '{107036B0-AFF7-4919-B938-4A5EBC9E4963}'; RID_Contactos_Refresh = '{706F2E1D-C4C9-4003-AB7F-0894C9EC4465}';
{ Data table names } { Data table names }
nme_DarEmpresasContacto = 'DarEmpresasContacto'; nme_DarEmpresasContacto = 'DarEmpresasContacto';
@ -277,6 +277,7 @@ const
fld_ClientesID_AGENTE = 'ID_AGENTE'; fld_ClientesID_AGENTE = 'ID_AGENTE';
fld_ClientesAGENTE = 'AGENTE'; fld_ClientesAGENTE = 'AGENTE';
fld_ClientesDELEGACION = 'DELEGACION'; fld_ClientesDELEGACION = 'DELEGACION';
fld_ClientesDESCUENTO_CAPITULO = 'DESCUENTO_CAPITULO';
{ Clientes field indexes } { Clientes field indexes }
idx_ClientesID = 0; idx_ClientesID = 0;
@ -329,6 +330,7 @@ const
idx_ClientesID_AGENTE = 47; idx_ClientesID_AGENTE = 47;
idx_ClientesAGENTE = 48; idx_ClientesAGENTE = 48;
idx_ClientesDELEGACION = 49; idx_ClientesDELEGACION = 49;
idx_ClientesDESCUENTO_CAPITULO = 50;
{ Proveedores fields } { Proveedores fields }
fld_ProveedoresID = 'ID'; fld_ProveedoresID = 'ID';
@ -739,7 +741,7 @@ const
type type
{ IDarEmpresasContacto } { IDarEmpresasContacto }
IDarEmpresasContacto = interface(IDAStronglyTypedDataTable) IDarEmpresasContacto = interface(IDAStronglyTypedDataTable)
['{74BCFDF0-7863-4AFE-AA75-1B3FA9CE93F1}'] ['{6DCC6AB5-B946-4656-8122-9CEA4C3561D8}']
{ Property getters and setters } { Property getters and setters }
function GetID_EMPRESAValue: Integer; function GetID_EMPRESAValue: Integer;
procedure SetID_EMPRESAValue(const aValue: Integer); procedure SetID_EMPRESAValue(const aValue: Integer);
@ -774,7 +776,7 @@ type
{ IPersonalContacto } { IPersonalContacto }
IPersonalContacto = interface(IDAStronglyTypedDataTable) IPersonalContacto = interface(IDAStronglyTypedDataTable)
['{48B7CE71-4611-40E9-8309-CF1A469B0E0A}'] ['{0A320E1D-F141-4023-BAB7-8508851D0967}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -917,7 +919,7 @@ type
{ IDarTiendaDeUsuario } { IDarTiendaDeUsuario }
IDarTiendaDeUsuario = interface(IDAStronglyTypedDataTable) IDarTiendaDeUsuario = interface(IDAStronglyTypedDataTable)
['{C6B463F6-2B49-42C1-A9C1-54D2C6E5F89D}'] ['{78C5C14C-0995-4F0D-AE6D-D09EE2EBA5AB}']
{ Property getters and setters } { Property getters and setters }
function GetID_TIENDAValue: Integer; function GetID_TIENDAValue: Integer;
procedure SetID_TIENDAValue(const aValue: Integer); procedure SetID_TIENDAValue(const aValue: Integer);
@ -952,7 +954,7 @@ type
{ ISubCuentasContacto } { ISubCuentasContacto }
ISubCuentasContacto = interface(IDAStronglyTypedDataTable) ISubCuentasContacto = interface(IDAStronglyTypedDataTable)
['{245747DA-5090-4C27-B069-2ED2C1FDA0B5}'] ['{98FBBB17-C37A-4B62-BC5C-EA3EB4E8D40F}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -1047,7 +1049,7 @@ type
{ IContactos } { IContactos }
IContactos = interface(IDAStronglyTypedDataTable) IContactos = interface(IDAStronglyTypedDataTable)
['{B0E77232-DA8B-4467-A832-2B0B481B9ED4}'] ['{8AD40959-2410-4896-B2F6-0ED92285C5EA}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -1406,7 +1408,7 @@ type
{ IGruposCliente } { IGruposCliente }
IGruposCliente = interface(IDAStronglyTypedDataTable) IGruposCliente = interface(IDAStronglyTypedDataTable)
['{A94156DD-FB78-4A9A-A0B3-4F8C99C06BFD}'] ['{CA2408DC-3393-4166-A710-C5AFB9800D3F}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -1453,7 +1455,7 @@ type
{ IDatosBancarios } { IDatosBancarios }
IDatosBancarios = interface(IDAStronglyTypedDataTable) IDatosBancarios = interface(IDAStronglyTypedDataTable)
['{E2101AE4-133E-493C-BC6A-235EC3750343}'] ['{8BCFC161-8278-40D6-A085-01C58E73E6E3}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -1608,7 +1610,7 @@ type
{ IContactosDirecciones } { IContactosDirecciones }
IContactosDirecciones = interface(IDAStronglyTypedDataTable) IContactosDirecciones = interface(IDAStronglyTypedDataTable)
['{50455323-A50D-4FEC-9A19-C921313916FD}'] ['{99D8DC4D-B704-4B1B-A6EA-3CF7E7016D22}']
{ Property getters and setters } { Property getters and setters }
function GetID_CONTACTOValue: Integer; function GetID_CONTACTOValue: Integer;
procedure SetID_CONTACTOValue(const aValue: Integer); procedure SetID_CONTACTOValue(const aValue: Integer);
@ -1799,7 +1801,7 @@ type
{ IClientes } { IClientes }
IClientes = interface(IDAStronglyTypedDataTable) IClientes = interface(IDAStronglyTypedDataTable)
['{7D47936E-74FD-4F0B-BBBF-CF4B93038F85}'] ['{674DFF3A-9F54-48EF-89D6-A6AD544798D1}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -2000,6 +2002,10 @@ type
procedure SetDELEGACIONValue(const aValue: String); procedure SetDELEGACIONValue(const aValue: String);
function GetDELEGACIONIsNull: Boolean; function GetDELEGACIONIsNull: Boolean;
procedure SetDELEGACIONIsNull(const aValue: Boolean); procedure SetDELEGACIONIsNull(const aValue: Boolean);
function GetDESCUENTO_CAPITULOValue: Float;
procedure SetDESCUENTO_CAPITULOValue(const aValue: Float);
function GetDESCUENTO_CAPITULOIsNull: Boolean;
procedure SetDESCUENTO_CAPITULOIsNull(const aValue: Boolean);
{ Properties } { Properties }
@ -2103,6 +2109,8 @@ type
property AGENTEIsNull: Boolean read GetAGENTEIsNull write SetAGENTEIsNull; property AGENTEIsNull: Boolean read GetAGENTEIsNull write SetAGENTEIsNull;
property DELEGACION: String read GetDELEGACIONValue write SetDELEGACIONValue; property DELEGACION: String read GetDELEGACIONValue write SetDELEGACIONValue;
property DELEGACIONIsNull: Boolean read GetDELEGACIONIsNull write SetDELEGACIONIsNull; property DELEGACIONIsNull: Boolean read GetDELEGACIONIsNull write SetDELEGACIONIsNull;
property DESCUENTO_CAPITULO: Float read GetDESCUENTO_CAPITULOValue write SetDESCUENTO_CAPITULOValue;
property DESCUENTO_CAPITULOIsNull: Boolean read GetDESCUENTO_CAPITULOIsNull write SetDESCUENTO_CAPITULOIsNull;
end; end;
{ TClientesDataTableRules } { TClientesDataTableRules }
@ -2311,6 +2319,10 @@ type
procedure SetDELEGACIONValue(const aValue: String); virtual; procedure SetDELEGACIONValue(const aValue: String); virtual;
function GetDELEGACIONIsNull: Boolean; virtual; function GetDELEGACIONIsNull: Boolean; virtual;
procedure SetDELEGACIONIsNull(const aValue: Boolean); virtual; procedure SetDELEGACIONIsNull(const aValue: Boolean); virtual;
function GetDESCUENTO_CAPITULOValue: Float; virtual;
procedure SetDESCUENTO_CAPITULOValue(const aValue: Float); virtual;
function GetDESCUENTO_CAPITULOIsNull: Boolean; virtual;
procedure SetDESCUENTO_CAPITULOIsNull(const aValue: Boolean); virtual;
{ Properties } { Properties }
property ID: Integer read GetIDValue write SetIDValue; property ID: Integer read GetIDValue write SetIDValue;
@ -2413,6 +2425,8 @@ type
property AGENTEIsNull: Boolean read GetAGENTEIsNull write SetAGENTEIsNull; property AGENTEIsNull: Boolean read GetAGENTEIsNull write SetAGENTEIsNull;
property DELEGACION: String read GetDELEGACIONValue write SetDELEGACIONValue; property DELEGACION: String read GetDELEGACIONValue write SetDELEGACIONValue;
property DELEGACIONIsNull: Boolean read GetDELEGACIONIsNull write SetDELEGACIONIsNull; property DELEGACIONIsNull: Boolean read GetDELEGACIONIsNull write SetDELEGACIONIsNull;
property DESCUENTO_CAPITULO: Float read GetDESCUENTO_CAPITULOValue write SetDESCUENTO_CAPITULOValue;
property DESCUENTO_CAPITULOIsNull: Boolean read GetDESCUENTO_CAPITULOIsNull write SetDESCUENTO_CAPITULOIsNull;
public public
constructor Create(aDataTable: TDADataTable); override; constructor Create(aDataTable: TDADataTable); override;
@ -2422,7 +2436,7 @@ type
{ IProveedores } { IProveedores }
IProveedores = interface(IDAStronglyTypedDataTable) IProveedores = interface(IDAStronglyTypedDataTable)
['{1467805C-8770-4419-BA1A-9FD229EDAD31}'] ['{7B8EE822-7F3D-4A37-A90C-D614D4EF458E}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -2985,7 +2999,7 @@ type
{ IComerciales } { IComerciales }
IComerciales = interface(IDAStronglyTypedDataTable) IComerciales = interface(IDAStronglyTypedDataTable)
['{A8D9578B-5B0B-4244-80ED-57CD9553DF59}'] ['{EF962C82-23DF-4E13-A793-B0CD34816707}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -3404,7 +3418,7 @@ type
{ IInstaladores } { IInstaladores }
IInstaladores = interface(IDAStronglyTypedDataTable) IInstaladores = interface(IDAStronglyTypedDataTable)
['{5575AD11-CD8E-46D5-9983-58F0EB6599B0}'] ['{BF609D94-FFC5-4308-B658-5C8B4B4DED81}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -3763,7 +3777,7 @@ type
{ IVendedores } { IVendedores }
IVendedores = interface(IDAStronglyTypedDataTable) IVendedores = interface(IDAStronglyTypedDataTable)
['{D0293305-645A-4CDC-9723-A854D60813C1}'] ['{D67ABC37-B10F-4ABE-B634-A98DDA6E256D}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -4146,7 +4160,7 @@ type
{ IDireccionesContacto } { IDireccionesContacto }
IDireccionesContacto = interface(IDAStronglyTypedDataTable) IDireccionesContacto = interface(IDAStronglyTypedDataTable)
['{9B4F3039-A8A8-4F49-9A1B-73B80387BE5A}'] ['{B16F0A1B-12F6-4C5C-B1FE-7BE3D6DD3CBC}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -4385,7 +4399,7 @@ type
{ IClientesDescuentos } { IClientesDescuentos }
IClientesDescuentos = interface(IDAStronglyTypedDataTable) IClientesDescuentos = interface(IDAStronglyTypedDataTable)
['{76B02D12-A664-4A02-A62F-2D0E8A558AC5}'] ['{D7066FC5-59F7-4BC6-9124-509E231ED7E7}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -4468,7 +4482,7 @@ type
{ IProcedenciasCliente } { IProcedenciasCliente }
IProcedenciasCliente = interface(IDAStronglyTypedDataTable) IProcedenciasCliente = interface(IDAStronglyTypedDataTable)
['{D639D601-AE0F-4D7E-BB2F-97F2932F2F7A}'] ['{AA87B063-67F2-41E0-BCFE-DF911ACA591C}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -4515,7 +4529,7 @@ type
{ IGruposProveedor } { IGruposProveedor }
IGruposProveedor = interface(IDAStronglyTypedDataTable) IGruposProveedor = interface(IDAStronglyTypedDataTable)
['{8BC722A3-FEC9-4E77-B27E-9575BFE3E46C}'] ['{74599997-1812-4EEE-8C27-45A8449C66B0}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -4562,7 +4576,7 @@ type
{ IContactos_Refresh } { IContactos_Refresh }
IContactos_Refresh = interface(IDAStronglyTypedDataTable) IContactos_Refresh = interface(IDAStronglyTypedDataTable)
['{521CA5F1-E240-4CC1-8071-5AE10885871A}'] ['{A461B8AD-126F-4F81-AF01-F1474954EF29}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -7555,6 +7569,27 @@ begin
DataTable.Fields[idx_ClientesDELEGACION].AsVariant := Null; DataTable.Fields[idx_ClientesDELEGACION].AsVariant := Null;
end; end;
function TClientesDataTableRules.GetDESCUENTO_CAPITULOValue: Float;
begin
result := DataTable.Fields[idx_ClientesDESCUENTO_CAPITULO].AsFloat;
end;
procedure TClientesDataTableRules.SetDESCUENTO_CAPITULOValue(const aValue: Float);
begin
DataTable.Fields[idx_ClientesDESCUENTO_CAPITULO].AsFloat := aValue;
end;
function TClientesDataTableRules.GetDESCUENTO_CAPITULOIsNull: boolean;
begin
result := DataTable.Fields[idx_ClientesDESCUENTO_CAPITULO].IsNull;
end;
procedure TClientesDataTableRules.SetDESCUENTO_CAPITULOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ClientesDESCUENTO_CAPITULO].AsVariant := Null;
end;
{ TProveedoresDataTableRules } { TProveedoresDataTableRules }
constructor TProveedoresDataTableRules.Create(aDataTable: TDADataTable); constructor TProveedoresDataTableRules.Create(aDataTable: TDADataTable);

View File

@ -9,29 +9,29 @@ const
{ Delta rules ids { Delta rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_DarEmpresasContactoDelta = '{50343E1D-8EAC-4CCC-8261-FDF50B277B28}'; RID_DarEmpresasContactoDelta = '{8E43A352-5534-4ED0-98A0-8B9315B87DC9}';
RID_PersonalContactoDelta = '{9B2EDF75-3EC6-43A2-B7AD-420590230619}'; RID_PersonalContactoDelta = '{6CEB5C20-52D6-47EB-9E0B-FC1ED530ED57}';
RID_DarTiendaDeUsuarioDelta = '{02492A83-56C2-41FF-8EA8-8260CDA68FDB}'; RID_DarTiendaDeUsuarioDelta = '{27AD499A-FDA3-486D-AED3-6F3C185E0BB7}';
RID_SubCuentasContactoDelta = '{6AECBE9A-08C5-4EC9-91EE-D19308C3A667}'; RID_SubCuentasContactoDelta = '{89060287-0004-4DC6-9B41-CA8BEE15E4FA}';
RID_ContactosDelta = '{9660B8A5-3B0D-4138-83A0-FE285150D1F2}'; RID_ContactosDelta = '{8568C604-4350-40D2-BFF4-63991A810025}';
RID_GruposClienteDelta = '{88ED7D29-FD3B-4ACB-93C1-BA61480209CF}'; RID_GruposClienteDelta = '{2B2FDDCA-B7DC-4E22-837A-CBF4B31EB334}';
RID_DatosBancariosDelta = '{37483896-6666-47AB-AEF6-8255CC32F9EC}'; RID_DatosBancariosDelta = '{4B54C2AA-1D6E-4B7C-ABDD-D27AC0EC80E0}';
RID_ContactosDireccionesDelta = '{647DBD76-7ABB-411A-B07A-9345C26EA35B}'; RID_ContactosDireccionesDelta = '{96575B97-B9C5-4F98-B022-FB7ED9D2F362}';
RID_ClientesDelta = '{1BD4538E-C79F-4990-B3F9-F0AD25518571}'; RID_ClientesDelta = '{C370F2E8-BB83-4B2A-B586-616B15393E4B}';
RID_ProveedoresDelta = '{7A999D85-A0AE-4985-9133-E3405BDA1387}'; RID_ProveedoresDelta = '{F4211FE5-B711-4A6F-BD50-1362FBE58A63}';
RID_ComercialesDelta = '{04DFD96E-0160-4FE0-9A8F-03E096AE75E8}'; RID_ComercialesDelta = '{E1E60EEC-3987-4A5F-945E-3254A717DAF0}';
RID_InstaladoresDelta = '{637F534B-68C4-4148-9AD2-A9F503F647C5}'; RID_InstaladoresDelta = '{9E6D5095-74E3-46F4-A0BD-9978B1764CC3}';
RID_VendedoresDelta = '{27F8AD50-5B5E-42BD-903F-DA63BF03950A}'; RID_VendedoresDelta = '{B0DBA7AF-A835-48FD-A7CC-1D0FFCDAF2EC}';
RID_DireccionesContactoDelta = '{4EF3C254-4534-4820-B03D-C9C8C94D36B5}'; RID_DireccionesContactoDelta = '{BE093FC9-3ECB-4D20-83E7-C65A2B28F787}';
RID_ClientesDescuentosDelta = '{548553AB-BF82-4282-A810-21E286A7294B}'; RID_ClientesDescuentosDelta = '{971706C8-35EA-4642-A2C2-67D8733848E3}';
RID_ProcedenciasClienteDelta = '{5FEBA4CA-F3E8-414D-A035-A9995D288250}'; RID_ProcedenciasClienteDelta = '{B1CB95E2-06FE-4612-9DAB-8266C1544841}';
RID_GruposProveedorDelta = '{D9A423CF-9CC2-4920-8C2A-F4713CC87154}'; RID_GruposProveedorDelta = '{C818ADEB-6295-4D86-97A9-0B76F573D404}';
RID_Contactos_RefreshDelta = '{F56DF432-BE94-4770-B844-4050B53E7365}'; RID_Contactos_RefreshDelta = '{A915B623-C44A-4698-A8D7-A5EF90EA74C7}';
type type
{ IDarEmpresasContactoDelta } { IDarEmpresasContactoDelta }
IDarEmpresasContactoDelta = interface(IDarEmpresasContacto) IDarEmpresasContactoDelta = interface(IDarEmpresasContacto)
['{50343E1D-8EAC-4CCC-8261-FDF50B277B28}'] ['{8E43A352-5534-4ED0-98A0-8B9315B87DC9}']
{ Property getters and setters } { Property getters and setters }
function GetOldID_EMPRESAValue : Integer; function GetOldID_EMPRESAValue : Integer;
@ -65,7 +65,7 @@ type
{ IPersonalContactoDelta } { IPersonalContactoDelta }
IPersonalContactoDelta = interface(IPersonalContacto) IPersonalContactoDelta = interface(IPersonalContacto)
['{9B2EDF75-3EC6-43A2-B7AD-420590230619}'] ['{6CEB5C20-52D6-47EB-9E0B-FC1ED530ED57}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_CONTACTOValue : Integer; function GetOldID_CONTACTOValue : Integer;
@ -207,7 +207,7 @@ type
{ IDarTiendaDeUsuarioDelta } { IDarTiendaDeUsuarioDelta }
IDarTiendaDeUsuarioDelta = interface(IDarTiendaDeUsuario) IDarTiendaDeUsuarioDelta = interface(IDarTiendaDeUsuario)
['{02492A83-56C2-41FF-8EA8-8260CDA68FDB}'] ['{27AD499A-FDA3-486D-AED3-6F3C185E0BB7}']
{ Property getters and setters } { Property getters and setters }
function GetOldID_TIENDAValue : Integer; function GetOldID_TIENDAValue : Integer;
@ -241,7 +241,7 @@ type
{ ISubCuentasContactoDelta } { ISubCuentasContactoDelta }
ISubCuentasContactoDelta = interface(ISubCuentasContacto) ISubCuentasContactoDelta = interface(ISubCuentasContacto)
['{6AECBE9A-08C5-4EC9-91EE-D19308C3A667}'] ['{89060287-0004-4DC6-9B41-CA8BEE15E4FA}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldREF_SUBCUENTAValue : String; function GetOldREF_SUBCUENTAValue : String;
@ -335,7 +335,7 @@ type
{ IContactosDelta } { IContactosDelta }
IContactosDelta = interface(IContactos) IContactosDelta = interface(IContactos)
['{9660B8A5-3B0D-4138-83A0-FE285150D1F2}'] ['{8568C604-4350-40D2-BFF4-63991A810025}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_CATEGORIAValue : Integer; function GetOldID_CATEGORIAValue : Integer;
@ -694,7 +694,7 @@ type
{ IGruposClienteDelta } { IGruposClienteDelta }
IGruposClienteDelta = interface(IGruposCliente) IGruposClienteDelta = interface(IGruposCliente)
['{88ED7D29-FD3B-4ACB-93C1-BA61480209CF}'] ['{2B2FDDCA-B7DC-4E22-837A-CBF4B31EB334}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldDESCRIPCIONValue : String; function GetOldDESCRIPCIONValue : String;
@ -740,7 +740,7 @@ type
{ IDatosBancariosDelta } { IDatosBancariosDelta }
IDatosBancariosDelta = interface(IDatosBancarios) IDatosBancariosDelta = interface(IDatosBancarios)
['{37483896-6666-47AB-AEF6-8255CC32F9EC}'] ['{4B54C2AA-1D6E-4B7C-ABDD-D27AC0EC80E0}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_CONTACTOValue : Integer; function GetOldID_CONTACTOValue : Integer;
@ -894,7 +894,7 @@ type
{ IContactosDireccionesDelta } { IContactosDireccionesDelta }
IContactosDireccionesDelta = interface(IContactosDirecciones) IContactosDireccionesDelta = interface(IContactosDirecciones)
['{647DBD76-7ABB-411A-B07A-9345C26EA35B}'] ['{96575B97-B9C5-4F98-B022-FB7ED9D2F362}']
{ Property getters and setters } { Property getters and setters }
function GetOldID_CONTACTOValue : Integer; function GetOldID_CONTACTOValue : Integer;
function GetOldID_DIRECCIONValue : Integer; function GetOldID_DIRECCIONValue : Integer;
@ -1084,7 +1084,7 @@ type
{ IClientesDelta } { IClientesDelta }
IClientesDelta = interface(IClientes) IClientesDelta = interface(IClientes)
['{1BD4538E-C79F-4990-B3F9-F0AD25518571}'] ['{C370F2E8-BB83-4B2A-B586-616B15393E4B}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_CATEGORIAValue : Integer; function GetOldID_CATEGORIAValue : Integer;
@ -1136,6 +1136,7 @@ type
function GetOldID_AGENTEValue : Integer; function GetOldID_AGENTEValue : Integer;
function GetOldAGENTEValue : String; function GetOldAGENTEValue : String;
function GetOldDELEGACIONValue : String; function GetOldDELEGACIONValue : String;
function GetOldDESCUENTO_CAPITULOValue : Float;
{ Properties } { Properties }
property OldID : Integer read GetOldIDValue; property OldID : Integer read GetOldIDValue;
@ -1188,6 +1189,7 @@ type
property OldID_AGENTE : Integer read GetOldID_AGENTEValue; property OldID_AGENTE : Integer read GetOldID_AGENTEValue;
property OldAGENTE : String read GetOldAGENTEValue; property OldAGENTE : String read GetOldAGENTEValue;
property OldDELEGACION : String read GetOldDELEGACIONValue; property OldDELEGACION : String read GetOldDELEGACIONValue;
property OldDESCUENTO_CAPITULO : Float read GetOldDESCUENTO_CAPITULOValue;
end; end;
{ TClientesBusinessProcessorRules } { TClientesBusinessProcessorRules }
@ -1496,6 +1498,12 @@ type
function GetOldDELEGACIONIsNull: Boolean; virtual; function GetOldDELEGACIONIsNull: Boolean; virtual;
procedure SetDELEGACIONValue(const aValue: String); virtual; procedure SetDELEGACIONValue(const aValue: String); virtual;
procedure SetDELEGACIONIsNull(const aValue: Boolean); virtual; procedure SetDELEGACIONIsNull(const aValue: Boolean); virtual;
function GetDESCUENTO_CAPITULOValue: Float; virtual;
function GetDESCUENTO_CAPITULOIsNull: Boolean; virtual;
function GetOldDESCUENTO_CAPITULOValue: Float; virtual;
function GetOldDESCUENTO_CAPITULOIsNull: Boolean; virtual;
procedure SetDESCUENTO_CAPITULOValue(const aValue: Float); virtual;
procedure SetDESCUENTO_CAPITULOIsNull(const aValue: Boolean); virtual;
{ Properties } { Properties }
property ID : Integer read GetIDValue write SetIDValue; property ID : Integer read GetIDValue write SetIDValue;
@ -1698,6 +1706,10 @@ type
property DELEGACIONIsNull : Boolean read GetDELEGACIONIsNull write SetDELEGACIONIsNull; property DELEGACIONIsNull : Boolean read GetDELEGACIONIsNull write SetDELEGACIONIsNull;
property OldDELEGACION : String read GetOldDELEGACIONValue; property OldDELEGACION : String read GetOldDELEGACIONValue;
property OldDELEGACIONIsNull : Boolean read GetOldDELEGACIONIsNull; property OldDELEGACIONIsNull : Boolean read GetOldDELEGACIONIsNull;
property DESCUENTO_CAPITULO : Float read GetDESCUENTO_CAPITULOValue write SetDESCUENTO_CAPITULOValue;
property DESCUENTO_CAPITULOIsNull : Boolean read GetDESCUENTO_CAPITULOIsNull write SetDESCUENTO_CAPITULOIsNull;
property OldDESCUENTO_CAPITULO : Float read GetOldDESCUENTO_CAPITULOValue;
property OldDESCUENTO_CAPITULOIsNull : Boolean read GetOldDESCUENTO_CAPITULOIsNull;
public public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override; constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@ -1707,7 +1719,7 @@ type
{ IProveedoresDelta } { IProveedoresDelta }
IProveedoresDelta = interface(IProveedores) IProveedoresDelta = interface(IProveedores)
['{7A999D85-A0AE-4985-9133-E3405BDA1387}'] ['{F4211FE5-B711-4A6F-BD50-1362FBE58A63}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_CATEGORIAValue : Integer; function GetOldID_CATEGORIAValue : Integer;
@ -2270,7 +2282,7 @@ type
{ IComercialesDelta } { IComercialesDelta }
IComercialesDelta = interface(IComerciales) IComercialesDelta = interface(IComerciales)
['{04DFD96E-0160-4FE0-9A8F-03E096AE75E8}'] ['{E1E60EEC-3987-4A5F-945E-3254A717DAF0}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_CATEGORIAValue : Integer; function GetOldID_CATEGORIAValue : Integer;
@ -2689,7 +2701,7 @@ type
{ IInstaladoresDelta } { IInstaladoresDelta }
IInstaladoresDelta = interface(IInstaladores) IInstaladoresDelta = interface(IInstaladores)
['{637F534B-68C4-4148-9AD2-A9F503F647C5}'] ['{9E6D5095-74E3-46F4-A0BD-9978B1764CC3}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_CATEGORIAValue : Integer; function GetOldID_CATEGORIAValue : Integer;
@ -3048,7 +3060,7 @@ type
{ IVendedoresDelta } { IVendedoresDelta }
IVendedoresDelta = interface(IVendedores) IVendedoresDelta = interface(IVendedores)
['{27F8AD50-5B5E-42BD-903F-DA63BF03950A}'] ['{B0DBA7AF-A835-48FD-A7CC-1D0FFCDAF2EC}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_CATEGORIAValue : Integer; function GetOldID_CATEGORIAValue : Integer;
@ -3431,7 +3443,7 @@ type
{ IDireccionesContactoDelta } { IDireccionesContactoDelta }
IDireccionesContactoDelta = interface(IDireccionesContacto) IDireccionesContactoDelta = interface(IDireccionesContacto)
['{4EF3C254-4534-4820-B03D-C9C8C94D36B5}'] ['{BE093FC9-3ECB-4D20-83E7-C65A2B28F787}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_CONTACTOValue : Integer; function GetOldID_CONTACTOValue : Integer;
@ -3670,7 +3682,7 @@ type
{ IClientesDescuentosDelta } { IClientesDescuentosDelta }
IClientesDescuentosDelta = interface(IClientesDescuentos) IClientesDescuentosDelta = interface(IClientesDescuentos)
['{548553AB-BF82-4282-A810-21E286A7294B}'] ['{971706C8-35EA-4642-A2C2-67D8733848E3}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_CLIENTEValue : Integer; function GetOldID_CLIENTEValue : Integer;
@ -3752,7 +3764,7 @@ type
{ IProcedenciasClienteDelta } { IProcedenciasClienteDelta }
IProcedenciasClienteDelta = interface(IProcedenciasCliente) IProcedenciasClienteDelta = interface(IProcedenciasCliente)
['{5FEBA4CA-F3E8-414D-A035-A9995D288250}'] ['{B1CB95E2-06FE-4612-9DAB-8266C1544841}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldDESCRIPCIONValue : String; function GetOldDESCRIPCIONValue : String;
@ -3798,7 +3810,7 @@ type
{ IGruposProveedorDelta } { IGruposProveedorDelta }
IGruposProveedorDelta = interface(IGruposProveedor) IGruposProveedorDelta = interface(IGruposProveedor)
['{D9A423CF-9CC2-4920-8C2A-F4713CC87154}'] ['{C818ADEB-6295-4D86-97A9-0B76F573D404}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldDESCRIPCIONValue : String; function GetOldDESCRIPCIONValue : String;
@ -3844,7 +3856,7 @@ type
{ IContactos_RefreshDelta } { IContactos_RefreshDelta }
IContactos_RefreshDelta = interface(IContactos_Refresh) IContactos_RefreshDelta = interface(IContactos_Refresh)
['{F56DF432-BE94-4770-B844-4050B53E7365}'] ['{A915B623-C44A-4698-A8D7-A5EF90EA74C7}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldNIF_CIFValue : String; function GetOldNIF_CIFValue : String;
@ -8070,6 +8082,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesDELEGACION] := Null; BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesDELEGACION] := Null;
end; end;
function TClientesBusinessProcessorRules.GetDESCUENTO_CAPITULOValue: Float;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesDESCUENTO_CAPITULO];
end;
function TClientesBusinessProcessorRules.GetDESCUENTO_CAPITULOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesDESCUENTO_CAPITULO]);
end;
function TClientesBusinessProcessorRules.GetOldDESCUENTO_CAPITULOValue: Float;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_ClientesDESCUENTO_CAPITULO];
end;
function TClientesBusinessProcessorRules.GetOldDESCUENTO_CAPITULOIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ClientesDESCUENTO_CAPITULO]);
end;
procedure TClientesBusinessProcessorRules.SetDESCUENTO_CAPITULOValue(const aValue: Float);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesDESCUENTO_CAPITULO] := aValue;
end;
procedure TClientesBusinessProcessorRules.SetDESCUENTO_CAPITULOIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_ClientesDESCUENTO_CAPITULO] := Null;
end;
{ TProveedoresBusinessProcessorRules } { TProveedoresBusinessProcessorRules }
constructor TProveedoresBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); constructor TProveedoresBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);

View File

@ -187,6 +187,7 @@ begin
ParamByName('DESCUENTO').Value := aChange.NewValueByName[fld_ClientesDESCUENTO]; ParamByName('DESCUENTO').Value := aChange.NewValueByName[fld_ClientesDESCUENTO];
ParamByName('DESCUENTO_LINEA').Value := aChange.NewValueByName[fld_ClientesDESCUENTO_LINEA]; ParamByName('DESCUENTO_LINEA').Value := aChange.NewValueByName[fld_ClientesDESCUENTO_LINEA];
ParamByName('PRECIO_PUNTO').Value := aChange.NewValueByName[fld_ClientesPRECIO_PUNTO]; ParamByName('PRECIO_PUNTO').Value := aChange.NewValueByName[fld_ClientesPRECIO_PUNTO];
ParamByName('DESCUENTO_CAPITULO').Value := aChange.NewValueByName[fld_ClientesDESCUENTO_CAPITULO];
Execute; Execute;
end; end;
@ -245,6 +246,7 @@ begin
ParamByName('DESCUENTO').Value := aChange.NewValueByName[fld_ClientesDESCUENTO]; ParamByName('DESCUENTO').Value := aChange.NewValueByName[fld_ClientesDESCUENTO];
ParamByName('DESCUENTO_LINEA').Value := aChange.NewValueByName[fld_ClientesDESCUENTO_LINEA]; ParamByName('DESCUENTO_LINEA').Value := aChange.NewValueByName[fld_ClientesDESCUENTO_LINEA];
ParamByName('PRECIO_PUNTO').Value := aChange.NewValueByName[fld_ClientesPRECIO_PUNTO]; ParamByName('PRECIO_PUNTO').Value := aChange.NewValueByName[fld_ClientesPRECIO_PUNTO];
ParamByName('DESCUENTO_CAPITULO').Value := aChange.NewValueByName[fld_ClientesDESCUENTO_CAPITULO];
Execute; Execute;
end; end;

View File

@ -64,6 +64,9 @@ type
function GetDESCUENTO_LINEAValue: Float; function GetDESCUENTO_LINEAValue: Float;
procedure SetDESCUENTO_LINEAValue(const aValue: Float); procedure SetDESCUENTO_LINEAValue(const aValue: Float);
function GetDESCUENTO_CAPITULOValue: Float;
procedure SetDESCUENTO_CAPITULOValue(const aValue: Float);
function GetGRUPO_CLIENTEValue: String; function GetGRUPO_CLIENTEValue: String;
procedure SetGRUPO_CLIENTEValue(const aValue: String); procedure SetGRUPO_CLIENTEValue(const aValue: String);
@ -131,6 +134,7 @@ type
property TIENDA_WEB: Integer read GetTIENDA_WEBValue write SetTIENDA_WEBValue; property TIENDA_WEB: Integer read GetTIENDA_WEBValue write SetTIENDA_WEBValue;
property DESCUENTO: Float read GetDESCUENTOValue write SetDESCUENTOValue; property DESCUENTO: Float read GetDESCUENTOValue write SetDESCUENTOValue;
property DESCUENTO_LINEA: Float read GetDESCUENTO_LINEAValue write SetDESCUENTO_LINEAValue; property DESCUENTO_LINEA: Float read GetDESCUENTO_LINEAValue write SetDESCUENTO_LINEAValue;
property DESCUENTO_CAPITULO: Float read GetDESCUENTO_CAPITULOValue write SetDESCUENTO_CAPITULOValue;
property PRECIO_PUNTO: Currency read GetPRECIO_PUNTOValue write SetPRECIO_PUNTOValue; property PRECIO_PUNTO: Currency read GetPRECIO_PUNTOValue write SetPRECIO_PUNTOValue;
property ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue; property ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue;
property AGENTE: String read GetAGENTEValue write SetAGENTEValue; property AGENTE: String read GetAGENTEValue write SetAGENTEValue;
@ -320,6 +324,9 @@ type
function GetDESCUENTO_LINEAValue: Float; function GetDESCUENTO_LINEAValue: Float;
procedure SetDESCUENTO_LINEAValue(const aValue: Float); procedure SetDESCUENTO_LINEAValue(const aValue: Float);
function GetDESCUENTO_CAPITULOValue: Float;
procedure SetDESCUENTO_CAPITULOValue(const aValue: Float);
function GetGRUPO_CLIENTEValue: String; function GetGRUPO_CLIENTEValue: String;
procedure SetGRUPO_CLIENTEValue(const aValue: String); procedure SetGRUPO_CLIENTEValue(const aValue: String);
@ -400,6 +407,7 @@ type
property TIENE_SUBCUENTA: Integer read GetTiene_SubCuenta write SetTiene_Subcuenta; property TIENE_SUBCUENTA: Integer read GetTiene_SubCuenta write SetTiene_Subcuenta;
property DESCUENTO: Float read GetDESCUENTOValue write SetDESCUENTOValue; property DESCUENTO: Float read GetDESCUENTOValue write SetDESCUENTOValue;
property DESCUENTO_LINEA: Float read GetDESCUENTO_LINEAValue write SetDESCUENTO_LINEAValue; property DESCUENTO_LINEA: Float read GetDESCUENTO_LINEAValue write SetDESCUENTO_LINEAValue;
property DESCUENTO_CAPITULO: Float read GetDESCUENTO_CAPITULOValue write SetDESCUENTO_CAPITULOValue;
property PRECIO_PUNTO: Currency read GetPRECIO_PUNTOValue write SetPRECIO_PUNTOValue; property PRECIO_PUNTO: Currency read GetPRECIO_PUNTOValue write SetPRECIO_PUNTOValue;
property ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue; property ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue;
property AGENTE: String read GetAGENTEValue write SetAGENTEValue; property AGENTE: String read GetAGENTEValue write SetAGENTEValue;
@ -533,7 +541,7 @@ implementation
uses uses
uDataTableUtils, Classes, DateUtils, SysUtils, uFactuGES_App, uConfiguracionController, uNumUtils, uDataTableUtils, Classes, DateUtils, SysUtils, uFactuGES_App, uConfiguracionController,
uBizEmpresasTiendas, uBizTiposIVA, uBizFormasPago, uTypesConstConfiguration, uBizEmpresasTiendas, uBizTiposIVA, uBizFormasPago, uTypesConstConfiguration,
UBizIdiomas; UBizIdiomas;
@ -695,6 +703,11 @@ begin
result := DataTable.Fields[idx_ClientesDESCUENTO_LINEA].AsFloat; result := DataTable.Fields[idx_ClientesDESCUENTO_LINEA].AsFloat;
end; end;
function TBizCliente.GetDESCUENTO_CAPITULOValue: Float;
begin
result := DataTable.Fields[idx_ClientesDESCUENTO_CAPITULO].AsFloat;
end;
function TBizCliente.GetGRUPO_CLIENTEValue: String; function TBizCliente.GetGRUPO_CLIENTEValue: String;
begin begin
result := DataTable.Fields[idx_ClientesGRUPO_CLIENTE].AsString; result := DataTable.Fields[idx_ClientesGRUPO_CLIENTE].AsString;
@ -771,6 +784,11 @@ begin
DataTable.Fields[idx_ClientesDESCUENTO_LINEA].AsFloat := aValue; DataTable.Fields[idx_ClientesDESCUENTO_LINEA].AsFloat := aValue;
end; end;
procedure TBizCliente.SetDESCUENTO_CAPITULOValue(const aValue: Float);
begin
DataTable.Fields[idx_ClientesDESCUENTO_CAPITULO].AsFloat := aValue;
end;
procedure TBizCliente.SetGRUPO_CLIENTEValue(const aValue: String); procedure TBizCliente.SetGRUPO_CLIENTEValue(const aValue: String);
begin begin
DataTable.Fields[idx_ClientesGRUPO_CLIENTE].AsString := aValue; DataTable.Fields[idx_ClientesGRUPO_CLIENTE].AsString := aValue;
@ -915,6 +933,9 @@ begin
ID_FORMA_PAGO := AppFactuGES.EmpresaActiva.ID_FORMA_PAGO; ID_FORMA_PAGO := AppFactuGES.EmpresaActiva.ID_FORMA_PAGO;
ID_TIPO_IVA := AppFactuGES.EmpresaActiva.ID_TIPO_IVA; ID_TIPO_IVA := AppFactuGES.EmpresaActiva.ID_TIPO_IVA;
PRECIO_PUNTO := AppFactuGES.EmpresaActiva.PRECIO_PUNTO; PRECIO_PUNTO := AppFactuGES.EmpresaActiva.PRECIO_PUNTO;
DESCUENTO := RoundCurrency(AppFactuGES.EmpresaActiva.DESCUENTO_GENERAL);
DESCUENTO_CAPITULO := RoundCurrency(AppFactuGES.EmpresaActiva.DESCUENTO_CAPITULO);
DESCUENTO_LINEA := RoundCurrency(AppFactuGES.EmpresaActiva.DESCUENTO_LINEA);
end; end;

View File

@ -1054,6 +1054,10 @@ object srvContactos: TsrvContactos
item item
DatasetField = 'IDIOMA' DatasetField = 'IDIOMA'
TableField = 'IDIOMA' TableField = 'IDIOMA'
end
item
DatasetField = 'DESCUENTO_CAPITULO'
TableField = 'DESCUENTO_CAPITULO'
end> end>
end> end>
Name = 'Clientes' Name = 'Clientes'
@ -1346,6 +1350,10 @@ object srvContactos: TsrvContactos
Size = 255 Size = 255
ServerAutoRefresh = True ServerAutoRefresh = True
DictionaryEntry = 'Clientes_DELEGACION' DictionaryEntry = 'Clientes_DELEGACION'
end
item
Name = 'DESCUENTO_CAPITULO'
DataType = datFloat
end> end>
end end
item item
@ -4054,6 +4062,11 @@ object srvContactos: TsrvContactos
Name = 'ID_AGENTE' Name = 'ID_AGENTE'
DataType = datInteger DataType = datInteger
Value = '' Value = ''
end
item
Name = 'DESCUENTO_CAPITULO'
DataType = datFloat
Value = ''
end> end>
Statements = < Statements = <
item item
@ -4066,13 +4079,14 @@ object srvContactos: TsrvContactos
'ODIGO_ASIGNADO, IGNORAR_CONTABILIDAD, PROCEDENCIA_CLIENTE, TIENE' + 'ODIGO_ASIGNADO, IGNORAR_CONTABILIDAD, PROCEDENCIA_CLIENTE, TIENE' +
'_SUBCUENTA,'#10' VENCIMIENTO_FACTURAS_1, VENCIMIENTO_FACTURAS_2,' + '_SUBCUENTA,'#10' VENCIMIENTO_FACTURAS_1, VENCIMIENTO_FACTURAS_2,' +
' VENCIMIENTO_FACTURAS_3,'#10' DESCUENTO, DESCUENTO_LINEA, PRECIO' + ' VENCIMIENTO_FACTURAS_3,'#10' DESCUENTO, DESCUENTO_LINEA, PRECIO' +
'_PUNTO, ID_AGENTE)'#10' VALUES'#10' (:ID_CLIENTE, :GRUPO_CLIENTE, :R' + '_PUNTO, ID_AGENTE, DESCUENTO_CAPITULO)'#10' VALUES'#10' (:ID_CLIENTE' +
'ECARGO_EQUIVALENCIA, :NOMBRE_COMERCIAL, :BLOQUEADO,'#10' :MOTIVO' + ', :GRUPO_CLIENTE, :RECARGO_EQUIVALENCIA, :NOMBRE_COMERCIAL, :BLO' +
'_BLOQUEO, :REGIMEN_IVA, :ID_TIPO_IVA, :ID_FORMA_PAGO, :TIENDA_WE' + 'QUEADO,'#10' :MOTIVO_BLOQUEO, :REGIMEN_IVA, :ID_TIPO_IVA, :ID_FO' +
'B,'#10' :CODIGO_ASIGNADO, :IGNORAR_CONTABILIDAD, :PROCEDENCIA_CL' + 'RMA_PAGO, :TIENDA_WEB,'#10' :CODIGO_ASIGNADO, :IGNORAR_CONTABILI' +
'IENTE, :TIENE_SUBCUENTA,'#10' :VENCIMIENTO_FACTURAS_1, :VENCIMIE' + 'DAD, :PROCEDENCIA_CLIENTE, :TIENE_SUBCUENTA,'#10' :VENCIMIENTO_F' +
'NTO_FACTURAS_2, :VENCIMIENTO_FACTURAS_3,'#10' :DESCUENTO, :DESCU' + 'ACTURAS_1, :VENCIMIENTO_FACTURAS_2, :VENCIMIENTO_FACTURAS_3,'#10' ' +
'ENTO_LINEA, :PRECIO_PUNTO, :ID_AGENTE)'#10 ' :DESCUENTO, :DESCUENTO_LINEA, :PRECIO_PUNTO, :ID_AGENTE, :DESC' +
'UENTO_CAPITULO)'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = <> ColumnMappings = <>
end> end>
@ -4211,6 +4225,11 @@ object srvContactos: TsrvContactos
DataType = datInteger DataType = datInteger
Value = '' Value = ''
end end
item
Name = 'DESCUENTO_CAPITULO'
DataType = datFloat
Value = ''
end
item item
Name = 'OLD_ID_CLIENTE' Name = 'OLD_ID_CLIENTE'
Value = '' Value = ''
@ -4233,7 +4252,8 @@ object srvContactos: TsrvContactos
'_2 = :VENCIMIENTO_FACTURAS_2,'#10' VENCIMIENTO_FACTURAS_3 = :VENC' + '_2 = :VENCIMIENTO_FACTURAS_2,'#10' VENCIMIENTO_FACTURAS_3 = :VENC' +
'IMIENTO_FACTURAS_3,'#10' DESCUENTO = :DESCUENTO,'#10' DESCUENTO_LI' + 'IMIENTO_FACTURAS_3,'#10' DESCUENTO = :DESCUENTO,'#10' DESCUENTO_LI' +
'NEA = :DESCUENTO_LINEA,'#10' PRECIO_PUNTO = :PRECIO_PUNTO,'#10' ID' + 'NEA = :DESCUENTO_LINEA,'#10' PRECIO_PUNTO = :PRECIO_PUNTO,'#10' ID' +
'_AGENTE = :ID_AGENTE'#10' WHERE'#10' (ID_CLIENTE = :OLD_ID_CLIENTE)'#10 '_AGENTE = :ID_AGENTE,'#10' DESCUENTO_CAPITULO = :DESCUENTO_CAPITU' +
'LO'#10' WHERE'#10' (ID_CLIENTE = :OLD_ID_CLIENTE)'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = <> ColumnMappings = <>
end> end>

View File

@ -136,6 +136,7 @@ contains
uViewDatosYSeleccionComercial in 'uViewDatosYSeleccionComercial.pas' {frViewDatosYSeleccionComercial: TFrame}, uViewDatosYSeleccionComercial in 'uViewDatosYSeleccionComercial.pas' {frViewDatosYSeleccionComercial: TFrame},
uEditorElegirComerciales in 'uEditorElegirComerciales.pas' {fEditorElegirComerciales: TCustomEditor}, uEditorElegirComerciales in 'uEditorElegirComerciales.pas' {fEditorElegirComerciales: TCustomEditor},
uViewDatosYSeleccionInstalador in 'uViewDatosYSeleccionInstalador.pas' {frViewDatosYSeleccionInstalador: TFrame}, uViewDatosYSeleccionInstalador in 'uViewDatosYSeleccionInstalador.pas' {frViewDatosYSeleccionInstalador: TFrame},
uEditorElegirInstaladores in 'uEditorElegirInstaladores.pas' {fEditorElegirInstaladores: TCustomEditor}; uEditorElegirInstaladores in 'uEditorElegirInstaladores.pas' {fEditorElegirInstaladores: TCustomEditor},
uEditorAsignarDescuentoCapitulo in 'uEditorAsignarDescuentoCapitulo.pas' {fEditorAsignarDescuentoCapitulo: TCustomEditor};
end. end.

View File

@ -47,69 +47,66 @@
<DelphiCompile Include="Contactos_view.dpk"> <DelphiCompile Include="Contactos_view.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\adortl.dcp" /> <DCCReference Include="adortl.dcp" />
<DCCReference Include="..\ApplicationBase.dcp" /> <DCCReference Include="ApplicationBase.dcp" />
<DCCReference Include="..\Base.dcp" /> <DCCReference Include="Base.dcp" />
<DCCReference Include="..\bdertl.dcp" /> <DCCReference Include="bdertl.dcp" />
<DCCReference Include="..\Contactos_controller.dcp" /> <DCCReference Include="Contactos_controller.dcp" />
<DCCReference Include="..\Contactos_model.dcp" /> <DCCReference Include="Contactos_model.dcp" />
<DCCReference Include="..\cxDataD11.dcp" /> <DCCReference Include="cxDataD11.dcp" />
<DCCReference Include="..\cxEditorsD11.dcp" /> <DCCReference Include="cxEditorsD11.dcp" />
<DCCReference Include="..\cxExportD11.dcp" /> <DCCReference Include="cxExportD11.dcp" />
<DCCReference Include="..\cxExtEditorsD11.dcp" /> <DCCReference Include="cxExtEditorsD11.dcp" />
<DCCReference Include="..\cxGridD11.dcp" /> <DCCReference Include="cxGridD11.dcp" />
<DCCReference Include="..\cxLibraryD11.dcp" /> <DCCReference Include="cxLibraryD11.dcp" />
<DCCReference Include="..\cxPageControlD11.dcp" /> <DCCReference Include="cxPageControlD11.dcp" />
<DCCReference Include="..\DataAbstract_Core_D11.dcp" /> <DCCReference Include="DataAbstract_Core_D11.dcp" />
<DCCReference Include="..\dbrtl.dcp" /> <DCCReference Include="dbrtl.dcp" />
<DCCReference Include="..\dclcxLibraryD11.dcp" /> <DCCReference Include="dclcxLibraryD11.dcp" />
<DCCReference Include="..\dcldxCoreD11.dcp" /> <DCCReference Include="dcldxCoreD11.dcp" />
<DCCReference Include="..\Delegaciones_controller.dcp" /> <DCCReference Include="Delegaciones_controller.dcp" />
<DCCReference Include="..\designide.dcp" /> <DCCReference Include="designide.dcp" />
<DCCReference Include="..\dsnap.dcp" /> <DCCReference Include="dsnap.dcp" />
<DCCReference Include="..\dxComnD11.dcp" /> <DCCReference Include="dxComnD11.dcp" />
<DCCReference Include="..\dxCoreD11.dcp" /> <DCCReference Include="dxCoreD11.dcp" />
<DCCReference Include="..\dxGDIPlusD11.dcp" /> <DCCReference Include="dxGDIPlusD11.dcp" />
<DCCReference Include="..\dxLayoutControlD11.dcp" /> <DCCReference Include="dxLayoutControlD11.dcp" />
<DCCReference Include="..\dxPSCoreD11.dcp" /> <DCCReference Include="dxPSCoreD11.dcp" />
<DCCReference Include="..\dxPScxCommonD11.dcp" /> <DCCReference Include="dxPScxCommonD11.dcp" />
<DCCReference Include="..\dxPScxGrid6LnkD11.dcp" /> <DCCReference Include="dxPScxGrid6LnkD11.dcp" />
<DCCReference Include="..\dxPSLnksD11.dcp" /> <DCCReference Include="dxPSLnksD11.dcp" />
<DCCReference Include="..\dxThemeD11.dcp" /> <DCCReference Include="dxThemeD11.dcp" />
<DCCReference Include="..\FormasPago_controller.dcp" /> <DCCReference Include="FormasPago_controller.dcp" />
<DCCReference Include="..\FormasPago_model.dcp" /> <DCCReference Include="FormasPago_model.dcp" />
<DCCReference Include="..\GestorInformes_controller.dcp" /> <DCCReference Include="GestorInformes_controller.dcp" />
<DCCReference Include="..\GUIBase.dcp" /> <DCCReference Include="GUIBase.dcp" />
<DCCReference Include="..\GUISDK_D11R.dcp" /> <DCCReference Include="GUISDK_D11R.dcp" />
<DCCReference Include="..\Jcl.dcp" /> <DCCReference Include="Jcl.dcp" />
<DCCReference Include="..\JclVcl.dcp" /> <DCCReference Include="JclVcl.dcp" />
<DCCReference Include="..\JSDialog100.dcp" /> <DCCReference Include="JSDialog100.dcp" />
<DCCReference Include="..\JvCoreD11R.dcp" /> <DCCReference Include="JvCoreD11R.dcp" />
<DCCReference Include="..\JvCtrlsD11R.dcp" /> <DCCReference Include="JvCtrlsD11R.dcp" />
<DCCReference Include="..\JvGlobusD11R.dcp" /> <DCCReference Include="JvGlobusD11R.dcp" />
<DCCReference Include="..\JvPageCompsD11R.dcp" /> <DCCReference Include="JvPageCompsD11R.dcp" />
<DCCReference Include="..\JvStdCtrlsD11R.dcp" /> <DCCReference Include="JvStdCtrlsD11R.dcp" />
<DCCReference Include="..\JvSystemD11R.dcp" /> <DCCReference Include="JvSystemD11R.dcp" />
<DCCReference Include="..\PngComponentsD10.dcp" /> <DCCReference Include="PngComponentsD10.dcp" />
<DCCReference Include="..\PNG_D10.dcp" /> <DCCReference Include="PNG_D10.dcp" />
<DCCReference Include="..\RemObjects_Core_D11.dcp" /> <DCCReference Include="RemObjects_Core_D11.dcp" />
<DCCReference Include="..\rtl.dcp" /> <DCCReference Include="rtl.dcp" />
<DCCReference Include="..\tb2k_d10.dcp" /> <DCCReference Include="tb2k_d10.dcp" />
<DCCReference Include="..\tbx_d10.dcp" /> <DCCReference Include="tbx_d10.dcp" />
<DCCReference Include="..\TiposIVA_controller.dcp" /> <DCCReference Include="TiposIVA_controller.dcp" />
<DCCReference Include="..\TiposIVA_model.dcp" /> <DCCReference Include="TiposIVA_model.dcp" />
<DCCReference Include="..\vcl.dcp" />
<DCCReference Include="..\vclactnband.dcp" />
<DCCReference Include="..\vcldb.dcp" />
<DCCReference Include="..\vcljpg.dcp" />
<DCCReference Include="..\vclshlctrls.dcp" />
<DCCReference Include="..\vclx.dcp" />
<DCCReference Include="..\xmlrtl.dcp" />
<DCCReference Include="uContactosViewRegister.pas" /> <DCCReference Include="uContactosViewRegister.pas" />
<DCCReference Include="uEditorAsignarComercial.pas"> <DCCReference Include="uEditorAsignarComercial.pas">
<Form>fEditorAsignarComercial</Form> <Form>fEditorAsignarComercial</Form>
<DesignClass>TCustomEditor</DesignClass> <DesignClass>TCustomEditor</DesignClass>
</DCCReference> </DCCReference>
<DCCReference Include="uEditorAsignarDescuentoCapitulo.pas">
<Form>fEditorAsignarDescuentoCapitulo</Form>
<DesignClass>TCustomEditor</DesignClass>
</DCCReference>
<DCCReference Include="uEditorAsignarPrecioPunto.pas"> <DCCReference Include="uEditorAsignarPrecioPunto.pas">
<Form>fEditorAsignarPrecioPunto</Form> <Form>fEditorAsignarPrecioPunto</Form>
<DesignClass>TCustomEditor</DesignClass> <DesignClass>TCustomEditor</DesignClass>
@ -308,6 +305,13 @@
<Form>frViewVendedores</Form> <Form>frViewVendedores</Form>
<DesignClass>TCustomView</DesignClass> <DesignClass>TCustomView</DesignClass>
</DCCReference> </DCCReference>
<DCCReference Include="vcl.dcp" />
<DCCReference Include="vclactnband.dcp" />
<DCCReference Include="vcldb.dcp" />
<DCCReference Include="vcljpg.dcp" />
<DCCReference Include="vclshlctrls.dcp" />
<DCCReference Include="vclx.dcp" />
<DCCReference Include="xmlrtl.dcp" />
</ItemGroup> </ItemGroup>
</Project> </Project>
<!-- EurekaLog First Line <!-- EurekaLog First Line

View File

@ -0,0 +1,80 @@
object fEditorAsignarDescuentoCapitulo: TfEditorAsignarDescuentoCapitulo
Left = 0
Top = 0
BorderStyle = bsDialog
Caption = 'Asignar descuento de cap'#237'tulo'
ClientHeight = 124
ClientWidth = 420
Color = clWindow
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 21
Top = 16
Width = 382
Height = 13
Caption =
'Inserte el descuento de capitulo que desea asignar a los cliente' +
's seleccionado/s'
end
object Label2: TLabel
Left = 106
Top = 45
Width = 55
Height = 13
Alignment = taRightJustify
Caption = 'Descuento:'
end
object Panel1: TPanel
Left = 0
Top = 83
Width = 420
Height = 41
Align = alBottom
TabOrder = 0
ExplicitWidth = 379
DesignSize = (
420
41)
object bAceptar: TButton
Left = 256
Top = 8
Width = 75
Height = 25
Anchors = [akTop, akRight]
Caption = 'Aceptar'
ModalResult = 1
TabOrder = 0
ExplicitLeft = 215
end
object bCancelar: TButton
Left = 337
Top = 8
Width = 75
Height = 25
Anchors = [akTop, akRight]
Caption = 'Cancelar'
ModalResult = 2
TabOrder = 1
ExplicitLeft = 296
end
end
object eDescuentoCapitulo: TcxCurrencyEdit
Left = 167
Top = 45
AutoSize = False
Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
Properties.UseLeftAlignmentOnEditing = False
TabOrder = 1
Height = 21
Width = 190
end
end

View File

@ -0,0 +1,44 @@
unit uEditorAsignarDescuentoCapitulo;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit,
cxDropDownEdit, cxCalendar, ExtCtrls, uEditorBasico,
cxGraphics, DB, uDAInterfaces, uDADataTable, cxDBEdit, uEmpresasController,
cxSpinEdit, cxCurrencyEdit;
type
TfEditorAsignarDescuentoCapitulo = class(TfEditorBasico)
Label1: TLabel;
bAceptar: TButton;
bCancelar: TButton;
Label2: TLabel;
Panel1: TPanel;
eDescuentoCapitulo: TcxCurrencyEdit;
end;
function AsignarDescuentoCapitulo(var ADescuentoCapitulo : Variant): Boolean;
implementation
{$R *.dfm}
uses uFactuGES_App;
function AsignarDescuentoCapitulo(var ADescuentoCapitulo : Variant): Boolean;
var
AEditor : TfEditorAsignarDescuentoCapitulo;
begin
AEditor := TfEditorAsignarDescuentoCapitulo.Create(NIL);
try
AEditor.eDescuentoCapitulo.Value := AppFactuGES.EmpresaActiva.DESCUENTO_CAPITULO;
Result := (AEditor.ShowModal = mrOk);
if Result then
ADescuentoCapitulo := AEditor.eDescuentoCapitulo.Value;
finally
AEditor.Release;
end;
end;
end.

View File

@ -70,7 +70,7 @@ inherited fEditorCliente: TfEditorCliente
inherited pgPaginas: TPageControl inherited pgPaginas: TPageControl
Width = 1057 Width = 1057
Height = 805 Height = 805
ActivePage = pagDirecciones ActivePage = pagDatosComerciales
ExplicitWidth = 1057 ExplicitWidth = 1057
ExplicitHeight = 805 ExplicitHeight = 805
inherited pagGeneral: TTabSheet inherited pagGeneral: TTabSheet
@ -359,7 +359,8 @@ inherited fEditorCliente: TfEditorCliente
ExplicitHeight = 127 ExplicitHeight = 127
inherited memObservaciones: TcxDBMemo inherited memObservaciones: TcxDBMemo
DataBinding.DataSource = frViewCliente1.dsContacto DataBinding.DataSource = frViewCliente1.dsContacto
ExplicitWidth = 521 ExplicitWidth = 1005
ExplicitHeight = 308
Height = 127 Height = 127
Width = 521 Width = 521
end end
@ -598,18 +599,18 @@ inherited fEditorCliente: TfEditorCliente
Width = 200 Width = 200
end end
inherited eDescuento: TcxDBSpinEdit inherited eDescuento: TcxDBSpinEdit
Top = 264 Top = 291
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 264 ExplicitTop = 291
ExplicitWidth = 508 ExplicitWidth = 508
Width = 508 Width = 508
end end
inherited ePrecioPunto: TcxDBCurrencyEdit inherited ePrecioPunto: TcxDBCurrencyEdit
Top = 291 Top = 318
ExplicitTop = 291 ExplicitTop = 318
ExplicitWidth = 239 ExplicitWidth = 239
Width = 239 Width = 239
end end
@ -619,6 +620,14 @@ inherited fEditorCliente: TfEditorCliente
ExplicitWidth = 276 ExplicitWidth = 276
Width = 276 Width = 276
end end
inherited eDescuentoCapitulo: TcxDBSpinEdit
Top = 264
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 264
end
inherited dxLayoutGroup1: TdxLayoutGroup inherited dxLayoutGroup1: TdxLayoutGroup
inherited dxLayoutControl1Group4: TdxLayoutGroup inherited dxLayoutControl1Group4: TdxLayoutGroup
inherited dxLayoutControl1Group5: TdxLayoutGroup inherited dxLayoutControl1Group5: TdxLayoutGroup
@ -627,6 +636,11 @@ inherited fEditorCliente: TfEditorCliente
end end
end end
end end
inherited dxLayoutControl1Group6: TdxLayoutGroup
inherited dxLayoutControl1Item11: TdxLayoutItem
Caption = 'Descuento linea:'
end
end
end end
end end
end end

View File

@ -62,21 +62,27 @@ inherited fEditorClientes: TfEditorClientes
DockPos = 207 DockPos = 207
Visible = True Visible = True
ExplicitLeft = 207 ExplicitLeft = 207
ExplicitWidth = 387 ExplicitWidth = 538
object TBXItem38: TTBXItem object TBXItem38: TTBXItem
Action = actInformes Action = actInformes
DisplayMode = nbdmImageAndText DisplayMode = nbdmImageAndText
end end
object TBXSeparatorItem17: TTBXSeparatorItem object TBXSeparatorItem17: TTBXSeparatorItem
end end
object TBXItem39: TTBXItem object TBXItem40: TTBXItem
Action = actCambiarPrecioPunto Action = actCambiarComercial
DisplayMode = nbdmImageAndText DisplayMode = nbdmImageAndText
end end
object TBXSeparatorItem18: TTBXSeparatorItem object TBXSeparatorItem18: TTBXSeparatorItem
end end
object TBXItem40: TTBXItem object TBXItem39: TTBXItem
Action = actCambiarComercial Action = actCambiarPrecioPunto
DisplayMode = nbdmImageAndText
end
object TBXSeparatorItem19: TTBXSeparatorItem
end
object TBXItem41: TTBXItem
Action = actCambiarDescuentoCapitulo
DisplayMode = nbdmImageAndText DisplayMode = nbdmImageAndText
end end
end end
@ -241,6 +247,12 @@ inherited fEditorClientes: TfEditorClientes
OnExecute = actCambiarComercialExecute OnExecute = actCambiarComercialExecute
OnUpdate = actCambiarComercialUpdate OnUpdate = actCambiarComercialUpdate
end end
object actCambiarDescuentoCapitulo: TAction
Caption = 'Cambiar dto cap'#237'tulo'
ImageIndex = 25
OnExecute = actCambiarDescuentoCapituloExecute
OnUpdate = actCambiarDescuentoCapituloUpdate
end
end end
inherited SmallImages: TPngImageList [5] inherited SmallImages: TPngImageList [5]
PngImages = < PngImages = <

View File

@ -30,12 +30,17 @@ type
actCambiarComercial: TAction; actCambiarComercial: TAction;
TBXSeparatorItem18: TTBXSeparatorItem; TBXSeparatorItem18: TTBXSeparatorItem;
TBXItem40: TTBXItem; TBXItem40: TTBXItem;
actCambiarDescuentoCapitulo: TAction;
TBXSeparatorItem19: TTBXSeparatorItem;
TBXItem41: TTBXItem;
procedure actGruposClienteExecute(Sender: TObject); procedure actGruposClienteExecute(Sender: TObject);
procedure actInformesExecute(Sender: TObject); procedure actInformesExecute(Sender: TObject);
procedure actCambiarPrecioPuntoExecute(Sender: TObject); procedure actCambiarPrecioPuntoExecute(Sender: TObject);
procedure actCambiarPrecioPuntoUpdate(Sender: TObject); procedure actCambiarPrecioPuntoUpdate(Sender: TObject);
procedure actCambiarComercialExecute(Sender: TObject); procedure actCambiarComercialExecute(Sender: TObject);
procedure actCambiarComercialUpdate(Sender: TObject); procedure actCambiarComercialUpdate(Sender: TObject);
procedure actCambiarDescuentoCapituloExecute(Sender: TObject);
procedure actCambiarDescuentoCapituloUpdate(Sender: TObject);
protected protected
procedure ImprimirInterno; override; procedure ImprimirInterno; override;
procedure PrevisualizarInterno; override; procedure PrevisualizarInterno; override;
@ -51,7 +56,7 @@ uses
uGridUtils, uDataModuleContactos, uDMBase, uEditorGridBase, uBizContactos, uGridUtils, uDataModuleContactos, uDMBase, uEditorGridBase, uBizContactos,
uDBSelectionListUtils, uDataModuleUsuarios, uDialogUtils, uFactuGES_App, uDBSelectionListUtils, uDataModuleUsuarios, uDialogUtils, uFactuGES_App,
uGruposClienteController, uBizGruposCliente, uClientesController, uGestorInformesController, uGruposClienteController, uBizGruposCliente, uClientesController, uGestorInformesController,
uEditorAsignarPrecioPunto, uEditorAsignarComercial, Dialogs; uEditorAsignarPrecioPunto, uEditorAsignarComercial, uEditorAsignarDescuentoCapitulo, Dialogs;
{$R *.dfm} {$R *.dfm}
@ -93,6 +98,41 @@ begin
(Sender as TAction).Visible := ((AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO) or (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_GRADEN)); (Sender as TAction).Visible := ((AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO) or (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_GRADEN));
end; end;
procedure TfEditorClientes.actCambiarDescuentoCapituloExecute(Sender: TObject);
var
AClientes: IBizCliente;
AllItems: Boolean;
ADescuentoCapitulo: Variant;
begin
AClientes := Nil;
AllItems := False;
if MultiSelect and Assigned(ViewGrid) then
AllItems := (ViewGrid.NumSeleccionados > 1);
if AsignarDescuentoCapitulo(ADescuentoCapitulo) then
begin
if AllItems then
begin
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Contactos as ISeleccionable).SelectedRecords);
AClientes := (Controller as IClientesController).ExtraerSeleccionados(Contactos) as IBizCliente;
end
else
AClientes := (Contactos as IBizCliente);
(Controller as IClientesController).AsignarDescuentoCapitulo(AClientes, ADescuentoCapitulo, AllItems);
// ShowMessage(APrecioPunto);
actRefrescar.Execute;
end;
end;
procedure TfEditorClientes.actCambiarDescuentoCapituloUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := HayDatos
and ViewGrid.esSeleccionCeldaDatos;
end;
procedure TfEditorClientes.actCambiarPrecioPuntoExecute(Sender: TObject); procedure TfEditorClientes.actCambiarPrecioPuntoExecute(Sender: TObject);
var var
AClientes: IBizCliente; AClientes: IBizCliente;

View File

@ -127,8 +127,6 @@ inherited fEditorContacto: TfEditorContacto
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 57 ExplicitTop = 57
ExplicitWidth = 114
Width = 114
end end
inherited eSucursal: TcxDBTextEdit inherited eSucursal: TcxDBTextEdit
Left = 560 Left = 560
@ -139,8 +137,6 @@ inherited fEditorContacto: TfEditorContacto
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 560 ExplicitLeft = 560
ExplicitTop = 57 ExplicitTop = 57
ExplicitWidth = 112
Width = 112
end end
inherited eCuenta: TcxDBTextEdit inherited eCuenta: TcxDBTextEdit
Top = 84 Top = 84
@ -149,8 +145,6 @@ inherited fEditorContacto: TfEditorContacto
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 84 ExplicitTop = 84
ExplicitWidth = 194
Width = 194
end end
inherited eDC: TcxDBTextEdit inherited eDC: TcxDBTextEdit
Top = 84 Top = 84
@ -167,20 +161,14 @@ inherited fEditorContacto: TfEditorContacto
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitTop = 30 ExplicitTop = 30
ExplicitWidth = 194
Width = 194
end end
inherited eIBAN: TcxDBTextEdit inherited eIBAN: TcxDBTextEdit
Top = 111 Top = 111
ExplicitTop = 111 ExplicitTop = 111
ExplicitWidth = 782
Width = 782
end end
inherited eSWIFT: TcxDBTextEdit inherited eSWIFT: TcxDBTextEdit
Top = 138 Top = 138
ExplicitTop = 138 ExplicitTop = 138
ExplicitWidth = 782
Width = 782
end end
end end
end end

View File

@ -269,6 +269,8 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales
DataBinding.DataField = 'DESCUENTO_LINEA' DataBinding.DataField = 'DESCUENTO_LINEA'
DataBinding.DataSource = dsDatosComerciales DataBinding.DataSource = dsDatosComerciales
Properties.Alignment.Horz = taRightJustify Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
Properties.MaxValue = 100.000000000000000000
Properties.UseLeftAlignmentOnEditing = False Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D Style.BorderStyle = ebs3D
@ -291,10 +293,12 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales
end end
object eDescuento: TcxDBSpinEdit object eDescuento: TcxDBSpinEdit
Left = 162 Left = 162
Top = 274 Top = 301
DataBinding.DataField = 'DESCUENTO' DataBinding.DataField = 'DESCUENTO'
DataBinding.DataSource = dsDatosComerciales DataBinding.DataSource = dsDatosComerciales
Properties.Alignment.Horz = taRightJustify Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
Properties.MaxValue = 100.000000000000000000
Properties.UseLeftAlignmentOnEditing = False Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D Style.BorderStyle = ebs3D
@ -312,17 +316,17 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales
StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
TabOrder = 11 TabOrder = 12
Width = 508 Width = 508
end end
object ePrecioPunto: TcxDBCurrencyEdit object ePrecioPunto: TcxDBCurrencyEdit
Left = 162 Left = 162
Top = 301 Top = 328
DataBinding.DataField = 'PRECIO_PUNTO' DataBinding.DataField = 'PRECIO_PUNTO'
DataBinding.DataSource = dsDatosComerciales DataBinding.DataSource = dsDatosComerciales
Properties.Alignment.Horz = taRightJustify Properties.Alignment.Horz = taRightJustify
Properties.UseLeftAlignmentOnEditing = False Properties.UseLeftAlignmentOnEditing = False
TabOrder = 12 TabOrder = 13
Width = 239 Width = 239
end end
object cbComercial: TcxDBLookupComboBox object cbComercial: TcxDBLookupComboBox
@ -360,6 +364,34 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales
TabOrder = 9 TabOrder = 9
Width = 276 Width = 276
end end
object eDescuentoCapitulo: TcxDBSpinEdit
Left = 162
Top = 274
DataBinding.DataField = 'DESCUENTO_CAPITULO'
DataBinding.DataSource = dsDatosComerciales
Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
Properties.MaxValue = 100.000000000000000000
Properties.UseLeftAlignmentOnEditing = False
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
Style.ButtonStyle = bts3D
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 = 11
Width = 453
end
object dxLayoutGroup1: TdxLayoutGroup object dxLayoutGroup1: TdxLayoutGroup
ShowCaption = False ShowCaption = False
Hidden = True Hidden = True
@ -486,6 +518,11 @@ inherited frViewClienteDatosComerciales: TfrViewClienteDatosComerciales
Control = eDescuentoLinea Control = eDescuentoLinea
ControlOptions.ShowBorder = False ControlOptions.ShowBorder = False
end end
object dxLayoutControl1Item16: TdxLayoutItem
Caption = 'Descuento cap'#237'tulo:'
Control = eDescuentoCapitulo
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item13: TdxLayoutItem object dxLayoutControl1Item13: TdxLayoutItem
Caption = 'Descuento especial general:' Caption = 'Descuento especial general:'
Control = eDescuento Control = eDescuento

View File

@ -62,6 +62,8 @@ type
dxLayoutControl1Item15: TdxLayoutItem; dxLayoutControl1Item15: TdxLayoutItem;
cbComercial: TcxDBLookupComboBox; cbComercial: TcxDBLookupComboBox;
dxLayoutControl1Group8: TdxLayoutGroup; dxLayoutControl1Group8: TdxLayoutGroup;
dxLayoutControl1Item16: TdxLayoutItem;
eDescuentoCapitulo: TcxDBSpinEdit;
procedure CustomViewCreate(Sender: TObject); procedure CustomViewCreate(Sender: TObject);
procedure CustomViewDestroy(Sender: TObject); procedure CustomViewDestroy(Sender: TObject);
procedure cbRegimenIVAPropertiesInitPopup(Sender: TObject); procedure cbRegimenIVAPropertiesInitPopup(Sender: TObject);

View File

@ -83,6 +83,16 @@ inherited frViewClientes: TfrViewClientes
GroupSummaryAlignment = taRightJustify GroupSummaryAlignment = taRightJustify
HeaderAlignmentHorz = taRightJustify HeaderAlignmentHorz = taRightJustify
end end
object cxGridViewDescuentoCapitulo: TcxGridDBColumn
Caption = 'Descuento cap'#237'tulo'
DataBinding.FieldName = 'DESCUENTO_CAPITULO'
PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify
Properties.DisplayFormat = ',0.00 %;-,0.00 %'
FooterAlignmentHorz = taRightJustify
GroupSummaryAlignment = taRightJustify
HeaderAlignmentHorz = taRightJustify
end
end end
end end
inherited frViewFiltroBase1: TfrViewFiltroBase inherited frViewFiltroBase1: TfrViewFiltroBase
@ -120,14 +130,14 @@ inherited frViewClientes: TfrViewClientes
Width = 427 Width = 427
end end
inherited txtFiltroTodo2: TcxTextEdit inherited txtFiltroTodo2: TcxTextEdit
Left = 475 Left = 488
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 475 ExplicitLeft = 488
ExplicitWidth = 250 ExplicitWidth = 223
Width = 250 Width = 223
end end
end end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel

Some files were not shown because too many files have changed in this diff Show More