Se adapta el programa para que el usuario fabrica siempre saque los informes con logotipo y en tienda se pregunte

git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoArmarios_FactuGES/trunk@40 0a814768-cfdd-9c42-8d01-223fcc10da9d
This commit is contained in:
roberto 2009-11-11 15:22:19 +00:00
parent 52897f3f9b
commit 668f6b1fe6
12 changed files with 75 additions and 61 deletions

View File

@ -279,6 +279,8 @@ begin
Codigo := CodigoEmpresa; Codigo := CodigoEmpresa;
// Recuperar las restricciones de la empresa para el usuario logado // Recuperar las restricciones de la empresa para el usuario logado
FRestricciones := TStringList.Create; FRestricciones := TStringList.Create;
FRestricciones.Sorted := true;
ObtenerRestricciones; ObtenerRestricciones;
// Recuperar los datos de la empresa // Recuperar los datos de la empresa
ObtenerDatos; ObtenerDatos;
@ -289,6 +291,7 @@ begin
inherited Create; inherited Create;
FDirecciones := TListaDireccionesEmpresa.Create(Codigo); FDirecciones := TListaDireccionesEmpresa.Create(Codigo);
FRestricciones := TStringList.Create; FRestricciones := TStringList.Create;
FRestricciones.Sorted := true;
end; end;
destructor TDatosEmpresa.Destroy; destructor TDatosEmpresa.Destroy;

View File

