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/Facturas de proveedor/Reglas/schFacturasProveedorClient_Intf.pas

523 lines
20 KiB
ObjectPascal

unit schFacturasProveedorClient_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_ListaAnosFacturas = '{A357058B-4217-48F4-A5D2-9C243409ABAE}';
RID_FacturasProveedor = '{DF327921-CD7F-42FB-A1F9-0F1642C8826E}';
{ Data table names }
nme_ListaAnosFacturas = 'ListaAnosFacturas';
nme_FacturasProveedor = 'FacturasProveedor';
{ ListaAnosFacturas fields }
fld_ListaAnosFacturasANO = 'ANO';
{ ListaAnosFacturas field indexes }
idx_ListaAnosFacturasANO = 0;
{ FacturasProveedor fields }
fld_FacturasProveedorCODIGOEMPRESA = 'CODIGOEMPRESA';
fld_FacturasProveedorCODIGO = 'CODIGO';
fld_FacturasProveedorFECHAALTA = 'FECHAALTA';
fld_FacturasProveedorUSUARIO = 'USUARIO';
fld_FacturasProveedorFECHAFACTURA = 'FECHAFACTURA';
fld_FacturasProveedorREFERENCIA = 'REFERENCIA';
fld_FacturasProveedorVENCIMIENTO = 'VENCIMIENTO';
fld_FacturasProveedorCONCEPTO = 'CONCEPTO';
fld_FacturasProveedorBASEIMPONIBLE = 'BASEIMPONIBLE';
fld_FacturasProveedorDESCUENTO = 'DESCUENTO';
fld_FacturasProveedorIMPORTEDESCUENTO = 'IMPORTEDESCUENTO';
fld_FacturasProveedorIVA = 'IVA';
fld_FacturasProveedorIMPORTEIVA = 'IMPORTEIVA';
fld_FacturasProveedorIMPORTETOTAL = 'IMPORTETOTAL';
fld_FacturasProveedorFORMAPAGO = 'FORMAPAGO';
fld_FacturasProveedorCODIGOPROVEEDOR = 'CODIGOPROVEEDOR';
fld_FacturasProveedorNIFCIF = 'NIFCIF';
fld_FacturasProveedorNOMBRE = 'NOMBRE';
fld_FacturasProveedorCALLE = 'CALLE';
fld_FacturasProveedorPROVINCIA = 'PROVINCIA';
fld_FacturasProveedorCODIGOPOSTAL = 'CODIGOPOSTAL';
fld_FacturasProveedorPOBLACION = 'POBLACION';
{ FacturasProveedor field indexes }
idx_FacturasProveedorCODIGOEMPRESA = 0;
idx_FacturasProveedorCODIGO = 1;
idx_FacturasProveedorFECHAALTA = 2;
idx_FacturasProveedorUSUARIO = 3;
idx_FacturasProveedorFECHAFACTURA = 4;
idx_FacturasProveedorREFERENCIA = 5;
idx_FacturasProveedorVENCIMIENTO = 6;
idx_FacturasProveedorCONCEPTO = 7;
idx_FacturasProveedorBASEIMPONIBLE = 8;
idx_FacturasProveedorDESCUENTO = 9;
idx_FacturasProveedorIMPORTEDESCUENTO = 10;
idx_FacturasProveedorIVA = 11;
idx_FacturasProveedorIMPORTEIVA = 12;
idx_FacturasProveedorIMPORTETOTAL = 13;
idx_FacturasProveedorFORMAPAGO = 14;
idx_FacturasProveedorCODIGOPROVEEDOR = 15;
idx_FacturasProveedorNIFCIF = 16;
idx_FacturasProveedorNOMBRE = 17;
idx_FacturasProveedorCALLE = 18;
idx_FacturasProveedorPROVINCIA = 19;
idx_FacturasProveedorCODIGOPOSTAL = 20;
idx_FacturasProveedorPOBLACION = 21;
type
{ IListaAnosFacturas }
IListaAnosFacturas = interface(IDAStronglyTypedDataTable)
['{BB47DCBF-79F2-4F47-B2FB-78344C6265D9}']
{ Property getters and setters }
function GetANOValue: String;
procedure SetANOValue(const aValue: String);
{ Properties }
property ANO: String read GetANOValue write SetANOValue;
end;
{ TListaAnosFacturasDataTableRules }
TListaAnosFacturasDataTableRules = class(TDADataTableRules, IListaAnosFacturas)
private
protected
{ Property getters and setters }
function GetANOValue: String; virtual;
procedure SetANOValue(const aValue: String); virtual;
{ Properties }
property ANO: String read GetANOValue write SetANOValue;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
{ IFacturasProveedor }
IFacturasProveedor = interface(IDAStronglyTypedDataTable)
['{03DE23C9-A1E1-41CB-B3AB-4E923905D12C}']
{ Property getters and setters }
function GetCODIGOEMPRESAValue: Integer;
procedure SetCODIGOEMPRESAValue(const aValue: Integer);
function GetCODIGOValue: Integer;
procedure SetCODIGOValue(const aValue: Integer);
function GetFECHAALTAValue: DateTime;
procedure SetFECHAALTAValue(const aValue: DateTime);
function GetUSUARIOValue: String;
procedure SetUSUARIOValue(const aValue: String);
function GetFECHAFACTURAValue: DateTime;
procedure SetFECHAFACTURAValue(const aValue: DateTime);
function GetREFERENCIAValue: String;
procedure SetREFERENCIAValue(const aValue: String);
function GetVENCIMIENTOValue: DateTime;
procedure SetVENCIMIENTOValue(const aValue: DateTime);
function GetCONCEPTOValue: IROStrings;
procedure SetCONCEPTOValue(const aValue: IROStrings);
function GetBASEIMPONIBLEValue: Currency;
procedure SetBASEIMPONIBLEValue(const aValue: Currency);
function GetDESCUENTOValue: Float;
procedure SetDESCUENTOValue(const aValue: Float);
function GetIMPORTEDESCUENTOValue: Currency;
procedure SetIMPORTEDESCUENTOValue(const aValue: Currency);
function GetIVAValue: Float;
procedure SetIVAValue(const aValue: Float);
function GetIMPORTEIVAValue: Currency;
procedure SetIMPORTEIVAValue(const aValue: Currency);
function GetIMPORTETOTALValue: Currency;
procedure SetIMPORTETOTALValue(const aValue: Currency);
function GetFORMAPAGOValue: IROStrings;
procedure SetFORMAPAGOValue(const aValue: IROStrings);
function GetCODIGOPROVEEDORValue: Integer;
procedure SetCODIGOPROVEEDORValue(const aValue: Integer);
function GetNIFCIFValue: String;
procedure SetNIFCIFValue(const aValue: String);
function GetNOMBREValue: String;
procedure SetNOMBREValue(const aValue: String);
function GetCALLEValue: String;
procedure SetCALLEValue(const aValue: String);
function GetPROVINCIAValue: String;
procedure SetPROVINCIAValue(const aValue: String);
function GetCODIGOPOSTALValue: String;
procedure SetCODIGOPOSTALValue(const aValue: String);
function GetPOBLACIONValue: String;
procedure SetPOBLACIONValue(const aValue: String);
{ Properties }
property CODIGOEMPRESA: Integer read GetCODIGOEMPRESAValue write SetCODIGOEMPRESAValue;
property CODIGO: Integer read GetCODIGOValue write SetCODIGOValue;
property FECHAALTA: DateTime read GetFECHAALTAValue write SetFECHAALTAValue;
property USUARIO: String read GetUSUARIOValue write SetUSUARIOValue;
property FECHAFACTURA: DateTime read GetFECHAFACTURAValue write SetFECHAFACTURAValue;
property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue;
property VENCIMIENTO: DateTime read GetVENCIMIENTOValue write SetVENCIMIENTOValue;
property CONCEPTO: IROStrings read GetCONCEPTOValue write SetCONCEPTOValue;
property BASEIMPONIBLE: Currency read GetBASEIMPONIBLEValue write SetBASEIMPONIBLEValue;
property DESCUENTO: Float read GetDESCUENTOValue write SetDESCUENTOValue;
property IMPORTEDESCUENTO: Currency read GetIMPORTEDESCUENTOValue write SetIMPORTEDESCUENTOValue;
property IVA: Float read GetIVAValue write SetIVAValue;
property IMPORTEIVA: Currency read GetIMPORTEIVAValue write SetIMPORTEIVAValue;
property IMPORTETOTAL: Currency read GetIMPORTETOTALValue write SetIMPORTETOTALValue;
property FORMAPAGO: IROStrings read GetFORMAPAGOValue write SetFORMAPAGOValue;
property CODIGOPROVEEDOR: Integer read GetCODIGOPROVEEDORValue write SetCODIGOPROVEEDORValue;
property NIFCIF: String read GetNIFCIFValue write SetNIFCIFValue;
property NOMBRE: String read GetNOMBREValue write SetNOMBREValue;
property CALLE: String read GetCALLEValue write SetCALLEValue;
property PROVINCIA: String read GetPROVINCIAValue write SetPROVINCIAValue;
property CODIGOPOSTAL: String read GetCODIGOPOSTALValue write SetCODIGOPOSTALValue;
property POBLACION: String read GetPOBLACIONValue write SetPOBLACIONValue;
end;
{ TFacturasProveedorDataTableRules }
TFacturasProveedorDataTableRules = class(TDADataTableRules, IFacturasProveedor)
private
protected
{ Property getters and setters }
function GetCODIGOEMPRESAValue: Integer; virtual;
procedure SetCODIGOEMPRESAValue(const aValue: Integer); virtual;
function GetCODIGOValue: Integer; virtual;
procedure SetCODIGOValue(const aValue: Integer); virtual;
function GetFECHAALTAValue: DateTime; virtual;
procedure SetFECHAALTAValue(const aValue: DateTime); virtual;
function GetUSUARIOValue: String; virtual;
procedure SetUSUARIOValue(const aValue: String); virtual;
function GetFECHAFACTURAValue: DateTime; virtual;
procedure SetFECHAFACTURAValue(const aValue: DateTime); virtual;
function GetREFERENCIAValue: String; virtual;
procedure SetREFERENCIAValue(const aValue: String); virtual;
function GetVENCIMIENTOValue: DateTime; virtual;
procedure SetVENCIMIENTOValue(const aValue: DateTime); virtual;
function GetCONCEPTOValue: IROStrings; virtual;
procedure SetCONCEPTOValue(const aValue: IROStrings); virtual;
function GetBASEIMPONIBLEValue: Currency; virtual;
procedure SetBASEIMPONIBLEValue(const aValue: Currency); virtual;
function GetDESCUENTOValue: Float; virtual;
procedure SetDESCUENTOValue(const aValue: Float); virtual;
function GetIMPORTEDESCUENTOValue: Currency; virtual;
procedure SetIMPORTEDESCUENTOValue(const aValue: Currency); virtual;
function GetIVAValue: Float; virtual;
procedure SetIVAValue(const aValue: Float); virtual;
function GetIMPORTEIVAValue: Currency; virtual;
procedure SetIMPORTEIVAValue(const aValue: Currency); virtual;
function GetIMPORTETOTALValue: Currency; virtual;
procedure SetIMPORTETOTALValue(const aValue: Currency); virtual;
function GetFORMAPAGOValue: IROStrings; virtual;
procedure SetFORMAPAGOValue(const aValue: IROStrings); virtual;
function GetCODIGOPROVEEDORValue: Integer; virtual;
procedure SetCODIGOPROVEEDORValue(const aValue: Integer); virtual;
function GetNIFCIFValue: String; virtual;
procedure SetNIFCIFValue(const aValue: String); virtual;
function GetNOMBREValue: String; virtual;
procedure SetNOMBREValue(const aValue: String); virtual;
function GetCALLEValue: String; virtual;
procedure SetCALLEValue(const aValue: String); virtual;
function GetPROVINCIAValue: String; virtual;
procedure SetPROVINCIAValue(const aValue: String); virtual;
function GetCODIGOPOSTALValue: String; virtual;
procedure SetCODIGOPOSTALValue(const aValue: String); virtual;
function GetPOBLACIONValue: String; virtual;
procedure SetPOBLACIONValue(const aValue: String); virtual;
{ Properties }
property CODIGOEMPRESA: Integer read GetCODIGOEMPRESAValue write SetCODIGOEMPRESAValue;
property CODIGO: Integer read GetCODIGOValue write SetCODIGOValue;
property FECHAALTA: DateTime read GetFECHAALTAValue write SetFECHAALTAValue;
property USUARIO: String read GetUSUARIOValue write SetUSUARIOValue;
property FECHAFACTURA: DateTime read GetFECHAFACTURAValue write SetFECHAFACTURAValue;
property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue;
property VENCIMIENTO: DateTime read GetVENCIMIENTOValue write SetVENCIMIENTOValue;
property CONCEPTO: IROStrings read GetCONCEPTOValue write SetCONCEPTOValue;
property BASEIMPONIBLE: Currency read GetBASEIMPONIBLEValue write SetBASEIMPONIBLEValue;
property DESCUENTO: Float read GetDESCUENTOValue write SetDESCUENTOValue;
property IMPORTEDESCUENTO: Currency read GetIMPORTEDESCUENTOValue write SetIMPORTEDESCUENTOValue;
property IVA: Float read GetIVAValue write SetIVAValue;
property IMPORTEIVA: Currency read GetIMPORTEIVAValue write SetIMPORTEIVAValue;
property IMPORTETOTAL: Currency read GetIMPORTETOTALValue write SetIMPORTETOTALValue;
property FORMAPAGO: IROStrings read GetFORMAPAGOValue write SetFORMAPAGOValue;
property CODIGOPROVEEDOR: Integer read GetCODIGOPROVEEDORValue write SetCODIGOPROVEEDORValue;
property NIFCIF: String read GetNIFCIFValue write SetNIFCIFValue;
property NOMBRE: String read GetNOMBREValue write SetNOMBREValue;
property CALLE: String read GetCALLEValue write SetCALLEValue;
property PROVINCIA: String read GetPROVINCIAValue write SetPROVINCIAValue;
property CODIGOPOSTAL: String read GetCODIGOPOSTALValue write SetCODIGOPOSTALValue;
property POBLACION: String read GetPOBLACIONValue write SetPOBLACIONValue;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
implementation
uses Variants;
{ TListaAnosFacturasDataTableRules }
constructor TListaAnosFacturasDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TListaAnosFacturasDataTableRules.Destroy;
begin
inherited;
end;
function TListaAnosFacturasDataTableRules.GetANOValue: String;
begin
result := DataTable.Fields[idx_ListaAnosFacturasANO].AsString;
end;
procedure TListaAnosFacturasDataTableRules.SetANOValue(const aValue: String);
begin
DataTable.Fields[idx_ListaAnosFacturasANO].AsString := aValue;
end;
{ TFacturasProveedorDataTableRules }
constructor TFacturasProveedorDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TFacturasProveedorDataTableRules.Destroy;
begin
inherited;
end;
function TFacturasProveedorDataTableRules.GetCODIGOEMPRESAValue: Integer;
begin
result := DataTable.Fields[idx_FacturasProveedorCODIGOEMPRESA].AsInteger;
end;
procedure TFacturasProveedorDataTableRules.SetCODIGOEMPRESAValue(const aValue: Integer);
begin
DataTable.Fields[idx_FacturasProveedorCODIGOEMPRESA].AsInteger := aValue;
end;
function TFacturasProveedorDataTableRules.GetCODIGOValue: Integer;
begin
result := DataTable.Fields[idx_FacturasProveedorCODIGO].AsInteger;
end;
procedure TFacturasProveedorDataTableRules.SetCODIGOValue(const aValue: Integer);
begin
DataTable.Fields[idx_FacturasProveedorCODIGO].AsInteger := aValue;
end;
function TFacturasProveedorDataTableRules.GetFECHAALTAValue: DateTime;
begin
result := DataTable.Fields[idx_FacturasProveedorFECHAALTA].AsDateTime;
end;
procedure TFacturasProveedorDataTableRules.SetFECHAALTAValue(const aValue: DateTime);
begin
DataTable.Fields[idx_FacturasProveedorFECHAALTA].AsDateTime := aValue;
end;
function TFacturasProveedorDataTableRules.GetUSUARIOValue: String;
begin
result := DataTable.Fields[idx_FacturasProveedorUSUARIO].AsString;
end;
procedure TFacturasProveedorDataTableRules.SetUSUARIOValue(const aValue: String);
begin
DataTable.Fields[idx_FacturasProveedorUSUARIO].AsString := aValue;
end;
function TFacturasProveedorDataTableRules.GetFECHAFACTURAValue: DateTime;
begin
result := DataTable.Fields[idx_FacturasProveedorFECHAFACTURA].AsDateTime;
end;
procedure TFacturasProveedorDataTableRules.SetFECHAFACTURAValue(const aValue: DateTime);
begin
DataTable.Fields[idx_FacturasProveedorFECHAFACTURA].AsDateTime := aValue;
end;
function TFacturasProveedorDataTableRules.GetREFERENCIAValue: String;
begin
result := DataTable.Fields[idx_FacturasProveedorREFERENCIA].AsString;
end;
procedure TFacturasProveedorDataTableRules.SetREFERENCIAValue(const aValue: String);
begin
DataTable.Fields[idx_FacturasProveedorREFERENCIA].AsString := aValue;
end;
function TFacturasProveedorDataTableRules.GetVENCIMIENTOValue: DateTime;
begin
result := DataTable.Fields[idx_FacturasProveedorVENCIMIENTO].AsDateTime;
end;
procedure TFacturasProveedorDataTableRules.SetVENCIMIENTOValue(const aValue: DateTime);
begin
DataTable.Fields[idx_FacturasProveedorVENCIMIENTO].AsDateTime := aValue;
end;
function TFacturasProveedorDataTableRules.GetCONCEPTOValue: IROStrings;
begin
result := NewROStrings();
result.Text := DataTable.Fields[idx_FacturasProveedorCONCEPTO].AsString;
end;
procedure TFacturasProveedorDataTableRules.SetCONCEPTOValue(const aValue: IROStrings);
begin
DataTable.Fields[idx_FacturasProveedorCONCEPTO].AsString := aValue.Text;
end;
function TFacturasProveedorDataTableRules.GetBASEIMPONIBLEValue: Currency;
begin
result := DataTable.Fields[idx_FacturasProveedorBASEIMPONIBLE].AsCurrency;
end;
procedure TFacturasProveedorDataTableRules.SetBASEIMPONIBLEValue(const aValue: Currency);
begin
DataTable.Fields[idx_FacturasProveedorBASEIMPONIBLE].AsCurrency := aValue;
end;
function TFacturasProveedorDataTableRules.GetDESCUENTOValue: Float;
begin
result := DataTable.Fields[idx_FacturasProveedorDESCUENTO].AsFloat;
end;
procedure TFacturasProveedorDataTableRules.SetDESCUENTOValue(const aValue: Float);
begin
DataTable.Fields[idx_FacturasProveedorDESCUENTO].AsFloat := aValue;
end;
function TFacturasProveedorDataTableRules.GetIMPORTEDESCUENTOValue: Currency;
begin
result := DataTable.Fields[idx_FacturasProveedorIMPORTEDESCUENTO].AsCurrency;
end;
procedure TFacturasProveedorDataTableRules.SetIMPORTEDESCUENTOValue(const aValue: Currency);
begin
DataTable.Fields[idx_FacturasProveedorIMPORTEDESCUENTO].AsCurrency := aValue;
end;
function TFacturasProveedorDataTableRules.GetIVAValue: Float;
begin
result := DataTable.Fields[idx_FacturasProveedorIVA].AsFloat;
end;
procedure TFacturasProveedorDataTableRules.SetIVAValue(const aValue: Float);
begin
DataTable.Fields[idx_FacturasProveedorIVA].AsFloat := aValue;
end;
function TFacturasProveedorDataTableRules.GetIMPORTEIVAValue: Currency;
begin
result := DataTable.Fields[idx_FacturasProveedorIMPORTEIVA].AsCurrency;
end;
procedure TFacturasProveedorDataTableRules.SetIMPORTEIVAValue(const aValue: Currency);
begin
DataTable.Fields[idx_FacturasProveedorIMPORTEIVA].AsCurrency := aValue;
end;
function TFacturasProveedorDataTableRules.GetIMPORTETOTALValue: Currency;
begin
result := DataTable.Fields[idx_FacturasProveedorIMPORTETOTAL].AsCurrency;
end;
procedure TFacturasProveedorDataTableRules.SetIMPORTETOTALValue(const aValue: Currency);
begin
DataTable.Fields[idx_FacturasProveedorIMPORTETOTAL].AsCurrency := aValue;
end;
function TFacturasProveedorDataTableRules.GetFORMAPAGOValue: IROStrings;
begin
result := NewROStrings();
result.Text := DataTable.Fields[idx_FacturasProveedorFORMAPAGO].AsString;
end;
procedure TFacturasProveedorDataTableRules.SetFORMAPAGOValue(const aValue: IROStrings);
begin
DataTable.Fields[idx_FacturasProveedorFORMAPAGO].AsString := aValue.Text;
end;
function TFacturasProveedorDataTableRules.GetCODIGOPROVEEDORValue: Integer;
begin
result := DataTable.Fields[idx_FacturasProveedorCODIGOPROVEEDOR].AsInteger;
end;
procedure TFacturasProveedorDataTableRules.SetCODIGOPROVEEDORValue(const aValue: Integer);
begin
DataTable.Fields[idx_FacturasProveedorCODIGOPROVEEDOR].AsInteger := aValue;
end;
function TFacturasProveedorDataTableRules.GetNIFCIFValue: String;
begin
result := DataTable.Fields[idx_FacturasProveedorNIFCIF].AsString;
end;
procedure TFacturasProveedorDataTableRules.SetNIFCIFValue(const aValue: String);
begin
DataTable.Fields[idx_FacturasProveedorNIFCIF].AsString := aValue;
end;
function TFacturasProveedorDataTableRules.GetNOMBREValue: String;
begin
result := DataTable.Fields[idx_FacturasProveedorNOMBRE].AsString;
end;
procedure TFacturasProveedorDataTableRules.SetNOMBREValue(const aValue: String);
begin
DataTable.Fields[idx_FacturasProveedorNOMBRE].AsString := aValue;
end;
function TFacturasProveedorDataTableRules.GetCALLEValue: String;
begin
result := DataTable.Fields[idx_FacturasProveedorCALLE].AsString;
end;
procedure TFacturasProveedorDataTableRules.SetCALLEValue(const aValue: String);
begin
DataTable.Fields[idx_FacturasProveedorCALLE].AsString := aValue;
end;
function TFacturasProveedorDataTableRules.GetPROVINCIAValue: String;
begin
result := DataTable.Fields[idx_FacturasProveedorPROVINCIA].AsString;
end;
procedure TFacturasProveedorDataTableRules.SetPROVINCIAValue(const aValue: String);
begin
DataTable.Fields[idx_FacturasProveedorPROVINCIA].AsString := aValue;
end;
function TFacturasProveedorDataTableRules.GetCODIGOPOSTALValue: String;
begin
result := DataTable.Fields[idx_FacturasProveedorCODIGOPOSTAL].AsString;
end;
procedure TFacturasProveedorDataTableRules.SetCODIGOPOSTALValue(const aValue: String);
begin
DataTable.Fields[idx_FacturasProveedorCODIGOPOSTAL].AsString := aValue;
end;
function TFacturasProveedorDataTableRules.GetPOBLACIONValue: String;
begin
result := DataTable.Fields[idx_FacturasProveedorPOBLACION].AsString;
end;
procedure TFacturasProveedorDataTableRules.SetPOBLACIONValue(const aValue: String);
begin
DataTable.Fields[idx_FacturasProveedorPOBLACION].AsString := aValue;
end;
initialization
RegisterDataTableRules(RID_ListaAnosFacturas, TListaAnosFacturasDataTableRules);
RegisterDataTableRules(RID_FacturasProveedor, TFacturasProveedorDataTableRules);
end.