diff --git a/Build/Build.fbl6 b/Build/Build.fbl6 index 69d69af..91afa62 100644 Binary files a/Build/Build.fbl6 and b/Build/Build.fbl6 differ diff --git a/Build/Build.fbpInf b/Build/Build.fbpInf index 7b7175e..61e16c3 100644 --- a/Build/Build.fbpInf +++ b/Build/Build.fbpInf @@ -14,8 +14,8 @@ - 00:00:00 - 30/12/1899 + 00:02:48 + 09/07/2012 10:34:04 True diff --git a/Build/Build.fbz6 b/Build/Build.fbz6 index 07fa094..7c2817e 100644 Binary files a/Build/Build.fbz6 and b/Build/Build.fbz6 differ diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index 12e592e..b1053ca 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -79,6 +79,10 @@ VARCHAR(30); CREATE DOMAIN TIPO_CANTIDAD AS NUMERIC(11,2); +CREATE DOMAIN TIPO_FAMILIA AS +VARCHAR(255) CHARACTER SET ISO8859_1 +COLLATE ISO8859_1; + /******************************************************************************/ /**** Generators ****/ @@ -273,6 +277,9 @@ SET GENERATOR GEN_UNIDADES_MEDIDA_ID TO 1; CREATE GENERATOR GEN_USUARIOS_ID; SET GENERATOR GEN_USUARIOS_ID TO 1; +CREATE GENERATOR GEN_PRESUPUESTOS_CLIENTE_CAPITU; +SET GENERATOR GEN_PRESUPUESTOS_CLIENTE_CAPITU TO 100; + SET TERM ^ ; @@ -567,6 +574,7 @@ CREATE TABLE ARTICULOS ( ID_PROVEEDOR TIPO_ID, REFERENCIA_PROV VARCHAR(255), PRECIO_COSTE TIPO_IMPORTE, + PRECIO_PVP TIPO_IMPORTE, DESCUENTO TIPO_PORCENTAJE, PRECIO_NETO TIPO_IMPORTE, PRECIO_PORTE TIPO_IMPORTE, @@ -993,7 +1001,7 @@ CREATE TABLE FACTURAS_PROVEEDOR_CONTRATOS ( CREATE TABLE FAMILIAS ( ID TIPO_ID NOT NULL, - DESCRIPCION VARCHAR(255) + DESCRIPCION TIPO_FAMILIA ); CREATE TABLE FORMAS_PAGO ( @@ -1199,8 +1207,7 @@ CREATE TABLE PRESUPUESTOS_CLIENTE_CAPITULOS ( POSICION INTEGER, TIPO_DETALLE VARCHAR(10), TIPO_ARTICULO VARCHAR(2) COLLATE ES_ES, - ID_ARTICULO TIPO_ID, - CONCEPTO TIPO_CONCEPTO + CONCEPTO TIPO_FAMILIA ); CREATE TABLE PRESUPUESTOS_VALORES ( @@ -1260,8 +1267,9 @@ CREATE TABLE PRESUPUESTOS_CLIENTE_DETALLES ( POSICION INTEGER, TIPO_DETALLE VARCHAR(10), ID_ARTICULO TIPO_ID, - TIPO_ARTICULO VARCHAR(2) COLLATE ES_ES, - CONCEPTO TIPO_CONCEPTO, + TIPO_ARTICULO VARCHAR(2) COLLATE ES_ES, + PROPIEDAD TIPO_FAMILIA, + CONCEPTO TIPO_CONCEPTO, CANTIDAD TIPO_CANTIDAD, IMPORTE_UNIDAD TIPO_IMPORTE, DESCUENTO TIPO_PORCENTAJE, @@ -1321,8 +1329,9 @@ CREATE TABLE CONTRATOS_CLIENTE_DETALLES ( POSICION INTEGER, TIPO_DETALLE VARCHAR(10), ID_ARTICULO TIPO_ID, - TIPO_ARTICULO VARCHAR(2) COLLATE ES_ES, - CONCEPTO TIPO_CONCEPTO, + TIPO_ARTICULO VARCHAR(2) COLLATE ES_ES, + PROPIEDAD TIPO_FAMILIA, + CONCEPTO TIPO_CONCEPTO, CANTIDAD TIPO_CANTIDAD, IMPORTE_UNIDAD TIPO_IMPORTE, DESCUENTO TIPO_PORCENTAJE, @@ -5599,7 +5608,7 @@ ID_CAPITULO = -1; if (TIPO = 'Presupuesto') then begin for select pre.id, pre.id_presupuesto, pre.posicion, pre.tipo_detalle, - coalesce(pre.tipo_articulo,'NA'), pre.id_articulo, presupuestos_propiedades.descripcion, + coalesce(pre.tipo_articulo,'NA'), pre.id_articulo, pre.propiedad, /* F_RTFTOTEXT(F_RTFTOTEXT(pre.CONCEPTO)) as CONCEPTO,*/ pre.CONCEPTO, pre.cantidad, @@ -5638,7 +5647,7 @@ end else if (TIPO = 'Contrato') then begin for select pre.id, pre.id_contrato, pre.posicion, pre.tipo_detalle, - coalesce(pre.tipo_articulo,'NA'), pre.id_articulo, presupuestos_propiedades.descripcion, + coalesce(pre.tipo_articulo,'NA'), pre.id_articulo, pre.propiedad, /* F_RTFTOTEXT(F_RTFTOTEXT(pre.CONCEPTO)) as CONCEPTO,*/ pre.CONCEPTO, pre.cantidad, @@ -5649,7 +5658,6 @@ begin pre.descuento, pre.importe_porte, pre.importe_total, coalesce(pre.visible, 1) from contratos_cliente_detalles pre - left join presupuestos_propiedades on (pre.id_articulo = presupuestos_propiedades.id) where pre.id_contrato = :AID order by pre.id_contrato, pre.posicion into :ID, :ID_PRE_CON, :POSICION, :TIPO_DETALLE, diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index 426db58..e6af759 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -59,54 +59,54 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fConfigurarConexion
TForm diff --git a/Source/Base/uDMBase.dfm b/Source/Base/uDMBase.dfm index 0ac6ed8..ac09a6c 100644 --- a/Source/Base/uDMBase.dfm +++ b/Source/Base/uDMBase.dfm @@ -215,7 +215,7 @@ object dmBase: TdmBase PrinterPage.PageFooter.Font.Name = 'Tahoma' PrinterPage.PageFooter.Font.Style = [] PrinterPage.PageFooter.LeftTitle.Strings = ( - 'ACANA HOME S.L.') + 'ABETO DESIGN S.L.') PrinterPage.PageFooter.RightTitle.Strings = ( '[Page #] de [Total Pages]') PrinterPage.PageHeader.Font.Charset = DEFAULT_CHARSET diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj index cf7552b..f88b3aa 100644 --- a/Source/Cliente/FactuGES.dproj +++ b/Source/Cliente/FactuGES.dproj @@ -51,7 +51,7 @@ Delphi.Personality VCLApplication -FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse2530FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.5.3.0FactuGESFactuGES2.5.3.0 +FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse2540FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.5.4.0FactuGESFactuGES2.5.4.0 File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found FactuGES.dprFalse diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res index f6fb879..e84d86e 100644 Binary files a/Source/Cliente/FactuGES.res and b/Source/Cliente/FactuGES.res differ diff --git a/Source/FactuGES.inc b/Source/FactuGES.inc index 72603a0..bf43491 100644 --- a/Source/FactuGES.inc +++ b/Source/FactuGES.inc @@ -1,4 +1,4 @@ {$DEFINE MULTIEMPRESA} -{DEFINE ALMACEN} +{$DEFINE ALMACEN} {DEFINE PEDIDOSPROVEEDOR} {$DEFINE CONTABILIDAD} \ No newline at end of file diff --git a/Source/Modulos/Articulos/Articulos_Group.groupproj b/Source/Modulos/Articulos/Articulos_Group.groupproj index 3f402ca..71b0e15 100644 --- a/Source/Modulos/Articulos/Articulos_Group.groupproj +++ b/Source/Modulos/Articulos/Articulos_Group.groupproj @@ -9,6 +9,7 @@ + @@ -39,6 +40,15 @@ + + + + + + + + + @@ -112,13 +122,13 @@ - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Articulos/Data/uDataModuleArticulos.dfm b/Source/Modulos/Articulos/Data/uDataModuleArticulos.dfm index edf41a2..d819c11 100644 --- a/Source/Modulos/Articulos/Data/uDataModuleArticulos.dfm +++ b/Source/Modulos/Articulos/Data/uDataModuleArticulos.dfm @@ -14,12 +14,12 @@ inherited DataModuleArticulos: TDataModuleArticulos Top = 84 end object rda_Articulos: TDARemoteDataAdapter + DataStreamer = Bin2DataStreamer GetSchemaCall.RemoteService = RORemoteService GetDataCall.RemoteService = RORemoteService UpdateDataCall.RemoteService = RORemoteService GetScriptsCall.RemoteService = RORemoteService RemoteService = RORemoteService - DataStreamer = Bin2DataStreamer Left = 51 Top = 151 end @@ -119,6 +119,10 @@ inherited DataModuleArticulos: TDataModuleArticulos DataType = datCurrency DictionaryEntry = 'Articulos_PRECIO_NETO' end + item + Name = 'PRECIO_PVP' + DataType = datCurrency + end item Name = 'INVENTARIABLE' DataType = datSmallInt @@ -143,8 +147,6 @@ inherited DataModuleArticulos: TDataModuleArticulos Params = <> StreamingOptions = [soDisableEventsWhileStreaming] RemoteDataAdapter = rda_Articulos - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'Articulos' IndexDefs = <> Left = 232 @@ -251,8 +253,6 @@ inherited DataModuleArticulos: TDataModuleArticulos end> StreamingOptions = [soDisableEventsWhileStreaming] RemoteDataAdapter = rda_Articulos - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'ArticulosParaCliente' IndexDefs = <> Left = 400 diff --git a/Source/Modulos/Articulos/Model/schArticulosClient_Intf.pas b/Source/Modulos/Articulos/Model/schArticulosClient_Intf.pas index cce2efb..9c2586d 100644 --- a/Source/Modulos/Articulos/Model/schArticulosClient_Intf.pas +++ b/Source/Modulos/Articulos/Model/schArticulosClient_Intf.pas @@ -3,14 +3,14 @@ unit schArticulosClient_Intf; interface uses - Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf; + Classes, DB, schBase_Intf, SysUtils, uROClasses, uDAInterfaces, uDADataTable, FmtBCD, uROXMLIntf; 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 = '{9F6189A0-1B2F-4ED3-8DCC-540C38366485}'; - RID_ArticulosParaCliente = '{84BC0DB1-97F7-438D-B161-7564778ED6D8}'; + RID_Articulos = '{0AA3EA1D-D59E-442E-8D95-82EDDE05EBF7}'; + RID_ArticulosParaCliente = '{38FEB639-5DDC-4320-905C-17ABB03058E2}'; { Data table names } nme_Articulos = 'Articulos'; @@ -32,6 +32,7 @@ const fld_ArticulosPRECIO_PORTE = 'PRECIO_PORTE'; fld_ArticulosDESCUENTO = 'DESCUENTO'; fld_ArticulosPRECIO_NETO = 'PRECIO_NETO'; + fld_ArticulosPRECIO_PVP = 'PRECIO_PVP'; fld_ArticulosINVENTARIABLE = 'INVENTARIABLE'; fld_ArticulosID_PROVEEDOR = 'ID_PROVEEDOR'; fld_ArticulosNOMBRE_PROVEEDOR = 'NOMBRE_PROVEEDOR'; @@ -53,10 +54,11 @@ const idx_ArticulosPRECIO_PORTE = 12; idx_ArticulosDESCUENTO = 13; idx_ArticulosPRECIO_NETO = 14; - idx_ArticulosINVENTARIABLE = 15; - idx_ArticulosID_PROVEEDOR = 16; - idx_ArticulosNOMBRE_PROVEEDOR = 17; - idx_ArticulosELIMINADO = 18; + idx_ArticulosPRECIO_PVP = 15; + idx_ArticulosINVENTARIABLE = 16; + idx_ArticulosID_PROVEEDOR = 17; + idx_ArticulosNOMBRE_PROVEEDOR = 18; + idx_ArticulosELIMINADO = 19; { ArticulosParaCliente fields } fld_ArticulosParaClienteID = 'ID'; @@ -103,7 +105,7 @@ const type { IArticulos } IArticulos = interface(IDAStronglyTypedDataTable) - ['{55AA5752-BC15-4FD7-A39A-97867A837A69}'] + ['{66416E90-B0A0-4E1D-973E-BBA359030F83}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -164,6 +166,10 @@ type procedure SetPRECIO_NETOValue(const aValue: Currency); function GetPRECIO_NETOIsNull: Boolean; procedure SetPRECIO_NETOIsNull(const aValue: Boolean); + function GetPRECIO_PVPValue: Currency; + procedure SetPRECIO_PVPValue(const aValue: Currency); + function GetPRECIO_PVPIsNull: Boolean; + procedure SetPRECIO_PVPIsNull(const aValue: Boolean); function GetINVENTARIABLEValue: SmallInt; procedure SetINVENTARIABLEValue(const aValue: SmallInt); function GetINVENTARIABLEIsNull: Boolean; @@ -213,6 +219,8 @@ type property DESCUENTOIsNull: Boolean read GetDESCUENTOIsNull write SetDESCUENTOIsNull; property PRECIO_NETO: Currency read GetPRECIO_NETOValue write SetPRECIO_NETOValue; property PRECIO_NETOIsNull: Boolean read GetPRECIO_NETOIsNull write SetPRECIO_NETOIsNull; + property PRECIO_PVP: Currency read GetPRECIO_PVPValue write SetPRECIO_PVPValue; + property PRECIO_PVPIsNull: Boolean read GetPRECIO_PVPIsNull write SetPRECIO_PVPIsNull; property INVENTARIABLE: SmallInt read GetINVENTARIABLEValue write SetINVENTARIABLEValue; property INVENTARIABLEIsNull: Boolean read GetINVENTARIABLEIsNull write SetINVENTARIABLEIsNull; property ID_PROVEEDOR: Integer read GetID_PROVEEDORValue write SetID_PROVEEDORValue; @@ -289,6 +297,10 @@ type procedure SetPRECIO_NETOValue(const aValue: Currency); virtual; function GetPRECIO_NETOIsNull: Boolean; virtual; procedure SetPRECIO_NETOIsNull(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 GetINVENTARIABLEValue: SmallInt; virtual; procedure SetINVENTARIABLEValue(const aValue: SmallInt); virtual; function GetINVENTARIABLEIsNull: Boolean; virtual; @@ -337,6 +349,8 @@ type property DESCUENTOIsNull: Boolean read GetDESCUENTOIsNull write SetDESCUENTOIsNull; property PRECIO_NETO: Currency read GetPRECIO_NETOValue write SetPRECIO_NETOValue; property PRECIO_NETOIsNull: Boolean read GetPRECIO_NETOIsNull write SetPRECIO_NETOIsNull; + property PRECIO_PVP: Currency read GetPRECIO_PVPValue write SetPRECIO_PVPValue; + property PRECIO_PVPIsNull: Boolean read GetPRECIO_PVPIsNull write SetPRECIO_PVPIsNull; property INVENTARIABLE: SmallInt read GetINVENTARIABLEValue write SetINVENTARIABLEValue; property INVENTARIABLEIsNull: Boolean read GetINVENTARIABLEIsNull write SetINVENTARIABLEIsNull; property ID_PROVEEDOR: Integer read GetID_PROVEEDORValue write SetID_PROVEEDORValue; @@ -354,7 +368,7 @@ type { IArticulosParaCliente } IArticulosParaCliente = interface(IDAStronglyTypedDataTable) - ['{F46994FF-67BE-4892-BE35-890D5A779CB9}'] + ['{7D8A2E3A-AAD7-49B5-825E-E0D3581DEF75}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -944,6 +958,27 @@ begin DataTable.Fields[idx_ArticulosPRECIO_NETO].AsVariant := Null; end; +function TArticulosDataTableRules.GetPRECIO_PVPValue: Currency; +begin + result := DataTable.Fields[idx_ArticulosPRECIO_PVP].AsCurrency; +end; + +procedure TArticulosDataTableRules.SetPRECIO_PVPValue(const aValue: Currency); +begin + DataTable.Fields[idx_ArticulosPRECIO_PVP].AsCurrency := aValue; +end; + +function TArticulosDataTableRules.GetPRECIO_PVPIsNull: boolean; +begin + result := DataTable.Fields[idx_ArticulosPRECIO_PVP].IsNull; +end; + +procedure TArticulosDataTableRules.SetPRECIO_PVPIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_ArticulosPRECIO_PVP].AsVariant := Null; +end; + function TArticulosDataTableRules.GetINVENTARIABLEValue: SmallInt; begin result := DataTable.Fields[idx_ArticulosINVENTARIABLE].AsSmallInt; diff --git a/Source/Modulos/Articulos/Model/schArticulosServer_Intf.pas b/Source/Modulos/Articulos/Model/schArticulosServer_Intf.pas index 34c79f0..892a377 100644 --- a/Source/Modulos/Articulos/Model/schArticulosServer_Intf.pas +++ b/Source/Modulos/Articulos/Model/schArticulosServer_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_ArticulosDelta = '{82298E75-82C9-4852-A33B-491F6C1C22B6}'; - RID_ArticulosParaClienteDelta = '{CD4567F1-5B6C-4215-BED9-48EC27CE653D}'; + RID_ArticulosDelta = '{64BC3AAC-E5A1-49C9-A8B9-55D5C2D0A921}'; + RID_ArticulosParaClienteDelta = '{3F0D35B7-21B1-4130-B5EC-C43075204160}'; type { IArticulosDelta } IArticulosDelta = interface(IArticulos) - ['{82298E75-82C9-4852-A33B-491F6C1C22B6}'] + ['{64BC3AAC-E5A1-49C9-A8B9-55D5C2D0A921}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -32,6 +32,7 @@ type function GetOldPRECIO_PORTEValue : Currency; function GetOldDESCUENTOValue : Float; function GetOldPRECIO_NETOValue : Currency; + function GetOldPRECIO_PVPValue : Currency; function GetOldINVENTARIABLEValue : SmallInt; function GetOldID_PROVEEDORValue : Integer; function GetOldNOMBRE_PROVEEDORValue : String; @@ -53,6 +54,7 @@ type property OldPRECIO_PORTE : Currency read GetOldPRECIO_PORTEValue; property OldDESCUENTO : Float read GetOldDESCUENTOValue; property OldPRECIO_NETO : Currency read GetOldPRECIO_NETOValue; + property OldPRECIO_PVP : Currency read GetOldPRECIO_PVPValue; property OldINVENTARIABLE : SmallInt read GetOldINVENTARIABLEValue; property OldID_PROVEEDOR : Integer read GetOldID_PROVEEDORValue; property OldNOMBRE_PROVEEDOR : String read GetOldNOMBRE_PROVEEDORValue; @@ -155,6 +157,12 @@ type function GetOldPRECIO_NETOIsNull: Boolean; virtual; procedure SetPRECIO_NETOValue(const aValue: Currency); virtual; procedure SetPRECIO_NETOIsNull(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 GetINVENTARIABLEValue: SmallInt; virtual; function GetINVENTARIABLEIsNull: Boolean; virtual; function GetOldINVENTARIABLEValue: SmallInt; virtual; @@ -241,6 +249,10 @@ type property PRECIO_NETOIsNull : Boolean read GetPRECIO_NETOIsNull write SetPRECIO_NETOIsNull; property OldPRECIO_NETO : Currency read GetOldPRECIO_NETOValue; property OldPRECIO_NETOIsNull : Boolean read GetOldPRECIO_NETOIsNull; + 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 INVENTARIABLE : SmallInt read GetINVENTARIABLEValue write SetINVENTARIABLEValue; property INVENTARIABLEIsNull : Boolean read GetINVENTARIABLEIsNull write SetINVENTARIABLEIsNull; property OldINVENTARIABLE : SmallInt read GetOldINVENTARIABLEValue; @@ -266,7 +278,7 @@ type { IArticulosParaClienteDelta } IArticulosParaClienteDelta = interface(IArticulosParaCliente) - ['{CD4567F1-5B6C-4215-BED9-48EC27CE653D}'] + ['{3F0D35B7-21B1-4130-B5EC-C43075204160}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -539,7 +551,7 @@ end; procedure TArticulosBusinessProcessorRules.IMAGEN_OnChange(Sender: TObject); begin - BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosIMAGEN] := VariantBinaryFromBinary((TROStream(Sender) as IROStream).Stream); + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosIMAGEN] := BinaryToBlobVariant((TROStream(Sender) as IROStream).Stream); end; function TArticulosBusinessProcessorRules.GetIDValue: Integer; @@ -702,7 +714,7 @@ begin result := f_IMAGEN; result.Position := 0; if not Result.InUpdateMode then begin - WriteVariantBinaryToBinary(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosIMAGEN], result.Stream); + BlobVariantToBinary(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosIMAGEN], result.Stream); result.Position := 0; end; end; @@ -715,7 +727,7 @@ end; function TArticulosBusinessProcessorRules.GetOldIMAGENValue: IROStream; begin result := NewROStream(); - WriteVariantBinaryToBinary(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosIMAGEN], result.Stream); + BlobVariantToBinary(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosIMAGEN], result.Stream); end; function TArticulosBusinessProcessorRules.GetOldIMAGENIsNull: Boolean; @@ -1008,6 +1020,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_NETO] := Null; end; +function TArticulosBusinessProcessorRules.GetPRECIO_PVPValue: Currency; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP]; +end; + +function TArticulosBusinessProcessorRules.GetPRECIO_PVPIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP]); +end; + +function TArticulosBusinessProcessorRules.GetOldPRECIO_PVPValue: Currency; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosPRECIO_PVP]; +end; + +function TArticulosBusinessProcessorRules.GetOldPRECIO_PVPIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosPRECIO_PVP]); +end; + +procedure TArticulosBusinessProcessorRules.SetPRECIO_PVPValue(const aValue: Currency); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP] := aValue; +end; + +procedure TArticulosBusinessProcessorRules.SetPRECIO_PVPIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosPRECIO_PVP] := Null; +end; + function TArticulosBusinessProcessorRules.GetINVENTARIABLEValue: SmallInt; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosINVENTARIABLE]; @@ -1152,7 +1195,7 @@ end; procedure TArticulosParaClienteBusinessProcessorRules.IMAGEN_OnChange(Sender: TObject); begin - BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClienteIMAGEN] := VariantBinaryFromBinary((TROStream(Sender) as IROStream).Stream); + BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClienteIMAGEN] := BinaryToBlobVariant((TROStream(Sender) as IROStream).Stream); end; function TArticulosParaClienteBusinessProcessorRules.GetIDValue: Integer; @@ -1315,7 +1358,7 @@ begin result := f_IMAGEN; result.Position := 0; if not Result.InUpdateMode then begin - WriteVariantBinaryToBinary(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClienteIMAGEN], result.Stream); + BlobVariantToBinary(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaClienteIMAGEN], result.Stream); result.Position := 0; end; end; @@ -1328,7 +1371,7 @@ end; function TArticulosParaClienteBusinessProcessorRules.GetOldIMAGENValue: IROStream; begin result := NewROStream(); - WriteVariantBinaryToBinary(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosParaClienteIMAGEN], result.Stream); + BlobVariantToBinary(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosParaClienteIMAGEN], result.Stream); end; function TArticulosParaClienteBusinessProcessorRules.GetOldIMAGENIsNull: Boolean; diff --git a/Source/Modulos/Articulos/Plugin/uPluginArticulos.dfm b/Source/Modulos/Articulos/Plugin/uPluginArticulos.dfm index 4144b60..3118cf1 100644 --- a/Source/Modulos/Articulos/Plugin/uPluginArticulos.dfm +++ b/Source/Modulos/Articulos/Plugin/uPluginArticulos.dfm @@ -53,9 +53,9 @@ object PluginArticulos: TPluginArticulos Left = 40 Top = 16 object N1: TMenuItem - Caption = 'Log'#237'stica' + Caption = 'Datos' object Articulos1: TMenuItem - Tag = 101 + Tag = 1000 Action = actArticulos end end diff --git a/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.dfm b/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.dfm index 1ddce25..f3e8093 100644 --- a/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.dfm +++ b/Source/Modulos/Articulos/Servidor/srvArticulos_Impl.dfm @@ -203,6 +203,10 @@ object srvArticulos: TsrvArticulos item DatasetField = 'ELIMINADO' TableField = 'ELIMINADO' + end + item + DatasetField = 'PRECIO_PVP' + TableField = 'PRECIO_PVP' end> end> Name = 'Articulos' @@ -290,6 +294,10 @@ object srvArticulos: TsrvArticulos DataType = datCurrency DictionaryEntry = 'Articulos_PRECIO_NETO' end + item + Name = 'PRECIO_PVP' + DataType = datCurrency + end item Name = 'INVENTARIABLE' DataType = datSmallInt @@ -515,70 +523,97 @@ object srvArticulos: TsrvArticulos end item Name = 'ID_EMPRESA' + DataType = datInteger Value = '' end item Name = 'REFERENCIA' + DataType = datString + Size = 255 Value = '' end item Name = 'DESCRIPCION' + DataType = datString + Size = 255 Value = '' end item Name = 'FAMILIA' + DataType = datString + Size = 255 Value = '' end item Name = 'IMAGEN' + DataType = datBlob Value = '' end item Name = 'COMISIONABLE' + DataType = datSmallInt Value = '' end item Name = 'FECHA_ALTA' + DataType = datDateTime Value = '' end item Name = 'FECHA_MODIFICACION' + DataType = datDateTime Value = '' end item Name = 'USUARIO' + DataType = datString + Size = 30 Value = '' end item Name = 'PRECIO_COSTE' + DataType = datCurrency Value = '' end item Name = 'PRECIO_PORTE' + DataType = datCurrency Value = '' end item Name = 'DESCUENTO' + DataType = datFloat Value = '' end item Name = 'ID_PROVEEDOR' + DataType = datInteger Value = '' end item Name = 'PRECIO_NETO' + DataType = datCurrency + Value = '' + end + item + Name = 'PRECIO_PVP' + DataType = datCurrency Value = '' end item Name = 'REFERENCIA_PROV' + DataType = datString + Size = 255 Value = '' end item Name = 'INVENTARIABLE' + DataType = datSmallInt Value = '' end item Name = 'ELIMINADO' + DataType = datSmallInt Value = '' end> Statements = < @@ -587,14 +622,14 @@ object srvArticulos: TsrvArticulos TargetTable = 'ARTICULOS' SQL = 'INSERT'#10' INTO ARTICULOS'#10' (ID, ID_EMPRESA, REFERENCIA, DESCRIP' + - 'CION, FAMILIA, IMAGEN, '#10' COMISIONABLE, FECHA_ALTA, FECHA_MOD' + - 'IFICACION, USUARIO, '#10' PRECIO_COSTE, PRECIO_PORTE, DESCUENTO,' + - ' ID_PROVEEDOR, '#10' PRECIO_NETO, REFERENCIA_PROV, INVENTARIABLE' + - ', ELIMINADO)'#10' VALUES'#10' (:ID, :ID_EMPRESA, :REFERENCIA, :DESCR' + - 'IPCION, :FAMILIA, '#10' :IMAGEN, :COMISIONABLE, :FECHA_ALTA, :FE' + - 'CHA_MODIFICACION, '#10' :USUARIO, :PRECIO_COSTE, :PRECIO_PORTE, ' + - ':DESCUENTO, '#10' :ID_PROVEEDOR, :PRECIO_NETO, :REFERENCIA_PROV,' + - #10' :INVENTARIABLE, :ELIMINADO)' + 'CION, FAMILIA, IMAGEN,'#10' COMISIONABLE, FECHA_ALTA, FECHA_MODI' + + 'FICACION, USUARIO,'#10' PRECIO_COSTE, PRECIO_PORTE, DESCUENTO, I' + + 'D_PROVEEDOR,'#10' PRECIO_NETO, PRECIO_PVP, REFERENCIA_PROV, INVE' + + 'NTARIABLE, ELIMINADO)'#10' VALUES'#10' (:ID, :ID_EMPRESA, :REFERENCI' + + 'A, :DESCRIPCION, :FAMILIA,'#10' :IMAGEN, :COMISIONABLE, :FECHA_A' + + 'LTA, :FECHA_MODIFICACION,'#10' :USUARIO, :PRECIO_COSTE, :PRECIO_' + + 'PORTE, :DESCUENTO,'#10' :ID_PROVEEDOR, :PRECIO_NETO, :PRECIO_PVP' + + ', :REFERENCIA_PROV,'#10' :INVENTARIABLE, :ELIMINADO)'#10 StatementType = stSQL ColumnMappings = <> end> @@ -622,70 +657,97 @@ object srvArticulos: TsrvArticulos Params = < item Name = 'ID_EMPRESA' + DataType = datInteger Value = '' end item Name = 'REFERENCIA' + DataType = datString + Size = 255 Value = '' end item Name = 'DESCRIPCION' + DataType = datString + Size = 255 Value = '' end item Name = 'FAMILIA' + DataType = datString + Size = 255 Value = '' end item Name = 'IMAGEN' + DataType = datBlob Value = '' end item Name = 'COMISIONABLE' + DataType = datSmallInt Value = '' end item Name = 'FECHA_ALTA' + DataType = datDateTime Value = '' end item Name = 'FECHA_MODIFICACION' + DataType = datDateTime Value = '' end item Name = 'USUARIO' + DataType = datString + Size = 30 Value = '' end item Name = 'PRECIO_COSTE' + DataType = datCurrency Value = '' end item Name = 'PRECIO_PORTE' + DataType = datCurrency Value = '' end item Name = 'DESCUENTO' + DataType = datFloat Value = '' end item Name = 'ID_PROVEEDOR' + DataType = datInteger Value = '' end item Name = 'PRECIO_NETO' + DataType = datCurrency + Value = '' + end + item + Name = 'PRECIO_PVP' + DataType = datCurrency Value = '' end item Name = 'INVENTARIABLE' + DataType = datSmallInt Value = '' end item Name = 'REFERENCIA_PROV' + DataType = datString + Size = 255 Value = '' end item Name = 'ELIMINADO' + DataType = datSmallInt Value = '' end item @@ -704,9 +766,9 @@ object srvArticulos: TsrvArticulos ' :FECHA_MODIFICACION, '#10' USUARIO = :USUARIO, '#10' PRECIO_COSTE' + ' = :PRECIO_COSTE, '#10' PRECIO_PORTE = :PRECIO_PORTE, '#10' DESCUE' + 'NTO = :DESCUENTO, '#10' ID_PROVEEDOR = :ID_PROVEEDOR, '#10' PRECIO' + - '_NETO = :PRECIO_NETO,'#10' INVENTARIABLE = :INVENTARIABLE,'#10' RE' + - 'FERENCIA_PROV = :REFERENCIA_PROV,'#10' ELIMINADO = :ELIMINADO'#10' W' + - 'HERE'#10' (ID = :OLD_ID)'#10 + '_NETO = :PRECIO_NETO,'#10' PRECIO_PVP = :PRECIO_PVP,'#10' INVENTAR' + + 'IABLE = :INVENTARIABLE,'#10' REFERENCIA_PROV = :REFERENCIA_PROV,'#10 + + ' ELIMINADO = :ELIMINADO'#10' WHERE'#10' (ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> diff --git a/Source/Modulos/Articulos/Views/uViewArticulo.dfm b/Source/Modulos/Articulos/Views/uViewArticulo.dfm index da1eae4..c6da09f 100644 --- a/Source/Modulos/Articulos/Views/uViewArticulo.dfm +++ b/Source/Modulos/Articulos/Views/uViewArticulo.dfm @@ -1,6 +1,6 @@ inherited frViewArticulo: TfrViewArticulo - Width = 451 - Height = 304 + Width = 881 + Height = 527 Align = alClient OnCreate = CustomViewCreate OnDestroy = CustomViewDestroy @@ -10,18 +10,19 @@ inherited frViewArticulo: TfrViewArticulo object dxLayoutControlArticulo: TdxLayoutControl Left = 0 Top = 0 - Width = 451 + Width = 881 Height = 393 Align = alTop ParentBackground = True TabOrder = 0 TabStop = False AutoContentSizes = [acsWidth] + ExplicitWidth = 451 DesignSize = ( - 451 + 881 393) object PngSpeedButton2: TPngSpeedButton - Left = 546 + Left = 836 Top = 28 Width = 23 Height = 22 @@ -48,7 +49,7 @@ inherited frViewArticulo: TfrViewArticulo PngOptions = [pngBlendOnDisabled, pngGrayscaleOnDisabled] end object PngSpeedButton1: TPngSpeedButton - Left = 546 + Left = 836 Top = 56 Width = 23 Height = 22 @@ -102,6 +103,7 @@ inherited frViewArticulo: TfrViewArticulo Caption = 'Art'#237'culo no comisionable' DataBinding.DataField = 'COMISIONABLE' DataBinding.DataSource = dsViewArticulo + Enabled = False Properties.ImmediatePost = True Properties.NullStyle = nssUnchecked Properties.ValueChecked = 0 @@ -121,7 +123,7 @@ inherited frViewArticulo: TfrViewArticulo Width = 144 end object eImagen: TcxImage - Left = 409 + Left = 604 Top = 28 Properties.GraphicClassName = 'TJPEGImage' Properties.ImmediatePost = True @@ -167,19 +169,20 @@ inherited frViewArticulo: TfrViewArticulo Width = 70 end inline frViewDatosYSeleccionProveedor1: TfrViewDatosYSeleccionProveedor - Left = 219 + Left = 509 Top = 166 Width = 350 Height = 202 + Enabled = False Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] ParentFont = False - TabOrder = 11 + TabOrder = 12 ReadOnly = False - ExplicitLeft = 219 + ExplicitLeft = 509 ExplicitTop = 166 inherited dxLayoutControl1: TdxLayoutControl inherited edtNIFCIF: TcxDBTextEdit @@ -206,6 +209,7 @@ inherited frViewArticulo: TfrViewArticulo Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'REFERENCIA_PROV' DataBinding.DataSource = dsViewArticulo + Enabled = False Style.BorderColor = clWindowFrame Style.BorderStyle = ebs3D Style.Color = 14745599 @@ -242,6 +246,7 @@ inherited frViewArticulo: TfrViewArticulo Top = 220 DataBinding.DataField = 'DESCUENTO' DataBinding.DataSource = dsViewArticulo + Enabled = False Properties.Alignment.Horz = taRightJustify Properties.ImmediatePost = True Properties.MaxValue = 100.000000000000000000 @@ -290,6 +295,7 @@ inherited frViewArticulo: TfrViewArticulo Top = 274 DataBinding.DataField = 'PRECIO_PORTE' DataBinding.DataSource = dsViewArticulo + Enabled = False Properties.Alignment.Horz = taRightJustify Style.BorderColor = clWindowFrame Style.BorderStyle = ebs3D @@ -306,11 +312,12 @@ inherited frViewArticulo: TfrViewArticulo Width = 86 end object cbNoInventariable: TcxDBCheckBox - Left = 242 + Left = 361 Top = 109 Caption = 'Art'#237'culo no inventariable' DataBinding.DataField = 'INVENTARIABLE' DataBinding.DataSource = dsViewArticulo + Enabled = False Properties.ImmediatePost = True Properties.NullStyle = nssUnchecked Properties.ValueChecked = 0 @@ -329,6 +336,26 @@ inherited frViewArticulo: TfrViewArticulo TabOrder = 4 Width = 144 end + object ePrecioPVP: TcxDBCurrencyEdit + Left = 103 + Top = 301 + DataBinding.DataField = 'PRECIO_PVP' + 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 = 11 + Width = 288 + end object dxLayoutControlArticuloGroup_Root: TdxLayoutGroup ShowCaption = False Hidden = True @@ -373,7 +400,9 @@ inherited frViewArticulo: TfrViewArticulo ControlOptions.ShowBorder = False end object dxLayoutControlArticuloGroup8: TdxLayoutGroup + Enabled = False ShowCaption = False + Visible = False Hidden = True LayoutDirection = ldHorizontal ShowBorder = False @@ -440,34 +469,49 @@ inherited frViewArticulo: TfrViewArticulo Caption = 'Datos del proveedor para el art'#237'culo' object dxLayoutControlArticuloItem15: TdxLayoutItem Caption = 'Ref. del prov:' + Enabled = False + Visible = False Control = eReferenciaProv ControlOptions.ShowBorder = False end object dxLayoutControlArticuloItem16: TdxLayoutItem - Caption = 'Precio:' + Caption = 'Precio coste:' Control = ePrecioCoste ControlOptions.ShowBorder = False end object dxLayoutControlArticuloItem17: TdxLayoutItem Caption = 'Dto (%):' + Enabled = False + Visible = False Control = eDescuento ControlOptions.ShowBorder = False end object dxLayoutControlArticuloItem18: TdxLayoutItem Caption = 'Precio neto:' + Enabled = False + Visible = False Control = ePrecioNeto ControlOptions.ShowBorder = False end object dxLayoutControlArticuloItem19: TdxLayoutItem Caption = 'Coste de envio:' + Enabled = False + Visible = False Control = ePrecioPorte ControlOptions.ShowBorder = False end + object dxLayoutControlArticuloItem9: TdxLayoutItem + Caption = 'Precio PVP:' + Control = ePrecioPVP + ControlOptions.ShowBorder = False + end end object dxLayoutControlArticuloGroup12: TdxLayoutGroup AutoAligns = [aaVertical] AlignHorz = ahRight Caption = 'Proveedor para el art'#237'culo' + Enabled = False + Visible = False object dxLayoutControlArticuloItem14: TdxLayoutItem Control = frViewDatosYSeleccionProveedor1 ControlOptions.AutoColor = True diff --git a/Source/Modulos/Articulos/Views/uViewArticulo.pas b/Source/Modulos/Articulos/Views/uViewArticulo.pas index 772381f..18e2879 100644 --- a/Source/Modulos/Articulos/Views/uViewArticulo.pas +++ b/Source/Modulos/Articulos/Views/uViewArticulo.pas @@ -71,6 +71,8 @@ type dxLayoutControlArticuloItem7: TdxLayoutItem; cbNoInventariable: TcxDBCheckBox; dxLayoutControlArticuloGroup8: TdxLayoutGroup; + dxLayoutControlArticuloItem9: TdxLayoutItem; + ePrecioPVP: 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 00c9780..da18338 100644 --- a/Source/Modulos/Articulos/Views/uViewArticulos.dfm +++ b/Source/Modulos/Articulos/Views/uViewArticulos.dfm @@ -31,9 +31,11 @@ inherited frViewArticulos: TfrViewArticulos Tag = 1 Value = 1 end> + Visible = False BestFitMaxWidth = 22 MinWidth = 22 Options.HorzSizing = False + VisibleForCustomization = False Width = 22 end object cxGridViewCOMISIONABLE: TcxGridDBColumn @@ -63,9 +65,11 @@ inherited frViewArticulos: TfrViewArticulos end> Properties.PostPopupValueOnTab = True Properties.ShowDescriptions = False + Visible = False BestFitMaxWidth = 22 MinWidth = 22 Options.HorzSizing = False + VisibleForCustomization = False Width = 22 end object cxGridViewREFERENCIA: TcxGridDBColumn @@ -74,28 +78,32 @@ inherited frViewArticulos: TfrViewArticulos BestFitMaxWidth = 60 Width = 60 end + object cxGridViewFAMILIA: TcxGridDBColumn + Caption = 'Familia' + DataBinding.FieldName = 'FAMILIA' + BestFitMaxWidth = 60 + Width = 60 + end object cxGridViewDESCRIPCION: TcxGridDBColumn Caption = 'Descripci'#243'n' DataBinding.FieldName = 'DESCRIPCION' BestFitMaxWidth = 120 Width = 120 end - object cxGridViewFAMILIA: TcxGridDBColumn - Caption = 'Familia' - DataBinding.FieldName = 'FAMILIA' - BestFitMaxWidth = 60 - Width = 60 - end object cxGridViewNOMBRE_PROVEEDOR: TcxGridDBColumn Caption = 'Proveedor' DataBinding.FieldName = 'NOMBRE_PROVEEDOR' + Visible = False BestFitMaxWidth = 120 + VisibleForCustomization = False Width = 120 end object cxGridViewREFERENCIA_PROV: TcxGridDBColumn Caption = 'Ref. proveedor' DataBinding.FieldName = 'REFERENCIA_PROV' + Visible = False BestFitMaxWidth = 60 + VisibleForCustomization = False Width = 60 end object cxGridViewPRECIO_COSTE: TcxGridDBColumn @@ -112,24 +120,37 @@ inherited frViewArticulos: TfrViewArticulos PropertiesClassName = 'TcxSpinEditProperties' Properties.Alignment.Horz = taRightJustify Properties.DisplayFormat = ',0.00 %;-,0.00 %' + Visible = False FooterAlignmentHorz = taRightJustify HeaderAlignmentHorz = taRightJustify + VisibleForCustomization = False end object cxGridViewPRECIO_NETO: TcxGridDBColumn Caption = 'Precio neto' DataBinding.FieldName = 'PRECIO_NETO' PropertiesClassName = 'TcxCurrencyEditProperties' Properties.Alignment.Horz = taRightJustify + Visible = False FooterAlignmentHorz = taRightJustify HeaderAlignmentHorz = taRightJustify + VisibleForCustomization = False end object cxGridViewPRECIO_PORTE: TcxGridDBColumn Caption = 'Precio porte' DataBinding.FieldName = 'PRECIO_PORTE' PropertiesClassName = 'TcxCurrencyEditProperties' Properties.Alignment.Horz = taRightJustify + Visible = False FooterAlignmentHorz = taRightJustify HeaderAlignmentHorz = taRightJustify + VisibleForCustomization = False + end + object cxGridViewPRECIO_PVP: TcxGridDBColumn + Caption = 'Precio PVP' + DataBinding.FieldName = 'PRECIO_PVP' + PropertiesClassName = 'TcxCurrencyEditProperties' + Properties.Alignment.Horz = taRightJustify + HeaderAlignmentHorz = taRightJustify end end end @@ -159,7 +180,7 @@ inherited frViewArticulos: TfrViewArticulos end inherited pnlAgrupaciones: TTBXDockablePanel Visible = True - ExplicitWidth = 128 + ExplicitWidth = 554 inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXToolbar1: TTBXToolbar object TBXSeparatorItem1: TTBXSeparatorItem diff --git a/Source/Modulos/Articulos/Views/uViewArticulos.pas b/Source/Modulos/Articulos/Views/uViewArticulos.pas index e24f2e6..3821617 100644 --- a/Source/Modulos/Articulos/Views/uViewArticulos.pas +++ b/Source/Modulos/Articulos/Views/uViewArticulos.pas @@ -37,6 +37,7 @@ type TBXSeparatorItem1: TTBXSeparatorItem; TBXSeparatorItem2: TTBXSeparatorItem; cxGridViewINVENTARIABLE: TcxGridDBColumn; + cxGridViewPRECIO_PVP: TcxGridDBColumn; procedure cxGridViewIDCustomDrawCell( Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); diff --git a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas index bb2568f..dc896d2 100644 --- a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas +++ b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas @@ -751,6 +751,9 @@ begin AContrato.PLAZO_ENTREGA.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_COCINA)); AContrato.OBSERVACIONES.Add(AppFactuGES.Configuracion.GetSettingAsString(teBD, CTE_OBSERVACIONES_COCINA)); (Self.DetallesController as IDetallesContratoClienteController).AnadirCapitulo(TIPO_CAPITULO_C, 'MUEBLES DE COCINA ', False, AContrato.Detalles); + (Self.DetallesController as IDetallesContratoClienteController).AnadirCapitulo(TIPO_CAPITULO_V, 'ENCIMERA ', True, AContrato.Detalles); + (Self.DetallesController as IDetallesContratoClienteController).AnadirCapitulo(TIPO_CAPITULO_V, 'ELECTRODOMÉSTICOS ', True, AContrato.Detalles); + (Self.DetallesController as IDetallesContratoClienteController).AnadirCapitulo(TIPO_CAPITULO_V, 'COMPLEMENTOS ', True, AContrato.Detalles); (Self.DetallesController as IDetallesContratoClienteController).AnadirCapitulo(TIPO_CAPITULO_V, 'IMPORTES ', True, AContrato.Detalles); (Self.DetallesController as IDetallesContratoClienteController).AnadirCapitulo(TIPO_CAPITULO_V, 'AUMENTO POR ', False, AContrato.Detalles); end; diff --git a/Source/Modulos/Contratos de cliente/Controller/uDetallesContratoClienteController.pas b/Source/Modulos/Contratos de cliente/Controller/uDetallesContratoClienteController.pas index 3f8990e..85cee5b 100644 --- a/Source/Modulos/Contratos de cliente/Controller/uDetallesContratoClienteController.pas +++ b/Source/Modulos/Contratos de cliente/Controller/uDetallesContratoClienteController.pas @@ -152,6 +152,7 @@ end; procedure TDetallesContratoClienteController.RellenarOtros(ADetalles: IDAStronglyTypedDataTable; AArticulos: IBizArticulo); begin + ADetalles.DataTable.FieldByName('PROPIEDAD').AsString := AArticulos.FAMILIA; //En Tecsitel no se tiene en cuenta el descuento de cliente para el precio PVP // if Assigned(AArticulos) then // ADetalles.DataTable.FieldByName(CAMPO_DESCUENTO).AsFloat := AArticulos.DESCUENTO diff --git a/Source/Modulos/Contratos de cliente/Data/ContratosCliente_data.dproj b/Source/Modulos/Contratos de cliente/Data/ContratosCliente_data.dproj index 160b927..add048f 100644 --- a/Source/Modulos/Contratos de cliente/Data/ContratosCliente_data.dproj +++ b/Source/Modulos/Contratos de cliente/Data/ContratosCliente_data.dproj @@ -49,18 +49,18 @@ MainSource - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm index 1ad5335..db48107 100644 --- a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.dfm @@ -357,6 +357,11 @@ inherited DataModuleContratosCliente: TDataModuleContratosCliente DataType = datString Size = 10 end + item + Name = 'PROPIEDAD' + DataType = datString + Size = 255 + end item Name = 'CONCEPTO' DataType = datString @@ -398,7 +403,7 @@ inherited DataModuleContratosCliente: TDataModuleContratosCliente item Name = 'REFERENCIA' DataType = datString - Size = 50 + Size = 255 end item Name = 'REFERENCIA_PROVEEDOR' @@ -451,74 +456,6 @@ inherited DataModuleContratosCliente: TDataModuleContratosCliente Left = 248 Top = 144 end - object tbl_Propiedades: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datInteger - Required = True - InPrimaryKey = True - end - item - Name = 'DESCRIPCION' - DataType = datString - Size = 50 - end - item - Name = 'ID_PROPIEDAD_VALORES' - DataType = datInteger - end> - Params = <> - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteDataAdapter = rda_ContratosCliente - LogicalName = 'Propiedades' - IndexDefs = <> - Left = 464 - Top = 200 - end - object ds_Propiedades: TDADataSource - DataSet = tbl_Propiedades.Dataset - DataTable = tbl_Propiedades - Left = 464 - Top = 152 - end - object tbl_Valores: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datInteger - Required = True - InPrimaryKey = True - end - item - Name = 'ID_PROPIEDAD' - DataType = datInteger - end - item - Name = 'DESCRIPCION' - DataType = datString - Size = 2000 - end> - Params = <> - MasterMappingMode = mmWhere - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteDataAdapter = rda_ContratosCliente - MasterSource = ds_Propiedades - MasterFields = 'ID_PROPIEDAD_VALORES' - DetailFields = 'ID_PROPIEDAD' - LogicalName = 'Valores' - IndexDefs = <> - Left = 544 - Top = 200 - end - object ds_Valores: TDADataSource - DataSet = tbl_Valores.Dataset - DataTable = tbl_Valores - Left = 544 - Top = 152 - end object tbl_TiposCapitulos: TDAMemDataTable RemoteUpdatesOptions = [] Fields = < diff --git a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas index 83fee85..139ee29 100644 --- a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas @@ -25,10 +25,6 @@ type RORemoteService1: TRORemoteService; tbl_ListaAnosContratos: TDAMemDataTable; ds_ListaAnosContratos: TDADataSource; - tbl_Propiedades: TDAMemDataTable; - ds_Propiedades: TDADataSource; - tbl_Valores: TDAMemDataTable; - ds_Valores: TDADataSource; tbl_TiposCapitulos: TDAMemDataTable; ds_TiposCapitulos: TDADataSource; tbl_ContratosClienteBeneficios: TDAMemDataTable; diff --git a/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas b/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas index e212da2..8b8c938 100644 --- a/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas +++ b/Source/Modulos/Contratos de cliente/Model/schContratosClienteClient_Intf.pas @@ -9,13 +9,13 @@ 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_Valores = '{FA28DA02-8C68-4321-8EBF-B87F6681AAFB}'; - RID_Propiedades = '{70A934F6-65E3-46CB-925B-42CF5B2149DA}'; - RID_ListaAnosContratos = '{B946A2C7-5BA5-4907-BBC1-5BF68ADE7D7A}'; - RID_ContratosClienteBeneficios = '{8D457DDB-766A-4BE9-8528-C6CD14B363FF}'; - RID_ContratosCliente = '{9D72F545-BC54-46D8-B947-7942681F5F72}'; - RID_TiposCapitulos = '{A6ED3952-D8BE-4945-B0E6-0445ECB32C46}'; - RID_ContratosCliente_Detalles = '{3ACB6A32-FAD2-45C9-86FF-D681CB3E4D7B}'; + RID_Valores = '{1DBD72A0-582B-4F32-8455-A45B6191054E}'; + RID_Propiedades = '{8AAD78E4-F1A6-4878-B140-73DDC81C2BE0}'; + RID_ListaAnosContratos = '{FB083C00-73FE-4B12-A941-B572555FF37E}'; + RID_ContratosClienteBeneficios = '{E24213CE-E549-4596-96B0-7E30EA157262}'; + RID_ContratosCliente = '{ECF02D70-7B0A-412D-93F8-E3E58A79B5D3}'; + RID_TiposCapitulos = '{71A4C5A8-136B-419C-8766-73E324C003E6}'; + RID_ContratosCliente_Detalles = '{60F97EEA-78E8-47C1-BB87-6962689FBE44}'; { Data table names } nme_Valores = 'Valores'; @@ -199,6 +199,7 @@ const fld_ContratosCliente_DetallesID_CONTRATO = 'ID_CONTRATO'; fld_ContratosCliente_DetallesPOSICION = 'POSICION'; fld_ContratosCliente_DetallesTIPO_DETALLE = 'TIPO_DETALLE'; + fld_ContratosCliente_DetallesPROPIEDAD = 'PROPIEDAD'; fld_ContratosCliente_DetallesCONCEPTO = 'CONCEPTO'; fld_ContratosCliente_DetallesCANTIDAD = 'CANTIDAD'; fld_ContratosCliente_DetallesIMPORTE_UNIDAD = 'IMPORTE_UNIDAD'; @@ -216,22 +217,23 @@ const idx_ContratosCliente_DetallesID_CONTRATO = 1; idx_ContratosCliente_DetallesPOSICION = 2; idx_ContratosCliente_DetallesTIPO_DETALLE = 3; - idx_ContratosCliente_DetallesCONCEPTO = 4; - idx_ContratosCliente_DetallesCANTIDAD = 5; - idx_ContratosCliente_DetallesIMPORTE_UNIDAD = 6; - idx_ContratosCliente_DetallesIMPORTE_TOTAL = 7; - idx_ContratosCliente_DetallesVISIBLE = 8; - idx_ContratosCliente_DetallesID_ARTICULO = 9; - idx_ContratosCliente_DetallesTIPO_ARTICULO = 10; - idx_ContratosCliente_DetallesDESCUENTO = 11; - idx_ContratosCliente_DetallesIMPORTE_PORTE = 12; - idx_ContratosCliente_DetallesREFERENCIA = 13; - idx_ContratosCliente_DetallesREFERENCIA_PROVEEDOR = 14; + idx_ContratosCliente_DetallesPROPIEDAD = 4; + idx_ContratosCliente_DetallesCONCEPTO = 5; + idx_ContratosCliente_DetallesCANTIDAD = 6; + idx_ContratosCliente_DetallesIMPORTE_UNIDAD = 7; + idx_ContratosCliente_DetallesIMPORTE_TOTAL = 8; + idx_ContratosCliente_DetallesVISIBLE = 9; + idx_ContratosCliente_DetallesID_ARTICULO = 10; + idx_ContratosCliente_DetallesTIPO_ARTICULO = 11; + idx_ContratosCliente_DetallesDESCUENTO = 12; + idx_ContratosCliente_DetallesIMPORTE_PORTE = 13; + idx_ContratosCliente_DetallesREFERENCIA = 14; + idx_ContratosCliente_DetallesREFERENCIA_PROVEEDOR = 15; type { IValores } IValores = interface(IDAStronglyTypedDataTable) - ['{22EB6286-F205-40D3-9987-8300E2A9853F}'] + ['{D86FAABE-B20B-48BE-B160-8767CEA84C3C}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -290,7 +292,7 @@ type { IPropiedades } IPropiedades = interface(IDAStronglyTypedDataTable) - ['{569F1642-7C0C-4370-ABF1-DAB4665459DB}'] + ['{5AAF3E21-FEBD-4211-AD79-08B1438EF95D}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -349,7 +351,7 @@ type { IListaAnosContratos } IListaAnosContratos = interface(IDAStronglyTypedDataTable) - ['{04A9E518-9929-4B89-80A8-7E7E5D7095E0}'] + ['{397A8CFD-9592-49B7-997B-A206E9159B76}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -384,7 +386,7 @@ type { IContratosClienteBeneficios } IContratosClienteBeneficios = interface(IDAStronglyTypedDataTable) - ['{324E56F5-35FA-4DCF-9CBD-E7B15B866EEE}'] + ['{B7C19066-8DBC-473F-A005-CA6CECB8244A}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -575,7 +577,7 @@ type { IContratosCliente } IContratosCliente = interface(IDAStronglyTypedDataTable) - ['{036A6578-3BE5-4535-B2D6-666D13D40ECD}'] + ['{F9EC2443-6943-4368-85E3-CA5C57103A1A}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1141,7 +1143,7 @@ type } { ITiposCapitulos } ITiposCapitulos = interface(IDAStronglyTypedDataTable) - ['{C93A3AC0-EE98-4F02-BFB3-06817133648A}'] + ['{81A688E8-AA17-41EE-A1D6-81479918BBF1}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1236,7 +1238,7 @@ type { IContratosCliente_Detalles } IContratosCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{636577F2-0315-43C8-9372-BA688C2E6B72}'] + ['{898E740D-B47B-4359-A144-870FF2217808}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1254,6 +1256,10 @@ type procedure SetTIPO_DETALLEValue(const aValue: String); function GetTIPO_DETALLEIsNull: Boolean; procedure SetTIPO_DETALLEIsNull(const aValue: Boolean); + function GetPROPIEDADValue: String; + procedure SetPROPIEDADValue(const aValue: String); + function GetPROPIEDADIsNull: Boolean; + procedure SetPROPIEDADIsNull(const aValue: Boolean); function GetCONCEPTOValue: String; procedure SetCONCEPTOValue(const aValue: String); function GetCONCEPTOIsNull: Boolean; @@ -1309,6 +1315,8 @@ type property POSICIONIsNull: Boolean read GetPOSICIONIsNull write SetPOSICIONIsNull; property TIPO_DETALLE: String read GetTIPO_DETALLEValue write SetTIPO_DETALLEValue; property TIPO_DETALLEIsNull: Boolean read GetTIPO_DETALLEIsNull write SetTIPO_DETALLEIsNull; + property PROPIEDAD: String read GetPROPIEDADValue write SetPROPIEDADValue; + property PROPIEDADIsNull: Boolean read GetPROPIEDADIsNull write SetPROPIEDADIsNull; property CONCEPTO: String read GetCONCEPTOValue write SetCONCEPTOValue; property CONCEPTOIsNull: Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull; property CANTIDAD: Currency read GetCANTIDADValue write SetCANTIDADValue; @@ -1354,6 +1362,10 @@ type procedure SetTIPO_DETALLEValue(const aValue: String); virtual; function GetTIPO_DETALLEIsNull: Boolean; virtual; procedure SetTIPO_DETALLEIsNull(const aValue: Boolean); virtual; + function GetPROPIEDADValue: String; virtual; + procedure SetPROPIEDADValue(const aValue: String); virtual; + function GetPROPIEDADIsNull: Boolean; virtual; + procedure SetPROPIEDADIsNull(const aValue: Boolean); virtual; function GetCONCEPTOValue: String; virtual; procedure SetCONCEPTOValue(const aValue: String); virtual; function GetCONCEPTOIsNull: Boolean; virtual; @@ -1408,6 +1420,8 @@ type property POSICIONIsNull: Boolean read GetPOSICIONIsNull write SetPOSICIONIsNull; property TIPO_DETALLE: String read GetTIPO_DETALLEValue write SetTIPO_DETALLEValue; property TIPO_DETALLEIsNull: Boolean read GetTIPO_DETALLEIsNull write SetTIPO_DETALLEIsNull; + property PROPIEDAD: String read GetPROPIEDADValue write SetPROPIEDADValue; + property PROPIEDADIsNull: Boolean read GetPROPIEDADIsNull write SetPROPIEDADIsNull; property CONCEPTO: String read GetCONCEPTOValue write SetCONCEPTOValue; property CONCEPTOIsNull: Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull; property CANTIDAD: Currency read GetCANTIDADValue write SetCANTIDADValue; @@ -3142,6 +3156,27 @@ begin DataTable.Fields[idx_ContratosCliente_DetallesTIPO_DETALLE].AsVariant := Null; end; +function TContratosCliente_DetallesDataTableRules.GetPROPIEDADValue: String; +begin + result := DataTable.Fields[idx_ContratosCliente_DetallesPROPIEDAD].AsString; +end; + +procedure TContratosCliente_DetallesDataTableRules.SetPROPIEDADValue(const aValue: String); +begin + DataTable.Fields[idx_ContratosCliente_DetallesPROPIEDAD].AsString := aValue; +end; + +function TContratosCliente_DetallesDataTableRules.GetPROPIEDADIsNull: boolean; +begin + result := DataTable.Fields[idx_ContratosCliente_DetallesPROPIEDAD].IsNull; +end; + +procedure TContratosCliente_DetallesDataTableRules.SetPROPIEDADIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_ContratosCliente_DetallesPROPIEDAD].AsVariant := Null; +end; + function TContratosCliente_DetallesDataTableRules.GetCONCEPTOValue: String; begin result := DataTable.Fields[idx_ContratosCliente_DetallesCONCEPTO].AsString; diff --git a/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas b/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas index 9ebb60c..cbaa5e7 100644 --- a/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas +++ b/Source/Modulos/Contratos de cliente/Model/schContratosClienteServer_Intf.pas @@ -9,18 +9,18 @@ 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_ValoresDelta = '{D32E0D68-A35E-40C0-B392-2D39D3D21953}'; - RID_PropiedadesDelta = '{DCD3B700-14A4-4CD6-AA62-79DA5F6F5856}'; - RID_ListaAnosContratosDelta = '{383E48EC-36B7-42B2-B5CF-D03D68BE3274}'; - RID_ContratosClienteBeneficiosDelta = '{AF389F8F-27E2-41B9-9FDB-38E77D712993}'; - RID_ContratosClienteDelta = '{2153CB43-1F8B-40FD-A227-71C190E7D3B2}'; - RID_TiposCapitulosDelta = '{6FFB3E97-9DBC-4D0B-86BD-3E1B2825C119}'; - RID_ContratosCliente_DetallesDelta = '{31FC6830-EBF5-413C-921E-F2FD6FA71429}'; + RID_ValoresDelta = '{9CE22F1E-3F2B-4AD5-843D-F5128DD7C5F1}'; + RID_PropiedadesDelta = '{0F51AF81-3A0A-4867-8ABB-D63B99BBF522}'; + RID_ListaAnosContratosDelta = '{F03E531D-9A34-49BC-910B-EBFA48C93D8B}'; + RID_ContratosClienteBeneficiosDelta = '{2926FE0C-6BF7-4326-87A6-70303D69EB58}'; + RID_ContratosClienteDelta = '{1C1605F5-61F9-41A2-BDB3-B29C6B035DB0}'; + RID_TiposCapitulosDelta = '{97A487E0-3FD8-4B85-818B-55EA15B54CA3}'; + RID_ContratosCliente_DetallesDelta = '{8C9149BF-C3E8-47F8-A26F-A45942CA736B}'; type { IValoresDelta } IValoresDelta = interface(IValores) - ['{D32E0D68-A35E-40C0-B392-2D39D3D21953}'] + ['{9CE22F1E-3F2B-4AD5-843D-F5128DD7C5F1}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_PROPIEDADValue : Integer; @@ -78,7 +78,7 @@ type { IPropiedadesDelta } IPropiedadesDelta = interface(IPropiedades) - ['{DCD3B700-14A4-4CD6-AA62-79DA5F6F5856}'] + ['{0F51AF81-3A0A-4867-8ABB-D63B99BBF522}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -136,7 +136,7 @@ type { IListaAnosContratosDelta } IListaAnosContratosDelta = interface(IListaAnosContratos) - ['{383E48EC-36B7-42B2-B5CF-D03D68BE3274}'] + ['{F03E531D-9A34-49BC-910B-EBFA48C93D8B}'] { Property getters and setters } function GetOldANOValue : String; @@ -170,7 +170,7 @@ type { IContratosClienteBeneficiosDelta } IContratosClienteBeneficiosDelta = interface(IContratosClienteBeneficios) - ['{AF389F8F-27E2-41B9-9FDB-38E77D712993}'] + ['{2926FE0C-6BF7-4326-87A6-70303D69EB58}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldREFERENCIAValue : String; @@ -360,7 +360,7 @@ type { IContratosClienteDelta } IContratosClienteDelta = interface(IContratosCliente) - ['{2153CB43-1F8B-40FD-A227-71C190E7D3B2}'] + ['{1C1605F5-61F9-41A2-BDB3-B29C6B035DB0}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -926,7 +926,7 @@ type { ITiposCapitulosDelta } ITiposCapitulosDelta = interface(ITiposCapitulos) - ['{6FFB3E97-9DBC-4D0B-86BD-3E1B2825C119}'] + ['{97A487E0-3FD8-4B85-818B-55EA15B54CA3}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldPOSICIONValue : Integer; @@ -1020,12 +1020,13 @@ type { IContratosCliente_DetallesDelta } IContratosCliente_DetallesDelta = interface(IContratosCliente_Detalles) - ['{31FC6830-EBF5-413C-921E-F2FD6FA71429}'] + ['{8C9149BF-C3E8-47F8-A26F-A45942CA736B}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_CONTRATOValue : Integer; function GetOldPOSICIONValue : Integer; function GetOldTIPO_DETALLEValue : String; + function GetOldPROPIEDADValue : String; function GetOldCONCEPTOValue : String; function GetOldCANTIDADValue : Currency; function GetOldIMPORTE_UNIDADValue : Currency; @@ -1043,6 +1044,7 @@ type property OldID_CONTRATO : Integer read GetOldID_CONTRATOValue; property OldPOSICION : Integer read GetOldPOSICIONValue; property OldTIPO_DETALLE : String read GetOldTIPO_DETALLEValue; + property OldPROPIEDAD : String read GetOldPROPIEDADValue; property OldCONCEPTO : String read GetOldCONCEPTOValue; property OldCANTIDAD : Currency read GetOldCANTIDADValue; property OldIMPORTE_UNIDAD : Currency read GetOldIMPORTE_UNIDADValue; @@ -1085,6 +1087,12 @@ type function GetOldTIPO_DETALLEIsNull: Boolean; virtual; procedure SetTIPO_DETALLEValue(const aValue: String); virtual; procedure SetTIPO_DETALLEIsNull(const aValue: Boolean); virtual; + function GetPROPIEDADValue: String; virtual; + function GetPROPIEDADIsNull: Boolean; virtual; + function GetOldPROPIEDADValue: String; virtual; + function GetOldPROPIEDADIsNull: Boolean; virtual; + procedure SetPROPIEDADValue(const aValue: String); virtual; + procedure SetPROPIEDADIsNull(const aValue: Boolean); virtual; function GetCONCEPTOValue: String; virtual; function GetCONCEPTOIsNull: Boolean; virtual; function GetOldCONCEPTOValue: String; virtual; @@ -1169,6 +1177,10 @@ type property TIPO_DETALLEIsNull : Boolean read GetTIPO_DETALLEIsNull write SetTIPO_DETALLEIsNull; property OldTIPO_DETALLE : String read GetOldTIPO_DETALLEValue; property OldTIPO_DETALLEIsNull : Boolean read GetOldTIPO_DETALLEIsNull; + property PROPIEDAD : String read GetPROPIEDADValue write SetPROPIEDADValue; + property PROPIEDADIsNull : Boolean read GetPROPIEDADIsNull write SetPROPIEDADIsNull; + property OldPROPIEDAD : String read GetOldPROPIEDADValue; + property OldPROPIEDADIsNull : Boolean read GetOldPROPIEDADIsNull; property CONCEPTO : String read GetCONCEPTOValue write SetCONCEPTOValue; property CONCEPTOIsNull : Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull; property OldCONCEPTO : String read GetOldCONCEPTOValue; @@ -3690,6 +3702,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosCliente_DetallesTIPO_DETALLE] := Null; end; +function TContratosCliente_DetallesBusinessProcessorRules.GetPROPIEDADValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosCliente_DetallesPROPIEDAD]; +end; + +function TContratosCliente_DetallesBusinessProcessorRules.GetPROPIEDADIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosCliente_DetallesPROPIEDAD]); +end; + +function TContratosCliente_DetallesBusinessProcessorRules.GetOldPROPIEDADValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_ContratosCliente_DetallesPROPIEDAD]; +end; + +function TContratosCliente_DetallesBusinessProcessorRules.GetOldPROPIEDADIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_ContratosCliente_DetallesPROPIEDAD]); +end; + +procedure TContratosCliente_DetallesBusinessProcessorRules.SetPROPIEDADValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosCliente_DetallesPROPIEDAD] := aValue; +end; + +procedure TContratosCliente_DetallesBusinessProcessorRules.SetPROPIEDADIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosCliente_DetallesPROPIEDAD] := Null; +end; + function TContratosCliente_DetallesBusinessProcessorRules.GetCONCEPTOValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_ContratosCliente_DetallesCONCEPTO]; diff --git a/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.dfm b/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.dfm index 03fadd7..d56d735 100644 --- a/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.dfm +++ b/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.dfm @@ -785,18 +785,18 @@ object srvContratosCliente: TsrvContratosCliente 'SELECT'#10' CONTRATOS_CLIENTE_DETALLES.ID, CONTRATOS_CLIENTE_DETA' + 'LLES.ID_CONTRATO,'#10' CONTRATOS_CLIENTE_DETALLES.POSICION, CONTR' + 'ATOS_CLIENTE_DETALLES.TIPO_DETALLE,'#10' CONTRATOS_CLIENTE_DETALL' + - 'ES.CONCEPTO, CONTRATOS_CLIENTE_DETALLES.CANTIDAD,'#10' CONTRATOS_' + - 'CLIENTE_DETALLES.IMPORTE_UNIDAD, CONTRATOS_CLIENTE_DETALLES.IMPO' + - 'RTE_TOTAL,'#10' CONTRATOS_CLIENTE_DETALLES.VISIBLE,'#10#10' CONTRATO' + - 'S_CLIENTE_DETALLES.ID_ARTICULO, CONTRATOS_CLIENTE_DETALLES.TIPO_' + - 'ARTICULO,'#10' CONTRATOS_CLIENTE_DETALLES.DESCUENTO,'#10' CONTRATO' + - 'S_CLIENTE_DETALLES.IMPORTE_PORTE,'#10' PRESUPUESTOS_PROPIEDADES.D' + - 'ESCRIPCION as REFERENCIA,'#10' '#39#39' as REFERENCIA_PROVEEDOR /*Es ne' + - 'cesario para que no fallen los detalles porque los detalles son ' + - 'comunes para la rama de cliente y de proveedor*/'#10#10'FROM CONTRATOS' + - '_CLIENTE_DETALLES'#10'LEFT JOIN PRESUPUESTOS_PROPIEDADES ON (PRESUPU' + - 'ESTOS_PROPIEDADES.ID = CONTRATOS_CLIENTE_DETALLES.ID_ARTICULO)'#10'w' + - 'here {where}'#10'ORDER BY POSICION;'#10#10 + 'ES.PROPIEDAD, CONTRATOS_CLIENTE_DETALLES.CONCEPTO, CONTRATOS_CLI' + + 'ENTE_DETALLES.CANTIDAD,'#10' CONTRATOS_CLIENTE_DETALLES.IMPORTE_U' + + 'NIDAD, CONTRATOS_CLIENTE_DETALLES.IMPORTE_TOTAL,'#10' CONTRATOS_C' + + 'LIENTE_DETALLES.VISIBLE,'#10#10' CONTRATOS_CLIENTE_DETALLES.ID_ARTI' + + 'CULO, CONTRATOS_CLIENTE_DETALLES.TIPO_ARTICULO,'#10' CONTRATOS_CL' + + 'IENTE_DETALLES.DESCUENTO,'#10' CONTRATOS_CLIENTE_DETALLES.IMPORTE' + + '_PORTE, ARTICULOS.REFERENCIA,'#10' '#39#39' as REFERENCIA_PROVEEDOR /*E' + + 's necesario para que no fallen los detalles porque los detalles ' + + 'son comunes para la rama de cliente y de proveedor*/'#10#10'FROM CONTR' + + 'ATOS_CLIENTE_DETALLES'#10'LEFT JOIN ARTICULOS ON CONTRATOS_CLIENTE_D' + + 'ETALLES.ID_ARTICULO = ARTICULOS.ID'#10'where {where}'#10'ORDER BY POSICI' + + 'ON;'#10 StatementType = stSQL ColumnMappings = < item @@ -860,6 +860,10 @@ object srvContratosCliente: TsrvContratosCliente DatasetField = 'REFERENCIA_PROVEEDOR' TableField = '' SQLOrigin = 'REFERENCIA_PROVEEDOR' + end + item + DatasetField = 'PROPIEDAD' + TableField = 'PROPIEDAD' end> end> Name = 'ContratosCliente_Detalles' @@ -883,6 +887,11 @@ object srvContratosCliente: TsrvContratosCliente DataType = datString Size = 10 end + item + Name = 'PROPIEDAD' + DataType = datString + Size = 255 + end item Name = 'CONCEPTO' DataType = datString @@ -924,7 +933,7 @@ object srvContratosCliente: TsrvContratosCliente item Name = 'REFERENCIA' DataType = datString - Size = 50 + Size = 255 end item Name = 'REFERENCIA_PROVEEDOR' @@ -1440,6 +1449,12 @@ object srvContratosCliente: TsrvContratosCliente Size = 10 Value = '' end + item + Name = 'PROPIEDAD' + DataType = datString + Size = 255 + Value = '' + end item Name = 'CONCEPTO' DataType = datString @@ -1494,12 +1509,13 @@ object srvContratosCliente: TsrvContratosCliente TargetTable = 'CONTRATOS_CLIENTE_DETALLES' SQL = 'INSERT'#10' INTO CONTRATOS_CLIENTE_DETALLES'#10' (ID, ID_CONTRATO, P' + - 'OSICION, TIPO_DETALLE, CONCEPTO, CANTIDAD,'#10' IMPORTE_UNIDAD, ' + - 'IMPORTE_TOTAL, VISIBLE, ID_ARTICULO, TIPO_ARTICULO,'#10' DESCUEN' + - 'TO, IMPORTE_PORTE, FECHA_ALTA)'#10' VALUES'#10' (:ID, :ID_CONTRATO, ' + - ':POSICION, :TIPO_DETALLE, :CONCEPTO,'#10' :CANTIDAD, :IMPORTE_UN' + - 'IDAD, :IMPORTE_TOTAL, :VISIBLE,'#10' :ID_ARTICULO, :TIPO_ARTICUL' + - 'O, :DESCUENTO, :IMPORTE_PORTE, CURRENT_TIMESTAMP)'#10 + 'OSICION, TIPO_DETALLE, PROPIEDAD, CONCEPTO, CANTIDAD,'#10' IMPOR' + + 'TE_UNIDAD, IMPORTE_TOTAL, VISIBLE, ID_ARTICULO, TIPO_ARTICULO,'#10' ' + + ' DESCUENTO, IMPORTE_PORTE, FECHA_ALTA)'#10' VALUES'#10' (:ID, :ID' + + '_CONTRATO, :POSICION, :TIPO_DETALLE, :PROPIEDAD, :CONCEPTO,'#10' ' + + ' :CANTIDAD, :IMPORTE_UNIDAD, :IMPORTE_TOTAL, :VISIBLE,'#10' :ID_' + + 'ARTICULO, :TIPO_ARTICULO, :DESCUENTO, :IMPORTE_PORTE, CURRENT_TI' + + 'MESTAMP)'#10 StatementType = stSQL ColumnMappings = <> end> @@ -1548,6 +1564,12 @@ object srvContratosCliente: TsrvContratosCliente Size = 10 Value = '' end + item + Name = 'PROPIEDAD' + DataType = datString + Size = 255 + Value = '' + end item Name = 'CONCEPTO' DataType = datString @@ -1607,12 +1629,13 @@ object srvContratosCliente: TsrvContratosCliente SQL = 'UPDATE CONTRATOS_CLIENTE_DETALLES'#10' SET '#10' ID = :ID,'#10' ID_CO' + 'NTRATO = :ID_CONTRATO,'#10' POSICION = :POSICION, '#10' TIPO_DETAL' + - 'LE = :TIPO_DETALLE, '#10' CONCEPTO = :CONCEPTO, '#10' CANTIDAD = :' + - 'CANTIDAD, '#10' IMPORTE_UNIDAD = :IMPORTE_UNIDAD,'#10' IMPORTE_TOT' + - 'AL = :IMPORTE_TOTAL, '#10' VISIBLE = :VISIBLE, '#10' ID_ARTICULO =' + - ' :ID_ARTICULO, '#10' TIPO_ARTICULO = :TIPO_ARTICULO,'#10' DESCUENT' + - 'O = :DESCUENTO, '#10' IMPORTE_PORTE = :IMPORTE_PORTE,'#10' FECHA_M' + - 'ODIFICACION = CURRENT_TIMESTAMP'#10' WHERE'#10' (ID = :OLD_ID)'#10 + 'LE = :TIPO_DETALLE, '#10' PROPIEDAD = :PROPIEDAD,'#10' CONCEPTO = ' + + ':CONCEPTO, '#10' CANTIDAD = :CANTIDAD, '#10' IMPORTE_UNIDAD = :IMP' + + 'ORTE_UNIDAD,'#10' IMPORTE_TOTAL = :IMPORTE_TOTAL, '#10' VISIBLE = ' + + ':VISIBLE, '#10' ID_ARTICULO = :ID_ARTICULO, '#10' TIPO_ARTICULO = ' + + ':TIPO_ARTICULO,'#10' DESCUENTO = :DESCUENTO, '#10' IMPORTE_PORTE =' + + ' :IMPORTE_PORTE,'#10' FECHA_MODIFICACION = CURRENT_TIMESTAMP'#10' WH' + + 'ERE'#10' (ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm index 213b9df..cfa45d3 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm @@ -174,6 +174,7 @@ inherited fEditorContratoCliente: TfEditorContratoCliente inherited pgPaginas: TPageControl Width = 839 Height = 270 + ActivePage = pagContenido TabOrder = 1 OnChanging = pgPaginasChanging ExplicitWidth = 839 @@ -207,98 +208,96 @@ inherited fEditorContratoCliente: TfEditorContratoCliente ExplicitHeight = 242 inherited ToolBar1: TToolBar Width = 831 + Height = 24 ExplicitWidth = 831 - inherited ToolButton4: TToolButton - Wrap = True - end + ExplicitHeight = 24 inherited ToolButton14: TToolButton - Left = 0 - Top = 22 Wrap = False - ExplicitLeft = 0 - ExplicitTop = 22 end inherited FontName: TJvFontComboBox - Left = 34 + Left = 368 + Top = 0 ExplicitLeft = 368 ExplicitTop = 0 end - inherited FontSize: TEdit + inherited UpDown1: TUpDown [6] Left = 513 Top = 0 - Width = 74 ExplicitLeft = 513 ExplicitTop = 0 + end + inherited ToolButton13: TToolButton [7] + Left = 530 + Top = 0 + ExplicitLeft = 530 + ExplicitTop = 0 + end + inherited ToolButton6: TToolButton [8] + Left = 538 + Top = 0 + ExplicitLeft = 538 + ExplicitTop = 0 + end + inherited ToolButton7: TToolButton [9] + Left = 572 + Top = 0 + ExplicitLeft = 572 + ExplicitTop = 0 + end + inherited ToolButton8: TToolButton [10] + Left = 606 + Top = 0 + ExplicitLeft = 606 + ExplicitTop = 0 + end + inherited ToolButton12: TToolButton [11] + Left = 640 + Top = 0 + ExplicitLeft = 640 + ExplicitTop = 0 + end + inherited ToolButton9: TToolButton [12] + Left = 648 + Top = 0 + ExplicitLeft = 648 + ExplicitTop = 0 + end + inherited ToolButton10: TToolButton [13] + Left = 682 + Top = 0 + ExplicitLeft = 682 + ExplicitTop = 0 + end + inherited ToolButton11: TToolButton [14] + Left = 716 + Top = 0 + ExplicitLeft = 716 + ExplicitTop = 0 + end + inherited FontSize: TEdit [15] + Left = 750 + Top = 0 + Width = 74 + ExplicitLeft = 750 + ExplicitTop = 0 ExplicitWidth = 74 end - inherited UpDown1: TUpDown - Left = 587 - Top = 0 - ExplicitLeft = 587 - ExplicitTop = 0 - end - inherited ToolButton13: TToolButton - Left = 604 - Top = 0 - ExplicitLeft = 604 - ExplicitTop = 0 - end - inherited ToolButton6: TToolButton - Left = 612 - Top = 0 - ExplicitLeft = 612 - ExplicitTop = 0 - end - inherited ToolButton7: TToolButton - Left = 646 - Top = 0 - ExplicitLeft = 646 - ExplicitTop = 0 - end - inherited ToolButton8: TToolButton - Left = 680 - Top = 0 - ExplicitLeft = 680 - ExplicitTop = 0 - end - inherited ToolButton12: TToolButton - Left = 714 - Top = 0 - ExplicitLeft = 714 - ExplicitTop = 0 - end - inherited ToolButton9: TToolButton - Left = 722 - Top = 0 - ExplicitLeft = 722 - ExplicitTop = 0 - end - inherited ToolButton10: TToolButton - Left = 756 - Top = 0 - ExplicitLeft = 756 - ExplicitTop = 0 - end - inherited ToolButton11: TToolButton - Left = 790 - Top = 0 - ExplicitLeft = 790 - ExplicitTop = 0 - end end inherited cxGrid: TcxGrid Top = 50 Width = 831 Height = 192 ExplicitTop = 50 - ExplicitWidth = 834 - ExplicitHeight = 273 + ExplicitWidth = 831 + ExplicitHeight = 192 + inherited cxGridView: TcxGridDBTableView + end end inherited TBXDock1: TTBXDock Top = 24 Width = 831 ExplicitTop = 24 - ExplicitWidth = 834 + ExplicitWidth = 831 inherited TBXToolbar1: TTBXToolbar ExplicitWidth = 564 end @@ -309,6 +308,9 @@ inherited fEditorContratoCliente: TfEditorContratoCliente inherited cxRichEdit1: TcxRichEdit Style.IsFontAssigned = True end + inherited cxLookupComboBox2: TcxLookupComboBox + Style.IsFontAssigned = True + end end end object pagInicidencias: TTabSheet @@ -466,6 +468,11 @@ inherited fEditorContratoCliente: TfEditorContratoCliente Style.IsFontAssigned = True ExplicitLeft = 528 end + inherited edtIRPF: TcxDBSpinEdit + Left = 528 + Style.IsFontAssigned = True + ExplicitLeft = 528 + end inherited ImporteRE: TcxDBCurrencyEdit Left = 599 Style.IsFontAssigned = True @@ -473,6 +480,13 @@ inherited fEditorContratoCliente: TfEditorContratoCliente ExplicitWidth = 56 Width = 56 end + inherited ImporteIRPF: TcxDBCurrencyEdit + Left = 599 + Style.IsFontAssigned = True + ExplicitLeft = 599 + ExplicitWidth = 56 + Width = 56 + end inherited eImporteNeto: TcxDBCurrencyEdit Style.IsFontAssigned = True ExplicitWidth = 147 diff --git a/Source/Modulos/Contratos de cliente/Views/uViewDetallesContratoCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uViewDetallesContratoCliente.dfm index 71cc05e..538b6f4 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewDetallesContratoCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uViewDetallesContratoCliente.dfm @@ -68,19 +68,13 @@ inherited frViewDetallesContratoCliente: TfrViewDetallesContratoCliente inherited cxGridViewVISIBLE: TcxGridDBColumn [5] Visible = True end - object cxGridViewID_PROPIEDAD: TcxGridDBColumn [6] - Caption = 'Propiedad' - DataBinding.FieldName = 'ID_ARTICULO' - PropertiesClassName = 'TcxLookupComboBoxProperties' - Properties.ImmediatePost = True - Properties.KeyFieldNames = 'ID' - Properties.ListColumns = < - item - FieldName = 'DESCRIPCION' - end> - Properties.ListOptions.ShowHeader = False - Properties.ListOptions.SyncMode = True - Properties.ListSource = DAPropiedades + object cxGridViewPROPIEDAD: TcxGridDBColumn [6] + DataBinding.FieldName = 'PROPIEDAD' + PropertiesClassName = 'TcxRichEditProperties' + OnGetPropertiesForEdit = cxGridViewPROPIEDADGetPropertiesForEdit + BestFitMaxWidth = 150 + Width = 150 + IsCaptionAssigned = True end inherited cxGridViewREFERENCIA: TcxGridDBColumn [7] end @@ -100,7 +94,6 @@ inherited frViewDetallesContratoCliente: TfrViewDetallesContratoCliente Width = 34 end inherited cxGridViewDESCUENTO: TcxGridDBColumn [12] - VisibleForCustomization = False Width = 20 end inherited cxGridViewIMPORTENETO: TcxGridDBColumn [13] @@ -205,6 +198,29 @@ inherited frViewDetallesContratoCliente: TfrViewDetallesContratoCliente Height = 25 Width = 145 end + object cxLookupComboBox2: TcxLookupComboBox [5] + Left = 78 + Top = 280 + ParentFont = False + Properties.DropDownListStyle = lsEditList + Properties.ImmediatePost = True + Properties.KeyFieldNames = 'DESCRIPCION' + Properties.ListColumns = < + item + FieldName = 'DESCRIPCION' + end> + Properties.ListOptions.ShowHeader = False + Properties.ListSource = DAPropiedades + Style.Font.Charset = DEFAULT_CHARSET + Style.Font.Color = clWindowText + Style.Font.Height = -13 + Style.Font.Name = 'Lucida Console' + Style.Font.Style = [] + Style.IsFontAssigned = True + TabOrder = 5 + Visible = False + Width = 145 + end inherited ActionListContenido: TActionList object actAsignarDescuento: TAction Category = 'Operaciones' diff --git a/Source/Modulos/Contratos de cliente/Views/uViewDetallesContratoCliente.pas b/Source/Modulos/Contratos de cliente/Views/uViewDetallesContratoCliente.pas index 5cf42b7..f93a91a 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewDetallesContratoCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uViewDetallesContratoCliente.pas @@ -30,7 +30,7 @@ type TBXItem18: TTBXItem; TBXSeparatorItem9: TTBXSeparatorItem; DAPropiedades: TDADataSource; - cxGridViewID_PROPIEDAD: TcxGridDBColumn; + cxGridViewPROPIEDAD: TcxGridDBColumn; cxLookupComboBox1: TcxLookupComboBox; DAValores: TDADataSource; cxRichEdit1: TcxRichEdit; @@ -55,6 +55,7 @@ type actCapituloImportes: TAction; TBXSeparatorItem11: TTBXSeparatorItem; TBXItem21: TTBXItem; + cxLookupComboBox2: TcxLookupComboBox; procedure actAsignarDescuentoExecute(Sender: TObject); procedure actAsignarDescuentoUpdate(Sender: TObject); procedure CustomViewShow(Sender: TObject); @@ -70,6 +71,9 @@ type procedure actCapituloImportesExecute(Sender: TObject); procedure OnVISIBLEPropertiesEditValueChanged(Sender: TObject); procedure CustomViewDestroy(Sender: TObject); + procedure cxGridViewPROPIEDADGetPropertiesForEdit( + Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; + var AProperties: TcxCustomEditProperties); private procedure AnadirCapitulo(const Tipo: String;const Descripcion: String; const Descuento:Boolean = false); @@ -259,18 +263,28 @@ begin inherited; //OJO sin esto no se refresca el filtro en tabla detalle "VALORES". - (cxGridViewID_PROPIEDAD.Properties as TcxLookupComboBoxProperties).ListSource.DataSet.Locate(fld_PropiedadesID, cxGridViewID_PROPIEDAD.DataBinding.Field.AsVariant,[]); + DAPropiedades.DataTable.Locate(fld_PropiedadesDESCRIPCION, cxGridViewPROPIEDAD.DataBinding.Field.AsVariant,[]); if (ARecord.DisplayTexts[cxGridViewTIPO.Index] = TIPO_DETALLE_CONCEPTO) - and ((ARecord.DisplayTexts[cxGridViewTIPO_ARTICULO.Index] = TIPO_CAPITULO_AF) - or (ARecord.DisplayTexts[cxGridViewTIPO_ARTICULO.Index] = TIPO_CAPITULO_AI) - or (ARecord.DisplayTexts[cxGridViewTIPO_ARTICULO.Index] = TIPO_CAPITULO_B) - or (ARecord.DisplayTexts[cxGridViewTIPO_ARTICULO.Index] = TIPO_CAPITULO_C)) then + and (ARecord.DisplayTexts[cxGridViewPROPIEDAD.Index] <> '') then AProperties := cxLookupComboBox1.Properties else AProperties := cxRichEdit1.Properties; end; +procedure TfrViewDetallesContratoCliente.cxGridViewPROPIEDADGetPropertiesForEdit( + Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; + var AProperties: TcxCustomEditProperties); +begin + inherited; + + if (ARecord.DisplayTexts[cxGridViewTIPO.Index] = TIPO_DETALLE_CONCEPTO) + then + AProperties := cxLookupComboBox2.Properties + else + AProperties := cxRichEdit1.Properties; +end; + function TfrViewDetallesContratoCliente.EsTipoEditable(AItem: TcxCustomGridTableItem): Boolean; var IndiceCol : Integer; @@ -283,7 +297,7 @@ begin if (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_DETALLE_DESCUENTO) then Result := False end - else if (AItem.Index in [cxGridViewID_PROPIEDAD.Index, cxGridViewTIPO_ARTICULO.Index]) then + else if (AItem.Index in [cxGridViewPROPIEDAD.Index, cxGridViewTIPO_ARTICULO.Index]) then begin IndiceCol := cxGridView.GetColumnByFieldName(CAMPO_TIPO).Index; if ((AItem.GridView.Items[IndiceCol].EditValue = TIPO_DETALLE_SALTO) or @@ -296,8 +310,11 @@ begin IndiceCol := cxGridView.GetColumnByFieldName(fld_ContratosCliente_DetallesTIPO_ARTICULO).Index; if ((AItem.GridView.Items[IndiceCol].EditValue <> TIPO_CAPITULO_AF) and (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_CAPITULO_AI) and - (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_CAPITULO_B) and - (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_CAPITULO_C)) then + (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_CAPITULO_C) and + (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_CAPITULO_O) and + (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_CAPITULO_V) and + (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_CAPITULO_E) and + (AItem.GridView.Items[IndiceCol].EditValue <> TIPO_CAPITULO_B)) then Result := False end; end diff --git a/Source/Modulos/Familias/Plugin/uPluginFamilias.dfm b/Source/Modulos/Familias/Plugin/uPluginFamilias.dfm index 54d891a..51a30d1 100644 --- a/Source/Modulos/Familias/Plugin/uPluginFamilias.dfm +++ b/Source/Modulos/Familias/Plugin/uPluginFamilias.dfm @@ -35,7 +35,7 @@ object PluginFamilias: TPluginFamilias object Ventas1: TMenuItem Caption = 'Datos' object Familias1: TMenuItem - Tag = 19000 + Tag = 900 Action = actFamilias end end diff --git a/Source/Modulos/Inventario/Controller/Inventario_controller.dproj b/Source/Modulos/Inventario/Controller/Inventario_controller.dproj index 7fd59e3..c3c14e4 100644 --- a/Source/Modulos/Inventario/Controller/Inventario_controller.dproj +++ b/Source/Modulos/Inventario/Controller/Inventario_controller.dproj @@ -39,61 +39,21 @@ Delphi.Personality Package - - False - True - False - - - True - False - False - - - True - False - 1 - 0 - 0 - 0 - False - False - False - False - False - 3082 - 1252 - - - - - 1.0.0.0 - - - - - - 1.0.0.0 - - - - Inventario_controller.dpk - - +FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0Inventario_controller.dpk MainSource - - - - - - - - + + + + + + + +
dmInventarioUtils
TDataModule @@ -107,7 +67,6 @@
-