Se cambia para que multiempresa sea una variable de compilacion
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@493 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
fb65b1f505
commit
9ba0a9bbf4
@ -188,6 +188,7 @@ var
|
||||
AppFactuGES : IAppFactuGES;
|
||||
|
||||
implementation
|
||||
{$INCLUDE ..\FactuGES.inc}
|
||||
|
||||
uses
|
||||
Windows, Dialogs, JSDialog, JSDialogs, uDialogUtils, cxControls, uUsuariosViewRegister, uDMBase,
|
||||
@ -520,9 +521,13 @@ begin
|
||||
end;
|
||||
AEmpresas.DataTable.First;
|
||||
|
||||
{$IFDEF MULTIEMPRESA}
|
||||
if JsDialog.Execute <> IDCANCEL then
|
||||
if JsDialog.CustomButtonResult > 0 then
|
||||
CambiarEmpresa(JsDialog.CustomButtonResult);
|
||||
{$ELSE}
|
||||
CambiarEmpresa(AEmpresas.ID);
|
||||
{$ENDIF}
|
||||
|
||||
finally
|
||||
FreeAndNIL(JsDialog);
|
||||
|
||||
@ -42,6 +42,7 @@ var
|
||||
NavPaneController : TNavPaneController;
|
||||
|
||||
implementation
|
||||
{$INCLUDE ..\FactuGES.inc}
|
||||
|
||||
uses
|
||||
Dialogs, uModuleController, uAcercaDe, uNavPaneUtils,
|
||||
@ -112,6 +113,7 @@ var
|
||||
begin
|
||||
AListaSecciones := TStringList.Create;
|
||||
AListaSecciones.Duplicates := dupIgnore;
|
||||
AEmpresasCount := 0;
|
||||
|
||||
try
|
||||
// Guardar la lista de secciones (Ventas, Compras, etc...)
|
||||
@ -128,10 +130,14 @@ begin
|
||||
AEmpresas := AppFactuGES.EmpresasController.BuscarTodos;
|
||||
try
|
||||
AEmpresas.DataTable.Active := True;
|
||||
|
||||
{$IFDEF MULTIEMPRESA}
|
||||
while not AEmpresas.DataTable.EOF do
|
||||
begin
|
||||
ASeccionPadre := NIL;
|
||||
AIndex := -1;
|
||||
{$ENDIF}
|
||||
|
||||
// ASeccionPadre := NIL;
|
||||
// AIndex := -1;
|
||||
|
||||
// Buscar la página si existe
|
||||
AIndex := EncontrarPagina(FNavigationPane, AEmpresas.NOMBRE);
|
||||
@ -166,15 +172,17 @@ begin
|
||||
ASeccion.Height := ASeccion.Height + ADivisor.Height;
|
||||
end;
|
||||
|
||||
{$IFDEF MULTIEMPRESA}
|
||||
AEmpresas.DataTable.Next;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
AEmpresas.DataTable.Active := False;
|
||||
finally
|
||||
AEmpresas := NIL;
|
||||
end;
|
||||
finally
|
||||
AListaSecciones.Free;
|
||||
AListaSecciones := NIL;
|
||||
FreeAndNIL(AListaSecciones);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -150,6 +150,7 @@ var
|
||||
fPantallaPrincipal: TfPantallaPrincipal;
|
||||
|
||||
implementation
|
||||
{$INCLUDE ..\FactuGES.inc}
|
||||
|
||||
uses
|
||||
uSplash, uAcercaDe, UxTheme, Themes, uMenuUtils, uBizEmpresas,
|
||||
@ -501,6 +502,13 @@ end;
|
||||
constructor TfPantallaPrincipal.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
{$IFDEF MULTIEMPRESA}
|
||||
//
|
||||
{$ELSE}
|
||||
Listadeempresas1_OLD.Destroy;
|
||||
{$ENDIF}
|
||||
|
||||
FContenido := NIL;
|
||||
|
||||
with AppFactuGES.ModuleManager do
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
{$DEFINE MULTIEMPRESA}
|
||||
{DEFINE ALMACEN}
|
||||
{DEFINE PEDIDOSPROVEEDOR}
|
||||
{$DEFINE CONTABILIDAD}
|
||||
Loading…
Reference in New Issue
Block a user