diff --git a/Database/FACTUGES.FDB b/Database/FACTUGES.FDB
index 144a1e97..0b8e3c42 100644
Binary files a/Database/FACTUGES.FDB and b/Database/FACTUGES.FDB differ
diff --git a/Source/Base/Base.bdsproj b/Source/Base/Base.bdsproj
index fd07f729..44563cc0 100644
--- a/Source/Base/Base.bdsproj
+++ b/Source/Base/Base.bdsproj
@@ -170,7 +170,8 @@
1.0.0.0
-
+
+
ExpressCommonLibrary by Developer Express Inc.
ExpressEditors Library 5 by Developer Express Inc.
ExpressDataController by Developer Express Inc.
diff --git a/Source/Base/Base.dpk b/Source/Base/Base.dpk
index 6b282975..3eeb9f3d 100644
--- a/Source/Base/Base.dpk
+++ b/Source/Base/Base.dpk
@@ -78,7 +78,8 @@ requires
jsDialog100,
indy,
JvDlgsD10R,
- JvNetD10R;
+ JvNetD10R,
+ dxGDIPlusD10;
contains
uDataTableUtils in 'Utiles\uDataTableUtils.pas',
@@ -101,6 +102,7 @@ contains
uPasswordUtils in 'Utiles\uPasswordUtils.pas',
uInfoProjectUtils in 'Utiles\uInfoProjectUtils.pas',
uInformeRegistryUtils in 'ClassRegistry\uInformeRegistryUtils.pas',
- uStringsUtils in 'Utiles\uStringsUtils.pas';
+ uStringsUtils in 'Utiles\uStringsUtils.pas',
+ uDataModuleImpresiones in '..\Modulos\Impresiones\Data\uDataModuleImpresiones.pas' {dmImpresiones: TDataModule};
end.
diff --git a/Source/Base/Base.res b/Source/Base/Base.res
index 8b251f31..1641339f 100644
Binary files a/Source/Base/Base.res and b/Source/Base/Base.res differ
diff --git a/Source/Base/GUIBase/uEditorPreview.dfm b/Source/Base/GUIBase/uEditorPreview.dfm
index 8f9ea13c..adfde5bb 100644
--- a/Source/Base/GUIBase/uEditorPreview.dfm
+++ b/Source/Base/GUIBase/uEditorPreview.dfm
@@ -5,17 +5,15 @@ inherited fEditorPreview: TfEditorPreview
WindowState = wsMaximized
OnDestroy = FormDestroy
OnResize = FormResize
- ExplicitWidth = 658
- ExplicitHeight = 492
+ ExplicitWidth = 803
+ ExplicitHeight = 485
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
Top = 75
Visible = False
ExplicitTop = 75
- ExplicitWidth = 650
inherited Image1: TImage
- Left = 623
ExplicitLeft = 623
end
end
@@ -27,7 +25,7 @@ inherited fEditorPreview: TfEditorPreview
DefaultDock = TBXDock
Visible = False
ExplicitTop = 49
- ExplicitWidth = 242
+ ExplicitWidth = 248
end
inherited tbxMenu: TTBXToolbar
DockPos = -24
@@ -175,8 +173,6 @@ inherited fEditorPreview: TfEditorPreview
item
Width = 50
end>
- ExplicitTop = 439
- ExplicitWidth = 650
end
inherited EditorActionList: TActionList
Top = 104
@@ -847,13 +843,14 @@ inherited fEditorPreview: TfEditorPreview
Bitmap = {}
end
object frxReport1: TfrxReport
- Version = '3.23.7'
+ Version = '4.3'
DotMatrixReport = False
EngineOptions.DoublePass = True
IniFile = '\Software\Fast Reports'
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator]
PreviewOptions.Zoom = 1.000000000000000000
PrintOptions.Printer = 'Default'
+ PrintOptions.PrintOnSheet = 0
ReportOptions.CreateDate = 38658.858023541660000000
ReportOptions.LastChange = 38658.858023541660000000
ScriptLanguage = 'PascalScript'
@@ -864,9 +861,6 @@ inherited fEditorPreview: TfEditorPreview
StoreInDFM = False
Left = 16
Top = 200
- Datasets = <>
- Variables = <>
- Style = <>
end
object frxBarCodeObject1: TfrxBarCodeObject
Left = 16
diff --git a/Source/Base/GUIBase/uEditorPreview.pas b/Source/Base/GUIBase/uEditorPreview.pas
index ad98a9b9..41aaff56 100644
--- a/Source/Base/GUIBase/uEditorPreview.pas
+++ b/Source/Base/GUIBase/uEditorPreview.pas
@@ -20,7 +20,14 @@ type
procedure LoadFromStream(AStream : TStream);
function ExportToFile : String;
procedure Print;
- procedure Preview;
+ procedure Preview;
+
+ function GetTablaImpresion: String;
+ function GetIdTablaImpresion: String;
+ procedure SetTablaImpresion (Value: String);
+ procedure SetIdTablaImpresion (Value: String);
+ property TablaImpresion: String read GetTablaImpresion write SetTablaImpresion;
+ property IdTablaImpresion: String read GetIdTablaImpresion write SetIdTablaImpresion;
end;
TfEditorPreview = class(TfEditorBase, IEditorPreview)
@@ -102,13 +109,25 @@ type
FPreview : TfrViewPreview;
procedure OnPageChanged(Sender: TfrxPreview; PageNo: Integer);
procedure UpdateZoom;
+ procedure OnPrint(Sender: Tobject);
+
protected
+ FTablaImpresion: String;
+ FIdTablaImpresion: String;
+ function GetTablaImpresion: String;
+ function GetIdTablaImpresion: String;
+ procedure SetTablaImpresion (Value: String);
+ procedure SetIdTablaImpresion (Value: String);
+
function GetReport: TfrxReport; virtual;
public
+ property TablaImpresion: String read GetTablaImpresion write SetTablaImpresion;
+ property IdTablaImpresion: String read GetIdTablaImpresion write SetIdTablaImpresion;
+
constructor Create(AOwner: TComponent); override;
property Report: TfrxReport read GetReport;
procedure Print;
- procedure Preview;
+ procedure Preview;
procedure LoadFromStream(AStream : TStream);
function ExportToFile : String;
end;
@@ -118,18 +137,28 @@ implementation
uses
frxRes, frxUtils, frxPrinter,
- uCustomEditor, uSistemaFunc;
+ uCustomEditor, uSistemaFunc, uDataModuleImpresiones;
{$R *.dfm}
{ TfEditorBase1 }
+function TfEditorPreview.GetIdTablaImpresion: String;
+begin
+ Result := FIdTablaImpresion;
+end;
+
function TfEditorPreview.GetReport: TfrxReport;
begin
Result := frxReport1;
end;
+function TfEditorPreview.GetTablaImpresion: String;
+begin
+ Result := FTablaImpresion;
+end;
+
procedure TfEditorPreview.FormShow(Sender: TObject);
begin
inherited;
@@ -284,6 +313,11 @@ begin
[PageNo, Sender.PageCount]);
end;
+procedure TfEditorPreview.OnPrint(Sender: Tobject);
+begin
+ dmImpresiones.AnadirMarcaImpresion(TablaImpresion, IdTablaImpresion);
+end;
+
constructor TfEditorPreview.Create(AOwner: TComponent);
begin
inherited;
@@ -304,6 +338,8 @@ begin
FPreview := TfrViewPreview.Create(Self);
Report.Preview := FPreview.Preview;
FPreview.Preview.OnPageChanged := OnPageChanged;
+ FTablaImpresion := '-1';
+ FIdTablaImpresion := '-1';
end;
procedure TfEditorPreview.Preview;
@@ -313,6 +349,8 @@ end;
procedure TfEditorPreview.Print;
begin
+ FPreview.Preview.Report.OnPrintReport := onprint;
+
if not frxPrinters.HasPhysicalPrinters then
frxErrorMsg(frxResources.Get('clNoPrinters'))
else
@@ -320,6 +358,16 @@ begin
Enabled := True;
end;
+procedure TfEditorPreview.SetIdTablaImpresion(Value: String);
+begin
+ FIdTablaImpresion := Value;
+end;
+
+procedure TfEditorPreview.SetTablaImpresion(Value: String);
+begin
+ FTablaImpresion := Value;
+end;
+
function TfEditorPreview.ExportToFile: String;
var
AFile : String;
diff --git a/Source/Base/uDataModuleBase.pas b/Source/Base/uDataModuleBase.pas
index 2bd8051f..8b9b3971 100644
--- a/Source/Base/uDataModuleBase.pas
+++ b/Source/Base/uDataModuleBase.pas
@@ -38,7 +38,8 @@ implementation
uses
uDataModuleConexion, Dialogs, TBX, TBXThemes, Forms, Windows,
- JclFileUtils, cxControls, SysUtils, uDataModuleConfiguracion;
+ JclFileUtils, cxControls, SysUtils, uDataModuleConfiguracion,
+ uDataModuleImpresiones;
{
*********************************** TdmBase ************************************
@@ -47,6 +48,7 @@ procedure TdmBase.DAClientDataModuleCreate(Sender: TObject);
begin
dmConexion := TdmConexion.Create(NIL);
dmConfiguracion := TdmConfiguracion.Create(NIL);
+ dmImpresiones := TDataModuleImpresiones.Create(NIL);
TBXSwitcher.OnThemeChange := OnTBXThemeChange;
TBXSetTheme('Office2003');
@@ -114,6 +116,7 @@ procedure TdmBase.DataModuleDestroy(Sender: TObject);
begin
FreeANDNIL(dmConfiguracion);
FreeAndNil(dmConexion);
+ FreeAndNil(dmImpresiones);
end;
initialization
diff --git a/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.bdsproj b/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.bdsproj
index 34284927..f5ed253a 100644
--- a/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.bdsproj
+++ b/Source/Modulos/Facturas de cliente/Controller/FacturasCliente_controller.bdsproj
@@ -172,7 +172,7 @@
-