@ -1,18 +1,18 @@
[Closed Files] [Closed Files]
File_0=SourceModule,'C:\Codigo Abeto\Clientes\ImprimirPresupuestosCliente.pas',0,1,61,50,8,1,0 File_0=SourceModule,'C:\Codigo Abeto\Libreria\Literales.pas',0,1,10,51,34,0,0
File_1=SourceModule,'C:\Codigo Abeto\BaseDatos\TablaEmpresas.pas',0,1,75,14,54,0,0 File_1=SourceModule,'c:\archivos de programa\borland\delphi7\source\rtl\common\ComObj.pas',0,1,1256,1,1269,0,0
File_2=SourceModule,'C:\Codigo Abeto\Empresas\Empresa.pas',0,1,823,56,847,1,0 File_2=SourceModule,'C:\Codigo Abeto\Informes\InformeBase.pas',0,1,46,15,46,1,0
File_3=SourceModule,'C:\Codigo Abeto\Informes\InformeBaseFR3.pas',0,1,65,28,79,0,0 File_3=SourceModule,'C:\Codigo Abeto\Informes\InformeFacturaCliente.pas',0,1,31,1,43,0,0
File_4=SourceModule,'C:\Codigo Abeto\Informes\InformePagoCliente.pas',0,1,84,37,98,0,0 File_4=SourceModule,'C:\Codigo Abeto\Informes\InformePresupuestoCliente.pas',0,1,43,1,56,1,0
File_5=SourceModule,'C:\Codigo Abeto\BaseDatos\TablaFacturasCliente.pas',0,1,1873,1,1899,0,0 File_5=SourceModule,'C:\Codigo Abeto\Principal.pas',0,1,363,2,385,1,0
File_6=SourceModule,'C:\Codigo Abeto\BaseDatos\BaseDatos.pas',0,1,163,14,171,0,0 File_6=SourceModule,'C:\Codigo Abeto\Libreria\RdxEmpresaActiva.pas',0,1,1,1,1,0,0
File_7=SourceModule,'C:\Codigo Abeto\Libreria\RdxEmpresaActiva.pas',0,1,203,61,206,0,0 File_7=SourceModule,'C:\Codigo Abeto\BaseDatos\TablaEmpresas.pas',0,1,379,1,390,0,0
File_8=SourceModule,'C:\Codigo Abeto\Proveedores\BarraProveedores.pas',0,1,1,23,65,1,0 File_8=SourceModule,'C:\Codigo Abeto\Informes\InformeAlbaranCliente.pas',0,1,51,38,68,0,0
File_9=SourceModule,'C:\Codigo Abeto\Informes\InformeContratoCliente.pas',0,1,45,1,58,0,0
[Modules] [Modules]
Module0=C:\Codigo Abeto\Factuges.dpr Module0=C:\Codigo Abeto\Factuges.dpr
Module1=C:\Codigo Abeto\Informes\InformePresupuestoCliente.pas Count=1
Count=2
EditWindowCount=1 EditWindowCount=1
[C:\Codigo Abeto\Factuges.dpr] [C:\Codigo Abeto\Factuges.dpr]
@ -20,24 +20,18 @@ ModuleType=SourceModule
FormState=0 FormState=0
FormOnTop=0 FormOnTop=0
[C:\Codigo Abeto\Informes\InformePresupuestoCliente.pas]
ModuleType=SourceModule
FormState=1
FormOnTop=0
[C:\Archivos de programa\Borland\Delphi7\Projects\ProjectGroup1.bpg] [C:\Archivos de programa\Borland\Delphi7\Projects\ProjectGroup1.bpg]
FormState=0 FormState=0
FormOnTop=0 FormOnTop=0
[C:\Codigo Abeto\Informes\InformeBase.pas] [C:\Codigo Abeto\Frames\RdxFrame.pas]
FormState=0 FormState=0
FormOnTop=0 FormOnTop=0
[EditWindow0] [EditWindow0]
ViewCount=2 ViewCount=1
CurrentView=0 CurrentView=0
View0=0 View0=0
View1=1
CodeExplorer=CodeExplorer@EditWindow0 CodeExplorer=CodeExplorer@EditWindow0
MessageView=MessageView@EditWindow0 MessageView=MessageView@EditWindow0
Create=1 Create=1
@ -45,19 +39,19 @@ Visible=1
State=0 State=0
Left=447 Left=447
Top=139 Top=139
Width=1137 Width=1219
Height=562 Height=720
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=1129 ClientWidth=1211
ClientHeight=528 ClientHeight=686
LeftPanelSize=140 LeftPanelSize=140
LeftPanelClients=CodeExplorer@EditWindow0 LeftPanelClients=CodeExplorer@EditWindow0
LeftPanelData=000004000000000000000000000000000000000000000000000100000000000000000C000000436F64654578706C6F726572FFFFFFFF LeftPanelData=000004000000000000000000000000000000000000000000000100000000000000000C000000436F64654578706C6F726572FFFFFFFF
RightPanelSize=0 RightPanelSize=0
BottomPanelSize=0 BottomPanelSize=158
BottomPanelClients=MessageView@EditWindow0 BottomPanelClients=MessageView@EditWindow0
BottomPanelData=00000400010000000B0000004D657373616765566965770000000000000000000000000000000000FFFFFFFF BottomPanelData=000004000000000000000000000000000000000000000000000100000000000000000B0000004D65737361676556696577FFFFFFFF
[View0] [View0]
Module=C:\Codigo Abeto\Factuges.dpr Module=C:\Codigo Abeto\Factuges.dpr
@ -66,21 +60,16 @@ CursorY=1
TopLine=1 TopLine=1
LeftCol=1 LeftCol=1
[View1]
Module=C:\Codigo Abeto\Informes\InformePresupuestoCliente.pas
CursorX=1
CursorY=1
TopLine=1
LeftCol=1
[Watches] [Watches]
Count=0 Count=2
Watch0='EmpresaActiva.Restricciones.strings[1]',256,0,18,1,0,'Watches'
Watch1='EmpresaActiva.Restricciones.strings[0]',256,0,18,1,0,'Watches'
[WatchWindow] [WatchWindow]
WatchColumnWidth=100 WatchColumnWidth=235
WatchShowColumnHeaders=1 WatchShowColumnHeaders=1
Create=1 Create=1
Visible=0 Visible=1
State=0 State=0
Left=146 Left=146
Top=563 Top=563
@ -95,8 +84,7 @@ LRDockWidth=842
Dockable=1 Dockable=1
[Breakpoints] [Breakpoints]
Count=1 Count=0
Breakpoint0='C:\Codigo Abeto\BaseDatos\TablaEmpresas.pas',387,'',0,1,'',1,0,0,'',1,'','',''
[AddressBreakpoints] [AddressBreakpoints]
Count=0 Count=0
@ -195,7 +183,7 @@ LRDockWidth=317
Dockable=1 Dockable=1
SplitPos=201 SplitPos=201
ArrangeBy=Name ArrangeBy=Name
SelectedItem=Name SelectedItem=
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 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= HiddenCategories=
@ -388,28 +376,28 @@ State=0
Left=0 Left=0
Top=12 Top=12
Width=140 Width=140
Height=516 Height=513
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=140 ClientWidth=140
ClientHeight=516 ClientHeight=513
TBDockHeight=305 TBDockHeight=305
LRDockWidth=140 LRDockWidth=140
Dockable=1 Dockable=1
[MessageView@EditWindow0] [MessageView@EditWindow0]
Create=1 Create=1
Visible=0 Visible=1
State=0 State=0
Left=-253 Left=12
Top=-590 Top=0
Width=443 Width=1199
Height=85 Height=158
MaxLeft=-1 MaxLeft=-1
MaxTop=-1 MaxTop=-1
ClientWidth=443 ClientWidth=1199
ClientHeight=85 ClientHeight=158
TBDockHeight=85 TBDockHeight=158
LRDockWidth=443 LRDockWidth=443
Dockable=1 Dockable=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 KiB

View File

