diff --git a/BaseDatos/TablaEmpresas.pas b/BaseDatos/TablaEmpresas.pas index d57e0a9..1235599 100644 --- a/BaseDatos/TablaEmpresas.pas +++ b/BaseDatos/TablaEmpresas.pas @@ -279,6 +279,8 @@ begin Codigo := CodigoEmpresa; // Recuperar las restricciones de la empresa para el usuario logado FRestricciones := TStringList.Create; + FRestricciones.Sorted := true; + ObtenerRestricciones; // Recuperar los datos de la empresa ObtenerDatos; @@ -289,6 +291,7 @@ begin inherited Create; FDirecciones := TListaDireccionesEmpresa.Create(Codigo); FRestricciones := TStringList.Create; + FRestricciones.Sorted := true; end; destructor TDatosEmpresa.Destroy; diff --git a/Factuges.dsk b/Factuges.dsk index 0c18de1..1d8e24e 100644 --- a/Factuges.dsk +++ b/Factuges.dsk @@ -1,18 +1,18 @@ [Closed Files] -File_0=SourceModule,'C:\Codigo Abeto\Clientes\ImprimirPresupuestosCliente.pas',0,1,61,50,8,1,0 -File_1=SourceModule,'C:\Codigo Abeto\BaseDatos\TablaEmpresas.pas',0,1,75,14,54,0,0 -File_2=SourceModule,'C:\Codigo Abeto\Empresas\Empresa.pas',0,1,823,56,847,1,0 -File_3=SourceModule,'C:\Codigo Abeto\Informes\InformeBaseFR3.pas',0,1,65,28,79,0,0 -File_4=SourceModule,'C:\Codigo Abeto\Informes\InformePagoCliente.pas',0,1,84,37,98,0,0 -File_5=SourceModule,'C:\Codigo Abeto\BaseDatos\TablaFacturasCliente.pas',0,1,1873,1,1899,0,0 -File_6=SourceModule,'C:\Codigo Abeto\BaseDatos\BaseDatos.pas',0,1,163,14,171,0,0 -File_7=SourceModule,'C:\Codigo Abeto\Libreria\RdxEmpresaActiva.pas',0,1,203,61,206,0,0 -File_8=SourceModule,'C:\Codigo Abeto\Proveedores\BarraProveedores.pas',0,1,1,23,65,1,0 +File_0=SourceModule,'C:\Codigo Abeto\Libreria\Literales.pas',0,1,10,51,34,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\Informes\InformeBase.pas',0,1,46,15,46,1,0 +File_3=SourceModule,'C:\Codigo Abeto\Informes\InformeFacturaCliente.pas',0,1,31,1,43,0,0 +File_4=SourceModule,'C:\Codigo Abeto\Informes\InformePresupuestoCliente.pas',0,1,43,1,56,1,0 +File_5=SourceModule,'C:\Codigo Abeto\Principal.pas',0,1,363,2,385,1,0 +File_6=SourceModule,'C:\Codigo Abeto\Libreria\RdxEmpresaActiva.pas',0,1,1,1,1,0,0 +File_7=SourceModule,'C:\Codigo Abeto\BaseDatos\TablaEmpresas.pas',0,1,379,1,390,0,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] Module0=C:\Codigo Abeto\Factuges.dpr -Module1=C:\Codigo Abeto\Informes\InformePresupuestoCliente.pas -Count=2 +Count=1 EditWindowCount=1 [C:\Codigo Abeto\Factuges.dpr] @@ -20,24 +20,18 @@ ModuleType=SourceModule FormState=0 FormOnTop=0 -[C:\Codigo Abeto\Informes\InformePresupuestoCliente.pas] -ModuleType=SourceModule -FormState=1 -FormOnTop=0 - [C:\Archivos de programa\Borland\Delphi7\Projects\ProjectGroup1.bpg] FormState=0 FormOnTop=0 -[C:\Codigo Abeto\Informes\InformeBase.pas] +[C:\Codigo Abeto\Frames\RdxFrame.pas] FormState=0 FormOnTop=0 [EditWindow0] -ViewCount=2 +ViewCount=1 CurrentView=0 View0=0 -View1=1 CodeExplorer=CodeExplorer@EditWindow0 MessageView=MessageView@EditWindow0 Create=1 @@ -45,19 +39,19 @@ Visible=1 State=0 Left=447 Top=139 -Width=1137 -Height=562 +Width=1219 +Height=720 MaxLeft=-1 MaxTop=-1 -ClientWidth=1129 -ClientHeight=528 +ClientWidth=1211 +ClientHeight=686 LeftPanelSize=140 LeftPanelClients=CodeExplorer@EditWindow0 LeftPanelData=000004000000000000000000000000000000000000000000000100000000000000000C000000436F64654578706C6F726572FFFFFFFF RightPanelSize=0 -BottomPanelSize=0 +BottomPanelSize=158 BottomPanelClients=MessageView@EditWindow0 -BottomPanelData=00000400010000000B0000004D657373616765566965770000000000000000000000000000000000FFFFFFFF +BottomPanelData=000004000000000000000000000000000000000000000000000100000000000000000B0000004D65737361676556696577FFFFFFFF [View0] Module=C:\Codigo Abeto\Factuges.dpr @@ -66,21 +60,16 @@ CursorY=1 TopLine=1 LeftCol=1 -[View1] -Module=C:\Codigo Abeto\Informes\InformePresupuestoCliente.pas -CursorX=1 -CursorY=1 -TopLine=1 -LeftCol=1 - [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] -WatchColumnWidth=100 +WatchColumnWidth=235 WatchShowColumnHeaders=1 Create=1 -Visible=0 +Visible=1 State=0 Left=146 Top=563 @@ -95,8 +84,7 @@ LRDockWidth=842 Dockable=1 [Breakpoints] -Count=1 -Breakpoint0='C:\Codigo Abeto\BaseDatos\TablaEmpresas.pas',387,'',0,1,'',1,0,0,'',1,'','','' +Count=0 [AddressBreakpoints] Count=0 @@ -195,7 +183,7 @@ LRDockWidth=317 Dockable=1 SplitPos=201 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 HiddenCategories= @@ -388,28 +376,28 @@ State=0 Left=0 Top=12 Width=140 -Height=516 +Height=513 MaxLeft=-1 MaxTop=-1 ClientWidth=140 -ClientHeight=516 +ClientHeight=513 TBDockHeight=305 LRDockWidth=140 Dockable=1 [MessageView@EditWindow0] Create=1 -Visible=0 +Visible=1 State=0 -Left=-253 -Top=-590 -Width=443 -Height=85 +Left=12 +Top=0 +Width=1199 +Height=158 MaxLeft=-1 MaxTop=-1 -ClientWidth=443 -ClientHeight=85 -TBDockHeight=85 +ClientWidth=1199 +ClientHeight=158 +TBDockHeight=158 LRDockWidth=443 Dockable=1 diff --git a/Gráficos/logotipo abeto pie de hoja.bmp b/Gráficos/logotipo abeto pie de hoja.bmp new file mode 100644 index 0000000..5baa57e Binary files /dev/null and b/Gráficos/logotipo abeto pie de hoja.bmp differ diff --git a/Informes/InformeAlbaranCliente.pas b/Informes/InformeAlbaranCliente.pas index 62b47f0..e8f27e1 100644 --- a/Informes/InformeAlbaranCliente.pas +++ b/Informes/InformeAlbaranCliente.pas @@ -58,10 +58,16 @@ uses Literales, Mensajes; { TdmInformeFacturaProforma } constructor TdmInformeAlbaranCliente.Create(AOwner: TComponent); +var + i: Integer; begin 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 FNombreInforme := 'InformeAlbaranCliente(Con logo).frf' else diff --git a/Informes/InformeContratoCliente.pas b/Informes/InformeContratoCliente.pas index 23ec9c5..b04d447 100644 --- a/Informes/InformeContratoCliente.pas +++ b/Informes/InformeContratoCliente.pas @@ -53,9 +53,15 @@ uses { TdmInformeContratoCliente } constructor TdmInformeContratoCliente.Create(AOwner: TComponent); +var + i: Integer; begin 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'); end; diff --git a/Informes/InformeFacturaCliente.pas b/Informes/InformeFacturaCliente.pas index 4830d0d..0e7b394 100644 --- a/Informes/InformeFacturaCliente.pas +++ b/Informes/InformeFacturaCliente.pas @@ -38,10 +38,15 @@ uses { TdmInformeFacturaCliente } constructor TdmInformeFacturaCliente.Create(AOwner: TComponent); +var + i: Integer; begin inherited; - - FConLogo := (VerMensajePregunta(msgConLogo) = IDYES); + FConLogo := True; + + if not EmpresaActiva.Restricciones.Find(CTE_INFORMES_CONLOGO, i) then + FConLogo := (VerMensajePregunta(msgConLogo) = IDYES); + if FConLogo then FNombreInforme := 'FacturaCliente(Con logo).frf' else diff --git a/Informes/InformePresupuestoCliente.pas b/Informes/InformePresupuestoCliente.pas index 955a979..69f1e50 100644 --- a/Informes/InformePresupuestoCliente.pas +++ b/Informes/InformePresupuestoCliente.pas @@ -51,9 +51,14 @@ uses { TdmInformePresupuestoCliente } constructor TdmInformePresupuestoCliente.Create(AOwner: TComponent); +var + i: Integer; begin inherited; - FConLogo := (VerMensajePregunta(msgConLogo) = IDYES); + FConLogo := True; + + if not EmpresaActiva.Restricciones.Find(CTE_INFORMES_CONLOGO, i) then + FConLogo := (VerMensajePregunta(msgConLogo) = IDYES); end; procedure TdmInformePresupuestoCliente.ImprimirFinanciacion; diff --git a/Libreria/Literales.pas b/Libreria/Literales.pas index 099d52b..28c29a7 100644 --- a/Libreria/Literales.pas +++ b/Libreria/Literales.pas @@ -25,6 +25,14 @@ unit Literales; 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 //////////////////////////////////////////////////////////////////////////////// // Mensajes diff --git a/Principal.pas b/Principal.pas index 6029eb7..c67ba7b 100644 --- a/Principal.pas +++ b/Principal.pas @@ -31,13 +31,6 @@ uses am2000menuitem, am2000popupmenu, am2000, RdxBotones, RdxPaneles, 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 TfrPrincipal = class(TRdxFrame) BarraEstado: TStatusBar; diff --git a/Proveedores/BarraProveedores.pas b/Proveedores/BarraProveedores.pas index 24d82e5..4483b27 100644 --- a/Proveedores/BarraProveedores.pas +++ b/Proveedores/BarraProveedores.pas @@ -62,7 +62,7 @@ implementation {$R *.DFM} uses RdxEmpresaActiva, Proveedores, FacturasProveedores, PagosProveedores, Entidades, Configuracion, - BaseDatos, Principal; + BaseDatos, Literales; constructor TfrBarraProveedores.Create (AOwner: TComponent); begin diff --git a/Temp/Factuges.exe b/Temp/Factuges.exe index 4a8ce7b..3973258 100644 Binary files a/Temp/Factuges.exe and b/Temp/Factuges.exe differ diff --git a/bd/ABETO.GDB b/bd/ABETO.GDB index cf71e4e..d48324b 100644 Binary files a/bd/ABETO.GDB and b/bd/ABETO.GDB differ