Se adpata a abeto el informe de presupuestos
git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoDesign_FactuGES/trunk@10 93f398dd-4eb6-7a46-baf6-13f46f578da2
This commit is contained in:
parent
5978cf2acc
commit
1a19d5835f
BIN
Resources/Iconos/Barras.jpg
Normal file
BIN
Resources/Iconos/Barras.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
BIN
Resources/Iconos/Titulo2.jpg
Normal file
BIN
Resources/Iconos/Titulo2.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 49 KiB |
BIN
Resources/Iconos/logotipo abeto design.jpg
Normal file
BIN
Resources/Iconos/logotipo abeto design.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
BIN
Resources/Iconos/logotipo abeto pie de hoja.bmp
Normal file
BIN
Resources/Iconos/logotipo abeto pie de hoja.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 340 KiB |
File diff suppressed because one or more lines are too long
@ -92,8 +92,8 @@ type
|
|||||||
function EsModificable(APresupuesto : IBizPresupuestoCliente): Boolean;
|
function EsModificable(APresupuesto : IBizPresupuestoCliente): Boolean;
|
||||||
function EsEliminable(APresupuesto : IBizPresupuestoCliente): Boolean;
|
function EsEliminable(APresupuesto : IBizPresupuestoCliente): Boolean;
|
||||||
|
|
||||||
procedure Preview(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false);
|
procedure Preview(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true);
|
||||||
procedure Print(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false);
|
procedure Print(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true);
|
||||||
procedure EnviarPresupuestoPorEMail(APresupuesto : IBizPresupuestoCliente);
|
procedure EnviarPresupuestoPorEMail(APresupuesto : IBizPresupuestoCliente);
|
||||||
function CambiarSituacion(APresupuesto : IBizPresupuestoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean = false): Boolean;
|
function CambiarSituacion(APresupuesto : IBizPresupuestoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean = false): Boolean;
|
||||||
|
|
||||||
@ -168,8 +168,8 @@ type
|
|||||||
function EsModificable(APresupuesto : IBizPresupuestoCliente): Boolean;
|
function EsModificable(APresupuesto : IBizPresupuestoCliente): Boolean;
|
||||||
function EsEliminable(APresupuesto : IBizPresupuestoCliente): Boolean;
|
function EsEliminable(APresupuesto : IBizPresupuestoCliente): Boolean;
|
||||||
|
|
||||||
procedure Preview(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false);
|
procedure Preview(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true);
|
||||||
procedure Print(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false);
|
procedure Print(APresupuesto : IBizPresupuestoCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true);
|
||||||
procedure EnviarPresupuestoPorEMail(APresupuesto : IBizPresupuestoCliente);
|
procedure EnviarPresupuestoPorEMail(APresupuesto : IBizPresupuestoCliente);
|
||||||
function CambiarSituacion(APresupuesto : IBizPresupuestoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean = false): Boolean;
|
function CambiarSituacion(APresupuesto : IBizPresupuestoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean = false): Boolean;
|
||||||
|
|
||||||
@ -1089,7 +1089,7 @@ begin
|
|||||||
}
|
}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPresupuestosClienteController.Preview(APresupuesto: IBizPresupuestoCliente; AllItems: Boolean = false);
|
procedure TPresupuestosClienteController.Preview(APresupuesto: IBizPresupuestoCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true);
|
||||||
var
|
var
|
||||||
AReportController : IPresupuestosClienteReportController;
|
AReportController : IPresupuestosClienteReportController;
|
||||||
ID_Presupuestos: TIntegerList;
|
ID_Presupuestos: TIntegerList;
|
||||||
@ -1115,14 +1115,14 @@ begin
|
|||||||
else
|
else
|
||||||
ID_Presupuestos.Add(APresupuesto.ID);
|
ID_Presupuestos.Add(APresupuesto.ID);
|
||||||
|
|
||||||
AReportController.Preview(ID_Presupuestos);
|
AReportController.Preview(ID_Presupuestos, VerLogotipo);
|
||||||
finally
|
finally
|
||||||
AReportController := NIL;
|
AReportController := NIL;
|
||||||
FreeAndNil(ID_Presupuestos);
|
FreeAndNil(ID_Presupuestos);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPresupuestosClienteController.Print(APresupuesto: IBizPresupuestoCliente; AllItems: Boolean = false);
|
procedure TPresupuestosClienteController.Print(APresupuesto: IBizPresupuestoCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true);
|
||||||
var
|
var
|
||||||
AReportController : IPresupuestosClienteReportController;
|
AReportController : IPresupuestosClienteReportController;
|
||||||
ID_Presupuestos: TIntegerList;
|
ID_Presupuestos: TIntegerList;
|
||||||
@ -1147,7 +1147,7 @@ begin
|
|||||||
else
|
else
|
||||||
ID_Presupuestos.Add(APresupuesto.ID);
|
ID_Presupuestos.Add(APresupuesto.ID);
|
||||||
|
|
||||||
AReportController.Print(ID_Presupuestos);
|
AReportController.Print(ID_Presupuestos, VerLogotipo);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
AReportController := NIL;
|
AReportController := NIL;
|
||||||
|
|||||||
@ -10,8 +10,8 @@ uses
|
|||||||
type
|
type
|
||||||
IPresupuestosClienteReportController = interface(IControllerBase)
|
IPresupuestosClienteReportController = interface(IControllerBase)
|
||||||
['{41AE4B36-6114-4DDE-8BCF-288AA0E12449}']
|
['{41AE4B36-6114-4DDE-8BCF-288AA0E12449}']
|
||||||
procedure Preview(const AListaID : TIntegerList);
|
procedure Preview(const AListaID : TIntegerList; const VerLogotipo: Boolean);
|
||||||
procedure Print(const AListaID : TIntegerList);
|
procedure Print(const AListaID : TIntegerList; const VerLogotipo: Boolean);
|
||||||
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -23,8 +23,8 @@ type
|
|||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
|
||||||
procedure Preview(const AListaID : TIntegerList);
|
procedure Preview(const AListaID : TIntegerList; const VerLogotipo: Boolean);
|
||||||
procedure Print(const AListaID : TIntegerList);
|
procedure Print(const AListaID : TIntegerList; const VerLogotipo: Boolean);
|
||||||
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -57,8 +57,7 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPresupuestosClienteReportController.ExportToPDF(const AID: Integer;
|
function TPresupuestosClienteReportController.ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||||
const AFileName: String): Boolean;
|
|
||||||
var
|
var
|
||||||
AStream: Binary;
|
AStream: Binary;
|
||||||
begin
|
begin
|
||||||
@ -68,7 +67,7 @@ begin
|
|||||||
|
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
try
|
try
|
||||||
AStream := FDataModule.GetRptPDFPresupuesto(AID);
|
AStream := FDataModule.GetRptPDFPresupuesto(AID, True);
|
||||||
try
|
try
|
||||||
AStream.SaveToFile(AFileName);
|
AStream.SaveToFile(AFileName);
|
||||||
Result := True;
|
Result := True;
|
||||||
@ -80,7 +79,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPresupuestosClienteReportController.Preview(const AListaID : TIntegerList);
|
procedure TPresupuestosClienteReportController.Preview(const AListaID : TIntegerList; const VerLogotipo: Boolean);
|
||||||
var
|
var
|
||||||
AStream: Binary;
|
AStream: Binary;
|
||||||
AEditor : IEditorPresupuestosClientePreview;
|
AEditor : IEditorPresupuestosClientePreview;
|
||||||
@ -89,7 +88,7 @@ begin
|
|||||||
|
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
try
|
try
|
||||||
AStream := FDataModule.GetRptPresupuestos(AListaID);
|
AStream := FDataModule.GetRptPresupuestos(AListaID, VerLogotipo);
|
||||||
try
|
try
|
||||||
CreateEditor('EditorPresupuestosClientePreview', IEditorPresupuestosClientePreview, AEditor);
|
CreateEditor('EditorPresupuestosClientePreview', IEditorPresupuestosClientePreview, AEditor);
|
||||||
if Assigned(AEditor) then
|
if Assigned(AEditor) then
|
||||||
@ -113,7 +112,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPresupuestosClienteReportController.Print(const AListaID : TIntegerList);
|
procedure TPresupuestosClienteReportController.Print(const AListaID : TIntegerList; const VerLogotipo: Boolean);
|
||||||
var
|
var
|
||||||
AStream: Binary;
|
AStream: Binary;
|
||||||
AEditor : IEditorPresupuestosClientePreview;
|
AEditor : IEditorPresupuestosClientePreview;
|
||||||
@ -122,7 +121,7 @@ begin
|
|||||||
|
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
try
|
try
|
||||||
AStream := FDataModule.GetRptPresupuestos(AListaID);
|
AStream := FDataModule.GetRptPresupuestos(AListaID, VerLogotipo);
|
||||||
try
|
try
|
||||||
CreateEditor('EditorPresupuestosClientePreview', IEditorPresupuestosClientePreview, AEditor);
|
CreateEditor('EditorPresupuestosClientePreview', IEditorPresupuestosClientePreview, AEditor);
|
||||||
if Assigned(AEditor) then
|
if Assigned(AEditor) then
|
||||||
|
|||||||
@ -51,8 +51,8 @@ type
|
|||||||
function GetCapitulo(const TIPO_ARTICULO : String) : IBizCapitulo;
|
function GetCapitulo(const TIPO_ARTICULO : String) : IBizCapitulo;
|
||||||
|
|
||||||
// Report
|
// Report
|
||||||
function GetRptPresupuestos(const AListaID: TIntegerList): Binary;
|
function GetRptPresupuestos(const AListaID: TIntegerList; const VerLogotipo: Boolean): Binary;
|
||||||
function GetRptPDFPresupuesto(const AID: Integer): Binary;
|
function GetRptPDFPresupuesto(const AID: Integer; const VerLogotipo: Boolean): Binary;
|
||||||
|
|
||||||
function GetAnosItems : TStringList;
|
function GetAnosItems : TStringList;
|
||||||
end;
|
end;
|
||||||
@ -78,27 +78,26 @@ begin
|
|||||||
RORemoteService.Message := dmConexion.Message;
|
RORemoteService.Message := dmConexion.Message;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDataModulePresupuestosCliente.GetRptPDFPresupuesto(
|
function TDataModulePresupuestosCliente.GetRptPDFPresupuesto(const AID: Integer; const VerLogotipo: Boolean): Binary;
|
||||||
const AID: Integer): Binary;
|
|
||||||
var
|
var
|
||||||
AParam : TIntegerArray;
|
AParam : TIntegerArray;
|
||||||
begin
|
begin
|
||||||
AParam := TIntegerArray.Create;
|
AParam := TIntegerArray.Create;
|
||||||
try
|
try
|
||||||
AParam.Add(AID);
|
AParam.Add(AID);
|
||||||
Result := (RORemoteService as IsrvPresupuestosCliente).GenerarInformeEnPDF(AParam)
|
Result := (RORemoteService as IsrvPresupuestosCliente).GenerarInformeEnPDF(AParam, VerLogotipo)
|
||||||
finally
|
finally
|
||||||
FreeANDNIL(AParam)
|
FreeANDNIL(AParam)
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDataModulePresupuestosCliente.GetRptPresupuestos(const AListaID: TIntegerList): Binary;
|
function TDataModulePresupuestosCliente.GetRptPresupuestos(const AListaID: TIntegerList; const VerLogotipo: Boolean): Binary;
|
||||||
var
|
var
|
||||||
AParam : TIntegerArray;
|
AParam : TIntegerArray;
|
||||||
begin
|
begin
|
||||||
AParam := AListaID.ToIntegerArray;
|
AParam := AListaID.ToIntegerArray;
|
||||||
try
|
try
|
||||||
Result := (RORemoteService as IsrvPresupuestosCliente).GenerarInforme(AParam)
|
Result := (RORemoteService as IsrvPresupuestosCliente).GenerarInforme(AParam, VerLogotipo)
|
||||||
finally
|
finally
|
||||||
FreeANDNIL(AParam)
|
FreeANDNIL(AParam)
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -8,8 +8,8 @@ uses
|
|||||||
type
|
type
|
||||||
IDataModulePresupuestosClienteReport = interface
|
IDataModulePresupuestosClienteReport = interface
|
||||||
['{70CEBB06-376F-4363-B80F-DDA4324E0F85}']
|
['{70CEBB06-376F-4363-B80F-DDA4324E0F85}']
|
||||||
function GetRptPresupuestos(const AListaID: TIntegerList): Binary;
|
function GetRptPresupuestos(const AListaID: TIntegerList; const VerLogotipo: Boolean): Binary;
|
||||||
function GetRptPDFPresupuesto(const AID: Integer): Binary;
|
function GetRptPDFPresupuesto(const AID: Integer; const VerLogotipo: Boolean): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|||||||
@ -868,7 +868,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
|
|||||||
PrintOptions.Printer = 'Por defecto'
|
PrintOptions.Printer = 'Por defecto'
|
||||||
PrintOptions.PrintOnSheet = 0
|
PrintOptions.PrintOnSheet = 0
|
||||||
ReportOptions.CreateDate = 39065.872423495400000000
|
ReportOptions.CreateDate = 39065.872423495400000000
|
||||||
ReportOptions.LastChange = 40141.552037754600000000
|
ReportOptions.LastChange = 40869.748848321760000000
|
||||||
ScriptLanguage = 'PascalScript'
|
ScriptLanguage = 'PascalScript'
|
||||||
ShowProgress = False
|
ShowProgress = False
|
||||||
StoreInDFM = False
|
StoreInDFM = False
|
||||||
|
|||||||
@ -92,6 +92,7 @@ type
|
|||||||
FListaNombresClientes: TStringList;
|
FListaNombresClientes: TStringList;
|
||||||
FImporteMinimo: Currency;
|
FImporteMinimo: Currency;
|
||||||
FDesglosado : Boolean;
|
FDesglosado : Boolean;
|
||||||
|
FVerLogotipo : Boolean;
|
||||||
|
|
||||||
procedure _GenerarPresupuesto(const AID : Integer);
|
procedure _GenerarPresupuesto(const AID : Integer);
|
||||||
|
|
||||||
@ -102,8 +103,8 @@ type
|
|||||||
procedure IniciarParametrosInforme;
|
procedure IniciarParametrosInforme;
|
||||||
procedure RecuperarNombresClientes;
|
procedure RecuperarNombresClientes;
|
||||||
public
|
public
|
||||||
function GenerarPresupuesto(const ListaID : TIntegerArray): Binary;
|
function GenerarPresupuesto(const ListaID : TIntegerArray; const VerLogotipo: Boolean = True): Binary;
|
||||||
function GenerarPresupuestoEnPDF(const ListaID : TIntegerArray): Binary;
|
function GenerarPresupuestoEnPDF(const ListaID : TIntegerArray; const VerLogotipo: Boolean = True): Binary;
|
||||||
function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
|
function GenerarInformeListadoPresupuestos(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -151,12 +152,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRptPresupuestosCliente.GenerarPresupuestoEnPDF(const ListaID: TIntegerArray): Binary;
|
function TRptPresupuestosCliente.GenerarPresupuestoEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean = True): Binary;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
Result := Binary.Create;
|
Result := Binary.Create;
|
||||||
try
|
try
|
||||||
|
//Inicializamos parametros
|
||||||
|
FVerLogotipo := VerLogotipo;
|
||||||
|
|
||||||
//Vamos generando todos y cada uno de los presupuestos recibidos
|
//Vamos generando todos y cada uno de los presupuestos recibidos
|
||||||
for i := 0 to ListaID.Count - 1 do
|
for i := 0 to ListaID.Count - 1 do
|
||||||
_GenerarPresupuesto(ListaID.Items[i]);
|
_GenerarPresupuesto(ListaID.Items[i]);
|
||||||
@ -486,12 +490,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRptPresupuestosCliente.GenerarPresupuesto(const ListaID: TIntegerArray): Binary;
|
function TRptPresupuestosCliente.GenerarPresupuesto(const ListaID: TIntegerArray; const VerLogotipo: Boolean = True): Binary;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
Result := Binary.Create;
|
Result := Binary.Create;
|
||||||
try
|
try
|
||||||
|
//Inicializamos parametros
|
||||||
|
FVerLogotipo := VerLogotipo;
|
||||||
|
|
||||||
//Vamos generando todos y cada uno de los presupuestos recibidos
|
//Vamos generando todos y cada uno de los presupuestos recibidos
|
||||||
for i := 0 to ListaID.Count - 1 do
|
for i := 0 to ListaID.Count - 1 do
|
||||||
_GenerarPresupuesto(ListaID.Items[i]);
|
_GenerarPresupuesto(ListaID.Items[i]);
|
||||||
@ -544,6 +551,7 @@ begin
|
|||||||
raise Exception.Create (('Error Servidor: _GenerarPresupuesto, no encuentra informe ' + rptInforme));
|
raise Exception.Create (('Error Servidor: _GenerarPresupuesto, no encuentra informe ' + rptInforme));
|
||||||
|
|
||||||
frxReport.LoadFromFile(AInforme, True);
|
frxReport.LoadFromFile(AInforme, True);
|
||||||
|
frxReport.Variables.Variables['VerLogotipo'] := FVerLogotipo;
|
||||||
frxReport.AddFunction('function PONERJUSTIFICACIONCOMPLETA(ARTFText : String): String', 'User Function','');
|
frxReport.AddFunction('function PONERJUSTIFICACIONCOMPLETA(ARTFText : String): String', 'User Function','');
|
||||||
frxReport.ReportOptions.Name := 'Presupuesto ' + tbl_Cabecera.FieldByName('REFERENCIA').AsString;
|
frxReport.ReportOptions.Name := 'Presupuesto ' + tbl_Cabecera.FieldByName('REFERENCIA').AsString;
|
||||||
frxReport.PrepareReport(False);
|
frxReport.PrepareReport(False);
|
||||||
|
|||||||
@ -33,8 +33,8 @@ type
|
|||||||
procedure DARemoteServiceCreate(Sender: TObject);
|
procedure DARemoteServiceCreate(Sender: TObject);
|
||||||
protected
|
protected
|
||||||
{ IsrvPresupuestosCliente methods }
|
{ IsrvPresupuestosCliente methods }
|
||||||
function GenerarInforme(const ListaID: TIntegerArray): Binary;
|
function GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary;
|
||||||
function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary;
|
function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -78,26 +78,25 @@ begin
|
|||||||
ConnectionName := dmServer.ConnectionName;
|
ConnectionName := dmServer.ConnectionName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TsrvPresupuestosCliente.GenerarInforme(const ListaID: TIntegerArray): Binary;
|
function TsrvPresupuestosCliente.GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary;
|
||||||
var
|
var
|
||||||
AReportGenerator : TRptPresupuestosCliente;
|
AReportGenerator : TRptPresupuestosCliente;
|
||||||
begin
|
begin
|
||||||
AReportGenerator := TRptPresupuestosCliente.Create(nil);
|
AReportGenerator := TRptPresupuestosCliente.Create(nil);
|
||||||
try
|
try
|
||||||
Result := AReportGenerator.GenerarPresupuesto(ListaID);
|
Result := AReportGenerator.GenerarPresupuesto(ListaID, VerLogotipo);
|
||||||
finally
|
finally
|
||||||
FreeAndNIL(AReportGenerator);
|
FreeAndNIL(AReportGenerator);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TsrvPresupuestosCliente.GenerarInformeEnPDF(
|
function TsrvPresupuestosCliente.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary;
|
||||||
const ListaID: TIntegerArray): Binary;
|
|
||||||
var
|
var
|
||||||
AReportGenerator : TRptPresupuestosCliente;
|
AReportGenerator : TRptPresupuestosCliente;
|
||||||
begin
|
begin
|
||||||
AReportGenerator := TRptPresupuestosCliente.Create(nil);
|
AReportGenerator := TRptPresupuestosCliente.Create(nil);
|
||||||
try
|
try
|
||||||
Result := AReportGenerator.GenerarPresupuestoEnPDF(ListaID);
|
Result := AReportGenerator.GenerarPresupuestoEnPDF(ListaID, VerLogotipo);
|
||||||
finally
|
finally
|
||||||
FreeAndNIL(AReportGenerator);
|
FreeAndNIL(AReportGenerator);
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -5,7 +5,6 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
|||||||
ClientHeight = 676
|
ClientHeight = 676
|
||||||
ClientWidth = 848
|
ClientWidth = 848
|
||||||
OnClose = CustomEditorClose
|
OnClose = CustomEditorClose
|
||||||
ExplicitTop = -147
|
|
||||||
ExplicitWidth = 856
|
ExplicitWidth = 856
|
||||||
ExplicitHeight = 710
|
ExplicitHeight = 710
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
@ -232,57 +231,57 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente
|
|||||||
ExplicitWidth = 58
|
ExplicitWidth = 58
|
||||||
end
|
end
|
||||||
inherited UpDown1: TUpDown
|
inherited UpDown1: TUpDown
|
||||||
Left = 587
|
Left = 571
|
||||||
Top = 0
|
Top = 0
|
||||||
ExplicitLeft = 587
|
ExplicitLeft = 571
|
||||||
ExplicitTop = 0
|
ExplicitTop = 0
|
||||||
end
|
end
|
||||||
inherited ToolButton13: TToolButton
|
inherited ToolButton13: TToolButton
|
||||||
Left = 604
|
Left = 588
|
||||||
Top = 0
|
Top = 0
|
||||||
ExplicitLeft = 604
|
ExplicitLeft = 588
|
||||||
ExplicitTop = 0
|
ExplicitTop = 0
|
||||||
end
|
end
|
||||||
inherited ToolButton6: TToolButton
|
inherited ToolButton6: TToolButton
|
||||||
Left = 612
|
Left = 596
|
||||||
Top = 0
|
Top = 0
|
||||||
ExplicitLeft = 612
|
ExplicitLeft = 596
|
||||||
ExplicitTop = 0
|
ExplicitTop = 0
|
||||||
end
|
end
|
||||||
inherited ToolButton7: TToolButton
|
inherited ToolButton7: TToolButton
|
||||||
Left = 646
|
Left = 630
|
||||||
Top = 0
|
Top = 0
|
||||||
ExplicitLeft = 646
|
ExplicitLeft = 630
|
||||||
ExplicitTop = 0
|
ExplicitTop = 0
|
||||||
end
|
end
|
||||||
inherited ToolButton8: TToolButton
|
inherited ToolButton8: TToolButton
|
||||||
Left = 680
|
Left = 664
|
||||||
Top = 0
|
Top = 0
|
||||||
ExplicitLeft = 680
|
ExplicitLeft = 664
|
||||||
ExplicitTop = 0
|
ExplicitTop = 0
|
||||||
end
|
end
|
||||||
inherited ToolButton12: TToolButton
|
inherited ToolButton12: TToolButton
|
||||||
Left = 714
|
Left = 698
|
||||||
Top = 0
|
Top = 0
|
||||||
ExplicitLeft = 714
|
ExplicitLeft = 698
|
||||||
ExplicitTop = 0
|
ExplicitTop = 0
|
||||||
end
|
end
|
||||||
inherited ToolButton9: TToolButton
|
inherited ToolButton9: TToolButton
|
||||||
Left = 722
|
Left = 706
|
||||||
Top = 0
|
Top = 0
|
||||||
ExplicitLeft = 722
|
ExplicitLeft = 706
|
||||||
ExplicitTop = 0
|
ExplicitTop = 0
|
||||||
end
|
end
|
||||||
inherited ToolButton10: TToolButton
|
inherited ToolButton10: TToolButton
|
||||||
Left = 756
|
Left = 740
|
||||||
Top = 0
|
Top = 0
|
||||||
ExplicitLeft = 756
|
ExplicitLeft = 740
|
||||||
ExplicitTop = 0
|
ExplicitTop = 0
|
||||||
end
|
end
|
||||||
inherited ToolButton11: TToolButton
|
inherited ToolButton11: TToolButton
|
||||||
Left = 790
|
Left = 774
|
||||||
Top = 0
|
Top = 0
|
||||||
ExplicitLeft = 790
|
ExplicitLeft = 774
|
||||||
ExplicitTop = 0
|
ExplicitTop = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -284,10 +284,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorPresupuestoCliente.ImprimirInterno;
|
procedure TfEditorPresupuestoCliente.ImprimirInterno;
|
||||||
|
var
|
||||||
|
AVerLogotipo: Boolean;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
AVerLogotipo := True;
|
||||||
if not Modified then
|
if not Modified then
|
||||||
FController.Print(FPresupuesto);
|
begin
|
||||||
|
AVerLogotipo := (Application.MessageBox('¿Desea imprimir el documento con logotipo?', 'Atención', MB_YESNO) = IDYES);
|
||||||
|
FController.Print(FPresupuesto, False, AVerLogotipo);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorPresupuestoCliente.OnClienteChanged(Sender: TObject);
|
procedure TfEditorPresupuestoCliente.OnClienteChanged(Sender: TObject);
|
||||||
@ -345,10 +351,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfEditorPresupuestoCliente.PrevisualizarInterno;
|
procedure TfEditorPresupuestoCliente.PrevisualizarInterno;
|
||||||
|
var
|
||||||
|
AVerLogotipo: Boolean;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
AVerLogotipo := True;
|
||||||
if not Modified then
|
if not Modified then
|
||||||
FController.Preview(FPresupuesto);
|
begin
|
||||||
|
AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el documento con logotipo?', 'Atención', MB_YESNO) = IDYES);
|
||||||
|
FController.Preview(FPresupuesto, False, AVerLogotipo);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TfEditorPresupuestoCliente.PuedoImprimir: Boolean;
|
function TfEditorPresupuestoCliente.PuedoImprimir: Boolean;
|
||||||
|
|||||||
@ -484,9 +484,11 @@ var
|
|||||||
Respuesta : Integer;
|
Respuesta : Integer;
|
||||||
APresupuestos: IBizPresupuestoCliente;
|
APresupuestos: IBizPresupuestoCliente;
|
||||||
AllItems: Boolean;
|
AllItems: Boolean;
|
||||||
|
AVerLogotipo: Boolean;
|
||||||
begin
|
begin
|
||||||
APresupuestos := Nil;
|
APresupuestos := Nil;
|
||||||
AllItems := False;
|
AllItems := False;
|
||||||
|
AVerLogotipo := True;
|
||||||
|
|
||||||
if MultiSelect and Assigned(ViewGrid) then
|
if MultiSelect and Assigned(ViewGrid) then
|
||||||
AllItems := (ViewGrid.NumSeleccionados > 1);
|
AllItems := (ViewGrid.NumSeleccionados > 1);
|
||||||
@ -513,7 +515,10 @@ begin
|
|||||||
APresupuestos := Presupuestos;
|
APresupuestos := Presupuestos;
|
||||||
|
|
||||||
if Assigned(APresupuestos) then
|
if Assigned(APresupuestos) then
|
||||||
FController.Print(APresupuestos, AllItems);
|
begin
|
||||||
|
AVerLogotipo := (Application.MessageBox('¿Desea imprimir el documento con logotipo?', 'Atención', MB_YESNO) = IDYES);
|
||||||
|
FController.Print(APresupuestos, AllItems, AVerLogotipo);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -557,9 +562,11 @@ var
|
|||||||
Respuesta : Integer;
|
Respuesta : Integer;
|
||||||
APresupuestos: IBizPresupuestoCliente;
|
APresupuestos: IBizPresupuestoCliente;
|
||||||
AllItems: Boolean;
|
AllItems: Boolean;
|
||||||
|
AVerLogotipo: Boolean;
|
||||||
begin
|
begin
|
||||||
APresupuestos := Nil;
|
APresupuestos := Nil;
|
||||||
AllItems := False;
|
AllItems := False;
|
||||||
|
AVerLogotipo := True;
|
||||||
|
|
||||||
if MultiSelect and Assigned(ViewGrid) then
|
if MultiSelect and Assigned(ViewGrid) then
|
||||||
AllItems := (ViewGrid.NumSeleccionados > 1);
|
AllItems := (ViewGrid.NumSeleccionados > 1);
|
||||||
@ -586,7 +593,10 @@ begin
|
|||||||
APresupuestos := Presupuestos;
|
APresupuestos := Presupuestos;
|
||||||
|
|
||||||
if Assigned(APresupuestos) then
|
if Assigned(APresupuestos) then
|
||||||
FController.Preview(APresupuestos, AllItems);
|
begin
|
||||||
|
AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el documento con logotipo?', 'Atención', MB_YESNO) = IDYES);
|
||||||
|
FController.Preview(APresupuestos, AllItems, AVerLogotipo);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -308,6 +308,8 @@
|
|||||||
</Parameter>
|
</Parameter>
|
||||||
<Parameter Name="ListaID" DataType="TIntegerArray" Flag="In" >
|
<Parameter Name="ListaID" DataType="TIntegerArray" Flag="In" >
|
||||||
</Parameter>
|
</Parameter>
|
||||||
|
<Parameter Name="VerLogotipo" DataType="Boolean" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
</Parameters>
|
</Parameters>
|
||||||
</Operation>
|
</Operation>
|
||||||
<Operation Name="GenerarInformeEnPDF" UID="{16270F10-DFBD-469A-A401-033B4CBA4381}">
|
<Operation Name="GenerarInformeEnPDF" UID="{16270F10-DFBD-469A-A401-033B4CBA4381}">
|
||||||
@ -316,6 +318,8 @@
|
|||||||
</Parameter>
|
</Parameter>
|
||||||
<Parameter Name="ListaID" DataType="TIntegerArray" Flag="In" >
|
<Parameter Name="ListaID" DataType="TIntegerArray" Flag="In" >
|
||||||
</Parameter>
|
</Parameter>
|
||||||
|
<Parameter Name="VerLogotipo" DataType="Boolean" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
</Parameters>
|
</Parameters>
|
||||||
</Operation>
|
</Operation>
|
||||||
</Operations>
|
</Operations>
|
||||||
|
|||||||
@ -548,8 +548,8 @@ type
|
|||||||
{ IsrvPresupuestosCliente }
|
{ IsrvPresupuestosCliente }
|
||||||
IsrvPresupuestosCliente = interface(IDataAbstractService)
|
IsrvPresupuestosCliente = interface(IDataAbstractService)
|
||||||
['{8A06D5A7-8461-4F6E-8A8B-EC49C84C45D1}']
|
['{8A06D5A7-8461-4F6E-8A8B-EC49C84C45D1}']
|
||||||
function GenerarInforme(const ListaID: TIntegerArray): Binary;
|
function GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary;
|
||||||
function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary;
|
function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ CosrvPresupuestosCliente }
|
{ CosrvPresupuestosCliente }
|
||||||
@ -562,8 +562,8 @@ type
|
|||||||
protected
|
protected
|
||||||
function __GetInterfaceName:string; override;
|
function __GetInterfaceName:string; override;
|
||||||
|
|
||||||
function GenerarInforme(const ListaID: TIntegerArray): Binary;
|
function GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary;
|
||||||
function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary;
|
function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ IsrvPedidosProveedor }
|
{ IsrvPedidosProveedor }
|
||||||
@ -1817,12 +1817,13 @@ begin
|
|||||||
result := 'srvPresupuestosCliente';
|
result := 'srvPresupuestosCliente';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TsrvPresupuestosCliente_Proxy.GenerarInforme(const ListaID: TIntegerArray): Binary;
|
function TsrvPresupuestosCliente_Proxy.GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary;
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
result := nil;
|
result := nil;
|
||||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInforme');
|
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInforme');
|
||||||
__Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
__Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
||||||
|
__Message.Write('VerLogotipo', TypeInfo(Boolean), VerLogotipo, []);
|
||||||
__Message.Finalize;
|
__Message.Finalize;
|
||||||
|
|
||||||
__TransportChannel.Dispatch(__Message);
|
__TransportChannel.Dispatch(__Message);
|
||||||
@ -1834,12 +1835,13 @@ begin
|
|||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TsrvPresupuestosCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary;
|
function TsrvPresupuestosCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary;
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
result := nil;
|
result := nil;
|
||||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnPDF');
|
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnPDF');
|
||||||
__Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
__Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
||||||
|
__Message.Write('VerLogotipo', TypeInfo(Boolean), VerLogotipo, []);
|
||||||
__Message.Finalize;
|
__Message.Finalize;
|
||||||
|
|
||||||
__TransportChannel.Dispatch(__Message);
|
__TransportChannel.Dispatch(__Message);
|
||||||
|
|||||||
@ -923,9 +923,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TsrvPresupuestosCliente_Invoker.Invoke_GenerarInforme(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure TsrvPresupuestosCliente_Invoker.Invoke_GenerarInforme(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
{ function GenerarInforme(const ListaID: TIntegerArray): Binary; }
|
{ function GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; }
|
||||||
var
|
var
|
||||||
ListaID: FactuGES_Intf.TIntegerArray;
|
ListaID: FactuGES_Intf.TIntegerArray;
|
||||||
|
VerLogotipo: Boolean;
|
||||||
lResult: Binary;
|
lResult: Binary;
|
||||||
__lObjectDisposer: TROObjectDisposer;
|
__lObjectDisposer: TROObjectDisposer;
|
||||||
begin
|
begin
|
||||||
@ -933,8 +934,9 @@ begin
|
|||||||
lResult := nil;
|
lResult := nil;
|
||||||
try
|
try
|
||||||
__Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
__Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
||||||
|
__Message.Read('VerLogotipo', TypeInfo(Boolean), VerLogotipo, []);
|
||||||
|
|
||||||
lResult := (__Instance as IsrvPresupuestosCliente).GenerarInforme(ListaID);
|
lResult := (__Instance as IsrvPresupuestosCliente).GenerarInforme(ListaID, VerLogotipo);
|
||||||
|
|
||||||
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvPresupuestosCliente', 'GenerarInformeResponse');
|
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvPresupuestosCliente', 'GenerarInformeResponse');
|
||||||
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
||||||
@ -953,9 +955,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TsrvPresupuestosCliente_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure TsrvPresupuestosCliente_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
{ function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; }
|
{ function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; }
|
||||||
var
|
var
|
||||||
ListaID: FactuGES_Intf.TIntegerArray;
|
ListaID: FactuGES_Intf.TIntegerArray;
|
||||||
|
VerLogotipo: Boolean;
|
||||||
lResult: Binary;
|
lResult: Binary;
|
||||||
__lObjectDisposer: TROObjectDisposer;
|
__lObjectDisposer: TROObjectDisposer;
|
||||||
begin
|
begin
|
||||||
@ -963,8 +966,9 @@ begin
|
|||||||
lResult := nil;
|
lResult := nil;
|
||||||
try
|
try
|
||||||
__Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
__Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
||||||
|
__Message.Read('VerLogotipo', TypeInfo(Boolean), VerLogotipo, []);
|
||||||
|
|
||||||
lResult := (__Instance as IsrvPresupuestosCliente).GenerarInformeEnPDF(ListaID);
|
lResult := (__Instance as IsrvPresupuestosCliente).GenerarInformeEnPDF(ListaID, VerLogotipo);
|
||||||
|
|
||||||
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvPresupuestosCliente', 'GenerarInformeEnPDFResponse');
|
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvPresupuestosCliente', 'GenerarInformeEnPDFResponse');
|
||||||
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user