This repository has been archived on 2024-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
AlonsoYSal_FactuGES/Modulos/Contactos/Reglas/schComisionesClient_Intf.pas

437 lines
15 KiB
ObjectPascal

unit schComisionesClient_Intf;
interface
uses
Classes, DB, SysUtils, uROClasses, uDADataTable;
const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_VENDEDORESCOMISION = '{1991386F-7432-48B0-A983-6E486684278E}';
RID_COMISIONES = '{E02C1BEE-E392-4BA3-AF6E-F0767D43EEED}';
RID_COBROSCOMISION = '{9A01A4E9-2DE3-4E5B-B0EE-97BD47A2F4CC}';
{ Data table names }
nme_VENDEDORESCOMISION = 'VENDEDORESCOMISION';
nme_COMISIONES = 'COMISIONES';
nme_COBROSCOMISION = 'COBROSCOMISION';
{ VENDEDORESCOMISION fields }
fld_VENDEDORESCOMISIONVENDEDOR = 'VENDEDOR';
fld_VENDEDORESCOMISIONPORCENTAJE = 'PORCENTAJE';
fld_VENDEDORESCOMISIONCOMISION = 'COMISION';
{ VENDEDORESCOMISION field indexes }
idx_VENDEDORESCOMISIONVENDEDOR = 0;
idx_VENDEDORESCOMISIONPORCENTAJE = 1;
idx_VENDEDORESCOMISIONCOMISION = 2;
{ COMISIONES fields }
fld_COMISIONESCOMISION = 'COMISION';
{ COMISIONES field indexes }
idx_COMISIONESCOMISION = 0;
{ COBROSCOMISION fields }
fld_COBROSCOMISIONSELECCION = 'SELECCION';
fld_COBROSCOMISIONCODIGOEMPRESA = 'CODIGOEMPRESA';
fld_COBROSCOMISIONCODIGO = 'CODIGO';
fld_COBROSCOMISIONCODIGOCONTACTO = 'CODIGOCONTACTO';
fld_COBROSCOMISIONNOMBRE = 'NOMBRE';
fld_COBROSCOMISIONFECHAPAGO = 'FECHAPAGO';
fld_COBROSCOMISIONIMPORTE = 'IMPORTE';
fld_COBROSCOMISIONFORMAPAGO = 'FORMAPAGO';
fld_COBROSCOMISIONDESCRIPCION = 'DESCRIPCION';
fld_COBROSCOMISIONTIPO = 'TIPO';
fld_COBROSCOMISIONCODIGOCATEGORIA = 'CODIGOCATEGORIA';
fld_COBROSCOMISIONCATEGORIA = 'CATEGORIA';
{ COBROSCOMISION field indexes }
idx_COBROSCOMISIONSELECCION = 0;
idx_COBROSCOMISIONCODIGOEMPRESA = 1;
idx_COBROSCOMISIONCODIGO = 2;
idx_COBROSCOMISIONCODIGOCONTACTO = 3;
idx_COBROSCOMISIONNOMBRE = 4;
idx_COBROSCOMISIONFECHAPAGO = 5;
idx_COBROSCOMISIONIMPORTE = 6;
idx_COBROSCOMISIONFORMAPAGO = 7;
idx_COBROSCOMISIONDESCRIPCION = 8;
idx_COBROSCOMISIONTIPO = 9;
idx_COBROSCOMISIONCODIGOCATEGORIA = 10;
idx_COBROSCOMISIONCATEGORIA = 11;
type
{ IVENDEDORESCOMISION }
IVENDEDORESCOMISION = interface(IDAStronglyTypedDataTable)
['{240371ED-0F0F-4D1F-B6D2-98F2C95F9090}']
{ Property getters and setters }
function GetVENDEDORValue: String;
procedure SetVENDEDORValue(const aValue: String);
function GetPORCENTAJEValue: Float;
procedure SetPORCENTAJEValue(const aValue: Float);
function GetCOMISIONValue: Float;
procedure SetCOMISIONValue(const aValue: Float);
{ Properties }
property VENDEDOR: String read GetVENDEDORValue write SetVENDEDORValue;
property PORCENTAJE: Float read GetPORCENTAJEValue write SetPORCENTAJEValue;
property COMISION: Float read GetCOMISIONValue write SetCOMISIONValue;
end;
{ TVENDEDORESCOMISIONDataTableRules }
TVENDEDORESCOMISIONDataTableRules = class(TDADataTableRules, IVENDEDORESCOMISION)
private
protected
{ Property getters and setters }
function GetVENDEDORValue: String; virtual;
procedure SetVENDEDORValue(const aValue: String); virtual;
function GetPORCENTAJEValue: Float; virtual;
procedure SetPORCENTAJEValue(const aValue: Float); virtual;
function GetCOMISIONValue: Float; virtual;
procedure SetCOMISIONValue(const aValue: Float); virtual;
{ Properties }
property VENDEDOR: String read GetVENDEDORValue write SetVENDEDORValue;
property PORCENTAJE: Float read GetPORCENTAJEValue write SetPORCENTAJEValue;
property COMISION: Float read GetCOMISIONValue write SetCOMISIONValue;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
{ ICOMISIONES }
ICOMISIONES = interface(IDAStronglyTypedDataTable)
['{E5981A96-57D7-4E08-874A-0EEA50CD28DE}']
{ Property getters and setters }
function GetCOMISIONValue: Float;
procedure SetCOMISIONValue(const aValue: Float);
{ Properties }
property COMISION: Float read GetCOMISIONValue write SetCOMISIONValue;
end;
{ TCOMISIONESDataTableRules }
TCOMISIONESDataTableRules = class(TDADataTableRules, ICOMISIONES)
private
protected
{ Property getters and setters }
function GetCOMISIONValue: Float; virtual;
procedure SetCOMISIONValue(const aValue: Float); virtual;
{ Properties }
property COMISION: Float read GetCOMISIONValue write SetCOMISIONValue;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
{ ICOBROSCOMISION }
ICOBROSCOMISION = interface(IDAStronglyTypedDataTable)
['{227279E8-9B85-40AC-97BE-1A7D46C7EA4E}']
{ Property getters and setters }
function GetSELECCIONValue: Integer;
procedure SetSELECCIONValue(const aValue: Integer);
function GetCODIGOEMPRESAValue: Integer;
procedure SetCODIGOEMPRESAValue(const aValue: Integer);
function GetCODIGOValue: Integer;
procedure SetCODIGOValue(const aValue: Integer);
function GetCODIGOCONTACTOValue: Integer;
procedure SetCODIGOCONTACTOValue(const aValue: Integer);
function GetNOMBREValue: String;
procedure SetNOMBREValue(const aValue: String);
function GetFECHAPAGOValue: DateTime;
procedure SetFECHAPAGOValue(const aValue: DateTime);
function GetIMPORTEValue: Float;
procedure SetIMPORTEValue(const aValue: Float);
function GetFORMAPAGOValue: String;
procedure SetFORMAPAGOValue(const aValue: String);
function GetDESCRIPCIONValue: String;
procedure SetDESCRIPCIONValue(const aValue: String);
function GetTIPOValue: String;
procedure SetTIPOValue(const aValue: String);
function GetCODIGOCATEGORIAValue: Integer;
procedure SetCODIGOCATEGORIAValue(const aValue: Integer);
function GetCATEGORIAValue: String;
procedure SetCATEGORIAValue(const aValue: String);
{ Properties }
property SELECCION: Integer read GetSELECCIONValue write SetSELECCIONValue;
property CODIGOEMPRESA: Integer read GetCODIGOEMPRESAValue write SetCODIGOEMPRESAValue;
property CODIGO: Integer read GetCODIGOValue write SetCODIGOValue;
property CODIGOCONTACTO: Integer read GetCODIGOCONTACTOValue write SetCODIGOCONTACTOValue;
property NOMBRE: String read GetNOMBREValue write SetNOMBREValue;
property FECHAPAGO: DateTime read GetFECHAPAGOValue write SetFECHAPAGOValue;
property IMPORTE: Float read GetIMPORTEValue write SetIMPORTEValue;
property FORMAPAGO: String read GetFORMAPAGOValue write SetFORMAPAGOValue;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property TIPO: String read GetTIPOValue write SetTIPOValue;
property CODIGOCATEGORIA: Integer read GetCODIGOCATEGORIAValue write SetCODIGOCATEGORIAValue;
property CATEGORIA: String read GetCATEGORIAValue write SetCATEGORIAValue;
end;
{ TCOBROSCOMISIONDataTableRules }
TCOBROSCOMISIONDataTableRules = class(TDADataTableRules, ICOBROSCOMISION)
private
protected
{ Property getters and setters }
function GetSELECCIONValue: Integer; virtual;
procedure SetSELECCIONValue(const aValue: Integer); virtual;
function GetCODIGOEMPRESAValue: Integer; virtual;
procedure SetCODIGOEMPRESAValue(const aValue: Integer); virtual;
function GetCODIGOValue: Integer; virtual;
procedure SetCODIGOValue(const aValue: Integer); virtual;
function GetCODIGOCONTACTOValue: Integer; virtual;
procedure SetCODIGOCONTACTOValue(const aValue: Integer); virtual;
function GetNOMBREValue: String; virtual;
procedure SetNOMBREValue(const aValue: String); virtual;
function GetFECHAPAGOValue: DateTime; virtual;
procedure SetFECHAPAGOValue(const aValue: DateTime); virtual;
function GetIMPORTEValue: Float; virtual;
procedure SetIMPORTEValue(const aValue: Float); virtual;
function GetFORMAPAGOValue: String; virtual;
procedure SetFORMAPAGOValue(const aValue: String); virtual;
function GetDESCRIPCIONValue: String; virtual;
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
function GetTIPOValue: String; virtual;
procedure SetTIPOValue(const aValue: String); virtual;
function GetCODIGOCATEGORIAValue: Integer; virtual;
procedure SetCODIGOCATEGORIAValue(const aValue: Integer); virtual;
function GetCATEGORIAValue: String; virtual;
procedure SetCATEGORIAValue(const aValue: String); virtual;
{ Properties }
property SELECCION: Integer read GetSELECCIONValue write SetSELECCIONValue;
property CODIGOEMPRESA: Integer read GetCODIGOEMPRESAValue write SetCODIGOEMPRESAValue;
property CODIGO: Integer read GetCODIGOValue write SetCODIGOValue;
property CODIGOCONTACTO: Integer read GetCODIGOCONTACTOValue write SetCODIGOCONTACTOValue;
property NOMBRE: String read GetNOMBREValue write SetNOMBREValue;
property FECHAPAGO: DateTime read GetFECHAPAGOValue write SetFECHAPAGOValue;
property IMPORTE: Float read GetIMPORTEValue write SetIMPORTEValue;
property FORMAPAGO: String read GetFORMAPAGOValue write SetFORMAPAGOValue;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property TIPO: String read GetTIPOValue write SetTIPOValue;
property CODIGOCATEGORIA: Integer read GetCODIGOCATEGORIAValue write SetCODIGOCATEGORIAValue;
property CATEGORIA: String read GetCATEGORIAValue write SetCATEGORIAValue;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
implementation
uses Variants;
{ TVENDEDORESCOMISIONDataTableRules }
constructor TVENDEDORESCOMISIONDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TVENDEDORESCOMISIONDataTableRules.Destroy;
begin
inherited;
end;
function TVENDEDORESCOMISIONDataTableRules.GetVENDEDORValue: String;
begin
result := DataTable.Fields[idx_VENDEDORESCOMISIONVENDEDOR].AsString;
end;
procedure TVENDEDORESCOMISIONDataTableRules.SetVENDEDORValue(const aValue: String);
begin
DataTable.Fields[idx_VENDEDORESCOMISIONVENDEDOR].AsString := aValue;
end;
function TVENDEDORESCOMISIONDataTableRules.GetPORCENTAJEValue: Float;
begin
result := DataTable.Fields[idx_VENDEDORESCOMISIONPORCENTAJE].AsFloat;
end;
procedure TVENDEDORESCOMISIONDataTableRules.SetPORCENTAJEValue(const aValue: Float);
begin
DataTable.Fields[idx_VENDEDORESCOMISIONPORCENTAJE].AsFloat := aValue;
end;
function TVENDEDORESCOMISIONDataTableRules.GetCOMISIONValue: Float;
begin
result := DataTable.Fields[idx_VENDEDORESCOMISIONCOMISION].AsFloat;
end;
procedure TVENDEDORESCOMISIONDataTableRules.SetCOMISIONValue(const aValue: Float);
begin
DataTable.Fields[idx_VENDEDORESCOMISIONCOMISION].AsFloat := aValue;
end;
{ TCOMISIONESDataTableRules }
constructor TCOMISIONESDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TCOMISIONESDataTableRules.Destroy;
begin
inherited;
end;
function TCOMISIONESDataTableRules.GetCOMISIONValue: Float;
begin
result := DataTable.Fields[idx_COMISIONESCOMISION].AsFloat;
end;
procedure TCOMISIONESDataTableRules.SetCOMISIONValue(const aValue: Float);
begin
DataTable.Fields[idx_COMISIONESCOMISION].AsFloat := aValue;
end;
{ TCOBROSCOMISIONDataTableRules }
constructor TCOBROSCOMISIONDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TCOBROSCOMISIONDataTableRules.Destroy;
begin
inherited;
end;
function TCOBROSCOMISIONDataTableRules.GetSELECCIONValue: Integer;
begin
result := DataTable.Fields[idx_COBROSCOMISIONSELECCION].AsInteger;
end;
procedure TCOBROSCOMISIONDataTableRules.SetSELECCIONValue(const aValue: Integer);
begin
DataTable.Fields[idx_COBROSCOMISIONSELECCION].AsInteger := aValue;
end;
function TCOBROSCOMISIONDataTableRules.GetCODIGOEMPRESAValue: Integer;
begin
result := DataTable.Fields[idx_COBROSCOMISIONCODIGOEMPRESA].AsInteger;
end;
procedure TCOBROSCOMISIONDataTableRules.SetCODIGOEMPRESAValue(const aValue: Integer);
begin
DataTable.Fields[idx_COBROSCOMISIONCODIGOEMPRESA].AsInteger := aValue;
end;
function TCOBROSCOMISIONDataTableRules.GetCODIGOValue: Integer;
begin
result := DataTable.Fields[idx_COBROSCOMISIONCODIGO].AsInteger;
end;
procedure TCOBROSCOMISIONDataTableRules.SetCODIGOValue(const aValue: Integer);
begin
DataTable.Fields[idx_COBROSCOMISIONCODIGO].AsInteger := aValue;
end;
function TCOBROSCOMISIONDataTableRules.GetCODIGOCONTACTOValue: Integer;
begin
result := DataTable.Fields[idx_COBROSCOMISIONCODIGOCONTACTO].AsInteger;
end;
procedure TCOBROSCOMISIONDataTableRules.SetCODIGOCONTACTOValue(const aValue: Integer);
begin
DataTable.Fields[idx_COBROSCOMISIONCODIGOCONTACTO].AsInteger := aValue;
end;
function TCOBROSCOMISIONDataTableRules.GetNOMBREValue: String;
begin
result := DataTable.Fields[idx_COBROSCOMISIONNOMBRE].AsString;
end;
procedure TCOBROSCOMISIONDataTableRules.SetNOMBREValue(const aValue: String);
begin
DataTable.Fields[idx_COBROSCOMISIONNOMBRE].AsString := aValue;
end;
function TCOBROSCOMISIONDataTableRules.GetFECHAPAGOValue: DateTime;
begin
result := DataTable.Fields[idx_COBROSCOMISIONFECHAPAGO].AsDateTime;
end;
procedure TCOBROSCOMISIONDataTableRules.SetFECHAPAGOValue(const aValue: DateTime);
begin
DataTable.Fields[idx_COBROSCOMISIONFECHAPAGO].AsDateTime := aValue;
end;
function TCOBROSCOMISIONDataTableRules.GetIMPORTEValue: Float;
begin
result := DataTable.Fields[idx_COBROSCOMISIONIMPORTE].AsFloat;
end;
procedure TCOBROSCOMISIONDataTableRules.SetIMPORTEValue(const aValue: Float);
begin
DataTable.Fields[idx_COBROSCOMISIONIMPORTE].AsFloat := aValue;
end;
function TCOBROSCOMISIONDataTableRules.GetFORMAPAGOValue: String;
begin
result := DataTable.Fields[idx_COBROSCOMISIONFORMAPAGO].AsString;
end;
procedure TCOBROSCOMISIONDataTableRules.SetFORMAPAGOValue(const aValue: String);
begin
DataTable.Fields[idx_COBROSCOMISIONFORMAPAGO].AsString := aValue;
end;
function TCOBROSCOMISIONDataTableRules.GetDESCRIPCIONValue: String;
begin
result := DataTable.Fields[idx_COBROSCOMISIONDESCRIPCION].AsString;
end;
procedure TCOBROSCOMISIONDataTableRules.SetDESCRIPCIONValue(const aValue: String);
begin
DataTable.Fields[idx_COBROSCOMISIONDESCRIPCION].AsString := aValue;
end;
function TCOBROSCOMISIONDataTableRules.GetTIPOValue: String;
begin
result := DataTable.Fields[idx_COBROSCOMISIONTIPO].AsString;
end;
procedure TCOBROSCOMISIONDataTableRules.SetTIPOValue(const aValue: String);
begin
DataTable.Fields[idx_COBROSCOMISIONTIPO].AsString := aValue;
end;
function TCOBROSCOMISIONDataTableRules.GetCODIGOCATEGORIAValue: Integer;
begin
result := DataTable.Fields[idx_COBROSCOMISIONCODIGOCATEGORIA].AsInteger;
end;
procedure TCOBROSCOMISIONDataTableRules.SetCODIGOCATEGORIAValue(const aValue: Integer);
begin
DataTable.Fields[idx_COBROSCOMISIONCODIGOCATEGORIA].AsInteger := aValue;
end;
function TCOBROSCOMISIONDataTableRules.GetCATEGORIAValue: String;
begin
result := DataTable.Fields[idx_COBROSCOMISIONCATEGORIA].AsString;
end;
procedure TCOBROSCOMISIONDataTableRules.SetCATEGORIAValue(const aValue: String);
begin
DataTable.Fields[idx_COBROSCOMISIONCATEGORIA].AsString := aValue;
end;
initialization
RegisterDataTableRules(RID_VENDEDORESCOMISION, TVENDEDORESCOMISIONDataTableRules);
RegisterDataTableRules(RID_COMISIONES, TCOMISIONESDataTableRules);
RegisterDataTableRules(RID_COBROSCOMISION, TCOBROSCOMISIONDataTableRules);
end.