Tecsitel_FactuGES2/Source/Modulos/Contactos/Model/uBizContactos.pas
2007-09-12 14:11:44 +00:00

798 lines
27 KiB
ObjectPascal

unit uBizContactos;
interface
uses
uDAInterfaces, uDADataTable, uROClasses,
schContactosClient_Intf, uBizContactosDatosBancarios, uBizCategoriasContacto,
uDBSelectionListUtils, uBizDireccionesContacto, uBizClientesDescuentos;
const
BIZ_CLIENT_CONTACTO = 'Client.Contacto';
BIZ_CLIENT_CLIENTE = 'Client.Cliente';
BIZ_CLIENT_PROVEEDOR = 'Client.Proveedor';
BIZ_CLIENT_EMPLEADO = 'Client.Empleado';
CATEGORIA_CLIENTE = 1;
CATEGORIA_PROVEEDOR = 2;
CATEGORIA_EMPLEADO = 3;
PROVEEDOR_REGIMEN_IVA = 'General';
CLIENTE_REGIMEN_IVA = 'General';
CLIENTE_DIAS_VENCIMIENTO = 15;
CLIENTE_RECARGO_EQUIVALENCIA = 0;
type
IBizContacto = interface (IContactos)
['{CD585680-26B6-47A4-B684-89C468670F4A}']
procedure SetDatosBancarios(AValue : IBizContactosDatosBancarios);
function GetDatosBancarios : IBizContactosDatosBancarios;
property DatosBancarios : IBizContactosDatosBancarios read GetDatosBancarios
write SetDatosBancarios;
function GetCategoria : String;
property Categoria : String read GetCategoria;
function _GetCategorias: IBizCategoriasContacto;
procedure _SetCategorias(const Value: IBizCategoriasContacto);
property _Categorias : IBizCategoriasContacto read _GetCategorias
write _SetCategorias;
function GetDirecciones: IBizDireccionesContacto;
procedure SetDirecciones(const Value: IBizDireccionesContacto);
property Direcciones : IBizDireccionesContacto read GetDirecciones
write SetDirecciones;
function EsNuevo : Boolean;
end;
IBizCliente = interface (IBizContacto)
['{EA48A6AA-AC96-4AD9-B383-F2FD4552EE76}']
function GetGRUPO_CLIENTEValue: String;
procedure SetGRUPO_CLIENTEValue(const aValue: String);
function GetNOMBRE_COMERCIALValue: String;
procedure SetNOMBRE_COMERCIALValue(const aValue: String);
function GetVENCIMIENTO_FACTURASValue: Integer;
procedure SetVENCIMIENTO_FACTURASValue(const aValue: Integer);
function GetBLOQUEADOValue: Integer;
procedure SetBLOQUEADOValue(const aValue: Integer);
function GetMOTIVO_BLOQUEOValue: String;
procedure SetMOTIVO_BLOQUEOValue(const aValue: String);
function GetRECARGO_EQUIVALENCIAValue: Integer;
procedure SetRECARGO_EQUIVALENCIAValue(const aValue: Integer);
function GetREGIMEN_IVAValue: String;
procedure SetREGIMEN_IVAValue(const aValue: String);
function GetID_TIPO_IVAValue: Integer;
procedure SetID_TIPO_IVAValue(const aValue: Integer);
function GetID_FORMA_PAGOValue: Integer;
procedure SetID_FORMA_PAGOValue(const aValue: Integer);
function GetTIENDA_WEBValue: Integer;
procedure SetTIENDA_WEBValue(const aValue: Integer);
function GetDescuentos: IBizClienteDescuentos;
procedure SetDescuentos(Value: IBizClienteDescuentos);
property Descuentos: IBizClienteDescuentos read GetDescuentos write SetDescuentos;
property GRUPO_CLIENTE: String read GetGRUPO_CLIENTEValue write SetGRUPO_CLIENTEValue;
property NOMBRE_COMERCIAL: String read GetNOMBRE_COMERCIALValue write SetNOMBRE_COMERCIALValue;
property VENCIMIENTO_FACTURAS: Integer read GetVENCIMIENTO_FACTURASValue write SetVENCIMIENTO_FACTURASValue;
property BLOQUEADO: Integer read GetBLOQUEADOValue write SetBLOQUEADOValue;
property MOTIVO_BLOQUEO: String read GetMOTIVO_BLOQUEOValue write SetMOTIVO_BLOQUEOValue;
property RECARGO_EQUIVALENCIA: Integer read GetRECARGO_EQUIVALENCIAValue write SetRECARGO_EQUIVALENCIAValue;
property REGIMEN_IVA: String read GetREGIMEN_IVAValue write SetREGIMEN_IVAValue;
property ID_TIPO_IVA: Integer read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue;
property ID_FORMA_PAGO: Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property TIENDA_WEB: Integer read GetTIENDA_WEBValue write SetTIENDA_WEBValue;
end;
IBizProveedor = interface (IBizContacto)
['{0CC1FBB8-C2F1-4E10-87B9-D4EEB1221299}']
function GetREGIMEN_IVAValue: String;
procedure SetREGIMEN_IVAValue(const aValue: String);
function GetDESCUENTOValue: Float;
procedure SetDESCUENTOValue(const aValue: Float);
function GetDESCRIPCION_PROVEEDORValue: String;
procedure SetDESCRIPCION_PROVEEDORValue(const aValue: String);
function GetCODIGO_ASIGNADOValue: String;
procedure SetCODIGO_ASIGNADOValue(const aValue: String);
function GetID_TIPO_IVAValue: Integer;
procedure SetID_TIPO_IVAValue(const aValue: Integer);
function GetID_FORMA_PAGOValue: Integer;
procedure SetID_FORMA_PAGOValue(const aValue: Integer);
function GetTIENDA_WEBValue: Integer;
procedure SetTIENDA_WEBValue(const aValue: Integer);
function GetHOMOLOGADOValue: Integer;
procedure SetHOMOLOGADOValue(const aValue: Integer);
function GetCERTIFICACIONValue: String;
procedure SetCERTIFICACIONValue(const aValue: String);
function GetGRUPO_PROVEEDORValue: String;
procedure SetGRUPO_PROVEEDORValue(const aValue: String);
property REGIMEN_IVA: String read GetREGIMEN_IVAValue write SetREGIMEN_IVAValue;
property DESCUENTO: Float read GetDESCUENTOValue write SetDESCUENTOValue;
property DESCRIPCION_PROVEEDOR: String read GetDESCRIPCION_PROVEEDORValue write SetDESCRIPCION_PROVEEDORValue;
property CODIGO_ASIGNADO: String read GetCODIGO_ASIGNADOValue write SetCODIGO_ASIGNADOValue;
property ID_TIPO_IVA: Integer read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue;
property ID_FORMA_PAGO: Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property TIENDA_WEB: Integer read GetTIENDA_WEBValue write SetTIENDA_WEBValue;
property HOMOLOGADO: Integer read GetHOMOLOGADOValue write SetHOMOLOGADOValue;
property CERTIFICACION: String read GetCERTIFICACIONValue write SetCERTIFICACIONValue;
property GRUPO_PROVEEDOR: String read GetGRUPO_PROVEEDORValue write SetGRUPO_PROVEEDORValue;
end;
IBizEmpleado = interface (IBizContacto)
['{CA24021E-A227-47F9-815F-A8565DB0F748}']
function GetFECHA_NACIMIENTOValue: TDateTime;
procedure SetFECHA_NACIMIENTOValue(const aValue: TDateTime);
function GetCATEGORIAValue: String;
procedure SetCATEGORIAValue(const aValue: String);
function GetFECHA_ALTA_EMPRESAValue: TDateTime;
procedure SetFECHA_ALTA_EMPRESAValue(const aValue: TDateTime);
function GetFORMACION_BASEValue: IROStrings;
procedure SetFORMACION_BASEValue(const aValue: IROStrings);
function GetFORMACION_COMPLEValue: IROStrings;
procedure SetFORMACION_COMPLEValue(const aValue: IROStrings);
function GetFORMACION_RECIBIDAValue: IROStrings;
procedure SetFORMACION_RECIBIDAValue(const aValue: IROStrings);
function GetEXPERIENCIAValue: IROStrings;
procedure SetEXPERIENCIAValue(const aValue: IROStrings);
property FECHA_NACIMIENTO: TDateTime read GetFECHA_NACIMIENTOValue write SetFECHA_NACIMIENTOValue;
property CATEGORIA: String read GetCATEGORIAValue write SetCATEGORIAValue;
property FECHA_ALTA_EMPRESA: TDateTime read GetFECHA_ALTA_EMPRESAValue write SetFECHA_ALTA_EMPRESAValue;
property FORMACION_BASE: IROStrings read GetFORMACION_BASEValue write SetFORMACION_BASEValue;
property FORMACION_COMPLE: IROStrings read GetFORMACION_COMPLEValue write SetFORMACION_COMPLEValue;
property FORMACION_RECIBIDA: IROStrings read GetFORMACION_RECIBIDAValue write SetFORMACION_RECIBIDAValue;
property EXPERIENCIA: IROStrings read GetEXPERIENCIAValue write SetEXPERIENCIAValue;
end;
TBizContacto = class(TContactosDataTableRules, IBizContacto, ISeleccionable)
protected
FDatosBancarios : IBizContactosDatosBancarios;
FDatosBancariosLink : TDADataSource;
FCategorias : IBizCategoriasContacto;
FCategoriasLink : TDADataSource;
FDirecciones : IBizDireccionesContacto;
FDireccionesLink : TDADataSource;
FSeleccionableInterface : ISeleccionable;
function _GetCategorias: IBizCategoriasContacto;
procedure _SetCategorias(const Value: IBizCategoriasContacto);
procedure SetDatosBancarios(AValue : IBizContactosDatosBancarios);
function GetDatosBancarios : IBizContactosDatosBancarios;
function GetDirecciones: IBizDireccionesContacto;
procedure SetDirecciones(const Value: IBizDireccionesContacto);
function GetCategoria : String;
procedure OnNewRecord(Sender: TDADataTable); override;
public
function EsNuevo : Boolean;
procedure IniciarValoresContactoNuevo; virtual;
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
property Categoria : String read GetCategoria;
property _Categorias : IBizCategoriasContacto read _GetCategorias
write _SetCategorias;
property DatosBancarios : IBizContactosDatosBancarios read GetDatosBancarios
write SetDatosBancarios;
property Direcciones : IBizDireccionesContacto read GetDirecciones
write SetDirecciones;
property SeleccionableInterface : ISeleccionable read FSeleccionableInterface
write FSeleccionableInterface implements ISeleccionable;
end;
TBizCliente = class(TBizContacto, IBizCliente)
protected
FDescuentos : IBizClienteDescuentos;
FDescuentosLink : TDADataSource;
function GetGRUPO_CLIENTEValue: String;
procedure SetGRUPO_CLIENTEValue(const aValue: String);
function GetNOMBRE_COMERCIALValue: String;
procedure SetNOMBRE_COMERCIALValue(const aValue: String);
function GetVENCIMIENTO_FACTURASValue: Integer;
procedure SetVENCIMIENTO_FACTURASValue(const aValue: Integer);
function GetBLOQUEADOValue: Integer;
procedure SetBLOQUEADOValue(const aValue: Integer);
function GetMOTIVO_BLOQUEOValue: String;
procedure SetMOTIVO_BLOQUEOValue(const aValue: String);
function GetRECARGO_EQUIVALENCIAValue: Integer;
procedure SetRECARGO_EQUIVALENCIAValue(const aValue: Integer);
function GetREGIMEN_IVAValue: String;
procedure SetREGIMEN_IVAValue(const aValue: String);
function GetID_TIPO_IVAValue: Integer;
procedure SetID_TIPO_IVAValue(const aValue: Integer);
function GetID_FORMA_PAGOValue: Integer;
procedure SetID_FORMA_PAGOValue(const aValue: Integer);
function GetTIENDA_WEBValue: Integer;
procedure SetTIENDA_WEBValue(const aValue: Integer);
function GetDescuentos: IBizClienteDescuentos;
procedure SetDescuentos(Value: IBizClienteDescuentos);
public
procedure IniciarValoresContactoNuevo; override;
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
property Descuentos: IBizClienteDescuentos read GetDescuentos write SetDescuentos;
property GRUPO_CLIENTE: String read GetGRUPO_CLIENTEValue write SetGRUPO_CLIENTEValue;
property NOMBRE_COMERCIAL: String read GetNOMBRE_COMERCIALValue write SetNOMBRE_COMERCIALValue;
property VENCIMIENTO_FACTURAS: Integer read GetVENCIMIENTO_FACTURASValue write SetVENCIMIENTO_FACTURASValue;
property BLOQUEADO: Integer read GetBLOQUEADOValue write SetBLOQUEADOValue;
property MOTIVO_BLOQUEO: String read GetMOTIVO_BLOQUEOValue write SetMOTIVO_BLOQUEOValue;
property RECARGO_EQUIVALENCIA: Integer read GetRECARGO_EQUIVALENCIAValue write SetRECARGO_EQUIVALENCIAValue;
property REGIMEN_IVA: String read GetREGIMEN_IVAValue write SetREGIMEN_IVAValue;
property ID_TIPO_IVA: Integer read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue;
property ID_FORMA_PAGO: Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property TIENDA_WEB: Integer read GetTIENDA_WEBValue write SetTIENDA_WEBValue;
end;
TBizProveedor = class(TBizContacto, IBizProveedor)
protected
function GetDESCUENTOValue: Float;
procedure SetDESCUENTOValue(const aValue: Float);
function GetDESCRIPCION_PROVEEDORValue: String;
procedure SetDESCRIPCION_PROVEEDORValue(const aValue: String);
function GetCODIGO_ASIGNADOValue: String;
procedure SetCODIGO_ASIGNADOValue(const aValue: String);
function GetREGIMEN_IVAValue: String;
procedure SetREGIMEN_IVAValue(const aValue: String);
function GetID_TIPO_IVAValue: Integer;
procedure SetID_TIPO_IVAValue(const aValue: Integer);
function GetTIENDA_WEBValue: Integer;
procedure SetTIENDA_WEBValue(const aValue: Integer);
function GetID_FORMA_PAGOValue: Integer;
procedure SetID_FORMA_PAGOValue(const aValue: Integer);
function GetHOMOLOGADOValue: Integer;
procedure SetHOMOLOGADOValue(const aValue: Integer);
function GetCERTIFICACIONValue: String;
procedure SetCERTIFICACIONValue(const aValue: String);
function GetGRUPO_PROVEEDORValue: String;
procedure SetGRUPO_PROVEEDORValue(const aValue: String);
public
procedure IniciarValoresContactoNuevo; override;
property DESCUENTO: Float read GetDESCUENTOValue write SetDESCUENTOValue;
property DESCRIPCION_PROVEEDOR: String read GetDESCRIPCION_PROVEEDORValue write SetDESCRIPCION_PROVEEDORValue;
property CODIGO_ASIGNADO: String read GetCODIGO_ASIGNADOValue write SetCODIGO_ASIGNADOValue;
property REGIMEN_IVA: String read GetREGIMEN_IVAValue write SetREGIMEN_IVAValue;
property ID_TIPO_IVA: Integer read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue;
property ID_FORMA_PAGO: Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property TIENDA_WEB: Integer read GetTIENDA_WEBValue write SetTIENDA_WEBValue;
property HOMOLOGADO: Integer read GetHOMOLOGADOValue write SetHOMOLOGADOValue;
property CERTIFICACION: String read GetCERTIFICACIONValue write SetCERTIFICACIONValue;
property GRUPO_PROVEEDOR: String read GetGRUPO_PROVEEDORValue write SetGRUPO_PROVEEDORValue;
end;
TBizEmpleado = class(TBizContacto, IBizEmpleado)
protected
function GetFECHA_NACIMIENTOValue: TDateTime;
procedure SetFECHA_NACIMIENTOValue(const aValue: TDateTime);
function GetCATEGORIAValue: String;
procedure SetCATEGORIAValue(const aValue: String);
function GetFECHA_ALTA_EMPRESAValue: TDateTime;
procedure SetFECHA_ALTA_EMPRESAValue(const aValue: TDateTime);
function GetFORMACION_BASEValue: IROStrings;
procedure SetFORMACION_BASEValue(const aValue: IROStrings);
function GetFORMACION_COMPLEValue: IROStrings;
procedure SetFORMACION_COMPLEValue(const aValue: IROStrings);
function GetFORMACION_RECIBIDAValue: IROStrings;
procedure SetFORMACION_RECIBIDAValue(const aValue: IROStrings);
function GetEXPERIENCIAValue: IROStrings;
procedure SetEXPERIENCIAValue(const aValue: IROStrings);
public
property FECHA_NACIMIENTO: TDateTime read GetFECHA_NACIMIENTOValue write SetFECHA_NACIMIENTOValue;
property CATEGORIA: String read GetCATEGORIAValue write SetCATEGORIAValue;
property FECHA_ALTA_EMPRESA: TDateTime read GetFECHA_ALTA_EMPRESAValue write SetFECHA_ALTA_EMPRESAValue;
property FORMACION_BASE: IROStrings read GetFORMACION_BASEValue write SetFORMACION_BASEValue;
property FORMACION_COMPLE: IROStrings read GetFORMACION_COMPLEValue write SetFORMACION_COMPLEValue;
property FORMACION_RECIBIDA: IROStrings read GetFORMACION_RECIBIDAValue write SetFORMACION_RECIBIDAValue;
property EXPERIENCIA: IROStrings read GetEXPERIENCIAValue write SetEXPERIENCIAValue;
procedure IniciarValoresContactoNuevo; override;
end;
implementation
uses
uDataTableUtils, Classes, DateUtils, SysUtils, uDataModuleUsuarios;
{ TBizContacto }
constructor TBizContacto.Create(aDataTable: TDADataTable);
begin
inherited;
FCategoriasLink := TDADataSource.Create(NIL);
FCategoriasLink.DataTable := aDataTable;
FDatosBancariosLink := TDADataSource.Create(NIL);
FDatosBancariosLink.DataTable := aDataTable;
FDireccionesLink := TDADataSource.Create(NIL);
FDireccionesLink.DataTable := aDataTable;
FSeleccionableInterface := TSeleccionable.Create(aDataTable);
end;
destructor TBizContacto.Destroy;
begin
FCategorias := NIL;
FCategoriasLink.Free;
FDatosBancarios := NIL;
FDatosBancariosLink.Free;
FDirecciones := NIL;
FDireccionesLink.Free;
FSeleccionableInterface := NIL;
inherited;
end;
function TBizContacto.EsNuevo: Boolean;
begin
Result := (ID < 0);
end;
function TBizContacto.GetCategoria: String;
begin
case ID_CATEGORIA of
1 : Result := 'Cliente';
2 : Result := 'Proveedor';
3 : Result := 'Empleado';
end;
end;
function TBizContacto.GetDatosBancarios: IBizContactosDatosBancarios;
begin
Result := FDatosBancarios;
end;
function TBizContacto.GetDirecciones: IBizDireccionesContacto;
begin
Result := FDirecciones;
end;
procedure TBizContacto.IniciarValoresContactoNuevo;
begin
//
USUARIO := dmUsuarios.LoginInfo.Usuario;
end;
procedure TBizContacto.OnNewRecord(Sender: TDADataTable);
begin
inherited;
ID := GetRecNo; // -1, -2, -3...
IniciarValoresContactoNuevo;
end;
procedure TBizContacto.SetDatosBancarios(AValue: IBizContactosDatosBancarios);
begin
FDatosBancarios := AValue;
EnlazarMaestroDetalle(FDatosBancariosLink, FDatosBancarios);
end;
procedure TBizContacto.SetDirecciones(const Value: IBizDireccionesContacto);
begin
FDirecciones := Value;
EnlazarMaestroDetalle(FDireccionesLink, FDirecciones);
end;
function TBizContacto._GetCategorias: IBizCategoriasContacto;
begin
Result := FCategorias;
end;
procedure TBizContacto._SetCategorias(const Value: IBizCategoriasContacto);
begin
FCategorias := Value;
EnlazarMaestroDetalle(FCategoriasLink, FCategorias);
end;
{ TBizCliente }
constructor TBizCliente.Create(aDataTable: TDADataTable);
begin
inherited;
FDescuentos := NIL;
FDescuentosLink := TDADataSource.Create(NIL);
FDescuentosLink.DataTable := aDataTable;
end;
destructor TBizCliente.Destroy;
begin
FDescuentos := NIL;
FreeAndNIL(FDescuentosLink);
inherited;
end;
function TBizCliente.GetBLOQUEADOValue: Integer;
begin
result := DataTable.Fields[idx_ClientesBLOQUEADO].AsInteger;
end;
function TBizCliente.GetDescuentos: IBizClienteDescuentos;
begin
Result := FDescuentos;
end;
function TBizCliente.GetGRUPO_CLIENTEValue: String;
begin
result := DataTable.Fields[idx_ClientesGRUPO_CLIENTE].AsString;
end;
function TBizCliente.GetID_FORMA_PAGOValue: Integer;
begin
result := DataTable.Fields[idx_ClientesID_FORMA_PAGO].AsInteger;
end;
function TBizCliente.GetID_TIPO_IVAValue: Integer;
begin
result := DataTable.Fields[idx_ClientesID_TIPO_IVA].AsInteger;
end;
function TBizCliente.GetMOTIVO_BLOQUEOValue: String;
begin
result := DataTable.Fields[idx_ClientesMOTIVO_BLOQUEO].AsString;
end;
function TBizCliente.GetNOMBRE_COMERCIALValue: String;
begin
result := DataTable.Fields[idx_ClientesNOMBRE_COMERCIAL].AsString;
end;
procedure TBizCliente.SetBLOQUEADOValue(const aValue: Integer);
begin
DataTable.Fields[idx_ClientesBLOQUEADO].AsInteger := aValue;
end;
procedure TBizCliente.SetDescuentos(Value: IBizClienteDescuentos);
begin
FDescuentos := Value;
EnlazarMaestroDetalle(FDescuentosLink, FDescuentos);
end;
procedure TBizCliente.SetGRUPO_CLIENTEValue(const aValue: String);
begin
DataTable.Fields[idx_ClientesGRUPO_CLIENTE].AsString := aValue;
end;
procedure TBizCliente.SetID_FORMA_PAGOValue(const aValue: Integer);
begin
DataTable.Fields[idx_ClientesID_FORMA_PAGO].AsInteger := aValue;
end;
procedure TBizCliente.SetID_TIPO_IVAValue(const aValue: Integer);
begin
DataTable.Fields[idx_ClientesID_TIPO_IVA].AsInteger := aValue;
end;
procedure TBizCliente.SetMOTIVO_BLOQUEOValue(const aValue: String);
begin
DataTable.Fields[idx_ClientesMOTIVO_BLOQUEO].AsString := aValue;
end;
procedure TBizCliente.SetNOMBRE_COMERCIALValue(const aValue: String);
begin
DataTable.Fields[idx_ClientesNOMBRE_COMERCIAL].AsString := aValue;
end;
function TBizCliente.GetRECARGO_EQUIVALENCIAValue: Integer;
begin
Result := DataTable.Fields[idx_ClientesRECARGO_EQUIVALENCIA].AsInteger;
end;
function TBizCliente.GetREGIMEN_IVAValue: String;
begin
Result := DataTable.Fields[idx_ClientesREGIMEN_IVA].AsString;
end;
function TBizCliente.GetTIENDA_WEBValue: Integer;
begin
result := DataTable.Fields[idx_ClientesTIENDA_WEB].AsInteger;
end;
function TBizCliente.GetVENCIMIENTO_FACTURASValue: Integer;
begin
result := DataTable.Fields[idx_ClientesVENCIMIENTO_FACTURAS].AsInteger;
end;
procedure TBizCliente.SetRECARGO_EQUIVALENCIAValue(const aValue: Integer);
begin
DataTable.Fields[idx_ClientesRECARGO_EQUIVALENCIA].AsInteger := aValue;
end;
procedure TBizCliente.SetREGIMEN_IVAValue(const aValue: String);
begin
DataTable.Fields[idx_ClientesREGIMEN_IVA].AsString := aValue;
end;
procedure TBizCliente.SetTIENDA_WEBValue(const aValue: Integer);
begin
DataTable.Fields[idx_ClientesTIENDA_WEB].AsInteger := aValue;
end;
procedure TBizCliente.SetVENCIMIENTO_FACTURASValue(const aValue: Integer);
begin
DataTable.Fields[idx_ClientesVENCIMIENTO_FACTURAS].AsInteger := aValue;
end;
procedure TBizCliente.IniciarValoresContactoNuevo;
begin
inherited;
ID_CATEGORIA := CATEGORIA_CLIENTE;
VENCIMIENTO_FACTURAS := CLIENTE_DIAS_VENCIMIENTO;
BLOQUEADO := 0;
RECARGO_EQUIVALENCIA := CLIENTE_RECARGO_EQUIVALENCIA;
REGIMEN_IVA := CLIENTE_REGIMEN_IVA;
end;
{ TBizProveedor }
function TBizProveedor.GetGRUPO_PROVEEDORValue: String;
begin
result := DataTable.Fields[idx_ProveedoresGRUPO_PROVEEDOR].AsString;
end;
function TBizProveedor.GetHOMOLOGADOValue: Integer;
begin
result := DataTable.Fields[idx_ProveedoresHOMOLOGADO].AsInteger;
end;
function TBizProveedor.GetID_FORMA_PAGOValue: Integer;
begin
result := DataTable.Fields[idx_ProveedoresID_FORMA_PAGO].AsInteger;
end;
function TBizProveedor.GetID_TIPO_IVAValue: Integer;
begin
result := DataTable.Fields[idx_ProveedoresID_TIPO_IVA].AsInteger;
end;
function TBizProveedor.GetREGIMEN_IVAValue: String;
begin
result := DataTable.Fields[idx_ProveedoresREGIMEN_IVA].AsString;
end;
function TBizProveedor.GetTIENDA_WEBValue: Integer;
begin
result := DataTable.Fields[idx_ProveedoresTIENDA_WEB].AsInteger;
end;
procedure TBizProveedor.IniciarValoresContactoNuevo;
begin
inherited;
ID_CATEGORIA := CATEGORIA_PROVEEDOR;
REGIMEN_IVA := PROVEEDOR_REGIMEN_IVA;
end;
function TBizProveedor.GetCERTIFICACIONValue: String;
begin
result := DataTable.Fields[idx_ProveedoresCERTIFICACION].AsString;
end;
function TBizProveedor.GetCODIGO_ASIGNADOValue: String;
begin
result := DataTable.Fields[idx_ProveedoresCODIGO_ASIGNADO].AsString;
end;
function TBizProveedor.GetDESCRIPCION_PROVEEDORValue: String;
begin
result := DataTable.Fields[idx_ProveedoresDESCRIPCION_PROVEEDOR].AsString;
end;
function TBizProveedor.GetDESCUENTOValue: Float;
begin
result := DataTable.Fields[idx_ProveedoresDESCUENTO].AsFloat;
end;
procedure TBizProveedor.SetCERTIFICACIONValue(const aValue: String);
begin
DataTable.Fields[idx_ProveedoresCERTIFICACION].AsString := aValue;
end;
procedure TBizProveedor.SetCODIGO_ASIGNADOValue(const aValue: String);
begin
DataTable.Fields[idx_ProveedoresCODIGO_ASIGNADO].AsString := aValue;
end;
procedure TBizProveedor.SetDESCRIPCION_PROVEEDORValue(const aValue: String);
begin
DataTable.Fields[idx_ProveedoresDESCRIPCION_PROVEEDOR].AsString := aValue;
end;
procedure TBizProveedor.SetDESCUENTOValue(const aValue: Float);
begin
DataTable.Fields[idx_ProveedoresDESCUENTO].AsFloat := aValue;
end;
procedure TBizProveedor.SetGRUPO_PROVEEDORValue(const aValue: String);
begin
DataTable.Fields[idx_ProveedoresGRUPO_PROVEEDOR].AsString := aValue;
end;
procedure TBizProveedor.SetHOMOLOGADOValue(const aValue: Integer);
begin
DataTable.Fields[idx_ProveedoresHOMOLOGADO].AsInteger := aValue;
end;
procedure TBizProveedor.SetID_FORMA_PAGOValue(const aValue: Integer);
begin
DataTable.Fields[idx_ProveedoresID_FORMA_PAGO].AsInteger := aValue;
end;
procedure TBizProveedor.SetID_TIPO_IVAValue(const aValue: Integer);
begin
DataTable.Fields[idx_ProveedoresID_TIPO_IVA].AsInteger := aValue;
end;
procedure TBizProveedor.SetREGIMEN_IVAValue(const aValue: String);
begin
DataTable.Fields[idx_ProveedoresREGIMEN_IVA].AsString := aValue;
end;
procedure TBizProveedor.SetTIENDA_WEBValue(const aValue: Integer);
begin
DataTable.Fields[idx_ProveedoresTIENDA_WEB].AsInteger := aValue;
end;
{ TBizEmpleado }
function TBizEmpleado.GetCATEGORIAValue: String;
begin
result := DataTable.Fields[idx_EmpleadosCATEGORIA].AsString;
end;
function TBizEmpleado.GetEXPERIENCIAValue: IROStrings;
begin
result := NewROStrings();
result.Text := DataTable.Fields[idx_EmpleadosEXPERIENCIA].AsString;
end;
function TBizEmpleado.GetFECHA_ALTA_EMPRESAValue: TDateTime;
begin
result := DataTable.Fields[idx_EmpleadosFECHA_ALTA_EMPRESA].AsDateTime;
end;
function TBizEmpleado.GetFECHA_NACIMIENTOValue: TDateTime;
begin
result := DataTable.Fields[idx_EmpleadosFECHA_NACIMIENTO].AsDateTime;
end;
function TBizEmpleado.GetFORMACION_BASEValue: IROStrings;
begin
result := NewROStrings();
result.Text := DataTable.Fields[idx_EmpleadosFORMACION_BASE].AsString;
end;
function TBizEmpleado.GetFORMACION_COMPLEValue: IROStrings;
begin
result := NewROStrings();
result.Text := DataTable.Fields[idx_EmpleadosFORMACION_COMPLE].AsString;
end;
function TBizEmpleado.GetFORMACION_RECIBIDAValue: IROStrings;
begin
result := NewROStrings();
result.Text := DataTable.Fields[idx_EmpleadosFORMACION_RECIBIDA].AsString;
end;
procedure TBizEmpleado.IniciarValoresContactoNuevo;
begin
inherited;
ID_CATEGORIA := CATEGORIA_EMPLEADO;
end;
procedure TBizEmpleado.SetCATEGORIAValue(const aValue: String);
begin
DataTable.Fields[idx_EmpleadosCATEGORIA].AsString := aValue;
end;
procedure TBizEmpleado.SetEXPERIENCIAValue(const aValue: IROStrings);
begin
DataTable.Fields[idx_EmpleadosEXPERIENCIA].AsString := aValue.Text;
end;
procedure TBizEmpleado.SetFECHA_ALTA_EMPRESAValue(const aValue: TDateTime);
begin
DataTable.Fields[idx_EmpleadosFECHA_ALTA_EMPRESA].AsDateTime := aValue;
end;
procedure TBizEmpleado.SetFECHA_NACIMIENTOValue(const aValue: TDateTime);
begin
DataTable.Fields[idx_EmpleadosFECHA_NACIMIENTO].AsDateTime := aValue;
end;
procedure TBizEmpleado.SetFORMACION_BASEValue(const aValue: IROStrings);
begin
DataTable.Fields[idx_EmpleadosFORMACION_BASE].AsString := aValue.Text;
end;
procedure TBizEmpleado.SetFORMACION_COMPLEValue(const aValue: IROStrings);
begin
DataTable.Fields[idx_EmpleadosFORMACION_COMPLE].AsString := aValue.Text;
end;
procedure TBizEmpleado.SetFORMACION_RECIBIDAValue(const aValue: IROStrings);
begin
DataTable.Fields[idx_EmpleadosFORMACION_RECIBIDA].AsString := aValue.Text;
end;
initialization
RegisterDataTableRules(BIZ_CLIENT_CONTACTO, TBizContacto);
RegisterDataTableRules(BIZ_CLIENT_CLIENTE, TBizCliente);
RegisterDataTableRules(BIZ_CLIENT_PROVEEDOR, TBizProveedor);
RegisterDataTableRules(BIZ_CLIENT_EMPLEADO, TBizEmpleado);
finalization
end.