2007-10-29 19:18:51 +00:00
|
|
|
|
unit uEditorAlbaranesClienteReport;
|
|
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
|
Dialogs, uEditorPreview, frxExportImage, frxExportPDF, frxDCtrl, frxClass,
|
|
|
|
|
|
// frxDMPExport, frxGradient, frxChBox, frxCross, frxRich, frxChart, frxOLE,
|
|
|
|
|
|
// frxBarcode, JvAppStorage, JvAppRegistryStorage, JvComponentBase,
|
|
|
|
|
|
JvFormPlacement, ImgList, PngImageList, StdActns, ActnList, ComCtrls,
|
|
|
|
|
|
TB2ExtItems, TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage,
|
|
|
|
|
|
ExtCtrls, JvExControls, JvComponent, JvNavigationPane, uIEditorAlbaranesClientePreview,
|
|
|
|
|
|
JvExComCtrls, JvStatusBar, frxDMPExport, frxGradient, frxChBox, frxCross,
|
|
|
|
|
|
frxRich, frxOLE, frxBarcode, JvAppStorage, JvAppRegistryStorage,
|
2008-01-13 21:43:11 +00:00
|
|
|
|
JvComponentBase, frxExportText, frxExportRTF, frxExportMail, frxExportXLS;
|
2007-10-29 19:18:51 +00:00
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
|
TfEditorAlbaranesClientePreview = class(TfEditorPreview, IEditorAlbaranesClientePreview)
|
2008-02-07 09:59:33 +00:00
|
|
|
|
TBXItem58: TTBXItem;
|
|
|
|
|
|
procedure actExportarRTFExecute(Sender: TObject);
|
2013-03-11 16:10:38 +00:00
|
|
|
|
private
|
|
|
|
|
|
FVerPrecios : Boolean;
|
|
|
|
|
|
FVerRef : Boolean;
|
|
|
|
|
|
function GetVerPrecios: Boolean;
|
|
|
|
|
|
function GetVerRef: Boolean;
|
|
|
|
|
|
procedure SetVerPrecios(const Value: Boolean);
|
|
|
|
|
|
procedure SetVerRef(const Value: Boolean);
|
|
|
|
|
|
published
|
|
|
|
|
|
public
|
|
|
|
|
|
property VerPrecios : Boolean read GetVerPrecios write SetVerPrecios;
|
|
|
|
|
|
property VerRef : Boolean read GetVerRef write SetVerRef;
|
|
|
|
|
|
|
2007-10-29 19:18:51 +00:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
implementation
|
2008-02-07 09:59:33 +00:00
|
|
|
|
|
2007-10-29 19:18:51 +00:00
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
2008-02-07 09:59:33 +00:00
|
|
|
|
uses
|
2008-09-08 16:13:20 +00:00
|
|
|
|
uAlbaranesClienteReportController, uDialogUtils;
|
2008-02-07 09:59:33 +00:00
|
|
|
|
|
|
|
|
|
|
procedure TfEditorAlbaranesClientePreview.actExportarRTFExecute(
|
|
|
|
|
|
Sender: TObject);
|
|
|
|
|
|
var
|
|
|
|
|
|
I: Integer;
|
|
|
|
|
|
begin
|
|
|
|
|
|
// inherited; <- No llamar al padre
|
|
|
|
|
|
if not Assigned(Controller) then
|
|
|
|
|
|
raise Exception.Create('No se ha asignado el controlador necesario');
|
|
|
|
|
|
|
2008-08-22 14:52:35 +00:00
|
|
|
|
for I := 0 to ListaID.Count - 1 do
|
2013-03-11 16:10:38 +00:00
|
|
|
|
if (Controller as IAlbaranesClienteReportController).ExportToWord(ListaID[I], '', FVerPrecios, FVerRef) then
|
|
|
|
|
|
ShowInfoMessage('El albar<61>n se ha exportado correctamente.');
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
function TfEditorAlbaranesClientePreview.GetVerPrecios: Boolean;
|
|
|
|
|
|
begin
|
|
|
|
|
|
Result := FVerPrecios;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
function TfEditorAlbaranesClientePreview.GetVerRef: Boolean;
|
|
|
|
|
|
begin
|
|
|
|
|
|
Result := FVerRef;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfEditorAlbaranesClientePreview.SetVerPrecios(const Value: Boolean);
|
|
|
|
|
|
begin
|
|
|
|
|
|
FVerPrecios := Value;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfEditorAlbaranesClientePreview.SetVerRef(const Value: Boolean);
|
|
|
|
|
|
begin
|
|
|
|
|
|
FVerRef := Value;
|
2008-02-07 09:59:33 +00:00
|
|
|
|
end;
|
|
|
|
|
|
|
2007-10-29 19:18:51 +00:00
|
|
|
|
end.
|