@ -58,10 +58,16 @@ uses Literales, Mensajes;
{ TdmInformeFacturaProforma } { TdmInformeFacturaProforma }
constructor TdmInformeAlbaranCliente.Create(AOwner: TComponent); constructor TdmInformeAlbaranCliente.Create(AOwner: TComponent);
var
i: Integer;
begin begin
inherited; inherited;
FConLogo := True;
FConLogo := (VerMensajePregunta(msgConLogo) = IDYES); i := EmpresaActiva.Restricciones.IndexOf(CTE_INFORMES_CONLOGO);
if i < 0 then
FConLogo := (VerMensajePregunta(msgConLogo) = IDYES);
if FConLogo then if FConLogo then
FNombreInforme := 'InformeAlbaranCliente(Con logo).frf' FNombreInforme := 'InformeAlbaranCliente(Con logo).frf'
else else

View File

@ -53,9 +53,15 @@ uses
{ TdmInformeContratoCliente } { TdmInformeContratoCliente }
constructor TdmInformeContratoCliente.Create(AOwner: TComponent); constructor TdmInformeContratoCliente.Create(AOwner: TComponent);
var
i: Integer;
begin begin
inherited; inherited;
FConLogo := (VerMensajePregunta(msgConLogo) = IDYES); FConLogo := True;
if not EmpresaActiva.Restricciones.Find(CTE_INFORMES_CONLOGO, i) then
FConLogo := (VerMensajePregunta(msgConLogo) = IDYES);
FDocumento := TDocumento.Create('MCOCINA'); FDocumento := TDocumento.Create('MCOCINA');
end; end;

View File

@ -38,10 +38,15 @@ uses
{ TdmInformeFacturaCliente } { TdmInformeFacturaCliente }
constructor TdmInformeFacturaCliente.Create(AOwner: TComponent); constructor TdmInformeFacturaCliente.Create(AOwner: TComponent);
var
i: Integer;
begin begin
inherited; inherited;
FConLogo := True;
FConLogo := (VerMensajePregunta(msgConLogo) = IDYES);
if not EmpresaActiva.Restricciones.Find(CTE_INFORMES_CONLOGO, i) then
FConLogo := (VerMensajePregunta(msgConLogo) = IDYES);
if FConLogo then if FConLogo then
FNombreInforme := 'FacturaCliente(Con logo).frf' FNombreInforme := 'FacturaCliente(Con logo).frf'
else else

View File

@ -51,9 +51,14 @@ uses
{ TdmInformePresupuestoCliente } { TdmInformePresupuestoCliente }
constructor TdmInformePresupuestoCliente.Create(AOwner: TComponent); constructor TdmInformePresupuestoCliente.Create(AOwner: TComponent);
var
i: Integer;
begin begin
inherited; inherited;
FConLogo := (VerMensajePregunta(msgConLogo) = IDYES); FConLogo := True;
if not EmpresaActiva.Restricciones.Find(CTE_INFORMES_CONLOGO, i) then
FConLogo := (VerMensajePregunta(msgConLogo) = IDYES);
end; end;
procedure TdmInformePresupuestoCliente.ImprimirFinanciacion; procedure TdmInformePresupuestoCliente.ImprimirFinanciacion;

View File

@ -25,6 +25,14 @@ unit Literales;
interface interface
const
CTE_FACTURAS_PROVEEDOR = 'FACTURAS_PROVEEDOR';
CTE_PAGOS_PROVEEDOR = 'PAGOS_PROVEEDOR';
CTE_VENTAS = 'VENTAS';
CTE_CONTABILIDAD = 'CONTABILIDAD';
CTE_INFORMES = 'INFORMES';
CTE_INFORMES_CONLOGO = 'INFORMES_SIEMPRE_CONLOGO';
resourcestring resourcestring
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Mensajes // Mensajes

View File

@ -31,13 +31,6 @@ uses
am2000menuitem, am2000popupmenu, am2000, RdxBotones, RdxPaneles, am2000menuitem, am2000popupmenu, am2000, RdxBotones, RdxPaneles,
RdxFrame, ActnList, FthImage, pngimage, am2000utils; RdxFrame, ActnList, FthImage, pngimage, am2000utils;
const
CTE_FACTURAS_PROVEEDOR = 'FACTURAS_PROVEEDOR';
CTE_PAGOS_PROVEEDOR = 'PAGOS_PROVEEDOR';
CTE_VENTAS = 'VENTAS';
CTE_CONTABILIDAD = 'CONTABILIDAD';
CTE_INFORMES = 'INFORMES';
type type
TfrPrincipal = class(TRdxFrame) TfrPrincipal = class(TRdxFrame)
BarraEstado: TStatusBar; BarraEstado: TStatusBar;

View File

@ -62,7 +62,7 @@ implementation
{$R *.DFM} {$R *.DFM}
uses uses
RdxEmpresaActiva, Proveedores, FacturasProveedores, PagosProveedores, Entidades, Configuracion, RdxEmpresaActiva, Proveedores, FacturasProveedores, PagosProveedores, Entidades, Configuracion,
BaseDatos, Principal; BaseDatos, Literales;
constructor TfrBarraProveedores.Create (AOwner: TComponent); constructor TfrBarraProveedores.Create (AOwner: TComponent);
begin begin

Binary file not shown.

Binary file not shown.