unit uBizContactos; interface uses uDAInterfaces, uDADataTable, uROClasses, uBizContactosPersonal, schContactosClient_Intf, uBizContactosDatosBancarios, uBizSubCuentasContacto, uDBSelectionListUtils, uBizDireccionesContacto, uBizClientesDescuentos; const BIZ_CLIENT_CONTACTO = 'Client.Contacto'; BIZ_CLIENT_CLIENTE = 'Client.Cliente'; BIZ_CLIENT_PROVEEDOR = 'Client.Proveedor'; BIZ_CLIENT_VENDEDOR = 'Client.Vendedor'; BIZ_CLIENT_INSTALADOR = 'Client.Instalador'; BIZ_CLIENT_COMERCIAL = 'Client.Comercial'; CATEGORIA_CLIENTE = 1; CATEGORIA_PROVEEDOR = 2; CATEGORIA_VENDEDOR = 3; CATEGORIA_INSTALADOR = 4; CATEGORIA_COMERCIAL = 5; CTE_CLIENTE_GRADEN_PARA_FABRICA = 2000000005; CTE_PROVEEDOR_ABETO_PARA_GRADEN = 29; CTE_TIPO_FACTURA_PROV_ABETO = 54; type IBizContacto = interface (IContactos) ['{CD585680-26B6-47A4-B684-89C468670F4A}'] procedure SetDatosBancarios(AValue : IBizContactosDatosBancarios); function GetDatosBancarios : IBizContactosDatosBancarios; property DatosBancarios : IBizContactosDatosBancarios read GetDatosBancarios write SetDatosBancarios; procedure SetPersonal(AValue : IBizContactoPersonal); function GetPersonal : IBizContactoPersonal; property Personal : IBizContactoPersonal read GetPersonal write SetPersonal; function GetCategoria : String; property Categoria : String read GetCategoria; 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 GetDESCUENTOValue: Float; procedure SetDESCUENTOValue(const aValue: Float); function GetPRECIO_PUNTOValue: Currency; procedure SetPRECIO_PUNTOValue(const aValue: Currency); function GetID_AGENTEValue: Integer; procedure SetID_AGENTEValue(const aValue: Integer); function GetDESCUENTO_LINEAValue: Float; procedure SetDESCUENTO_LINEAValue(const aValue: Float); function GetDESCUENTO_CAPITULOValue: Float; procedure SetDESCUENTO_CAPITULOValue(const aValue: Float); function GetGRUPO_CLIENTEValue: String; procedure SetGRUPO_CLIENTEValue(const aValue: String); function GetPROCEDENCIA_CLIENTEValue: String; procedure SetPROCEDENCIA_CLIENTEValue(const aValue: String); function GetNOMBRE_COMERCIALValue: String; procedure SetNOMBRE_COMERCIALValue(const aValue: String); function GetVENCIMIENTO_FACTURAS_1Value: Integer; procedure SetVENCIMIENTO_FACTURAS_1Value(const aValue: Integer); function GetVENCIMIENTO_FACTURAS_2Value: Integer; procedure SetVENCIMIENTO_FACTURAS_2Value(const aValue: Integer); function GetVENCIMIENTO_FACTURAS_3Value: Integer; procedure SetVENCIMIENTO_FACTURAS_3Value(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); function GetAGENTEValue: String; procedure SetAGENTEValue(const aValue: String); function GetDELEGACIONValue: String; procedure SetDELEGACIONValue(const aValue: String); function GetPAISValue: String; procedure SetPAISValue(const aValue: String); function GetDIST_EMAILValue: String; procedure SetDIST_EMAILValue(const aValue: String); function GetDIST_PASSWORDValue: String; procedure SetDIST_PASSWORDValue(const aValue: String); function GetDIST_VALIDEZValue: String; procedure SetDIST_VALIDEZValue(const Value: String); function GetDIST_FORMA_PAGOValue: String; procedure SetDIST_FORMA_PAGOValue(const aValue: String); function GetDIST_LOPDValue: String; procedure SetDIST_LOPDValue(const aValue: String); function GetDIST_NOTASValue: String; procedure SetDIST_NOTASValue(const aValue: String); function GetDIST_CONDICIONESValue: String; procedure SetDIST_CONDICIONESValue(const aValue: String); property Descuentos: IBizClienteDescuentos read GetDescuentos write SetDescuentos; property GRUPO_CLIENTE: String read GetGRUPO_CLIENTEValue write SetGRUPO_CLIENTEValue; property PROCEDENCIA_CLIENTE: String read GetPROCEDENCIA_CLIENTEValue write SetPROCEDENCIA_CLIENTEValue; property NOMBRE_COMERCIAL: String read GetNOMBRE_COMERCIALValue write SetNOMBRE_COMERCIALValue; property VENCIMIENTO_FACTURAS_1: Integer read GetVENCIMIENTO_FACTURAS_1Value write SetVENCIMIENTO_FACTURAS_1Value; property VENCIMIENTO_FACTURAS_2: Integer read GetVENCIMIENTO_FACTURAS_2Value write SetVENCIMIENTO_FACTURAS_2Value; property VENCIMIENTO_FACTURAS_3: Integer read GetVENCIMIENTO_FACTURAS_3Value write SetVENCIMIENTO_FACTURAS_3Value; 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; property DESCUENTO: Float read GetDESCUENTOValue write SetDESCUENTOValue; 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 ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue; property AGENTE: String read GetAGENTEValue write SetAGENTEValue; property DELEGACION: String read GetDELEGACIONValue write SetDELEGACIONValue; property PAIS: String read GetPAISValue write SetPAISValue; property DIST_EMAIL: String read GetDIST_EMAILValue write SetDIST_EMAILValue; property DIST_PASSWORD: String read GetDIST_PASSWORDValue write SetDIST_PASSWORDValue; property DIST_VALIDEZ: String read GetDIST_VALIDEZValue write SetDIST_VALIDEZValue; property DIST_FORMA_PAGO: String read GetDIST_FORMA_PAGOValue write SetDIST_FORMA_PAGOValue; property DIST_NOTAS: String read GetDIST_NOTASValue write SetDIST_NOTASValue; property DIST_LOPD: String read GetDIST_LOPDValue write SetDIST_LOPDValue; property DIST_CONDICIONES: String read GetDIST_CONDICIONESValue write SetDIST_CONDICIONESValue; function GetSubCuentas: IBizSubCuentasContacto; procedure SetSubCuentas(const Value: IBizSubCuentasContacto); property SubCuentas : IBizSubCuentasContacto read GetSubCuentas write SetSubCuentas; function GetIgnorar_Contabilidad: Integer; procedure SetIgnorar_Contabilidad(const Value: Integer); property IGNORAR_CONTABILIDAD: Integer read GetIgnorar_Contabilidad write SetIgnorar_Contabilidad; function GetTiene_Subcuenta: Integer; procedure SetTiene_Subcuenta(const Value: Integer); property TIENE_SUBCUENTA: Integer read GetTiene_SubCuenta write SetTiene_Subcuenta; 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 GetNOMBRE_COMERCIALValue: String; procedure SetNOMBRE_COMERCIALValue(const aValue: String); function GetVENCIMIENTO_FACTURAS_1Value: Integer; procedure SetVENCIMIENTO_FACTURAS_1Value(const aValue: Integer); function GetVENCIMIENTO_FACTURAS_2Value: Integer; procedure SetVENCIMIENTO_FACTURAS_2Value(const aValue: Integer); function GetVENCIMIENTO_FACTURAS_3Value: Integer; procedure SetVENCIMIENTO_FACTURAS_3Value(const aValue: Integer); 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; property NOMBRE_COMERCIAL: String read GetNOMBRE_COMERCIALValue write SetNOMBRE_COMERCIALValue; property VENCIMIENTO_FACTURAS_1: Integer read GetVENCIMIENTO_FACTURAS_1Value write SetVENCIMIENTO_FACTURAS_1Value; property VENCIMIENTO_FACTURAS_2: Integer read GetVENCIMIENTO_FACTURAS_2Value write SetVENCIMIENTO_FACTURAS_2Value; property VENCIMIENTO_FACTURAS_3: Integer read GetVENCIMIENTO_FACTURAS_3Value write SetVENCIMIENTO_FACTURAS_3Value; function GetSubCuentas: IBizSubCuentasContacto; procedure SetSubCuentas(const Value: IBizSubCuentasContacto); property SubCuentas : IBizSubCuentasContacto read GetSubCuentas write SetSubCuentas; function GetIgnorar_Contabilidad: Integer; procedure SetIgnorar_Contabilidad(const Value: Integer); property IGNORAR_CONTABILIDAD: Integer read GetIgnorar_Contabilidad write SetIgnorar_Contabilidad; function GetTiene_Subcuenta: Integer; procedure SetTiene_Subcuenta(const Value: Integer); property TIENE_SUBCUENTA: Integer read GetTiene_SubCuenta write SetTiene_Subcuenta; function GetEs_Acreedor: Integer; procedure SetEs_Acreedor(const Value: Integer); property ES_ACREEDOR: Integer read GetEs_Acreedor write SetEs_Acreedor; end; IBizVendedor = interface (IBizContacto) ['{CA24021E-A227-47F9-815F-A8565DB0F748}'] function GetCOMISIONValue: Float; procedure SetCOMISIONValue(const aValue: Float); function GetID_USUARIOValue: Integer; procedure SetID_USUARIOValue(const aValue: Integer); property COMISION: Float read GetCOMISIONValue write SetCOMISIONValue; property ID_USUARIO: Integer read GetID_USUARIOValue write SetID_USUARIOValue; end; IBizInstalador = interface (IBizContacto) ['{D9F3652F-BB47-4B3C-A951-1966ED79236F}'] end; IBizComercial = interface (IBizContacto) ['{97496872-5FB3-43A1-85A5-9F29867A2E6A}'] function GetDELEGACIONValue: String; procedure SetDELEGACIONValue(const aValue: String); function GetCOMISIONValue: Float; procedure SetCOMISIONValue(const aValue: Float); property COMISION: Float read GetCOMISIONValue write SetCOMISIONValue; property DELEGACION: String read GetDELEGACIONValue write SetDELEGACIONValue; end; TBizContacto = class(TContactosDataTableRules, IBizContacto, ISeleccionable) protected FDatosBancarios : IBizContactosDatosBancarios; FDatosBancariosLink : TDADataSource; FDirecciones : IBizDireccionesContacto; FDireccionesLink : TDADataSource; FPersonal : IBizContactoPersonal; FPersonalLink : TDADataSource; FSeleccionableInterface : ISeleccionable; procedure SetDatosBancarios(AValue : IBizContactosDatosBancarios); function GetDatosBancarios : IBizContactosDatosBancarios; function GetDirecciones: IBizDireccionesContacto; procedure SetDirecciones(const Value: IBizDireccionesContacto); function GetCategoria : String; procedure SetPersonal(AValue : IBizContactoPersonal); function GetPersonal : IBizContactoPersonal; 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 Personal : IBizContactoPersonal read GetPersonal write SetPersonal; 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 FSubCuentas: IBizSubCuentasContacto; FSubCuentasLink : TDADataSource; FDescuentos : IBizClienteDescuentos; FDescuentosLink : TDADataSource; function GetDESCUENTOValue: Float; procedure SetDESCUENTOValue(const aValue: Float); function GetPRECIO_PUNTOValue: Currency; procedure SetPRECIO_PUNTOValue(const aValue: Currency); function GetID_AGENTEValue: Integer; procedure SetID_AGENTEValue(const aValue: Integer); function GetDESCUENTO_LINEAValue: Float; procedure SetDESCUENTO_LINEAValue(const aValue: Float); function GetDESCUENTO_CAPITULOValue: Float; procedure SetDESCUENTO_CAPITULOValue(const aValue: Float); function GetGRUPO_CLIENTEValue: String; procedure SetGRUPO_CLIENTEValue(const aValue: String); function GetPROCEDENCIA_CLIENTEValue: String; procedure SetPROCEDENCIA_CLIENTEValue(const aValue: String); function GetNOMBRE_COMERCIALValue: String; procedure SetNOMBRE_COMERCIALValue(const aValue: String); function GetVENCIMIENTO_FACTURAS_1Value: Integer; procedure SetVENCIMIENTO_FACTURAS_1Value(const aValue: Integer); function GetVENCIMIENTO_FACTURAS_2Value: Integer; procedure SetVENCIMIENTO_FACTURAS_2Value(const aValue: Integer); function GetVENCIMIENTO_FACTURAS_3Value: Integer; procedure SetVENCIMIENTO_FACTURAS_3Value(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); function GetIgnorar_Contabilidad: Integer; procedure SetIgnorar_Contabilidad(const Value: Integer); function GetTiene_Subcuenta: Integer; procedure SetTiene_Subcuenta(const Value: Integer); function GetSubCuentas: IBizSubCuentasContacto; procedure SetSubCuentas(const Value: IBizSubCuentasContacto); function GetAGENTEValue: String; procedure SetAGENTEValue(const aValue: String); function GetDELEGACIONValue: String; procedure SetDELEGACIONValue(const aValue: String); function GetDIST_EMAILValue: String; procedure SetDIST_EMAILValue(const aValue: String); function GetDIST_PASSWORDValue: String; procedure SetDIST_PASSWORDValue(const aValue: String); function GetDIST_VALIDEZValue: String; procedure SetDIST_VALIDEZValue(const aValue: String); function GetDIST_FORMA_PAGOValue: String; procedure SetDIST_FORMA_PAGOValue(const aValue: String); function GetDIST_LOPDValue: String; procedure SetDIST_LOPDValue(const aValue: String); function GetDIST_NOTASValue: String; procedure SetDIST_NOTASValue(const aValue: String); function GetDIST_CONDICIONESValue: String; procedure SetDIST_CONDICIONESValue(const aValue: String); 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 PROCEDENCIA_CLIENTE: String read GetPROCEDENCIA_CLIENTEValue write SetPROCEDENCIA_CLIENTEValue; property NOMBRE_COMERCIAL: String read GetNOMBRE_COMERCIALValue write SetNOMBRE_COMERCIALValue; property VENCIMIENTO_FACTURAS_1: Integer read GetVENCIMIENTO_FACTURAS_1Value write SetVENCIMIENTO_FACTURAS_1Value; property VENCIMIENTO_FACTURAS_2: Integer read GetVENCIMIENTO_FACTURAS_2Value write SetVENCIMIENTO_FACTURAS_2Value; property VENCIMIENTO_FACTURAS_3: Integer read GetVENCIMIENTO_FACTURAS_3Value write SetVENCIMIENTO_FACTURAS_3Value; 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; property SubCuentas : IBizSubCuentasContacto read GetSubCuentas write SetSubCuentas; property IGNORAR_CONTABILIDAD: Integer read GetIgnorar_Contabilidad write SetIgnorar_Contabilidad; property TIENE_SUBCUENTA: Integer read GetTiene_SubCuenta write SetTiene_Subcuenta; property DESCUENTO: Float read GetDESCUENTOValue write SetDESCUENTOValue; 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 ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue; property AGENTE: String read GetAGENTEValue write SetAGENTEValue; property DELEGACION: String read GetDELEGACIONValue write SetDELEGACIONValue; property DIST_EMAIL: String read GetDIST_EMAILValue write SetDIST_EMAILValue; property DIST_PASSWORD: String read GetDIST_PASSWORDValue write SetDIST_PASSWORDValue; property DIST_VALIDEZ: String read GetDIST_VALIDEZValue write SetDIST_VALIDEZValue; property DIST_FORMA_PAGO: String read GetDIST_FORMA_PAGOValue write SetDIST_FORMA_PAGOValue; property DIST_NOTAS: String read GetDIST_NOTASValue write SetDIST_NOTASValue; property DIST_LOPD: String read GetDIST_LOPDValue write SetDIST_LOPDValue; property DIST_CONDICIONES: String read GetDIST_CONDICIONESValue write SetDIST_CONDICIONESValue; end; TBizProveedor = class(TBizContacto, IBizProveedor) protected FSubCuentas: IBizSubCuentasContacto; FSubCuentasLink : TDADataSource; 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 GetNOMBRE_COMERCIALValue: String; procedure SetNOMBRE_COMERCIALValue(const aValue: String); function GetREGIMEN_IVAValue: String; procedure SetREGIMEN_IVAValue(const aValue: String); function GetVENCIMIENTO_FACTURAS_1Value: Integer; procedure SetVENCIMIENTO_FACTURAS_1Value(const aValue: Integer); function GetVENCIMIENTO_FACTURAS_2Value: Integer; procedure SetVENCIMIENTO_FACTURAS_2Value(const aValue: Integer); function GetVENCIMIENTO_FACTURAS_3Value: Integer; procedure SetVENCIMIENTO_FACTURAS_3Value(const aValue: Integer); 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); function GetIgnorar_Contabilidad: Integer; procedure SetIgnorar_Contabilidad(const Value: Integer); function GetTiene_Subcuenta: Integer; procedure SetTiene_Subcuenta(const Value: Integer); function GetEs_Acreedor: Integer; procedure SetEs_Acreedor(const Value: Integer); function GetSubCuentas: IBizSubCuentasContacto; procedure SetSubCuentas(const Value: IBizSubCuentasContacto); public procedure IniciarValoresContactoNuevo; override; constructor Create(aDataTable: TDADataTable); override; destructor Destroy; 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 VENCIMIENTO_FACTURAS_1: Integer read GetVENCIMIENTO_FACTURAS_1Value write SetVENCIMIENTO_FACTURAS_1Value; property VENCIMIENTO_FACTURAS_2: Integer read GetVENCIMIENTO_FACTURAS_2Value write SetVENCIMIENTO_FACTURAS_2Value; property VENCIMIENTO_FACTURAS_3: Integer read GetVENCIMIENTO_FACTURAS_3Value write SetVENCIMIENTO_FACTURAS_3Value; 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; property SubCuentas : IBizSubCuentasContacto read GetSubCuentas write SetSubCuentas; property IGNORAR_CONTABILIDAD: Integer read GetIgnorar_Contabilidad write SetIgnorar_Contabilidad; property TIENE_SUBCUENTA: Integer read GetTiene_SubCuenta write SetTiene_Subcuenta; property ES_ACREEDOR: Integer read GetEs_Acreedor write SetEs_Acreedor; property NOMBRE_COMERCIAL: String read GetNOMBRE_COMERCIALValue write SetNOMBRE_COMERCIALValue; end; TBizVendedor = class(TBizContacto, IBizVendedor) protected function GetCOMISIONValue: Float; procedure SetCOMISIONValue(const aValue: Float); function GetID_USUARIOValue: Integer; procedure SetID_USUARIOValue(const aValue: Integer); public property COMISION: Float read GetCOMISIONValue write SetCOMISIONValue; property ID_USUARIO: Integer read GetID_USUARIOValue write SetID_USUARIOValue; procedure IniciarValoresContactoNuevo; override; end; TBizInstalador = class(TBizContacto, IBizInstalador) public procedure IniciarValoresContactoNuevo; override; end; TBizComercial = class(TBizContacto, IBizComercial) private function GetDELEGACIONValue: String; procedure SetDELEGACIONValue(const aValue: String); protected function GetCOMISIONValue: Float; procedure SetCOMISIONValue(const aValue: Float); published public property COMISION: Float read GetCOMISIONValue write SetCOMISIONValue; property DELEGACION: String read GetDELEGACIONValue write SetDELEGACIONValue; procedure IniciarValoresContactoNuevo; override; end; implementation {$INCLUDE ..\..\..\FactuGES.inc} uses uNumUtils, uDataTableUtils, Classes, DateUtils, SysUtils, uFactuGES_App, uConfiguracionController, uBizEmpresasTiendas, uBizTiposIVA, uBizFormasPago, uTypesConstConfiguration, UBizIdiomas; const PROVEEDOR_REGIMEN_IVA = 'General'; CLIENTE_REGIMEN_IVA = 'General'; CLIENTE_DIAS_VENCIMIENTO = 15; CLIENTE_RECARGO_EQUIVALENCIA = 0; { TBizContacto } constructor TBizContacto.Create(aDataTable: TDADataTable); begin inherited; FDatosBancariosLink := TDADataSource.Create(NIL); FDatosBancariosLink.DataTable := aDataTable; FDireccionesLink := TDADataSource.Create(NIL); FDireccionesLink.DataTable := aDataTable; FPersonalLink := TDADataSource.Create(NIL); FPersonalLink.DataTable := aDataTable; FSeleccionableInterface := TSeleccionable.Create(aDataTable); end; destructor TBizContacto.Destroy; begin FDatosBancarios := NIL; FDatosBancariosLink.Free; FDirecciones := NIL; FDireccionesLink.Free; FPersonal := NIL; FPersonalLink.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 := 'Vendedor'; 4 : Result := 'Instalador'; 5 : Result := 'Comercial'; end; end; function TBizContacto.GetDatosBancarios: IBizContactosDatosBancarios; begin Result := FDatosBancarios; end; function TBizContacto.GetDirecciones: IBizDireccionesContacto; begin Result := FDirecciones; end; function TBizContacto.GetPersonal: IBizContactoPersonal; begin Result := FPersonal; end; procedure TBizContacto.IniciarValoresContactoNuevo; begin USUARIO := AppFactuGES.UsuarioActivo.UserName; ID_TIENDA := AppFactuGES.TiendaActiva.ID; TIENDA := AppFactuGES.TiendaActiva.NOMBRE; PAIS := PAIS_DEFAULT; IDIOMA_ISO := IDIOMA_DEFAULT; end; procedure TBizContacto.OnNewRecord(Sender: TDADataTable); begin inherited; 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; procedure TBizContacto.SetPersonal(AValue: IBizContactoPersonal); begin FPersonal := AValue; EnlazarMaestroDetalle(FPersonalLink, FPersonal); end; { TBizCliente } constructor TBizCliente.Create(aDataTable: TDADataTable); begin inherited; FDescuentos := NIL; FDescuentosLink := TDADataSource.Create(NIL); FDescuentosLink.DataTable := aDataTable; FSubCuentas := NIL; FSubCuentasLink := TDADataSource.Create(NIL); FSubCuentasLink.DataTable := aDataTable; end; destructor TBizCliente.Destroy; begin FDescuentos := NIL; FreeAndNIL(FDescuentosLink); FSubCuentas := NIL; FreeAndNIL(FSubCuentasLink); inherited; end; function TBizCliente.GetAGENTEValue: String; begin Result := DataTable.Fields[idx_ClientesAGENTE].AsString; end; function TBizCliente.GetBLOQUEADOValue: Integer; begin result := DataTable.Fields[idx_ClientesBLOQUEADO].AsInteger; end; function TBizCliente.GetDELEGACIONValue: String; begin Result := DataTable.Fields[idx_ClientesDELEGACION].AsString; end; function TBizCliente.GetDescuentos: IBizClienteDescuentos; begin Result := FDescuentos; end; function TBizCliente.GetDESCUENTOValue: Float; begin result := DataTable.Fields[idx_ClientesDESCUENTO].AsFloat; end; function TBizCliente.GetDESCUENTO_LINEAValue: Float; begin result := DataTable.Fields[idx_ClientesDESCUENTO_LINEA].AsFloat; end; function TBizCliente.GetDIST_CONDICIONESValue: String; begin Result := DataTable.Fields[idx_ClientesDIST_CONDICIONES].AsString; end; function TBizCliente.GetDIST_EMAILValue: String; begin Result := DataTable.Fields[idx_ClientesDIST_EMAIL].AsString; end; function TBizCliente.GetDIST_FORMA_PAGOValue: String; begin Result := DataTable.Fields[idx_ClientesDIST_FORMA_PAGO].AsString; end; function TBizCliente.GetDIST_LOPDValue: String; begin Result := DataTable.Fields[idx_ClientesDIST_LOPD].AsString; end; function TBizCliente.GetDIST_NOTASValue: String; begin Result := DataTable.Fields[idx_ClientesDIST_NOTAS].AsString; end; function TBizCliente.GetDIST_PASSWORDValue: String; begin Result := DataTable.Fields[idx_ClientesDIST_PASSWORD].AsString; end; function TBizCliente.GetDIST_VALIDEZValue: String; begin Result := DataTable.Fields[idx_ClientesDIST_VALIDEZ].AsString; end; function TBizCliente.GetDESCUENTO_CAPITULOValue: Float; begin result := DataTable.Fields[idx_ClientesDESCUENTO_CAPITULO].AsFloat; end; function TBizCliente.GetGRUPO_CLIENTEValue: String; begin result := DataTable.Fields[idx_ClientesGRUPO_CLIENTE].AsString; end; function TBizCliente.GetID_AGENTEValue: Integer; begin result := DataTable.Fields[idx_ClientesID_AGENTE].AsInteger; 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.GetIgnorar_Contabilidad: Integer; begin result := DataTable.Fields[idx_ClientesIGNORAR_CONTABILIDAD].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; function TBizCliente.GetPRECIO_PUNTOValue: Currency; begin result := DataTable.Fields[idx_ClientesPRECIO_PUNTO].AsCurrency; end; function TBizCliente.GetPROCEDENCIA_CLIENTEValue: String; begin result := DataTable.Fields[idx_ClientesPROCEDENCIA_CLIENTE].AsString; end; procedure TBizCliente.SetAGENTEValue(const aValue: String); begin DataTable.Fields[idx_ClientesAGENTE].AsString := aValue; end; procedure TBizCliente.SetBLOQUEADOValue(const aValue: Integer); begin DataTable.Fields[idx_ClientesBLOQUEADO].AsInteger := aValue; end; procedure TBizCliente.SetDELEGACIONValue(const aValue: String); begin DataTable.Fields[idx_ClientesDELEGACION].AsString := aValue; end; procedure TBizCliente.SetDescuentos(Value: IBizClienteDescuentos); begin FDescuentos := Value; EnlazarMaestroDetalle(FDescuentosLink, FDescuentos); end; procedure TBizCliente.SetDESCUENTOValue(const aValue: Float); begin DataTable.Fields[idx_ClientesDESCUENTO].AsFloat := aValue; end; procedure TBizCliente.SetDESCUENTO_LINEAValue(const aValue: Float); begin DataTable.Fields[idx_ClientesDESCUENTO_LINEA].AsFloat := aValue; end; procedure TBizCliente.SetDIST_CONDICIONESValue(const aValue: String); begin DataTable.Fields[idx_ClientesDIST_CONDICIONES].AsString := aValue; end; procedure TBizCliente.SetDIST_EMAILValue(const aValue: String); begin DataTable.Fields[idx_ClientesDIST_EMAIL].AsString := aValue; end; procedure TBizCliente.SetDIST_FORMA_PAGOValue(const aValue: String); begin DataTable.Fields[idx_ClientesDIST_FORMA_PAGO].AsString := aValue; end; procedure TBizCliente.SetDIST_LOPDValue(const aValue: String); begin DataTable.Fields[idx_ClientesDIST_LOPD].AsString := aValue; end; procedure TBizCliente.SetDIST_NOTASValue(const aValue: String); begin DataTable.Fields[idx_ClientesDIST_NOTAS].AsString := aValue; end; procedure TBizCliente.SetDIST_PASSWORDValue(const aValue: String); begin DataTable.Fields[idx_ClientesDIST_PASSWORD].AsString := aValue; end; procedure TBizCliente.SetDIST_VALIDEZValue(const aValue: String); begin DataTable.Fields[idx_ClientesDIST_VALIDEZ].AsString := aValue; end; procedure TBizCliente.SetDESCUENTO_CAPITULOValue(const aValue: Float); begin DataTable.Fields[idx_ClientesDESCUENTO_CAPITULO].AsFloat := aValue; end; procedure TBizCliente.SetGRUPO_CLIENTEValue(const aValue: String); begin DataTable.Fields[idx_ClientesGRUPO_CLIENTE].AsString := aValue; end; procedure TBizCliente.SetID_AGENTEValue(const aValue: Integer); begin DataTable.Fields[idx_ClientesID_AGENTE].AsInteger := 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.SetIgnorar_Contabilidad(const Value: Integer); begin DataTable.Fields[idx_ClientesIGNORAR_CONTABILIDAD].AsInteger := Value; 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; procedure TBizCliente.SetPRECIO_PUNTOValue(const aValue: Currency); begin DataTable.Fields[idx_ClientesPRECIO_PUNTO].AsCurrency := aValue; end; procedure TBizCliente.SetPROCEDENCIA_CLIENTEValue(const aValue: String); begin DataTable.Fields[idx_ClientesPROCEDENCIA_CLIENTE].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.GetSubCuentas: IBizSubCuentasContacto; begin Result := FSubCuentas; end; function TBizCliente.GetTIENDA_WEBValue: Integer; begin result := DataTable.Fields[idx_ClientesTIENDA_WEB].AsInteger; end; function TBizCliente.GetTiene_Subcuenta: Integer; begin result := DataTable.Fields[idx_ClientesTIENE_SUBCUENTA].AsInteger; end; function TBizCliente.GetVENCIMIENTO_FACTURAS_1Value: Integer; begin result := DataTable.Fields[idx_ClientesVENCIMIENTO_FACTURAS_1].AsInteger; end; function TBizCliente.GetVENCIMIENTO_FACTURAS_2Value: Integer; begin result := DataTable.Fields[idx_ClientesVENCIMIENTO_FACTURAS_2].AsInteger; end; function TBizCliente.GetVENCIMIENTO_FACTURAS_3Value: Integer; begin result := DataTable.Fields[idx_ClientesVENCIMIENTO_FACTURAS_3].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.SetSubCuentas(const Value: IBizSubCuentasContacto); begin FSubCuentas := Value; EnlazarMaestroDetalle(FSubCuentasLink, FSubCuentas); end; procedure TBizCliente.SetTIENDA_WEBValue(const aValue: Integer); begin DataTable.Fields[idx_ClientesTIENDA_WEB].AsInteger := aValue; end; procedure TBizCliente.SetTiene_Subcuenta(const Value: Integer); begin DataTable.Fields[idx_ClientesTIENE_SUBCUENTA].AsInteger := Value; end; procedure TBizCliente.SetVENCIMIENTO_FACTURAS_1Value(const aValue: Integer); begin DataTable.Fields[idx_ClientesVENCIMIENTO_FACTURAS_1].AsInteger := aValue; end; procedure TBizCliente.SetVENCIMIENTO_FACTURAS_2Value(const aValue: Integer); begin DataTable.Fields[idx_ClientesVENCIMIENTO_FACTURAS_2].AsInteger := aValue; end; procedure TBizCliente.SetVENCIMIENTO_FACTURAS_3Value(const aValue: Integer); begin DataTable.Fields[idx_ClientesVENCIMIENTO_FACTURAS_3].AsInteger := aValue; end; procedure TBizCliente.IniciarValoresContactoNuevo; begin inherited; ID_CATEGORIA := CATEGORIA_CLIENTE; BLOQUEADO := 0; RECARGO_EQUIVALENCIA := CLIENTE_RECARGO_EQUIVALENCIA; REGIMEN_IVA := AppFactuGES.Configuracion.GetSettingAsString(teXML, 'Clientes.RegimenIVA', CLIENTE_REGIMEN_IVA); //CONTABILIDAD // if Assigned(AppFactuGES.EjercicioActivo) then // IGNORAR_CONTABILIDAD := 0 // else IGNORAR_CONTABILIDAD := 1; TIENE_SUBCUENTA := 0; ID_FORMA_PAGO := AppFactuGES.EmpresaActiva.ID_FORMA_PAGO; ID_TIPO_IVA := AppFactuGES.EmpresaActiva.ID_TIPO_IVA; 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; { 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.GetIgnorar_Contabilidad: Integer; begin result := DataTable.Fields[idx_ProveedoresIGNORAR_CONTABILIDAD].AsInteger; end; function TBizProveedor.GetNOMBRE_COMERCIALValue: String; begin result := DataTable.Fields[idx_ProveedoresNOMBRE_COMERCIAL].AsString; end; function TBizProveedor.GetREGIMEN_IVAValue: String; begin result := DataTable.Fields[idx_ProveedoresREGIMEN_IVA].AsString; end; function TBizProveedor.GetSubCuentas: IBizSubCuentasContacto; begin Result := FSubCuentas; end; function TBizProveedor.GetTIENDA_WEBValue: Integer; begin result := DataTable.Fields[idx_ProveedoresTIENDA_WEB].AsInteger; end; function TBizProveedor.GetTiene_Subcuenta: Integer; begin result := DataTable.Fields[idx_ProveedoresTIENE_SUBCUENTA].AsInteger; end; function TBizProveedor.GetVENCIMIENTO_FACTURAS_1Value: Integer; begin result := DataTable.Fields[idx_ProveedoresVENCIMIENTO_FACTURAS_1].AsInteger; end; function TBizProveedor.GetVENCIMIENTO_FACTURAS_2Value: Integer; begin result := DataTable.Fields[idx_ProveedoresVENCIMIENTO_FACTURAS_2].AsInteger; end; function TBizProveedor.GetVENCIMIENTO_FACTURAS_3Value: Integer; begin result := DataTable.Fields[idx_ProveedoresVENCIMIENTO_FACTURAS_3].AsInteger; end; procedure TBizProveedor.IniciarValoresContactoNuevo; begin inherited; ID_CATEGORIA := CATEGORIA_PROVEEDOR; REGIMEN_IVA := AppFactuGES.Configuracion.GetSettingAsString(teXML, 'Proveedores.RegimenIVA', PROVEEDOR_REGIMEN_IVA); //CONTABILIDAD // if Assigned(AppFactuGES.EjercicioActivo) then // IGNORAR_CONTABILIDAD := 0 // else IGNORAR_CONTABILIDAD := 1; TIENE_SUBCUENTA := 0; ES_ACREEDOR := 0; ID_FORMA_PAGO := AppFactuGES.EmpresaActiva.ID_FORMA_PAGO; ID_TIPO_IVA := AppFactuGES.EmpresaActiva.ID_TIPO_IVA; end; constructor TBizProveedor.Create(aDataTable: TDADataTable); begin inherited; FSubCuentas := NIL; FSubCuentasLink := TDADataSource.Create(NIL); FSubCuentasLink.DataTable := aDataTable; end; destructor TBizProveedor.Destroy; begin FSubCuentas := NIL; FreeAndNIL(FSubCuentasLink); inherited; 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; function TBizProveedor.GetEs_Acreedor: Integer; begin result := DataTable.Fields[idx_ProveedoresES_ACREEDOR].AsInteger; 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.SetEs_Acreedor(const Value: Integer); begin DataTable.Fields[idx_ProveedoresES_ACREEDOR].AsInteger := Value; 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.SetIgnorar_Contabilidad(const Value: Integer); begin DataTable.Fields[idx_ProveedoresIGNORAR_CONTABILIDAD].AsInteger := Value; end; procedure TBizProveedor.SetNOMBRE_COMERCIALValue(const aValue: String); begin DataTable.Fields[idx_ProveedoresNOMBRE_COMERCIAL].AsString := aValue; end; procedure TBizProveedor.SetREGIMEN_IVAValue(const aValue: String); begin DataTable.Fields[idx_ProveedoresREGIMEN_IVA].AsString := aValue; end; procedure TBizProveedor.SetSubCuentas(const Value: IBizSubCuentasContacto); begin FSubCuentas := Value; EnlazarMaestroDetalle(FSubCuentasLink, FSubCuentas); end; procedure TBizProveedor.SetTIENDA_WEBValue(const aValue: Integer); begin DataTable.Fields[idx_ProveedoresTIENDA_WEB].AsInteger := aValue; end; procedure TBizProveedor.SetTiene_Subcuenta(const Value: Integer); begin DataTable.Fields[idx_ProveedoresTIENE_SUBCUENTA].AsInteger := Value; end; procedure TBizProveedor.SetVENCIMIENTO_FACTURAS_1Value(const aValue: Integer); begin DataTable.Fields[idx_ProveedoresVENCIMIENTO_FACTURAS_1].AsInteger := aValue; end; procedure TBizProveedor.SetVENCIMIENTO_FACTURAS_2Value(const aValue: Integer); begin DataTable.Fields[idx_ProveedoresVENCIMIENTO_FACTURAS_2].AsInteger := aValue; end; procedure TBizProveedor.SetVENCIMIENTO_FACTURAS_3Value(const aValue: Integer); begin DataTable.Fields[idx_ProveedoresVENCIMIENTO_FACTURAS_3].AsInteger := aValue; end; { TBizVendedor } function TBizVendedor.GetCOMISIONValue: Float; begin result := DataTable.Fields[idx_VendedoresCOMISION].AsFloat; end; function TBizVendedor.GetID_USUARIOValue: Integer; begin result := DataTable.Fields[idx_VendedoresID_USUARIO].AsInteger; end; procedure TBizVendedor.IniciarValoresContactoNuevo; begin inherited; ID_CATEGORIA := CATEGORIA_VENDEDOR; end; procedure TBizVendedor.SetCOMISIONValue(const aValue: Float); begin DataTable.Fields[idx_VendedoresCOMISION].AsFloat := aValue; end; procedure TBizVendedor.SetID_USUARIOValue(const aValue: Integer); begin DataTable.Fields[idx_VendedoresID_USUARIO].AsInteger := aValue; end; { TBizInstalador } procedure TBizInstalador.IniciarValoresContactoNuevo; begin inherited; ID_CATEGORIA := CATEGORIA_INSTALADOR; end; { TBizComercial } function TBizComercial.GetCOMISIONValue: Float; begin result := DataTable.Fields[idx_ComercialesCOMISION].AsFloat; end; function TBizComercial.GetDELEGACIONValue: String; begin result := DataTable.Fields[idx_ComercialesDELEGACION].AsString; end; procedure TBizComercial.IniciarValoresContactoNuevo; begin inherited; ID_CATEGORIA := CATEGORIA_COMERCIAL; end; procedure TBizComercial.SetCOMISIONValue(const aValue: Float); begin DataTable.Fields[idx_ComercialesCOMISION].AsFloat := aValue; end; procedure TBizComercial.SetDELEGACIONValue(const aValue: String); begin DataTable.Fields[idx_ComercialesDELEGACION].AsString := aValue; end; initialization RegisterDataTableRules(BIZ_CLIENT_CONTACTO, TBizContacto); RegisterDataTableRules(BIZ_CLIENT_CLIENTE, TBizCliente); RegisterDataTableRules(BIZ_CLIENT_PROVEEDOR, TBizProveedor); RegisterDataTableRules(BIZ_CLIENT_VENDEDOR, TBizVendedor); RegisterDataTableRules(BIZ_CLIENT_INSTALADOR, TBizInstalador); RegisterDataTableRules(BIZ_CLIENT_COMERCIAL, TBizComercial); finalization end.