From 4403c962a40f780c77324bcb619160717ff02864 Mon Sep 17 00:00:00 2001 From: roberto Date: Tue, 24 Aug 2010 17:29:18 +0000 Subject: [PATCH] Se adapta la vista de inventario para que seleccione por defecto el almacen por defecto de la empresa activa git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@1022 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- .../Modulos/Inventario/Views/uViewInventario.dfm | 4 ---- .../Modulos/Inventario/Views/uViewInventario.pas | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Source/Modulos/Inventario/Views/uViewInventario.dfm b/Source/Modulos/Inventario/Views/uViewInventario.dfm index 75dd435c..c825be36 100644 --- a/Source/Modulos/Inventario/Views/uViewInventario.dfm +++ b/Source/Modulos/Inventario/Views/uViewInventario.dfm @@ -182,8 +182,6 @@ inherited frViewInventario: TfrViewInventario StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 510 - Width = 510 end inherited edtFechaIniFiltro: TcxDateEdit Style.LookAndFeel.SkinName = '' @@ -202,8 +200,6 @@ inherited frViewInventario: TfrViewInventario StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 215 - Width = 215 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel diff --git a/Source/Modulos/Inventario/Views/uViewInventario.pas b/Source/Modulos/Inventario/Views/uViewInventario.pas index 62609993..76ef6675 100644 --- a/Source/Modulos/Inventario/Views/uViewInventario.pas +++ b/Source/Modulos/Inventario/Views/uViewInventario.pas @@ -15,7 +15,7 @@ uses cxButtonEdit, cxGridCustomPopupMenu, cxGridPopupMenu, uViewGrid, uBizInventario, cxSpinEdit, uViewFiltroBase, TB2Item, TBX, TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, cxCurrencyEdit, uDAInterfaces, - cxContainer, cxMaskEdit, cxDropDownEdit; + cxContainer, cxMaskEdit, cxDropDownEdit, uCustomView, uViewBase; // uBizAlmacenes, uBizObras; type @@ -89,7 +89,7 @@ type implementation {$R *.dfm} -uses uDataModuleInventario, schInventarioClient_Intf, uReferenciasUtils, cxVariants; +uses uFactuGES_App, uDataModuleInventario, schInventarioClient_Intf, uReferenciasUtils, cxVariants; procedure TfrViewInventario.AnadirFiltroAlmacenesObras; var @@ -123,10 +123,19 @@ begin end; procedure TfrViewInventario.CustomViewShow(Sender: TObject); +var + i, Aindex: integer; begin inherited; if Assigned(FAlmacenes) or Assigned(FObras) then - cxListaAlmacenesObras.ItemIndex := 0 + begin + for i := 0 to FAlmacenes.Count - 1 do + begin + if (FAlmacenes.ValueFromIndex[i] = IntToStr(AppFactuGES.EmpresaActiva.ID_ALMACEN)) then + Aindex := i; + end; + cxListaAlmacenesObras.ItemIndex := Aindex; + end //En el caso de ser la vista para la selección de articulos de un determinado almacén else pnlAlmacenes.Visible:= False;