From 1b5e4c6761afb351ebe40c407a458acd7ebd5d29 Mon Sep 17 00:00:00 2001 From: roberto Date: Thu, 16 Apr 2009 15:31:51 +0000 Subject: [PATCH] Se arreglan cabeceras de informes solicitado por Maribel, se arreglan varias trareas abiertas. git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@939 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Source/Informes/1/InfAlbaranCliente.fr3 | 62 ++++----- Source/Informes/1/InfAlbaranProveedor.fr3 | 76 +++++------ Source/Informes/1/InfFacturaCliente.fr3 | 124 ++++++++--------- Source/Informes/1/InfPedidoProveedor.fr3 | 66 ++++----- Source/Informes/1/InfPresupuestoCliente.fr3 | 4 +- Source/Informes/1/InfReciboCliente.fr3 | 128 +++++++++--------- Source/Informes/2/InfFacturaCliente.fr3 | 24 ++-- Source/Informes/2/InfReciboCliente.fr3 | 114 ++++++++-------- .../Views/uEditorElegirDomiciliacion.pas | 2 + .../View/uIEditorDetalleReservas.pas | 4 + .../Controller/uInventarioController.pas | 23 ++-- .../Views/uEditorDetalleReservas.dfm | 6 +- .../Views/uEditorDetalleReservas.pas | 17 ++- .../Inventario/Views/uEditorInventario.pas | 2 +- .../Inventario/Views/uViewDetalleReservas.pas | 51 +++++-- .../Views/uViewPresupuestosCliente.dfm | 17 +-- .../uGenerarAlbaranesProvUtils.pas | 2 +- 17 files changed, 385 insertions(+), 337 deletions(-) diff --git a/Source/Informes/1/InfAlbaranCliente.fr3 b/Source/Informes/1/InfAlbaranCliente.fr3 index cfbda961..3d5eddc8 100644 --- a/Source/Informes/1/InfAlbaranCliente.fr3 +++ b/Source/Informes/1/InfAlbaranCliente.fr3 @@ -1,40 +1,40 @@ - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - + + - - - - - - + + + + + + diff --git a/Source/Informes/1/InfAlbaranProveedor.fr3 b/Source/Informes/1/InfAlbaranProveedor.fr3 index 97fa71d4..30072b59 100644 --- a/Source/Informes/1/InfAlbaranProveedor.fr3 +++ b/Source/Informes/1/InfAlbaranProveedor.fr3 @@ -1,49 +1,49 @@ - + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - + + + + + + + - - - + + + - - - - - - - + + + + + + + - - + + - - - - - - + + + + + + diff --git a/Source/Informes/1/InfFacturaCliente.fr3 b/Source/Informes/1/InfFacturaCliente.fr3 index cfa4021f..3ae37222 100644 --- a/Source/Informes/1/InfFacturaCliente.fr3 +++ b/Source/Informes/1/InfFacturaCliente.fr3 @@ -1,76 +1,76 @@ - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - + + + - + diff --git a/Source/Informes/1/InfPedidoProveedor.fr3 b/Source/Informes/1/InfPedidoProveedor.fr3 index 7677d099..204e4376 100644 --- a/Source/Informes/1/InfPedidoProveedor.fr3 +++ b/Source/Informes/1/InfPedidoProveedor.fr3 @@ -1,50 +1,50 @@ - + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + - - + + - - - - - - + + + + + + - + - - - - - + + + + + diff --git a/Source/Informes/1/InfPresupuestoCliente.fr3 b/Source/Informes/1/InfPresupuestoCliente.fr3 index 3c129f71..13dffe81 100644 --- a/Source/Informes/1/InfPresupuestoCliente.fr3 +++ b/Source/Informes/1/InfPresupuestoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -30,7 +30,7 @@ - + diff --git a/Source/Informes/1/InfReciboCliente.fr3 b/Source/Informes/1/InfReciboCliente.fr3 index e8498afa..1aee64bd 100644 --- a/Source/Informes/1/InfReciboCliente.fr3 +++ b/Source/Informes/1/InfReciboCliente.fr3 @@ -1,76 +1,76 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + diff --git a/Source/Informes/2/InfFacturaCliente.fr3 b/Source/Informes/2/InfFacturaCliente.fr3 index 6e4c46dc..dc3d25dd 100644 --- a/Source/Informes/2/InfFacturaCliente.fr3 +++ b/Source/Informes/2/InfFacturaCliente.fr3 @@ -1,18 +1,18 @@ - + - - + + - + - + @@ -24,14 +24,14 @@ - + - + - + @@ -53,20 +53,20 @@ - + - + - - + + diff --git a/Source/Informes/2/InfReciboCliente.fr3 b/Source/Informes/2/InfReciboCliente.fr3 index 136ad8d7..1898039d 100644 --- a/Source/Informes/2/InfReciboCliente.fr3 +++ b/Source/Informes/2/InfReciboCliente.fr3 @@ -1,70 +1,70 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorElegirDomiciliacion.pas b/Source/Modulos/Facturas de proveedor/Views/uEditorElegirDomiciliacion.pas index d86c4340..b645d4d0 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uEditorElegirDomiciliacion.pas +++ b/Source/Modulos/Facturas de proveedor/Views/uEditorElegirDomiciliacion.pas @@ -72,6 +72,8 @@ begin finally AController := NIL; end; + + cbCuentaBancaria.ItemIndex := 0; end; function TfEditorElegirDomiciliacion.GetCuentaBancaria: String; diff --git a/Source/Modulos/Inventario/Controller/View/uIEditorDetalleReservas.pas b/Source/Modulos/Inventario/Controller/View/uIEditorDetalleReservas.pas index 906cd1ba..4a613fb6 100644 --- a/Source/Modulos/Inventario/Controller/View/uIEditorDetalleReservas.pas +++ b/Source/Modulos/Inventario/Controller/View/uIEditorDetalleReservas.pas @@ -23,6 +23,10 @@ type function GetArticulo: IBizInventario; procedure SetArticulo(const Value: IBizInventario); property Articulo: IBizInventario read GetArticulo write SetArticulo; + + function GetIdAlmacenObra: Integer; + procedure SetIdAlmacenObra(const Value: Integer); + property IdAlmacenObra: Integer read GetIdAlmacenObra write SetIdAlmacenObra; end; diff --git a/Source/Modulos/Inventario/Controller/uInventarioController.pas b/Source/Modulos/Inventario/Controller/uInventarioController.pas index 5eee3a06..ba763008 100644 --- a/Source/Modulos/Inventario/Controller/uInventarioController.pas +++ b/Source/Modulos/Inventario/Controller/uInventarioController.pas @@ -22,7 +22,7 @@ type function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean; procedure VerTodos(AInventario: IBizInventario; const pTipoInventario: String); - procedure VerReservas(AArticulo: IBizInventario; const ATipoReservas: String); + procedure VerReservas(AArticulo: IBizInventario; const ATipoReservas: String; Const IdAlmacenObra: Integer); function BuscarTodos: IBizInventario; function BuscarTodosAlmacenes: IBizInventario; @@ -138,7 +138,7 @@ type procedure VerTodos(AInventario: IBizInventario; const pTipoInventario: String); function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean; - procedure VerReservas(AArticulo: IBizInventario; const ATipoReservas: String); + procedure VerReservas(AArticulo: IBizInventario; const ATipoReservas: String; Const IdAlmacenObra: Integer); function Guardar(AArticulos : IBizInventario; const FechaMovimiento: TDateTime; const CausaMovimiento: String; AValidar:Boolean = True): Boolean; @@ -549,7 +549,7 @@ begin end; end; -procedure TInventarioController.VerReservas(AArticulo: IBizInventario; const ATipoReservas: String); +procedure TInventarioController.VerReservas(AArticulo: IBizInventario; const ATipoReservas: String; Const IdAlmacenObra: Integer); var AEditor : IEditorDetalleReservas; begin @@ -560,6 +560,7 @@ begin try AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.TipoReservas := ATipoReservas; + AEditor.IdAlmacenObra := IdAlmacenObra; AEditor.DetalleReservas := FDataModule.GetDetalleReservas; AEditor.Articulo := AArticulo; AEditor.MultiSelect := True; @@ -1159,16 +1160,12 @@ begin if Assigned(AArticulos) then begin -{ DesconectarTabla(AArticulos.DataTable); - repeat - if (AArticulos.ID_ARTICULO < 1) then - AArticulos.Delete; - AArticulos.First; - until (AArticulos.DataTable.Locate('ID_ARTICULO', '0', []) = false); - - ConectarTabla(AArticulos.DataTable); -} - + //Eliminamos todos los articulos que no esten en el catalogo ya que estos no se podrn reservar + repeat + if (AArticulos.ID_ARTICULO < 1) then + AArticulos.Delete; + AArticulos.First; + until (AArticulos.DataTable.Locate('ID_ARTICULO', '0', []) = false); //Deshabilitamos el calculo de ID (RECID) para poderlo usar para la insercin de movimientos AArticulos.DataTable.OnCalcFields := DeshabilitarOnCalcFields; diff --git a/Source/Modulos/Inventario/Views/uEditorDetalleReservas.dfm b/Source/Modulos/Inventario/Views/uEditorDetalleReservas.dfm index 2fbf8365..671cc624 100644 --- a/Source/Modulos/Inventario/Views/uEditorDetalleReservas.dfm +++ b/Source/Modulos/Inventario/Views/uEditorDetalleReservas.dfm @@ -42,7 +42,7 @@ inherited fEditorDetalleReservas: TfEditorDetalleReservas Width = 669 ExplicitWidth = 669 inherited tbxMain: TTBXToolbar - ExplicitWidth = 606 + ExplicitWidth = 501 object TBXSeparatorItem84: TTBXSeparatorItem [6] end object TBXItem54: TTBXItem [7] @@ -174,8 +174,8 @@ inherited fEditorDetalleReservas: TfEditorDetalleReservas StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 273 - Width = 273 + ExplicitWidth = 510 + Width = 510 end inherited edtFechaIniFiltro: TcxDateEdit Style.LookAndFeel.SkinName = '' diff --git a/Source/Modulos/Inventario/Views/uEditorDetalleReservas.pas b/Source/Modulos/Inventario/Views/uEditorDetalleReservas.pas index 1a5c49aa..afe0ef57 100644 --- a/Source/Modulos/Inventario/Views/uEditorDetalleReservas.pas +++ b/Source/Modulos/Inventario/Views/uEditorDetalleReservas.pas @@ -32,9 +32,12 @@ type function Seleccionar(Descripcion: String; TipoSeleccion: TEnumSeleccion): Variant; function DarIDAlmacenSeleccionado(Descripcion: String): Integer; function DarIDObraSeleccionada(Descripcion: String): Integer; + function GetIdAlmacenObra: Integer; + procedure SetIdAlmacenObra(const Value: Integer); protected FTipoReservas: String; + FIdAlmacenObra: Integer; FArticulo: IBizInventario; FDetalleReservas: IBizDetalleReservas; FController : IInventarioController; @@ -60,6 +63,7 @@ type property DetalleReservas: IBizDetalleReservas read GetDetalleReservas write SetDetalleReservas; property Controller : IInventarioController read GetController write SetController; property TipoReservas: String read GetTipoReservas write SetTipoReservas; + property IdAlmacenObra: Integer read GetIdAlmacenObra write SetIdAlmacenObra; // property ArticulosSeleccionados: IBizDetalleReservas read GetArticulosSeleccionados; // property MultiSelect : Boolean read GetMultiSelect write SetMultiSelect; @@ -210,6 +214,11 @@ function TfEditorDetalleReservas.GetDetalleReservas: IBizDetalleReservas; begin Result := FDetalleReservas; end; +function TfEditorDetalleReservas.GetIdAlmacenObra: Integer; +begin + Result := FIdAlmacenObra; +end; + function TfEditorDetalleReservas.GetTipoReservas: String; begin Result := FTipoReservas; @@ -362,6 +371,13 @@ begin if Assigned(ViewGrid) then (ViewGrid as IViewDetalleReservas).DetalleReservas := FDetalleReservas; end; +procedure TfEditorDetalleReservas.SetIdAlmacenObra(const Value: Integer); +begin + FIdAlmacenObra := Value; + if assigned (ViewGrid) then + (ViewGrid as IViewDetalleReservas).IdAlmacenObra := IdAlmacenObra; +end; + procedure TfEditorDetalleReservas.SetTipoReservas(const Value: String); begin FTipoReservas := Value; @@ -389,4 +405,3 @@ end; } end. - \ No newline at end of file diff --git a/Source/Modulos/Inventario/Views/uEditorInventario.pas b/Source/Modulos/Inventario/Views/uEditorInventario.pas index b90ab375..d304b7fb 100644 --- a/Source/Modulos/Inventario/Views/uEditorInventario.pas +++ b/Source/Modulos/Inventario/Views/uEditorInventario.pas @@ -185,7 +185,7 @@ end; procedure TfEditorInventario.actReservadosExecute(Sender: TObject); begin inherited; - FController.VerReservas(Inventario, TipoInventario); + FController.VerReservas(Inventario, TipoInventario, (ViewGrid as IViewInventario).DarIDAlmacenObraSeleccionada); RefrescarInterno; end; diff --git a/Source/Modulos/Inventario/Views/uViewDetalleReservas.pas b/Source/Modulos/Inventario/Views/uViewDetalleReservas.pas index 9bc4c31f..9a32a369 100644 --- a/Source/Modulos/Inventario/Views/uViewDetalleReservas.pas +++ b/Source/Modulos/Inventario/Views/uViewDetalleReservas.pas @@ -16,7 +16,7 @@ uses uBizInventario, uBizAlmacenes, cxSpinEdit, uViewFiltroBase, TB2Item, TBX, TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, cxCurrencyEdit, uAlmacenesController, uDAInterfaces, cxContainer, cxMaskEdit, cxDropDownEdit; - + type IViewDetalleReservas = interface(IViewGrid) ['{4417F53A-5BB1-4B99-8760-4C0E1D449582}'] @@ -31,6 +31,9 @@ type property Obras: TStringList read GetObras write SetObras; function DarIDAlmacenObraSeleccionada: Variant; function ListaAlmacenesObrasVacia: Boolean; + function GetIdAlmacenObra: Integer; + procedure SetAlmacenObra(const Value: Integer); + property IdAlmacenObra: Integer read GetIdAlmacenObra write SetAlmacenObra; end; TfrViewDetalleReservas = class(TfrViewGrid, IViewDetalleReservas) @@ -66,10 +69,13 @@ type procedure AnadirFiltroAlmacenesObras; protected + FIdAlmacenObra: Integer; FAlmacenes: TStringList; FObras: TStringList; FDetalleReservas: IBizDetalleReservas; + function GetIdAlmacenObra: Integer; + procedure SetAlmacenObra(const Value: Integer); function GetAlmacenes: TStringList; procedure SetAlmacenes(const Value: TStringList); function GetObras: TStringList; @@ -84,6 +90,7 @@ type public + property IdAlmacenObra: Integer read GetIdAlmacenObra write SetAlmacenObra; property DetalleReservas: IBizDetalleReservas read GetDetalleReservas write SetDetalleReservas; procedure AnadirOtrosFiltros; override; @@ -91,10 +98,6 @@ type destructor Destroy; override; - - - - function DarIDAlmacenObraSeleccionada: Variant; function ListaAlmacenesObrasVacia: Boolean; @@ -137,13 +140,33 @@ begin end; procedure TfrViewDetalleReservas.CustomViewShow(Sender: TObject); +var + i: Integer; + begin inherited; - if Assigned(FAlmacenes) or Assigned(FObras) then - cxListaAlmacenesObras.ItemIndex := 0 - //En el caso de ser la vista para la seleccin de articulos de un determinado almacn + + //INV_ALMACENES + if Assigned(FAlmacenes) then + begin + i := 0; + while (i < FAlmacenes.Count) and (FAlmacenes.ValueFromIndex[i] <> IntToStr(IdAlmacenObra)) do + Inc(i); + if (FAlmacenes.ValueFromIndex[i] = IntToStr(IdAlmacenObra)) then + cxListaAlmacenesObras.ItemIndex := i + end + //INV_OBRAS + else if Assigned(FObras) then + begin + i := 0; + while (i < FObras.Count) and (FObras.ValueFromIndex[i] <> IntToStr(IdAlmacenObra)) do + Inc(i); + if (FObras.ValueFromIndex[i] = IntToStr(IdAlmacenObra)) then + cxListaAlmacenesObras.ItemIndex := i + end else - pnlAlmacenes.Visible:= False; + //En el caso de ser la vista para la seleccin de articulos de un determinado almacn + pnlAlmacenes.Visible:= False; end; procedure TfrViewDetalleReservas.cxGridViewStylesGetContentStyle(Sender: @@ -206,6 +229,11 @@ begin Result := FDetalleReservas; end; +function TfrViewDetalleReservas.GetIdAlmacenObra: Integer; +begin + Result := FIDAlmacenObra; +end; + function TfrViewDetalleReservas.GetObras: TStringList; begin Result := FObras; @@ -246,6 +274,11 @@ begin end; end; +procedure TfrViewDetalleReservas.SetAlmacenObra(const Value: Integer); +begin + FIDAlmacenObra := Value; +end; + procedure TfrViewDetalleReservas.SetDetalleReservas(const Value: IBizDetalleReservas); begin FDetalleReservas := Value; diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm index 145836f0..f41ef537 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm @@ -170,33 +170,30 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente Width = 285 end inherited edtFechaFinFiltro: TcxDateEdit - Left = 308 + Left = 295 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 308 + ExplicitLeft = 295 ExplicitWidth = 504 Width = 504 end inherited eLista: TcxComboBox - Left = 733 + Left = 757 Properties.OnChange = nil Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 733 + ExplicitLeft = 757 + ExplicitWidth = 215 + Width = 215 end inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited dxLayoutControl1Group1: TdxLayoutGroup - inherited dxLayoutControl1Item2: TdxLayoutItem - AlignHorz = ahClient - end - inherited dxLayoutControl1Item3: TdxLayoutItem - AlignHorz = ahClient - end inherited dxLayoutControl1Item4: TdxLayoutItem + Caption = 'Con/Sin Factura:' Visible = True end end diff --git a/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uGenerarAlbaranesProvUtils.pas b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uGenerarAlbaranesProvUtils.pas index 3031a41e..4d1bce0f 100644 --- a/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uGenerarAlbaranesProvUtils.pas +++ b/Source/Modulos/Relaciones/Pedidos de proveedor - Albaranes de proveedor/uGenerarAlbaranesProvUtils.pas @@ -324,7 +324,7 @@ begin AAlbaranesProveedorController.Guardar(AAlbaran); AAlbaranesProveedorController.Ver(AAlbaran); - //Si el pedido tiene obra de relacionada y el destino del pedido no es esa obra, preguntamos si quiere reservar de los materiales para esa obra + //Si el pedido tiene obra relacionada y el destino del pedido no es esa obra, preguntamos si quiere reservar de los materiales para esa obra if (APedido.ID_OBRA > 0) and (APedido.ID_OBRA <> APedido.ID_ALMACEN) then begin