Se adaptan pedidos de cliente, albaranes de cliente a poder enviarlos por correo electronico, se arreglan la logica al generar todos y cada uno de los informes de pedido, albaranes, facturas, etc, para que se haga un begintransaction y un rollbacktransaction porque sino llegaba un momento en el que generar informes no se podia porque daba un error de transaccion activa
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@297 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
parent
073d29872a
commit
5d1ba11799
Binary file not shown.
@ -148,7 +148,7 @@
|
|||||||
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
|
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
|
||||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||||
<VersionInfo Name="MajorVer">3</VersionInfo>
|
<VersionInfo Name="MajorVer">3</VersionInfo>
|
||||||
<VersionInfo Name="MinorVer">1</VersionInfo>
|
<VersionInfo Name="MinorVer">2</VersionInfo>
|
||||||
<VersionInfo Name="Release">0</VersionInfo>
|
<VersionInfo Name="Release">0</VersionInfo>
|
||||||
<VersionInfo Name="Build">0</VersionInfo>
|
<VersionInfo Name="Build">0</VersionInfo>
|
||||||
<VersionInfo Name="Debug">False</VersionInfo>
|
<VersionInfo Name="Debug">False</VersionInfo>
|
||||||
@ -162,7 +162,7 @@
|
|||||||
<VersionInfoKeys>
|
<VersionInfoKeys>
|
||||||
<VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys>
|
<VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys>
|
||||||
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
||||||
<VersionInfoKeys Name="FileVersion">3.1.0.0</VersionInfoKeys>
|
<VersionInfoKeys Name="FileVersion">3.2.0.0</VersionInfoKeys>
|
||||||
<VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys>
|
<VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys>
|
||||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
||||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
MAINICON ICON "c:\Codigo Luis Leon\Source\Iconos\Factuges.ico"
|
MAINICON ICON "c:\Codigo Luis Leon\Source\Iconos\Factuges.ico"
|
||||||
1 VERSIONINFO
|
1 VERSIONINFO
|
||||||
FILEVERSION 3,0,9,0
|
FILEVERSION 3,2,0,0
|
||||||
PRODUCTVERSION 3,0,9,0
|
PRODUCTVERSION 3,2,0,0
|
||||||
FILEFLAGSMASK 0x3FL
|
FILEFLAGSMASK 0x3FL
|
||||||
FILEFLAGS 0x00L
|
FILEFLAGS 0x00L
|
||||||
FILEOS 0x40004L
|
FILEOS 0x40004L
|
||||||
@ -13,9 +13,9 @@ BEGIN
|
|||||||
BLOCK "0C0A04E4"
|
BLOCK "0C0A04E4"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Rodax Software S.L.\0"
|
VALUE "CompanyName", "Rodax Software S.L.\0"
|
||||||
VALUE "FileVersion", "3.0.9.0\0"
|
VALUE "FileVersion", "3.2.0.0\0"
|
||||||
VALUE "InternalName", "FactuGES\0"
|
VALUE "InternalName", "FactuGES\0"
|
||||||
VALUE "ProductVersion", "3.0.9.0\0"
|
VALUE "ProductVersion", "3.1.0.0\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
Binary file not shown.
@ -54,6 +54,7 @@ contains
|
|||||||
uAlbaranesClienteReportController in 'uAlbaranesClienteReportController.pas',
|
uAlbaranesClienteReportController in 'uAlbaranesClienteReportController.pas',
|
||||||
uIEditorAlbaranesClientePreview in 'View\uIEditorAlbaranesClientePreview.pas',
|
uIEditorAlbaranesClientePreview in 'View\uIEditorAlbaranesClientePreview.pas',
|
||||||
uIEditorAlbaranesDevCliente in 'View\uIEditorAlbaranesDevCliente.pas',
|
uIEditorAlbaranesDevCliente in 'View\uIEditorAlbaranesDevCliente.pas',
|
||||||
uIEditorAlbaranDevCliente in 'View\uIEditorAlbaranDevCliente.pas';
|
uIEditorAlbaranDevCliente in 'View\uIEditorAlbaranDevCliente.pas',
|
||||||
|
uIDialogListaAlbaranesCliEnvioEMail in 'View\uIDialogListaAlbaranesCliEnvioEMail.pas';
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -0,0 +1,21 @@
|
|||||||
|
unit uIDialogListaAlbaranesCliEnvioEMail;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
uBizAlbaranesCliente, uAlbaranesClienteController;
|
||||||
|
|
||||||
|
type
|
||||||
|
IDialogListaAlbaranesCliEnvioEMail = interface
|
||||||
|
['{2C6DBF4E-28D8-49A6-9FF3-13AA5C6F6CF1}']
|
||||||
|
function GetAlbaranes: IBizAlbaranCliente;
|
||||||
|
procedure SetAlbaranes(const Value: IBizAlbaranCliente);
|
||||||
|
property Albaranes: IBizAlbaranCliente read GetAlbaranes write SetAlbaranes;
|
||||||
|
function ShowModal : Integer;
|
||||||
|
procedure Release;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
end.
|
||||||
@ -65,6 +65,13 @@ type
|
|||||||
function ValidarSituacion(ASituacion: String;
|
function ValidarSituacion(ASituacion: String;
|
||||||
AFechaEnvio : TDateTime = 0;
|
AFechaEnvio : TDateTime = 0;
|
||||||
AFechaRecibido : TDateTime = 0) : Boolean;
|
AFechaRecibido : TDateTime = 0) : Boolean;
|
||||||
|
|
||||||
|
function EnviarEmailAlbaranes(AAlbaranes : IBizAlbaranCliente): Boolean;
|
||||||
|
function GenerarEmailAlbaran(AAlbaran : IBizAlbaranCliente): Boolean;
|
||||||
|
function EnviarAlbaranPorEMail(AAlbaran: IBizAlbaranCliente;
|
||||||
|
const AEnviarDirectamente: Boolean = True;
|
||||||
|
const ADireccionEMail: String = ''; const AAsuntoEMail: String = '';
|
||||||
|
const ATextoEMail: String = ''): Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TAlbaranesClienteController = class(TObservador, IAlbaranesClienteController)
|
TAlbaranesClienteController = class(TObservador, IAlbaranesClienteController)
|
||||||
@ -143,6 +150,13 @@ type
|
|||||||
function Print(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false): Boolean;
|
function Print(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false): Boolean;
|
||||||
procedure EtiquetasPreview(AAlbaran : IBizAlbaranCliente; Const withRefCliente: Boolean);
|
procedure EtiquetasPreview(AAlbaran : IBizAlbaranCliente; Const withRefCliente: Boolean);
|
||||||
procedure EtiquetasPrint(AAlbaran : IBizAlbaranCliente; Const withRefCliente: Boolean);
|
procedure EtiquetasPrint(AAlbaran : IBizAlbaranCliente; Const withRefCliente: Boolean);
|
||||||
|
|
||||||
|
function EnviarEmailAlbaranes(AAlbaranes : IBizAlbaranCliente): Boolean;
|
||||||
|
function GenerarEmailAlbaran(AAlbaran : IBizAlbaranCliente): Boolean;
|
||||||
|
function EnviarAlbaranPorEMail(AAlbaran: IBizAlbaranCliente;
|
||||||
|
const AEnviarDirectamente: Boolean = True;
|
||||||
|
const ADireccionEMail: String = ''; const AAsuntoEMail: String = '';
|
||||||
|
const ATextoEMail: String = ''): Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -156,7 +170,9 @@ uses
|
|||||||
uIEditorElegirAlbaranesCliente, uIEditorDireccionEntregaAlbaranCliente,
|
uIEditorElegirAlbaranesCliente, uIEditorDireccionEntregaAlbaranCliente,
|
||||||
schContactosClient_Intf, uAlbaranesClienteReportController, uControllerDetallesBase,
|
schContactosClient_Intf, uAlbaranesClienteReportController, uControllerDetallesBase,
|
||||||
uPedidosClienteController, uBizPedidosCliente, uBizDetallesPedidoCliente,
|
uPedidosClienteController, uBizPedidosCliente, uBizDetallesPedidoCliente,
|
||||||
schPedidosClienteClient_Intf, uDialogUtils, Windows, Forms, Dialogs, uGUIBase;
|
schPedidosClienteClient_Intf, uDialogUtils, Windows, Forms, Dialogs, uGUIBase,
|
||||||
|
|
||||||
|
uIDialogListaAlbaranesCliEnvioEMail, uSistemaFunc, uStringsUtils, uDialogElegirEMail, uEMailUtils;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -742,6 +758,104 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TAlbaranesClienteController.EnviarAlbaranPorEMail(
|
||||||
|
AAlbaran: IBizAlbaranCliente; const AEnviarDirectamente: Boolean;
|
||||||
|
const ADireccionEMail, AAsuntoEMail, ATextoEMail: String): Boolean;
|
||||||
|
var
|
||||||
|
AReportController : IAlbaranesClienteReportController;
|
||||||
|
AFicheroTMP : TFileName;
|
||||||
|
AEMail : String;
|
||||||
|
AAsunto : String;
|
||||||
|
AListaEmail : TStringList;
|
||||||
|
begin
|
||||||
|
|
||||||
|
if not Assigned(AAlbaran) then
|
||||||
|
raise Exception.Create ('Albaran no asignada (EnviarAlbaranPorEMail)');
|
||||||
|
|
||||||
|
if AAlbaran.DataTable.Active then
|
||||||
|
AAlbaran.DataTable.Active := True;
|
||||||
|
|
||||||
|
RecuperarCliente(AAlbaran);
|
||||||
|
AAlbaran.Cliente.DataTable.Active := True;
|
||||||
|
|
||||||
|
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(AAlbaran.REFERENCIA));
|
||||||
|
|
||||||
|
if not EsCadenaVacia(ADireccionEMail) then
|
||||||
|
AEMail := ADireccionEMail
|
||||||
|
else begin
|
||||||
|
AListaEmail := TStringList.Create;
|
||||||
|
try
|
||||||
|
if not EsCadenaVacia(AAlbaran.Cliente.EMAIL_ADMINISTRACION) then
|
||||||
|
AListaEmail.Add(AAlbaran.Cliente.EMAIL_ADMINISTRACION);
|
||||||
|
|
||||||
|
if not ElegirEMail(AListaEmail, AEMail) then
|
||||||
|
Exit;
|
||||||
|
finally
|
||||||
|
FreeANDNIL(AListaEmail);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if not EsCadenaVacia(AAsuntoEMail) then
|
||||||
|
AAsunto := AAsuntoEMail
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if (AAlbaran.TIPO = CTE_TIPO_ALBARAN_DEV) then
|
||||||
|
AAsunto := 'Orden devolución ' + AAlbaran.REFERENCIA
|
||||||
|
else
|
||||||
|
AAsunto := 'Albarán ' + AAlbaran.REFERENCIA;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ShowHourglassCursor;
|
||||||
|
Application.ProcessMessages;
|
||||||
|
|
||||||
|
AReportController := TAlbaranesClienteReportController.Create;
|
||||||
|
try
|
||||||
|
AReportController.ExportToPDF(AAlbaran.ID, AFicheroTMP);
|
||||||
|
Result := EnviarEMailMAPI(AAsunto, ATextoEMail, AFicheroTMP, '', '', AAlbaran.Cliente.NOMBRE, AEMail, AEnviarDirectamente);
|
||||||
|
if Result then
|
||||||
|
// _AnadirMarcaEnvioCorreo(AAlbaran);
|
||||||
|
finally
|
||||||
|
SysUtils.DeleteFile(AFicheroTMP);
|
||||||
|
AReportController := NIL;
|
||||||
|
HideHourglassCursor;
|
||||||
|
Application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TAlbaranesClienteController.EnviarEmailAlbaranes(
|
||||||
|
AAlbaranes: IBizAlbaranCliente): Boolean;
|
||||||
|
var
|
||||||
|
ADialog : IDialogListaAlbaranesCliEnvioEMail;
|
||||||
|
ARespuesta : Integer;
|
||||||
|
begin
|
||||||
|
ADialog := NIL;
|
||||||
|
|
||||||
|
if not Assigned(AAlbaranes) then
|
||||||
|
raise Exception.Create ('Albaranes no asignadas (EnviarAlbaranesCliPorEMail)');
|
||||||
|
|
||||||
|
if AAlbaranes.DataTable.Active then
|
||||||
|
AAlbaranes.DataTable.Active := True;
|
||||||
|
|
||||||
|
ShowHourglassCursor;
|
||||||
|
try
|
||||||
|
CreateEditor('DialogListaAlbaranesCliEnvioEMail', IDialogListaAlbaranesCliEnvioEMail, ADialog);
|
||||||
|
|
||||||
|
if Assigned(ADialog) then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADialog.Albaranes := AAlbaranes;
|
||||||
|
ARespuesta := ADialog.ShowModal;
|
||||||
|
Result := (ARespuesta = mrOK)
|
||||||
|
finally
|
||||||
|
ADialog.Release;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
ADialog := NIL;
|
||||||
|
HideHourglassCursor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TAlbaranesClienteController.EsEliminable(AAlbaran: IBizAlbaranCliente): Boolean;
|
function TAlbaranesClienteController.EsEliminable(AAlbaran: IBizAlbaranCliente): Boolean;
|
||||||
begin
|
begin
|
||||||
if not Assigned(AAlbaran) then
|
if not Assigned(AAlbaran) then
|
||||||
@ -1042,6 +1156,24 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TAlbaranesClienteController.GenerarEmailAlbaran(
|
||||||
|
AAlbaran: IBizAlbaranCliente): Boolean;
|
||||||
|
begin
|
||||||
|
if not Assigned(AAlbaran) then
|
||||||
|
raise Exception.Create ('Pedidos no asignadas (GenerarEmailPedido)');
|
||||||
|
|
||||||
|
if AAlbaran.DataTable.Active then
|
||||||
|
AAlbaran.DataTable.Active := True;
|
||||||
|
|
||||||
|
ShowHourglassCursor;
|
||||||
|
try
|
||||||
|
RecuperarCliente(AAlbaran);
|
||||||
|
EnviarAlbaranPorEMail(AAlbaran, False, AAlbaran.Cliente.EMAIL_ADMINISTRACION);
|
||||||
|
finally
|
||||||
|
HideHourglassCursor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TAlbaranesClienteController.GenerarOrdenDev(AAlbaran: IBizAlbaranCliente): IBizAlbaranCliente;
|
function TAlbaranesClienteController.GenerarOrdenDev(AAlbaran: IBizAlbaranCliente): IBizAlbaranCliente;
|
||||||
var
|
var
|
||||||
AOrden : IBizAlbaranCliente;
|
AOrden : IBizAlbaranCliente;
|
||||||
|
|||||||
@ -14,6 +14,7 @@ type
|
|||||||
function Print(const AID : String): Boolean;
|
function Print(const AID : String): Boolean;
|
||||||
procedure EtiquetasPreview(const AID : integer; Const withRefCliente: Boolean);
|
procedure EtiquetasPreview(const AID : integer; Const withRefCliente: Boolean);
|
||||||
procedure EtiquetasPrint(const AID : integer; Const withRefCliente: Boolean);
|
procedure EtiquetasPrint(const AID : integer; Const withRefCliente: Boolean);
|
||||||
|
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TAlbaranesClienteReportController = class(TInterfacedObject, IAlbaranesClienteReportController)
|
TAlbaranesClienteReportController = class(TInterfacedObject, IAlbaranesClienteReportController)
|
||||||
@ -29,6 +30,7 @@ type
|
|||||||
function Print(const AID : String): Boolean;
|
function Print(const AID : String): Boolean;
|
||||||
procedure EtiquetasPreview(const AID : integer; const withRefCliente: Boolean);
|
procedure EtiquetasPreview(const AID : integer; const withRefCliente: Boolean);
|
||||||
procedure EtiquetasPrint(const AID : integer; const withRefCliente: Boolean);
|
procedure EtiquetasPrint(const AID : integer; const withRefCliente: Boolean);
|
||||||
|
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -37,7 +39,7 @@ implementation
|
|||||||
uses
|
uses
|
||||||
uROTypes, uEditorRegistryUtils, uIEditorAlbaranesClientePreview,
|
uROTypes, uEditorRegistryUtils, uIEditorAlbaranesClientePreview,
|
||||||
uEditorPreview, uDataModuleAlbaranesCliente, uEditorBase, cxControls,
|
uEditorPreview, uDataModuleAlbaranesCliente, uEditorBase, cxControls,
|
||||||
schAlbaranesClienteClient_Intf;
|
schAlbaranesClienteClient_Intf, uStringsUtils;
|
||||||
|
|
||||||
{ TAlbaranesClienteReportController }
|
{ TAlbaranesClienteReportController }
|
||||||
|
|
||||||
@ -107,6 +109,28 @@ begin
|
|||||||
AEditor.Print
|
AEditor.Print
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TAlbaranesClienteReportController.ExportToPDF(const AID: Integer; const AFileName: String): Boolean;
|
||||||
|
var
|
||||||
|
AStream: Binary;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
if EsCadenaVacia(AFileName) then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
ShowHourglassCursor;
|
||||||
|
try
|
||||||
|
AStream := FDataModule.GetRptPDF(AID, True);
|
||||||
|
try
|
||||||
|
AStream.SaveToFile(AFileName);
|
||||||
|
Result := True;
|
||||||
|
finally
|
||||||
|
FreeAndNil(AStream);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
HideHourglassCursor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TAlbaranesClienteReportController.Preview(const AID : String);
|
procedure TAlbaranesClienteReportController.Preview(const AID : String);
|
||||||
var
|
var
|
||||||
AStream: Binary;
|
AStream: Binary;
|
||||||
|
|||||||
@ -40,6 +40,7 @@ type
|
|||||||
// Report
|
// Report
|
||||||
function GetReport(const AID: String; const ShowLogotipo: Boolean = False): Binary;
|
function GetReport(const AID: String; const ShowLogotipo: Boolean = False): Binary;
|
||||||
function GetEtiquetas(const AID: Integer; withRefCliente: Boolean): Binary;
|
function GetEtiquetas(const AID: Integer; withRefCliente: Boolean): Binary;
|
||||||
|
function GetRptPDF(const AID: Integer; const ShowLogotipo: Boolean = False): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -81,6 +82,20 @@ begin
|
|||||||
Result := (RORemoteService as IsrvAlbaranesCliente).GenerateReport(AID, ShowLogotipo)
|
Result := (RORemoteService as IsrvAlbaranesCliente).GenerateReport(AID, ShowLogotipo)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TDataModuleAlbaranesCliente.GetRptPDF(const AID: Integer;
|
||||||
|
const ShowLogotipo: Boolean): Binary;
|
||||||
|
var
|
||||||
|
AParam : TIntegerArray;
|
||||||
|
begin
|
||||||
|
AParam := TIntegerArray.Create;
|
||||||
|
try
|
||||||
|
AParam.Add(AID);
|
||||||
|
Result := (RORemoteService as IsrvAlbaranesCliente).GenerarReportPDF(AParam, ShowLogotipo)
|
||||||
|
finally
|
||||||
|
FreeANDNIL(AParam)
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TDataModuleAlbaranesCliente.NewItem: IBizAlbaranCliente;
|
function TDataModuleAlbaranesCliente.NewItem: IBizAlbaranCliente;
|
||||||
begin
|
begin
|
||||||
Result := GetItem(ID_NULO)
|
Result := GetItem(ID_NULO)
|
||||||
|
|||||||
@ -9,7 +9,8 @@ type
|
|||||||
IDataModuleAlbaranesClienteReport = interface
|
IDataModuleAlbaranesClienteReport = interface
|
||||||
['{42C55204-5AB9-403E-8385-1A62B02D8234}']
|
['{42C55204-5AB9-403E-8385-1A62B02D8234}']
|
||||||
function GetReport(const AID: String; const ShowLogotipo: Boolean = False): Binary;
|
function GetReport(const AID: String; const ShowLogotipo: Boolean = False): Binary;
|
||||||
function GetEtiquetas(const AID: Integer; withRefCliente: Boolean): Binary;
|
function GetEtiquetas(const AID: Integer; withRefCliente: Boolean): Binary;
|
||||||
|
function GetRptPDF(const AID: Integer; const ShowLogotipo: Boolean = False): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|||||||
@ -1404,4 +1404,18 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
|||||||
Left = 344
|
Left = 344
|
||||||
Top = 16
|
Top = 16
|
||||||
end
|
end
|
||||||
|
object frxPDFExport1: TfrxPDFExport
|
||||||
|
ShowDialog = False
|
||||||
|
UseFileCache = True
|
||||||
|
ShowProgress = False
|
||||||
|
PrintOptimized = True
|
||||||
|
Outline = True
|
||||||
|
Author = 'FactuGES'
|
||||||
|
Subject = 'FactuGES'
|
||||||
|
Background = False
|
||||||
|
Creator = 'FactuGES'
|
||||||
|
HTMLTags = True
|
||||||
|
Left = 360
|
||||||
|
Top = 344
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -7,7 +7,7 @@ uses
|
|||||||
Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
|
Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
|
||||||
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
|
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
|
||||||
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
|
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
|
||||||
uDAInterfaces;
|
uDAInterfaces, FactuGES_Intf, frxExportPDF;
|
||||||
|
|
||||||
type
|
type
|
||||||
TRptAlbaranesCliente = class(TDataModule)
|
TRptAlbaranesCliente = class(TDataModule)
|
||||||
@ -28,16 +28,18 @@ type
|
|||||||
schReport: TDASchema;
|
schReport: TDASchema;
|
||||||
DataDictionary: TDADataDictionary;
|
DataDictionary: TDADataDictionary;
|
||||||
frxReport: TfrxReport;
|
frxReport: TfrxReport;
|
||||||
|
frxPDFExport1: TfrxPDFExport;
|
||||||
procedure DataModuleCreate(Sender: TObject);
|
procedure DataModuleCreate(Sender: TObject);
|
||||||
procedure frxReportGetValue(const VarName: string; var Value: Variant);
|
procedure frxReportGetValue(const VarName: string; var Value: Variant);
|
||||||
private
|
private
|
||||||
FConnection: IDAConnection;
|
FConnection: IDAConnection;
|
||||||
FShowLogotipo: Boolean;
|
FShowLogotipo: Boolean;
|
||||||
//Genera cada uno de los albaranes a imprimir
|
//Genera cada uno de los albaranes a imprimir
|
||||||
procedure GenerarAlbaran(const ID: integer); overload;
|
procedure _GenerarAlbaran(const ID: integer); overload;
|
||||||
public
|
public
|
||||||
function GenerarAlbaran(const AID : String; const AConLogotipo: Boolean = False): Binary; overload;
|
function GenerarAlbaran(const AID : String; const AConLogotipo: Boolean = False): Binary; overload;
|
||||||
function GenerarEtiquetas(const AID : Integer; withRefCliente: Boolean): Binary;
|
function GenerarEtiquetas(const AID : Integer; withRefCliente: Boolean): Binary;
|
||||||
|
function GenerarReportEnPDF(const ListaID : TIntegerArray; const AConLogotipo: Boolean = False): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -74,21 +76,17 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
Result := Binary.Create;
|
Result := Binary.Create;
|
||||||
FConnection.BeginTransaction;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
FShowLogotipo := AConLogotipo;
|
FShowLogotipo := AConLogotipo;
|
||||||
ID_Albaranes := TStringList.Create;
|
ID_Albaranes := TStringList.Create;
|
||||||
ID_Albaranes.CommaText := AID;
|
ID_Albaranes.CommaText := AID;
|
||||||
|
|
||||||
//Vamos generando todos y cada uno de los albaranes recibidos
|
//Vamos generando todos y cada uno de los albaranes recibidos
|
||||||
for i := 0 to ID_Albaranes.Count - 1 do
|
for i := 0 to ID_Albaranes.Count - 1 do
|
||||||
GenerarAlbaran(StrToInt(ID_Albaranes.Strings[i]));
|
_GenerarAlbaran(StrToInt(ID_Albaranes.Strings[i]));
|
||||||
|
|
||||||
frxReport.PreviewPages.SaveToStream(Result);
|
frxReport.PreviewPages.SaveToStream(Result);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
FConnection.RollbackTransaction;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -98,13 +96,14 @@ begin
|
|||||||
Value := FShowLogotipo;
|
Value := FShowLogotipo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRptAlbaranesCliente.GenerarAlbaran(const ID: integer);
|
procedure TRptAlbaranesCliente._GenerarAlbaran(const ID: integer);
|
||||||
var
|
var
|
||||||
AStream: TMemoryStream;
|
AStream: TMemoryStream;
|
||||||
dsMaster: IDADataset;
|
dsMaster: IDADataset;
|
||||||
dsDetail: IDADataset;
|
dsDetail: IDADataset;
|
||||||
begin
|
begin
|
||||||
AStream := TMemoryStream.Create;
|
AStream := TMemoryStream.Create;
|
||||||
|
FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
|
|
||||||
try
|
try
|
||||||
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [ID]);
|
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [ID]);
|
||||||
@ -122,6 +121,7 @@ begin
|
|||||||
frxReport.PrepareReport(False);
|
frxReport.PrepareReport(False);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
|
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
AStream.Free;
|
AStream.Free;
|
||||||
dsMaster := Nil;
|
dsMaster := Nil;
|
||||||
dsDetail := Nil;
|
dsDetail := Nil;
|
||||||
@ -162,4 +162,22 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TRptAlbaranesCliente.GenerarReportEnPDF(const ListaID: TIntegerArray;
|
||||||
|
const AConLogotipo: Boolean): Binary;
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
FShowLogotipo := AConLogotipo;
|
||||||
|
Result := Binary.Create;
|
||||||
|
try
|
||||||
|
//Vamos generando todos y cada uno de los presupuestos recibidos
|
||||||
|
for i := 0 to ListaID.Count - 1 do
|
||||||
|
_GenerarAlbaran(ListaID.Items[i]);
|
||||||
|
|
||||||
|
frxPDFExport1.Stream := Result;
|
||||||
|
frxReport.Export(frxPDFExport1)
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -40,6 +40,7 @@ type
|
|||||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||||
function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary;
|
function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary;
|
||||||
function GenerateEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary;
|
function GenerateEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary;
|
||||||
|
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -82,6 +83,19 @@ begin
|
|||||||
bpAlbaranesCliente.BusinessRulesID := BIZ_SERVER_ALBARAN_CLIENTE;
|
bpAlbaranesCliente.BusinessRulesID := BIZ_SERVER_ALBARAN_CLIENTE;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TsrvAlbaranesCliente.GenerarReportPDF(const ListaID: TIntegerArray;
|
||||||
|
const ShowLogotipo: Boolean): Binary;
|
||||||
|
var
|
||||||
|
AReportGenerator : TRptAlbaranesCliente;
|
||||||
|
begin
|
||||||
|
AReportGenerator := TRptAlbaranesCliente.Create(nil);
|
||||||
|
try
|
||||||
|
Result := AReportGenerator.GenerarReportEnPDF(ListaID, ShowLogotipo);
|
||||||
|
finally
|
||||||
|
FreeAndNIL(AReportGenerator);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TsrvAlbaranesCliente.GenerateEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary;
|
function TsrvAlbaranesCliente.GenerateEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary;
|
||||||
var
|
var
|
||||||
AReportGenerator : TRptAlbaranesCliente;
|
AReportGenerator : TRptAlbaranesCliente;
|
||||||
|
|||||||
@ -100,7 +100,8 @@ requires
|
|||||||
Inventario_controller,
|
Inventario_controller,
|
||||||
JSDialog100,
|
JSDialog100,
|
||||||
PedCli_AlbCli_relation,
|
PedCli_AlbCli_relation,
|
||||||
AlbCli_FacCli_relation;
|
AlbCli_FacCli_relation,
|
||||||
|
dxGDIPlusD10;
|
||||||
|
|
||||||
contains
|
contains
|
||||||
uAlbaranesClienteViewRegister in 'uAlbaranesClienteViewRegister.pas',
|
uAlbaranesClienteViewRegister in 'uAlbaranesClienteViewRegister.pas',
|
||||||
@ -117,6 +118,7 @@ contains
|
|||||||
uEditorAlbaranesDevCliente in 'uEditorAlbaranesDevCliente.pas' {fEditorAlbaranesDevCliente: TCustomEditor},
|
uEditorAlbaranesDevCliente in 'uEditorAlbaranesDevCliente.pas' {fEditorAlbaranesDevCliente: TCustomEditor},
|
||||||
uViewAlbaranesDevCliente in 'uViewAlbaranesDevCliente.pas' {frViewAlbaranesDevCliente: TCustomView},
|
uViewAlbaranesDevCliente in 'uViewAlbaranesDevCliente.pas' {frViewAlbaranesDevCliente: TCustomView},
|
||||||
uEditorAlbaranDevCliente in 'uEditorAlbaranDevCliente.pas' {fEditorAlbaranDevCliente: TCustomEditor},
|
uEditorAlbaranDevCliente in 'uEditorAlbaranDevCliente.pas' {fEditorAlbaranDevCliente: TCustomEditor},
|
||||||
uViewAlbaranDevCliente in 'uViewAlbaranDevCliente.pas' {frViewAlbaranDevCliente: TCustomView};
|
uViewAlbaranDevCliente in 'uViewAlbaranDevCliente.pas' {frViewAlbaranDevCliente: TCustomView},
|
||||||
|
uDialogListaAlbaranesCliEnvioEMail in 'uDialogListaAlbaranesCliEnvioEMail.pas' {fDialogListaAlbaranesCliEnvioEMail: TCustomEditor};
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -10,7 +10,8 @@ implementation
|
|||||||
uses
|
uses
|
||||||
uEditorRegistryUtils, uEditorAlbaranesCliente, uEditorAlbaranCliente,
|
uEditorRegistryUtils, uEditorAlbaranesCliente, uEditorAlbaranCliente,
|
||||||
uEditorElegirArticulosAlbaranCliente, uEditorAlbaranesClienteReport,
|
uEditorElegirArticulosAlbaranCliente, uEditorAlbaranesClienteReport,
|
||||||
uEditorElegirAlbaranesCliente, uEditorAlbaranesDevCliente, uEditorAlbaranDevCliente;
|
uEditorElegirAlbaranesCliente, uEditorAlbaranesDevCliente, uEditorAlbaranDevCliente,
|
||||||
|
uDialogListaAlbaranesCliEnvioEMail;
|
||||||
|
|
||||||
procedure RegisterViews;
|
procedure RegisterViews;
|
||||||
begin
|
begin
|
||||||
@ -21,6 +22,7 @@ begin
|
|||||||
EditorRegistry.RegisterClass(TfEditorElegirArticulosAlbaranCliente, 'EditorElegirArticulosAlbaranesCliente');
|
EditorRegistry.RegisterClass(TfEditorElegirArticulosAlbaranCliente, 'EditorElegirArticulosAlbaranesCliente');
|
||||||
EditorRegistry.RegisterClass(TfEditorAlbaranesClientePreview, 'EditorAlbaranesClientePreview');
|
EditorRegistry.RegisterClass(TfEditorAlbaranesClientePreview, 'EditorAlbaranesClientePreview');
|
||||||
EditorRegistry.RegisterClass(TfEditorElegirAlbaranesCliente, 'EditorElegirAlbaranesCliente');
|
EditorRegistry.RegisterClass(TfEditorElegirAlbaranesCliente, 'EditorElegirAlbaranesCliente');
|
||||||
|
EditorRegistry.RegisterClass(TfDialogListaAlbaranesCliEnvioEMail, 'DialogListaAlbaranesCliEnvioEMail');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure UnregisterViews;
|
procedure UnregisterViews;
|
||||||
@ -32,6 +34,7 @@ begin
|
|||||||
EditorRegistry.UnRegisterClass(TfEditorElegirArticulosAlbaranCliente);
|
EditorRegistry.UnRegisterClass(TfEditorElegirArticulosAlbaranCliente);
|
||||||
EditorRegistry.UnRegisterClass(TfEditorAlbaranesClientePreview);
|
EditorRegistry.UnRegisterClass(TfEditorAlbaranesClientePreview);
|
||||||
EditorRegistry.UnRegisterClass(TfEditorElegirAlbaranesCliente);
|
EditorRegistry.UnRegisterClass(TfEditorElegirAlbaranesCliente);
|
||||||
|
EditorRegistry.UnRegisterClass(TfDialogListaAlbaranesCliEnvioEMail);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -0,0 +1,89 @@
|
|||||||
|
inherited fDialogListaAlbaranesCliEnvioEMail: TfDialogListaAlbaranesCliEnvioEMail
|
||||||
|
Caption = 'Enviar albaranes por correo electr'#243'nico'
|
||||||
|
ClientHeight = 432
|
||||||
|
ClientWidth = 735
|
||||||
|
ExplicitWidth = 741
|
||||||
|
ExplicitHeight = 457
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
inherited pnlBotones: TFlowPanel
|
||||||
|
Top = 376
|
||||||
|
Width = 735
|
||||||
|
ExplicitTop = 382
|
||||||
|
ExplicitWidth = 735
|
||||||
|
inherited Button1: TButton
|
||||||
|
Left = 639
|
||||||
|
Caption = '&Salir'
|
||||||
|
ExplicitLeft = 639
|
||||||
|
end
|
||||||
|
inherited Button2: TButton
|
||||||
|
Left = 528
|
||||||
|
Width = 96
|
||||||
|
ExplicitLeft = 528
|
||||||
|
ExplicitWidth = 96
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited FlowPanel1: TFlowPanel
|
||||||
|
Width = 735
|
||||||
|
Height = 376
|
||||||
|
ExplicitWidth = 735
|
||||||
|
ExplicitHeight = 376
|
||||||
|
inherited lblInstruccion: TLabel
|
||||||
|
Width = 320
|
||||||
|
Caption = 'Enviar albaranes por correo electr'#243'nico'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ExplicitWidth = 320
|
||||||
|
end
|
||||||
|
inherited Label2: TLabel
|
||||||
|
Height = 51
|
||||||
|
Caption =
|
||||||
|
'Se generar'#225'n correos electr'#243'nicos autom'#225'ticos adjuntando los alb' +
|
||||||
|
'aranes elegidos en formato PDF. S'#243'lo se tendr'#225'n en cuenta los cl' +
|
||||||
|
'ientes que tengan relleno su e-mail administrativo.'
|
||||||
|
WordWrap = True
|
||||||
|
ExplicitHeight = 51
|
||||||
|
end
|
||||||
|
inherited ListView1: TListView
|
||||||
|
Top = 121
|
||||||
|
Width = 658
|
||||||
|
Height = 232
|
||||||
|
Columns = <
|
||||||
|
item
|
||||||
|
Caption = 'Documento'
|
||||||
|
MaxWidth = 75
|
||||||
|
MinWidth = 75
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Caption = 'Destinatario'
|
||||||
|
MaxWidth = 300
|
||||||
|
Width = 280
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Caption = 'Direcci'#243'n E-Mail'
|
||||||
|
MaxWidth = 250
|
||||||
|
Width = 150
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Caption = 'Estado'
|
||||||
|
MaxWidth = 250
|
||||||
|
Width = 149
|
||||||
|
end>
|
||||||
|
ExplicitTop = 121
|
||||||
|
ExplicitWidth = 658
|
||||||
|
ExplicitHeight = 232
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited ActionList1: TActionList
|
||||||
|
Left = 8
|
||||||
|
Top = 352
|
||||||
|
inherited actAceptar: TAction
|
||||||
|
Caption = '&Generar correos'
|
||||||
|
OnExecute = actAceptarExecute
|
||||||
|
OnUpdate = actAceptarUpdate
|
||||||
|
end
|
||||||
|
inherited actCancelar: TAction
|
||||||
|
OnExecute = actCancelarExecute
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@ -0,0 +1,166 @@
|
|||||||
|
unit uDialogListaAlbaranesCliEnvioEMail;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, uDialogBase, ActnList, StdCtrls, ExtCtrls, ComCtrls,
|
||||||
|
uDialogListaEnvioEMail, uIDialogListaAlbaranesCliEnvioEMail, uAlbaranesClienteController,
|
||||||
|
uBizAlbaranesCliente;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfDialogListaAlbaranesCliEnvioEMail = class(TfDialogListaEnvioEMail, IDialogListaAlbaranesCliEnvioEMail)
|
||||||
|
procedure actCancelarExecute(Sender: TObject);
|
||||||
|
procedure actAceptarUpdate(Sender: TObject);
|
||||||
|
procedure actAceptarExecute(Sender: TObject);
|
||||||
|
private
|
||||||
|
FAlbaranes : IBizAlbaranCliente;
|
||||||
|
FController : IAlbaranesClienteController;
|
||||||
|
protected
|
||||||
|
function GetAlbaranes: IBizAlbaranCliente;
|
||||||
|
procedure SetAlbaranes(const Value: IBizAlbaranCliente);
|
||||||
|
|
||||||
|
procedure RellenarLista;
|
||||||
|
procedure BorrarLista;
|
||||||
|
public
|
||||||
|
constructor Create(AOwner: TComponent); override;
|
||||||
|
property Albaranes: IBizAlbaranCliente read GetAlbaranes write SetAlbaranes;
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
schAlbaranesClienteClient_Intf, uStringsUtils, cxControls;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
{ TfDialogListaAlbaranesEnvioEMail }
|
||||||
|
|
||||||
|
procedure TfDialogListaAlbaranesCliEnvioEMail.actAceptarExecute(Sender: TObject);
|
||||||
|
var
|
||||||
|
i : Integer;
|
||||||
|
begin
|
||||||
|
ShowHourglassCursor;
|
||||||
|
Application.ProcessMessages;
|
||||||
|
try
|
||||||
|
FAlbaranes.First;
|
||||||
|
FController.RecuperarCliente(FAlbaranes);
|
||||||
|
FAlbaranes.Cliente.DataTable.Active := True;
|
||||||
|
try
|
||||||
|
for i := 0 to FAlbaranes.DataTable.RecordCount - 1 do
|
||||||
|
begin
|
||||||
|
if not EsCadenaVacia(FAlbaranes.Cliente.EMAIL_ADMINISTRACION) then
|
||||||
|
begin
|
||||||
|
if FController.EnviarAlbaranPorEMail(FAlbaranes, True, FAlbaranes.Cliente.EMAIL_ADMINISTRACION) then
|
||||||
|
begin
|
||||||
|
ListView1.Items[i].SubItems[2] := 'Correo generado';
|
||||||
|
ModalResult := mrOk;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ListView1.Items[i].SubItems[2] := 'Error al generar correo';
|
||||||
|
Self.Update;
|
||||||
|
Application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
|
||||||
|
FAlbaranes.Next;
|
||||||
|
FController.RecuperarCliente(FAlbaranes);
|
||||||
|
FAlbaranes.Cliente.DataTable.Active := True;
|
||||||
|
end;
|
||||||
|
Button2.Enabled := False;
|
||||||
|
finally
|
||||||
|
ListView1.Items.EndUpdate;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
HideHourglassCursor;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Button1.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfDialogListaAlbaranesCliEnvioEMail.actAceptarUpdate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
(Sender as TAction).Enabled := (ListView1.Items.Count > 0)
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfDialogListaAlbaranesCliEnvioEMail.actCancelarExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
ModalResult := mrOk;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfDialogListaAlbaranesCliEnvioEMail.BorrarLista;
|
||||||
|
begin
|
||||||
|
ListView1.Items.Clear;
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TfDialogListaAlbaranesCliEnvioEMail.Create(AOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
ModalResult := mrCancel;
|
||||||
|
FController := TAlbaranesClienteController.Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfDialogListaAlbaranesCliEnvioEMail.GetAlbaranes: IBizAlbaranCliente;
|
||||||
|
begin
|
||||||
|
Result := FAlbaranes;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfDialogListaAlbaranesCliEnvioEMail.RellenarLista;
|
||||||
|
var
|
||||||
|
i : Integer;
|
||||||
|
begin
|
||||||
|
ListView1.Items.BeginUpdate;
|
||||||
|
ListView1.Items.Clear;
|
||||||
|
|
||||||
|
FAlbaranes.First;
|
||||||
|
FAlbaranes.DataTable.DisableControls;
|
||||||
|
try
|
||||||
|
for i := 0 to FAlbaranes.DataTable.RecordCount - 1 do
|
||||||
|
begin
|
||||||
|
FController.RecuperarCliente(FAlbaranes);
|
||||||
|
FAlbaranes.Cliente.DataTable.Active := True;
|
||||||
|
|
||||||
|
with ListView1.Items.Add do
|
||||||
|
begin
|
||||||
|
Caption := FAlbaranes.REFERENCIA;
|
||||||
|
SubItems.Add(FAlbaranes.NOMBRE);
|
||||||
|
SubItems.Add(FAlbaranes.Cliente.EMAIL_ADMINISTRACION);
|
||||||
|
|
||||||
|
if EsCadenaVacia(FAlbaranes.Cliente.EMAIL_ADMINISTRACION) then
|
||||||
|
SubItems.Add('Sin dirección e-mail administrativa')
|
||||||
|
else
|
||||||
|
SubItems.Add('')
|
||||||
|
end;
|
||||||
|
FAlbaranes.Next;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
FAlbaranes.DataTable.EnableControls;
|
||||||
|
ListView1.Items.EndUpdate;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfDialogListaAlbaranesCliEnvioEMail.SetAlbaranes(
|
||||||
|
const Value: IBizAlbaranCliente);
|
||||||
|
begin
|
||||||
|
FAlbaranes := Value;
|
||||||
|
|
||||||
|
if Assigned(FAlbaranes) then
|
||||||
|
begin
|
||||||
|
FAlbaranes.DataTable.Open;
|
||||||
|
|
||||||
|
if (FAlbaranes.TIPO = CTE_TIPO_ALBARAN_DEV) then
|
||||||
|
begin
|
||||||
|
Self.Caption := 'Enviar órdenes de devolución por correo electrónico';
|
||||||
|
lblInstruccion.Caption := 'Enviar órdenes de devolución por correo electrónico';
|
||||||
|
Label2.Caption := 'Se generarán correos electrónicos automáticos adjuntando las órdenes de devolución elegidas en formato PDF. Sólo se tendrán en cuenta los clientes que tengan relleno su e-mail administrativo.';
|
||||||
|
end;
|
||||||
|
|
||||||
|
RellenarLista;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
BorrarLista;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
@ -9,7 +9,7 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
|
|||||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||||
Width = 855
|
Width = 855
|
||||||
Caption = 'Lista de albaranes de cliente'
|
Caption = 'Lista de albaranes de cliente'
|
||||||
ExplicitWidth = 583
|
ExplicitWidth = 855
|
||||||
inherited Image1: TImage
|
inherited Image1: TImage
|
||||||
Left = 828
|
Left = 828
|
||||||
Picture.Data = {
|
Picture.Data = {
|
||||||
@ -124,11 +124,14 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
|
|||||||
end
|
end
|
||||||
inherited TBXDock: TTBXDock
|
inherited TBXDock: TTBXDock
|
||||||
Width = 855
|
Width = 855
|
||||||
ExplicitWidth = 583
|
ExplicitWidth = 855
|
||||||
inherited tbxMain: TTBXToolbar
|
inherited tbxMain: TTBXToolbar
|
||||||
ExplicitWidth = 638
|
ExplicitWidth = 746
|
||||||
object TBXSeparatorItem17: TTBXSeparatorItem [10]
|
object TBXSeparatorItem17: TTBXSeparatorItem [10]
|
||||||
end
|
end
|
||||||
|
object TBXItem40: TTBXItem [14]
|
||||||
|
Action = actEnviarEMail
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited tbxMenu: TTBXToolbar
|
inherited tbxMenu: TTBXToolbar
|
||||||
ExplicitWidth = 855
|
ExplicitWidth = 855
|
||||||
@ -169,7 +172,8 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
|
|||||||
inherited StatusBar: TJvStatusBar
|
inherited StatusBar: TJvStatusBar
|
||||||
Top = 430
|
Top = 430
|
||||||
Width = 855
|
Width = 855
|
||||||
ExplicitWidth = 583
|
ExplicitTop = 430
|
||||||
|
ExplicitWidth = 855
|
||||||
end
|
end
|
||||||
inherited EditorActionList: TActionList
|
inherited EditorActionList: TActionList
|
||||||
inherited actNuevo: TAction
|
inherited actNuevo: TAction
|
||||||
@ -225,6 +229,12 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
|
|||||||
ImageIndex = 23
|
ImageIndex = 23
|
||||||
OnExecute = actGenerarOrdenExecute
|
OnExecute = actGenerarOrdenExecute
|
||||||
end
|
end
|
||||||
|
object actEnviarEMail: TAction
|
||||||
|
Category = 'Acciones'
|
||||||
|
Caption = 'Enviar por e-mail...'
|
||||||
|
OnExecute = actEnviarEMailExecute
|
||||||
|
OnUpdate = actEnviarEMailUpdate
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited SmallImages: TPngImageList
|
inherited SmallImages: TPngImageList
|
||||||
PngImages = <
|
PngImages = <
|
||||||
|
|||||||
@ -38,6 +38,8 @@ type
|
|||||||
JsListaAlbaranesNoEliminados: TJSDialog;
|
JsListaAlbaranesNoEliminados: TJSDialog;
|
||||||
actGenerarOrden: TAction;
|
actGenerarOrden: TAction;
|
||||||
TBXItem39: TTBXItem;
|
TBXItem39: TTBXItem;
|
||||||
|
actEnviarEMail: TAction;
|
||||||
|
TBXItem40: TTBXItem;
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure actGenerarFacturaUpdate(Sender: TObject);
|
procedure actGenerarFacturaUpdate(Sender: TObject);
|
||||||
procedure actGenerarFacturaExecute(Sender: TObject);
|
procedure actGenerarFacturaExecute(Sender: TObject);
|
||||||
@ -51,6 +53,8 @@ type
|
|||||||
procedure actGenerarEtiquetasExecute(Sender: TObject);
|
procedure actGenerarEtiquetasExecute(Sender: TObject);
|
||||||
procedure actGenerarEtiquetasUpdate(Sender: TObject);
|
procedure actGenerarEtiquetasUpdate(Sender: TObject);
|
||||||
procedure actGenerarOrdenExecute(Sender: TObject);
|
procedure actGenerarOrdenExecute(Sender: TObject);
|
||||||
|
procedure actEnviarEMailExecute(Sender: TObject);
|
||||||
|
procedure actEnviarEMailUpdate(Sender: TObject);
|
||||||
|
|
||||||
protected
|
protected
|
||||||
FAlbaranes: IBizAlbaranCliente;
|
FAlbaranes: IBizAlbaranCliente;
|
||||||
@ -88,7 +92,7 @@ uses
|
|||||||
uBizPedidosCliente, uDialogUtils, schAlbaranesClienteClient_Intf,
|
uBizPedidosCliente, uDialogUtils, schAlbaranesClienteClient_Intf,
|
||||||
uFacturasClienteController, uBizFacturasCliente, uInventarioController,
|
uFacturasClienteController, uBizFacturasCliente, uInventarioController,
|
||||||
uEditorBase, uGenerarAlbaranesCliUtils, uGenerarFacturasCliAlbCliUtils,
|
uEditorBase, uGenerarAlbaranesCliUtils, uGenerarFacturasCliAlbCliUtils,
|
||||||
cxCustomData, uGridUtils, uDBSelectionListUtils;
|
cxCustomData, uGridUtils, uDBSelectionListUtils, cxControls;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
@ -196,6 +200,40 @@ begin
|
|||||||
FController.GenerarOrdenDev(Albaranes);
|
FController.GenerarOrdenDev(Albaranes);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorAlbaranesCliente.actEnviarEMailExecute(Sender: TObject);
|
||||||
|
var
|
||||||
|
AAlbaranes : IBizAlbaranCliente;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
|
if ViewGrid.NumSeleccionados = 1 then
|
||||||
|
FController.GenerarEmailAlbaran(Albaranes)
|
||||||
|
else begin
|
||||||
|
ShowHourglassCursor;
|
||||||
|
try
|
||||||
|
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Albaranes as ISeleccionable).SelectedRecords);
|
||||||
|
AAlbaranes := (Controller as IAlbaranesClienteController).ExtraerSeleccionados(Albaranes, ViewGrid) as IBizAlbaranCliente;
|
||||||
|
|
||||||
|
if Assigned(AAlbaranes) then
|
||||||
|
if FController.EnviarEmailAlbaranes(AAlbaranes) then
|
||||||
|
RefrescarInterno;
|
||||||
|
finally
|
||||||
|
AAlbaranes := NIL;
|
||||||
|
HideHourglassCursor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorAlbaranesCliente.actEnviarEMailUpdate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
if HayDatos and Assigned(ViewGrid) then
|
||||||
|
(Sender as TAction).Enabled := ViewGrid.esSeleccionCeldaDatos
|
||||||
|
and (ViewGrid.NumSeleccionados > 0)
|
||||||
|
else
|
||||||
|
(Sender as TAction).Enabled := False;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfEditorAlbaranesCliente.actEnviarExecute(Sender: TObject);
|
procedure TfEditorAlbaranesCliente.actEnviarExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
AInventarioController : IInventarioController;
|
AInventarioController : IInventarioController;
|
||||||
|
|||||||
@ -1043,13 +1043,14 @@ object RptAlbaranesProveedor: TRptAlbaranesProveedor
|
|||||||
Top = 158
|
Top = 158
|
||||||
end
|
end
|
||||||
object frxReport: TfrxReport
|
object frxReport: TfrxReport
|
||||||
Version = '3.23.7'
|
Version = '4.3'
|
||||||
DotMatrixReport = False
|
DotMatrixReport = False
|
||||||
EngineOptions.DoublePass = True
|
EngineOptions.DoublePass = True
|
||||||
IniFile = '\Software\Fast Reports'
|
IniFile = '\Software\Fast Reports'
|
||||||
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
|
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
|
||||||
PreviewOptions.Zoom = 1.000000000000000000
|
PreviewOptions.Zoom = 1.000000000000000000
|
||||||
PrintOptions.Printer = 'Por defecto'
|
PrintOptions.Printer = 'Por defecto'
|
||||||
|
PrintOptions.PrintOnSheet = 0
|
||||||
ReportOptions.CreateDate = 39065.872423495400000000
|
ReportOptions.CreateDate = 39065.872423495400000000
|
||||||
ReportOptions.LastChange = 39290.783958333330000000
|
ReportOptions.LastChange = 39290.783958333330000000
|
||||||
ScriptLanguage = 'PascalScript'
|
ScriptLanguage = 'PascalScript'
|
||||||
@ -1157,29 +1158,6 @@ object RptAlbaranesProveedor: TRptAlbaranesProveedor
|
|||||||
OnStartReport = 'frxReportOnStartReport'
|
OnStartReport = 'frxReportOnStartReport'
|
||||||
Left = 169
|
Left = 169
|
||||||
Top = 16
|
Top = 16
|
||||||
Datasets = <
|
|
||||||
item
|
|
||||||
DataSet = frxDBCabecera
|
|
||||||
DataSetName = 'frxDBCabecera'
|
|
||||||
end
|
|
||||||
item
|
|
||||||
DataSet = frxDBDetalles
|
|
||||||
DataSetName = 'frxDBDetalles'
|
|
||||||
end>
|
|
||||||
Variables = <
|
|
||||||
item
|
|
||||||
Name = ' Paginacion'
|
|
||||||
Value = Null
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Name = 'TotalPaginas'
|
|
||||||
Value = Null
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Name = 'Pagina'
|
|
||||||
Value = Null
|
|
||||||
end>
|
|
||||||
Style = <>
|
|
||||||
end
|
end
|
||||||
object frxDBCabecera: TfrxDBDataset
|
object frxDBCabecera: TfrxDBDataset
|
||||||
UserName = 'frxDBCabecera'
|
UserName = 'frxDBCabecera'
|
||||||
|
|||||||
@ -32,7 +32,7 @@ type
|
|||||||
private
|
private
|
||||||
FConnection: IDAConnection;
|
FConnection: IDAConnection;
|
||||||
//Genera cada uno de los albaranes a imprimir
|
//Genera cada uno de los albaranes a imprimir
|
||||||
procedure GenerarAlbaran(const ID: integer); overload;
|
procedure _GenerarAlbaran(const ID: integer); overload;
|
||||||
public
|
public
|
||||||
function GenerarAlbaran(const AID : String): Binary; overload;
|
function GenerarAlbaran(const AID : String): Binary; overload;
|
||||||
end;
|
end;
|
||||||
@ -68,30 +68,27 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
Result := Binary.Create;
|
Result := Binary.Create;
|
||||||
FConnection.BeginTransaction;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
ID_Albaranes := TStringList.Create;
|
ID_Albaranes := TStringList.Create;
|
||||||
ID_Albaranes.CommaText := AID;
|
ID_Albaranes.CommaText := AID;
|
||||||
|
|
||||||
//Vamos generando todos y cada uno de los albaranes recibidos
|
//Vamos generando todos y cada uno de los albaranes recibidos
|
||||||
for i := 0 to ID_Albaranes.Count - 1 do
|
for i := 0 to ID_Albaranes.Count - 1 do
|
||||||
GenerarAlbaran(StrToInt(ID_Albaranes.Strings[i]));
|
_GenerarAlbaran(StrToInt(ID_Albaranes.Strings[i]));
|
||||||
|
|
||||||
frxReport.PreviewPages.SaveToStream(Result);
|
frxReport.PreviewPages.SaveToStream(Result);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
FConnection.RollbackTransaction;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRptAlbaranesProveedor.GenerarAlbaran(const ID: integer);
|
procedure TRptAlbaranesProveedor._GenerarAlbaran(const ID: integer);
|
||||||
var
|
var
|
||||||
AStream: TMemoryStream;
|
AStream: TMemoryStream;
|
||||||
dsMaster: IDADataset;
|
dsMaster: IDADataset;
|
||||||
dsDetail: IDADataset;
|
dsDetail: IDADataset;
|
||||||
begin
|
begin
|
||||||
AStream := TMemoryStream.Create;
|
AStream := TMemoryStream.Create;
|
||||||
|
FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
|
|
||||||
try
|
try
|
||||||
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [ID]);
|
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [ID]);
|
||||||
@ -109,6 +106,7 @@ begin
|
|||||||
frxReport.PrepareReport(False);
|
frxReport.PrepareReport(False);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
|
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
AStream.Free;
|
AStream.Free;
|
||||||
dsMaster := Nil;
|
dsMaster := Nil;
|
||||||
dsDetail := Nil;
|
dsDetail := Nil;
|
||||||
|
|||||||
@ -112,13 +112,11 @@ type
|
|||||||
|
|
||||||
function EnviarEmailFacturas(AFacturas : IBizFacturaCliente): Boolean;
|
function EnviarEmailFacturas(AFacturas : IBizFacturaCliente): Boolean;
|
||||||
function GenerarEmailFactura(AFactura : IBizFacturaCliente): Boolean;
|
function GenerarEmailFactura(AFactura : IBizFacturaCliente): Boolean;
|
||||||
|
|
||||||
function EnviarFacturaPorEMail(AFactura: IBizFacturaCliente;
|
function EnviarFacturaPorEMail(AFactura: IBizFacturaCliente;
|
||||||
const AEnviarDirectamente: Boolean = True;
|
const AEnviarDirectamente: Boolean = True;
|
||||||
const ADireccionEMail: String = ''; const AAsuntoEMail: String = '';
|
const ADireccionEMail: String = ''; const AAsuntoEMail: String = '';
|
||||||
const ATextoEMail: String = ''): Boolean;
|
const ATextoEMail: String = ''): Boolean;
|
||||||
|
|
||||||
|
|
||||||
procedure RecalcularImportes(AFactura: IBizFacturaCliente);
|
procedure RecalcularImportes(AFactura: IBizFacturaCliente);
|
||||||
function EsModificable(AFactura: IBizFacturaCliente): Boolean;
|
function EsModificable(AFactura: IBizFacturaCliente): Boolean;
|
||||||
function EsEliminable(AFactura: IBizFacturaCliente): Boolean;
|
function EsEliminable(AFactura: IBizFacturaCliente): Boolean;
|
||||||
|
|||||||
@ -8,7 +8,9 @@
|
|||||||
<Option Name="GUID">{31F77077-B4B9-443C-9AA9-F13B4EB640B4}</Option>
|
<Option Name="GUID">{31F77077-B4B9-443C-9AA9-F13B4EB640B4}</Option>
|
||||||
</Option>
|
</Option>
|
||||||
</PersonalityInfo>
|
</PersonalityInfo>
|
||||||
<Default.Personality> <Projects>
|
<Default.Personality>
|
||||||
|
|
||||||
|
<Projects>
|
||||||
<Projects Name="Base.bpl">..\..\Base\Base.bdsproj</Projects>
|
<Projects Name="Base.bpl">..\..\Base\Base.bdsproj</Projects>
|
||||||
<Projects Name="ControllerBase.bpl">..\..\Base\ControllerBase\ControllerBase.bdsproj</Projects>
|
<Projects Name="ControllerBase.bpl">..\..\Base\ControllerBase\ControllerBase.bdsproj</Projects>
|
||||||
<Projects Name="GUIBase.bpl">..\..\Base\GUIBase\GUIBase.bdsproj</Projects>
|
<Projects Name="GUIBase.bpl">..\..\Base\GUIBase\GUIBase.bdsproj</Projects>
|
||||||
@ -28,14 +30,10 @@
|
|||||||
<Projects Name="FactuGES.exe">..\..\Cliente\FactuGES.bdsproj</Projects>
|
<Projects Name="FactuGES.exe">..\..\Cliente\FactuGES.bdsproj</Projects>
|
||||||
<Projects Name="FactuGES_Server.exe">..\..\Servidor\FactuGES_Server.bdsproj</Projects>
|
<Projects Name="FactuGES_Server.exe">..\..\Servidor\FactuGES_Server.bdsproj</Projects>
|
||||||
<Projects Name="AlbaranesCliente_controller.bpl">..\Albaranes de cliente\Controller\AlbaranesCliente_controller.bdsproj</Projects>
|
<Projects Name="AlbaranesCliente_controller.bpl">..\Albaranes de cliente\Controller\AlbaranesCliente_controller.bdsproj</Projects>
|
||||||
<Projects Name="PedidosCliente_model.bpl">..\Pedidos de cliente\Model\PedidosCliente_model.bdsproj</Projects>
|
|
||||||
<Projects Name="FacturasProveedor_view.bpl">..\Facturas de proveedor\Views\FacturasProveedor_view.bdsproj</Projects>
|
<Projects Name="FacturasProveedor_view.bpl">..\Facturas de proveedor\Views\FacturasProveedor_view.bdsproj</Projects>
|
||||||
<Projects Name="FormasPago_model.bpl">..\Formas de pago\Model\FormasPago_model.bdsproj</Projects>
|
<Projects Name="PedidosCliente_view.bpl">..\Pedidos de cliente\Views\PedidosCliente_view.bdsproj</Projects>
|
||||||
<Projects Name="FormasPago_data.bpl">..\Formas de pago\Data\FormasPago_data.bdsproj</Projects>
|
<Projects Name="PedidosCliente_controller.bpl">..\Pedidos de cliente\Controller\PedidosCliente_controller.bdsproj</Projects>
|
||||||
<Projects Name="FormasPago_controller.bpl">..\Formas de pago\Controller\FormasPago_controller.bdsproj</Projects>
|
<Projects Name="Targets">Base.bpl ControllerBase.bpl GUIBase.bpl Contactos_model.bpl Contactos_data.bpl Contactos_controller.bpl Articulos_model.bpl Articulos_data.bpl Articulos_controller.bpl Contactos_view.bpl Articulos_view.bpl FacturasCliente_model.bpl FacturasCliente_data.bpl FacturasCliente_controller.bpl AlbCli_FacCli_relation.bpl FacturasCliente_view.bpl FactuGES.exe FactuGES_Server.exe AlbaranesCliente_controller.bpl FacturasProveedor_view.bpl PedidosCliente_view.bpl PedidosCliente_controller.bpl</Projects>
|
||||||
<Projects Name="FormasPago_view.bpl">..\Formas de pago\Views\FormasPago_view.bdsproj</Projects>
|
|
||||||
<Projects Name="FormasPago_plugin.bpl">..\Formas de pago\Plugin\FormasPago_plugin.bdsproj</Projects>
|
|
||||||
<Projects Name="Targets">Base.bpl ControllerBase.bpl GUIBase.bpl Contactos_model.bpl Contactos_data.bpl Contactos_controller.bpl Articulos_model.bpl Articulos_data.bpl Articulos_controller.bpl Contactos_view.bpl Articulos_view.bpl FacturasCliente_model.bpl FacturasCliente_data.bpl FacturasCliente_controller.bpl AlbCli_FacCli_relation.bpl FacturasCliente_view.bpl FactuGES.exe FactuGES_Server.exe AlbaranesCliente_controller.bpl PedidosCliente_model.bpl FacturasProveedor_view.bpl FormasPago_model.bpl FormasPago_data.bpl FormasPago_controller.bpl FormasPago_view.bpl FormasPago_plugin.bpl</Projects>
|
|
||||||
</Projects>
|
</Projects>
|
||||||
<Dependencies/>
|
<Dependencies/>
|
||||||
</Default.Personality>
|
</Default.Personality>
|
||||||
|
|||||||
@ -41,7 +41,7 @@ type
|
|||||||
procedure _GenerarFactura(const ID: Integer);
|
procedure _GenerarFactura(const ID: Integer);
|
||||||
public
|
public
|
||||||
function GenerarFactura(const ListaID : TIntegerArray;
|
function GenerarFactura(const ListaID : TIntegerArray;
|
||||||
const AConLogotipo: Boolean = False): Binary;
|
const AConLogotipo: Boolean = False): Binary;
|
||||||
function GenerarFacturaEnPDF(const ListaID : TIntegerArray;
|
function GenerarFacturaEnPDF(const ListaID : TIntegerArray;
|
||||||
const AConLogotipo: Boolean = False): Binary;
|
const AConLogotipo: Boolean = False): Binary;
|
||||||
end;
|
end;
|
||||||
@ -105,6 +105,7 @@ var
|
|||||||
dsVencimientos : IDADataset;
|
dsVencimientos : IDADataset;
|
||||||
begin
|
begin
|
||||||
AStream := TMemoryStream.Create;
|
AStream := TMemoryStream.Create;
|
||||||
|
FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
|
|
||||||
try
|
try
|
||||||
dsMaster := schReport.NewDataset(FConnection, ds_InformeFacturasCliente, ['ID'], [ID]);
|
dsMaster := schReport.NewDataset(FConnection, ds_InformeFacturasCliente, ['ID'], [ID]);
|
||||||
@ -128,6 +129,7 @@ begin
|
|||||||
frxReport.PrepareReport(False);
|
frxReport.PrepareReport(False);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
|
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
AStream.Free;
|
AStream.Free;
|
||||||
dsMaster := Nil;
|
dsMaster := Nil;
|
||||||
dsDetail := Nil;
|
dsDetail := Nil;
|
||||||
@ -148,8 +150,6 @@ var
|
|||||||
begin
|
begin
|
||||||
FShowLogotipo := AConLogotipo;
|
FShowLogotipo := AConLogotipo;
|
||||||
Result := Binary.Create;
|
Result := Binary.Create;
|
||||||
//FConnection.BeginTransaction; <--- Creo que no va a hacer falta.
|
|
||||||
|
|
||||||
try
|
try
|
||||||
//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
|
||||||
@ -157,7 +157,6 @@ begin
|
|||||||
|
|
||||||
frxReport.PreviewPages.SaveToStream(Result);
|
frxReport.PreviewPages.SaveToStream(Result);
|
||||||
finally
|
finally
|
||||||
//FConnection.RollbackTransaction; <--- Creo que no va a hacer falta.
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -168,8 +167,6 @@ var
|
|||||||
begin
|
begin
|
||||||
FShowLogotipo := AConLogotipo;
|
FShowLogotipo := AConLogotipo;
|
||||||
Result := Binary.Create;
|
Result := Binary.Create;
|
||||||
//FConnection.BeginTransaction; <--- Creo que no va a hacer falta.
|
|
||||||
|
|
||||||
try
|
try
|
||||||
//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
|
||||||
@ -178,7 +175,6 @@ begin
|
|||||||
frxPDFExport1.Stream := Result;
|
frxPDFExport1.Stream := Result;
|
||||||
frxReport.Export(frxPDFExport1)
|
frxReport.Export(frxPDFExport1)
|
||||||
finally
|
finally
|
||||||
//FConnection.RollbackTransaction; <--- Creo que no va a hacer falta.
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -1,24 +1,29 @@
|
|||||||
inherited fDialogListaFacturasEnvioEMail: TfDialogListaFacturasEnvioEMail
|
inherited fDialogListaFacturasEnvioEMail: TfDialogListaFacturasEnvioEMail
|
||||||
Caption = 'Enviar facturas por correo electr'#243'nico'
|
Caption = 'Enviar facturas por correo electr'#243'nico'
|
||||||
ClientHeight = 432
|
ClientHeight = 432
|
||||||
ExplicitWidth = 629
|
ClientWidth = 735
|
||||||
|
ExplicitWidth = 741
|
||||||
ExplicitHeight = 457
|
ExplicitHeight = 457
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
inherited pnlBotones: TFlowPanel
|
inherited pnlBotones: TFlowPanel
|
||||||
Top = 376
|
Top = 376
|
||||||
|
Width = 735
|
||||||
ExplicitTop = 376
|
ExplicitTop = 376
|
||||||
inherited Button1: TButton
|
inherited Button1: TButton
|
||||||
|
Left = 639
|
||||||
Caption = '&Salir'
|
Caption = '&Salir'
|
||||||
|
ExplicitLeft = 639
|
||||||
end
|
end
|
||||||
inherited Button2: TButton
|
inherited Button2: TButton
|
||||||
Left = 416
|
Left = 528
|
||||||
Width = 96
|
Width = 96
|
||||||
ExplicitLeft = 416
|
ExplicitLeft = 528
|
||||||
ExplicitWidth = 96
|
ExplicitWidth = 96
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited FlowPanel1: TFlowPanel
|
inherited FlowPanel1: TFlowPanel
|
||||||
|
Width = 735
|
||||||
Height = 376
|
Height = 376
|
||||||
ExplicitHeight = 376
|
ExplicitHeight = 376
|
||||||
inherited lblInstruccion: TLabel
|
inherited lblInstruccion: TLabel
|
||||||
@ -38,6 +43,7 @@ inherited fDialogListaFacturasEnvioEMail: TfDialogListaFacturasEnvioEMail
|
|||||||
end
|
end
|
||||||
inherited ListView1: TListView
|
inherited ListView1: TListView
|
||||||
Top = 121
|
Top = 121
|
||||||
|
Width = 658
|
||||||
Height = 232
|
Height = 232
|
||||||
Columns = <
|
Columns = <
|
||||||
item
|
item
|
||||||
@ -58,10 +64,11 @@ inherited fDialogListaFacturasEnvioEMail: TfDialogListaFacturasEnvioEMail
|
|||||||
end
|
end
|
||||||
item
|
item
|
||||||
Caption = 'Estado'
|
Caption = 'Estado'
|
||||||
MaxWidth = 200
|
MaxWidth = 250
|
||||||
Width = 100
|
Width = 149
|
||||||
end>
|
end>
|
||||||
ExplicitTop = 121
|
ExplicitTop = 121
|
||||||
|
ExplicitWidth = 658
|
||||||
ExplicitHeight = 232
|
ExplicitHeight = 232
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -45,22 +45,27 @@ begin
|
|||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
try
|
try
|
||||||
FFacturas.First;
|
FFacturas.First;
|
||||||
|
FController.RecuperarCliente(FFacturas);
|
||||||
|
FFacturas.Cliente.DataTable.Active := True;
|
||||||
try
|
try
|
||||||
for i := 0 to FFacturas.DataTable.RecordCount - 1 do
|
for i := 0 to FFacturas.DataTable.RecordCount - 1 do
|
||||||
begin
|
begin
|
||||||
if EsCadenaVacia(FFacturas.Cliente.EMAIL_ADMINISTRACION) then
|
if not EsCadenaVacia(FFacturas.Cliente.EMAIL_ADMINISTRACION) then
|
||||||
Continue;
|
|
||||||
|
|
||||||
if FController.EnviarFacturaPorEMail(FFacturas, True, FFacturas.Cliente.EMAIL_ADMINISTRACION) then
|
|
||||||
begin
|
begin
|
||||||
ListView1.Items[i].SubItems[2] := 'Correo generado';
|
if FController.EnviarFacturaPorEMail(FFacturas, True, FFacturas.Cliente.EMAIL_ADMINISTRACION) then
|
||||||
ModalResult := mrOk;
|
begin
|
||||||
end
|
ListView1.Items[i].SubItems[2] := 'Correo generado';
|
||||||
else
|
ModalResult := mrOk;
|
||||||
ListView1.Items[i].SubItems[2] := 'Error al generar correo';
|
end
|
||||||
Self.Update;
|
else
|
||||||
Application.ProcessMessages;
|
ListView1.Items[i].SubItems[2] := 'Error al generar correo';
|
||||||
|
Self.Update;
|
||||||
|
Application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
|
||||||
FFacturas.Next;
|
FFacturas.Next;
|
||||||
|
FController.RecuperarCliente(FFacturas);
|
||||||
|
FFacturas.Cliente.DataTable.Active := True;
|
||||||
end;
|
end;
|
||||||
Button2.Enabled := False;
|
Button2.Enabled := False;
|
||||||
finally
|
finally
|
||||||
|
|||||||
@ -100,7 +100,8 @@ begin
|
|||||||
AFacturas := (Controller as IFacturasClienteController).ExtraerSeleccionados(Facturas, ViewGrid) as IBizFacturaCliente;
|
AFacturas := (Controller as IFacturasClienteController).ExtraerSeleccionados(Facturas, ViewGrid) as IBizFacturaCliente;
|
||||||
|
|
||||||
if Assigned(AFacturas) then
|
if Assigned(AFacturas) then
|
||||||
FController.EnviarEmailFacturas(AFacturas);
|
if FController.EnviarEmailFacturas(AFacturas) then
|
||||||
|
RefrescarInterno;
|
||||||
finally
|
finally
|
||||||
AFacturas := NIL;
|
AFacturas := NIL;
|
||||||
HideHourglassCursor;
|
HideHourglassCursor;
|
||||||
|
|||||||
@ -1178,7 +1178,7 @@ object RptFacturasProveedor: TRptFacturasProveedor
|
|||||||
Top = 158
|
Top = 158
|
||||||
end
|
end
|
||||||
object frxReport: TfrxReport
|
object frxReport: TfrxReport
|
||||||
Version = '3.23.7'
|
Version = '4.3'
|
||||||
DotMatrixReport = False
|
DotMatrixReport = False
|
||||||
EngineOptions.DoublePass = True
|
EngineOptions.DoublePass = True
|
||||||
IniFile = '\Software\Fast Reports'
|
IniFile = '\Software\Fast Reports'
|
||||||
@ -1186,6 +1186,7 @@ object RptFacturasProveedor: TRptFacturasProveedor
|
|||||||
PreviewOptions.OutlineWidth = 180
|
PreviewOptions.OutlineWidth = 180
|
||||||
PreviewOptions.Zoom = 1.000000000000000000
|
PreviewOptions.Zoom = 1.000000000000000000
|
||||||
PrintOptions.Printer = 'Default'
|
PrintOptions.Printer = 'Default'
|
||||||
|
PrintOptions.PrintOnSheet = 0
|
||||||
ReportOptions.CreateDate = 37871.995398692100000000
|
ReportOptions.CreateDate = 37871.995398692100000000
|
||||||
ReportOptions.LastChange = 39465.864521631940000000
|
ReportOptions.LastChange = 39465.864521631940000000
|
||||||
ReportOptions.VersionBuild = '1'
|
ReportOptions.VersionBuild = '1'
|
||||||
@ -1324,70 +1325,6 @@ object RptFacturasProveedor: TRptFacturasProveedor
|
|||||||
OnStartReport = 'frxReportOnStartReport'
|
OnStartReport = 'frxReportOnStartReport'
|
||||||
Left = 169
|
Left = 169
|
||||||
Top = 16
|
Top = 16
|
||||||
Datasets = <
|
|
||||||
item
|
|
||||||
DataSet = frxDBCabecera
|
|
||||||
DataSetName = 'frxDBCabecera'
|
|
||||||
end
|
|
||||||
item
|
|
||||||
DataSet = frxDBDetalles
|
|
||||||
DataSetName = 'frxDBDetalles'
|
|
||||||
end
|
|
||||||
item
|
|
||||||
DataSet = frxDBDataset1
|
|
||||||
DataSetName = 'frxDBVencimientos'
|
|
||||||
end>
|
|
||||||
Variables = <
|
|
||||||
item
|
|
||||||
Name = ' Paginacion'
|
|
||||||
Value = Null
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Name = 'Pagina'
|
|
||||||
Value = Null
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Name = 'TotalPaginas'
|
|
||||||
Value = Null
|
|
||||||
end>
|
|
||||||
Style = <
|
|
||||||
item
|
|
||||||
Name = 'Concepto normal'
|
|
||||||
Color = clNone
|
|
||||||
Font.Charset = ANSI_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -12
|
|
||||||
Font.Name = 'Tahoma'
|
|
||||||
Font.Style = []
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Name = 'Concepto subtotal'
|
|
||||||
Color = clNone
|
|
||||||
Font.Charset = ANSI_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -12
|
|
||||||
Font.Name = 'Tahoma'
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Name = 'Cabecera de columna'
|
|
||||||
Color = 15790320
|
|
||||||
Font.Charset = ANSI_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -12
|
|
||||||
Font.Name = 'Tahoma'
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Name = 'Concepto titulo'
|
|
||||||
Color = clNone
|
|
||||||
Font.Charset = ANSI_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -13
|
|
||||||
Font.Name = 'Tahoma'
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
end>
|
|
||||||
end
|
end
|
||||||
object frxDBCabecera: TfrxDBDataset
|
object frxDBCabecera: TfrxDBDataset
|
||||||
UserName = 'frxDBCabecera'
|
UserName = 'frxDBCabecera'
|
||||||
|
|||||||
@ -34,7 +34,7 @@ type
|
|||||||
procedure DataModuleCreate(Sender: TObject);
|
procedure DataModuleCreate(Sender: TObject);
|
||||||
private
|
private
|
||||||
FConnection: IDAConnection;
|
FConnection: IDAConnection;
|
||||||
procedure GenerarFactura(const AFacturaID: integer); overload;
|
procedure _GenerarFactura(const AFacturaID: integer); overload;
|
||||||
public
|
public
|
||||||
function GenerarFactura(const AFacturaID : String): Binary; overload;
|
function GenerarFactura(const AFacturaID : String): Binary; overload;
|
||||||
end;
|
end;
|
||||||
@ -71,24 +71,20 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Result := Binary.Create;
|
Result := Binary.Create;
|
||||||
FConnection.BeginTransaction;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
ID_Facturas := TStringList.Create;
|
ID_Facturas := TStringList.Create;
|
||||||
ID_Facturas.CommaText := AFacturaID;
|
ID_Facturas.CommaText := AFacturaID;
|
||||||
|
|
||||||
//Vamos generando todos y cada uno de los albaranes recibidos
|
//Vamos generando todos y cada uno de los albaranes recibidos
|
||||||
for i := 0 to ID_Facturas.Count - 1 do
|
for i := 0 to ID_Facturas.Count - 1 do
|
||||||
GenerarFactura(StrToInt(ID_Facturas.Strings[i]));
|
_GenerarFactura(StrToInt(ID_Facturas.Strings[i]));
|
||||||
|
|
||||||
frxReport.PreviewPages.SaveToStream(Result);
|
frxReport.PreviewPages.SaveToStream(Result);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
FConnection.RollbackTransaction;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRptFacturasProveedor.GenerarFactura(const AFacturaID: integer);
|
procedure TRptFacturasProveedor._GenerarFactura(const AFacturaID: integer);
|
||||||
var
|
var
|
||||||
AStream: TMemoryStream;
|
AStream: TMemoryStream;
|
||||||
dsMaster: IDADataset;
|
dsMaster: IDADataset;
|
||||||
@ -96,6 +92,7 @@ var
|
|||||||
dsVencimientos : IDADataset;
|
dsVencimientos : IDADataset;
|
||||||
begin
|
begin
|
||||||
AStream := TMemoryStream.Create;
|
AStream := TMemoryStream.Create;
|
||||||
|
FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
|
|
||||||
try
|
try
|
||||||
dsMaster := schReport.NewDataset(FConnection, ds_InformeFacturasProveedor, ['ID'], [AFacturaID]);
|
dsMaster := schReport.NewDataset(FConnection, ds_InformeFacturasProveedor, ['ID'], [AFacturaID]);
|
||||||
@ -119,6 +116,7 @@ begin
|
|||||||
frxReport.PrepareReport(False);
|
frxReport.PrepareReport(False);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
|
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
AStream.Free;
|
AStream.Free;
|
||||||
dsMaster := Nil;
|
dsMaster := Nil;
|
||||||
dsDetail := Nil;
|
dsDetail := Nil;
|
||||||
|
|||||||
@ -713,13 +713,14 @@ object RptPedidosProveedor: TRptPedidosProveedor
|
|||||||
Top = 158
|
Top = 158
|
||||||
end
|
end
|
||||||
object frxReport: TfrxReport
|
object frxReport: TfrxReport
|
||||||
Version = '3.23.7'
|
Version = '4.3'
|
||||||
DotMatrixReport = False
|
DotMatrixReport = False
|
||||||
EngineOptions.DoublePass = True
|
EngineOptions.DoublePass = True
|
||||||
IniFile = '\Software\Fast Reports'
|
IniFile = '\Software\Fast Reports'
|
||||||
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
|
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
|
||||||
PreviewOptions.Zoom = 1.000000000000000000
|
PreviewOptions.Zoom = 1.000000000000000000
|
||||||
PrintOptions.Printer = 'Por defecto'
|
PrintOptions.Printer = 'Por defecto'
|
||||||
|
PrintOptions.PrintOnSheet = 0
|
||||||
ReportOptions.CreateDate = 39065.872423495400000000
|
ReportOptions.CreateDate = 39065.872423495400000000
|
||||||
ReportOptions.LastChange = 39352.784043865700000000
|
ReportOptions.LastChange = 39352.784043865700000000
|
||||||
ScriptLanguage = 'PascalScript'
|
ScriptLanguage = 'PascalScript'
|
||||||
@ -802,29 +803,6 @@ object RptPedidosProveedor: TRptPedidosProveedor
|
|||||||
OnStartReport = 'frxReportOnStartReport'
|
OnStartReport = 'frxReportOnStartReport'
|
||||||
Left = 169
|
Left = 169
|
||||||
Top = 16
|
Top = 16
|
||||||
Datasets = <
|
|
||||||
item
|
|
||||||
DataSet = frxDBCabecera
|
|
||||||
DataSetName = 'frxDBCabecera'
|
|
||||||
end
|
|
||||||
item
|
|
||||||
DataSet = frxDBDetalles
|
|
||||||
DataSetName = 'frxDBDetalles'
|
|
||||||
end>
|
|
||||||
Variables = <
|
|
||||||
item
|
|
||||||
Name = ' Paginacion'
|
|
||||||
Value = Null
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Name = 'TotalPaginas'
|
|
||||||
Value = Null
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Name = 'Pagina'
|
|
||||||
Value = Null
|
|
||||||
end>
|
|
||||||
Style = <>
|
|
||||||
end
|
end
|
||||||
object frxDBCabecera: TfrxDBDataset
|
object frxDBCabecera: TfrxDBDataset
|
||||||
UserName = 'frxDBCabecera'
|
UserName = 'frxDBCabecera'
|
||||||
@ -840,4 +818,18 @@ object RptPedidosProveedor: TRptPedidosProveedor
|
|||||||
Left = 344
|
Left = 344
|
||||||
Top = 16
|
Top = 16
|
||||||
end
|
end
|
||||||
|
object frxPDFExport1: TfrxPDFExport
|
||||||
|
ShowDialog = False
|
||||||
|
UseFileCache = True
|
||||||
|
ShowProgress = False
|
||||||
|
PrintOptimized = True
|
||||||
|
Outline = True
|
||||||
|
Author = 'FactuGES'
|
||||||
|
Subject = 'FactuGES'
|
||||||
|
Background = False
|
||||||
|
Creator = 'FactuGES'
|
||||||
|
HTMLTags = True
|
||||||
|
Left = 360
|
||||||
|
Top = 344
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -7,7 +7,7 @@ uses
|
|||||||
Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
|
Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
|
||||||
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
|
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
|
||||||
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
|
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
|
||||||
uDAInterfaces;
|
uDAInterfaces, FactuGES_Intf, frxExportPDF;
|
||||||
|
|
||||||
type
|
type
|
||||||
TRptPedidosProveedor = class(TDataModule)
|
TRptPedidosProveedor = class(TDataModule)
|
||||||
@ -28,12 +28,14 @@ type
|
|||||||
frxReport: TfrxReport;
|
frxReport: TfrxReport;
|
||||||
schReport: TDASchema;
|
schReport: TDASchema;
|
||||||
DataDictionary: TDADataDictionary;
|
DataDictionary: TDADataDictionary;
|
||||||
|
frxPDFExport1: TfrxPDFExport;
|
||||||
procedure DataModuleCreate(Sender: TObject);
|
procedure DataModuleCreate(Sender: TObject);
|
||||||
private
|
private
|
||||||
FConnection: IDAConnection;
|
FConnection: IDAConnection;
|
||||||
procedure GenerarPedido(const AID : Integer); overload;
|
procedure _GenerarPedido(const AID : Integer); overload;
|
||||||
public
|
public
|
||||||
function GenerarPedido(const AID : String): Binary; overload;
|
function GenerarPedido(const AID : String): Binary; overload;
|
||||||
|
function GenerarReportEnPDF(const ListaID : TIntegerArray): Binary; //const AConLogotipo: Boolean = False): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -58,7 +60,7 @@ procedure TRptPedidosProveedor.DataModuleCreate(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
schReport.ConnectionManager := dmServer.ConnectionManager;
|
schReport.ConnectionManager := dmServer.ConnectionManager;
|
||||||
FConnection := dmServer.DarNuevaConexion;
|
FConnection := dmServer.DarNuevaConexion;
|
||||||
frxReport.EngineOptions.NewSilentMode := simReThrow;
|
frxReport.EngineOptions.NewSilentMode := simReThrow;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRptPedidosProveedor.GenerarPedido(const AID: String): Binary;
|
function TRptPedidosProveedor.GenerarPedido(const AID: String): Binary;
|
||||||
@ -68,30 +70,44 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Result := Binary.Create;
|
Result := Binary.Create;
|
||||||
FConnection.BeginTransaction;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
ID_Pedidos := TStringList.Create;
|
ID_Pedidos := TStringList.Create;
|
||||||
ID_Pedidos.CommaText := AID;
|
ID_Pedidos.CommaText := AID;
|
||||||
|
|
||||||
//Vamos generando todos y cada uno de los albaranes recibidos
|
//Vamos generando todos y cada uno de los albaranes recibidos
|
||||||
for i := 0 to ID_Pedidos.Count - 1 do
|
for i := 0 to ID_Pedidos.Count - 1 do
|
||||||
GenerarPedido(StrToInt(ID_Pedidos.Strings[i]));
|
_GenerarPedido(StrToInt(ID_Pedidos.Strings[i]));
|
||||||
|
|
||||||
frxReport.PreviewPages.SaveToStream(Result);
|
frxReport.PreviewPages.SaveToStream(Result);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
FConnection.RollbackTransaction;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRptPedidosProveedor.GenerarPedido(const AID: Integer);
|
function TRptPedidosProveedor.GenerarReportEnPDF(const ListaID: TIntegerArray): Binary; //; const AConLogotipo: Boolean): Binary;
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
// FShowLogotipo := AConLogotipo;
|
||||||
|
Result := Binary.Create;
|
||||||
|
try
|
||||||
|
//Vamos generando todos y cada uno de los presupuestos recibidos
|
||||||
|
for i := 0 to ListaID.Count - 1 do
|
||||||
|
_GenerarPedido(ListaID.Items[i]);
|
||||||
|
|
||||||
|
frxPDFExport1.Stream := Result;
|
||||||
|
frxReport.Export(frxPDFExport1)
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TRptPedidosProveedor._GenerarPedido(const AID: Integer);
|
||||||
var
|
var
|
||||||
AStream: TMemoryStream;
|
AStream: TMemoryStream;
|
||||||
dsMaster: IDADataset;
|
dsMaster: IDADataset;
|
||||||
dsDetail: IDADataset;
|
dsDetail: IDADataset;
|
||||||
begin
|
begin
|
||||||
AStream := TMemoryStream.Create;
|
AStream := TMemoryStream.Create;
|
||||||
|
FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
|
|
||||||
try
|
try
|
||||||
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [AID]);
|
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [AID]);
|
||||||
@ -109,6 +125,7 @@ begin
|
|||||||
frxReport.PrepareReport(False);
|
frxReport.PrepareReport(False);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
|
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
AStream.Free;
|
AStream.Free;
|
||||||
dsMaster := Nil;
|
dsMaster := Nil;
|
||||||
dsDetail := Nil;
|
dsDetail := Nil;
|
||||||
|
|||||||
@ -39,6 +39,7 @@ type
|
|||||||
{ IsrvPedidosProveedor methods }
|
{ IsrvPedidosProveedor methods }
|
||||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||||
function GenerateReport(const ID: String): Binary;
|
function GenerateReport(const ID: String): Binary;
|
||||||
|
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -84,6 +85,19 @@ begin
|
|||||||
bpPedidosProveedor.BusinessRulesID := BIZ_SERVER_PEDIDOS_PROVEEDOR;
|
bpPedidosProveedor.BusinessRulesID := BIZ_SERVER_PEDIDOS_PROVEEDOR;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TsrvPedidosProveedor.GenerarReportPDF(const ListaID: TIntegerArray;
|
||||||
|
const ShowLogotipo: Boolean): Binary;
|
||||||
|
var
|
||||||
|
AReportGenerator : TRptPedidosProveedor;
|
||||||
|
begin
|
||||||
|
AReportGenerator := TRptPedidosProveedor.Create(nil);
|
||||||
|
try
|
||||||
|
Result := AReportGenerator.GenerarReportEnPDF(ListaID); //, ShowLogotipo);
|
||||||
|
finally
|
||||||
|
FreeAndNIL(AReportGenerator);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TsrvPedidosProveedor.GenerateReport(const ID: String): Binary;
|
function TsrvPedidosProveedor.GenerateReport(const ID: String): Binary;
|
||||||
var
|
var
|
||||||
AReportGenerator : TRptPedidosProveedor;
|
AReportGenerator : TRptPedidosProveedor;
|
||||||
|
|||||||
@ -50,6 +50,7 @@ contains
|
|||||||
uIEditorElegirArticulosPedidosCliente in 'View\uIEditorElegirArticulosPedidosCliente.pas',
|
uIEditorElegirArticulosPedidosCliente in 'View\uIEditorElegirArticulosPedidosCliente.pas',
|
||||||
uIEditorDireccionEntregaPedidoCliente in 'View\uIEditorDireccionEntregaPedidoCliente.pas',
|
uIEditorDireccionEntregaPedidoCliente in 'View\uIEditorDireccionEntregaPedidoCliente.pas',
|
||||||
uPedidosClienteReportController in 'uPedidosClienteReportController.pas',
|
uPedidosClienteReportController in 'uPedidosClienteReportController.pas',
|
||||||
uIEditorPedidosClientePreview in 'View\uIEditorPedidosClientePreview.pas';
|
uIEditorPedidosClientePreview in 'View\uIEditorPedidosClientePreview.pas',
|
||||||
|
uIDialogListaPedidosCliEnvioEMail in 'View\uIDialogListaPedidosCliEnvioEMail.pas';
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -0,0 +1,21 @@
|
|||||||
|
unit uIDialogListaPedidosCliEnvioEMail;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
uBizPedidosCliente, uPedidosClienteController;
|
||||||
|
|
||||||
|
type
|
||||||
|
IDialogListaPedidosCliEnvioEMail = interface
|
||||||
|
['{D51F7EC0-A75C-4BA9-9373-F1056F095B40}']
|
||||||
|
function GetPedidos: IBizPedidoCliente;
|
||||||
|
procedure SetPedidos(const Value: IBizPedidoCliente);
|
||||||
|
property Pedidos: IBizPedidoCliente read GetPedidos write SetPedidos;
|
||||||
|
function ShowModal : Integer;
|
||||||
|
procedure Release;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
end.
|
||||||
@ -52,6 +52,13 @@ type
|
|||||||
procedure Preview(APedido : IBizPedidoCliente; AllItems: Boolean = false);
|
procedure Preview(APedido : IBizPedidoCliente; AllItems: Boolean = false);
|
||||||
function Print(APedido : IBizPedidoCliente; AllItems: Boolean = false): Boolean;
|
function Print(APedido : IBizPedidoCliente; AllItems: Boolean = false): Boolean;
|
||||||
|
|
||||||
|
function EnviarEmailPedidos(APedidos : IBizPedidoCliente): Boolean;
|
||||||
|
function GenerarEmailPedido(APedido : IBizPedidoCliente): Boolean;
|
||||||
|
function EnviarPedidoPorEMail(APedido: IBizPedidoCliente;
|
||||||
|
const AEnviarDirectamente: Boolean = True;
|
||||||
|
const ADireccionEMail: String = ''; const AAsuntoEMail: String = '';
|
||||||
|
const ATextoEMail: String = ''): Boolean;
|
||||||
|
|
||||||
function ArticulosPendientes(const ID : Integer): IBizPedidoClienteArticulosPend;
|
function ArticulosPendientes(const ID : Integer): IBizPedidoClienteArticulosPend;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -116,6 +123,13 @@ type
|
|||||||
procedure Preview(APedido : IBizPedidoCliente; AllItems: Boolean = false);
|
procedure Preview(APedido : IBizPedidoCliente; AllItems: Boolean = false);
|
||||||
function Print(APedido : IBizPedidoCliente; AllItems: Boolean = false): Boolean;
|
function Print(APedido : IBizPedidoCliente; AllItems: Boolean = false): Boolean;
|
||||||
|
|
||||||
|
function EnviarEmailPedidos(APedidos : IBizPedidoCliente): Boolean;
|
||||||
|
function GenerarEmailPedido(APedido : IBizPedidoCliente): Boolean;
|
||||||
|
function EnviarPedidoPorEMail(APedido: IBizPedidoCliente;
|
||||||
|
const AEnviarDirectamente: Boolean = True;
|
||||||
|
const ADireccionEMail: String = ''; const AAsuntoEMail: String = '';
|
||||||
|
const ATextoEMail: String = ''): Boolean;
|
||||||
|
|
||||||
function ArticulosPendientes(const ID : Integer): IBizPedidoClienteArticulosPend;
|
function ArticulosPendientes(const ID : Integer): IBizPedidoClienteArticulosPend;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -127,7 +141,8 @@ uses
|
|||||||
uBizContactos, uDataTableUtils, uDataModuleUsuarios, Classes,
|
uBizContactos, uDataTableUtils, uDataModuleUsuarios, Classes,
|
||||||
schPedidosClienteClient_Intf, uDAInterfaces, uDateUtils, uIEditorPedidoCliente,
|
schPedidosClienteClient_Intf, uDAInterfaces, uDateUtils, uIEditorPedidoCliente,
|
||||||
uIEditorElegirPedidosCliente, uIEditorDireccionEntregaPedidoCliente,
|
uIEditorElegirPedidosCliente, uIEditorDireccionEntregaPedidoCliente,
|
||||||
schContactosClient_Intf, uPedidosClienteReportController;
|
schContactosClient_Intf, uPedidosClienteReportController, uIDialogListaPedidosCliEnvioEMail,
|
||||||
|
uSistemaFunc, uStringsUtils, uDialogElegirEMail, Forms, uEMailUtils;
|
||||||
|
|
||||||
{ TPedidosClienteController }
|
{ TPedidosClienteController }
|
||||||
|
|
||||||
@ -556,6 +571,98 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TPedidosClienteController.EnviarEmailPedidos(APedidos: IBizPedidoCliente): Boolean;
|
||||||
|
var
|
||||||
|
ADialog : IDialogListaPedidosCliEnvioEMail;
|
||||||
|
ARespuesta : Integer;
|
||||||
|
begin
|
||||||
|
ADialog := NIL;
|
||||||
|
|
||||||
|
if not Assigned(APedidos) then
|
||||||
|
raise Exception.Create ('Facturas no asignadas (EnviarPedidosCliPorEMail)');
|
||||||
|
|
||||||
|
if APedidos.DataTable.Active then
|
||||||
|
APedidos.DataTable.Active := True;
|
||||||
|
|
||||||
|
ShowHourglassCursor;
|
||||||
|
try
|
||||||
|
CreateEditor('DialogListaPedidosCliEnvioEMail', IDialogListaPedidosCliEnvioEMail, ADialog);
|
||||||
|
|
||||||
|
if Assigned(ADialog) then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADialog.Pedidos := APedidos;
|
||||||
|
ARespuesta := ADialog.ShowModal;
|
||||||
|
Result := (ARespuesta = mrOK)
|
||||||
|
finally
|
||||||
|
ADialog.Release;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
ADialog := NIL;
|
||||||
|
HideHourglassCursor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TPedidosClienteController.EnviarPedidoPorEMail(
|
||||||
|
APedido: IBizPedidoCliente; const AEnviarDirectamente: Boolean;
|
||||||
|
const ADireccionEMail, AAsuntoEMail, ATextoEMail: String): Boolean;
|
||||||
|
var
|
||||||
|
AReportController : IPedidosClienteReportController;
|
||||||
|
AFicheroTMP : TFileName;
|
||||||
|
AEMail : String;
|
||||||
|
AAsunto : String;
|
||||||
|
AListaEmail : TStringList;
|
||||||
|
begin
|
||||||
|
|
||||||
|
if not Assigned(APedido) then
|
||||||
|
raise Exception.Create ('Pedido no asignada (EnviarFacturaPorEMail)');
|
||||||
|
|
||||||
|
if APedido.DataTable.Active then
|
||||||
|
APedido.DataTable.Active := True;
|
||||||
|
|
||||||
|
RecuperarCliente(APedido);
|
||||||
|
APedido.Cliente.DataTable.Active := True;
|
||||||
|
|
||||||
|
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(APedido.REFERENCIA));
|
||||||
|
|
||||||
|
if not EsCadenaVacia(ADireccionEMail) then
|
||||||
|
AEMail := ADireccionEMail
|
||||||
|
else begin
|
||||||
|
AListaEmail := TStringList.Create;
|
||||||
|
try
|
||||||
|
if not EsCadenaVacia(APedido.Cliente.EMAIL_ADMINISTRACION) then
|
||||||
|
AListaEmail.Add(APedido.Cliente.EMAIL_ADMINISTRACION);
|
||||||
|
|
||||||
|
if not ElegirEMail(AListaEmail, AEMail) then
|
||||||
|
Exit;
|
||||||
|
finally
|
||||||
|
FreeANDNIL(AListaEmail);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if not EsCadenaVacia(AAsuntoEMail) then
|
||||||
|
AAsunto := AAsuntoEMail
|
||||||
|
else
|
||||||
|
AAsunto := 'Pedido ' + APedido.REFERENCIA;
|
||||||
|
|
||||||
|
ShowHourglassCursor;
|
||||||
|
Application.ProcessMessages;
|
||||||
|
|
||||||
|
AReportController := TPedidosClienteReportController.Create;
|
||||||
|
try
|
||||||
|
AReportController.ExportToPDF(APedido.ID, AFicheroTMP);
|
||||||
|
Result := EnviarEMailMAPI(AAsunto, ATextoEMail, AFicheroTMP, '', '', APedido.Cliente.NOMBRE, AEMail, AEnviarDirectamente);
|
||||||
|
if Result then
|
||||||
|
// _AnadirMarcaEnvioCorreo(APedido);
|
||||||
|
finally
|
||||||
|
SysUtils.DeleteFile(AFicheroTMP);
|
||||||
|
AReportController := NIL;
|
||||||
|
HideHourglassCursor;
|
||||||
|
Application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TPedidosClienteController.EsEliminable(APedido: IBizPedidoCliente): Boolean;
|
function TPedidosClienteController.EsEliminable(APedido: IBizPedidoCliente): Boolean;
|
||||||
begin
|
begin
|
||||||
if not Assigned(APedido) then
|
if not Assigned(APedido) then
|
||||||
@ -850,6 +957,23 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TPedidosClienteController.GenerarEmailPedido(APedido: IBizPedidoCliente): Boolean;
|
||||||
|
begin
|
||||||
|
if not Assigned(APedido) then
|
||||||
|
raise Exception.Create ('Pedidos no asignadas (GenerarEmailPedido)');
|
||||||
|
|
||||||
|
if APedido.DataTable.Active then
|
||||||
|
APedido.DataTable.Active := True;
|
||||||
|
|
||||||
|
ShowHourglassCursor;
|
||||||
|
try
|
||||||
|
RecuperarCliente(APedido);
|
||||||
|
EnviarPedidoPorEMail(APedido, False, APedido.Cliente.EMAIL_ADMINISTRACION);
|
||||||
|
finally
|
||||||
|
HideHourglassCursor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TPedidosClienteController.GetClienteController: IClientesController;
|
function TPedidosClienteController.GetClienteController: IClientesController;
|
||||||
begin
|
begin
|
||||||
Result := FClienteController;
|
Result := FClienteController;
|
||||||
|
|||||||
@ -12,6 +12,7 @@ type
|
|||||||
['{D0686358-251C-43C4-9927-6112F2F4D3B8}']
|
['{D0686358-251C-43C4-9927-6112F2F4D3B8}']
|
||||||
procedure Preview(const AID : String);
|
procedure Preview(const AID : String);
|
||||||
function Print(const AID : String): Boolean;
|
function Print(const AID : String): Boolean;
|
||||||
|
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TPedidosClienteReportController = class(TInterfacedObject, IPedidosClienteReportController)
|
TPedidosClienteReportController = class(TInterfacedObject, IPedidosClienteReportController)
|
||||||
@ -24,6 +25,7 @@ type
|
|||||||
|
|
||||||
procedure Preview(const AID : String);
|
procedure Preview(const AID : String);
|
||||||
function Print(const AID : String): Boolean;
|
function Print(const AID : String): Boolean;
|
||||||
|
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -32,7 +34,7 @@ implementation
|
|||||||
uses
|
uses
|
||||||
uROTypes, uEditorRegistryUtils, uIEditorPedidosClientePreview,
|
uROTypes, uEditorRegistryUtils, uIEditorPedidosClientePreview,
|
||||||
uEditorPreview, uDataModulePedidosCliente, uEditorBase, cxControls,
|
uEditorPreview, uDataModulePedidosCliente, uEditorBase, cxControls,
|
||||||
schPedidosClienteClient_Intf;
|
schPedidosClienteClient_Intf, uStringsUtils;
|
||||||
|
|
||||||
{ TPedidosClienteReportController }
|
{ TPedidosClienteReportController }
|
||||||
|
|
||||||
@ -54,6 +56,29 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TPedidosClienteReportController.ExportToPDF(const AID: Integer;
|
||||||
|
const AFileName: String): Boolean;
|
||||||
|
var
|
||||||
|
AStream: Binary;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
if EsCadenaVacia(AFileName) then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
ShowHourglassCursor;
|
||||||
|
try
|
||||||
|
AStream := FDataModule.GetRptPDF(AID, True);
|
||||||
|
try
|
||||||
|
AStream.SaveToFile(AFileName);
|
||||||
|
Result := True;
|
||||||
|
finally
|
||||||
|
FreeAndNil(AStream);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
HideHourglassCursor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TPedidosClienteReportController.Preview(const AID : String);
|
procedure TPedidosClienteReportController.Preview(const AID : String);
|
||||||
var
|
var
|
||||||
AStream: Binary;
|
AStream: Binary;
|
||||||
|
|||||||
@ -45,8 +45,8 @@ type
|
|||||||
function NewItem : IBizPedidoCliente;
|
function NewItem : IBizPedidoCliente;
|
||||||
|
|
||||||
// Report
|
// Report
|
||||||
// function GetReport(const AID: String): Binary;
|
|
||||||
function GetReport(const AID: String; const ShowLogotipo: Boolean = False): Binary;
|
function GetReport(const AID: String; const ShowLogotipo: Boolean = False): Binary;
|
||||||
|
function GetRptPDF(const AID: Integer; const ShowLogotipo: Boolean = False): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -88,6 +88,20 @@ begin
|
|||||||
Result := (RORemoteService as IsrvPedidosCliente).GenerateReport(AID, ShowLogotipo)
|
Result := (RORemoteService as IsrvPedidosCliente).GenerateReport(AID, ShowLogotipo)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TDataModulePedidosCliente.GetRptPDF(const AID: Integer;
|
||||||
|
const ShowLogotipo: Boolean): Binary;
|
||||||
|
var
|
||||||
|
AParam : TIntegerArray;
|
||||||
|
begin
|
||||||
|
AParam := TIntegerArray.Create;
|
||||||
|
try
|
||||||
|
AParam.Add(AID);
|
||||||
|
Result := (RORemoteService as IsrvPedidosCliente).GenerarReportPDF(AParam, ShowLogotipo)
|
||||||
|
finally
|
||||||
|
FreeANDNIL(AParam)
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TDataModulePedidosCliente.NewItem: IBizPedidoCliente;
|
function TDataModulePedidosCliente.NewItem: IBizPedidoCliente;
|
||||||
begin
|
begin
|
||||||
Result := GetItem(ID_NULO)
|
Result := GetItem(ID_NULO)
|
||||||
|
|||||||
@ -9,6 +9,7 @@ type
|
|||||||
IDataModulePedidosClienteReport = interface
|
IDataModulePedidosClienteReport = interface
|
||||||
['{70CEBB06-376F-4363-B80F-DDA4324E0F85}']
|
['{70CEBB06-376F-4363-B80F-DDA4324E0F85}']
|
||||||
function GetReport(const AID: String; const ShowLogotipo: Boolean = False): Binary;
|
function GetReport(const AID: String; const ShowLogotipo: Boolean = False): Binary;
|
||||||
|
function GetRptPDF(const AID: Integer; const ShowLogotipo: Boolean = False): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|||||||
@ -8,7 +8,9 @@
|
|||||||
<Option Name="GUID">{31F77077-B4B9-443C-9AA9-F13B4EB640B4}</Option>
|
<Option Name="GUID">{31F77077-B4B9-443C-9AA9-F13B4EB640B4}</Option>
|
||||||
</Option>
|
</Option>
|
||||||
</PersonalityInfo>
|
</PersonalityInfo>
|
||||||
<Default.Personality> <Projects>
|
<Default.Personality>
|
||||||
|
|
||||||
|
<Projects>
|
||||||
<Projects Name="Base.bpl">..\..\Base\Base.bdsproj</Projects>
|
<Projects Name="Base.bpl">..\..\Base\Base.bdsproj</Projects>
|
||||||
<Projects Name="ControllerBase.bpl">..\..\Base\ControllerBase\ControllerBase.bdsproj</Projects>
|
<Projects Name="ControllerBase.bpl">..\..\Base\ControllerBase\ControllerBase.bdsproj</Projects>
|
||||||
<Projects Name="GUIBase.bpl">..\..\Base\GUIBase\GUIBase.bdsproj</Projects>
|
<Projects Name="GUIBase.bpl">..\..\Base\GUIBase\GUIBase.bdsproj</Projects>
|
||||||
@ -23,7 +25,10 @@
|
|||||||
<Projects Name="PedidosCliente_plugin.bpl">Plugin\PedidosCliente_plugin.bdsproj</Projects>
|
<Projects Name="PedidosCliente_plugin.bpl">Plugin\PedidosCliente_plugin.bdsproj</Projects>
|
||||||
<Projects Name="FactuGES_Server.exe">..\..\Servidor\FactuGES_Server.bdsproj</Projects>
|
<Projects Name="FactuGES_Server.exe">..\..\Servidor\FactuGES_Server.bdsproj</Projects>
|
||||||
<Projects Name="FactuGES.exe">..\..\Cliente\FactuGES.bdsproj</Projects>
|
<Projects Name="FactuGES.exe">..\..\Cliente\FactuGES.bdsproj</Projects>
|
||||||
<Projects Name="Targets">Base.bpl ControllerBase.bpl GUIBase.bpl Articulos_model.bpl Articulos_data.bpl Articulos_controller.bpl Articulos_view.bpl PedidosCliente_model.bpl PedidosCliente_data.bpl PedidosCliente_controller.bpl PedidosCliente_view.bpl PedidosCliente_plugin.bpl FactuGES_Server.exe FactuGES.exe</Projects>
|
<Projects Name="FacturasCliente_view.bpl">..\Facturas de cliente\Views\FacturasCliente_view.bdsproj</Projects>
|
||||||
|
<Projects Name="FacturasCliente_controller.bpl">..\Facturas de cliente\Controller\FacturasCliente_controller.bdsproj</Projects>
|
||||||
|
<Projects Name="FacturasCliente_data.bpl">..\Facturas de cliente\Data\FacturasCliente_data.bdsproj</Projects>
|
||||||
|
<Projects Name="Targets">Base.bpl ControllerBase.bpl GUIBase.bpl Articulos_model.bpl Articulos_data.bpl Articulos_controller.bpl Articulos_view.bpl PedidosCliente_model.bpl PedidosCliente_data.bpl PedidosCliente_controller.bpl PedidosCliente_view.bpl PedidosCliente_plugin.bpl FactuGES_Server.exe FactuGES.exe FacturasCliente_view.bpl FacturasCliente_controller.bpl FacturasCliente_data.bpl</Projects>
|
||||||
</Projects>
|
</Projects>
|
||||||
<Dependencies/>
|
<Dependencies/>
|
||||||
</Default.Personality>
|
</Default.Personality>
|
||||||
|
|||||||
@ -940,4 +940,18 @@ object RptPedidosCliente: TRptPedidosCliente
|
|||||||
Left = 344
|
Left = 344
|
||||||
Top = 16
|
Top = 16
|
||||||
end
|
end
|
||||||
|
object frxPDFExport1: TfrxPDFExport
|
||||||
|
ShowDialog = False
|
||||||
|
UseFileCache = True
|
||||||
|
ShowProgress = False
|
||||||
|
PrintOptimized = True
|
||||||
|
Outline = True
|
||||||
|
Author = 'FactuGES'
|
||||||
|
Subject = 'FactuGES'
|
||||||
|
Background = False
|
||||||
|
Creator = 'FactuGES'
|
||||||
|
HTMLTags = True
|
||||||
|
Left = 360
|
||||||
|
Top = 344
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -7,7 +7,7 @@ uses
|
|||||||
Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
|
Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
|
||||||
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
|
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
|
||||||
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
|
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
|
||||||
uDAInterfaces;
|
uDAInterfaces, FactuGES_Intf, frxExportPDF;
|
||||||
|
|
||||||
type
|
type
|
||||||
TRptPedidosCliente = class(TDataModule)
|
TRptPedidosCliente = class(TDataModule)
|
||||||
@ -28,14 +28,16 @@ type
|
|||||||
schReport: TDASchema;
|
schReport: TDASchema;
|
||||||
DataDictionary: TDADataDictionary;
|
DataDictionary: TDADataDictionary;
|
||||||
frxReport: TfrxReport;
|
frxReport: TfrxReport;
|
||||||
|
frxPDFExport1: TfrxPDFExport;
|
||||||
procedure DataModuleCreate(Sender: TObject);
|
procedure DataModuleCreate(Sender: TObject);
|
||||||
procedure frxReportGetValue(const VarName: string; var Value: Variant);
|
procedure frxReportGetValue(const VarName: string; var Value: Variant);
|
||||||
private
|
private
|
||||||
FConnection: IDAConnection;
|
FConnection: IDAConnection;
|
||||||
FShowLogotipo: Boolean;
|
FShowLogotipo: Boolean;
|
||||||
procedure GenerarPedido(const AID : Integer); overload;
|
procedure _GenerarPedido(const AID : Integer); overload;
|
||||||
public
|
public
|
||||||
function GenerarPedido(const AID : String; const AConLogotipo: Boolean = False): Binary; overload;
|
function GenerarPedido(const AID : String; const AConLogotipo: Boolean = False): Binary; overload;
|
||||||
|
function GenerarReportEnPDF(const ListaID : TIntegerArray; const AConLogotipo: Boolean = False): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -70,8 +72,6 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Result := Binary.Create;
|
Result := Binary.Create;
|
||||||
FConnection.BeginTransaction;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
FShowLogotipo := AConLogotipo;
|
FShowLogotipo := AConLogotipo;
|
||||||
ID_Pedidos := TStringList.Create;
|
ID_Pedidos := TStringList.Create;
|
||||||
@ -79,12 +79,28 @@ begin
|
|||||||
|
|
||||||
//Vamos generando todos y cada uno de los albaranes recibidos
|
//Vamos generando todos y cada uno de los albaranes recibidos
|
||||||
for i := 0 to ID_Pedidos.Count - 1 do
|
for i := 0 to ID_Pedidos.Count - 1 do
|
||||||
GenerarPedido(StrToInt(ID_Pedidos.Strings[i]));
|
_GenerarPedido(StrToInt(ID_Pedidos.Strings[i]));
|
||||||
|
|
||||||
frxReport.PreviewPages.SaveToStream(Result);
|
frxReport.PreviewPages.SaveToStream(Result);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
FConnection.RollbackTransaction;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TRptPedidosCliente.GenerarReportEnPDF(const ListaID: TIntegerArray;
|
||||||
|
const AConLogotipo: Boolean): Binary;
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
FShowLogotipo := AConLogotipo;
|
||||||
|
Result := Binary.Create;
|
||||||
|
try
|
||||||
|
//Vamos generando todos y cada uno de los presupuestos recibidos
|
||||||
|
for i := 0 to ListaID.Count - 1 do
|
||||||
|
_GenerarPedido(ListaID.Items[i]);
|
||||||
|
|
||||||
|
frxPDFExport1.Stream := Result;
|
||||||
|
frxReport.Export(frxPDFExport1)
|
||||||
|
finally
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -95,13 +111,14 @@ begin
|
|||||||
Value := FShowLogotipo;
|
Value := FShowLogotipo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRptPedidosCliente.GenerarPedido(const AID: Integer);
|
procedure TRptPedidosCliente._GenerarPedido(const AID: Integer);
|
||||||
var
|
var
|
||||||
AStream: TMemoryStream;
|
AStream: TMemoryStream;
|
||||||
dsMaster: IDADataset;
|
dsMaster: IDADataset;
|
||||||
dsDetail: IDADataset;
|
dsDetail: IDADataset;
|
||||||
begin
|
begin
|
||||||
AStream := TMemoryStream.Create;
|
AStream := TMemoryStream.Create;
|
||||||
|
FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
|
|
||||||
try
|
try
|
||||||
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [AID]);
|
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [AID]);
|
||||||
@ -119,6 +136,7 @@ begin
|
|||||||
frxReport.PrepareReport(False);
|
frxReport.PrepareReport(False);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
|
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
AStream.Free;
|
AStream.Free;
|
||||||
dsMaster := Nil;
|
dsMaster := Nil;
|
||||||
dsDetail := Nil;
|
dsDetail := Nil;
|
||||||
|
|||||||
@ -39,6 +39,7 @@ type
|
|||||||
{ IsrvPedidosCliente methods }
|
{ IsrvPedidosCliente methods }
|
||||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||||
function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary;
|
function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary;
|
||||||
|
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -81,6 +82,19 @@ begin
|
|||||||
bpPedidosCliente.BusinessRulesID := BIZ_SERVER_PEDIDOS_CLIENTE;
|
bpPedidosCliente.BusinessRulesID := BIZ_SERVER_PEDIDOS_CLIENTE;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TsrvPedidosCliente.GenerarReportPDF(const ListaID: TIntegerArray;
|
||||||
|
const ShowLogotipo: Boolean): Binary;
|
||||||
|
var
|
||||||
|
AReportGenerator : TRptPedidosCliente;
|
||||||
|
begin
|
||||||
|
AReportGenerator := TRptPedidosCliente.Create(nil);
|
||||||
|
try
|
||||||
|
Result := AReportGenerator.GenerarReportEnPDF(ListaID, ShowLogotipo);
|
||||||
|
finally
|
||||||
|
FreeAndNIL(AReportGenerator);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TsrvPedidosCliente.GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary;
|
function TsrvPedidosCliente.GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary;
|
||||||
var
|
var
|
||||||
AReportGenerator : TRptPedidosCliente;
|
AReportGenerator : TRptPedidosCliente;
|
||||||
|
|||||||
@ -174,7 +174,7 @@
|
|||||||
<Excluded_Packages Name="c:\archivos de programa\borland\delphi10\Bin\dclIntraweb_80_100.bpl">Intraweb 8.0 Design Package for Borland Development Studio 2006</Excluded_Packages>
|
<Excluded_Packages Name="c:\archivos de programa\borland\delphi10\Bin\dclIntraweb_80_100.bpl">Intraweb 8.0 Design Package for Borland Development Studio 2006</Excluded_Packages>
|
||||||
</Excluded_Packages>
|
</Excluded_Packages>
|
||||||
</Delphi.Personality>
|
</Delphi.Personality>
|
||||||
<!-- EurekaLog First Line
|
<!-- EurekaLog First Line
|
||||||
[Exception Log]
|
[Exception Log]
|
||||||
EurekaLog Version=519
|
EurekaLog Version=519
|
||||||
Activate=1
|
Activate=1
|
||||||
|
|||||||
@ -95,7 +95,8 @@ requires
|
|||||||
FacturasCliente_model,
|
FacturasCliente_model,
|
||||||
FacturasCliente_controller,
|
FacturasCliente_controller,
|
||||||
PedCli_PedProv_relation,
|
PedCli_PedProv_relation,
|
||||||
PedCli_AlbCli_relation;
|
PedCli_AlbCli_relation,
|
||||||
|
dxGDIPlusD10;
|
||||||
|
|
||||||
contains
|
contains
|
||||||
uPedidosClienteViewRegister in 'uPedidosClienteViewRegister.pas',
|
uPedidosClienteViewRegister in 'uPedidosClienteViewRegister.pas',
|
||||||
@ -108,6 +109,7 @@ contains
|
|||||||
uViewElegirArticulosPedidosCliente in 'uViewElegirArticulosPedidosCliente.pas' {frViewElegirArticulosPedidosCliente: TFrame},
|
uViewElegirArticulosPedidosCliente in 'uViewElegirArticulosPedidosCliente.pas' {frViewElegirArticulosPedidosCliente: TFrame},
|
||||||
uEditorElegirArticulosPedidoCliente in 'uEditorElegirArticulosPedidoCliente.pas' {fEditorElegirArticulosPedidoCliente: TfEditorElegirArticulosPedidoCliente},
|
uEditorElegirArticulosPedidoCliente in 'uEditorElegirArticulosPedidoCliente.pas' {fEditorElegirArticulosPedidoCliente: TfEditorElegirArticulosPedidoCliente},
|
||||||
uViewDireccionEntregaPedidoCliente in 'uViewDireccionEntregaPedidoCliente.pas' {frViewDireccionEntregaPedidoCliente: TFrame},
|
uViewDireccionEntregaPedidoCliente in 'uViewDireccionEntregaPedidoCliente.pas' {frViewDireccionEntregaPedidoCliente: TFrame},
|
||||||
uEditorPedidosClienteReport in 'uEditorPedidosClienteReport.pas' {fEditorPedidosClientePreview: TfEditorPedidosClientePreview};
|
uEditorPedidosClienteReport in 'uEditorPedidosClienteReport.pas' {fEditorPedidosClientePreview: TfEditorPedidosClientePreview},
|
||||||
|
uDialogListaPedidosCliEnvioEMail in 'uDialogListaPedidosCliEnvioEMail.pas' {fDialogListaPedidosCliEnvioEMail: TfDialogListaPedidosCliEnvioEMail};
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -0,0 +1,89 @@
|
|||||||
|
inherited fDialogListaPedidosCliEnvioEMail: TfDialogListaPedidosCliEnvioEMail
|
||||||
|
Caption = 'Enviar pedidos por correo electr'#243'nico'
|
||||||
|
ClientHeight = 432
|
||||||
|
ClientWidth = 735
|
||||||
|
ExplicitWidth = 741
|
||||||
|
ExplicitHeight = 457
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
inherited pnlBotones: TFlowPanel
|
||||||
|
Top = 376
|
||||||
|
Width = 735
|
||||||
|
ExplicitTop = 376
|
||||||
|
ExplicitWidth = 735
|
||||||
|
inherited Button1: TButton
|
||||||
|
Left = 639
|
||||||
|
Caption = '&Salir'
|
||||||
|
ExplicitLeft = 639
|
||||||
|
end
|
||||||
|
inherited Button2: TButton
|
||||||
|
Left = 528
|
||||||
|
Width = 96
|
||||||
|
ExplicitLeft = 528
|
||||||
|
ExplicitWidth = 96
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited FlowPanel1: TFlowPanel
|
||||||
|
Width = 735
|
||||||
|
Height = 376
|
||||||
|
ExplicitWidth = 735
|
||||||
|
ExplicitHeight = 376
|
||||||
|
inherited lblInstruccion: TLabel
|
||||||
|
Width = 303
|
||||||
|
Caption = 'Enviar pedidos por correo electr'#243'nico'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ExplicitWidth = 303
|
||||||
|
end
|
||||||
|
inherited Label2: TLabel
|
||||||
|
Height = 51
|
||||||
|
Caption =
|
||||||
|
'Se generar'#225'n correos electr'#243'nicos autom'#225'ticos adjuntando los ped' +
|
||||||
|
'idos elegidos en formato PDF. S'#243'lo se tendr'#225'n en cuenta los clie' +
|
||||||
|
'ntes que tengan relleno su e-mail administrativo.'
|
||||||
|
WordWrap = True
|
||||||
|
ExplicitHeight = 51
|
||||||
|
end
|
||||||
|
inherited ListView1: TListView
|
||||||
|
Top = 121
|
||||||
|
Width = 658
|
||||||
|
Height = 232
|
||||||
|
Columns = <
|
||||||
|
item
|
||||||
|
Caption = 'Documento'
|
||||||
|
MaxWidth = 75
|
||||||
|
MinWidth = 75
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Caption = 'Destinatario'
|
||||||
|
MaxWidth = 300
|
||||||
|
Width = 280
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Caption = 'Direcci'#243'n E-Mail'
|
||||||
|
MaxWidth = 250
|
||||||
|
Width = 150
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Caption = 'Estado'
|
||||||
|
MaxWidth = 250
|
||||||
|
Width = 149
|
||||||
|
end>
|
||||||
|
ExplicitTop = 121
|
||||||
|
ExplicitWidth = 658
|
||||||
|
ExplicitHeight = 232
|
||||||
|
end
|
||||||
|
end
|
||||||
|
inherited ActionList1: TActionList
|
||||||
|
Left = 8
|
||||||
|
Top = 352
|
||||||
|
inherited actAceptar: TAction
|
||||||
|
Caption = '&Generar correos'
|
||||||
|
OnExecute = actAceptarExecute
|
||||||
|
OnUpdate = actAceptarUpdate
|
||||||
|
end
|
||||||
|
inherited actCancelar: TAction
|
||||||
|
OnExecute = actCancelarExecute
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@ -0,0 +1,158 @@
|
|||||||
|
unit uDialogListaPedidosCliEnvioEMail;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, uDialogBase, ActnList, StdCtrls, ExtCtrls, ComCtrls,
|
||||||
|
uDialogListaEnvioEMail, uIDialogListaPedidosCliEnvioEMail, uPedidosClienteController,
|
||||||
|
uBizPedidosCliente;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfDialogListaPedidosCliEnvioEMail = class(TfDialogListaEnvioEMail, IDialogListaPedidosCliEnvioEMail)
|
||||||
|
procedure actCancelarExecute(Sender: TObject);
|
||||||
|
procedure actAceptarUpdate(Sender: TObject);
|
||||||
|
procedure actAceptarExecute(Sender: TObject);
|
||||||
|
private
|
||||||
|
FPedidos : IBizPedidoCliente;
|
||||||
|
FController : IPedidosClienteController;
|
||||||
|
protected
|
||||||
|
function GetPedidos: IBizPedidoCliente;
|
||||||
|
procedure SetPedidos(const Value: IBizPedidoCliente);
|
||||||
|
|
||||||
|
procedure RellenarLista;
|
||||||
|
procedure BorrarLista;
|
||||||
|
public
|
||||||
|
constructor Create(AOwner: TComponent); override;
|
||||||
|
property Pedidos: IBizPedidoCliente read GetPedidos write SetPedidos;
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
schPedidosClienteClient_Intf, uStringsUtils, cxControls;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
{ TfDialogListaPedidosEnvioEMail }
|
||||||
|
|
||||||
|
procedure TfDialogListaPedidosCliEnvioEMail.actAceptarExecute(Sender: TObject);
|
||||||
|
var
|
||||||
|
i : Integer;
|
||||||
|
begin
|
||||||
|
ShowHourglassCursor;
|
||||||
|
Application.ProcessMessages;
|
||||||
|
try
|
||||||
|
FPedidos.First;
|
||||||
|
FController.RecuperarCliente(FPedidos);
|
||||||
|
FPedidos.Cliente.DataTable.Active := True;
|
||||||
|
try
|
||||||
|
for i := 0 to FPedidos.DataTable.RecordCount - 1 do
|
||||||
|
begin
|
||||||
|
if not EsCadenaVacia(FPedidos.Cliente.EMAIL_ADMINISTRACION) then
|
||||||
|
begin
|
||||||
|
if FController.EnviarPedidoPorEMail(FPedidos, True, FPedidos.Cliente.EMAIL_ADMINISTRACION) then
|
||||||
|
begin
|
||||||
|
ListView1.Items[i].SubItems[2] := 'Correo generado';
|
||||||
|
ModalResult := mrOk;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ListView1.Items[i].SubItems[2] := 'Error al generar correo';
|
||||||
|
Self.Update;
|
||||||
|
Application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
|
||||||
|
FPedidos.Next;
|
||||||
|
FController.RecuperarCliente(FPedidos);
|
||||||
|
FPedidos.Cliente.DataTable.Active := True;
|
||||||
|
end;
|
||||||
|
Button2.Enabled := False;
|
||||||
|
finally
|
||||||
|
ListView1.Items.EndUpdate;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
HideHourglassCursor;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Button1.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfDialogListaPedidosCliEnvioEMail.actAceptarUpdate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
(Sender as TAction).Enabled := (ListView1.Items.Count > 0)
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfDialogListaPedidosCliEnvioEMail.actCancelarExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
ModalResult := mrOk;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfDialogListaPedidosCliEnvioEMail.BorrarLista;
|
||||||
|
begin
|
||||||
|
ListView1.Items.Clear;
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TfDialogListaPedidosCliEnvioEMail.Create(AOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
ModalResult := mrCancel;
|
||||||
|
FController := TPedidosClienteController.Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfDialogListaPedidosCliEnvioEMail.GetPedidos: IBizPedidoCliente;
|
||||||
|
begin
|
||||||
|
Result := FPedidos;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfDialogListaPedidosCliEnvioEMail.RellenarLista;
|
||||||
|
var
|
||||||
|
i : Integer;
|
||||||
|
begin
|
||||||
|
ListView1.Items.BeginUpdate;
|
||||||
|
ListView1.Items.Clear;
|
||||||
|
|
||||||
|
FPedidos.First;
|
||||||
|
FPedidos.DataTable.DisableControls;
|
||||||
|
try
|
||||||
|
for i := 0 to FPedidos.DataTable.RecordCount - 1 do
|
||||||
|
begin
|
||||||
|
FController.RecuperarCliente(FPedidos);
|
||||||
|
FPedidos.Cliente.DataTable.Active := True;
|
||||||
|
|
||||||
|
with ListView1.Items.Add do
|
||||||
|
begin
|
||||||
|
Caption := FPedidos.REFERENCIA;
|
||||||
|
SubItems.Add(FPedidos.NOMBRE);
|
||||||
|
SubItems.Add(FPedidos.Cliente.EMAIL_ADMINISTRACION);
|
||||||
|
|
||||||
|
if EsCadenaVacia(FPedidos.Cliente.EMAIL_ADMINISTRACION) then
|
||||||
|
SubItems.Add('Sin dirección e-mail administrativa')
|
||||||
|
else
|
||||||
|
SubItems.Add('')
|
||||||
|
end;
|
||||||
|
FPedidos.Next;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
FPedidos.DataTable.EnableControls;
|
||||||
|
ListView1.Items.EndUpdate;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfDialogListaPedidosCliEnvioEMail.SetPedidos(
|
||||||
|
const Value: IBizPedidoCliente);
|
||||||
|
begin
|
||||||
|
FPedidos := Value;
|
||||||
|
|
||||||
|
if Assigned(FPedidos) then
|
||||||
|
begin
|
||||||
|
FPedidos.DataTable.Open;
|
||||||
|
RellenarLista;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
BorrarLista;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
@ -2,7 +2,7 @@ inherited fEditorElegirPedidosCliente: TfEditorElegirPedidosCliente
|
|||||||
Caption = 'Seleccionar pedido de cliente'
|
Caption = 'Seleccionar pedido de cliente'
|
||||||
ClientWidth = 656
|
ClientWidth = 656
|
||||||
ExplicitWidth = 664
|
ExplicitWidth = 664
|
||||||
ExplicitHeight = 478
|
ExplicitHeight = 471
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object JvgWizardHeader1: TJvgWizardHeader [0]
|
object JvgWizardHeader1: TJvgWizardHeader [0]
|
||||||
@ -65,6 +65,9 @@ inherited fEditorElegirPedidosCliente: TfEditorElegirPedidosCliente
|
|||||||
inherited TBXSeparatorItem3: TTBXSeparatorItem
|
inherited TBXSeparatorItem3: TTBXSeparatorItem
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
|
inherited TBXItem41: TTBXItem
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
inherited TBXItem6: TTBXItem
|
inherited TBXItem6: TTBXItem
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
@ -179,6 +182,8 @@ inherited fEditorElegirPedidosCliente: TfEditorElegirPedidosCliente
|
|||||||
end
|
end
|
||||||
inherited JsPrevisualizarDialog: TJSDialog [14]
|
inherited JsPrevisualizarDialog: TJSDialog [14]
|
||||||
end
|
end
|
||||||
|
inherited JsImprimirDialog: TJSDialog [15]
|
||||||
|
end
|
||||||
object EditorSeleccionActionList: TActionList
|
object EditorSeleccionActionList: TActionList
|
||||||
Images = SmallImages
|
Images = SmallImages
|
||||||
Left = 152
|
Left = 152
|
||||||
|
|||||||
@ -2,7 +2,6 @@ inherited fEditorPedidosCliente: TfEditorPedidosCliente
|
|||||||
Caption = 'Lista de pedidos de cliente'
|
Caption = 'Lista de pedidos de cliente'
|
||||||
ClientWidth = 674
|
ClientWidth = 674
|
||||||
ExplicitWidth = 682
|
ExplicitWidth = 682
|
||||||
ExplicitHeight = 240
|
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||||
@ -125,7 +124,10 @@ inherited fEditorPedidosCliente: TfEditorPedidosCliente
|
|||||||
Width = 674
|
Width = 674
|
||||||
ExplicitWidth = 674
|
ExplicitWidth = 674
|
||||||
inherited tbxMain: TTBXToolbar
|
inherited tbxMain: TTBXToolbar
|
||||||
ExplicitWidth = 632
|
ExplicitWidth = 674
|
||||||
|
object TBXItem41: TTBXItem [13]
|
||||||
|
Action = actEnviarEmail
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited tbxMenu: TTBXToolbar
|
inherited tbxMenu: TTBXToolbar
|
||||||
ExplicitWidth = 674
|
ExplicitWidth = 674
|
||||||
@ -192,6 +194,12 @@ inherited fEditorPedidosCliente: TfEditorPedidosCliente
|
|||||||
OnExecute = actGenerarExecute
|
OnExecute = actGenerarExecute
|
||||||
OnUpdate = actGenerarUpdate
|
OnUpdate = actGenerarUpdate
|
||||||
end
|
end
|
||||||
|
object actEnviarEmail: TAction
|
||||||
|
Category = 'Acciones'
|
||||||
|
Caption = 'Enviar por e-mail...'
|
||||||
|
OnExecute = actEnviarEmailExecute
|
||||||
|
OnUpdate = actEnviarEmailUpdate
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited SmallImages: TPngImageList
|
inherited SmallImages: TPngImageList
|
||||||
PngImages = <
|
PngImages = <
|
||||||
|
|||||||
@ -31,6 +31,8 @@ type
|
|||||||
JsImprimirDialog: TJSDialog;
|
JsImprimirDialog: TJSDialog;
|
||||||
TBXItem40: TTBXItem;
|
TBXItem40: TTBXItem;
|
||||||
JsListaPedidosNoEliminados: TJSDialog;
|
JsListaPedidosNoEliminados: TJSDialog;
|
||||||
|
actEnviarEmail: TAction;
|
||||||
|
TBXItem41: TTBXItem;
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure actGenerarAlbaranCliExecute(Sender: TObject);
|
procedure actGenerarAlbaranCliExecute(Sender: TObject);
|
||||||
procedure actEliminarUpdate(Sender: TObject);
|
procedure actEliminarUpdate(Sender: TObject);
|
||||||
@ -39,6 +41,8 @@ type
|
|||||||
procedure actGenerarPedidoProvExecute(Sender: TObject);
|
procedure actGenerarPedidoProvExecute(Sender: TObject);
|
||||||
procedure actGenerarExecute(Sender: TObject);
|
procedure actGenerarExecute(Sender: TObject);
|
||||||
procedure actGenerarUpdate(Sender: TObject);
|
procedure actGenerarUpdate(Sender: TObject);
|
||||||
|
procedure actEnviarEmailExecute(Sender: TObject);
|
||||||
|
procedure actEnviarEmailUpdate(Sender: TObject);
|
||||||
|
|
||||||
protected
|
protected
|
||||||
FPedidos: IBizPedidoCliente;
|
FPedidos: IBizPedidoCliente;
|
||||||
@ -75,7 +79,7 @@ uses
|
|||||||
uDataModulePedidosCliente, uDataModuleUsuarios, uBizAlbaranesCliente,
|
uDataModulePedidosCliente, uDataModuleUsuarios, uBizAlbaranesCliente,
|
||||||
uAlbaranesClienteController, uEditorBase, uEditorDBBase, uDialogUtils,
|
uAlbaranesClienteController, uEditorBase, uEditorDBBase, uDialogUtils,
|
||||||
uFacturasClienteController, uBizFacturasCliente, uGridUtils, uDBSelectionListUtils,
|
uFacturasClienteController, uBizFacturasCliente, uGridUtils, uDBSelectionListUtils,
|
||||||
uGenerarPedidosProvUtils, uGenerarAlbaranesCliUtils;
|
uGenerarPedidosProvUtils, uGenerarAlbaranesCliUtils, cxControls;
|
||||||
|
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
@ -90,6 +94,41 @@ begin
|
|||||||
(Sender as TAction).Enabled := (FPedidos.SITUACION = SITUACION_PEDIDO_PENDIENTE);
|
(Sender as TAction).Enabled := (FPedidos.SITUACION = SITUACION_PEDIDO_PENDIENTE);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorPedidosCliente.actEnviarEmailExecute(Sender: TObject);
|
||||||
|
var
|
||||||
|
APedidos : IBizPedidoCliente;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
|
if ViewGrid.NumSeleccionados = 1 then
|
||||||
|
FController.GenerarEmailPedido(Pedidos)
|
||||||
|
else begin
|
||||||
|
ShowHourglassCursor;
|
||||||
|
try
|
||||||
|
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Pedidos as ISeleccionable).SelectedRecords);
|
||||||
|
APedidos := (Controller as IPedidosClienteController).ExtraerSeleccionados(Pedidos, ViewGrid) as IBizPedidoCliente;
|
||||||
|
|
||||||
|
if Assigned(APedidos) then
|
||||||
|
if FController.EnviarEmailPedidos(APedidos) then
|
||||||
|
RefrescarInterno;
|
||||||
|
finally
|
||||||
|
APedidos := NIL;
|
||||||
|
HideHourglassCursor;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorPedidosCliente.actEnviarEmailUpdate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
if HayDatos and Assigned(ViewGrid) then
|
||||||
|
(Sender as TAction).Enabled := ViewGrid.esSeleccionCeldaDatos
|
||||||
|
and (ViewGrid.NumSeleccionados > 0)
|
||||||
|
else
|
||||||
|
(Sender as TAction).Enabled := False;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfEditorPedidosCliente.actGenerarAlbaranCliExecute(Sender: TObject);
|
procedure TfEditorPedidosCliente.actGenerarAlbaranCliExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
IDAlbaranAux : Integer;
|
IDAlbaranAux : Integer;
|
||||||
|
|||||||
@ -9,7 +9,7 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
uEditorRegistryUtils, uEditorPedidosCliente, uEditorPedidoCliente, uEditorElegirPedidosCliente,
|
uEditorRegistryUtils, uEditorPedidosCliente, uEditorPedidoCliente, uEditorElegirPedidosCliente,
|
||||||
uEditorElegirArticulosPedidoCliente, uEditorPedidosClienteReport;
|
uEditorElegirArticulosPedidoCliente, uEditorPedidosClienteReport, uDialogListaPedidosCliEnvioEMail;
|
||||||
|
|
||||||
procedure RegisterViews;
|
procedure RegisterViews;
|
||||||
begin
|
begin
|
||||||
@ -18,6 +18,7 @@ begin
|
|||||||
EditorRegistry.RegisterClass(TfEditorElegirPedidosCliente, 'EditorElegirPedidosCliente');
|
EditorRegistry.RegisterClass(TfEditorElegirPedidosCliente, 'EditorElegirPedidosCliente');
|
||||||
EditorRegistry.RegisterClass(TfEditorElegirArticulosPedidoCliente, 'EditorElegirArticulosPedidosCliente');
|
EditorRegistry.RegisterClass(TfEditorElegirArticulosPedidoCliente, 'EditorElegirArticulosPedidosCliente');
|
||||||
EditorRegistry.RegisterClass(TfEditorPedidosClientePreview, 'EditorPedidosClientePreview');
|
EditorRegistry.RegisterClass(TfEditorPedidosClientePreview, 'EditorPedidosClientePreview');
|
||||||
|
EditorRegistry.RegisterClass(TfDialogListaPedidosCliEnvioEMail, 'DialogListaPedidosCliEnvioEMail');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure UnregisterViews;
|
procedure UnregisterViews;
|
||||||
@ -27,6 +28,7 @@ begin
|
|||||||
EditorRegistry.UnRegisterClass(TfEditorElegirPedidosCliente);
|
EditorRegistry.UnRegisterClass(TfEditorElegirPedidosCliente);
|
||||||
EditorRegistry.UnRegisterClass(TfEditorElegirArticulosPedidoCliente);
|
EditorRegistry.UnRegisterClass(TfEditorElegirArticulosPedidoCliente);
|
||||||
EditorRegistry.UnRegisterClass(TfEditorPedidosClientePreview);
|
EditorRegistry.UnRegisterClass(TfEditorPedidosClientePreview);
|
||||||
|
EditorRegistry.UnRegisterClass(TfDialogListaPedidosCliEnvioEMail);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@ -785,7 +785,7 @@ object RptRecibosCliente: TRptRecibosCliente
|
|||||||
Top = 158
|
Top = 158
|
||||||
end
|
end
|
||||||
object frxReport: TfrxReport
|
object frxReport: TfrxReport
|
||||||
Version = '3.23.7'
|
Version = '4.3'
|
||||||
DotMatrixReport = False
|
DotMatrixReport = False
|
||||||
EngineOptions.DoublePass = True
|
EngineOptions.DoublePass = True
|
||||||
IniFile = '\Software\Fast Reports'
|
IniFile = '\Software\Fast Reports'
|
||||||
@ -793,6 +793,7 @@ object RptRecibosCliente: TRptRecibosCliente
|
|||||||
PreviewOptions.OutlineWidth = 180
|
PreviewOptions.OutlineWidth = 180
|
||||||
PreviewOptions.Zoom = 1.000000000000000000
|
PreviewOptions.Zoom = 1.000000000000000000
|
||||||
PrintOptions.Printer = 'Default'
|
PrintOptions.Printer = 'Default'
|
||||||
|
PrintOptions.PrintOnSheet = 0
|
||||||
ReportOptions.CreateDate = 37871.995398692100000000
|
ReportOptions.CreateDate = 37871.995398692100000000
|
||||||
ReportOptions.Description.Strings = (
|
ReportOptions.Description.Strings = (
|
||||||
'Demonstrates how to create simple list report.')
|
'Demonstrates how to create simple list report.')
|
||||||
@ -851,17 +852,6 @@ object RptRecibosCliente: TRptRecibosCliente
|
|||||||
StoreInDFM = False
|
StoreInDFM = False
|
||||||
Left = 169
|
Left = 169
|
||||||
Top = 16
|
Top = 16
|
||||||
Datasets = <
|
|
||||||
item
|
|
||||||
DataSet = frxDBCabecera
|
|
||||||
DataSetName = 'frxDBCabecera'
|
|
||||||
end
|
|
||||||
item
|
|
||||||
DataSet = frxDBCompensados
|
|
||||||
DataSetName = 'frxDBCompensados'
|
|
||||||
end>
|
|
||||||
Variables = <>
|
|
||||||
Style = <>
|
|
||||||
end
|
end
|
||||||
object frxDBCabecera: TfrxDBDataset
|
object frxDBCabecera: TfrxDBDataset
|
||||||
UserName = 'frxDBCabecera'
|
UserName = 'frxDBCabecera'
|
||||||
|
|||||||
@ -31,7 +31,7 @@ type
|
|||||||
procedure DataModuleCreate(Sender: TObject);
|
procedure DataModuleCreate(Sender: TObject);
|
||||||
private
|
private
|
||||||
FConnection: IDAConnection;
|
FConnection: IDAConnection;
|
||||||
procedure GenerarRecibo(const ID : Integer); overload;
|
procedure _GenerarRecibo(const ID : Integer); overload;
|
||||||
public
|
public
|
||||||
function GenerarRecibo(const ID : String): Binary; overload;
|
function GenerarRecibo(const ID : String): Binary; overload;
|
||||||
end;
|
end;
|
||||||
@ -67,24 +67,20 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Result := Binary.Create;
|
Result := Binary.Create;
|
||||||
FConnection.BeginTransaction;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
ID_Recibos := TStringList.Create;
|
ID_Recibos := TStringList.Create;
|
||||||
ID_Recibos.CommaText := ID;
|
ID_Recibos.CommaText := ID;
|
||||||
|
|
||||||
//Vamos generando todos y cada uno de los albaranes recibidos
|
//Vamos generando todos y cada uno de los albaranes recibidos
|
||||||
for i := 0 to ID_Recibos.Count - 1 do
|
for i := 0 to ID_Recibos.Count - 1 do
|
||||||
GenerarRecibo(StrToInt(ID_Recibos.Strings[i]));
|
_GenerarRecibo(StrToInt(ID_Recibos.Strings[i]));
|
||||||
|
|
||||||
frxReport.PreviewPages.SaveToStream(Result);
|
frxReport.PreviewPages.SaveToStream(Result);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
FConnection.RollbackTransaction;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRptRecibosCliente.GenerarRecibo(const ID: Integer);
|
procedure TRptRecibosCliente._GenerarRecibo(const ID: Integer);
|
||||||
var
|
var
|
||||||
dsMaster: IDADataset;
|
dsMaster: IDADataset;
|
||||||
dsCompensados : IDADataset;
|
dsCompensados : IDADataset;
|
||||||
@ -92,6 +88,7 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
AStream := TMemoryStream.Create;
|
AStream := TMemoryStream.Create;
|
||||||
|
FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
|
|
||||||
try
|
try
|
||||||
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [ID]);
|
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [ID]);
|
||||||
@ -109,6 +106,7 @@ begin
|
|||||||
frxReport.PrepareReport(False);
|
frxReport.PrepareReport(False);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
|
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
AStream.Free;
|
AStream.Free;
|
||||||
dsMaster := Nil;
|
dsMaster := Nil;
|
||||||
dsCompensados := Nil;
|
dsCompensados := Nil;
|
||||||
|
|||||||
@ -894,7 +894,7 @@ object RptRemesasCliente: TRptRemesasCliente
|
|||||||
Top = 158
|
Top = 158
|
||||||
end
|
end
|
||||||
object frxReport: TfrxReport
|
object frxReport: TfrxReport
|
||||||
Version = '3.23.7'
|
Version = '4.3'
|
||||||
DotMatrixReport = False
|
DotMatrixReport = False
|
||||||
EngineOptions.DoublePass = True
|
EngineOptions.DoublePass = True
|
||||||
IniFile = '\Software\Fast Reports'
|
IniFile = '\Software\Fast Reports'
|
||||||
@ -902,6 +902,7 @@ object RptRemesasCliente: TRptRemesasCliente
|
|||||||
PreviewOptions.OutlineWidth = 180
|
PreviewOptions.OutlineWidth = 180
|
||||||
PreviewOptions.Zoom = 1.000000000000000000
|
PreviewOptions.Zoom = 1.000000000000000000
|
||||||
PrintOptions.Printer = 'Default'
|
PrintOptions.Printer = 'Default'
|
||||||
|
PrintOptions.PrintOnSheet = 0
|
||||||
ReportOptions.CreateDate = 37871.995398692100000000
|
ReportOptions.CreateDate = 37871.995398692100000000
|
||||||
ReportOptions.LastChange = 39611.772828229160000000
|
ReportOptions.LastChange = 39611.772828229160000000
|
||||||
ReportOptions.VersionBuild = '1'
|
ReportOptions.VersionBuild = '1'
|
||||||
@ -986,66 +987,6 @@ object RptRemesasCliente: TRptRemesasCliente
|
|||||||
OnStartReport = 'frxReportOnStartReport'
|
OnStartReport = 'frxReportOnStartReport'
|
||||||
Left = 169
|
Left = 169
|
||||||
Top = 16
|
Top = 16
|
||||||
Datasets = <
|
|
||||||
item
|
|
||||||
DataSet = frxDBCabecera
|
|
||||||
DataSetName = 'frxDBCabecera'
|
|
||||||
end
|
|
||||||
item
|
|
||||||
DataSet = frxDBDetalles
|
|
||||||
DataSetName = 'frxDBDetalles'
|
|
||||||
end>
|
|
||||||
Variables = <
|
|
||||||
item
|
|
||||||
Name = ' Paginacion'
|
|
||||||
Value = Null
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Name = 'Pagina'
|
|
||||||
Value = Null
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Name = 'TotalPaginas'
|
|
||||||
Value = Null
|
|
||||||
end>
|
|
||||||
Style = <
|
|
||||||
item
|
|
||||||
Name = 'Concepto normal'
|
|
||||||
Color = clNone
|
|
||||||
Font.Charset = ANSI_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -12
|
|
||||||
Font.Name = 'Tahoma'
|
|
||||||
Font.Style = []
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Name = 'Concepto subtotal'
|
|
||||||
Color = clNone
|
|
||||||
Font.Charset = ANSI_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -12
|
|
||||||
Font.Name = 'Tahoma'
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Name = 'Cabecera de columna'
|
|
||||||
Color = 15790320
|
|
||||||
Font.Charset = ANSI_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -12
|
|
||||||
Font.Name = 'Tahoma'
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Name = 'Concepto titulo'
|
|
||||||
Color = clNone
|
|
||||||
Font.Charset = ANSI_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -13
|
|
||||||
Font.Name = 'Tahoma'
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
end>
|
|
||||||
end
|
end
|
||||||
object frxDBCabecera: TfrxDBDataset
|
object frxDBCabecera: TfrxDBDataset
|
||||||
UserName = 'frxDBCabecera'
|
UserName = 'frxDBCabecera'
|
||||||
|
|||||||
@ -31,7 +31,7 @@ type
|
|||||||
procedure DataModuleCreate(Sender: TObject);
|
procedure DataModuleCreate(Sender: TObject);
|
||||||
private
|
private
|
||||||
FConnection: IDAConnection;
|
FConnection: IDAConnection;
|
||||||
procedure GenerarRemesa(const ID : Integer); overload;
|
procedure _GenerarRemesa(const ID : Integer); overload;
|
||||||
public
|
public
|
||||||
function GenerarRemesa(const ID : String): Binary; overload;
|
function GenerarRemesa(const ID : String): Binary; overload;
|
||||||
end;
|
end;
|
||||||
@ -68,7 +68,6 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Result := Binary.Create;
|
Result := Binary.Create;
|
||||||
FConnection.BeginTransaction;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
ID_Remesas := TStringList.Create;
|
ID_Remesas := TStringList.Create;
|
||||||
@ -76,22 +75,21 @@ begin
|
|||||||
|
|
||||||
//Vamos generando todos y cada uno de los albaranes recibidos
|
//Vamos generando todos y cada uno de los albaranes recibidos
|
||||||
for i := 0 to ID_Remesas.Count - 1 do
|
for i := 0 to ID_Remesas.Count - 1 do
|
||||||
GenerarRemesa(StrToInt(ID_Remesas.Strings[i]));
|
_GenerarRemesa(StrToInt(ID_Remesas.Strings[i]));
|
||||||
|
|
||||||
frxReport.PreviewPages.SaveToStream(Result);
|
frxReport.PreviewPages.SaveToStream(Result);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
FConnection.RollbackTransaction;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRptRemesasCliente.GenerarRemesa(const ID: Integer);
|
procedure TRptRemesasCliente._GenerarRemesa(const ID: Integer);
|
||||||
var
|
var
|
||||||
AStream: TMemoryStream;
|
AStream: TMemoryStream;
|
||||||
dsMaster: IDADataset;
|
dsMaster: IDADataset;
|
||||||
dsDetail: IDADataset;
|
dsDetail: IDADataset;
|
||||||
begin
|
begin
|
||||||
AStream := TMemoryStream.Create;
|
AStream := TMemoryStream.Create;
|
||||||
|
FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
|
|
||||||
try
|
try
|
||||||
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [ID]);
|
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [ID]);
|
||||||
@ -109,6 +107,7 @@ begin
|
|||||||
frxReport.PrepareReport(False);
|
frxReport.PrepareReport(False);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
|
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
AStream.Free;
|
AStream.Free;
|
||||||
dsMaster := Nil;
|
dsMaster := Nil;
|
||||||
dsDetail := Nil;
|
dsDetail := Nil;
|
||||||
|
|||||||
@ -31,7 +31,7 @@ type
|
|||||||
procedure DataModuleCreate(Sender: TObject);
|
procedure DataModuleCreate(Sender: TObject);
|
||||||
private
|
private
|
||||||
FConnection: IDAConnection;
|
FConnection: IDAConnection;
|
||||||
procedure GenerarRemesa(const ID : Integer); overload;
|
procedure _GenerarRemesa(const ID : Integer); overload;
|
||||||
public
|
public
|
||||||
function GenerarRemesa(const ID : String): Binary; overload;
|
function GenerarRemesa(const ID : String): Binary; overload;
|
||||||
end;
|
end;
|
||||||
@ -68,7 +68,6 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Result := Binary.Create;
|
Result := Binary.Create;
|
||||||
FConnection.BeginTransaction;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
ID_Remesas := TStringList.Create;
|
ID_Remesas := TStringList.Create;
|
||||||
@ -76,22 +75,22 @@ begin
|
|||||||
|
|
||||||
//Vamos generando todos y cada uno de los albaranes recibidos
|
//Vamos generando todos y cada uno de los albaranes recibidos
|
||||||
for i := 0 to ID_Remesas.Count - 1 do
|
for i := 0 to ID_Remesas.Count - 1 do
|
||||||
GenerarRemesa(StrToInt(ID_Remesas.Strings[i]));
|
_GenerarRemesa(StrToInt(ID_Remesas.Strings[i]));
|
||||||
|
|
||||||
frxReport.PreviewPages.SaveToStream(Result);
|
frxReport.PreviewPages.SaveToStream(Result);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
FConnection.RollbackTransaction;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRptRemesasProveedor.GenerarRemesa(const ID: Integer);
|
procedure TRptRemesasProveedor._GenerarRemesa(const ID: Integer);
|
||||||
var
|
var
|
||||||
AStream: TMemoryStream;
|
AStream: TMemoryStream;
|
||||||
dsMaster: IDADataset;
|
dsMaster: IDADataset;
|
||||||
dsDetail: IDADataset;
|
dsDetail: IDADataset;
|
||||||
begin
|
begin
|
||||||
AStream := TMemoryStream.Create;
|
AStream := TMemoryStream.Create;
|
||||||
|
FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
|
|
||||||
try
|
try
|
||||||
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [ID]);
|
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [ID]);
|
||||||
@ -109,6 +108,7 @@ begin
|
|||||||
frxReport.PrepareReport(False);
|
frxReport.PrepareReport(False);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
|
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
AStream.Free;
|
AStream.Free;
|
||||||
dsMaster := Nil;
|
dsMaster := Nil;
|
||||||
dsDetail := Nil;
|
dsDetail := Nil;
|
||||||
|
|||||||
@ -170,6 +170,16 @@
|
|||||||
</Parameter>
|
</Parameter>
|
||||||
</Parameters>
|
</Parameters>
|
||||||
</Operation>
|
</Operation>
|
||||||
|
<Operation Name="GenerarReportPDF" UID="{A39BD978-1262-440F-B889-A681EF864AD5}">
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="Result" DataType="Binary" Flag="Result">
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="ListaID" DataType="TIntegerArray" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="ShowLogotipo" DataType="Boolean" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
|
</Parameters>
|
||||||
|
</Operation>
|
||||||
</Operations>
|
</Operations>
|
||||||
</Interface>
|
</Interface>
|
||||||
</Interfaces>
|
</Interfaces>
|
||||||
@ -260,6 +270,16 @@
|
|||||||
</Parameter>
|
</Parameter>
|
||||||
</Parameters>
|
</Parameters>
|
||||||
</Operation>
|
</Operation>
|
||||||
|
<Operation Name="GenerarReportPDF" UID="{668DADA0-FB08-449E-88F0-092DE6BCC539}">
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="Result" DataType="Binary" Flag="Result">
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="ListaID" DataType="TIntegerArray" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="ShowLogotipo" DataType="Boolean" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
|
</Parameters>
|
||||||
|
</Operation>
|
||||||
</Operations>
|
</Operations>
|
||||||
</Interface>
|
</Interface>
|
||||||
</Interfaces>
|
</Interfaces>
|
||||||
@ -304,6 +324,16 @@
|
|||||||
</Parameter>
|
</Parameter>
|
||||||
</Parameters>
|
</Parameters>
|
||||||
</Operation>
|
</Operation>
|
||||||
|
<Operation Name="GenerarReportPDF" UID="{07B002D3-D4A8-4D0D-8D38-9EDAF97A634D}">
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="Result" DataType="Binary" Flag="Result">
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="ListaID" DataType="TIntegerArray" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="ShowLogotipo" DataType="Boolean" Flag="In" >
|
||||||
|
</Parameter>
|
||||||
|
</Parameters>
|
||||||
|
</Operation>
|
||||||
</Operations>
|
</Operations>
|
||||||
</Interface>
|
</Interface>
|
||||||
</Interfaces>
|
</Interfaces>
|
||||||
|
|||||||
@ -288,6 +288,7 @@ type
|
|||||||
['{3DCC03E4-E9CE-4798-99D4-7170C9CF815B}']
|
['{3DCC03E4-E9CE-4798-99D4-7170C9CF815B}']
|
||||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||||
function GenerateReport(const ID: String): Binary;
|
function GenerateReport(const ID: String): Binary;
|
||||||
|
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ CosrvPedidosProveedor }
|
{ CosrvPedidosProveedor }
|
||||||
@ -302,6 +303,7 @@ type
|
|||||||
|
|
||||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||||
function GenerateReport(const ID: String): Binary;
|
function GenerateReport(const ID: String): Binary;
|
||||||
|
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ IsrvConfiguracion }
|
{ IsrvConfiguracion }
|
||||||
@ -385,6 +387,7 @@ type
|
|||||||
['{8A06D5A7-8461-4F6E-8A8B-EC49C84C45D1}']
|
['{8A06D5A7-8461-4F6E-8A8B-EC49C84C45D1}']
|
||||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||||
function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary;
|
function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary;
|
||||||
|
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ CosrvPedidosCliente }
|
{ CosrvPedidosCliente }
|
||||||
@ -399,6 +402,7 @@ type
|
|||||||
|
|
||||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||||
function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary;
|
function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary;
|
||||||
|
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ IsrvFamilias }
|
{ IsrvFamilias }
|
||||||
@ -424,6 +428,7 @@ type
|
|||||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||||
function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary;
|
function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary;
|
||||||
function GenerateEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary;
|
function GenerateEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary;
|
||||||
|
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ CosrvAlbaranesCliente }
|
{ CosrvAlbaranesCliente }
|
||||||
@ -439,6 +444,7 @@ type
|
|||||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||||
function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary;
|
function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary;
|
||||||
function GenerateEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary;
|
function GenerateEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary;
|
||||||
|
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ IsrvAlbaranesProveedor }
|
{ IsrvAlbaranesProveedor }
|
||||||
@ -1447,6 +1453,31 @@ begin
|
|||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TsrvPedidosProveedor_Proxy.GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||||
|
var
|
||||||
|
__request, __response : TMemoryStream;
|
||||||
|
begin
|
||||||
|
result := nil;
|
||||||
|
__request := TMemoryStream.Create;
|
||||||
|
__response := TMemoryStream.Create;
|
||||||
|
|
||||||
|
try
|
||||||
|
__Message.Initialize(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarReportPDF');
|
||||||
|
__Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
||||||
|
__Message.Write('ShowLogotipo', TypeInfo(Boolean), ShowLogotipo, []);
|
||||||
|
__Message.Finalize;
|
||||||
|
|
||||||
|
__Message.WriteToStream(__request);
|
||||||
|
__TransportChannel.Dispatch(__request, __response);
|
||||||
|
__Message.ReadFromStream(__response);
|
||||||
|
|
||||||
|
__Message.Read('Result', TypeInfo(Binary), result, []);
|
||||||
|
finally
|
||||||
|
__request.Free;
|
||||||
|
__response.Free;
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
|
||||||
{ CosrvConfiguracion }
|
{ CosrvConfiguracion }
|
||||||
|
|
||||||
class function CosrvConfiguracion.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvConfiguracion;
|
class function CosrvConfiguracion.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvConfiguracion;
|
||||||
@ -1657,6 +1688,31 @@ begin
|
|||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TsrvPedidosCliente_Proxy.GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||||
|
var
|
||||||
|
__request, __response : TMemoryStream;
|
||||||
|
begin
|
||||||
|
result := nil;
|
||||||
|
__request := TMemoryStream.Create;
|
||||||
|
__response := TMemoryStream.Create;
|
||||||
|
|
||||||
|
try
|
||||||
|
__Message.Initialize(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarReportPDF');
|
||||||
|
__Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
||||||
|
__Message.Write('ShowLogotipo', TypeInfo(Boolean), ShowLogotipo, []);
|
||||||
|
__Message.Finalize;
|
||||||
|
|
||||||
|
__Message.WriteToStream(__request);
|
||||||
|
__TransportChannel.Dispatch(__request, __response);
|
||||||
|
__Message.ReadFromStream(__response);
|
||||||
|
|
||||||
|
__Message.Read('Result', TypeInfo(Binary), result, []);
|
||||||
|
finally
|
||||||
|
__request.Free;
|
||||||
|
__response.Free;
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
|
||||||
{ CosrvFamilias }
|
{ CosrvFamilias }
|
||||||
|
|
||||||
class function CosrvFamilias.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvFamilias;
|
class function CosrvFamilias.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvFamilias;
|
||||||
@ -1756,6 +1812,31 @@ begin
|
|||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TsrvAlbaranesCliente_Proxy.GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||||
|
var
|
||||||
|
__request, __response : TMemoryStream;
|
||||||
|
begin
|
||||||
|
result := nil;
|
||||||
|
__request := TMemoryStream.Create;
|
||||||
|
__response := TMemoryStream.Create;
|
||||||
|
|
||||||
|
try
|
||||||
|
__Message.Initialize(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarReportPDF');
|
||||||
|
__Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
||||||
|
__Message.Write('ShowLogotipo', TypeInfo(Boolean), ShowLogotipo, []);
|
||||||
|
__Message.Finalize;
|
||||||
|
|
||||||
|
__Message.WriteToStream(__request);
|
||||||
|
__TransportChannel.Dispatch(__request, __response);
|
||||||
|
__Message.ReadFromStream(__response);
|
||||||
|
|
||||||
|
__Message.Read('Result', TypeInfo(Binary), result, []);
|
||||||
|
finally
|
||||||
|
__request.Free;
|
||||||
|
__response.Free;
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
|
||||||
{ CosrvAlbaranesProveedor }
|
{ CosrvAlbaranesProveedor }
|
||||||
|
|
||||||
class function CosrvAlbaranesProveedor.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvAlbaranesProveedor;
|
class function CosrvAlbaranesProveedor.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvAlbaranesProveedor;
|
||||||
|
|||||||
@ -66,6 +66,7 @@ type
|
|||||||
published
|
published
|
||||||
procedure Invoke_GetNextAutoInc(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure Invoke_GetNextAutoInc(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
procedure Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
|
procedure Invoke_GenerarReportPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TsrvConfiguracion_Invoker = class(TDARemoteService_Invoker)
|
TsrvConfiguracion_Invoker = class(TDARemoteService_Invoker)
|
||||||
@ -102,6 +103,7 @@ type
|
|||||||
published
|
published
|
||||||
procedure Invoke_GetNextAutoInc(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure Invoke_GetNextAutoInc(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
procedure Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
|
procedure Invoke_GenerarReportPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TsrvFamilias_Invoker = class(TDARemoteService_Invoker)
|
TsrvFamilias_Invoker = class(TDARemoteService_Invoker)
|
||||||
@ -117,6 +119,7 @@ type
|
|||||||
procedure Invoke_GetNextAutoInc(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure Invoke_GetNextAutoInc(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
procedure Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
procedure Invoke_GenerateEtiquetas(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure Invoke_GenerateEtiquetas(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
|
procedure Invoke_GenerarReportPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TsrvAlbaranesProveedor_Invoker = class(TDARemoteService_Invoker)
|
TsrvAlbaranesProveedor_Invoker = class(TDARemoteService_Invoker)
|
||||||
@ -587,6 +590,37 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TsrvPedidosProveedor_Invoker.Invoke_GenerarReportPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
|
{ function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary; }
|
||||||
|
var
|
||||||
|
ListaID: FactuGES_Intf.TIntegerArray;
|
||||||
|
ShowLogotipo: Boolean;
|
||||||
|
lResult: Binary;
|
||||||
|
__lObjectDisposer: TROObjectDisposer;
|
||||||
|
begin
|
||||||
|
ListaID := nil;
|
||||||
|
lResult := nil;
|
||||||
|
try
|
||||||
|
__Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
||||||
|
__Message.Read('ShowLogotipo', TypeInfo(Boolean), ShowLogotipo, []);
|
||||||
|
|
||||||
|
lResult := (__Instance as IsrvPedidosProveedor).GenerarReportPDF(ListaID, ShowLogotipo);
|
||||||
|
|
||||||
|
__Message.Initialize(__Transport, 'FactuGES', 'srvPedidosProveedor', 'GenerarReportPDFResponse');
|
||||||
|
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
||||||
|
__Message.Finalize;
|
||||||
|
|
||||||
|
finally
|
||||||
|
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
|
||||||
|
try
|
||||||
|
__lObjectDisposer.Add(ListaID);
|
||||||
|
__lObjectDisposer.Add(lResult);
|
||||||
|
finally
|
||||||
|
__lObjectDisposer.Free();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TsrvConfiguracion_Invoker }
|
{ TsrvConfiguracion_Invoker }
|
||||||
|
|
||||||
procedure TsrvConfiguracion_Invoker.Invoke_darValor(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure TsrvConfiguracion_Invoker.Invoke_darValor(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
@ -721,6 +755,37 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TsrvPedidosCliente_Invoker.Invoke_GenerarReportPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
|
{ function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary; }
|
||||||
|
var
|
||||||
|
ListaID: FactuGES_Intf.TIntegerArray;
|
||||||
|
ShowLogotipo: Boolean;
|
||||||
|
lResult: Binary;
|
||||||
|
__lObjectDisposer: TROObjectDisposer;
|
||||||
|
begin
|
||||||
|
ListaID := nil;
|
||||||
|
lResult := nil;
|
||||||
|
try
|
||||||
|
__Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
||||||
|
__Message.Read('ShowLogotipo', TypeInfo(Boolean), ShowLogotipo, []);
|
||||||
|
|
||||||
|
lResult := (__Instance as IsrvPedidosCliente).GenerarReportPDF(ListaID, ShowLogotipo);
|
||||||
|
|
||||||
|
__Message.Initialize(__Transport, 'FactuGES', 'srvPedidosCliente', 'GenerarReportPDFResponse');
|
||||||
|
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
||||||
|
__Message.Finalize;
|
||||||
|
|
||||||
|
finally
|
||||||
|
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
|
||||||
|
try
|
||||||
|
__lObjectDisposer.Add(ListaID);
|
||||||
|
__lObjectDisposer.Add(lResult);
|
||||||
|
finally
|
||||||
|
__lObjectDisposer.Free();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TsrvAlbaranesCliente_Invoker }
|
{ TsrvAlbaranesCliente_Invoker }
|
||||||
|
|
||||||
procedure TsrvAlbaranesCliente_Invoker.Invoke_GetNextAutoInc(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure TsrvAlbaranesCliente_Invoker.Invoke_GetNextAutoInc(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
@ -800,6 +865,37 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TsrvAlbaranesCliente_Invoker.Invoke_GenerarReportPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
|
{ function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary; }
|
||||||
|
var
|
||||||
|
ListaID: FactuGES_Intf.TIntegerArray;
|
||||||
|
ShowLogotipo: Boolean;
|
||||||
|
lResult: Binary;
|
||||||
|
__lObjectDisposer: TROObjectDisposer;
|
||||||
|
begin
|
||||||
|
ListaID := nil;
|
||||||
|
lResult := nil;
|
||||||
|
try
|
||||||
|
__Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
||||||
|
__Message.Read('ShowLogotipo', TypeInfo(Boolean), ShowLogotipo, []);
|
||||||
|
|
||||||
|
lResult := (__Instance as IsrvAlbaranesCliente).GenerarReportPDF(ListaID, ShowLogotipo);
|
||||||
|
|
||||||
|
__Message.Initialize(__Transport, 'FactuGES', 'srvAlbaranesCliente', 'GenerarReportPDFResponse');
|
||||||
|
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
||||||
|
__Message.Finalize;
|
||||||
|
|
||||||
|
finally
|
||||||
|
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
|
||||||
|
try
|
||||||
|
__lObjectDisposer.Add(ListaID);
|
||||||
|
__lObjectDisposer.Add(lResult);
|
||||||
|
finally
|
||||||
|
__lObjectDisposer.Free();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TsrvAlbaranesProveedor_Invoker }
|
{ TsrvAlbaranesProveedor_Invoker }
|
||||||
|
|
||||||
procedure TsrvAlbaranesProveedor_Invoker.Invoke_GetNextAutoInc(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
procedure TsrvAlbaranesProveedor_Invoker.Invoke_GetNextAutoInc(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||||
|
|||||||
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<BorlandProject>
|
<BorlandProject>
|
||||||
<PersonalityInfo>
|
<PersonalityInfo>
|
||||||
<Option>
|
<Option>
|
||||||
@ -175,11 +175,10 @@
|
|||||||
<VersionInfoKeys Name="ProductName">FactuGES Server</VersionInfoKeys>
|
<VersionInfoKeys Name="ProductName">FactuGES Server</VersionInfoKeys>
|
||||||
<VersionInfoKeys Name="ProductVersion">3.0.9.0</VersionInfoKeys>
|
<VersionInfoKeys Name="ProductVersion">3.0.9.0</VersionInfoKeys>
|
||||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||||
<VersionInfoKeys Name="CompileDate">martes, 30 de septiembre de 2008 19:31</VersionInfoKeys></VersionInfoKeys>
|
<VersionInfoKeys Name="CompileDate">martes, 30 de septiembre de 2008 19:31</VersionInfoKeys></VersionInfoKeys> <Excluded_Packages>
|
||||||
<Excluded_Packages>
|
<Excluded_Packages Name="C:\Archivos de programa\RemObjects Software\Pascal Script\Dcu\D10\PascalScript_RO_D10.bpl">RemObjects Pascal Script - RemObjects SDK 3.0 Integration</Excluded_Packages>
|
||||||
<Excluded_Packages Name="C:\Archivos de programa\RemObjects Software\Pascal Script\Dcu\D10\PascalScript_RO_D10.bpl">RemObjects Pascal Script - RemObjects SDK 3.0 Integration</Excluded_Packages>
|
</Excluded_Packages>
|
||||||
</Excluded_Packages>
|
</Delphi.Personality>
|
||||||
</Delphi.Personality>
|
|
||||||
<ModelSupport>False</ModelSupport>
|
<ModelSupport>False</ModelSupport>
|
||||||
<!-- EurekaLog First Line
|
<!-- EurekaLog First Line
|
||||||
[Exception Log]
|
[Exception Log]
|
||||||
|
|||||||
@ -912,12 +912,12 @@
|
|||||||
#define IdResourceStrings_RSMIMEMIMETypeEmpty 65181
|
#define IdResourceStrings_RSMIMEMIMETypeEmpty 65181
|
||||||
#define IdResourceStrings_RSMIMEMIMEExtAlreadyExists 65182
|
#define IdResourceStrings_RSMIMEMIMEExtAlreadyExists 65182
|
||||||
#define IdResourceStrings_RSStatusResolving 65183
|
#define IdResourceStrings_RSStatusResolving 65183
|
||||||
#define uRODECConst_sFMT_HEXL 65184
|
#define uRORes_err_InvalidVarArrayDimCount 65184
|
||||||
#define uRODECConst_sFMT_MIME64 65185
|
#define uRORes_err_MessageNotAssigned 65185
|
||||||
#define uRODECConst_sFMT_UU 65186
|
#define ComConst_SOleError 65186
|
||||||
#define uRODECConst_sFMT_XX 65187
|
#define ComConst_SNoMethod 65187
|
||||||
#define uRODECConst_sInvalidKeySize 65188
|
#define ComConst_SVarNotObject 65188
|
||||||
#define uRODECConst_sNotInitialized 65189
|
#define ComConst_STooManyParams 65189
|
||||||
#define IdResourceStrings_RSCannotAllocateSocket 65190
|
#define IdResourceStrings_RSCannotAllocateSocket 65190
|
||||||
#define IdResourceStrings_RSConnectionClosedGracefully 65191
|
#define IdResourceStrings_RSConnectionClosedGracefully 65191
|
||||||
#define IdResourceStrings_RSCouldNotBindSocket 65192
|
#define IdResourceStrings_RSCouldNotBindSocket 65192
|
||||||
@ -928,70 +928,70 @@
|
|||||||
#define IdResourceStrings_RSThreadClassNotSpecified 65197
|
#define IdResourceStrings_RSThreadClassNotSpecified 65197
|
||||||
#define IdResourceStrings_RSFileNotFound 65198
|
#define IdResourceStrings_RSFileNotFound 65198
|
||||||
#define IdResourceStrings_RSOnlyOneAntiFreeze 65199
|
#define IdResourceStrings_RSOnlyOneAntiFreeze 65199
|
||||||
#define uRORes_err_NoXMLParsersAvailable 65200
|
#define uRORes_err_UnhandledException 65200
|
||||||
#define uRORes_err_IDispatchMarshalingNotSupported 65201
|
#define uRORes_err_ChannelBusy 65201
|
||||||
#define uRORes_err_UnsupportedVariantType 65202
|
#define uRORes_err_ArrayIndexOutOfBounds 65202
|
||||||
#define uRORes_err_VariantIsNotArray 65203
|
#define uRORes_err_InvalidHeader 65203
|
||||||
#define uRORes_err_InvalidVarArrayDimCount 65204
|
#define uRORes_err_UnknownClassInStream 65204
|
||||||
#define uRORes_err_MessageNotAssigned 65205
|
#define uRORes_err_UnexpectedClassInStream 65205
|
||||||
#define ComConst_SOleError 65206
|
#define uRORes_err_SessionNotFound 65206
|
||||||
#define ComConst_SNoMethod 65207
|
#define uRORes_err_ChannelDoesntSupportIROMetadataReader 65207
|
||||||
#define ComConst_SVarNotObject 65208
|
#define uRORes_err_TooManySessions 65208
|
||||||
#define ComConst_STooManyParams 65209
|
#define uRORes_err_DOMElementIsNIL 65209
|
||||||
#define uRODECConst_sProtectionCircular 65210
|
#define uRORes_err_CannotLoadXMLDocument 65210
|
||||||
#define uRODECConst_sStringFormatExists 65211
|
#define uRORes_err_ErrorCreatingMsXmlDoc 65211
|
||||||
#define uRODECConst_sInvalidStringFormat 65212
|
#define uRORes_err_NoXMLParsersAvailable 65212
|
||||||
#define uRODECConst_sInvalidFormatString 65213
|
#define uRORes_err_IDispatchMarshalingNotSupported 65213
|
||||||
#define uRODECConst_sFMT_COPY 65214
|
#define uRORes_err_UnsupportedVariantType 65214
|
||||||
#define uRODECConst_sFMT_HEX 65215
|
#define uRORes_err_VariantIsNotArray 65215
|
||||||
#define uRORes_err_UnknownProxyInterface 65216
|
#define uRORes_str_ExceptionReraisedFromServer 65216
|
||||||
#define uRORes_err_DispatcherAlreadyAssigned 65217
|
#define uRORes_err_AssignError 65217
|
||||||
#define uRORes_err_CannotFindMessageDispatcher 65218
|
#define uRORes_err_InvalidRequestStream 65218
|
||||||
#define uRORes_err_ServerOnlySupportsOneDispatcher 65219
|
#define uRORes_err_NILMessage 65219
|
||||||
#define uRORes_err_UnhandledException 65220
|
#define uRORes_err_UnspecifiedInterface 65220
|
||||||
#define uRORes_err_ChannelBusy 65221
|
#define uRORes_err_UnspecifiedMessage 65221
|
||||||
#define uRORes_err_ArrayIndexOutOfBounds 65222
|
#define uRORes_err_UnknownMethod 65222
|
||||||
#define uRORes_err_InvalidHeader 65223
|
#define uRORes_err_ClassFactoryDidNotReturnInstance 65223
|
||||||
#define uRORes_err_UnknownClassInStream 65224
|
#define uRORes_err_TypeNotSupported 65224
|
||||||
#define uRORes_err_UnexpectedClassInStream 65225
|
#define uRORes_err_ClassFactoryNotFound 65225
|
||||||
#define uRORes_err_SessionNotFound 65226
|
#define uRORes_err_IROMessageNotSupported 65226
|
||||||
#define uRORes_err_ChannelDoesntSupportIROMetadataReader 65227
|
#define uRORes_err_ClassAlreadyRegistered 65227
|
||||||
#define uRORes_err_TooManySessions 65228
|
#define uRORes_err_UnknownProxyInterface 65228
|
||||||
#define uRORes_err_DOMElementIsNIL 65229
|
#define uRORes_err_DispatcherAlreadyAssigned 65229
|
||||||
#define uRORes_err_CannotLoadXMLDocument 65230
|
#define uRORes_err_CannotFindMessageDispatcher 65230
|
||||||
#define uRORes_err_ErrorCreatingMsXmlDoc 65231
|
#define uRORes_err_ServerOnlySupportsOneDispatcher 65231
|
||||||
#define uRORes_err_RodlInvalidDataType 65232
|
#define uRORes_err_InvalidType 65232
|
||||||
#define uRORes_err_RodlStructCannotBeNested 65233
|
#define uRORes_err_InvalidStream 65233
|
||||||
#define uRORes_err_RodlInvalidAncestorType 65234
|
#define uRORes_err_InvalidParamFlag 65234
|
||||||
#define uRORes_str_ExceptionOnServer 65235
|
#define uRORes_err_InvalidStringLength 65235
|
||||||
#define uRORes_str_ExceptionReraisedFromServer 65236
|
#define uRORes_str_InvalidClassTypeInStream 65236
|
||||||
#define uRORes_err_AssignError 65237
|
#define uRORes_err_UnexpectedEndOfStream 65237
|
||||||
#define uRORes_err_InvalidRequestStream 65238
|
#define uRORes_err_RodlDuplicateName 65238
|
||||||
#define uRORes_err_NILMessage 65239
|
#define uRORes_err_RodlNoDataTypeSpecified 65239
|
||||||
#define uRORes_err_UnspecifiedInterface 65240
|
#define uRORes_err_RodlNoEnumValues 65240
|
||||||
#define uRORes_err_UnspecifiedMessage 65241
|
#define uRORes_err_RodlNoStructElementsDefined 65241
|
||||||
#define uRORes_err_UnknownMethod 65242
|
#define uRORes_err_RodlNoOperationsDefined 65242
|
||||||
#define uRORes_err_ClassFactoryDidNotReturnInstance 65243
|
#define uRORes_err_RodlUsedFileDoesNotExist 65243
|
||||||
#define uRORes_err_TypeNotSupported 65244
|
#define uRORes_err_RodlInvalidDataType 65244
|
||||||
#define uRORes_err_ClassFactoryNotFound 65245
|
#define uRORes_err_RodlStructCannotBeNested 65245
|
||||||
#define uRORes_err_IROMessageNotSupported 65246
|
#define uRORes_err_RodlInvalidAncestorType 65246
|
||||||
#define uRORes_err_ClassAlreadyRegistered 65247
|
#define uRORes_str_ExceptionOnServer 65247
|
||||||
#define Consts_SUTF8Encoding 65248
|
#define Consts_SUTF8Encoding 65248
|
||||||
#define Consts_SUTF7Encoding 65249
|
#define Consts_SUTF7Encoding 65249
|
||||||
#define Consts_SPageControlNotSet 65250
|
#define Consts_SPageControlNotSet 65250
|
||||||
#define uRORes_err_InvalidIndex 65251
|
#define uRODECConst_sProtectionCircular 65251
|
||||||
#define uRORes_err_InvalidType 65252
|
#define uRODECConst_sStringFormatExists 65252
|
||||||
#define uRORes_err_InvalidStream 65253
|
#define uRODECConst_sInvalidStringFormat 65253
|
||||||
#define uRORes_err_InvalidParamFlag 65254
|
#define uRODECConst_sInvalidFormatString 65254
|
||||||
#define uRORes_err_InvalidStringLength 65255
|
#define uRODECConst_sFMT_COPY 65255
|
||||||
#define uRORes_str_InvalidClassTypeInStream 65256
|
#define uRODECConst_sFMT_HEX 65256
|
||||||
#define uRORes_err_UnexpectedEndOfStream 65257
|
#define uRODECConst_sFMT_HEXL 65257
|
||||||
#define uRORes_err_RodlDuplicateName 65258
|
#define uRODECConst_sFMT_MIME64 65258
|
||||||
#define uRORes_err_RodlNoDataTypeSpecified 65259
|
#define uRODECConst_sFMT_UU 65259
|
||||||
#define uRORes_err_RodlNoEnumValues 65260
|
#define uRODECConst_sFMT_XX 65260
|
||||||
#define uRORes_err_RodlNoStructElementsDefined 65261
|
#define uRODECConst_sInvalidKeySize 65261
|
||||||
#define uRORes_err_RodlNoOperationsDefined 65262
|
#define uRODECConst_sNotInitialized 65262
|
||||||
#define uRORes_err_RodlUsedFileDoesNotExist 65263
|
#define uRORes_err_InvalidIndex 65263
|
||||||
#define Consts_SPictureLabel 65264
|
#define Consts_SPictureLabel 65264
|
||||||
#define Consts_SPictureDesc 65265
|
#define Consts_SPictureDesc 65265
|
||||||
#define Consts_SPreviewLabel 65266
|
#define Consts_SPreviewLabel 65266
|
||||||
@ -2170,12 +2170,12 @@ BEGIN
|
|||||||
IdResourceStrings_RSMIMEMIMETypeEmpty, "Mimetype is empty"
|
IdResourceStrings_RSMIMEMIMETypeEmpty, "Mimetype is empty"
|
||||||
IdResourceStrings_RSMIMEMIMEExtAlreadyExists, "Extension already exits"
|
IdResourceStrings_RSMIMEMIMEExtAlreadyExists, "Extension already exits"
|
||||||
IdResourceStrings_RSStatusResolving, "Resolving hostname %s."
|
IdResourceStrings_RSStatusResolving, "Resolving hostname %s."
|
||||||
uRODECConst_sFMT_HEXL, "Hexadecimal lowercase"
|
uRORes_err_InvalidVarArrayDimCount, "Variant Array DimCount must be 1 but is %d"
|
||||||
uRODECConst_sFMT_MIME64, "MIME Base 64"
|
uRORes_err_MessageNotAssigned, "Message is NIL"
|
||||||
uRODECConst_sFMT_UU, "UU Coding"
|
ComConst_SOleError, "OLE error %.8x"
|
||||||
uRODECConst_sFMT_XX, "XX Coding"
|
ComConst_SNoMethod, "Method '%s' not supported by automation object"
|
||||||
uRODECConst_sInvalidKeySize, "Length from Encryptionkey is invalid.\r\nKeysize for %s must be to %d-%d bytes"
|
ComConst_SVarNotObject, "Variant does not reference an automation object"
|
||||||
uRODECConst_sNotInitialized, "%s is not initialized call Init() or InitKey() before."
|
ComConst_STooManyParams, "Dispatch methods do not support more than 64 parameters"
|
||||||
IdResourceStrings_RSCannotAllocateSocket, "Cannot allocate socket."
|
IdResourceStrings_RSCannotAllocateSocket, "Cannot allocate socket."
|
||||||
IdResourceStrings_RSConnectionClosedGracefully, "Connection Closed Gracefully."
|
IdResourceStrings_RSConnectionClosedGracefully, "Connection Closed Gracefully."
|
||||||
IdResourceStrings_RSCouldNotBindSocket, "Could not bind socket. Address and port are already in use."
|
IdResourceStrings_RSCouldNotBindSocket, "Could not bind socket. Address and port are already in use."
|
||||||
@ -2186,26 +2186,6 @@ BEGIN
|
|||||||
IdResourceStrings_RSThreadClassNotSpecified, "Thread Class Not Specified."
|
IdResourceStrings_RSThreadClassNotSpecified, "Thread Class Not Specified."
|
||||||
IdResourceStrings_RSFileNotFound, "File \"%s\" not found"
|
IdResourceStrings_RSFileNotFound, "File \"%s\" not found"
|
||||||
IdResourceStrings_RSOnlyOneAntiFreeze, "Only one TIdAntiFreeze can exist per application."
|
IdResourceStrings_RSOnlyOneAntiFreeze, "Only one TIdAntiFreeze can exist per application."
|
||||||
uRORes_err_NoXMLParsersAvailable, "MSXML is not installed"
|
|
||||||
uRORes_err_IDispatchMarshalingNotSupported, "Marshaling of IDispatch (%d) type variants is not supported."
|
|
||||||
uRORes_err_UnsupportedVariantType, "Unsupported variant type \"%d\""
|
|
||||||
uRORes_err_VariantIsNotArray, "Variant must be Array, but is %d"
|
|
||||||
uRORes_err_InvalidVarArrayDimCount, "Variant Array DimCount must be 1 but is %d"
|
|
||||||
uRORes_err_MessageNotAssigned, "Message is NIL"
|
|
||||||
ComConst_SOleError, "OLE error %.8x"
|
|
||||||
ComConst_SNoMethod, "Method '%s' not supported by automation object"
|
|
||||||
ComConst_SVarNotObject, "Variant does not reference an automation object"
|
|
||||||
ComConst_STooManyParams, "Dispatch methods do not support more than 64 parameters"
|
|
||||||
uRODECConst_sProtectionCircular, "Circular Protection detected, Protection Object is invalid."
|
|
||||||
uRODECConst_sStringFormatExists, "String Format \"%d\" not exists."
|
|
||||||
uRODECConst_sInvalidStringFormat, "Input is not an valid %s Format."
|
|
||||||
uRODECConst_sInvalidFormatString, "Input can not be convert to %s Format."
|
|
||||||
uRODECConst_sFMT_COPY, "copy Input to Output"
|
|
||||||
uRODECConst_sFMT_HEX, "Hexadecimal"
|
|
||||||
uRORes_err_UnknownProxyInterface, "Unknown proxy interface \"%s\""
|
|
||||||
uRORes_err_DispatcherAlreadyAssigned, "Dispatcher for %s already assigned"
|
|
||||||
uRORes_err_CannotFindMessageDispatcher, "Cannot find message dispatcher. Maybe there is no message component configured for for the requested path?"
|
|
||||||
uRORes_err_ServerOnlySupportsOneDispatcher, "%s servers only support one dispatcher"
|
|
||||||
uRORes_err_UnhandledException, "Unhandled exception"
|
uRORes_err_UnhandledException, "Unhandled exception"
|
||||||
uRORes_err_ChannelBusy, "Channel is busy. Try again later."
|
uRORes_err_ChannelBusy, "Channel is busy. Try again later."
|
||||||
uRORes_err_ArrayIndexOutOfBounds, "Array index out of bounds (%d)."
|
uRORes_err_ArrayIndexOutOfBounds, "Array index out of bounds (%d)."
|
||||||
@ -2218,10 +2198,10 @@ BEGIN
|
|||||||
uRORes_err_DOMElementIsNIL, "DOMElement is NIL"
|
uRORes_err_DOMElementIsNIL, "DOMElement is NIL"
|
||||||
uRORes_err_CannotLoadXMLDocument, "Cannot load XML document.\rReason: %s\rLine: %d\rPosition: %d"
|
uRORes_err_CannotLoadXMLDocument, "Cannot load XML document.\rReason: %s\rLine: %d\rPosition: %d"
|
||||||
uRORes_err_ErrorCreatingMsXmlDoc, "Error creating MSXML Document class\r\r%s: %s"
|
uRORes_err_ErrorCreatingMsXmlDoc, "Error creating MSXML Document class\r\r%s: %s"
|
||||||
uRORes_err_RodlInvalidDataType, "Invalid or undefined data type \"%s\"."
|
uRORes_err_NoXMLParsersAvailable, "MSXML is not installed"
|
||||||
uRORes_err_RodlStructCannotBeNested, "Structs cannot recursively contain themselves."
|
uRORes_err_IDispatchMarshalingNotSupported, "Marshaling of IDispatch (%d) type variants is not supported."
|
||||||
uRORes_err_RodlInvalidAncestorType, "Invalid or undefined ancestor type \"%s\"."
|
uRORes_err_UnsupportedVariantType, "Unsupported variant type \"%d\""
|
||||||
uRORes_str_ExceptionOnServer, "An exception of type %s was raised on the server: %s"
|
uRORes_err_VariantIsNotArray, "Variant must be Array, but is %d"
|
||||||
uRORes_str_ExceptionReraisedFromServer, "An exception was raised on the server: %s"
|
uRORes_str_ExceptionReraisedFromServer, "An exception was raised on the server: %s"
|
||||||
uRORes_err_AssignError, "Cannot assign a \"%s\" to a \"%s\"."
|
uRORes_err_AssignError, "Cannot assign a \"%s\" to a \"%s\"."
|
||||||
uRORes_err_InvalidRequestStream, "Invalid request stream (%d bytes)"
|
uRORes_err_InvalidRequestStream, "Invalid request stream (%d bytes)"
|
||||||
@ -2234,10 +2214,10 @@ BEGIN
|
|||||||
uRORes_err_ClassFactoryNotFound, "Class factory for interface %s not found"
|
uRORes_err_ClassFactoryNotFound, "Class factory for interface %s not found"
|
||||||
uRORes_err_IROMessageNotSupported, "Class \"%s\" does not support IROMessage"
|
uRORes_err_IROMessageNotSupported, "Class \"%s\" does not support IROMessage"
|
||||||
uRORes_err_ClassAlreadyRegistered, "Class \"%s\" is already registered"
|
uRORes_err_ClassAlreadyRegistered, "Class \"%s\" is already registered"
|
||||||
Consts_SUTF8Encoding, "UTF-8"
|
uRORes_err_UnknownProxyInterface, "Unknown proxy interface \"%s\""
|
||||||
Consts_SUTF7Encoding, "UTF-7"
|
uRORes_err_DispatcherAlreadyAssigned, "Dispatcher for %s already assigned"
|
||||||
Consts_SPageControlNotSet, "PageControl must first be assigned"
|
uRORes_err_CannotFindMessageDispatcher, "Cannot find message dispatcher. Maybe there is no message component configured for for the requested path?"
|
||||||
uRORes_err_InvalidIndex, "Invalid index %d"
|
uRORes_err_ServerOnlySupportsOneDispatcher, "%s servers only support one dispatcher"
|
||||||
uRORes_err_InvalidType, "Invalid type \"%s. Expected \"%s\"\""
|
uRORes_err_InvalidType, "Invalid type \"%s. Expected \"%s\"\""
|
||||||
uRORes_err_InvalidStream, "Invalid stream"
|
uRORes_err_InvalidStream, "Invalid stream"
|
||||||
uRORes_err_InvalidParamFlag, "Invalid Parameter Flag \"%s\""
|
uRORes_err_InvalidParamFlag, "Invalid Parameter Flag \"%s\""
|
||||||
@ -2250,6 +2230,26 @@ BEGIN
|
|||||||
uRORes_err_RodlNoStructElementsDefined, "Struct does not contain any elements."
|
uRORes_err_RodlNoStructElementsDefined, "Struct does not contain any elements."
|
||||||
uRORes_err_RodlNoOperationsDefined, "Service interface does not contain any elements."
|
uRORes_err_RodlNoOperationsDefined, "Service interface does not contain any elements."
|
||||||
uRORes_err_RodlUsedFileDoesNotExist, "The referenced RODL file \"%s\" could not be found."
|
uRORes_err_RodlUsedFileDoesNotExist, "The referenced RODL file \"%s\" could not be found."
|
||||||
|
uRORes_err_RodlInvalidDataType, "Invalid or undefined data type \"%s\"."
|
||||||
|
uRORes_err_RodlStructCannotBeNested, "Structs cannot recursively contain themselves."
|
||||||
|
uRORes_err_RodlInvalidAncestorType, "Invalid or undefined ancestor type \"%s\"."
|
||||||
|
uRORes_str_ExceptionOnServer, "An exception of type %s was raised on the server: %s"
|
||||||
|
Consts_SUTF8Encoding, "UTF-8"
|
||||||
|
Consts_SUTF7Encoding, "UTF-7"
|
||||||
|
Consts_SPageControlNotSet, "PageControl must first be assigned"
|
||||||
|
uRODECConst_sProtectionCircular, "Circular Protection detected, Protection Object is invalid."
|
||||||
|
uRODECConst_sStringFormatExists, "String Format \"%d\" not exists."
|
||||||
|
uRODECConst_sInvalidStringFormat, "Input is not an valid %s Format."
|
||||||
|
uRODECConst_sInvalidFormatString, "Input can not be convert to %s Format."
|
||||||
|
uRODECConst_sFMT_COPY, "copy Input to Output"
|
||||||
|
uRODECConst_sFMT_HEX, "Hexadecimal"
|
||||||
|
uRODECConst_sFMT_HEXL, "Hexadecimal lowercase"
|
||||||
|
uRODECConst_sFMT_MIME64, "MIME Base 64"
|
||||||
|
uRODECConst_sFMT_UU, "UU Coding"
|
||||||
|
uRODECConst_sFMT_XX, "XX Coding"
|
||||||
|
uRODECConst_sInvalidKeySize, "Length from Encryptionkey is invalid.\r\nKeysize for %s must be to %d-%d bytes"
|
||||||
|
uRODECConst_sNotInitialized, "%s is not initialized call Init() or InitKey() before."
|
||||||
|
uRORes_err_InvalidIndex, "Invalid index %d"
|
||||||
Consts_SPictureLabel, "Picture:"
|
Consts_SPictureLabel, "Picture:"
|
||||||
Consts_SPictureDesc, " (%dx%d)"
|
Consts_SPictureDesc, " (%dx%d)"
|
||||||
Consts_SPreviewLabel, "Preview"
|
Consts_SPreviewLabel, "Preview"
|
||||||
|
|||||||
@ -16,7 +16,7 @@ BEGIN
|
|||||||
VALUE "FileVersion", "3.0.9.0\0"
|
VALUE "FileVersion", "3.0.9.0\0"
|
||||||
VALUE "ProductName", "FactuGES Server\0"
|
VALUE "ProductName", "FactuGES Server\0"
|
||||||
VALUE "ProductVersion", "3.0.9.0\0"
|
VALUE "ProductVersion", "3.0.9.0\0"
|
||||||
VALUE "CompileDate", "viernes, 17 de octubre de 2008 16:17\0"
|
VALUE "CompileDate", "lunes, 27 de octubre de 2008 17:32\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user