Se establecen pribilegios por empresa, modulo y apartado
git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoArmarios_FactuGES/trunk@53 0a814768-cfdd-9c42-8d01-223fcc10da9d
This commit is contained in:
parent
a0551072ec
commit
de74a296a4
@ -827,16 +827,19 @@ object frBarraClientes: TfrBarraClientes
|
||||
Caption = 'Clientes'
|
||||
ImageIndex = 0
|
||||
OnExecute = actClientesExecute
|
||||
OnUpdate = actClientesUpdate
|
||||
end
|
||||
object actPresupuestos: TAction
|
||||
Caption = 'Presupuestos de clientes'
|
||||
ImageIndex = 1
|
||||
OnExecute = actPresupuestosExecute
|
||||
OnUpdate = actPresupuestosUpdate
|
||||
end
|
||||
object actContratos: TAction
|
||||
Caption = 'Contratos de clientes'
|
||||
ImageIndex = 2
|
||||
OnExecute = actContratosExecute
|
||||
OnUpdate = actContratosUpdate
|
||||
end
|
||||
object actObras: TAction
|
||||
Caption = 'Obras de clientes'
|
||||
@ -846,20 +849,24 @@ object frBarraClientes: TfrBarraClientes
|
||||
Caption = 'Facturas de clientes'
|
||||
ImageIndex = 2
|
||||
OnExecute = actFacturasExecute
|
||||
OnUpdate = actFacturasUpdate
|
||||
end
|
||||
object actPagos: TAction
|
||||
Caption = 'Cobros de cliente'
|
||||
ImageIndex = 3
|
||||
OnExecute = actPagosExecute
|
||||
OnUpdate = actPagosUpdate
|
||||
end
|
||||
object actFacturasP: TAction
|
||||
Caption = 'Facturas proforma'
|
||||
ImageIndex = 2
|
||||
OnExecute = actFacturasPExecute
|
||||
OnUpdate = actFacturasPUpdate
|
||||
end
|
||||
object actAlbaranes: TAction
|
||||
Caption = 'Albaranes de cliente'
|
||||
OnExecute = actAlbaranesExecute
|
||||
OnUpdate = actAlbaranesUpdate
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -63,6 +63,13 @@ type
|
||||
procedure actContratosExecute(Sender: TObject);
|
||||
procedure actObrasExecute(Sender: TObject);
|
||||
procedure actAlbaranesExecute(Sender: TObject);
|
||||
procedure actClientesUpdate(Sender: TObject);
|
||||
procedure actPresupuestosUpdate(Sender: TObject);
|
||||
procedure actContratosUpdate(Sender: TObject);
|
||||
procedure actFacturasUpdate(Sender: TObject);
|
||||
procedure actPagosUpdate(Sender: TObject);
|
||||
procedure actFacturasPUpdate(Sender: TObject);
|
||||
procedure actAlbaranesUpdate(Sender: TObject);
|
||||
public
|
||||
constructor Create (AOwner: TComponent); override;
|
||||
end;
|
||||
@ -73,7 +80,7 @@ var
|
||||
implementation
|
||||
{$R *.DFM}
|
||||
uses
|
||||
Principal, Clientes, PresupuestosClientes, FacturasClientes, PagosClientes,
|
||||
RdxEmpresaActiva, Literales, Principal, Clientes, PresupuestosClientes, FacturasClientes, PagosClientes,
|
||||
InformeTrimestral, Entidades, FacturasProforma, ContratosClientes, Configuracion,
|
||||
AlbaranesClientes;
|
||||
|
||||
@ -125,4 +132,81 @@ begin
|
||||
Contenido := TfrAlbaranesClientes.Create(Self);
|
||||
end;
|
||||
|
||||
procedure TfrBarraClientes.actClientesUpdate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited;
|
||||
if (EmpresaActiva.Restricciones.Count > 0) then
|
||||
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_CLIENTES, i)
|
||||
else
|
||||
(Sender as TAction).Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TfrBarraClientes.actPresupuestosUpdate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited;
|
||||
if (EmpresaActiva.Restricciones.Count > 0) then
|
||||
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_PRESUPUESTOS, i)
|
||||
else
|
||||
(Sender as TAction).Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TfrBarraClientes.actContratosUpdate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited;
|
||||
if (EmpresaActiva.Restricciones.Count > 0) then
|
||||
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_CONTRATOS, i)
|
||||
else
|
||||
(Sender as TAction).Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TfrBarraClientes.actFacturasUpdate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited;
|
||||
if (EmpresaActiva.Restricciones.Count > 0) then
|
||||
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_FACTURAS_CLIENTE, i)
|
||||
else
|
||||
(Sender as TAction).Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TfrBarraClientes.actPagosUpdate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited;
|
||||
if (EmpresaActiva.Restricciones.Count > 0) then
|
||||
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_PAGOS_CLIENTE, i)
|
||||
else
|
||||
(Sender as TAction).Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TfrBarraClientes.actFacturasPUpdate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited;
|
||||
if (EmpresaActiva.Restricciones.Count > 0) then
|
||||
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_FACTURAS_PROFORMA, i)
|
||||
else
|
||||
(Sender as TAction).Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TfrBarraClientes.actAlbaranesUpdate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited;
|
||||
if (EmpresaActiva.Restricciones.Count > 0) then
|
||||
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_ALBARANES, i)
|
||||
else
|
||||
(Sender as TAction).Enabled := True;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
85
Factuges.dsk
85
Factuges.dsk
@ -1,31 +1,40 @@
|
||||
[Closed Files]
|
||||
File_0=SourceModule,'c:\archivos de programa\borland\delphi7\source\rtl\common\ComObj.pas',0,1,1259,1,1269,0,0
|
||||
File_1=SourceModule,'c:\archivos de programa\borland\delphi7\source\vcl\DB.pas',0,1,2340,1,2350,0,0
|
||||
File_2=SourceModule,'c:\archivos de programa\borland\delphi7\source\vcl\IB.pas',0,1,403,1,411,0,0
|
||||
File_3=SourceModule,'C:\Codigo\Informes\InformePresupuestoCliente.pas',0,1,1,1,1,1,0
|
||||
File_4=SourceModule,'C:\Codigo Abeto\Clientes\FacturaCliente.pas',0,1,334,63,344,0,0
|
||||
File_5=SourceModule,'C:\Codigo Abeto\Libreria\Constantes.pas',0,1,42,24,55,0,0
|
||||
File_6=SourceModule,'C:\Codigo Abeto\Proveedores\FacturaProveedor.pas',0,1,272,38,285,1,0
|
||||
File_7=SourceModule,'C:\Codigo Abeto\Informes\InformeTrimestralCompras.pas',0,1,140,65,150,0,0
|
||||
File_8=SourceModule,'C:\Codigo Abeto\Informes\InformeResumenFacturacionProveedores.pas',0,1,75,34,91,0,0
|
||||
File_0=SourceModule,'C:\Codigo\Empresas\ElegirEmpresa.pas',0,1,86,70,102,1,0
|
||||
File_1=SourceModule,'C:\Codigo\BaseDatos\TablaEmpresas.pas',0,1,187,96,200,1,0
|
||||
File_2=SourceModule,'c:\archivos de programa\borland\delphi7\source\rtl\common\ComObj.pas',0,1,1259,1,1269,0,0
|
||||
File_3=SourceModule,'c:\archivos de programa\borland\delphi7\source\vcl\DB.pas',0,1,2340,1,2350,0,0
|
||||
File_4=SourceModule,'c:\archivos de programa\borland\delphi7\source\vcl\IB.pas',0,1,403,1,411,0,0
|
||||
File_5=SourceModule,'C:\Codigo\Informes\InformePresupuestoCliente.pas',0,1,1,1,1,1,0
|
||||
File_6=SourceModule,'C:\Codigo Abeto\Clientes\FacturaCliente.pas',0,1,334,63,344,0,0
|
||||
File_7=SourceModule,'C:\Codigo Abeto\Libreria\Constantes.pas',0,1,42,24,55,0,0
|
||||
File_8=SourceModule,'C:\Codigo Abeto\Proveedores\FacturaProveedor.pas',0,1,272,38,285,1,0
|
||||
File_9=SourceModule,'C:\Codigo Abeto\Informes\InformeTrimestralCompras.pas',0,1,140,65,150,0,0
|
||||
|
||||
[Modules]
|
||||
Module0=C:\Codigo\Empresas\ElegirEmpresa.pas
|
||||
Module1=C:\Codigo\BaseDatos\TablaEmpresas.pas
|
||||
Count=2
|
||||
Module0=C:\Codigo\Libreria\Literales.pas
|
||||
Module1=C:\Codigo\Clientes\BarraClientes.pas
|
||||
Module2=C:\Codigo\Proveedores\BarraProveedores.pas
|
||||
Module3=C:\Codigo\Principal.pas
|
||||
Count=4
|
||||
EditWindowCount=1
|
||||
|
||||
[C:\Codigo\Empresas\ElegirEmpresa.pas]
|
||||
[C:\Codigo\Libreria\Literales.pas]
|
||||
ModuleType=SourceModule
|
||||
FormState=0
|
||||
FormOnTop=0
|
||||
|
||||
[C:\Codigo\Clientes\BarraClientes.pas]
|
||||
ModuleType=SourceModule
|
||||
FormState=1
|
||||
FormOnTop=0
|
||||
|
||||
[C:\Codigo\BaseDatos\TablaEmpresas.pas]
|
||||
[C:\Codigo\Proveedores\BarraProveedores.pas]
|
||||
ModuleType=SourceModule
|
||||
FormState=1
|
||||
FormOnTop=0
|
||||
|
||||
[C:\Codigo\Factuges.dpr]
|
||||
[C:\Codigo\Principal.pas]
|
||||
ModuleType=SourceModule
|
||||
FormState=0
|
||||
FormOnTop=0
|
||||
|
||||
@ -33,11 +42,21 @@ FormOnTop=0
|
||||
FormState=0
|
||||
FormOnTop=0
|
||||
|
||||
[C:\Codigo\Factuges.dpr]
|
||||
FormState=0
|
||||
FormOnTop=0
|
||||
|
||||
[C:\Codigo\Frames\RdxFrame.pas]
|
||||
FormState=0
|
||||
FormOnTop=0
|
||||
|
||||
[EditWindow0]
|
||||
ViewCount=2
|
||||
CurrentView=0
|
||||
ViewCount=4
|
||||
CurrentView=2
|
||||
View0=0
|
||||
View1=1
|
||||
View2=2
|
||||
View3=3
|
||||
CodeExplorer=CodeExplorer@EditWindow0
|
||||
MessageView=MessageView@EditWindow0
|
||||
Create=1
|
||||
@ -60,17 +79,31 @@ BottomPanelClients=MessageView@EditWindow0
|
||||
BottomPanelData=000004000000000000000000000000000000000000000000000100000000000000000B0000004D65737361676556696577FFFFFFFF
|
||||
|
||||
[View0]
|
||||
Module=C:\Codigo\Empresas\ElegirEmpresa.pas
|
||||
CursorX=70
|
||||
CursorY=102
|
||||
TopLine=86
|
||||
Module=C:\Codigo\Proveedores\BarraProveedores.pas
|
||||
CursorX=19
|
||||
CursorY=65
|
||||
TopLine=54
|
||||
LeftCol=1
|
||||
|
||||
[View1]
|
||||
Module=C:\Codigo\BaseDatos\TablaEmpresas.pas
|
||||
CursorX=96
|
||||
CursorY=200
|
||||
TopLine=187
|
||||
Module=C:\Codigo\Clientes\BarraClientes.pas
|
||||
CursorX=86
|
||||
CursorY=141
|
||||
TopLine=131
|
||||
LeftCol=1
|
||||
|
||||
[View2]
|
||||
Module=C:\Codigo\Libreria\Literales.pas
|
||||
CursorX=19
|
||||
CursorY=41
|
||||
TopLine=22
|
||||
LeftCol=1
|
||||
|
||||
[View3]
|
||||
Module=C:\Codigo\Principal.pas
|
||||
CursorX=74
|
||||
CursorY=360
|
||||
TopLine=356
|
||||
LeftCol=1
|
||||
|
||||
[Watches]
|
||||
@ -197,7 +230,7 @@ LRDockWidth=317
|
||||
Dockable=1
|
||||
SplitPos=201
|
||||
ArrangeBy=Name
|
||||
SelectedItem=Name
|
||||
SelectedItem=OnUpdate
|
||||
ExpandedItems=ActiveTranslateStringEngine,Anchors,AppStorage,BevelEdges,Brush,Constraints,DataBinding,DataController,DataController.Filter,DataController.Options,DataController.Summary,DataController.Summary.Options,Filtering,HTTPOptions,LookAndFeel.AssignedValues,NavigatorButtons.Cancel,NavigatorButtons.Delete,NavigatorButtons.Edit,Options,OptionsBehavior,OptionsData,OptionsSelection,OptionsView,Preview,Properties,Properties.Alignment,Properties.SpinButtons,StorageOptions,Style,Styles,VertScrollBar
|
||||
HiddenCategories=
|
||||
|
||||
|
||||
@ -26,9 +26,18 @@ unit Literales;
|
||||
interface
|
||||
|
||||
const
|
||||
CTE_COMPRAS = 'COMPRAS';
|
||||
CTE_PROVEEDORES = 'PROVEEDORES';
|
||||
CTE_FACTURAS_PROVEEDOR = 'FACTURAS_PROVEEDOR';
|
||||
CTE_PAGOS_PROVEEDOR = 'PAGOS_PROVEEDOR';
|
||||
CTE_VENTAS = 'VENTAS';
|
||||
CTE_CLIENTES = 'CLIENTES';
|
||||
CTE_PRESUPUESTOS = 'PRESUPUESTOS';
|
||||
CTE_CONTRATOS = 'CONTRATOS';
|
||||
CTE_ALBARANES = 'ALBARANES';
|
||||
CTE_FACTURAS_CLIENTE = 'FACTURAS_CLIENTE';
|
||||
CTE_PAGOS_CLIENTE = 'PAGOS_CLIENTE';
|
||||
CTE_FACTURAS_PROFORMA = 'FACTURAS_PROFORMA';
|
||||
CTE_CONTABILIDAD = 'CONTABILIDAD';
|
||||
CTE_INFORMES = 'INFORMES';
|
||||
CTE_INFORMES_CONLOGO = 'INFORMES_SIEMPRE_CONLOGO';
|
||||
|
||||
@ -623,6 +623,7 @@ object frBarraProveedores: TfrBarraProveedores
|
||||
Caption = 'Proveedores'
|
||||
ImageIndex = 0
|
||||
OnExecute = actProveedoresExecute
|
||||
OnUpdate = actProveedoresUpdate
|
||||
end
|
||||
object actFacturas: TAction
|
||||
Caption = 'Facturas de proveedores'
|
||||
|
||||
@ -51,6 +51,7 @@ type
|
||||
procedure actPagosExecute(Sender: TObject);
|
||||
procedure actFacturasUpdate(Sender: TObject);
|
||||
procedure actPagosUpdate(Sender: TObject);
|
||||
procedure actProveedoresUpdate(Sender: TObject);
|
||||
public
|
||||
constructor Create (AOwner: TComponent); override;
|
||||
end;
|
||||
@ -109,4 +110,15 @@ begin
|
||||
(Sender as TAction).Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TfrBarraProveedores.actProveedoresUpdate(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited;
|
||||
if (EmpresaActiva.Restricciones.Count > 0) then
|
||||
(Sender as TAction).Enabled := not EmpresaActiva.Restricciones.Find(CTE_PROVEEDORES, i)
|
||||
else
|
||||
(Sender as TAction).Enabled := True;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
Binary file not shown.
BIN
bd/ABETO.GDB
BIN
bd/ABETO.GDB
Binary file not shown.
Reference in New Issue
Block a user