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
This commit is contained in:
roberto 2010-08-24 17:29:18 +00:00
parent c1e3d5faaf
commit 4403c962a4
2 changed files with 12 additions and 7 deletions

View File

@ -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

View File

@ -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;