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