diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index eb9619bc..5f98b266 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -592,7 +592,9 @@ CREATE TABLE EMPRESAS ( USUARIO TIPO_USUARIO, LOGOTIPO TIPO_BINARIO, REGISTRO_MERCANTIL VARCHAR(255), - IVA TIPO_PORCENTAJE + IVA TIPO_PORCENTAJE, + PARAM_TIEMPO TIPO_IMPORTE, + PARAM_MARGEN TIPO_PORCENTAJE ); diff --git a/Database/scripts/factuges_sysdata.sql b/Database/scripts/factuges_sysdata.sql index 58cb614d..fc6f6609 100644 --- a/Database/scripts/factuges_sysdata.sql +++ b/Database/scripts/factuges_sysdata.sql @@ -35,7 +35,8 @@ INSERT INTO REFERENCIAS (ID, ID_EMPRESA, CODIGO, VALOR, DESCRIPCION) VALUES (10, INSERT INTO REFERENCIAS (ID, ID_EMPRESA, CODIGO, VALOR, DESCRIPCION) VALUES (11, NULL, 'REF_CLIENTES', '0000000001', 'Ref. clientes'); INSERT INTO REFERENCIAS (ID, ID_EMPRESA, CODIGO, VALOR, DESCRIPCION) VALUES (12, NULL, 'REF_PROVEEDORES', '0000000001', 'Ref. proveedores'); INSERT INTO REFERENCIAS (ID, ID_EMPRESA, CODIGO, VALOR, DESCRIPCION) VALUES (13, NULL, 'REF_EMPLEADOS', '00001', 'Ref. empleados'); -SET GENERATOR GEN_REFERENCIAS_ID TO 14; +INSERT INTO REFERENCIAS (ID, ID_EMPRESA, CODIGO, VALOR, DESCRIPCION) VALUES (14, NULL, 'REF_ARTICULOS', '1', 'Ref. artículos'); +SET GENERATOR GEN_REFERENCIAS_ID TO 15; COMMIT WORK; INSERT INTO TIPOS_IVA (ID, REFERENCIA, DESCRIPCION, IVA, RE) VALUES (1, 'IVA16', 'IVA16', 16, 4); diff --git a/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm b/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm index a16d018a..f1907d2a 100644 --- a/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm +++ b/Source/ApplicationBase/Empresas/Data/uDataModuleEmpresas.dfm @@ -184,6 +184,14 @@ inherited DataModuleEmpresas: TDataModuleEmpresas Name = 'IVA' DataType = datFloat DictionaryEntry = 'Empresas_IVA' + end + item + Name = 'PARAM_TIEMPO' + DataType = datCurrency + end + item + Name = 'PARAM_MARGEN' + DataType = datFloat end> Params = <> StreamingOptions = [soDisableEventsWhileStreaming] diff --git a/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas b/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas index ef67b9b9..61cc75e5 100644 --- a/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas +++ b/Source/ApplicationBase/Empresas/Model/schEmpresasClient_Intf.pas @@ -9,8 +9,8 @@ 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_Empresas = '{DCDDB872-8363-4FCC-A410-5E68BDE201BD}'; - RID_EmpresasDatosBanco = '{B0ECED4B-40DD-4640-9DA0-5445ADEAB9E8}'; + RID_Empresas = '{0818A25D-E23C-4CFF-82F0-313FD818251C}'; + RID_EmpresasDatosBanco = '{3F6CB778-A561-495F-AA36-903B1F94E7B7}'; { Data table names } nme_Empresas = 'Empresas'; @@ -40,6 +40,8 @@ const fld_EmpresasLOGOTIPO = 'LOGOTIPO'; fld_EmpresasREGISTRO_MERCANTIL = 'REGISTRO_MERCANTIL'; fld_EmpresasIVA = 'IVA'; + fld_EmpresasPARAM_TIEMPO = 'PARAM_TIEMPO'; + fld_EmpresasPARAM_MARGEN = 'PARAM_MARGEN'; { Empresas field indexes } idx_EmpresasID = 0; @@ -65,6 +67,8 @@ const idx_EmpresasLOGOTIPO = 20; idx_EmpresasREGISTRO_MERCANTIL = 21; idx_EmpresasIVA = 22; + idx_EmpresasPARAM_TIEMPO = 23; + idx_EmpresasPARAM_MARGEN = 24; { EmpresasDatosBanco fields } fld_EmpresasDatosBancoID = 'ID'; @@ -95,7 +99,7 @@ const type { IEmpresas } IEmpresas = interface(IDAStronglyTypedDataTable) - ['{49EC618A-361D-45A6-8D6B-9F82E813B67D}'] + ['{80F28C5F-7541-4940-8747-D39D8B8426D9}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -187,6 +191,14 @@ type procedure SetIVAValue(const aValue: Float); function GetIVAIsNull: Boolean; procedure SetIVAIsNull(const aValue: Boolean); + function GetPARAM_TIEMPOValue: Currency; + procedure SetPARAM_TIEMPOValue(const aValue: Currency); + function GetPARAM_TIEMPOIsNull: Boolean; + procedure SetPARAM_TIEMPOIsNull(const aValue: Boolean); + function GetPARAM_MARGENValue: Float; + procedure SetPARAM_MARGENValue(const aValue: Float); + function GetPARAM_MARGENIsNull: Boolean; + procedure SetPARAM_MARGENIsNull(const aValue: Boolean); { Properties } @@ -236,6 +248,10 @@ type property REGISTRO_MERCANTILIsNull: Boolean read GetREGISTRO_MERCANTILIsNull write SetREGISTRO_MERCANTILIsNull; property IVA: Float read GetIVAValue write SetIVAValue; property IVAIsNull: Boolean read GetIVAIsNull write SetIVAIsNull; + property PARAM_TIEMPO: Currency read GetPARAM_TIEMPOValue write SetPARAM_TIEMPOValue; + property PARAM_TIEMPOIsNull: Boolean read GetPARAM_TIEMPOIsNull write SetPARAM_TIEMPOIsNull; + property PARAM_MARGEN: Float read GetPARAM_MARGENValue write SetPARAM_MARGENValue; + property PARAM_MARGENIsNull: Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull; end; { TEmpresasDataTableRules } @@ -337,6 +353,14 @@ type procedure SetIVAValue(const aValue: Float); virtual; function GetIVAIsNull: Boolean; virtual; procedure SetIVAIsNull(const aValue: Boolean); virtual; + function GetPARAM_TIEMPOValue: Currency; virtual; + procedure SetPARAM_TIEMPOValue(const aValue: Currency); virtual; + function GetPARAM_TIEMPOIsNull: Boolean; virtual; + procedure SetPARAM_TIEMPOIsNull(const aValue: Boolean); virtual; + function GetPARAM_MARGENValue: Float; virtual; + procedure SetPARAM_MARGENValue(const aValue: Float); virtual; + function GetPARAM_MARGENIsNull: Boolean; virtual; + procedure SetPARAM_MARGENIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; @@ -385,6 +409,10 @@ type property REGISTRO_MERCANTILIsNull: Boolean read GetREGISTRO_MERCANTILIsNull write SetREGISTRO_MERCANTILIsNull; property IVA: Float read GetIVAValue write SetIVAValue; property IVAIsNull: Boolean read GetIVAIsNull write SetIVAIsNull; + property PARAM_TIEMPO: Currency read GetPARAM_TIEMPOValue write SetPARAM_TIEMPOValue; + property PARAM_TIEMPOIsNull: Boolean read GetPARAM_TIEMPOIsNull write SetPARAM_TIEMPOIsNull; + property PARAM_MARGEN: Float read GetPARAM_MARGENValue write SetPARAM_MARGENValue; + property PARAM_MARGENIsNull: Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull; public constructor Create(aDataTable: TDADataTable); override; @@ -394,7 +422,7 @@ type { IEmpresasDatosBanco } IEmpresasDatosBanco = interface(IDAStronglyTypedDataTable) - ['{E4C2B666-DA61-4076-986F-3FD1FF179EC2}'] + ['{2808E04A-4851-4816-ACAD-9B4B8357B765}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1062,6 +1090,48 @@ begin DataTable.Fields[idx_EmpresasIVA].AsVariant := Null; end; +function TEmpresasDataTableRules.GetPARAM_TIEMPOValue: Currency; +begin + result := DataTable.Fields[idx_EmpresasPARAM_TIEMPO].AsCurrency; +end; + +procedure TEmpresasDataTableRules.SetPARAM_TIEMPOValue(const aValue: Currency); +begin + DataTable.Fields[idx_EmpresasPARAM_TIEMPO].AsCurrency := aValue; +end; + +function TEmpresasDataTableRules.GetPARAM_TIEMPOIsNull: boolean; +begin + result := DataTable.Fields[idx_EmpresasPARAM_TIEMPO].IsNull; +end; + +procedure TEmpresasDataTableRules.SetPARAM_TIEMPOIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_EmpresasPARAM_TIEMPO].AsVariant := Null; +end; + +function TEmpresasDataTableRules.GetPARAM_MARGENValue: Float; +begin + result := DataTable.Fields[idx_EmpresasPARAM_MARGEN].AsFloat; +end; + +procedure TEmpresasDataTableRules.SetPARAM_MARGENValue(const aValue: Float); +begin + DataTable.Fields[idx_EmpresasPARAM_MARGEN].AsFloat := aValue; +end; + +function TEmpresasDataTableRules.GetPARAM_MARGENIsNull: boolean; +begin + result := DataTable.Fields[idx_EmpresasPARAM_MARGEN].IsNull; +end; + +procedure TEmpresasDataTableRules.SetPARAM_MARGENIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_EmpresasPARAM_MARGEN].AsVariant := Null; +end; + { TEmpresasDatosBancoDataTableRules } constructor TEmpresasDatosBancoDataTableRules.Create(aDataTable: TDADataTable); diff --git a/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas b/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas index 384b51c2..4b03e239 100644 --- a/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas +++ b/Source/ApplicationBase/Empresas/Model/schEmpresasServer_Intf.pas @@ -9,13 +9,13 @@ 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_EmpresasDelta = '{13974051-7EC2-48D3-B7EB-67D4DE412283}'; - RID_EmpresasDatosBancoDelta = '{132B47C7-B0BC-4144-8C00-810C7180BDA0}'; + RID_EmpresasDelta = '{39AC9440-BEDB-4468-8B08-49600891084A}'; + RID_EmpresasDatosBancoDelta = '{A084800E-091E-40AD-9B45-63974394595E}'; type { IEmpresasDelta } IEmpresasDelta = interface(IEmpresas) - ['{13974051-7EC2-48D3-B7EB-67D4DE412283}'] + ['{39AC9440-BEDB-4468-8B08-49600891084A}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldNIF_CIFValue : String; @@ -40,6 +40,8 @@ type function GetOldLOGOTIPOValue : IROStream; function GetOldREGISTRO_MERCANTILValue : String; function GetOldIVAValue : Float; + function GetOldPARAM_TIEMPOValue : Currency; + function GetOldPARAM_MARGENValue : Float; { Properties } property OldID : Integer read GetOldIDValue; @@ -65,6 +67,8 @@ type property OldLOGOTIPO : IROStream read GetOldLOGOTIPOValue; property OldREGISTRO_MERCANTIL : String read GetOldREGISTRO_MERCANTILValue; property OldIVA : Float read GetOldIVAValue; + property OldPARAM_TIEMPO : Currency read GetOldPARAM_TIEMPOValue; + property OldPARAM_MARGEN : Float read GetOldPARAM_MARGENValue; end; { TEmpresasBusinessProcessorRules } @@ -212,6 +216,18 @@ type function GetOldIVAIsNull: Boolean; virtual; procedure SetIVAValue(const aValue: Float); virtual; procedure SetIVAIsNull(const aValue: Boolean); virtual; + function GetPARAM_TIEMPOValue: Currency; virtual; + function GetPARAM_TIEMPOIsNull: Boolean; virtual; + function GetOldPARAM_TIEMPOValue: Currency; virtual; + function GetOldPARAM_TIEMPOIsNull: Boolean; virtual; + procedure SetPARAM_TIEMPOValue(const aValue: Currency); virtual; + procedure SetPARAM_TIEMPOIsNull(const aValue: Boolean); virtual; + function GetPARAM_MARGENValue: Float; virtual; + function GetPARAM_MARGENIsNull: Boolean; virtual; + function GetOldPARAM_MARGENValue: Float; virtual; + function GetOldPARAM_MARGENIsNull: Boolean; virtual; + procedure SetPARAM_MARGENValue(const aValue: Float); virtual; + procedure SetPARAM_MARGENIsNull(const aValue: Boolean); virtual; { Properties } property ID : Integer read GetIDValue write SetIDValue; @@ -306,6 +322,14 @@ type property IVAIsNull : Boolean read GetIVAIsNull write SetIVAIsNull; property OldIVA : Float read GetOldIVAValue; property OldIVAIsNull : Boolean read GetOldIVAIsNull; + property PARAM_TIEMPO : Currency read GetPARAM_TIEMPOValue write SetPARAM_TIEMPOValue; + property PARAM_TIEMPOIsNull : Boolean read GetPARAM_TIEMPOIsNull write SetPARAM_TIEMPOIsNull; + property OldPARAM_TIEMPO : Currency read GetOldPARAM_TIEMPOValue; + property OldPARAM_TIEMPOIsNull : Boolean read GetOldPARAM_TIEMPOIsNull; + property PARAM_MARGEN : Float read GetPARAM_MARGENValue write SetPARAM_MARGENValue; + property PARAM_MARGENIsNull : Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull; + property OldPARAM_MARGEN : Float read GetOldPARAM_MARGENValue; + property OldPARAM_MARGENIsNull : Boolean read GetOldPARAM_MARGENIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; @@ -315,7 +339,7 @@ type { IEmpresasDatosBancoDelta } IEmpresasDatosBancoDelta = interface(IEmpresasDatosBanco) - ['{132B47C7-B0BC-4144-8C00-810C7180BDA0}'] + ['{A084800E-091E-40AD-9B45-63974394595E}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -1215,6 +1239,68 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasIVA] := Null; end; +function TEmpresasBusinessProcessorRules.GetPARAM_TIEMPOValue: Currency; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_TIEMPO]; +end; + +function TEmpresasBusinessProcessorRules.GetPARAM_TIEMPOIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_TIEMPO]); +end; + +function TEmpresasBusinessProcessorRules.GetOldPARAM_TIEMPOValue: Currency; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasPARAM_TIEMPO]; +end; + +function TEmpresasBusinessProcessorRules.GetOldPARAM_TIEMPOIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasPARAM_TIEMPO]); +end; + +procedure TEmpresasBusinessProcessorRules.SetPARAM_TIEMPOValue(const aValue: Currency); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_TIEMPO] := aValue; +end; + +procedure TEmpresasBusinessProcessorRules.SetPARAM_TIEMPOIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_TIEMPO] := Null; +end; + +function TEmpresasBusinessProcessorRules.GetPARAM_MARGENValue: Float; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_MARGEN]; +end; + +function TEmpresasBusinessProcessorRules.GetPARAM_MARGENIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_MARGEN]); +end; + +function TEmpresasBusinessProcessorRules.GetOldPARAM_MARGENValue: Float; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasPARAM_MARGEN]; +end; + +function TEmpresasBusinessProcessorRules.GetOldPARAM_MARGENIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasPARAM_MARGEN]); +end; + +procedure TEmpresasBusinessProcessorRules.SetPARAM_MARGENValue(const aValue: Float); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_MARGEN] := aValue; +end; + +procedure TEmpresasBusinessProcessorRules.SetPARAM_MARGENIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPARAM_MARGEN] := Null; +end; + { TEmpresasDatosBancoBusinessProcessorRules } constructor TEmpresasDatosBancoBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); diff --git a/Source/ApplicationBase/Empresas/Model/uBizEmpresasServer.pas b/Source/ApplicationBase/Empresas/Model/uBizEmpresasServer.pas new file mode 100644 index 00000000..35d9d47d --- /dev/null +++ b/Source/ApplicationBase/Empresas/Model/uBizEmpresasServer.pas @@ -0,0 +1,65 @@ +unit uBizEmpresasServer; + +interface + +uses + uDAInterfaces, uDADelta, uDABusinessProcessor, + schEmpresasServer_Intf; + +const + BIZ_SERVER_EMPRESAS = 'Server.Empresas'; + +type + TBizEmpresasServer = class(TEmpresasBusinessProcessorRules) + protected + procedure AfterProcessChange(Sender: TDABusinessProcessor; aChange: TDADeltaChange; Processed: Boolean; + var CanRemoveFromDelta: Boolean); override; + + + end; + +implementation + +uses + Variants, uDAClasses, srvReferencias_Impl, uBusinessUtils, uROClasses, + uDataModuleServer, schEmpresasClient_Intf, Dialogs; + +{ TBizEmpresasServer } + +procedure TBizEmpresasServer.AfterProcessChange(Sender: TDABusinessProcessor; + aChange: TDADeltaChange; Processed: Boolean; var CanRemoveFromDelta: Boolean); +var + AConn : IDAConnection; + +begin + inherited; + + { Por defecto, mantenemos los deltas por si alguna tabla hija los necesita } + CanRemoveFromDelta := False; + + case aChange.ChangeType of + ctInsert, ctUpdate: begin + if ((Sender.CurrentChange.OldValueByName[fld_EmpresasPARAM_TIEMPO] <> Sender.CurrentChange.NewValueByName[fld_EmpresasPARAM_TIEMPO]) + or (Sender.CurrentChange.OldValueByName[fld_EmpresasPARAM_MARGEN] <> Sender.CurrentChange.NewValueByName[fld_EmpresasPARAM_MARGEN])) then + begin + try + //Recalculamos los PVP del catalogo + AConn := dmServer.ConnectionManager.NewConnection(dmServer.ConnectionManager.GetDefaultConnectionName); + AConn.BeginTransaction; + Sender.Schema.NewCommand(AConn, 'RecalcularPVPArticulos', ['ID_EMPRESA'], [Sender.CurrentChange.OldValueByName[fld_EmpresasID]]); + AConn.CommitTransaction; + except + AConn.RollbackTransaction; + RaiseError('RecalcularPVPArticulos'); + end; + + AConn:= Nil; + end; + end; + end; +end; + +initialization + RegisterBusinessProcessorRules(BIZ_SERVER_EMPRESAS, TBizEmpresasServer); + +end. diff --git a/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm b/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm index f593e270..64e06ad8 100644 --- a/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm +++ b/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.dfm @@ -117,6 +117,14 @@ object srvEmpresas: TsrvEmpresas item DatasetField = 'IVA' TableField = 'IVA' + end + item + DatasetField = 'PARAM_TIEMPO' + TableField = 'PARAM_TIEMPO' + end + item + DatasetField = 'PARAM_MARGEN' + TableField = 'PARAM_MARGEN' end> end> Name = 'Empresas' @@ -256,6 +264,14 @@ object srvEmpresas: TsrvEmpresas Name = 'IVA' DataType = datFloat DictionaryEntry = 'Empresas_IVA' + end + item + Name = 'PARAM_TIEMPO' + DataType = datCurrency + end + item + Name = 'PARAM_MARGEN' + DataType = datFloat end> end item @@ -383,7 +399,25 @@ object srvEmpresas: TsrvEmpresas end> JoinDataTables = <> UnionDataTables = <> - Commands = <> + Commands = < + item + Params = < + item + Name = 'id_empresa' + Value = '' + end> + Statements = < + item + Connection = 'IBX' + ConnectionType = 'Interbase' + Default = True + Name = 'IBX' + SQL = 'execute procedure PRO_ART_RECALCULAR_PVP :id_empresa'#10 + StatementType = stSQL + ColumnMappings = <> + end> + Name = 'RecalcularPVPArticulos' + end> RelationShips = < item Name = 'FK_EmpresasDatosBanco_Empresas' @@ -639,12 +673,20 @@ object srvEmpresas: TsrvEmpresas Top = 90 DiagramData = ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 end object DABin2DataStreamer: TDABin2DataStreamer Left = 48 Top = 88 end + object bpEmpresas: TDABusinessProcessor + Schema = schEmpresas + ReferencedDataset = 'Empresas' + ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poAutoGenerateRefreshDataset, poPrepareCommands] + UpdateMode = updWhereKeyOnly + Left = 264 + Top = 24 + end end diff --git a/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.pas b/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.pas index a066dd8c..472b7c07 100644 --- a/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.pas +++ b/Source/ApplicationBase/Empresas/Servidor/srvEmpresas_Impl.pas @@ -23,6 +23,7 @@ type TsrvEmpresas = class(TDataAbstractService, IsrvEmpresas) Diagrams: TDADiagrams; DABin2DataStreamer: TDABin2DataStreamer; + bpEmpresas: TDABusinessProcessor; schEmpresas: TDASchema; DataDictionary: TDADataDictionary; procedure DARemoteServiceCreate(Sender: TObject); @@ -45,7 +46,7 @@ uses {Generated:} FactuGES_Invk, uDataModuleServer, uRORemoteDataModule, uDatabaseUtils, Dialogs, Variants, uROStreamSerializer, uROBinaryHelpers, uSesionesUtils, schEmpresasClient_Intf, uUsersManager, - uRestriccionesUsuarioUtils, uROClasses; + uRestriccionesUsuarioUtils, uROClasses, uBizEmpresasServer; procedure Create_srvEmpresas(out anInstance : IUnknown); begin @@ -117,6 +118,7 @@ end; procedure TsrvEmpresas.DARemoteServiceCreate(Sender: TObject); begin SessionManager := dmServer.SessionManager; + bpEmpresas.BusinessRulesID := BIZ_SERVER_EMPRESAS; end; procedure TsrvEmpresas.DataAbstractServiceBeforeAcquireConnection( diff --git a/Source/ApplicationBase/Empresas/Views/uEditorEmpresa.dfm b/Source/ApplicationBase/Empresas/Views/uEditorEmpresa.dfm index 58c60222..7f37cfc9 100644 --- a/Source/ApplicationBase/Empresas/Views/uEditorEmpresa.dfm +++ b/Source/ApplicationBase/Empresas/Views/uEditorEmpresa.dfm @@ -119,28 +119,28 @@ inherited fEditorEmpresa: TfEditorEmpresa ExplicitTop = 267 end inherited eCalle: TcxDBTextEdit - Top = 189 - ExplicitTop = 189 + Top = 240 + ExplicitTop = 240 ExplicitWidth = 234 Width = 234 end inherited eProvincia: TcxDBTextEdit - Top = 243 - ExplicitTop = 243 + Top = 294 + ExplicitTop = 294 ExplicitWidth = 234 Width = 234 end inherited ePoblacion: TcxDBTextEdit - Top = 216 - ExplicitTop = 216 + Top = 267 + ExplicitTop = 267 ExplicitWidth = 99 Width = 99 end inherited eCodigoPostal: TcxDBTextEdit Left = 286 - Top = 216 + Top = 267 ExplicitLeft = 286 - ExplicitTop = 216 + ExplicitTop = 267 end inherited ePaginaWeb: TcxDBTextEdit Left = 474 @@ -167,11 +167,11 @@ inherited fEditorEmpresa: TfEditorEmpresa Width = 164 end inherited cxDBMemo1: TcxDBMemo - Top = 294 - ExplicitTop = 294 + Top = 345 + ExplicitTop = 345 ExplicitWidth = 329 - ExplicitHeight = 115 - Height = 115 + ExplicitHeight = 64 + Height = 64 Width = 329 end inherited eTlfParticular: TcxDBTextEdit @@ -238,6 +238,14 @@ inherited fEditorEmpresa: TfEditorEmpresa Height = 142 Width = 230 end + inherited eParamMargen: TcxDBSpinEdit + Top = 189 + ExplicitTop = 189 + end + inherited eParamTiempo: TcxDBCurrencyEdit + Top = 189 + ExplicitTop = 189 + end end end end diff --git a/Source/ApplicationBase/Empresas/Views/uEditorEmpresa.pas b/Source/ApplicationBase/Empresas/Views/uEditorEmpresa.pas index 8bfcfa6c..239997a7 100644 --- a/Source/ApplicationBase/Empresas/Views/uEditorEmpresa.pas +++ b/Source/ApplicationBase/Empresas/Views/uEditorEmpresa.pas @@ -79,7 +79,11 @@ end; procedure TfEditorEmpresa.GuardarInterno; begin inherited; - FController.Guardar(FEmpresa); + if FController.Guardar(FEmpresa) + and frViewEmpresa1.bModificarCatalogo then + Application.MessageBox('Los precios del catálogo de artículos han sido modificados correctamente,' + + #13 + #10 + 'con el nuevo margen de venta y precio minuto', 'Atención', MB_OK); + Modified := False; end; diff --git a/Source/ApplicationBase/Empresas/Views/uViewEmpresa.dfm b/Source/ApplicationBase/Empresas/Views/uViewEmpresa.dfm index dd573e15..8ca52619 100644 --- a/Source/ApplicationBase/Empresas/Views/uViewEmpresa.dfm +++ b/Source/ApplicationBase/Empresas/Views/uViewEmpresa.dfm @@ -1,20 +1,20 @@ inherited frViewEmpresa: TfrViewEmpresa - Width = 590 - Height = 385 - ExplicitWidth = 590 - ExplicitHeight = 385 + Width = 734 + Height = 442 + ExplicitWidth = 734 + ExplicitHeight = 442 object dxLayoutControl1: TdxLayoutControl Left = 0 Top = 0 - Width = 590 - Height = 385 + Width = 734 + Height = 442 Align = alClient ParentBackground = True TabOrder = 0 TabStop = False AutoContentSizes = [acsWidth, acsHeight] object PngSpeedButton1: TPngSpeedButton - Left = 545 + Left = 689 Top = 305 Width = 23 Height = 22 @@ -22,7 +22,7 @@ inherited frViewEmpresa: TfrViewEmpresa PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled] end object PngSpeedButton2: TPngSpeedButton - Left = 545 + Left = 689 Top = 277 Width = 23 Height = 22 @@ -31,7 +31,7 @@ inherited frViewEmpresa: TfrViewEmpresa end object eCalle: TcxDBTextEdit Left = 117 - Top = 193 + Top = 272 DataBinding.DataField = 'CALLE' DataBinding.DataSource = DADataSource Style.BorderColor = clWindowFrame @@ -44,12 +44,12 @@ inherited frViewEmpresa: TfrViewEmpresa StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 4 - Width = 194 + TabOrder = 6 + Width = 324 end object eProvincia: TcxDBTextEdit Left = 117 - Top = 247 + Top = 326 DataBinding.DataField = 'PROVINCIA' DataBinding.DataSource = DADataSource Style.BorderColor = clWindowFrame @@ -62,12 +62,12 @@ inherited frViewEmpresa: TfrViewEmpresa StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 7 - Width = 194 + TabOrder = 9 + Width = 324 end object ePoblacion: TcxDBTextEdit Left = 117 - Top = 220 + Top = 299 DataBinding.DataField = 'POBLACION' DataBinding.DataSource = DADataSource Style.BorderColor = clWindowFrame @@ -80,12 +80,12 @@ inherited frViewEmpresa: TfrViewEmpresa StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 5 - Width = 59 + TabOrder = 7 + Width = 189 end object eCodigoPostal: TcxDBTextEdit - Left = 246 - Top = 220 + Left = 376 + Top = 299 DataBinding.DataField = 'CODIGO_POSTAL' DataBinding.DataSource = DADataSource Style.BorderColor = clWindowFrame @@ -98,11 +98,11 @@ inherited frViewEmpresa: TfrViewEmpresa StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 6 + TabOrder = 8 Width = 65 end object ePaginaWeb: TcxDBTextEdit - Left = 436 + Left = 566 Top = 220 DataBinding.DataField = 'PAGINA_WEB' DataBinding.DataSource = DADataSource @@ -116,11 +116,11 @@ inherited frViewEmpresa: TfrViewEmpresa StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 15 - Width = 132 + TabOrder = 17 + Width = 146 end object eMailParticular: TcxDBTextEdit - Left = 436 + Left = 566 Top = 193 DataBinding.DataField = 'EMAIL_2' DataBinding.DataSource = DADataSource @@ -134,11 +134,11 @@ inherited frViewEmpresa: TfrViewEmpresa StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 14 - Width = 132 + TabOrder = 16 + Width = 146 end object eMailTrabajo: TcxDBTextEdit - Left = 436 + Left = 566 Top = 166 DataBinding.DataField = 'EMAIL_1' DataBinding.DataSource = DADataSource @@ -152,12 +152,12 @@ inherited frViewEmpresa: TfrViewEmpresa StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 13 - Width = 132 + TabOrder = 15 + Width = 146 end object cxDBMemo1: TcxDBMemo Left = 22 - Top = 304 + Top = 383 DataBinding.DataField = 'NOTAS' DataBinding.DataSource = DADataSource Style.BorderColor = clWindowFrame @@ -170,12 +170,12 @@ inherited frViewEmpresa: TfrViewEmpresa StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 8 - Height = 59 - Width = 289 + TabOrder = 10 + Height = 29 + Width = 419 end object eTlfParticular: TcxDBTextEdit - Left = 436 + Left = 566 Top = 55 DataBinding.DataField = 'TELEFONO_2' DataBinding.DataSource = DADataSource @@ -189,11 +189,11 @@ inherited frViewEmpresa: TfrViewEmpresa StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 10 - Width = 132 + TabOrder = 12 + Width = 146 end object eTlfTrabajo: TcxDBTextEdit - Left = 436 + Left = 566 Top = 28 DataBinding.DataField = 'TELEFONO_1' DataBinding.DataSource = DADataSource @@ -207,11 +207,11 @@ inherited frViewEmpresa: TfrViewEmpresa StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 9 - Width = 132 + TabOrder = 11 + Width = 146 end object eTlfMovil: TcxDBTextEdit - Left = 436 + Left = 566 Top = 82 DataBinding.DataField = 'MOVIL_1' DataBinding.DataSource = DADataSource @@ -225,11 +225,11 @@ inherited frViewEmpresa: TfrViewEmpresa StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 11 - Width = 132 + TabOrder = 13 + Width = 146 end object eFax: TcxDBTextEdit - Left = 436 + Left = 566 Top = 109 DataBinding.DataField = 'FAX' DataBinding.DataSource = DADataSource @@ -243,8 +243,8 @@ inherited frViewEmpresa: TfrViewEmpresa StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 12 - Width = 132 + TabOrder = 14 + Width = 146 end object eNombre: TcxDBTextEdit Left = 117 @@ -263,7 +263,7 @@ inherited frViewEmpresa: TfrViewEmpresa StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True TabOrder = 0 - Width = 194 + Width = 324 end object eNIFCIF: TcxDBTextEdit Left = 117 @@ -282,7 +282,7 @@ inherited frViewEmpresa: TfrViewEmpresa StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True TabOrder = 1 - Width = 194 + Width = 324 end object memRegistroMercantil: TcxDBMemo Left = 117 @@ -302,7 +302,7 @@ inherited frViewEmpresa: TfrViewEmpresa StyleHot.LookAndFeel.NativeStyle = True TabOrder = 2 Height = 48 - Width = 194 + Width = 324 end object cxDBSpinEdit1: TcxDBSpinEdit Left = 117 @@ -325,7 +325,7 @@ inherited frViewEmpresa: TfrViewEmpresa Width = 60 end object cxDBImage1: TcxDBImage - Left = 341 + Left = 471 Top = 277 DataBinding.DataField = 'LOGOTIPO' DataBinding.DataSource = DADataSource @@ -337,9 +337,51 @@ inherited frViewEmpresa: TfrViewEmpresa StyleDisabled.LookAndFeel.NativeStyle = True StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 16 - Height = 86 - Width = 198 + TabOrder = 18 + Height = 143 + Width = 212 + end + object eParamMargen: TcxDBSpinEdit + Left = 117 + Top = 215 + DataBinding.DataField = 'PARAM_MARGEN' + DataBinding.DataSource = DADataSource + Properties.OnValidate = eParamMargenPropertiesValidate + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + Style.ButtonStyle = bts3D + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 4 + Width = 60 + end + object eParamTiempo: TcxDBCurrencyEdit + Left = 240 + Top = 215 + DataBinding.DataField = 'PARAM_TIEMPO' + DataBinding.DataSource = DADataSource + Properties.Alignment.Horz = taRightJustify + Properties.OnValidate = eParamTiempoPropertiesValidate + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 5 + Width = 100 end object dxLayoutControl1Group_Root: TdxLayoutGroup ShowCaption = False @@ -380,6 +422,20 @@ inherited frViewEmpresa: TfrViewEmpresa ControlOptions.ShowBorder = False end end + object dxLayoutControl1Group13: TdxLayoutGroup + Caption = 'Datos cat'#225'logo art'#237'culos' + LayoutDirection = ldHorizontal + object dxLayoutControl1Item18: TdxLayoutItem + Caption = 'Margen de venta:' + Control = eParamMargen + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item21: TdxLayoutItem + Caption = 'Precio min:' + Control = eParamTiempo + ControlOptions.ShowBorder = False + end + end object dxLayoutControl1Group3: TdxLayoutGroup AutoAligns = [aaHorizontal] Caption = 'Direcci'#243'n' diff --git a/Source/ApplicationBase/Empresas/Views/uViewEmpresa.pas b/Source/ApplicationBase/Empresas/Views/uViewEmpresa.pas index 4a0cd1ec..adaa9308 100644 --- a/Source/ApplicationBase/Empresas/Views/uViewEmpresa.pas +++ b/Source/ApplicationBase/Empresas/Views/uViewEmpresa.pas @@ -15,7 +15,7 @@ uses dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins, dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinSilver, dxSkinStardust, dxSkinsDefaultPainters, - dxSkinValentine, dxSkinXmas2008Blue, dxSkinsdxLCPainter; + dxSkinValentine, dxSkinXmas2008Blue, dxSkinsdxLCPainter, cxCurrencyEdit; type IViewEmpresa = interface(IViewBase) @@ -84,16 +84,26 @@ type PngSpeedButton2: TPngSpeedButton; dxLayoutControl1Item20: TdxLayoutItem; dxLayoutControl1Group12: TdxLayoutGroup; + dxLayoutControl1Group13: TdxLayoutGroup; + dxLayoutControl1Item18: TdxLayoutItem; + eParamMargen: TcxDBSpinEdit; + dxLayoutControl1Item21: TdxLayoutItem; + eParamTiempo: TcxDBCurrencyEdit; procedure actAnadirExecute(Sender: TObject); procedure actEliminarExecute(Sender: TObject); procedure actEliminarUpdate(Sender: TObject); procedure actAnadirUpdate(Sender: TObject); + procedure eParamTiempoPropertiesValidate(Sender: TObject; + var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean); + procedure eParamMargenPropertiesValidate(Sender: TObject; + var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean); private FEmpresa: IBizEmpresa; protected function GetEmpresa: IBizEmpresa; procedure SetEmpresa(const Value: IBizEmpresa); public + bModificarCatalogo: Boolean; constructor Create(AOwner : TComponent); override; end; @@ -159,6 +169,29 @@ end; constructor TfrViewEmpresa.Create(AOwner : TComponent); begin inherited; + bModificarCatalogo := False; +end; + +procedure TfrViewEmpresa.eParamMargenPropertiesValidate(Sender: TObject; + var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean); +begin + inherited; + + if (Application.MessageBox('Si modifica el margen de venta, se recalcularán los precios del catálogo de artículos, ¿Esta seguro que desea continuar?', 'Atención', MB_YESNO) = IDYES) then + bModificarCatalogo := True + else + DisplayValue := eParamTiempo.Value; +end; + +procedure TfrViewEmpresa.eParamTiempoPropertiesValidate(Sender: TObject; + var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean); +begin + inherited; + + if (Application.MessageBox('Si modifica el precio minuto, se recalcularán los precios del catálogo de artículos, ¿Esta seguro que desea continuar?', 'Atención', MB_YESNO) = IDYES) then + bModificarCatalogo := True + else + DisplayValue := eParamTiempo.Value; end; function TfrViewEmpresa.GetEmpresa: IBizEmpresa; diff --git a/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas b/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas index 400fc096..741c6845 100644 --- a/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas +++ b/Source/Modulos/Albaranes de cliente/Controller/uDetallesAlbaranClienteController.pas @@ -152,7 +152,7 @@ end; procedure TDetallesAlbaranClienteController.RellenarImportes(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); begin if Assigned(AArticulos) then - ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := AArticulos.PRECIO_PVP + ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := AArticulos.PRECIO_PVP_TOTAL else ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := Null; end; diff --git a/Source/Modulos/Albaranes de proveedor/Views/uViewElegirArticulosAlbaranesProveedor.dfm b/Source/Modulos/Albaranes de proveedor/Views/uViewElegirArticulosAlbaranesProveedor.dfm index 1c8fe873..ccbc53ee 100644 --- a/Source/Modulos/Albaranes de proveedor/Views/uViewElegirArticulosAlbaranesProveedor.dfm +++ b/Source/Modulos/Albaranes de proveedor/Views/uViewElegirArticulosAlbaranesProveedor.dfm @@ -1,18 +1,11 @@ inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaranesProveedor Height = 414 - OnDestroy = CustomViewDestroy ExplicitHeight = 414 inherited cxGrid: TcxGrid Height = 286 RootLevelOptions.DetailTabsPosition = dtpTop OnActiveTabChanged = cxGridActiveTabChanged ExplicitHeight = 286 - inherited cxGridView: TcxGridDBTableView - object cxGridViewID_PROVEEDOR: TcxGridDBColumn - DataBinding.FieldName = 'ID_PROVEEDOR' - Visible = False - end - end object cxGridLevel1: TcxGridLevel Caption = 'Otros proveedores' end @@ -20,10 +13,6 @@ inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaran inherited frViewFiltroBase1: TfrViewFiltroBase inherited TBXDockablePanel1: TTBXDockablePanel inherited dxLayoutControl1: TdxLayoutControl - inherited txtFiltroTodo: TcxTextEdit - ExplicitWidth = 273 - Width = 273 - end inherited edtFechaIniFiltro: TcxDateEdit ExplicitWidth = 121 Width = 121 @@ -32,6 +21,10 @@ inherited frViewElegirArticulosAlbaranesProveedor: TfrViewElegirArticulosAlbaran ExplicitWidth = 121 Width = 121 end + inherited eLista: TcxComboBox + Left = 383 + ExplicitLeft = 383 + end end end end diff --git a/Source/Modulos/Albaranes de proveedor/Views/uViewElegirArticulosAlbaranesProveedor.pas b/Source/Modulos/Albaranes de proveedor/Views/uViewElegirArticulosAlbaranesProveedor.pas index 4f3ae741..4d4b5d2c 100644 --- a/Source/Modulos/Albaranes de proveedor/Views/uViewElegirArticulosAlbaranesProveedor.pas +++ b/Source/Modulos/Albaranes de proveedor/Views/uViewElegirArticulosAlbaranesProveedor.pas @@ -12,7 +12,13 @@ uses uDADataTable, cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, uBizContactos, dxPgsDlg, ActnList, TB2Item, TBX, TB2Toolbar, TBXDkPanels, TB2Dock, - uViewFiltroBase; + uViewFiltroBase, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinCaramel, + dxSkinCoffee, dxSkinGlassOceans, dxSkiniMaginary, dxSkinLilian, + dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins, + dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green, + dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinSilver, dxSkinStardust, + dxSkinsDefaultPainters, dxSkinValentine, dxSkinXmas2008Blue, + dxSkinscxPCPainter, uDAInterfaces; type IViewElegirArticulosAlbaranesProveedor = interface(IViewArticulos) @@ -24,7 +30,6 @@ type TfrViewElegirArticulosAlbaranesProveedor = class(TfrViewArticulos, IViewElegirArticulosAlbaranesProveedor) cxGridLevel1: TcxGridLevel; - cxGridViewID_PROVEEDOR: TcxGridDBColumn; procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); procedure CustomViewDestroy(Sender: TObject); diff --git a/Source/Modulos/Articulos/Data/uDataModuleArticulos.dfm b/Source/Modulos/Articulos/Data/uDataModuleArticulos.dfm index 2a161bdc..01c7452a 100644 --- a/Source/Modulos/Articulos/Data/uDataModuleArticulos.dfm +++ b/Source/Modulos/Articulos/Data/uDataModuleArticulos.dfm @@ -165,21 +165,45 @@ inherited DataModuleArticulos: TDataModuleArticulos DisplayLabel = 'Ref. fabricante' DictionaryEntry = 'Articulos_REFERENCIA_FABR' end + item + Name = 'PARAM_MARGEN' + DataType = datFloat + DisplayLabel = 'Margen' + DictionaryEntry = 'Articulos_PARAM_MARGEN' + end + item + Name = 'PRECIO_PVP_VENTA' + DataType = datCurrency + DisplayLabel = 'Precio PVP (Solo suministro)' + Alignment = taRightJustify + DictionaryEntry = 'Articulos_PRECIO_PVP_VENTA' + end item Name = 'TIEMPO' DataType = datInteger + DisplayLabel = 'Tiempo' + DictionaryEntry = 'Articulos_TIEMPO' end item Name = 'PARAM_TIEMPO' DataType = datFloat + DisplayLabel = 'Precio min' + Alignment = taRightJustify + DictionaryEntry = 'Articulos_PARAM_TIEMPO' end item Name = 'MANO_OBRA' DataType = datCurrency + DisplayLabel = 'Mano de obra' + Alignment = taRightJustify + DictionaryEntry = 'Articulos_MANO_OBRA' end item - Name = 'PRECIO_PVP' + Name = 'PRECIO_PVP_TOTAL' DataType = datCurrency + DisplayLabel = 'Precio P.V.P (Total)' + Alignment = taRightJustify + DictionaryEntry = 'Articulos_PRECIO_PVP_TOTAL' end> Params = <> StreamingOptions = [soDisableEventsWhileStreaming] @@ -339,6 +363,16 @@ inherited DataModuleArticulos: TDataModuleArticulos DisplayLabel = 'Ref. fabricante' DictionaryEntry = 'Articulos_REFERENCIA_FABR' end + item + Name = 'PARAM_MARGEN' + DataType = datFloat + end + item + Name = 'PRECIO_PVP_VENTA' + DataType = datCurrency + DisplayLabel = 'Precio P.V.P (Solo suministro)' + Alignment = taRightJustify + end item Name = 'TIEMPO' DataType = datInteger @@ -350,10 +384,14 @@ inherited DataModuleArticulos: TDataModuleArticulos item Name = 'MANO_OBRA' DataType = datCurrency + DisplayLabel = 'Mano de obra' + Alignment = taRightJustify end item - Name = 'PRECIO_PVP' + Name = 'PRECIO_PVP_TOTAL' DataType = datCurrency + DisplayLabel = 'Precio P.V.P. (Total)' + Alignment = taRightJustify end> Params = < item @@ -388,7 +426,12 @@ inherited DataModuleArticulos: TDataModuleArticulos DataType = datString Size = 255 end> - Params = <> + Params = < + item + Name = 'ID_EMPRESA' + Value = '' + ParamType = daptInput + end> StreamingOptions = [soDisableEventsWhileStreaming] RemoteDataAdapter = rda_Articulos DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] diff --git a/Source/Modulos/Articulos/Model/schArticulosClient_Intf.pas b/Source/Modulos/Articulos/Model/schArticulosClient_Intf.pas index 65936789..b69180ea 100644 --- a/Source/Modulos/Articulos/Model/schArticulosClient_Intf.pas +++ b/Source/Modulos/Articulos/Model/schArticulosClient_Intf.pas @@ -9,13 +9,23 @@ 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_Articulos = '{7AF29D8D-9759-4857-A440-E0AE2002CA7F}'; - RID_ArticulosParaCliente = '{5FDF1300-DD2E-45E9-88DF-CA220201A815}'; + RID_ProveedoresConArticulos = '{1DE48ADE-5F4F-434D-BF2F-10BA8A363F99}'; + RID_Articulos = '{E1F7E717-39B6-41AB-B4FA-1F106F20F8DA}'; + RID_ArticulosParaCliente = '{E2144191-7CB6-4240-9B68-6CC883F80001}'; { Data table names } + nme_ProveedoresConArticulos = 'ProveedoresConArticulos'; nme_Articulos = 'Articulos'; nme_ArticulosParaCliente = 'ArticulosParaCliente'; + { ProveedoresConArticulos fields } + fld_ProveedoresConArticulosID_PROVEEDOR = 'ID_PROVEEDOR'; + fld_ProveedoresConArticulosNOMBRE = 'NOMBRE'; + + { ProveedoresConArticulos field indexes } + idx_ProveedoresConArticulosID_PROVEEDOR = 0; + idx_ProveedoresConArticulosNOMBRE = 1; + { Articulos fields } fld_ArticulosID = 'ID'; fld_ArticulosID_EMPRESA = 'ID_EMPRESA'; @@ -39,10 +49,12 @@ const fld_ArticulosELIMINADO = 'ELIMINADO'; fld_ArticulosFABRICANTE = 'FABRICANTE'; fld_ArticulosREFERENCIA_FABR = 'REFERENCIA_FABR'; + fld_ArticulosPARAM_MARGEN = 'PARAM_MARGEN'; + fld_ArticulosPRECIO_PVP_VENTA = 'PRECIO_PVP_VENTA'; fld_ArticulosTIEMPO = 'TIEMPO'; fld_ArticulosPARAM_TIEMPO = 'PARAM_TIEMPO'; fld_ArticulosMANO_OBRA = 'MANO_OBRA'; - fld_ArticulosPRECIO_PVP = 'PRECIO_PVP'; + fld_ArticulosPRECIO_PVP_TOTAL = 'PRECIO_PVP_TOTAL'; { Articulos field indexes } idx_ArticulosID = 0; @@ -67,10 +79,12 @@ const idx_ArticulosELIMINADO = 19; idx_ArticulosFABRICANTE = 20; idx_ArticulosREFERENCIA_FABR = 21; - idx_ArticulosTIEMPO = 22; - idx_ArticulosPARAM_TIEMPO = 23; - idx_ArticulosMANO_OBRA = 24; - idx_ArticulosPRECIO_PVP = 25; + idx_ArticulosPARAM_MARGEN = 22; + idx_ArticulosPRECIO_PVP_VENTA = 23; + idx_ArticulosTIEMPO = 24; + idx_ArticulosPARAM_TIEMPO = 25; + idx_ArticulosMANO_OBRA = 26; + idx_ArticulosPRECIO_PVP_TOTAL = 27; { ArticulosParaCliente fields } fld_ArticulosParaClienteID = 'ID'; @@ -95,10 +109,12 @@ const fld_ArticulosParaClienteELIMINADO = 'ELIMINADO'; fld_ArticulosParaClienteFABRICANTE = 'FABRICANTE'; fld_ArticulosParaClienteREFERENCIA_FABR = 'REFERENCIA_FABR'; + fld_ArticulosParaClientePARAM_MARGEN = 'PARAM_MARGEN'; + fld_ArticulosParaClientePRECIO_PVP_VENTA = 'PRECIO_PVP_VENTA'; fld_ArticulosParaClienteTIEMPO = 'TIEMPO'; fld_ArticulosParaClientePARAM_TIEMPO = 'PARAM_TIEMPO'; fld_ArticulosParaClienteMANO_OBRA = 'MANO_OBRA'; - fld_ArticulosParaClientePRECIO_PVP = 'PRECIO_PVP'; + fld_ArticulosParaClientePRECIO_PVP_TOTAL = 'PRECIO_PVP_TOTAL'; { ArticulosParaCliente field indexes } idx_ArticulosParaClienteID = 0; @@ -123,15 +139,64 @@ const idx_ArticulosParaClienteELIMINADO = 19; idx_ArticulosParaClienteFABRICANTE = 20; idx_ArticulosParaClienteREFERENCIA_FABR = 21; - idx_ArticulosParaClienteTIEMPO = 22; - idx_ArticulosParaClientePARAM_TIEMPO = 23; - idx_ArticulosParaClienteMANO_OBRA = 24; - idx_ArticulosParaClientePRECIO_PVP = 25; + idx_ArticulosParaClientePARAM_MARGEN = 22; + idx_ArticulosParaClientePRECIO_PVP_VENTA = 23; + idx_ArticulosParaClienteTIEMPO = 24; + idx_ArticulosParaClientePARAM_TIEMPO = 25; + idx_ArticulosParaClienteMANO_OBRA = 26; + idx_ArticulosParaClientePRECIO_PVP_TOTAL = 27; type + { IProveedoresConArticulos } + IProveedoresConArticulos = interface(IDAStronglyTypedDataTable) + ['{961767DC-ED33-4DEE-8A1D-B2721D001CA0}'] + { Property getters and setters } + function GetID_PROVEEDORValue: Integer; + procedure SetID_PROVEEDORValue(const aValue: Integer); + function GetID_PROVEEDORIsNull: Boolean; + procedure SetID_PROVEEDORIsNull(const aValue: Boolean); + function GetNOMBREValue: String; + procedure SetNOMBREValue(const aValue: String); + function GetNOMBREIsNull: Boolean; + procedure SetNOMBREIsNull(const aValue: Boolean); + + + { Properties } + property ID_PROVEEDOR: Integer read GetID_PROVEEDORValue write SetID_PROVEEDORValue; + property ID_PROVEEDORIsNull: Boolean read GetID_PROVEEDORIsNull write SetID_PROVEEDORIsNull; + property NOMBRE: String read GetNOMBREValue write SetNOMBREValue; + property NOMBREIsNull: Boolean read GetNOMBREIsNull write SetNOMBREIsNull; + end; + + { TProveedoresConArticulosDataTableRules } + TProveedoresConArticulosDataTableRules = class(TIntfObjectDADataTableRules, IProveedoresConArticulos) + private + protected + { Property getters and setters } + function GetID_PROVEEDORValue: Integer; virtual; + procedure SetID_PROVEEDORValue(const aValue: Integer); virtual; + function GetID_PROVEEDORIsNull: Boolean; virtual; + procedure SetID_PROVEEDORIsNull(const aValue: Boolean); virtual; + function GetNOMBREValue: String; virtual; + procedure SetNOMBREValue(const aValue: String); virtual; + function GetNOMBREIsNull: Boolean; virtual; + procedure SetNOMBREIsNull(const aValue: Boolean); virtual; + + { Properties } + property ID_PROVEEDOR: Integer read GetID_PROVEEDORValue write SetID_PROVEEDORValue; + property ID_PROVEEDORIsNull: Boolean read GetID_PROVEEDORIsNull write SetID_PROVEEDORIsNull; + property NOMBRE: String read GetNOMBREValue write SetNOMBREValue; + property NOMBREIsNull: Boolean read GetNOMBREIsNull write SetNOMBREIsNull; + + public + constructor Create(aDataTable: TDADataTable); override; + destructor Destroy; override; + + end; + { IArticulos } IArticulos = interface(IDAStronglyTypedDataTable) - ['{688FF0B4-9CA5-4C09-B82C-4D288BCF418F}'] + ['{F7377A62-61F7-434E-B744-90DA0486BF14}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -220,6 +285,14 @@ type procedure SetREFERENCIA_FABRValue(const aValue: String); function GetREFERENCIA_FABRIsNull: Boolean; procedure SetREFERENCIA_FABRIsNull(const aValue: Boolean); + function GetPARAM_MARGENValue: Float; + procedure SetPARAM_MARGENValue(const aValue: Float); + function GetPARAM_MARGENIsNull: Boolean; + procedure SetPARAM_MARGENIsNull(const aValue: Boolean); + function GetPRECIO_PVP_VENTAValue: Currency; + procedure SetPRECIO_PVP_VENTAValue(const aValue: Currency); + function GetPRECIO_PVP_VENTAIsNull: Boolean; + procedure SetPRECIO_PVP_VENTAIsNull(const aValue: Boolean); function GetTIEMPOValue: Integer; procedure SetTIEMPOValue(const aValue: Integer); function GetTIEMPOIsNull: Boolean; @@ -232,10 +305,10 @@ type procedure SetMANO_OBRAValue(const aValue: Currency); function GetMANO_OBRAIsNull: Boolean; procedure SetMANO_OBRAIsNull(const aValue: Boolean); - function GetPRECIO_PVPValue: Currency; - procedure SetPRECIO_PVPValue(const aValue: Currency); - function GetPRECIO_PVPIsNull: Boolean; - procedure SetPRECIO_PVPIsNull(const aValue: Boolean); + function GetPRECIO_PVP_TOTALValue: Currency; + procedure SetPRECIO_PVP_TOTALValue(const aValue: Currency); + function GetPRECIO_PVP_TOTALIsNull: Boolean; + procedure SetPRECIO_PVP_TOTALIsNull(const aValue: Boolean); { Properties } @@ -283,14 +356,18 @@ type property FABRICANTEIsNull: Boolean read GetFABRICANTEIsNull write SetFABRICANTEIsNull; property REFERENCIA_FABR: String read GetREFERENCIA_FABRValue write SetREFERENCIA_FABRValue; property REFERENCIA_FABRIsNull: Boolean read GetREFERENCIA_FABRIsNull write SetREFERENCIA_FABRIsNull; + property PARAM_MARGEN: Float read GetPARAM_MARGENValue write SetPARAM_MARGENValue; + property PARAM_MARGENIsNull: Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull; + property PRECIO_PVP_VENTA: Currency read GetPRECIO_PVP_VENTAValue write SetPRECIO_PVP_VENTAValue; + property PRECIO_PVP_VENTAIsNull: Boolean read GetPRECIO_PVP_VENTAIsNull write SetPRECIO_PVP_VENTAIsNull; property TIEMPO: Integer read GetTIEMPOValue write SetTIEMPOValue; property TIEMPOIsNull: Boolean read GetTIEMPOIsNull write SetTIEMPOIsNull; property PARAM_TIEMPO: Float read GetPARAM_TIEMPOValue write SetPARAM_TIEMPOValue; property PARAM_TIEMPOIsNull: Boolean read GetPARAM_TIEMPOIsNull write SetPARAM_TIEMPOIsNull; property MANO_OBRA: Currency read GetMANO_OBRAValue write SetMANO_OBRAValue; property MANO_OBRAIsNull: Boolean read GetMANO_OBRAIsNull write SetMANO_OBRAIsNull; - property PRECIO_PVP: Currency read GetPRECIO_PVPValue write SetPRECIO_PVPValue; - property PRECIO_PVPIsNull: Boolean read GetPRECIO_PVPIsNull write SetPRECIO_PVPIsNull; + property PRECIO_PVP_TOTAL: Currency read GetPRECIO_PVP_TOTALValue write SetPRECIO_PVP_TOTALValue; + property PRECIO_PVP_TOTALIsNull: Boolean read GetPRECIO_PVP_TOTALIsNull write SetPRECIO_PVP_TOTALIsNull; end; { TArticulosDataTableRules } @@ -387,6 +464,14 @@ type procedure SetREFERENCIA_FABRValue(const aValue: String); virtual; function GetREFERENCIA_FABRIsNull: Boolean; virtual; procedure SetREFERENCIA_FABRIsNull(const aValue: Boolean); virtual; + function GetPARAM_MARGENValue: Float; virtual; + procedure SetPARAM_MARGENValue(const aValue: Float); virtual; + function GetPARAM_MARGENIsNull: Boolean; virtual; + procedure SetPARAM_MARGENIsNull(const aValue: Boolean); virtual; + function GetPRECIO_PVP_VENTAValue: Currency; virtual; + procedure SetPRECIO_PVP_VENTAValue(const aValue: Currency); virtual; + function GetPRECIO_PVP_VENTAIsNull: Boolean; virtual; + procedure SetPRECIO_PVP_VENTAIsNull(const aValue: Boolean); virtual; function GetTIEMPOValue: Integer; virtual; procedure SetTIEMPOValue(const aValue: Integer); virtual; function GetTIEMPOIsNull: Boolean; virtual; @@ -399,10 +484,10 @@ type procedure SetMANO_OBRAValue(const aValue: Currency); virtual; function GetMANO_OBRAIsNull: Boolean; virtual; procedure SetMANO_OBRAIsNull(const aValue: Boolean); virtual; - function GetPRECIO_PVPValue: Currency; virtual; - procedure SetPRECIO_PVPValue(const aValue: Currency); virtual; - function GetPRECIO_PVPIsNull: Boolean; virtual; - procedure SetPRECIO_PVPIsNull(const aValue: Boolean); virtual; + function GetPRECIO_PVP_TOTALValue: Currency; virtual; + procedure SetPRECIO_PVP_TOTALValue(const aValue: Currency); virtual; + function GetPRECIO_PVP_TOTALIsNull: Boolean; virtual; + procedure SetPRECIO_PVP_TOTALIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; @@ -449,14 +534,18 @@ type property FABRICANTEIsNull: Boolean read GetFABRICANTEIsNull write SetFABRICANTEIsNull; property REFERENCIA_FABR: String read GetREFERENCIA_FABRValue write SetREFERENCIA_FABRValue; property REFERENCIA_FABRIsNull: Boolean read GetREFERENCIA_FABRIsNull write SetREFERENCIA_FABRIsNull; + property PARAM_MARGEN: Float read GetPARAM_MARGENValue write SetPARAM_MARGENValue; + property PARAM_MARGENIsNull: Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull; + property PRECIO_PVP_VENTA: Currency read GetPRECIO_PVP_VENTAValue write SetPRECIO_PVP_VENTAValue; + property PRECIO_PVP_VENTAIsNull: Boolean read GetPRECIO_PVP_VENTAIsNull write SetPRECIO_PVP_VENTAIsNull; property TIEMPO: Integer read GetTIEMPOValue write SetTIEMPOValue; property TIEMPOIsNull: Boolean read GetTIEMPOIsNull write SetTIEMPOIsNull; property PARAM_TIEMPO: Float read GetPARAM_TIEMPOValue write SetPARAM_TIEMPOValue; property PARAM_TIEMPOIsNull: Boolean read GetPARAM_TIEMPOIsNull write SetPARAM_TIEMPOIsNull; property MANO_OBRA: Currency read GetMANO_OBRAValue write SetMANO_OBRAValue; property MANO_OBRAIsNull: Boolean read GetMANO_OBRAIsNull write SetMANO_OBRAIsNull; - property PRECIO_PVP: Currency read GetPRECIO_PVPValue write SetPRECIO_PVPValue; - property PRECIO_PVPIsNull: Boolean read GetPRECIO_PVPIsNull write SetPRECIO_PVPIsNull; + property PRECIO_PVP_TOTAL: Currency read GetPRECIO_PVP_TOTALValue write SetPRECIO_PVP_TOTALValue; + property PRECIO_PVP_TOTALIsNull: Boolean read GetPRECIO_PVP_TOTALIsNull write SetPRECIO_PVP_TOTALIsNull; public constructor Create(aDataTable: TDADataTable); override; @@ -469,7 +558,7 @@ type } { IArticulosParaCliente } IArticulosParaCliente = interface(IDAStronglyTypedDataTable) - ['{74039390-BC6A-4257-9DAC-63898C73E1A6}'] + ['{03E9D501-0737-4B4E-B896-5EA92EF20A4E}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -558,6 +647,14 @@ type procedure SetREFERENCIA_FABRValue(const aValue: String); function GetREFERENCIA_FABRIsNull: Boolean; procedure SetREFERENCIA_FABRIsNull(const aValue: Boolean); + function GetPARAM_MARGENValue: Float; + procedure SetPARAM_MARGENValue(const aValue: Float); + function GetPARAM_MARGENIsNull: Boolean; + procedure SetPARAM_MARGENIsNull(const aValue: Boolean); + function GetPRECIO_PVP_VENTAValue: Currency; + procedure SetPRECIO_PVP_VENTAValue(const aValue: Currency); + function GetPRECIO_PVP_VENTAIsNull: Boolean; + procedure SetPRECIO_PVP_VENTAIsNull(const aValue: Boolean); function GetTIEMPOValue: Integer; procedure SetTIEMPOValue(const aValue: Integer); function GetTIEMPOIsNull: Boolean; @@ -570,10 +667,10 @@ type procedure SetMANO_OBRAValue(const aValue: Currency); function GetMANO_OBRAIsNull: Boolean; procedure SetMANO_OBRAIsNull(const aValue: Boolean); - function GetPRECIO_PVPValue: Currency; - procedure SetPRECIO_PVPValue(const aValue: Currency); - function GetPRECIO_PVPIsNull: Boolean; - procedure SetPRECIO_PVPIsNull(const aValue: Boolean); + function GetPRECIO_PVP_TOTALValue: Currency; + procedure SetPRECIO_PVP_TOTALValue(const aValue: Currency); + function GetPRECIO_PVP_TOTALIsNull: Boolean; + procedure SetPRECIO_PVP_TOTALIsNull(const aValue: Boolean); { Properties } @@ -621,14 +718,18 @@ type property FABRICANTEIsNull: Boolean read GetFABRICANTEIsNull write SetFABRICANTEIsNull; property REFERENCIA_FABR: String read GetREFERENCIA_FABRValue write SetREFERENCIA_FABRValue; property REFERENCIA_FABRIsNull: Boolean read GetREFERENCIA_FABRIsNull write SetREFERENCIA_FABRIsNull; + property PARAM_MARGEN: Float read GetPARAM_MARGENValue write SetPARAM_MARGENValue; + property PARAM_MARGENIsNull: Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull; + property PRECIO_PVP_VENTA: Currency read GetPRECIO_PVP_VENTAValue write SetPRECIO_PVP_VENTAValue; + property PRECIO_PVP_VENTAIsNull: Boolean read GetPRECIO_PVP_VENTAIsNull write SetPRECIO_PVP_VENTAIsNull; property TIEMPO: Integer read GetTIEMPOValue write SetTIEMPOValue; property TIEMPOIsNull: Boolean read GetTIEMPOIsNull write SetTIEMPOIsNull; property PARAM_TIEMPO: Float read GetPARAM_TIEMPOValue write SetPARAM_TIEMPOValue; property PARAM_TIEMPOIsNull: Boolean read GetPARAM_TIEMPOIsNull write SetPARAM_TIEMPOIsNull; property MANO_OBRA: Currency read GetMANO_OBRAValue write SetMANO_OBRAValue; property MANO_OBRAIsNull: Boolean read GetMANO_OBRAIsNull write SetMANO_OBRAIsNull; - property PRECIO_PVP: Currency read GetPRECIO_PVPValue write SetPRECIO_PVPValue; - property PRECIO_PVPIsNull: Boolean read GetPRECIO_PVPIsNull write SetPRECIO_PVPIsNull; + property PRECIO_PVP_TOTAL: Currency read GetPRECIO_PVP_TOTALValue write SetPRECIO_PVP_TOTALValue; + property PRECIO_PVP_TOTALIsNull: Boolean read GetPRECIO_PVP_TOTALIsNull write SetPRECIO_PVP_TOTALIsNull; end; { TArticulosParaClienteDataTableRules } @@ -725,6 +826,14 @@ type procedure SetREFERENCIA_FABRValue(const aValue: String); virtual; function GetREFERENCIA_FABRIsNull: Boolean; virtual; procedure SetREFERENCIA_FABRIsNull(const aValue: Boolean); virtual; + function GetPARAM_MARGENValue: Float; virtual; + procedure SetPARAM_MARGENValue(const aValue: Float); virtual; + function GetPARAM_MARGENIsNull: Boolean; virtual; + procedure SetPARAM_MARGENIsNull(const aValue: Boolean); virtual; + function GetPRECIO_PVP_VENTAValue: Currency; virtual; + procedure SetPRECIO_PVP_VENTAValue(const aValue: Currency); virtual; + function GetPRECIO_PVP_VENTAIsNull: Boolean; virtual; + procedure SetPRECIO_PVP_VENTAIsNull(const aValue: Boolean); virtual; function GetTIEMPOValue: Integer; virtual; procedure SetTIEMPOValue(const aValue: Integer); virtual; function GetTIEMPOIsNull: Boolean; virtual; @@ -737,10 +846,10 @@ type procedure SetMANO_OBRAValue(const aValue: Currency); virtual; function GetMANO_OBRAIsNull: Boolean; virtual; procedure SetMANO_OBRAIsNull(const aValue: Boolean); virtual; - function GetPRECIO_PVPValue: Currency; virtual; - procedure SetPRECIO_PVPValue(const aValue: Currency); virtual; - function GetPRECIO_PVPIsNull: Boolean; virtual; - procedure SetPRECIO_PVPIsNull(const aValue: Boolean); virtual; + function GetPRECIO_PVP_TOTALValue: Currency; virtual; + procedure SetPRECIO_PVP_TOTALValue(const aValue: Currency); virtual; + function GetPRECIO_PVP_TOTALIsNull: Boolean; virtual; + procedure SetPRECIO_PVP_TOTALIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; @@ -787,14 +896,18 @@ type property FABRICANTEIsNull: Boolean read GetFABRICANTEIsNull write SetFABRICANTEIsNull; property REFERENCIA_FABR: String read GetREFERENCIA_FABRValue write SetREFERENCIA_FABRValue; property REFERENCIA_FABRIsNull: Boolean read GetREFERENCIA_FABRIsNull write SetREFERENCIA_FABRIsNull; + property PARAM_MARGEN: Float read GetPARAM_MARGENValue write SetPARAM_MARGENValue; + property PARAM_MARGENIsNull: Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull; + property PRECIO_PVP_VENTA: Currency read GetPRECIO_PVP_VENTAValue write SetPRECIO_PVP_VENTAValue; + property PRECIO_PVP_VENTAIsNull: Boolean read GetPRECIO_PVP_VENTAIsNull write SetPRECIO_PVP_VENTAIsNull; property TIEMPO: Integer read GetTIEMPOValue write SetTIEMPOValue; property TIEMPOIsNull: Boolean read GetTIEMPOIsNull write SetTIEMPOIsNull; property PARAM_TIEMPO: Float read GetPARAM_TIEMPOValue write SetPARAM_TIEMPOValue; property PARAM_TIEMPOIsNull: Boolean read GetPARAM_TIEMPOIsNull write SetPARAM_TIEMPOIsNull; property MANO_OBRA: Currency read GetMANO_OBRAValue write SetMANO_OBRAValue; property MANO_OBRAIsNull: Boolean read GetMANO_OBRAIsNull write SetMANO_OBRAIsNull; - property PRECIO_PVP: Currency read GetPRECIO_PVPValue write SetPRECIO_PVPValue; - property PRECIO_PVPIsNull: Boolean read GetPRECIO_PVPIsNull write SetPRECIO_PVPIsNull; + property PRECIO_PVP_TOTAL: Currency read GetPRECIO_PVP_TOTALValue write SetPRECIO_PVP_TOTALValue; + property PRECIO_PVP_TOTALIsNull: Boolean read GetPRECIO_PVP_TOTALIsNull write SetPRECIO_PVP_TOTALIsNull; public constructor Create(aDataTable: TDADataTable); override; @@ -806,6 +919,60 @@ implementation uses Variants, uROBinaryHelpers; +{ TProveedoresConArticulosDataTableRules } +constructor TProveedoresConArticulosDataTableRules.Create(aDataTable: TDADataTable); +begin + inherited; +end; + +destructor TProveedoresConArticulosDataTableRules.Destroy; +begin + inherited; +end; + +function TProveedoresConArticulosDataTableRules.GetID_PROVEEDORValue: Integer; +begin + result := DataTable.Fields[idx_ProveedoresConArticulosID_PROVEEDOR].AsInteger; +end; + +procedure TProveedoresConArticulosDataTableRules.SetID_PROVEEDORValue(const aValue: Integer); +begin + DataTable.Fields[idx_ProveedoresConArticulosID_PROVEEDOR].AsInteger := aValue; +end; + +function TProveedoresConArticulosDataTableRules.GetID_PROVEEDORIsNull: boolean; +begin + result := DataTable.Fields[idx_ProveedoresConArticulosID_PROVEEDOR].IsNull; +end; + +procedure TProveedoresConArticulosDataTableRules.SetID_PROVEEDORIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_ProveedoresConArticulosID_PROVEEDOR].AsVariant := Null; +end; + +function TProveedoresConArticulosDataTableRules.GetNOMBREValue: String; +begin + result := DataTable.Fields[idx_ProveedoresConArticulosNOMBRE].AsString; +end; + +procedure TProveedoresConArticulosDataTableRules.SetNOMBREValue(const aValue: String); +begin + DataTable.Fields[idx_ProveedoresConArticulosNOMBRE].AsString := aValue; +end; + +function TProveedoresConArticulosDataTableRules.GetNOMBREIsNull: boolean; +begin + result := DataTable.Fields[idx_ProveedoresConArticulosNOMBRE].IsNull; +end; + +procedure TProveedoresConArticulosDataTableRules.SetNOMBREIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_ProveedoresConArticulosNOMBRE].AsVariant := Null; +end; + + { TArticulosDataTableRules } constructor TArticulosDataTableRules.Create(aDataTable: TDADataTable); var @@ -1290,6 +1457,48 @@ begin DataTable.Fields[idx_ArticulosREFERENCIA_FABR].AsVariant := Null; end; +function TArticulosDataTableRules.GetPARAM_MARGENValue: Float; +begin + result := DataTable.Fields[idx_ArticulosPARAM_MARGEN].AsFloat; +end; + +procedure TArticulosDataTableRules.SetPARAM_MARGENValue(const aValue: Float); +begin + DataTable.Fields[idx_ArticulosPARAM_MARGEN].AsFloat := aValue; +end; + +function TArticulosDataTableRules.GetPARAM_MARGENIsNull: boolean; +begin + result := DataTable.Fields[idx_ArticulosPARAM_MARGEN].IsNull; +end; + +procedure TArticulosDataTableRules.SetPARAM_MARGENIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_ArticulosPARAM_MARGEN].AsVariant := Null; +end; + +function TArticulosDataTableRules.GetPRECIO_PVP_VENTAValue: Currency; +begin + result := DataTable.Fields[idx_ArticulosPRECIO_PVP_VENTA].AsCurrency; +end; + +procedure TArticulosDataTableRules.SetPRECIO_PVP_VENTAValue(const aValue: Currency); +begin + DataTable.Fields[idx_ArticulosPRECIO_PVP_VENTA].AsCurrency := aValue; +end; + +function TArticulosDataTableRules.GetPRECIO_PVP_VENTAIsNull: boolean; +begin + result := DataTable.Fields[idx_ArticulosPRECIO_PVP_VENTA].IsNull; +end; + +procedure TArticulosDataTableRules.SetPRECIO_PVP_VENTAIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_ArticulosPRECIO_PVP_VENTA].AsVariant := Null; +end; + function TArticulosDataTableRules.GetTIEMPOValue: Integer; begin result := DataTable.Fields[idx_ArticulosTIEMPO].AsInteger; @@ -1353,25 +1562,25 @@ begin DataTable.Fields[idx_ArticulosMANO_OBRA].AsVariant := Null; end; -function TArticulosDataTableRules.GetPRECIO_PVPValue: Currency; +function TArticulosDataTableRules.GetPRECIO_PVP_TOTALValue: Currency; begin - result := DataTable.Fields[idx_ArticulosPRECIO_PVP].AsCurrency; + result := DataTable.Fields[idx_ArticulosPRECIO_PVP_TOTAL].AsCurrency; end; -procedure TArticulosDataTableRules.SetPRECIO_PVPValue(const aValue: Currency); +procedure TArticulosDataTableRules.SetPRECIO_PVP_TOTALValue(const aValue: Currency); begin - DataTable.Fields[idx_ArticulosPRECIO_PVP].AsCurrency := aValue; + DataTable.Fields[idx_ArticulosPRECIO_PVP_TOTAL].AsCurrency := aValue; end; -function TArticulosDataTableRules.GetPRECIO_PVPIsNull: boolean; +function TArticulosDataTableRules.GetPRECIO_PVP_TOTALIsNull: boolean; begin - result := DataTable.Fields[idx_ArticulosPRECIO_PVP].IsNull; + result := DataTable.Fields[idx_ArticulosPRECIO_PVP_TOTAL].IsNull; end; -procedure TArticulosDataTableRules.SetPRECIO_PVPIsNull(const aValue: Boolean); +procedure TArticulosDataTableRules.SetPRECIO_PVP_TOTALIsNull(const aValue: Boolean); begin if aValue then - DataTable.Fields[idx_ArticulosPRECIO_PVP].AsVariant := Null; + DataTable.Fields[idx_ArticulosPRECIO_PVP_TOTAL].AsVariant := Null; end; @@ -1859,6 +2068,48 @@ begin DataTable.Fields[idx_ArticulosParaClienteREFERENCIA_FABR].AsVariant := Null; end; +function TArticulosParaClienteDataTableRules.GetPARAM_MARGENValue: Float; +begin + result := DataTable.Fields[idx_ArticulosParaClientePARAM_MARGEN].AsFloat; +end; + +procedure TArticulosParaClienteDataTableRules.SetPARAM_MARGENValue(const aValue: Float); +begin + DataTable.Fields[idx_ArticulosParaClientePARAM_MARGEN].AsFloat := aValue; +end; + +function TArticulosParaClienteDataTableRules.GetPARAM_MARGENIsNull: boolean; +begin + result := DataTable.Fields[idx_ArticulosParaClientePARAM_MARGEN].IsNull; +end; + +procedure TArticulosParaClienteDataTableRules.SetPARAM_MARGENIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_ArticulosParaClientePARAM_MARGEN].AsVariant := Null; +end; + +function TArticulosParaClienteDataTableRules.GetPRECIO_PVP_VENTAValue: Currency; +begin + result := DataTable.Fields[idx_ArticulosParaClientePRECIO_PVP_VENTA].AsCurrency; +end; + +procedure TArticulosParaClienteDataTableRules.SetPRECIO_PVP_VENTAValue(const aValue: Currency); +begin + DataTable.Fields[idx_ArticulosParaClientePRECIO_PVP_VENTA].AsCurrency := aValue; +end; + +function TArticulosParaClienteDataTableRules.GetPRECIO_PVP_VENTAIsNull: boolean; +begin + result := DataTable.Fields[idx_ArticulosParaClientePRECIO_PVP_VENTA].IsNull; +end; + +procedure TArticulosParaClienteDataTableRules.SetPRECIO_PVP_VENTAIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_ArticulosParaClientePRECIO_PVP_VENTA].AsVariant := Null; +end; + function TArticulosParaClienteDataTableRules.GetTIEMPOValue: Integer; begin result := DataTable.Fields[idx_ArticulosParaClienteTIEMPO].AsInteger; @@ -1922,29 +2173,30 @@ begin DataTable.Fields[idx_ArticulosParaClienteMANO_OBRA].AsVariant := Null; end; -function TArticulosParaClienteDataTableRules.GetPRECIO_PVPValue: Currency; +function TArticulosParaClienteDataTableRules.GetPRECIO_PVP_TOTALValue: Currency; begin - result := DataTable.Fields[idx_ArticulosParaClientePRECIO_PVP].AsCurrency; + result := DataTable.Fields[idx_ArticulosParaClientePRECIO_PVP_TOTAL].AsCurrency; end; -procedure TArticulosParaClienteDataTableRules.SetPRECIO_PVPValue(const aValue: Currency); +procedure TArticulosParaClienteDataTableRules.SetPRECIO_PVP_TOTALValue(const aValue: Currency); begin - DataTable.Fields[idx_ArticulosParaClientePRECIO_PVP].AsCurrency := aValue; + DataTable.Fields[idx_ArticulosParaClientePRECIO_PVP_TOTAL].AsCurrency := aValue; end; -function TArticulosParaClienteDataTableRules.GetPRECIO_PVPIsNull: boolean; +function TArticulosParaClienteDataTableRules.GetPRECIO_PVP_TOTALIsNull: boolean; begin - result := DataTable.Fields[idx_ArticulosParaClientePRECIO_PVP].IsNull; + result := DataTable.Fields[idx_ArticulosParaClientePRECIO_PVP_TOTAL].IsNull; end; -procedure TArticulosParaClienteDataTableRules.SetPRECIO_PVPIsNull(const aValue: Boolean); +procedure TArticulosParaClienteDataTableRules.SetPRECIO_PVP_TOTALIsNull(const aValue: Boolean); begin if aValue then - DataTable.Fields[idx_ArticulosParaClientePRECIO_PVP].AsVariant := Null; + DataTable.Fields[idx_ArticulosParaClientePRECIO_PVP_TOTAL].AsVariant := Null; end; initialization + RegisterDataTableRules(RID_ProveedoresConArticulos, TProveedoresConArticulosDataTableRules); RegisterDataTableRules(RID_Articulos, TArticulosDataTableRules); RegisterDataTableRules(RID_ArticulosParaCliente, TArticulosParaClienteDataTableRules); diff --git a/Source/Modulos/Articulos/Model/schArticulosServer_Intf.pas b/Source/Modulos/Articulos/Model/schArticulosServer_Intf.pas index 52099ad2..6e135af7 100644 --- a/Source/Modulos/Articulos/Model/schArticulosServer_Intf.pas +++ b/Source/Modulos/Articulos/Model/schArticulosServer_Intf.pas @@ -9,13 +9,60 @@ 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_ArticulosDelta = '{E90664CD-974B-4763-AFDF-9B682888F975}'; - RID_ArticulosParaClienteDelta = '{20B7D734-5B3C-4B7E-9731-398937C0E081}'; + RID_ProveedoresConArticulosDelta = '{96362193-B4A6-41E4-9CCC-01C9A8F216EF}'; + RID_ArticulosDelta = '{604B3086-A8FE-47C3-A7A9-126527DF98FD}'; + RID_ArticulosParaClienteDelta = '{A623F019-D2B3-4686-B1A6-DCA52882649B}'; type + { IProveedoresConArticulosDelta } + IProveedoresConArticulosDelta = interface(IProveedoresConArticulos) + ['{96362193-B4A6-41E4-9CCC-01C9A8F216EF}'] + { Property getters and setters } + function GetOldID_PROVEEDORValue : Integer; + function GetOldNOMBREValue : String; + + { Properties } + property OldID_PROVEEDOR : Integer read GetOldID_PROVEEDORValue; + property OldNOMBRE : String read GetOldNOMBREValue; + end; + + { TProveedoresConArticulosBusinessProcessorRules } + TProveedoresConArticulosBusinessProcessorRules = class(TDABusinessProcessorRules, IProveedoresConArticulos, IProveedoresConArticulosDelta) + private + protected + { Property getters and setters } + function GetID_PROVEEDORValue: Integer; virtual; + function GetID_PROVEEDORIsNull: Boolean; virtual; + function GetOldID_PROVEEDORValue: Integer; virtual; + function GetOldID_PROVEEDORIsNull: Boolean; virtual; + procedure SetID_PROVEEDORValue(const aValue: Integer); virtual; + procedure SetID_PROVEEDORIsNull(const aValue: Boolean); virtual; + function GetNOMBREValue: String; virtual; + function GetNOMBREIsNull: Boolean; virtual; + function GetOldNOMBREValue: String; virtual; + function GetOldNOMBREIsNull: Boolean; virtual; + procedure SetNOMBREValue(const aValue: String); virtual; + procedure SetNOMBREIsNull(const aValue: Boolean); virtual; + + { Properties } + property ID_PROVEEDOR : Integer read GetID_PROVEEDORValue write SetID_PROVEEDORValue; + property ID_PROVEEDORIsNull : Boolean read GetID_PROVEEDORIsNull write SetID_PROVEEDORIsNull; + property OldID_PROVEEDOR : Integer read GetOldID_PROVEEDORValue; + property OldID_PROVEEDORIsNull : Boolean read GetOldID_PROVEEDORIsNull; + property NOMBRE : String read GetNOMBREValue write SetNOMBREValue; + property NOMBREIsNull : Boolean read GetNOMBREIsNull write SetNOMBREIsNull; + property OldNOMBRE : String read GetOldNOMBREValue; + property OldNOMBREIsNull : Boolean read GetOldNOMBREIsNull; + + public + constructor Create(aBusinessProcessor: TDABusinessProcessor); override; + destructor Destroy; override; + + end; + { IArticulosDelta } IArticulosDelta = interface(IArticulos) - ['{E90664CD-974B-4763-AFDF-9B682888F975}'] + ['{604B3086-A8FE-47C3-A7A9-126527DF98FD}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -39,10 +86,12 @@ type function GetOldELIMINADOValue : SmallInt; function GetOldFABRICANTEValue : String; function GetOldREFERENCIA_FABRValue : String; + function GetOldPARAM_MARGENValue : Float; + function GetOldPRECIO_PVP_VENTAValue : Currency; function GetOldTIEMPOValue : Integer; function GetOldPARAM_TIEMPOValue : Float; function GetOldMANO_OBRAValue : Currency; - function GetOldPRECIO_PVPValue : Currency; + function GetOldPRECIO_PVP_TOTALValue : Currency; { Properties } property OldID : Integer read GetOldIDValue; @@ -67,10 +116,12 @@ type property OldELIMINADO : SmallInt read GetOldELIMINADOValue; property OldFABRICANTE : String read GetOldFABRICANTEValue; property OldREFERENCIA_FABR : String read GetOldREFERENCIA_FABRValue; + property OldPARAM_MARGEN : Float read GetOldPARAM_MARGENValue; + property OldPRECIO_PVP_VENTA : Currency read GetOldPRECIO_PVP_VENTAValue; property OldTIEMPO : Integer read GetOldTIEMPOValue; property OldPARAM_TIEMPO : Float read GetOldPARAM_TIEMPOValue; property OldMANO_OBRA : Currency read GetOldMANO_OBRAValue; - property OldPRECIO_PVP : Currency read GetOldPRECIO_PVPValue; + property OldPRECIO_PVP_TOTAL : Currency read GetOldPRECIO_PVP_TOTALValue; end; { TArticulosBusinessProcessorRules } @@ -211,6 +262,18 @@ type function GetOldREFERENCIA_FABRIsNull: Boolean; virtual; procedure SetREFERENCIA_FABRValue(const aValue: String); virtual; procedure SetREFERENCIA_FABRIsNull(const aValue: Boolean); virtual; + function GetPARAM_MARGENValue: Float; virtual; + function GetPARAM_MARGENIsNull: Boolean; virtual; + function GetOldPARAM_MARGENValue: Float; virtual; + function GetOldPARAM_MARGENIsNull: Boolean; virtual; + procedure SetPARAM_MARGENValue(const aValue: Float); virtual; + procedure SetPARAM_MARGENIsNull(const aValue: Boolean); virtual; + function GetPRECIO_PVP_VENTAValue: Currency; virtual; + function GetPRECIO_PVP_VENTAIsNull: Boolean; virtual; + function GetOldPRECIO_PVP_VENTAValue: Currency; virtual; + function GetOldPRECIO_PVP_VENTAIsNull: Boolean; virtual; + procedure SetPRECIO_PVP_VENTAValue(const aValue: Currency); virtual; + procedure SetPRECIO_PVP_VENTAIsNull(const aValue: Boolean); virtual; function GetTIEMPOValue: Integer; virtual; function GetTIEMPOIsNull: Boolean; virtual; function GetOldTIEMPOValue: Integer; virtual; @@ -229,12 +292,12 @@ type function GetOldMANO_OBRAIsNull: Boolean; virtual; procedure SetMANO_OBRAValue(const aValue: Currency); virtual; procedure SetMANO_OBRAIsNull(const aValue: Boolean); virtual; - function GetPRECIO_PVPValue: Currency; virtual; - function GetPRECIO_PVPIsNull: Boolean; virtual; - function GetOldPRECIO_PVPValue: Currency; virtual; - function GetOldPRECIO_PVPIsNull: Boolean; virtual; - procedure SetPRECIO_PVPValue(const aValue: Currency); virtual; - procedure SetPRECIO_PVPIsNull(const aValue: Boolean); virtual; + function GetPRECIO_PVP_TOTALValue: Currency; virtual; + function GetPRECIO_PVP_TOTALIsNull: Boolean; virtual; + function GetOldPRECIO_PVP_TOTALValue: Currency; virtual; + function GetOldPRECIO_PVP_TOTALIsNull: Boolean; virtual; + procedure SetPRECIO_PVP_TOTALValue(const aValue: Currency); virtual; + procedure SetPRECIO_PVP_TOTALIsNull(const aValue: Boolean); virtual; { Properties } property ID : Integer read GetIDValue write SetIDValue; @@ -325,6 +388,14 @@ type property REFERENCIA_FABRIsNull : Boolean read GetREFERENCIA_FABRIsNull write SetREFERENCIA_FABRIsNull; property OldREFERENCIA_FABR : String read GetOldREFERENCIA_FABRValue; property OldREFERENCIA_FABRIsNull : Boolean read GetOldREFERENCIA_FABRIsNull; + property PARAM_MARGEN : Float read GetPARAM_MARGENValue write SetPARAM_MARGENValue; + property PARAM_MARGENIsNull : Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull; + property OldPARAM_MARGEN : Float read GetOldPARAM_MARGENValue; + property OldPARAM_MARGENIsNull : Boolean read GetOldPARAM_MARGENIsNull; + property PRECIO_PVP_VENTA : Currency read GetPRECIO_PVP_VENTAValue write SetPRECIO_PVP_VENTAValue; + property PRECIO_PVP_VENTAIsNull : Boolean read GetPRECIO_PVP_VENTAIsNull write SetPRECIO_PVP_VENTAIsNull; + property OldPRECIO_PVP_VENTA : Currency read GetOldPRECIO_PVP_VENTAValue; + property OldPRECIO_PVP_VENTAIsNull : Boolean read GetOldPRECIO_PVP_VENTAIsNull; property TIEMPO : Integer read GetTIEMPOValue write SetTIEMPOValue; property TIEMPOIsNull : Boolean read GetTIEMPOIsNull write SetTIEMPOIsNull; property OldTIEMPO : Integer read GetOldTIEMPOValue; @@ -337,10 +408,10 @@ type property MANO_OBRAIsNull : Boolean read GetMANO_OBRAIsNull write SetMANO_OBRAIsNull; property OldMANO_OBRA : Currency read GetOldMANO_OBRAValue; property OldMANO_OBRAIsNull : Boolean read GetOldMANO_OBRAIsNull; - property PRECIO_PVP : Currency read GetPRECIO_PVPValue write SetPRECIO_PVPValue; - property PRECIO_PVPIsNull : Boolean read GetPRECIO_PVPIsNull write SetPRECIO_PVPIsNull; - property OldPRECIO_PVP : Currency read GetOldPRECIO_PVPValue; - property OldPRECIO_PVPIsNull : Boolean read GetOldPRECIO_PVPIsNull; + property PRECIO_PVP_TOTAL : Currency read GetPRECIO_PVP_TOTALValue write SetPRECIO_PVP_TOTALValue; + property PRECIO_PVP_TOTALIsNull : Boolean read GetPRECIO_PVP_TOTALIsNull write SetPRECIO_PVP_TOTALIsNull; + property OldPRECIO_PVP_TOTAL : Currency read GetOldPRECIO_PVP_TOTALValue; + property OldPRECIO_PVP_TOTALIsNull : Boolean read GetOldPRECIO_PVP_TOTALIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; @@ -350,7 +421,7 @@ type { IArticulosParaClienteDelta } IArticulosParaClienteDelta = interface(IArticulosParaCliente) - ['{20B7D734-5B3C-4B7E-9731-398937C0E081}'] + ['{A623F019-D2B3-4686-B1A6-DCA52882649B}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -374,10 +445,12 @@ type function GetOldELIMINADOValue : SmallInt; function GetOldFABRICANTEValue : String; function GetOldREFERENCIA_FABRValue : String; + function GetOldPARAM_MARGENValue : Float; + function GetOldPRECIO_PVP_VENTAValue : Currency; function GetOldTIEMPOValue : Integer; function GetOldPARAM_TIEMPOValue : Float; function GetOldMANO_OBRAValue : Currency; - function GetOldPRECIO_PVPValue : Currency; + function GetOldPRECIO_PVP_TOTALValue : Currency; { Properties } property OldID : Integer read GetOldIDValue; @@ -402,10 +475,12 @@ type property OldELIMINADO : SmallInt read GetOldELIMINADOValue; property OldFABRICANTE : String read GetOldFABRICANTEValue; property OldREFERENCIA_FABR : String read GetOldREFERENCIA_FABRValue; + property OldPARAM_MARGEN : Float read GetOldPARAM_MARGENValue; + property OldPRECIO_PVP_VENTA : Currency read GetOldPRECIO_PVP_VENTAValue; property OldTIEMPO : Integer read GetOldTIEMPOValue; property OldPARAM_TIEMPO : Float read GetOldPARAM_TIEMPOValue; property OldMANO_OBRA : Currency read GetOldMANO_OBRAValue; - property OldPRECIO_PVP : Currency read GetOldPRECIO_PVPValue; + property OldPRECIO_PVP_TOTAL : Currency read GetOldPRECIO_PVP_TOTALValue; end; { TArticulosParaClienteBusinessProcessorRules } @@ -546,6 +621,18 @@ type function GetOldREFERENCIA_FABRIsNull: Boolean; virtual; procedure SetREFERENCIA_FABRValue(const aValue: String); virtual; procedure SetREFERENCIA_FABRIsNull(const aValue: Boolean); virtual; + function GetPARAM_MARGENValue: Float; virtual; + function GetPARAM_MARGENIsNull: Boolean; virtual; + function GetOldPARAM_MARGENValue: Float; virtual; + function GetOldPARAM_MARGENIsNull: Boolean; virtual; + procedure SetPARAM_MARGENValue(const aValue: Float); virtual; + procedure SetPARAM_MARGENIsNull(const aValue: Boolean); virtual; + function GetPRECIO_PVP_VENTAValue: Currency; virtual; + function GetPRECIO_PVP_VENTAIsNull: Boolean; virtual; + function GetOldPRECIO_PVP_VENTAValue: Currency; virtual; + function GetOldPRECIO_PVP_VENTAIsNull: Boolean; virtual; + procedure SetPRECIO_PVP_VENTAValue(const aValue: Currency); virtual; + procedure SetPRECIO_PVP_VENTAIsNull(const aValue: Boolean); virtual; function GetTIEMPOValue: Integer; virtual; function GetTIEMPOIsNull: Boolean; virtual; function GetOldTIEMPOValue: Integer; virtual; @@ -564,12 +651,12 @@ type function GetOldMANO_OBRAIsNull: Boolean; virtual; procedure SetMANO_OBRAValue(const aValue: Currency); virtual; procedure SetMANO_OBRAIsNull(const aValue: Boolean); virtual; - function GetPRECIO_PVPValue: Currency; virtual; - function GetPRECIO_PVPIsNull: Boolean; virtual; - function GetOldPRECIO_PVPValue: Currency; virtual; - function GetOldPRECIO_PVPIsNull: Boolean; virtual; - procedure SetPRECIO_PVPValue(const aValue: Currency); virtual; - procedure SetPRECIO_PVPIsNull(const aValue: Boolean); virtual; + function GetPRECIO_PVP_TOTALValue: Currency; virtual; + function GetPRECIO_PVP_TOTALIsNull: Boolean; virtual; + function GetOldPRECIO_PVP_TOTALValue: Currency; virtual; + function GetOldPRECIO_PVP_TOTALIsNull: Boolean; virtual; + procedure SetPRECIO_PVP_TOTALValue(const aValue: Currency); virtual; + procedure SetPRECIO_PVP_TOTALIsNull(const aValue: Boolean); virtual; { Properties } property ID : Integer read GetIDValue write SetIDValue; @@ -660,6 +747,14 @@ type property REFERENCIA_FABRIsNull : Boolean read GetREFERENCIA_FABRIsNull write SetREFERENCIA_FABRIsNull; property OldREFERENCIA_FABR : String read GetOldREFERENCIA_FABRValue; property OldREFERENCIA_FABRIsNull : Boolean read GetOldREFERENCIA_FABRIsNull; + property PARAM_MARGEN : Float read GetPARAM_MARGENValue write SetPARAM_MARGENValue; + property PARAM_MARGENIsNull : Boolean read GetPARAM_MARGENIsNull write SetPARAM_MARGENIsNull; + property OldPARAM_MARGEN : Float read GetOldPARAM_MARGENValue; + property OldPARAM_MARGENIsNull : Boolean read GetOldPARAM_MARGENIsNull; + property PRECIO_PVP_VENTA : Currency read GetPRECIO_PVP_VENTAValue write SetPRECIO_PVP_VENTAValue; + property PRECIO_PVP_VENTAIsNull : Boolean read GetPRECIO_PVP_VENTAIsNull write SetPRECIO_PVP_VENTAIsNull; + property OldPRECIO_PVP_VENTA : Currency read GetOldPRECIO_PVP_VENTAValue; + property OldPRECIO_PVP_VENTAIsNull : Boolean read GetOldPRECIO_PVP_VENTAIsNull; property TIEMPO : Integer read GetTIEMPOValue write SetTIEMPOValue; property TIEMPOIsNull : Boolean read GetTIEMPOIsNull write SetTIEMPOIsNull; property OldTIEMPO : Integer read GetOldTIEMPOValue; @@ -672,10 +767,10 @@ type property MANO_OBRAIsNull : Boolean read GetMANO_OBRAIsNull write SetMANO_OBRAIsNull; property OldMANO_OBRA : Currency read GetOldMANO_OBRAValue; property OldMANO_OBRAIsNull : Boolean read GetOldMANO_OBRAIsNull; - property PRECIO_PVP : Currency read GetPRECIO_PVPValue write SetPRECIO_PVPValue; - property PRECIO_PVPIsNull : Boolean read GetPRECIO_PVPIsNull write SetPRECIO_PVPIsNull; - property OldPRECIO_PVP : Currency read GetOldPRECIO_PVPValue; - property OldPRECIO_PVPIsNull : Boolean read GetOldPRECIO_PVPIsNull; + property PRECIO_PVP_TOTAL : Currency read GetPRECIO_PVP_TOTALValue write SetPRECIO_PVP_TOTALValue; + property PRECIO_PVP_TOTALIsNull : Boolean read GetPRECIO_PVP_TOTALIsNull write SetPRECIO_PVP_TOTALIsNull; + property OldPRECIO_PVP_TOTAL : Currency read GetOldPRECIO_PVP_TOTALValue; + property OldPRECIO_PVP_TOTALIsNull : Boolean read GetOldPRECIO_PVP_TOTALIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; @@ -688,6 +783,80 @@ implementation uses Variants, uROBinaryHelpers, uDAInterfaces; +{ TProveedoresConArticulosBusinessProcessorRules } +constructor TProveedoresConArticulosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); +begin + inherited; +end; + +destructor TProveedoresConArticulosBusinessProcessorRules.Destroy; +begin + inherited; +end; + +function TProveedoresConArticulosBusinessProcessorRules.GetID_PROVEEDORValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresConArticulosID_PROVEEDOR]; +end; + +function TProveedoresConArticulosBusinessProcessorRules.GetID_PROVEEDORIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresConArticulosID_PROVEEDOR]); +end; + +function TProveedoresConArticulosBusinessProcessorRules.GetOldID_PROVEEDORValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ProveedoresConArticulosID_PROVEEDOR]; +end; + +function TProveedoresConArticulosBusinessProcessorRules.GetOldID_PROVEEDORIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ProveedoresConArticulosID_PROVEEDOR]); +end; + +procedure TProveedoresConArticulosBusinessProcessorRules.SetID_PROVEEDORValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresConArticulosID_PROVEEDOR] := aValue; +end; + +procedure TProveedoresConArticulosBusinessProcessorRules.SetID_PROVEEDORIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresConArticulosID_PROVEEDOR] := Null; +end; + +function TProveedoresConArticulosBusinessProcessorRules.GetNOMBREValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresConArticulosNOMBRE]; +end; + +function TProveedoresConArticulosBusinessProcessorRules.GetNOMBREIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresConArticulosNOMBRE]); +end; + +function TProveedoresConArticulosBusinessProcessorRules.GetOldNOMBREValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ProveedoresConArticulosNOMBRE]; +end; + +function TProveedoresConArticulosBusinessProcessorRules.GetOldNOMBREIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ProveedoresConArticulosNOMBRE]); +end; + +procedure TProveedoresConArticulosBusinessProcessorRules.SetNOMBREValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresConArticulosNOMBRE] := aValue; +end; + +procedure TProveedoresConArticulosBusinessProcessorRules.SetNOMBREIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_ProveedoresConArticulosNOMBRE] := Null; +end; + + { TArticulosBusinessProcessorRules } constructor TArticulosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); var @@ -1393,6 +1562,68 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosREFERENCIA_FABR] := Null; end; +function TArticulosBusinessProcessorRules.GetPARAM_MARGENValue: Float; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPARAM_MARGEN]; +end; + +function TArticulosBusinessProcessorRules.GetPARAM_MARGENIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPARAM_MARGEN]); +end; + +function TArticulosBusinessProcessorRules.GetOldPARAM_MARGENValue: Float; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosPARAM_MARGEN]; +end; + +function TArticulosBusinessProcessorRules.GetOldPARAM_MARGENIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosPARAM_MARGEN]); +end; + +procedure TArticulosBusinessProcessorRules.SetPARAM_MARGENValue(const aValue: Float); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPARAM_MARGEN] := aValue; +end; + +procedure TArticulosBusinessProcessorRules.SetPARAM_MARGENIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPARAM_MARGEN] := Null; +end; + +function TArticulosBusinessProcessorRules.GetPRECIO_PVP_VENTAValue: Currency; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP_VENTA]; +end; + +function TArticulosBusinessProcessorRules.GetPRECIO_PVP_VENTAIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP_VENTA]); +end; + +function TArticulosBusinessProcessorRules.GetOldPRECIO_PVP_VENTAValue: Currency; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosPRECIO_PVP_VENTA]; +end; + +function TArticulosBusinessProcessorRules.GetOldPRECIO_PVP_VENTAIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosPRECIO_PVP_VENTA]); +end; + +procedure TArticulosBusinessProcessorRules.SetPRECIO_PVP_VENTAValue(const aValue: Currency); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP_VENTA] := aValue; +end; + +procedure TArticulosBusinessProcessorRules.SetPRECIO_PVP_VENTAIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP_VENTA] := Null; +end; + function TArticulosBusinessProcessorRules.GetTIEMPOValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosTIEMPO]; @@ -1486,35 +1717,35 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosMANO_OBRA] := Null; end; -function TArticulosBusinessProcessorRules.GetPRECIO_PVPValue: Currency; +function TArticulosBusinessProcessorRules.GetPRECIO_PVP_TOTALValue: Currency; begin - result := BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP]; + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP_TOTAL]; end; -function TArticulosBusinessProcessorRules.GetPRECIO_PVPIsNull: Boolean; +function TArticulosBusinessProcessorRules.GetPRECIO_PVP_TOTALIsNull: Boolean; begin - result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP]); + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP_TOTAL]); end; -function TArticulosBusinessProcessorRules.GetOldPRECIO_PVPValue: Currency; +function TArticulosBusinessProcessorRules.GetOldPRECIO_PVP_TOTALValue: Currency; begin - result := BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosPRECIO_PVP]; + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosPRECIO_PVP_TOTAL]; end; -function TArticulosBusinessProcessorRules.GetOldPRECIO_PVPIsNull: Boolean; +function TArticulosBusinessProcessorRules.GetOldPRECIO_PVP_TOTALIsNull: Boolean; begin - result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosPRECIO_PVP]); + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosPRECIO_PVP_TOTAL]); end; -procedure TArticulosBusinessProcessorRules.SetPRECIO_PVPValue(const aValue: Currency); +procedure TArticulosBusinessProcessorRules.SetPRECIO_PVP_TOTALValue(const aValue: Currency); begin - BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP] := aValue; + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP_TOTAL] := aValue; end; -procedure TArticulosBusinessProcessorRules.SetPRECIO_PVPIsNull(const aValue: Boolean); +procedure TArticulosBusinessProcessorRules.SetPRECIO_PVP_TOTALIsNull(const aValue: Boolean); begin if aValue then - BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP] := Null; + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP_TOTAL] := Null; end; @@ -2223,6 +2454,68 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClienteREFERENCIA_FABR] := Null; end; +function TArticulosParaClienteBusinessProcessorRules.GetPARAM_MARGENValue: Float; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePARAM_MARGEN]; +end; + +function TArticulosParaClienteBusinessProcessorRules.GetPARAM_MARGENIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePARAM_MARGEN]); +end; + +function TArticulosParaClienteBusinessProcessorRules.GetOldPARAM_MARGENValue: Float; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosParaClientePARAM_MARGEN]; +end; + +function TArticulosParaClienteBusinessProcessorRules.GetOldPARAM_MARGENIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosParaClientePARAM_MARGEN]); +end; + +procedure TArticulosParaClienteBusinessProcessorRules.SetPARAM_MARGENValue(const aValue: Float); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePARAM_MARGEN] := aValue; +end; + +procedure TArticulosParaClienteBusinessProcessorRules.SetPARAM_MARGENIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePARAM_MARGEN] := Null; +end; + +function TArticulosParaClienteBusinessProcessorRules.GetPRECIO_PVP_VENTAValue: Currency; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePRECIO_PVP_VENTA]; +end; + +function TArticulosParaClienteBusinessProcessorRules.GetPRECIO_PVP_VENTAIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePRECIO_PVP_VENTA]); +end; + +function TArticulosParaClienteBusinessProcessorRules.GetOldPRECIO_PVP_VENTAValue: Currency; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosParaClientePRECIO_PVP_VENTA]; +end; + +function TArticulosParaClienteBusinessProcessorRules.GetOldPRECIO_PVP_VENTAIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosParaClientePRECIO_PVP_VENTA]); +end; + +procedure TArticulosParaClienteBusinessProcessorRules.SetPRECIO_PVP_VENTAValue(const aValue: Currency); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePRECIO_PVP_VENTA] := aValue; +end; + +procedure TArticulosParaClienteBusinessProcessorRules.SetPRECIO_PVP_VENTAIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePRECIO_PVP_VENTA] := Null; +end; + function TArticulosParaClienteBusinessProcessorRules.GetTIEMPOValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClienteTIEMPO]; @@ -2316,39 +2609,40 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClienteMANO_OBRA] := Null; end; -function TArticulosParaClienteBusinessProcessorRules.GetPRECIO_PVPValue: Currency; +function TArticulosParaClienteBusinessProcessorRules.GetPRECIO_PVP_TOTALValue: Currency; begin - result := BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePRECIO_PVP]; + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePRECIO_PVP_TOTAL]; end; -function TArticulosParaClienteBusinessProcessorRules.GetPRECIO_PVPIsNull: Boolean; +function TArticulosParaClienteBusinessProcessorRules.GetPRECIO_PVP_TOTALIsNull: Boolean; begin - result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePRECIO_PVP]); + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePRECIO_PVP_TOTAL]); end; -function TArticulosParaClienteBusinessProcessorRules.GetOldPRECIO_PVPValue: Currency; +function TArticulosParaClienteBusinessProcessorRules.GetOldPRECIO_PVP_TOTALValue: Currency; begin - result := BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosParaClientePRECIO_PVP]; + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosParaClientePRECIO_PVP_TOTAL]; end; -function TArticulosParaClienteBusinessProcessorRules.GetOldPRECIO_PVPIsNull: Boolean; +function TArticulosParaClienteBusinessProcessorRules.GetOldPRECIO_PVP_TOTALIsNull: Boolean; begin - result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosParaClientePRECIO_PVP]); + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosParaClientePRECIO_PVP_TOTAL]); end; -procedure TArticulosParaClienteBusinessProcessorRules.SetPRECIO_PVPValue(const aValue: Currency); +procedure TArticulosParaClienteBusinessProcessorRules.SetPRECIO_PVP_TOTALValue(const aValue: Currency); begin - BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePRECIO_PVP] := aValue; + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePRECIO_PVP_TOTAL] := aValue; end; -procedure TArticulosParaClienteBusinessProcessorRules.SetPRECIO_PVPIsNull(const aValue: Boolean); +procedure TArticulosParaClienteBusinessProcessorRules.SetPRECIO_PVP_TOTALIsNull(const aValue: Boolean); begin if aValue then - BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePRECIO_PVP] := Null; + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClientePRECIO_PVP_TOTAL] := Null; end; initialization + RegisterBusinessProcessorRules(RID_ProveedoresConArticulosDelta, TProveedoresConArticulosBusinessProcessorRules); RegisterBusinessProcessorRules(RID_ArticulosDelta, TArticulosBusinessProcessorRules); RegisterBusinessProcessorRules(RID_ArticulosParaClienteDelta, TArticulosParaClienteBusinessProcessorRules); diff --git a/Source/Modulos/Articulos/Model/uBizArticulos.pas b/Source/Modulos/Articulos/Model/uBizArticulos.pas index 883225d1..c4d839cb 100644 Binary files a/Source/Modulos/Articulos/Model/uBizArticulos.pas and b/Source/Modulos/Articulos/Model/uBizArticulos.pas differ diff --git a/Source/Modulos/Articulos/Model/uBizArticulosServer.pas b/Source/Modulos/Articulos/Model/uBizArticulosServer.pas new file mode 100644 index 00000000..e2e9329e --- /dev/null +++ b/Source/Modulos/Articulos/Model/uBizArticulosServer.pas @@ -0,0 +1,94 @@ +unit uBizArticulosServer; + +interface + +uses + uDAInterfaces, uDADelta, uDABusinessProcessor, + schArticulosServer_Intf; + +const + BIZ_SERVER_ARTICULOS = 'Server.Articulos'; + +type + TBizArticulosServer = class(TArticulosBusinessProcessorRules) + private + FReferenciaAutomatica : Boolean; + function DarReferencia : String; + function IncrementarReferencia : Boolean; + protected + procedure BeforeProcessDelta(Sender: TDABusinessProcessor; const aDelta: IDADelta); override; + procedure AfterProcessChange(Sender: TDABusinessProcessor; aChange: TDADeltaChange; Processed: Boolean; + var CanRemoveFromDelta: Boolean); override; + end; + +implementation + +uses + Variants, uDAClasses, srvReferencias_Impl, uBusinessUtils, uROClasses, + uDataModuleServer, schArticulosClient_Intf; + +const + REF_ARTICULOS = 'REF_ARTICULOS'; + +{ TBizArticulosServer } + +procedure TBizArticulosServer.AfterProcessChange( + Sender: TDABusinessProcessor; aChange: TDADeltaChange; Processed: Boolean; + var CanRemoveFromDelta: Boolean); +begin + inherited; + { Por defecto, mantenemos los deltas por si alguna tabla hija los necesita } + CanRemoveFromDelta := False; + + case aChange.ChangeType of + ctInsert, ctUpdate: begin + if FReferenciaAutomatica then + begin + IncrementarReferencia; + FReferenciaAutomatica := False; + end; + end; + end; +end; + +procedure TBizArticulosServer.BeforeProcessDelta( + Sender: TDABusinessProcessor; const aDelta: IDADelta); +begin + FReferenciaAutomatica := False; + + case Sender.CurrentChange.ChangeType of + ctInsert, ctUpdate: begin + //Si la referencia no ha sido asignada le asignamos una nosotros + if REFERENCIAIsNull or (Length(REFERENCIA) = 0) then + begin + FReferenciaAutomatica := True; + REFERENCIA := DarReferencia; + end; + end; + end; +end; + +function TBizArticulosServer.DarReferencia: String; +begin + with TsrvReferencias.Create(NIL) do + try + Result := DarNuevaReferencia(REF_ARTICULOS) + finally + Free; + end; +end; + +function TBizArticulosServer.IncrementarReferencia: Boolean; +begin + with TsrvReferencias.Create(NIL) do + try + Result := IncrementarValorReferencia(REF_ARTICULOS, Self.REFERENCIA, ID_EMPRESA) + finally + Free; + end; +end; + +initialization + RegisterBusinessProcessorRules(BIZ_SERVER_ARTICULOS, TBizArticulosServer); + +end. diff --git a/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.dfm b/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.dfm index 53750dfb..a7574b09 100644 --- a/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.dfm +++ b/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.dfm @@ -136,6 +136,40 @@ object srvArticulos: TsrvArticulos DataType = datString Size = 255 DisplayLabel = 'Ref. fabricante' + end + item + Name = 'Articulos_PARAM_MARGEN' + DataType = datFloat + DisplayLabel = 'Margen' + end + item + Name = 'Articulos_PRECIO_PVP_VENTA' + DataType = datCurrency + DisplayLabel = 'Precio PVP (Solo suministro)' + Alignment = taRightJustify + end + item + Name = 'Articulos_TIEMPO' + DataType = datInteger + DisplayLabel = 'Tiempo' + end + item + Name = 'Articulos_PARAM_TIEMPO' + DataType = datFloat + DisplayLabel = 'Precio min' + Alignment = taRightJustify + end + item + Name = 'Articulos_MANO_OBRA' + DataType = datCurrency + DisplayLabel = 'Mano de obra' + Alignment = taRightJustify + end + item + Name = 'Articulos_PRECIO_PVP_TOTAL' + DataType = datCurrency + DisplayLabel = 'Precio P.V.P (Total)' + Alignment = taRightJustify end> Left = 150 Top = 22 @@ -209,6 +243,10 @@ object srvArticulos: TsrvArticulos DatasetField = 'DESCRIPCION' TableField = 'DESCRIPCION' end + item + DatasetField = 'UNIDAD_MEDIDA' + TableField = 'UNIDAD_MEDIDA' + end item DatasetField = 'FAMILIA' TableField = 'FAMILIA' @@ -253,6 +291,10 @@ object srvArticulos: TsrvArticulos DatasetField = 'PRECIO_NETO' TableField = 'PRECIO_NETO' end + item + DatasetField = 'INVENTARIABLE' + TableField = 'INVENTARIABLE' + end item DatasetField = 'ID_PROVEEDOR' TableField = 'ID_PROVEEDOR' @@ -261,18 +303,10 @@ object srvArticulos: TsrvArticulos DatasetField = 'NOMBRE_PROVEEDOR' TableField = 'NOMBRE_PROVEEDOR' end - item - DatasetField = 'INVENTARIABLE' - TableField = 'INVENTARIABLE' - end item DatasetField = 'ELIMINADO' TableField = 'ELIMINADO' end - item - DatasetField = 'UNIDAD_MEDIDA' - TableField = 'UNIDAD_MEDIDA' - end item DatasetField = 'FABRICANTE' TableField = 'FABRICANTE' @@ -281,6 +315,14 @@ object srvArticulos: TsrvArticulos DatasetField = 'REFERENCIA_FABR' TableField = 'REFERENCIA_FABR' end + item + DatasetField = 'PARAM_MARGEN' + TableField = 'PARAM_MARGEN' + end + item + DatasetField = 'PRECIO_PVP_VENTA' + TableField = 'PRECIO_PVP_VENTA' + end item DatasetField = 'TIEMPO' TableField = 'TIEMPO' @@ -294,8 +336,8 @@ object srvArticulos: TsrvArticulos TableField = 'MANO_OBRA' end item - DatasetField = 'PRECIO_PVP' - TableField = 'PRECIO_PVP' + DatasetField = 'PRECIO_PVP_TOTAL' + TableField = 'PRECIO_PVP_TOTAL' end> end> Name = 'Articulos' @@ -422,21 +464,35 @@ object srvArticulos: TsrvArticulos Size = 255 DictionaryEntry = 'Articulos_REFERENCIA_FABR' end + item + Name = 'PARAM_MARGEN' + DataType = datFloat + DictionaryEntry = 'Articulos_PARAM_MARGEN' + end + item + Name = 'PRECIO_PVP_VENTA' + DataType = datCurrency + DictionaryEntry = 'Articulos_PRECIO_PVP_VENTA' + end item Name = 'TIEMPO' DataType = datInteger + DictionaryEntry = 'Articulos_TIEMPO' end item Name = 'PARAM_TIEMPO' DataType = datFloat + DictionaryEntry = 'Articulos_PARAM_TIEMPO' end item Name = 'MANO_OBRA' DataType = datCurrency + DictionaryEntry = 'Articulos_MANO_OBRA' end item - Name = 'PRECIO_PVP' + Name = 'PRECIO_PVP_TOTAL' DataType = datCurrency + DictionaryEntry = 'Articulos_PRECIO_PVP_TOTAL' end> end item @@ -460,12 +516,13 @@ object srvArticulos: TsrvArticulos 'ORES.DESCUENTO,'#10#9'V_ARTICULOS.PRECIO_NETO, V_ARTICULOS.INVENTARIA' + 'BLE,'#10#9'V_ARTICULOS.ID_PROVEEDOR, V_ARTICULOS.NOMBRE_PROVEEDOR,'#10#9'V' + '_ARTICULOS.ELIMINADO, V_ARTICULOS.FABRICANTE, V_ARTICULOS.REFERE' + - 'NCIA_FABR,'#10#9'V_ARTICULOS.TIEMPO, V_ARTICULOS.PARAM_TIEMPO, V_ARTI' + - 'CULOS.MANO_OBRA,'#10' V_ARTICULOS.PRECIO_PVP'#10' FROM'#10' V_ART' + - 'ICULOS'#10' LEFT OUTER JOIN CLIENTES_DTOS_PROVEEDORES'#10#9'ON ((CLIENTE' + - 'S_DTOS_PROVEEDORES.ID_PROVEEDOR = V_ARTICULOS.ID_PROVEEDOR)'#10#9#9'AN' + - 'D (CLIENTES_DTOS_PROVEEDORES.ID_CLIENTE = :ID_CLIENTE))'#10' WHERE ' + - '{Where}'#10 + 'NCIA_FABR,'#10#9'V_ARTICULOS.PARAM_MARGEN, V_ARTICULOS.PRECIO_PVP_VEN' + + 'TA, V_ARTICULOS.TIEMPO,'#10' V_ARTICULOS.PARAM_TIEMPO, V_ARTI' + + 'CULOS.MANO_OBRA, V_ARTICULOS.PRECIO_PVP_TOTAL'#10' FROM'#10' V_ARTIC' + + 'ULOS'#10' LEFT OUTER JOIN CLIENTES_DTOS_PROVEEDORES'#10#9'ON ((CLIENTES_' + + 'DTOS_PROVEEDORES.ID_PROVEEDOR = V_ARTICULOS.ID_PROVEEDOR)'#10#9#9'AND ' + + '(CLIENTES_DTOS_PROVEEDORES.ID_CLIENTE = :ID_CLIENTE))'#10' WHERE {W' + + 'here}'#10 StatementType = stSQL ColumnMappings = < item @@ -484,6 +541,10 @@ object srvArticulos: TsrvArticulos DatasetField = 'DESCRIPCION' TableField = 'DESCRIPCION' end + item + DatasetField = 'UNIDAD_MEDIDA' + TableField = 'UNIDAD_MEDIDA' + end item DatasetField = 'FAMILIA' TableField = 'FAMILIA' @@ -544,10 +605,6 @@ object srvArticulos: TsrvArticulos DatasetField = 'ELIMINADO' TableField = 'ELIMINADO' end - item - DatasetField = 'UNIDAD_MEDIDA' - TableField = 'UNIDAD_MEDIDA' - end item DatasetField = 'FABRICANTE' TableField = 'FABRICANTE' @@ -556,6 +613,14 @@ object srvArticulos: TsrvArticulos DatasetField = 'REFERENCIA_FABR' TableField = 'REFERENCIA_FABR' end + item + DatasetField = 'PARAM_MARGEN' + TableField = 'PARAM_MARGEN' + end + item + DatasetField = 'PRECIO_PVP_VENTA' + TableField = 'PRECIO_PVP_VENTA' + end item DatasetField = 'TIEMPO' TableField = 'TIEMPO' @@ -569,8 +634,8 @@ object srvArticulos: TsrvArticulos TableField = 'MANO_OBRA' end item - DatasetField = 'PRECIO_PVP' - TableField = 'PRECIO_PVP' + DatasetField = 'PRECIO_PVP_TOTAL' + TableField = 'PRECIO_PVP_TOTAL' end> end> Name = 'ArticulosParaCliente' @@ -700,6 +765,16 @@ object srvArticulos: TsrvArticulos Size = 255 DictionaryEntry = 'Articulos_REFERENCIA_FABR' end + item + Name = 'PARAM_MARGEN' + DataType = datFloat + end + item + Name = 'PRECIO_PVP_VENTA' + DataType = datCurrency + DisplayLabel = 'Precio P.V.P (Solo suministro)' + Alignment = taRightJustify + end item Name = 'TIEMPO' DataType = datInteger @@ -711,10 +786,14 @@ object srvArticulos: TsrvArticulos item Name = 'MANO_OBRA' DataType = datCurrency + DisplayLabel = 'Mano de obra' + Alignment = taRightJustify end item - Name = 'PRECIO_PVP' + Name = 'PRECIO_PVP_TOTAL' DataType = datCurrency + DisplayLabel = 'Precio P.V.P. (Total)' + Alignment = taRightJustify end> end> JoinDataTables = <> @@ -808,6 +887,14 @@ object srvArticulos: TsrvArticulos Name = 'REFERENCIA_FABR' Value = '' end + item + Name = 'PARAM_MARGEN' + Value = '' + end + item + Name = 'PRECIO_PVP_VENTA' + Value = '' + end item Name = 'TIEMPO' Value = '' @@ -821,7 +908,7 @@ object srvArticulos: TsrvArticulos Value = '' end item - Name = 'PRECIO_PVP' + Name = 'PRECIO_PVP_TOTAL' Value = '' end> Statements = < @@ -833,14 +920,15 @@ object srvArticulos: TsrvArticulos 'CION, UNIDAD_MEDIDA, FAMILIA, IMAGEN,'#10' COMISIONABLE, FECHA_A' + 'LTA, FECHA_MODIFICACION, USUARIO, '#10' PRECIO_COSTE, PRECIO_POR' + 'TE, DESCUENTO, ID_PROVEEDOR, '#10' PRECIO_NETO, REFERENCIA_PROV,' + - ' INVENTARIABLE, ELIMINADO, FABRICANTE,'#10' REFERENCIA_FABR, TIE' + - 'MPO, PARAM_TIEMPO, MANO_OBRA, PRECIO_PVP)'#10' VALUES'#10' (:ID, :ID' + - '_EMPRESA, :REFERENCIA, :DESCRIPCION, :UNIDAD_MEDIDA, :FAMILIA,'#10' ' + - ' :IMAGEN, :COMISIONABLE, :FECHA_ALTA, :FECHA_MODIFICACION, '#10' ' + - ' :USUARIO, :PRECIO_COSTE, :PRECIO_PORTE, :DESCUENTO, '#10' :I' + - 'D_PROVEEDOR, :PRECIO_NETO, :REFERENCIA_PROV,'#10' :INVENTARIABLE' + - ', :ELIMINADO, :FABRICANTE, :REFERENCIA_FABR, :TIEMPO, :PARAM_TIE' + - 'MPO,'#10' :MANO_OBRA, :PRECIO_PVP)'#10 + ' INVENTARIABLE, ELIMINADO, FABRICANTE,'#10' REFERENCIA_FABR, PAR' + + 'AM_MARGEN, PRECIO_PVP_VENTA, TIEMPO, PARAM_TIEMPO,'#10' MANO_OBR' + + 'A, PRECIO_PVP_TOTAL)'#10' VALUES'#10' (:ID, :ID_EMPRESA, :REFERENCIA' + + ', :DESCRIPCION, :UNIDAD_MEDIDA, :FAMILIA,'#10' :IMAGEN, :COMISIO' + + 'NABLE, :FECHA_ALTA, :FECHA_MODIFICACION, '#10' :USUARIO, :PRECIO' + + '_COSTE, :PRECIO_PORTE, :DESCUENTO, '#10' :ID_PROVEEDOR, :PRECIO_' + + 'NETO, :REFERENCIA_PROV,'#10' :INVENTARIABLE, :ELIMINADO, :FABRIC' + + 'ANTE, :REFERENCIA_FABR, :PARAM_MARGEN,'#10' :PRECIO_PVP_VENTA, :' + + 'TIEMPO, :PARAM_TIEMPO, :MANO_OBRA, :PRECIO_PVP_TOTAL)'#10 StatementType = stSQL ColumnMappings = <> end> @@ -946,6 +1034,14 @@ object srvArticulos: TsrvArticulos Name = 'REFERENCIA_FABR' Value = '' end + item + Name = 'PARAM_MARGEN' + Value = '' + end + item + Name = 'PRECIO_PVP_VENTA' + Value = '' + end item Name = 'TIEMPO' Value = '' @@ -959,7 +1055,7 @@ object srvArticulos: TsrvArticulos Value = '' end item - Name = 'PRECIO_PVP' + Name = 'PRECIO_PVP_TOTAL' Value = '' end item @@ -981,9 +1077,11 @@ object srvArticulos: TsrvArticulos 'OVEEDOR = :ID_PROVEEDOR, '#10' PRECIO_NETO = :PRECIO_NETO,'#10' IN' + 'VENTARIABLE = :INVENTARIABLE,'#10' REFERENCIA_PROV = :REFERENCIA_' + 'PROV,'#10' ELIMINADO = :ELIMINADO,'#10' FABRICANTE = :FABRICANTE,'#10 + - ' REFERENCIA_FABR = :REFERENCIA_FABR,'#10' TIEMPO = :TIEMPO,'#10' ' + - ' PARAM_TIEMPO = :PARAM_TIEMPO,'#10' MANO_OBRA = :MANO_OBRA,'#10' ' + - 'PRECIO_PVP = :PRECIO_PVP'#10' WHERE'#10' (ID = :OLD_ID)'#10 + ' REFERENCIA_FABR = :REFERENCIA_FABR,'#10' PARAM_MARGEN = :PARA' + + 'M_MARGEN,'#10' PRECIO_PVP_VENTA = :PRECIO_PVP_VENTA,'#10' TIEMPO =' + + ' :TIEMPO,'#10' PARAM_TIEMPO = :PARAM_TIEMPO,'#10' MANO_OBRA = :MAN' + + 'O_OBRA,'#10' PRECIO_PVP_TOTAL = :PRECIO_PVP_TOTAL'#10' WHERE'#10' (ID' + + ' = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> diff --git a/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.pas b/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.pas index 512b83a6..192f3736 100644 --- a/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.pas +++ b/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.pas @@ -39,7 +39,8 @@ implementation {$R *.dfm} uses {Generated:} FactuGES_Invk, uDataModuleServer, Variants, uStringsUtils, - uDatabaseUtils, schArticulosClient_Intf, uRestriccionesUsuarioUtils, dialogs; + uDatabaseUtils, schArticulosClient_Intf, uRestriccionesUsuarioUtils, dialogs, + uBizArticulosServer; procedure Create_srvArticulos(out anInstance : IUnknown); begin @@ -63,6 +64,7 @@ end; procedure TsrvArticulos.DARemoteServiceCreate(Sender: TObject); begin SessionManager := dmServer.SessionManager; + bpArticulos.BusinessRulesID := BIZ_SERVER_ARTICULOS; end; function TsrvArticulos.DarListaProveedoresConArticulos(Const IDEmpresa: Integer): Binary; diff --git a/Source/Modulos/Articulos/Views/uViewArticulo.dfm b/Source/Modulos/Articulos/Views/uViewArticulo.dfm index 5d8ed3c8..4d5d9103 100644 --- a/Source/Modulos/Articulos/Views/uViewArticulo.dfm +++ b/Source/Modulos/Articulos/Views/uViewArticulo.dfm @@ -1,6 +1,6 @@ inherited frViewArticulo: TfrViewArticulo - Width = 897 - Height = 427 + Width = 1042 + Height = 510 Align = alClient OnCreate = CustomViewCreate OnDestroy = CustomViewDestroy @@ -10,20 +10,20 @@ inherited frViewArticulo: TfrViewArticulo object dxLayoutControlArticulo: TdxLayoutControl Left = 0 Top = 0 - Width = 897 - Height = 425 + Width = 1042 + Height = 507 Align = alTop ParentBackground = True TabOrder = 0 TabStop = False AutoContentSizes = [acsWidth] - ExplicitWidth = 451 + ExplicitWidth = 954 DesignSize = ( - 897 - 425) + 1042 + 507) object PngSpeedButton2: TPngSpeedButton - Left = 405 - Top = 388 + Left = 529 + Top = 445 Width = 23 Height = 22 Action = actAnadir @@ -49,15 +49,15 @@ inherited frViewArticulo: TfrViewArticulo PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled] end object PngSpeedButton1: TPngSpeedButton - Left = 405 - Top = 416 + Left = 529 + Top = 473 Width = 23 Height = 22 Action = actEliminar PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled] end object eReferencia: TcxDBTextEdit - Left = 122 + Left = 132 Top = 55 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'REFERENCIA' @@ -75,10 +75,10 @@ inherited frViewArticulo: TfrViewArticulo StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True TabOrder = 1 - Width = 171 + Width = 200 end object eDescripcion: TcxDBTextEdit - Left = 122 + Left = 132 Top = 28 DataBinding.DataField = 'DESCRIPCION' DataBinding.DataSource = dsViewArticulo @@ -95,10 +95,10 @@ inherited frViewArticulo: TfrViewArticulo StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True TabOrder = 0 - Width = 171 + Width = 200 end object eNoComisionable: TcxDBCheckBox - Left = 122 + Left = 132 Top = 163 Caption = 'Art'#237'culo no comisionable' DataBinding.DataField = 'COMISIONABLE' @@ -119,11 +119,11 @@ inherited frViewArticulo: TfrViewArticulo StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True TabOrder = 5 - Width = 171 + Width = 200 end object eImagen: TcxImage Left = 28 - Top = 388 + Top = 445 Properties.GraphicClassName = 'TJPEGImage' Properties.ImmediatePost = True Properties.PopupMenuLayout.MenuItems = [] @@ -139,12 +139,12 @@ inherited frViewArticulo: TfrViewArticulo StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 12 + TabOrder = 14 Height = 98 - Width = 236 + Width = 200 end object cbFamilia: TcxDBComboBox - Left = 122 + Left = 132 Top = 82 DataBinding.DataField = 'FAMILIA' DataBinding.DataSource = dsViewArticulo @@ -165,10 +165,10 @@ inherited frViewArticulo: TfrViewArticulo StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True TabOrder = 2 - Width = 171 + Width = 200 end inline frViewDatosYSeleccionProveedor1: TfrViewDatosYSeleccionProveedor - Left = 458 + Left = 582 Top = 28 Width = 167 Height = 202 @@ -178,14 +178,14 @@ inherited frViewArticulo: TfrViewArticulo Font.Name = 'Tahoma' Font.Style = [] ParentFont = False - TabOrder = 13 + TabOrder = 15 ReadOnly = False - ExplicitLeft = 458 + ExplicitLeft = 582 ExplicitTop = 28 ExplicitWidth = 167 inherited dxLayoutControl1: TdxLayoutControl Width = 167 - ExplicitWidth = 526 + ExplicitWidth = 167 inherited edtlNombre: TcxDBTextEdit ExplicitWidth = 221 Width = 221 @@ -207,17 +207,17 @@ inherited frViewArticulo: TfrViewArticulo Width = 221 end inherited edtCodigoPostal: TcxDBTextEdit - Left = 308 - ExplicitLeft = 308 + Left = 329 + ExplicitLeft = 329 end inherited Button3: TBitBtn - Left = 192 - ExplicitLeft = 192 + Left = 213 + ExplicitLeft = 213 end end end object eReferenciaProv: TcxDBTextEdit - Left = 539 + Left = 663 Top = 266 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'REFERENCIA_PROV' @@ -230,11 +230,11 @@ inherited frViewArticulo: TfrViewArticulo StyleDisabled.LookAndFeel.NativeStyle = True StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 14 + TabOrder = 16 Width = 86 end object ePrecioCoste: TcxDBCurrencyEdit - Left = 539 + Left = 663 Top = 293 DataBinding.DataField = 'PRECIO_COSTE' DataBinding.DataSource = dsViewArticulo @@ -250,15 +250,17 @@ inherited frViewArticulo: TfrViewArticulo StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 15 - Width = 254 + TabOrder = 17 + Width = 340 end object eDescuento: TcxDBSpinEdit - Left = 539 + Left = 663 Top = 320 DataBinding.DataField = 'DESCUENTO' DataBinding.DataSource = dsViewArticulo Properties.Alignment.Horz = taRightJustify + Properties.AssignedValues.EditFormat = True + Properties.DisplayFormat = ',0.00 %;-,0.00 %' Properties.ImmediatePost = True Properties.MaxValue = 100.000000000000000000 Style.BorderColor = clWindowFrame @@ -273,11 +275,11 @@ inherited frViewArticulo: TfrViewArticulo StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 16 - Width = 313 + TabOrder = 18 + Width = 340 end object ePrecioNeto: TcxDBCurrencyEdit - Left = 539 + Left = 663 Top = 347 DataBinding.DataField = 'PRECIO_NETO' DataBinding.DataSource = dsViewArticulo @@ -298,11 +300,11 @@ inherited frViewArticulo: TfrViewArticulo StyleFocused.TextColor = clWindowText StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 17 - Width = 86 + TabOrder = 19 + Width = 340 end object ePrecioPorte: TcxDBCurrencyEdit - Left = 539 + Left = 663 Top = 374 DataBinding.DataField = 'PRECIO_PORTE' DataBinding.DataSource = dsViewArticulo @@ -318,11 +320,11 @@ inherited frViewArticulo: TfrViewArticulo StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 18 + TabOrder = 20 Width = 86 end object cbNoInventariable: TcxDBCheckBox - Left = 122 + Left = 132 Top = 136 Caption = 'Art'#237'culo no inventariable' DataBinding.DataField = 'INVENTARIABLE' @@ -343,10 +345,10 @@ inherited frViewArticulo: TfrViewArticulo StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True TabOrder = 4 - Width = 171 + Width = 200 end object cbUnidadMedida: TcxDBComboBox - Left = 122 + Left = 132 Top = 109 DataBinding.DataField = 'UNIDAD_MEDIDA' DataBinding.DataSource = dsViewArticulo @@ -367,11 +369,11 @@ inherited frViewArticulo: TfrViewArticulo StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True TabOrder = 3 - Width = 171 + Width = 200 end object cbFabricante: TcxDBComboBox - Left = 122 - Top = 304 + Left = 132 + Top = 361 DataBinding.DataField = 'FABRICANTE' DataBinding.DataSource = dsViewArticulo Properties.DropDownRows = 16 @@ -390,12 +392,12 @@ inherited frViewArticulo: TfrViewArticulo StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 10 - Width = 171 + TabOrder = 12 + Width = 200 end object eReferenciaFabr: TcxDBTextEdit - Left = 122 - Top = 331 + Left = 132 + Top = 388 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'REFERENCIA_FABR' DataBinding.DataSource = dsViewArticulo @@ -412,35 +414,12 @@ inherited frViewArticulo: TfrViewArticulo StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 11 + TabOrder = 13 Width = 171 end - object eParamTiempo: TcxDBSpinEdit - Left = 322 - Top = 220 - DataBinding.DataField = 'PARAM_TIEMPO' - DataBinding.DataSource = dsViewArticulo - Properties.Alignment.Horz = taRightJustify - Properties.ImmediatePost = True - Properties.MaxValue = 100.000000000000000000 - Style.BorderColor = clWindowFrame - Style.BorderStyle = ebs3D - Style.HotTrack = False - Style.LookAndFeel.Kind = lfStandard - Style.LookAndFeel.NativeStyle = True - Style.ButtonStyle = bts3D - StyleDisabled.LookAndFeel.Kind = lfStandard - StyleDisabled.LookAndFeel.NativeStyle = True - StyleFocused.LookAndFeel.Kind = lfStandard - StyleFocused.LookAndFeel.NativeStyle = True - StyleHot.LookAndFeel.Kind = lfStandard - StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 8 - Width = 100 - end object eTiempo: TcxDBSpinEdit - Left = 122 - Top = 220 + Left = 132 + Top = 277 DataBinding.DataField = 'TIEMPO' DataBinding.DataSource = dsViewArticulo Properties.Alignment.Horz = taRightJustify @@ -458,16 +437,69 @@ inherited frViewArticulo: TfrViewArticulo StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 6 - Width = 50 + TabOrder = 8 + Width = 60 end - object ePrecioPvp: TcxDBSpinEdit - Left = 322 - Top = 247 - DataBinding.DataField = 'PRECIO_PVP' + object ePrecioPvpTotal: TcxDBSpinEdit + Left = 132 + Top = 304 + DataBinding.DataField = 'PRECIO_PVP_TOTAL' DataBinding.DataSource = dsViewArticulo Enabled = False Properties.Alignment.Horz = taRightJustify + Properties.EditFormat = ',0.00 '#8364';-,0.00 '#8364 + Properties.ImmediatePost = True + Properties.MaxValue = 100.000000000000000000 + Properties.SpinButtons.Visible = False + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + Style.ButtonStyle = bts3D + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 11 + Width = 420 + end + object eManoObra: TcxDBSpinEdit + Left = 440 + Top = 277 + DataBinding.DataField = 'MANO_OBRA' + DataBinding.DataSource = dsViewArticulo + Enabled = False + Properties.Alignment.Horz = taRightJustify + Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364 + Properties.ImmediatePost = True + Properties.MaxValue = 100.000000000000000000 + Properties.SpinButtons.Visible = False + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + Style.ButtonStyle = bts3D + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 10 + Width = 100 + end + object eParamMargen: TcxDBSpinEdit + Left = 132 + Top = 220 + DataBinding.DataField = 'PARAM_MARGEN' + DataBinding.DataSource = dsViewArticulo + Properties.Alignment.Horz = taRightJustify + Properties.AssignedValues.EditFormat = True + Properties.DisplayFormat = ',0.00 %;-,0.00 %' Properties.ImmediatePost = True Properties.MaxValue = 100.000000000000000000 Style.BorderColor = clWindowFrame @@ -482,18 +514,20 @@ inherited frViewArticulo: TfrViewArticulo StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 9 + TabOrder = 6 Width = 100 end - object eManoObra: TcxDBSpinEdit - Left = 122 - Top = 247 - DataBinding.DataField = 'MANO_OBRA' + object ePRECIO_PVP_VENTA: TcxDBSpinEdit + Left = 389 + Top = 220 + DataBinding.DataField = 'PRECIO_PVP_VENTA' DataBinding.DataSource = dsViewArticulo Enabled = False Properties.Alignment.Horz = taRightJustify + Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364 Properties.ImmediatePost = True Properties.MaxValue = 100.000000000000000000 + Properties.SpinButtons.Visible = False Style.BorderColor = clWindowFrame Style.BorderStyle = ebs3D Style.HotTrack = False @@ -507,6 +541,26 @@ inherited frViewArticulo: TfrViewArticulo StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True TabOrder = 7 + Width = 163 + end + object eParamTiempo: TcxDBCurrencyEdit + Left = 259 + Top = 277 + DataBinding.DataField = 'PARAM_TIEMPO' + DataBinding.DataSource = dsViewArticulo + Properties.Alignment.Horz = taRightJustify + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + TabOrder = 9 Width = 100 end object dxLayoutControlArticuloGroup_Root: TdxLayoutGroup @@ -522,7 +576,6 @@ inherited frViewArticulo: TfrViewArticulo end object dxLayoutControlArticuloGroup14: TdxLayoutGroup AutoAligns = [] - AlignHorz = ahClient Caption = 'New Group' ShowCaption = False Hidden = True @@ -585,38 +638,53 @@ inherited frViewArticulo: TfrViewArticulo end end end - object dxLayoutControlArticuloGroup8: TdxLayoutGroup - Caption = 'C'#225'lculo precio PVP' + object dxLayoutControlArticuloGroup13: TdxLayoutGroup + Caption = 'Precio P.V.P (Solo suministro)' LayoutDirection = ldHorizontal - object dxLayoutControlArticuloGroup15: TdxLayoutGroup + object dxLayoutControlArticuloItem22: TdxLayoutItem + Caption = 'Margen coste (%):' + Control = eParamMargen + ControlOptions.ShowBorder = False + end + object dxLayoutControlArticuloItem23: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'Precio Venta (Solo suministro):' + Control = ePRECIO_PVP_VENTA + ControlOptions.ShowBorder = False + end + end + object dxLayoutControlArticuloGroup8: TdxLayoutGroup + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'Precio P.V.P (Total)' + object dxLayoutControlArticuloGroup16: TdxLayoutGroup ShowCaption = False Hidden = True + LayoutDirection = ldHorizontal ShowBorder = False object dxLayoutControlArticuloItem13: TdxLayoutItem - Caption = 'Tiempo:' + Caption = 'Tiempo min.:' Control = eTiempo ControlOptions.ShowBorder = False end + object dxLayoutControlArticuloItem24: TdxLayoutItem + Caption = 'Precio min.:' + Control = eParamTiempo + ControlOptions.ShowBorder = False + end object dxLayoutControlArticuloItem21: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient Caption = 'Mano de obra:' Control = eManoObra ControlOptions.ShowBorder = False end end - object dxLayoutControlArticuloGroup9: TdxLayoutGroup - ShowCaption = False - Hidden = True - ShowBorder = False - object dxLayoutControlArticuloItem12: TdxLayoutItem - Caption = 'Parametro tiempo:' - Control = eParamTiempo - ControlOptions.ShowBorder = False - end - object dxLayoutControlArticuloItem20: TdxLayoutItem - Caption = 'Precio PVP:' - Control = ePrecioPvp - ControlOptions.ShowBorder = False - end + object dxLayoutControlArticuloItem20: TdxLayoutItem + Caption = 'Precio Venta (Total):' + Control = ePrecioPvpTotal + ControlOptions.ShowBorder = False end end object dxLayoutControlArticuloGroup10: TdxLayoutGroup @@ -691,7 +759,7 @@ inherited frViewArticulo: TfrViewArticulo ControlOptions.ShowBorder = False end object dxLayoutControlArticuloItem16: TdxLayoutItem - Caption = 'Precio:' + Caption = 'Precio material:' Control = ePrecioCoste ControlOptions.ShowBorder = False end @@ -701,12 +769,13 @@ inherited frViewArticulo: TfrViewArticulo ControlOptions.ShowBorder = False end object dxLayoutControlArticuloItem18: TdxLayoutItem - Caption = 'Precio neto:' + Caption = 'Precio coste:' Control = ePrecioNeto ControlOptions.ShowBorder = False end object dxLayoutControlArticuloItem19: TdxLayoutItem Caption = 'Coste de envio:' + Visible = False Control = ePrecioPorte ControlOptions.ShowBorder = False end diff --git a/Source/Modulos/Articulos/Views/uViewArticulo.pas b/Source/Modulos/Articulos/Views/uViewArticulo.pas index b21a6361..7c35ffce 100644 --- a/Source/Modulos/Articulos/Views/uViewArticulo.pas +++ b/Source/Modulos/Articulos/Views/uViewArticulo.pas @@ -85,16 +85,20 @@ type dxLayoutControlArticuloGroup14: TdxLayoutGroup; dxLayoutControlArticuloGroup7: TdxLayoutGroup; dxLayoutControlArticuloGroup8: TdxLayoutGroup; - dxLayoutControlArticuloItem12: TdxLayoutItem; - eParamTiempo: TcxDBSpinEdit; dxLayoutControlArticuloItem13: TdxLayoutItem; eTiempo: TcxDBSpinEdit; dxLayoutControlArticuloItem20: TdxLayoutItem; - ePrecioPvp: TcxDBSpinEdit; + ePrecioPvpTotal: TcxDBSpinEdit; dxLayoutControlArticuloItem21: TdxLayoutItem; eManoObra: TcxDBSpinEdit; - dxLayoutControlArticuloGroup9: TdxLayoutGroup; - dxLayoutControlArticuloGroup15: TdxLayoutGroup; + dxLayoutControlArticuloItem22: TdxLayoutItem; + eParamMargen: TcxDBSpinEdit; + dxLayoutControlArticuloItem23: TdxLayoutItem; + ePRECIO_PVP_VENTA: TcxDBSpinEdit; + dxLayoutControlArticuloGroup16: TdxLayoutGroup; + dxLayoutControlArticuloGroup13: TdxLayoutGroup; + dxLayoutControlArticuloItem24: TdxLayoutItem; + eParamTiempo: TcxDBCurrencyEdit; procedure actEliminarExecute(Sender: TObject); procedure actAnadirExecute(Sender: TObject); procedure cbFamiliaPropertiesInitPopup(Sender: TObject); diff --git a/Source/Modulos/Articulos/Views/uViewArticulos.dfm b/Source/Modulos/Articulos/Views/uViewArticulos.dfm index 4d8a4927..7ebe866b 100644 --- a/Source/Modulos/Articulos/Views/uViewArticulos.dfm +++ b/Source/Modulos/Articulos/Views/uViewArticulos.dfm @@ -128,7 +128,7 @@ inherited frViewArticulos: TfrViewArticulos Width = 60 end object cxGridViewPRECIO_COSTE: TcxGridDBColumn - Caption = 'Precio coste' + Caption = 'Precio material' DataBinding.FieldName = 'PRECIO_COSTE' PropertiesClassName = 'TcxCurrencyEditProperties' Properties.Alignment.Horz = taRightJustify @@ -147,7 +147,7 @@ inherited frViewArticulos: TfrViewArticulos HeaderAlignmentHorz = taRightJustify end object cxGridViewPRECIO_NETO: TcxGridDBColumn - Caption = 'Precio neto' + Caption = 'Precio coste' DataBinding.FieldName = 'PRECIO_NETO' PropertiesClassName = 'TcxCurrencyEditProperties' Properties.Alignment.Horz = taRightJustify @@ -160,13 +160,23 @@ inherited frViewArticulos: TfrViewArticulos DataBinding.FieldName = 'PRECIO_PORTE' PropertiesClassName = 'TcxCurrencyEditProperties' Properties.Alignment.Horz = taRightJustify + Visible = False BestFitMaxWidth = 60 FooterAlignmentHorz = taRightJustify HeaderAlignmentHorz = taRightJustify + VisibleForCustomization = False end - object cxGridViewPRECIO_PVP: TcxGridDBColumn - Caption = 'Precio P.V.P' - DataBinding.FieldName = 'PRECIO_PVP' + object cxGridViewMARGEN: TcxGridDBColumn + Caption = 'Margen' + DataBinding.FieldName = 'PARAM_MARGEN' + PropertiesClassName = 'TcxSpinEditProperties' + Properties.Alignment.Horz = taRightJustify + Properties.DisplayFormat = ',0.00 %;-,0.00 %' + HeaderAlignmentHorz = taRightJustify + end + object cxGridViewPRECIO_PVP_VENTA: TcxGridDBColumn + Caption = 'Precio P.V.P (solo suministro)' + DataBinding.FieldName = 'PRECIO_PVP_VENTA' PropertiesClassName = 'TcxCurrencyEditProperties' Properties.Alignment.Horz = taRightJustify GroupSummaryAlignment = taRightJustify @@ -177,6 +187,31 @@ inherited frViewArticulos: TfrViewArticulos Visible = False VisibleForCustomization = False end + object cxGridViewTIEMPO: TcxGridDBColumn + Caption = 'Tiempo min' + DataBinding.FieldName = 'TIEMPO' + PropertiesClassName = 'TcxSpinEditProperties' + Properties.Alignment.Horz = taRightJustify + HeaderAlignmentHorz = taRightJustify + end + object cxGridViewPARAM_TIEMPO: TcxGridDBColumn + DataBinding.FieldName = 'PARAM_TIEMPO' + PropertiesClassName = 'TcxCurrencyEditProperties' + Properties.Alignment.Horz = taRightJustify + HeaderAlignmentHorz = taRightJustify + end + object cxGridViewMANO_OBRA: TcxGridDBColumn + DataBinding.FieldName = 'MANO_OBRA' + PropertiesClassName = 'TcxCurrencyEditProperties' + Properties.Alignment.Horz = taRightJustify + HeaderAlignmentHorz = taRightJustify + end + object cxGridViewPRECIO_PVP_TOTAL: TcxGridDBColumn + DataBinding.FieldName = 'PRECIO_PVP_TOTAL' + PropertiesClassName = 'TcxCurrencyEditProperties' + Properties.Alignment.Horz = taRightJustify + HeaderAlignmentHorz = taRightJustify + end end inherited cxGridLevel: TcxGridLevel Caption = 'Todos los proveedores' diff --git a/Source/Modulos/Articulos/Views/uViewArticulos.pas b/Source/Modulos/Articulos/Views/uViewArticulos.pas index 25568bde..ae4875a9 100644 --- a/Source/Modulos/Articulos/Views/uViewArticulos.pas +++ b/Source/Modulos/Articulos/Views/uViewArticulos.pas @@ -52,8 +52,13 @@ type TBXSeparatorItem3: TTBXSeparatorItem; actFabricante: TAction; cxGridViewREFERENCIA_FABR: TcxGridDBColumn; - cxGridViewPRECIO_PVP: TcxGridDBColumn; + cxGridViewPRECIO_PVP_VENTA: TcxGridDBColumn; cxGridViewID_PROVEEDOR: TcxGridDBColumn; + cxGridViewMARGEN: TcxGridDBColumn; + cxGridViewPRECIO_PVP_TOTAL: TcxGridDBColumn; + cxGridViewTIEMPO: TcxGridDBColumn; + cxGridViewPARAM_TIEMPO: TcxGridDBColumn; + cxGridViewMANO_OBRA: TcxGridDBColumn; procedure actProveedorExecute(Sender: TObject); procedure actProveedorUpdate(Sender: TObject); procedure actFamiliaExecute(Sender: TObject); diff --git a/Source/Modulos/Facturas de cliente/Controller/uDetallesFacturaClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uDetallesFacturaClienteController.pas index f6ad1b59..d6cc8de1 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uDetallesFacturaClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uDetallesFacturaClienteController.pas @@ -161,7 +161,7 @@ end; procedure TDetallesFacturaClienteController.RellenarImportes(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); begin if Assigned(AArticulos) then - ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := AArticulos.PRECIO_PVP + ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := AArticulos.PRECIO_PVP_TOTAL else ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := Null; end; diff --git a/Source/Modulos/Obras/Controller/Obras_controller.res b/Source/Modulos/Obras/Controller/Obras_controller.res index 1641339f..8b251f31 100644 Binary files a/Source/Modulos/Obras/Controller/Obras_controller.res and b/Source/Modulos/Obras/Controller/Obras_controller.res differ diff --git a/Source/Modulos/Obras/Views/Obras_view.res b/Source/Modulos/Obras/Views/Obras_view.res index 1641339f..8b251f31 100644 Binary files a/Source/Modulos/Obras/Views/Obras_view.res and b/Source/Modulos/Obras/Views/Obras_view.res differ diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.dfm index 51af737e..f789d26c 100644 --- a/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.dfm +++ b/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.dfm @@ -1,7 +1,6 @@ inherited frViewElegirArticulosPedidosProveedor: TfrViewElegirArticulosPedidosProveedor Width = 565 Height = 407 - OnDestroy = CustomViewDestroy ExplicitWidth = 565 ExplicitHeight = 407 inherited cxGrid: TcxGrid @@ -11,12 +10,6 @@ inherited frViewElegirArticulosPedidosProveedor: TfrViewElegirArticulosPedidosPr OnActiveTabChanged = cxGridActiveTabChanged ExplicitWidth = 565 ExplicitHeight = 279 - inherited cxGridView: TcxGridDBTableView - object cxGridViewID_PROVEEDOR: TcxGridDBColumn - DataBinding.FieldName = 'ID_PROVEEDOR' - Visible = False - end - end object cxGridLevel1: TcxGridLevel Caption = 'Otros proveedores' end @@ -30,8 +23,8 @@ inherited frViewElegirArticulosPedidosProveedor: TfrViewElegirArticulosPedidosPr Width = 565 ExplicitWidth = 565 inherited txtFiltroTodo: TcxTextEdit - ExplicitWidth = 273 - Width = 273 + ExplicitWidth = 468 + Width = 468 end inherited edtFechaIniFiltro: TcxDateEdit ExplicitWidth = 121 @@ -41,11 +34,17 @@ inherited frViewElegirArticulosPedidosProveedor: TfrViewElegirArticulosPedidosPr ExplicitWidth = 205 Width = 205 end + inherited eLista: TcxComboBox + Left = 467 + ExplicitLeft = 467 + end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 565 + ExplicitWidth = 565 inherited tbxBotones: TTBXToolbar Width = 555 + ExplicitWidth = 555 end end end diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.pas b/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.pas index b176f7c9..a2e10e23 100644 --- a/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.pas +++ b/Source/Modulos/Pedidos a proveedor/Views/uViewElegirArticulosPedidosProveedor.pas @@ -12,7 +12,13 @@ uses uDADataTable, cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, dxPgsDlg, ActnList, TB2Item, TBX, TB2Toolbar, TBXDkPanels, TB2Dock, uViewFiltroBase, - uBizContactos; + uBizContactos, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinCaramel, + dxSkinCoffee, dxSkinGlassOceans, dxSkiniMaginary, dxSkinLilian, + dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins, + dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green, + dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinSilver, dxSkinStardust, + dxSkinsDefaultPainters, dxSkinValentine, dxSkinXmas2008Blue, + dxSkinscxPCPainter, uDAInterfaces; type IViewElegirArticulosPedidosProveedor = interface(IViewArticulos) @@ -24,7 +30,6 @@ type TfrViewElegirArticulosPedidosProveedor = class(TfrViewArticulos, IViewElegirArticulosPedidosProveedor) cxGridLevel1: TcxGridLevel; - cxGridViewID_PROVEEDOR: TcxGridDBColumn; procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); procedure CustomViewDestroy(Sender: TObject); diff --git a/Source/Modulos/Presupuestos de cliente/Controller/uDetallesPresupuestoClienteController.pas b/Source/Modulos/Presupuestos de cliente/Controller/uDetallesPresupuestoClienteController.pas index 668fb5d7..6b1b11ee 100644 --- a/Source/Modulos/Presupuestos de cliente/Controller/uDetallesPresupuestoClienteController.pas +++ b/Source/Modulos/Presupuestos de cliente/Controller/uDetallesPresupuestoClienteController.pas @@ -154,7 +154,7 @@ end; procedure TDetallesPresupuestoClienteController.RellenarImportes(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); begin if Assigned(AArticulos) then - ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := AArticulos.PRECIO_PVP + ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := AArticulos.PRECIO_PVP_TOTAL else ADetalles.DataTable.FieldByName(CAMPO_IMPORTE_UNIDAD).AsVariant := Null; end; diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES index 5ccc4752..71fa8ba9 100644 Binary files a/Source/Servidor/FactuGES_Server.RES and b/Source/Servidor/FactuGES_Server.RES differ diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr index 92f30d69..08aa9aa1 100644 --- a/Source/Servidor/FactuGES_Server.dpr +++ b/Source/Servidor/FactuGES_Server.dpr @@ -100,8 +100,6 @@ uses srvFabricantes_Impl in '..\Modulos\Fabricantes\Servidor\srvFabricantes_Impl.pas' {srvFabricantes: TDataAbstractService}, schFabricantesClient_Intf in '..\Modulos\Fabricantes\Model\schFabricantesClient_Intf.pas', schFabricantesServer_Intf in '..\Modulos\Fabricantes\Model\schFabricantesServer_Intf.pas', - schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas', - schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas', uRptPedidosProveedor_Server in '..\Modulos\Pedidos a proveedor\Reports\uRptPedidosProveedor_Server.pas' {RptPedidosProveedor: TDataModule}, uRptWordPedidoProveedor in '..\Modulos\Pedidos a proveedor\Reports\uRptWordPedidoProveedor.pas' {RptWordPedidoProveedor: TDataModule}, srvObras_Impl in '..\Modulos\Obras\Servidor\srvObras_Impl.pas', @@ -124,8 +122,12 @@ uses schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas', schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas', srvProvinciasPoblaciones_Impl in '..\ApplicationBase\ProvinciasPoblaciones\Servidor\srvProvinciasPoblaciones_Impl.pas', + schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas', + schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas', schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas', - schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas'; + schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas', + uBizArticulosServer in '..\Modulos\Articulos\Model\uBizArticulosServer.pas', + uBizEmpresasServer in '..\ApplicationBase\Empresas\Model\uBizEmpresasServer.pas'; {$R *.res} {$R ..\Servicios\RODLFile.res} diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj index 7f3c4256..587fce85 100644 --- a/Source/Servidor/FactuGES_Server.dproj +++ b/Source/Servidor/FactuGES_Server.dproj @@ -1,280 +1,282 @@ - + - - {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1} - FactuGES_Server.dpr - Debug - AnyCPU - DCC32 - ..\..\Output\Debug\Servidor\FactuGES_Server.exe - vcl;rtl;vclx;vclactnband;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;teeUI;teedb;tee;adortl;vclib;ibxpress;dbxcds;dbexpress;DbxCommonDriver;IndyCore;IndySystem;IndyProtocols;VclSmp;vclie;webdsnap;xmlrtl;inet;inetdbbde;inetdbxpress;RemObjects_BPDX_D11;RemObjects_RODX_D11;RemObjects_Indy_D11;RemObjects_Synapse_D11;RemObjects_WebBroker_D11;DataAbstract_Core_D11;DataAbstract_DBXDriver_D11;DataAbstract_IDE_D11;DataAbstract_Scripting_D11;DataAbstract_SDACDriver_D11;sdac105;dac105;DataAbstract_SQLiteDriver_D11;cxEditorsD10;cxLibraryD10;dxThemeD10;cxDataD10;cxExtEditorsD10;cxGridD10;cxPageControlD10;cxSchedulerD10;cxTreeListD10;cxVerticalGridD10;dxBarD10;dxComnD10;dxBarDBNavD10;dxBarExtDBItemsD10;dxBarExtItemsD10;dxDockingD10;dxLayoutControlD10;dxNavBarD10;dxPSCoreD10;dxsbD10;dxPScxCommonD10;dxPSLnksD10;vclshlctrls;dxPScxExtCommonD10;dxPScxGridLnkD10;dxPScxPCProdD10;dxPScxScheduler2LnkD10;dxPScxTLLnkD10;dxPSdxLCLnkD10;dxPsPrVwAdvD10;pckMD5;pckUCDataConnector;pckUserControl_RT;PluginSDK_D10R;PNG_D10;PngComponentsD10;tb2k_d10;tbx_d10;JclVcl;Jcl;JvXPCtrlsD11R;JvCoreD11R;JvSystemD11R;JvStdCtrlsD11R;JvAppFrmD11R;JvBandsD11R;JvDBD11R;JvDlgsD11R;JvBDED11R;JvCmpD11R;JvCryptD11R;JvCtrlsD11R;JvCustomD11R;JvDockingD11R;JvDotNetCtrlsD11R;JvEDID11R;JvGlobusD11R;JvHMID11R;JvInterpreterD11R;JvJansD11R;JvManagedThreadsD11R;JvMMD11R;JvNetD11R;JvPageCompsD11R;JvPluginD11R;JvPrintPreviewD11R;JvRuntimeDesignD11R;JvTimeFrameworkD11R;JvUIBD11R;JvValidatorsD11R;JvWizardD11R;pckUCADOConn;pckUCBDEConn;pckUCIBXConn;pckUCMidasConn;cxIntlPrintSys3D10;cxExportD10;cxIntl5D10;GUISDK_D11;ccpackD11;JSDialog100;fsTee11;fs11;frx11;frxADO11;frxBDE11;frxDB11;frxDBX11;frxe11;frxIBX11;frxTee11;fsADO11;fsBDE11;fsDB11;fsIBX11;websnap;soaprtl;IntrawebDB_90_100;Intraweb_90_100 - - - 7.0 - False - False - 0 - 3 - ..\..\Output\Release\Servidor - RELEASE - - - 7.0 - 3 - ..\..\Output\Debug\Servidor - DEBUG; - True - True - True - $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 - $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 - $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 - $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 - - - Delphi.Personality - - - FalseTrueFalse/standaloneTrueFalse1080FalseFalseFalseFalseFalse308212521.0.8.01.0.8.0jueves, 12 de junio de 2008 19:15FactuGES_Server.dpr - - - - - MainSource - - - - -
srvEmpresas
- TDARemoteService -
- - - - - - - - - - - -
RptAlbaranesCliente
- TDataModule -
- -
RptWordAlbaranCliente
- TDataModule -
- -
srvAlbaranesCliente
- TDataAbstractService -
- - - - -
srvAlbaranesProveedor
- TDataAbstractService -
- - - -
srvAlmacenes
- TDARemoteService -
- - - - - - - - - - -
RptEtiquetasContacto
- TDataModule -
- -
RptFichasEmpleado
- TDataModule -
- -
srvContactos
- TDARemoteService -
- - - -
srvFabricantes
- TDataAbstractService -
- - - - -
RptFacturasCliente
- TDataModule -
- -
RptWordFacturaCliente
- TDataModule -
- -
srvFacturasCliente
- TDataAbstractService -
- - - - -
srvFacturasProveedor
- TDataAbstractService -
- - - - - - - - - - -
srvHistoricoMovimientos
- TDataAbstractService -
- - - -
srvInventario
- TDataAbstractService -
- - - - - - - - -
RptPedidosProveedor
- TDataModule -
- -
RptWordPedidoProveedor
- TDataModule -
- -
srvPedidosProveedor
- TDataAbstractService -
- - - - -
RptPresupuestosCliente
-
- -
RptWordPresupuestoCliente
- TDataModule -
- -
srvPresupuestosCliente
- TDataAbstractService -
- - - -
RptRecibosCliente
- TDataModule -
- -
srvRecibosCliente
- TDataAbstractService -
- - - -
srvRecibosProveedor
- TDataAbstractService -
- - - -
srvReferencias
- TDataAbstractService -
- - - - -
srvRemesasCliente
- TDataAbstractService -
- - - - -
srvRemesasProveedor
- TDataAbstractService -
- - - - - - -
srvUnidadesMedida
- TDataAbstractService -
- - - -
srvConfiguracion
- TDataAbstractService -
- -
frConexionBD
- TFrame -
- -
frConfGeneral
- TFrame -
- -
fConfiguracion
- TForm -
- -
FrameConfiguracion
- TFrame -
- -
srvLogin
- TDARemoteService -
- -
fAcercaDe
-
- -
dmServer
- TDataModule -
- -
fServerForm
-
- - - - - - - - - -
+ + {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1} + FactuGES_Server.dpr + Debug + AnyCPU + DCC32 + ..\..\Output\Debug\Servidor\FactuGES_Server.exe + vcl;rtl;vclx;vclactnband;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;teeUI;teedb;tee;adortl;vclib;ibxpress;dbxcds;dbexpress;DbxCommonDriver;IndyCore;IndySystem;IndyProtocols;VclSmp;vclie;webdsnap;xmlrtl;inet;inetdbbde;inetdbxpress;RemObjects_BPDX_D11;RemObjects_RODX_D11;RemObjects_Indy_D11;RemObjects_Synapse_D11;RemObjects_WebBroker_D11;DataAbstract_Core_D11;DataAbstract_DBXDriver_D11;DataAbstract_IDE_D11;DataAbstract_Scripting_D11;DataAbstract_SDACDriver_D11;sdac105;dac105;DataAbstract_SQLiteDriver_D11;cxEditorsD10;cxLibraryD10;dxThemeD10;cxDataD10;cxExtEditorsD10;cxGridD10;cxPageControlD10;cxSchedulerD10;cxTreeListD10;cxVerticalGridD10;dxBarD10;dxComnD10;dxBarDBNavD10;dxBarExtDBItemsD10;dxBarExtItemsD10;dxDockingD10;dxLayoutControlD10;dxNavBarD10;dxPSCoreD10;dxsbD10;dxPScxCommonD10;dxPSLnksD10;vclshlctrls;dxPScxExtCommonD10;dxPScxGridLnkD10;dxPScxPCProdD10;dxPScxScheduler2LnkD10;dxPScxTLLnkD10;dxPSdxLCLnkD10;dxPsPrVwAdvD10;pckMD5;pckUCDataConnector;pckUserControl_RT;PluginSDK_D10R;PNG_D10;PngComponentsD10;tb2k_d10;tbx_d10;JclVcl;Jcl;JvXPCtrlsD11R;JvCoreD11R;JvSystemD11R;JvStdCtrlsD11R;JvAppFrmD11R;JvBandsD11R;JvDBD11R;JvDlgsD11R;JvBDED11R;JvCmpD11R;JvCryptD11R;JvCtrlsD11R;JvCustomD11R;JvDockingD11R;JvDotNetCtrlsD11R;JvEDID11R;JvGlobusD11R;JvHMID11R;JvInterpreterD11R;JvJansD11R;JvManagedThreadsD11R;JvMMD11R;JvNetD11R;JvPageCompsD11R;JvPluginD11R;JvPrintPreviewD11R;JvRuntimeDesignD11R;JvTimeFrameworkD11R;JvUIBD11R;JvValidatorsD11R;JvWizardD11R;pckUCADOConn;pckUCBDEConn;pckUCIBXConn;pckUCMidasConn;cxIntlPrintSys3D10;cxExportD10;cxIntl5D10;GUISDK_D11;ccpackD11;JSDialog100;fsTee11;fs11;frx11;frxADO11;frxBDE11;frxDB11;frxDBX11;frxe11;frxIBX11;frxTee11;fsADO11;fsBDE11;fsDB11;fsIBX11;websnap;soaprtl;IntrawebDB_90_100;Intraweb_90_100 + + + 7.0 + False + False + 0 + 3 + ..\..\Output\Release\Servidor + RELEASE + + + 7.0 + 3 + ..\..\Output\Debug\Servidor + DEBUG; + True + True + True + $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 + $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 + $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 + $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 + + + Delphi.Personality + + +FalseTrueFalse/standaloneTrueFalse1080FalseFalseFalseFalseFalse308212521.0.8.01.0.8.0jueves, 12 de junio de 2008 19:15FactuGES_Server.dpr + + + + + MainSource + + + + + +
srvEmpresas
+ TDARemoteService +
+ + + + + + + + + + + +
RptAlbaranesCliente
+ TDataModule +
+ +
RptWordAlbaranCliente
+ TDataModule +
+ +
srvAlbaranesCliente
+ TDataAbstractService +
+ + + + +
srvAlbaranesProveedor
+ TDataAbstractService +
+ + + +
srvAlmacenes
+ TDARemoteService +
+ + + + + + + + + + + +
RptEtiquetasContacto
+ TDataModule +
+ +
RptFichasEmpleado
+ TDataModule +
+ +
srvContactos
+ TDARemoteService +
+ + + +
srvFabricantes
+ TDataAbstractService +
+ + + + +
RptFacturasCliente
+ TDataModule +
+ +
RptWordFacturaCliente
+ TDataModule +
+ +
srvFacturasCliente
+ TDataAbstractService +
+ + + + +
srvFacturasProveedor
+ TDataAbstractService +
+ + + + + + + + + + +
srvHistoricoMovimientos
+ TDataAbstractService +
+ + + +
srvInventario
+ TDataAbstractService +
+ + + + + + + + +
RptPedidosProveedor
+ TDataModule +
+ +
RptWordPedidoProveedor
+ TDataModule +
+ +
srvPedidosProveedor
+ TDataAbstractService +
+ + + + +
RptPresupuestosCliente
+
+ +
RptWordPresupuestoCliente
+ TDataModule +
+ +
srvPresupuestosCliente
+ TDataAbstractService +
+ + + +
RptRecibosCliente
+ TDataModule +
+ +
srvRecibosCliente
+ TDataAbstractService +
+ + + +
srvRecibosProveedor
+ TDataAbstractService +
+ + + +
srvReferencias
+ TDataAbstractService +
+ + + + +
srvRemesasCliente
+ TDataAbstractService +
+ + + + +
srvRemesasProveedor
+ TDataAbstractService +
+ + + + + + +
srvUnidadesMedida
+ TDataAbstractService +
+ + + +
srvConfiguracion
+ TDataAbstractService +
+ +
frConexionBD
+ TFrame +
+ +
frConfGeneral
+ TFrame +
+ +
fConfiguracion
+ TForm +
+ +
FrameConfiguracion
+ TFrame +
+ +
srvLogin
+ TDARemoteService +
+ +
fAcercaDe
+
+ +
dmServer
+ TDataModule +
+ +
fServerForm
+
+ + + + + + + + + +