From 10fcd1692a9b60181159bf47faaca297ba4a38f8 Mon Sep 17 00:00:00 2001 From: roberto Date: Mon, 10 Aug 2009 11:32:12 +0000 Subject: [PATCH] =?UTF-8?q?Arreglo=20para=20que=20cuando=20a=C3=B1adimos?= =?UTF-8?q?=20conceptos=20se=20ponga=20el=20tipo=20de=20articulo=20del=20c?= =?UTF-8?q?apitulo=20en=20el=20que=20esta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@430 f4e31baf-9722-1c47-927c-6f952f962d4b --- .../uDetallesPresupuestoClienteController.pas | 14 ++++++++++++++ .../Views/uViewDetallesPresupuestoCliente.dfm | 8 +------- .../Views/uViewDetallesPresupuestoCliente.pas | 16 ++++++++++++++++ Source/Servidor/FactuGES_Server.RES | Bin 23348 -> 23344 bytes Source/Servidor/FactuGES_Server.rc | 2 +- 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/Source/Modulos/Presupuestos de cliente/Controller/uDetallesPresupuestoClienteController.pas b/Source/Modulos/Presupuestos de cliente/Controller/uDetallesPresupuestoClienteController.pas index b56824ab..a2fc7ff2 100644 --- a/Source/Modulos/Presupuestos de cliente/Controller/uDetallesPresupuestoClienteController.pas +++ b/Source/Modulos/Presupuestos de cliente/Controller/uDetallesPresupuestoClienteController.pas @@ -17,6 +17,7 @@ type function DarPropiedades: IBizPropiedades; procedure AnadirCapitulo (const Tipo: String; ADetalles: IDAStronglyTypedDataTable); + procedure SetTipoArticulo(ADetalles: IDAStronglyTypedDataTable; ATipo: String); end; TDetallesPresupuestoClienteController = class(TControllerDetallesArticulos, IDetallesPresupuestoClienteController) @@ -48,6 +49,8 @@ type //Se sobre escribe para hacer otro recorrido y rellenar el tipo_articulo a todos los conceptos de los capitulos procedure ValidarDetalles(ADataTable: IDAStronglyTypedDataTable); override; + + procedure SetTipoArticulo(ADetalles: IDAStronglyTypedDataTable; ATipo: String); end; implementation @@ -286,6 +289,17 @@ begin // ADetalles.DataTable.FieldByName(CAMPO_DESCUENTO).AsFloat := 0; end; +procedure TDetallesPresupuestoClienteController.SetTipoArticulo( + ADetalles: IDAStronglyTypedDataTable; ATipo: String); +begin + if assigned(ADetalles) then + begin + ADetalles.DataTable.Edit; + ADetalles.DataTable.FieldByName('TIPO_ARTICULO').AsString := ATipo; + ADetalles.DataTable.Post; + end; +end; + procedure TDetallesPresupuestoClienteController.ValidarCampos(DataTable: TDADataTable); begin inherited; diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.dfm index c7606c00..b663d915 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.dfm @@ -1,8 +1,5 @@ inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente - Width = 667 - Height = 446 inherited ToolBar1: TToolBar - Width = 667 inherited ToolButton4: TToolButton Wrap = False end @@ -59,8 +56,6 @@ inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente end end inherited cxGrid: TcxGrid - Width = 667 - Height = 374 inherited cxGridView: TcxGridDBTableView inherited cxGridViewID_ARTICULO: TcxGridDBColumn Width = 57 @@ -113,9 +108,8 @@ inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente end end inherited TBXDock1: TTBXDock - Width = 667 inherited TBXToolbar1: TTBXToolbar - ExplicitWidth = 614 + ExplicitWidth = 451 object TBXSubmenuItem1: TTBXSubmenuItem [0] Caption = 'A'#241'adir ...' object TBXItem14: TTBXItem diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.pas index c05dce24..87deaf85 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.pas @@ -60,6 +60,7 @@ type procedure actCapituloCocinaExecute(Sender: TObject); procedure actCapituloElectrodomesticosExecute(Sender: TObject); procedure actCapituloVariosExecute(Sender: TObject); + procedure actAnadirExecute(Sender: TObject); private procedure AnadirCapitulo(const Tipo: String); @@ -88,6 +89,21 @@ uCalculosUtils; { TfrViewDetallesPresupuestoProveedor } +procedure TfrViewDetallesPresupuestoCliente.actAnadirExecute(Sender: TObject); +var + AuxTipo: String; +begin + AuxTipo := ''; + //En el caso de estar dentro de un capitulo almacenamos el tipo de articulo del capitulo + if FPresupuesto.Detalles.TIPO_DETALLE = TIPO_DETALLE_CONCEPTO then + AuxTipo := FPresupuesto.Detalles.TIPO_ARTICULO; + + inherited; + + //Asignamos el tipo de articulo del capitulo + (Controller as IDetallesPresupuestoClienteController).SetTipoArticulo(Detalles, AuxTipo); +end; + procedure TfrViewDetallesPresupuestoCliente.actAsignarDescuentoExecute(Sender: TObject); var AuxTop, AuxRow:Integer; diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES index d3166548090ecbfa31cfb2611244ba51d8d76f21..5b36f2646b95cb88a924770dba56dd1910a0b517 100644 GIT binary patch delta 76 zcmdn8jd24I-HBi{nS3`w9!UO;h-REJIWkh2v0!s;BsU{-3WL(*?kHKo9EMVcJcd+; cVg?-s1qMR~gUP$2G}(jgSYDemWb)1^O-?fgD+Ut=3kHVCFQeQ6Q+pSi diff --git a/Source/Servidor/FactuGES_Server.rc b/Source/Servidor/FactuGES_Server.rc index 4e3b46f9..0cf5b136 100644 --- a/Source/Servidor/FactuGES_Server.rc +++ b/Source/Servidor/FactuGES_Server.rc @@ -16,7 +16,7 @@ BEGIN VALUE "FileVersion", "2.3.4.0\0" VALUE "ProductName", "FactuGES (Servidor)\0" VALUE "ProductVersion", "2.3.4.0\0" - VALUE "CompileDate", "martes, 04 de agosto de 2009 16:48\0" + VALUE "CompileDate", "lunes, 10 de agosto de 2009 13:11\0" END END BLOCK "VarFileInfo"