diff --git a/Source/ApplicationBase/ApplicationBase.dproj b/Source/ApplicationBase/ApplicationBase.dproj index c7292b7..bbc3c9a 100644 --- a/Source/ApplicationBase/ApplicationBase.dproj +++ b/Source/ApplicationBase/ApplicationBase.dproj @@ -46,6 +46,12 @@ Package FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 + + + + + + RemObjects Data Abstract - SQLite Driver Microsoft Office 2000 Sample Automation Server Wrapper Components Microsoft Office XP Sample Automation Server Wrapper Components @@ -56,43 +62,43 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/ApplicationBase/Configuracion/Controller/uConfiguracionController.pas b/Source/ApplicationBase/Configuracion/Controller/uConfiguracionController.pas index defc849..5109e59 100644 --- a/Source/ApplicationBase/Configuracion/Controller/uConfiguracionController.pas +++ b/Source/ApplicationBase/Configuracion/Controller/uConfiguracionController.pas @@ -29,7 +29,8 @@ type function GetSettingAsFloat(const AFuente: TEnumAlmacen; const ASettingName: String; const ADefaultValue : Float = 0): Float; function GetSettingAsBoolean(const AFuente: TEnumAlmacen; const ASettingName: String; const ADefaultValue : Boolean = False): Boolean; - procedure SetSettingAsString(const AFuente: TEnumAlmacen; const ASettingName: String; AValue : String); + procedure SetSettingAsString(const AFuente: TEnumAlmacen; const ASettingName: String; AValue : String); overload; + procedure SetSettingAsString(const AFuente: TEnumAlmacen; const ASettingName: String; const ID_EMPRESA: integer; AValue : String); overload; procedure SetSettingAsInteger(const AFuente: TEnumAlmacen; const ASettingName: String; AValue : Integer); procedure SetSettingAsFloat(const AFuente: TEnumAlmacen; const ASettingName: String; AValue : Float); procedure SetSettingAsBoolean(const AFuente: TEnumAlmacen; const ASettingName: String; AValue : Boolean); @@ -51,7 +52,8 @@ type function GetSettingAsFloat(const AFuente: TEnumAlmacen; const ASettingName: String; const ADefaultValue : Float = 0): Float; function GetSettingAsBoolean(const AFuente: TEnumAlmacen; const ASettingName: String; const ADefaultValue : Boolean = False): Boolean; - procedure SetSettingAsString(const AFuente: TEnumAlmacen; const ASettingName: String; AValue : String); + procedure SetSettingAsString(const AFuente: TEnumAlmacen; const ASettingName: String; AValue : String); overload; + procedure SetSettingAsString(const AFuente: TEnumAlmacen; const ASettingName: String; const ID_EMPRESA: integer; AValue : String); overload; procedure SetSettingAsInteger(const AFuente: TEnumAlmacen; const ASettingName: String; AValue : Integer); procedure SetSettingAsFloat(const AFuente: TEnumAlmacen; const ASettingName: String; AValue : Float); procedure SetSettingAsBoolean(const AFuente: TEnumAlmacen; const ASettingName: String; AValue : Boolean); @@ -219,6 +221,16 @@ begin end; end; +procedure TConfiguracionController.SetSettingAsString( + const AFuente: TEnumAlmacen; const ASettingName: String; + const ID_EMPRESA: integer; AValue: String); +begin + case AFuente of +// teXML: FAppXMLFileStorage.WriteString(ASettingName, AValue); + teBD: FAppDBStorage.GuardarValorParaEmpresa(ASettingName, ID_EMPRESA, AValue); + end; +end; + procedure TConfiguracionController.SetSettingAsString(const AFuente: TEnumAlmacen; const ASettingName: String; AValue: String); begin diff --git a/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm b/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm index c367e01..93c4915 100644 --- a/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm +++ b/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm @@ -182,11 +182,15 @@ inherited DataModuleEmpresas: TDataModuleEmpresas end item Name = 'ID_TIPO_IVA' - DataType = datSmallInt + DataType = datInteger + end + item + Name = 'IVA' + DataType = datFloat end item Name = 'ID_FORMA_PAGO' - DataType = datSmallInt + DataType = datInteger end item Name = 'VALIDEZ_PRESUPUESTOS' diff --git a/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas b/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas index 9a5c7d5..66d6135 100644 --- a/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas +++ b/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas @@ -9,10 +9,10 @@ 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_EmpresasTiendas = '{D5FFD28A-7CA4-490D-B6A3-DE2C40E2167B}'; - RID_DarNombre = '{6DCC4A40-1006-4B04-8072-2D0C37385212}'; - RID_Empresas = '{F2A4D3C8-3E77-4529-96B5-4C790FB3CB5D}'; - RID_EmpresasDatosBanco = '{8C6BC83D-DC1D-44B7-BC42-BC15143CFEA6}'; + RID_EmpresasTiendas = '{74B8F6E8-F54A-4CE5-8D8C-4793AD36775A}'; + RID_DarNombre = '{C31A013C-8C38-4E98-96C0-50DBC7D8B73E}'; + RID_Empresas = '{CEF1ACC5-4CC7-4A29-B512-532A1B0C2917}'; + RID_EmpresasDatosBanco = '{E1E6796F-5841-47B5-AFCF-5DEBE3A6C903}'; { Data table names } nme_EmpresasTiendas = 'EmpresasTiendas'; @@ -86,6 +86,7 @@ const fld_EmpresasLOGOTIPO = 'LOGOTIPO'; fld_EmpresasREGISTRO_MERCANTIL = 'REGISTRO_MERCANTIL'; fld_EmpresasID_TIPO_IVA = 'ID_TIPO_IVA'; + fld_EmpresasIVA = 'IVA'; fld_EmpresasID_FORMA_PAGO = 'ID_FORMA_PAGO'; fld_EmpresasVALIDEZ_PRESUPUESTOS = 'VALIDEZ_PRESUPUESTOS'; fld_EmpresasPRECIO_PUNTO = 'PRECIO_PUNTO'; @@ -114,9 +115,10 @@ const idx_EmpresasLOGOTIPO = 20; idx_EmpresasREGISTRO_MERCANTIL = 21; idx_EmpresasID_TIPO_IVA = 22; - idx_EmpresasID_FORMA_PAGO = 23; - idx_EmpresasVALIDEZ_PRESUPUESTOS = 24; - idx_EmpresasPRECIO_PUNTO = 25; + idx_EmpresasIVA = 23; + idx_EmpresasID_FORMA_PAGO = 24; + idx_EmpresasVALIDEZ_PRESUPUESTOS = 25; + idx_EmpresasPRECIO_PUNTO = 26; { EmpresasDatosBanco fields } fld_EmpresasDatosBancoID = 'ID'; @@ -143,7 +145,7 @@ const type { IEmpresasTiendas } IEmpresasTiendas = interface(IDAStronglyTypedDataTable) - ['{B896AAAF-4CCE-4278-AA7D-C92A9E57B776}'] + ['{C6667179-F2F3-48DA-97B4-03E67A6E087A}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -358,7 +360,7 @@ type { IDarNombre } IDarNombre = interface(IDAStronglyTypedDataTable) - ['{5A7546FF-201D-4737-B0BA-68C977A3EB5B}'] + ['{5F2B65AC-C81D-4780-AEBE-C137CE4CADCA}'] { Property getters and setters } function GetNOMBREValue: String; procedure SetNOMBREValue(const aValue: String); @@ -393,7 +395,7 @@ type { IEmpresas } IEmpresas = interface(IDAStronglyTypedDataTable) - ['{6C22C041-3C1D-4CDD-8E64-BB8E33B506FB}'] + ['{20CF86F9-265B-450D-99B5-6F784684B3F0}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -481,12 +483,16 @@ type procedure SetREGISTRO_MERCANTILValue(const aValue: String); function GetREGISTRO_MERCANTILIsNull: Boolean; procedure SetREGISTRO_MERCANTILIsNull(const aValue: Boolean); - function GetID_TIPO_IVAValue: SmallInt; - procedure SetID_TIPO_IVAValue(const aValue: SmallInt); + function GetID_TIPO_IVAValue: Integer; + procedure SetID_TIPO_IVAValue(const aValue: Integer); function GetID_TIPO_IVAIsNull: Boolean; procedure SetID_TIPO_IVAIsNull(const aValue: Boolean); - function GetID_FORMA_PAGOValue: SmallInt; - procedure SetID_FORMA_PAGOValue(const aValue: SmallInt); + function GetIVAValue: Float; + procedure SetIVAValue(const aValue: Float); + function GetIVAIsNull: Boolean; + procedure SetIVAIsNull(const aValue: Boolean); + function GetID_FORMA_PAGOValue: Integer; + procedure SetID_FORMA_PAGOValue(const aValue: Integer); function GetID_FORMA_PAGOIsNull: Boolean; procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean); function GetVALIDEZ_PRESUPUESTOSValue: SmallInt; @@ -544,9 +550,11 @@ type property LOGOTIPOIsNull: Boolean read GetLOGOTIPOIsNull write SetLOGOTIPOIsNull; property REGISTRO_MERCANTIL: String read GetREGISTRO_MERCANTILValue write SetREGISTRO_MERCANTILValue; property REGISTRO_MERCANTILIsNull: Boolean read GetREGISTRO_MERCANTILIsNull write SetREGISTRO_MERCANTILIsNull; - property ID_TIPO_IVA: SmallInt read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue; + property ID_TIPO_IVA: Integer read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue; property ID_TIPO_IVAIsNull: Boolean read GetID_TIPO_IVAIsNull write SetID_TIPO_IVAIsNull; - property ID_FORMA_PAGO: SmallInt read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue; + property IVA: Float read GetIVAValue write SetIVAValue; + property IVAIsNull: Boolean read GetIVAIsNull write SetIVAIsNull; + property ID_FORMA_PAGO: Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue; property ID_FORMA_PAGOIsNull: Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull; property VALIDEZ_PRESUPUESTOS: SmallInt read GetVALIDEZ_PRESUPUESTOSValue write SetVALIDEZ_PRESUPUESTOSValue; property VALIDEZ_PRESUPUESTOSIsNull: Boolean read GetVALIDEZ_PRESUPUESTOSIsNull write SetVALIDEZ_PRESUPUESTOSIsNull; @@ -649,12 +657,16 @@ type procedure SetREGISTRO_MERCANTILValue(const aValue: String); virtual; function GetREGISTRO_MERCANTILIsNull: Boolean; virtual; procedure SetREGISTRO_MERCANTILIsNull(const aValue: Boolean); virtual; - function GetID_TIPO_IVAValue: SmallInt; virtual; - procedure SetID_TIPO_IVAValue(const aValue: SmallInt); virtual; + function GetID_TIPO_IVAValue: Integer; virtual; + procedure SetID_TIPO_IVAValue(const aValue: Integer); virtual; function GetID_TIPO_IVAIsNull: Boolean; virtual; procedure SetID_TIPO_IVAIsNull(const aValue: Boolean); virtual; - function GetID_FORMA_PAGOValue: SmallInt; virtual; - procedure SetID_FORMA_PAGOValue(const aValue: SmallInt); virtual; + function GetIVAValue: Float; virtual; + procedure SetIVAValue(const aValue: Float); virtual; + function GetIVAIsNull: Boolean; virtual; + procedure SetIVAIsNull(const aValue: Boolean); virtual; + function GetID_FORMA_PAGOValue: Integer; virtual; + procedure SetID_FORMA_PAGOValue(const aValue: Integer); virtual; function GetID_FORMA_PAGOIsNull: Boolean; virtual; procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean); virtual; function GetVALIDEZ_PRESUPUESTOSValue: SmallInt; virtual; @@ -711,9 +723,11 @@ type property LOGOTIPOIsNull: Boolean read GetLOGOTIPOIsNull write SetLOGOTIPOIsNull; property REGISTRO_MERCANTIL: String read GetREGISTRO_MERCANTILValue write SetREGISTRO_MERCANTILValue; property REGISTRO_MERCANTILIsNull: Boolean read GetREGISTRO_MERCANTILIsNull write SetREGISTRO_MERCANTILIsNull; - property ID_TIPO_IVA: SmallInt read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue; + property ID_TIPO_IVA: Integer read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue; property ID_TIPO_IVAIsNull: Boolean read GetID_TIPO_IVAIsNull write SetID_TIPO_IVAIsNull; - property ID_FORMA_PAGO: SmallInt read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue; + property IVA: Float read GetIVAValue write SetIVAValue; + property IVAIsNull: Boolean read GetIVAIsNull write SetIVAIsNull; + property ID_FORMA_PAGO: Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue; property ID_FORMA_PAGOIsNull: Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull; property VALIDEZ_PRESUPUESTOS: SmallInt read GetVALIDEZ_PRESUPUESTOSValue write SetVALIDEZ_PRESUPUESTOSValue; property VALIDEZ_PRESUPUESTOSIsNull: Boolean read GetVALIDEZ_PRESUPUESTOSIsNull write SetVALIDEZ_PRESUPUESTOSIsNull; @@ -728,7 +742,7 @@ type { IEmpresasDatosBanco } IEmpresasDatosBanco = interface(IDAStronglyTypedDataTable) - ['{B4F1F25A-EFAA-47C4-A394-15DD4DA85BBA}'] + ['{FC451B78-DF0A-4C99-A5C8-F56B4C03C5FF}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1739,14 +1753,14 @@ begin DataTable.Fields[idx_EmpresasREGISTRO_MERCANTIL].AsVariant := Null; end; -function TEmpresasDataTableRules.GetID_TIPO_IVAValue: SmallInt; +function TEmpresasDataTableRules.GetID_TIPO_IVAValue: Integer; begin - result := DataTable.Fields[idx_EmpresasID_TIPO_IVA].AsSmallInt; + result := DataTable.Fields[idx_EmpresasID_TIPO_IVA].AsInteger; end; -procedure TEmpresasDataTableRules.SetID_TIPO_IVAValue(const aValue: SmallInt); +procedure TEmpresasDataTableRules.SetID_TIPO_IVAValue(const aValue: Integer); begin - DataTable.Fields[idx_EmpresasID_TIPO_IVA].AsSmallInt := aValue; + DataTable.Fields[idx_EmpresasID_TIPO_IVA].AsInteger := aValue; end; function TEmpresasDataTableRules.GetID_TIPO_IVAIsNull: boolean; @@ -1760,14 +1774,35 @@ begin DataTable.Fields[idx_EmpresasID_TIPO_IVA].AsVariant := Null; end; -function TEmpresasDataTableRules.GetID_FORMA_PAGOValue: SmallInt; +function TEmpresasDataTableRules.GetIVAValue: Float; begin - result := DataTable.Fields[idx_EmpresasID_FORMA_PAGO].AsSmallInt; + result := DataTable.Fields[idx_EmpresasIVA].AsFloat; end; -procedure TEmpresasDataTableRules.SetID_FORMA_PAGOValue(const aValue: SmallInt); +procedure TEmpresasDataTableRules.SetIVAValue(const aValue: Float); begin - DataTable.Fields[idx_EmpresasID_FORMA_PAGO].AsSmallInt := aValue; + DataTable.Fields[idx_EmpresasIVA].AsFloat := aValue; +end; + +function TEmpresasDataTableRules.GetIVAIsNull: boolean; +begin + result := DataTable.Fields[idx_EmpresasIVA].IsNull; +end; + +procedure TEmpresasDataTableRules.SetIVAIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_EmpresasIVA].AsVariant := Null; +end; + +function TEmpresasDataTableRules.GetID_FORMA_PAGOValue: Integer; +begin + result := DataTable.Fields[idx_EmpresasID_FORMA_PAGO].AsInteger; +end; + +procedure TEmpresasDataTableRules.SetID_FORMA_PAGOValue(const aValue: Integer); +begin + DataTable.Fields[idx_EmpresasID_FORMA_PAGO].AsInteger := aValue; end; function TEmpresasDataTableRules.GetID_FORMA_PAGOIsNull: boolean; diff --git a/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas b/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas index f72c76d..c897e2b 100644 --- a/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas +++ b/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas @@ -9,15 +9,15 @@ const { Delta 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_EmpresasTiendasDelta = '{352C1F79-835B-4172-9AD9-E5FCE5F76DF4}'; - RID_DarNombreDelta = '{E6E3A4EE-8129-4F75-966D-9FE66A53361C}'; - RID_EmpresasDelta = '{8185F345-A4F5-419B-BFB4-D910428D6609}'; - RID_EmpresasDatosBancoDelta = '{F938338C-0D89-4F44-A4C9-883C1BCB1E11}'; + RID_EmpresasTiendasDelta = '{A3CE7076-3DD1-413E-8A22-76E00907B3F8}'; + RID_DarNombreDelta = '{1A33D883-5482-424E-A458-406627B7C222}'; + RID_EmpresasDelta = '{3D30AB01-4425-491D-AF07-E6C3B9D4268E}'; + RID_EmpresasDatosBancoDelta = '{34696D9E-C399-422A-B9DC-7B4D3A0434DD}'; type { IEmpresasTiendasDelta } IEmpresasTiendasDelta = interface(IEmpresasTiendas) - ['{352C1F79-835B-4172-9AD9-E5FCE5F76DF4}'] + ['{A3CE7076-3DD1-413E-8A22-76E00907B3F8}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -232,7 +232,7 @@ type { IDarNombreDelta } IDarNombreDelta = interface(IDarNombre) - ['{E6E3A4EE-8129-4F75-966D-9FE66A53361C}'] + ['{1A33D883-5482-424E-A458-406627B7C222}'] { Property getters and setters } function GetOldNOMBREValue : String; @@ -266,7 +266,7 @@ type { IEmpresasDelta } IEmpresasDelta = interface(IEmpresas) - ['{8185F345-A4F5-419B-BFB4-D910428D6609}'] + ['{3D30AB01-4425-491D-AF07-E6C3B9D4268E}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldNIF_CIFValue : String; @@ -290,8 +290,9 @@ type function GetOldUSUARIOValue : String; function GetOldLOGOTIPOValue : IROStream; function GetOldREGISTRO_MERCANTILValue : String; - function GetOldID_TIPO_IVAValue : SmallInt; - function GetOldID_FORMA_PAGOValue : SmallInt; + function GetOldID_TIPO_IVAValue : Integer; + function GetOldIVAValue : Float; + function GetOldID_FORMA_PAGOValue : Integer; function GetOldVALIDEZ_PRESUPUESTOSValue : SmallInt; function GetOldPRECIO_PUNTOValue : Currency; @@ -318,8 +319,9 @@ type property OldUSUARIO : String read GetOldUSUARIOValue; property OldLOGOTIPO : IROStream read GetOldLOGOTIPOValue; property OldREGISTRO_MERCANTIL : String read GetOldREGISTRO_MERCANTILValue; - property OldID_TIPO_IVA : SmallInt read GetOldID_TIPO_IVAValue; - property OldID_FORMA_PAGO : SmallInt read GetOldID_FORMA_PAGOValue; + property OldID_TIPO_IVA : Integer read GetOldID_TIPO_IVAValue; + property OldIVA : Float read GetOldIVAValue; + property OldID_FORMA_PAGO : Integer read GetOldID_FORMA_PAGOValue; property OldVALIDEZ_PRESUPUESTOS : SmallInt read GetOldVALIDEZ_PRESUPUESTOSValue; property OldPRECIO_PUNTO : Currency read GetOldPRECIO_PUNTOValue; end; @@ -463,17 +465,23 @@ type function GetOldREGISTRO_MERCANTILIsNull: Boolean; virtual; procedure SetREGISTRO_MERCANTILValue(const aValue: String); virtual; procedure SetREGISTRO_MERCANTILIsNull(const aValue: Boolean); virtual; - function GetID_TIPO_IVAValue: SmallInt; virtual; + function GetID_TIPO_IVAValue: Integer; virtual; function GetID_TIPO_IVAIsNull: Boolean; virtual; - function GetOldID_TIPO_IVAValue: SmallInt; virtual; + function GetOldID_TIPO_IVAValue: Integer; virtual; function GetOldID_TIPO_IVAIsNull: Boolean; virtual; - procedure SetID_TIPO_IVAValue(const aValue: SmallInt); virtual; + procedure SetID_TIPO_IVAValue(const aValue: Integer); virtual; procedure SetID_TIPO_IVAIsNull(const aValue: Boolean); virtual; - function GetID_FORMA_PAGOValue: SmallInt; virtual; + function GetIVAValue: Float; virtual; + function GetIVAIsNull: Boolean; virtual; + function GetOldIVAValue: Float; virtual; + function GetOldIVAIsNull: Boolean; virtual; + procedure SetIVAValue(const aValue: Float); virtual; + procedure SetIVAIsNull(const aValue: Boolean); virtual; + function GetID_FORMA_PAGOValue: Integer; virtual; function GetID_FORMA_PAGOIsNull: Boolean; virtual; - function GetOldID_FORMA_PAGOValue: SmallInt; virtual; + function GetOldID_FORMA_PAGOValue: Integer; virtual; function GetOldID_FORMA_PAGOIsNull: Boolean; virtual; - procedure SetID_FORMA_PAGOValue(const aValue: SmallInt); virtual; + procedure SetID_FORMA_PAGOValue(const aValue: Integer); virtual; procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean); virtual; function GetVALIDEZ_PRESUPUESTOSValue: SmallInt; virtual; function GetVALIDEZ_PRESUPUESTOSIsNull: Boolean; virtual; @@ -577,13 +585,17 @@ type property REGISTRO_MERCANTILIsNull : Boolean read GetREGISTRO_MERCANTILIsNull write SetREGISTRO_MERCANTILIsNull; property OldREGISTRO_MERCANTIL : String read GetOldREGISTRO_MERCANTILValue; property OldREGISTRO_MERCANTILIsNull : Boolean read GetOldREGISTRO_MERCANTILIsNull; - property ID_TIPO_IVA : SmallInt read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue; + property ID_TIPO_IVA : Integer read GetID_TIPO_IVAValue write SetID_TIPO_IVAValue; property ID_TIPO_IVAIsNull : Boolean read GetID_TIPO_IVAIsNull write SetID_TIPO_IVAIsNull; - property OldID_TIPO_IVA : SmallInt read GetOldID_TIPO_IVAValue; + property OldID_TIPO_IVA : Integer read GetOldID_TIPO_IVAValue; property OldID_TIPO_IVAIsNull : Boolean read GetOldID_TIPO_IVAIsNull; - property ID_FORMA_PAGO : SmallInt read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue; + property IVA : Float read GetIVAValue write SetIVAValue; + property IVAIsNull : Boolean read GetIVAIsNull write SetIVAIsNull; + property OldIVA : Float read GetOldIVAValue; + property OldIVAIsNull : Boolean read GetOldIVAIsNull; + property ID_FORMA_PAGO : Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue; property ID_FORMA_PAGOIsNull : Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull; - property OldID_FORMA_PAGO : SmallInt read GetOldID_FORMA_PAGOValue; + property OldID_FORMA_PAGO : Integer read GetOldID_FORMA_PAGOValue; property OldID_FORMA_PAGOIsNull : Boolean read GetOldID_FORMA_PAGOIsNull; property VALIDEZ_PRESUPUESTOS : SmallInt read GetVALIDEZ_PRESUPUESTOSValue write SetVALIDEZ_PRESUPUESTOSValue; property VALIDEZ_PRESUPUESTOSIsNull : Boolean read GetVALIDEZ_PRESUPUESTOSIsNull write SetVALIDEZ_PRESUPUESTOSIsNull; @@ -602,7 +614,7 @@ type { IEmpresasDatosBancoDelta } IEmpresasDatosBancoDelta = interface(IEmpresasDatosBanco) - ['{F938338C-0D89-4F44-A4C9-883C1BCB1E11}'] + ['{34696D9E-C399-422A-B9DC-7B4D3A0434DD}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -2006,7 +2018,7 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasREGISTRO_MERCANTIL] := Null; end; -function TEmpresasBusinessProcessorRules.GetID_TIPO_IVAValue: SmallInt; +function TEmpresasBusinessProcessorRules.GetID_TIPO_IVAValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_TIPO_IVA]; end; @@ -2016,7 +2028,7 @@ begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_TIPO_IVA]); end; -function TEmpresasBusinessProcessorRules.GetOldID_TIPO_IVAValue: SmallInt; +function TEmpresasBusinessProcessorRules.GetOldID_TIPO_IVAValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasID_TIPO_IVA]; end; @@ -2026,7 +2038,7 @@ begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasID_TIPO_IVA]); end; -procedure TEmpresasBusinessProcessorRules.SetID_TIPO_IVAValue(const aValue: SmallInt); +procedure TEmpresasBusinessProcessorRules.SetID_TIPO_IVAValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_TIPO_IVA] := aValue; end; @@ -2037,7 +2049,38 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_TIPO_IVA] := Null; end; -function TEmpresasBusinessProcessorRules.GetID_FORMA_PAGOValue: SmallInt; +function TEmpresasBusinessProcessorRules.GetIVAValue: Float; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasIVA]; +end; + +function TEmpresasBusinessProcessorRules.GetIVAIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasIVA]); +end; + +function TEmpresasBusinessProcessorRules.GetOldIVAValue: Float; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasIVA]; +end; + +function TEmpresasBusinessProcessorRules.GetOldIVAIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasIVA]); +end; + +procedure TEmpresasBusinessProcessorRules.SetIVAValue(const aValue: Float); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasIVA] := aValue; +end; + +procedure TEmpresasBusinessProcessorRules.SetIVAIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasIVA] := Null; +end; + +function TEmpresasBusinessProcessorRules.GetID_FORMA_PAGOValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_FORMA_PAGO]; end; @@ -2047,7 +2090,7 @@ begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_FORMA_PAGO]); end; -function TEmpresasBusinessProcessorRules.GetOldID_FORMA_PAGOValue: SmallInt; +function TEmpresasBusinessProcessorRules.GetOldID_FORMA_PAGOValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasID_FORMA_PAGO]; end; @@ -2057,7 +2100,7 @@ begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasID_FORMA_PAGO]); end; -procedure TEmpresasBusinessProcessorRules.SetID_FORMA_PAGOValue(const aValue: SmallInt); +procedure TEmpresasBusinessProcessorRules.SetID_FORMA_PAGOValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID_FORMA_PAGO] := aValue; end; diff --git a/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm b/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm index b161e76..7d66180 100644 --- a/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm +++ b/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm @@ -220,7 +220,7 @@ object srvEmpresas: TsrvEmpresas item Connection = 'IBX' Default = True - TargetTable = 'EMPRESAS' + TargetTable = 'V_EMPRESAS' Name = 'IBX' StatementType = stAutoSQL ColumnMappings = < @@ -327,6 +327,10 @@ object srvEmpresas: TsrvEmpresas item DatasetField = 'PRECIO_PUNTO' TableField = 'PRECIO_PUNTO' + end + item + DatasetField = 'IVA' + TableField = 'IVA' end> end> Name = 'Empresas' @@ -464,11 +468,15 @@ object srvEmpresas: TsrvEmpresas end item Name = 'ID_TIPO_IVA' - DataType = datSmallInt + DataType = datInteger + end + item + Name = 'IVA' + DataType = datFloat end item Name = 'ID_FORMA_PAGO' - DataType = datSmallInt + DataType = datInteger end item Name = 'VALIDEZ_PRESUPUESTOS' diff --git a/Source/ApplicationBase/Empresas/Views/uEditorEmpresa.dfm b/Source/ApplicationBase/Empresas/Views/uEditorEmpresa.dfm index 6c54113..90559a2 100644 --- a/Source/ApplicationBase/Empresas/Views/uEditorEmpresa.dfm +++ b/Source/ApplicationBase/Empresas/Views/uEditorEmpresa.dfm @@ -14,6 +14,7 @@ inherited fEditorEmpresa: TfEditorEmpresa inherited JvNavPanelHeader: TJvNavPanelHeader Width = 674 Caption = 'Empresa' + ExplicitTop = 52 ExplicitWidth = 674 inherited Image1: TImage Left = 647 @@ -87,7 +88,7 @@ inherited fEditorEmpresa: TfEditorEmpresa inherited pgPaginas: TPageControl Width = 668 Height = 420 - ActivePage = pagDatosBancarios + ExplicitTop = 112 ExplicitWidth = 668 ExplicitHeight = 420 inherited pagGeneral: TTabSheet @@ -299,6 +300,7 @@ inherited fEditorEmpresa: TfEditorEmpresa end inherited cbFormaPago: TcxComboBox Top = 165 + Enabled = True Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' @@ -348,6 +350,16 @@ inherited fEditorEmpresa: TfEditorEmpresa ExplicitWidth = 121 Width = 121 end + inherited dxLayoutControl1Group_Root: TdxLayoutGroup + inherited dxLayoutControl1Group4: TdxLayoutGroup + inherited dxLayoutControl1Group1: TdxLayoutGroup + inherited dxLayoutControl1Item18: TdxLayoutItem + Enabled = True + Visible = True + end + end + end + end end end end @@ -407,7 +419,7 @@ inherited fEditorEmpresa: TfEditorEmpresa Width = 660 Height = 367 ExplicitWidth = 660 - ExplicitHeight = 370 + ExplicitHeight = 367 inherited cxGridView: TcxGridDBTableView inherited cxGridViewCODIGO_CONTABLE: TcxGridDBColumn VisibleForCustomization = False @@ -417,24 +429,13 @@ inherited fEditorEmpresa: TfEditorEmpresa inherited ToolBar1: TToolBar Width = 660 ExplicitWidth = 660 - inherited ToolButton1: TToolButton - ExplicitWidth = 113 - end - inherited ToolButton4: TToolButton - ExplicitWidth = 113 - end - inherited ToolButton2: TToolButton - ExplicitWidth = 113 - end - inherited ToolButton7: TToolButton - ExplicitWidth = 113 - end end end end end inherited PnlComentario: TPanel Width = 674 + ExplicitTop = 79 ExplicitWidth = 674 inherited lbComentario: TLabel Width = 664