Se adaptan pedidos de proveedor, albaranes de proveedor a poder enviarlos por correo electronico.
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@298 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
parent
5d1ba11799
commit
0844f2cb7d
Binary file not shown.
@ -1160,7 +1160,7 @@ function TAlbaranesClienteController.GenerarEmailAlbaran(
|
||||
AAlbaran: IBizAlbaranCliente): Boolean;
|
||||
begin
|
||||
if not Assigned(AAlbaran) then
|
||||
raise Exception.Create ('Pedidos no asignadas (GenerarEmailPedido)');
|
||||
raise Exception.Create ('Albaranes no asignadas (GenerarEmailAlbaran)');
|
||||
|
||||
if AAlbaran.DataTable.Active then
|
||||
AAlbaran.DataTable.Active := True;
|
||||
|
||||
@ -86,6 +86,9 @@ inherited fEditorElegirAlbaranesCliente: TfEditorElegirAlbaranesCliente
|
||||
inherited TBXSeparatorItem10: TTBXSeparatorItem
|
||||
Visible = False
|
||||
end
|
||||
inherited TBXItem40: TTBXItem
|
||||
Visible = False
|
||||
end
|
||||
inherited TBXSeparatorItem2: TTBXSeparatorItem
|
||||
Visible = False
|
||||
end
|
||||
@ -115,10 +118,10 @@ inherited fEditorElegirAlbaranesCliente: TfEditorElegirAlbaranesCliente
|
||||
ExplicitWidth = 790
|
||||
end
|
||||
inherited TBXTMain2: TTBXToolbar
|
||||
Left = 206
|
||||
Left = 84
|
||||
Visible = False
|
||||
ExplicitLeft = 206
|
||||
ExplicitWidth = 584
|
||||
ExplicitLeft = 84
|
||||
ExplicitWidth = 706
|
||||
end
|
||||
end
|
||||
inherited StatusBar: TJvStatusBar
|
||||
@ -127,7 +130,7 @@ inherited fEditorElegirAlbaranesCliente: TfEditorElegirAlbaranesCliente
|
||||
end
|
||||
inline frViewBarraSeleccion1: TfrViewBarraSeleccion [4]
|
||||
Left = 0
|
||||
Top = 389
|
||||
Top = 394
|
||||
Width = 790
|
||||
Height = 36
|
||||
Align = alBottom
|
||||
@ -139,7 +142,7 @@ inherited fEditorElegirAlbaranesCliente: TfEditorElegirAlbaranesCliente
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
ReadOnly = False
|
||||
ExplicitTop = 389
|
||||
ExplicitTop = 394
|
||||
ExplicitWidth = 790
|
||||
ExplicitHeight = 36
|
||||
inherited JvFooter1: TJvFooter
|
||||
|
||||
@ -172,7 +172,7 @@
|
||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||
</VersionInfoKeys>
|
||||
</Delphi.Personality>
|
||||
<!-- EurekaLog First Line
|
||||
<!-- EurekaLog First Line
|
||||
[Exception Log]
|
||||
EurekaLog Version=519
|
||||
Activate=1
|
||||
|
||||
@ -58,6 +58,7 @@ contains
|
||||
uIEditorAlbaranesDevProveedor in 'View\uIEditorAlbaranesDevProveedor.pas',
|
||||
uIEditorAlbaranDevProveedor in 'View\uIEditorAlbaranDevProveedor.pas',
|
||||
uAlbaranesProveedorReportController in 'uAlbaranesProveedorReportController.pas',
|
||||
uIEditorAlbaranesProveedorPreview in 'View\uIEditorAlbaranesProveedorPreview.pas';
|
||||
uIEditorAlbaranesProveedorPreview in 'View\uIEditorAlbaranesProveedorPreview.pas',
|
||||
uIDialogListaAlbaranesProvEnvioEMail in 'View\uIDialogListaAlbaranesProvEnvioEMail.pas';
|
||||
|
||||
end.
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
unit uIDialogListaAlbaranesProvEnvioEMail;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
uBizAlbaranesProveedor, uAlbaranesProveedorController;
|
||||
|
||||
type
|
||||
IDialogListaAlbaranesProvEnvioEMail = interface
|
||||
['{CD839ABF-4653-4E24-9986-E73BD4E37200}']
|
||||
function GetAlbaranes: IBizAlbaranProveedor;
|
||||
procedure SetAlbaranes(const Value: IBizAlbaranProveedor);
|
||||
property Albaranes: IBizAlbaranProveedor read GetAlbaranes write SetAlbaranes;
|
||||
function ShowModal : Integer;
|
||||
procedure Release;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@ -57,6 +57,13 @@ type
|
||||
function Print(AAlbaran : IBizAlbaranProveedor; AllItems: Boolean = false): Boolean;
|
||||
|
||||
procedure Limpiardireccion(AAlbaran: IBizAlbaranProveedor);
|
||||
|
||||
function EnviarEmailAlbaranes(AAlbaranes : IBizAlbaranProveedor): Boolean;
|
||||
function GenerarEmailAlbaran(AAlbaran : IBizAlbaranProveedor): Boolean;
|
||||
function EnviarAlbaranPorEMail(AAlbaran: IBizAlbaranProveedor;
|
||||
const AEnviarDirectamente: Boolean = True;
|
||||
const ADireccionEMail: String = ''; const AAsuntoEMail: String = '';
|
||||
const ATextoEMail: String = ''): Boolean;
|
||||
end;
|
||||
|
||||
TAlbaranesProveedorController = class(TObservador, IAlbaranesProveedorController)
|
||||
@ -125,6 +132,13 @@ type
|
||||
function Print(AAlbaran : IBizAlbaranProveedor; AllItems: Boolean = false): Boolean;
|
||||
|
||||
procedure Limpiardireccion(AAlbaran: IBizAlbaranProveedor);
|
||||
|
||||
function EnviarEmailAlbaranes(AAlbaranes : IBizAlbaranProveedor): Boolean;
|
||||
function GenerarEmailAlbaran(AAlbaran : IBizAlbaranProveedor): Boolean;
|
||||
function EnviarAlbaranPorEMail(AAlbaran: IBizAlbaranProveedor;
|
||||
const AEnviarDirectamente: Boolean = True;
|
||||
const ADireccionEMail: String = ''; const AAsuntoEMail: String = '';
|
||||
const ATextoEMail: String = ''): Boolean;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -139,7 +153,8 @@ uses
|
||||
uBizPedidosProveedor, uPedidosProveedorController, schInventarioClient_Intf,
|
||||
uArticulosController, uBizArticulos, uControllerDetallesBase, Classes,
|
||||
schArticulosClient_Intf, uControllerDetallesArticulos, Variants, uDialogUtils,
|
||||
uIEditorAlbaranDevProveedor, uAlbaranesProveedorReportController;
|
||||
uIEditorAlbaranDevProveedor, uAlbaranesProveedorReportController,
|
||||
uIDialogListaAlbaranesProvEnvioEMail, uSistemaFunc, uStringsUtils, uDialogElegirEMail, uEMailUtils;
|
||||
|
||||
|
||||
{ Métodos auxiliares }
|
||||
@ -832,6 +847,104 @@ begin
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
function TAlbaranesProveedorController.EnviarAlbaranPorEMail(
|
||||
AAlbaran: IBizAlbaranProveedor; const AEnviarDirectamente: Boolean;
|
||||
const ADireccionEMail, AAsuntoEMail, ATextoEMail: String): Boolean;
|
||||
var
|
||||
AReportController : IAlbaranesProveedorReportController;
|
||||
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;
|
||||
|
||||
RecuperarProveedor(AAlbaran);
|
||||
AAlbaran.Proveedor.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.Proveedor.EMAIL_ADMINISTRACION) then
|
||||
AListaEmail.Add(AAlbaran.Proveedor.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 := TAlbaranesProveedorReportController.Create;
|
||||
try
|
||||
AReportController.ExportToPDF(AAlbaran.ID, AFicheroTMP);
|
||||
Result := EnviarEMailMAPI(AAsunto, ATextoEMail, AFicheroTMP, '', '', AAlbaran.Proveedor.NOMBRE, AEMail, AEnviarDirectamente);
|
||||
if Result then
|
||||
// _AnadirMarcaEnvioCorreo(AAlbaran);
|
||||
finally
|
||||
SysUtils.DeleteFile(AFicheroTMP);
|
||||
AReportController := NIL;
|
||||
HideHourglassCursor;
|
||||
Application.ProcessMessages;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TAlbaranesProveedorController.EnviarEmailAlbaranes(
|
||||
AAlbaranes: IBizAlbaranProveedor): Boolean;
|
||||
var
|
||||
ADialog : IDialogListaAlbaranesProvEnvioEMail;
|
||||
ARespuesta : Integer;
|
||||
begin
|
||||
ADialog := NIL;
|
||||
|
||||
if not Assigned(AAlbaranes) then
|
||||
raise Exception.Create ('Albaranes no asignadas (EnviarAlbaranesProvPorEMail)');
|
||||
|
||||
if AAlbaranes.DataTable.Active then
|
||||
AAlbaranes.DataTable.Active := True;
|
||||
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
CreateEditor('DialogListaAlbaranesProvEnvioEMail', IDialogListaAlbaranesProvEnvioEMail, 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 TAlbaranesProveedorController.EsEliminable(AAlbaran: IBizAlbaranProveedor): Boolean;
|
||||
begin
|
||||
if not Assigned(AAlbaran) then
|
||||
@ -1125,6 +1238,23 @@ begin
|
||||
Result := FProveedorController;
|
||||
end;
|
||||
|
||||
function TAlbaranesProveedorController.GenerarEmailAlbaran(AAlbaran: IBizAlbaranProveedor): Boolean;
|
||||
begin
|
||||
if not Assigned(AAlbaran) then
|
||||
raise Exception.Create ('Albaranes no asignadas (GenerarEmailAlbaran)');
|
||||
|
||||
if AAlbaran.DataTable.Active then
|
||||
AAlbaran.DataTable.Active := True;
|
||||
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
RecuperarProveedor(AAlbaran);
|
||||
EnviarAlbaranPorEMail(AAlbaran, False, AAlbaran.Proveedor.EMAIL_ADMINISTRACION);
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TAlbaranesProveedorController.GenerarOrdenDev(AAlbaran: IBizAlbaranProveedor): IBizAlbaranProveedor;
|
||||
var
|
||||
AOrden : IBizAlbaranProveedor;
|
||||
|
||||
@ -12,6 +12,7 @@ type
|
||||
['{AAE252CE-D407-4FF4-AF2A-350C5A421C89}']
|
||||
procedure Preview(const AID : String);
|
||||
function Print(const AID : String): Boolean;
|
||||
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
end;
|
||||
|
||||
TAlbaranesProveedorReportController = class(TInterfacedObject, IAlbaranesProveedorReportController)
|
||||
@ -24,6 +25,7 @@ type
|
||||
|
||||
procedure Preview(const AID : String);
|
||||
function Print(const AID : String): Boolean;
|
||||
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
end;
|
||||
|
||||
|
||||
@ -32,7 +34,7 @@ implementation
|
||||
uses
|
||||
uROTypes, uEditorRegistryUtils, uIEditorAlbaranesProveedorPreview,
|
||||
uEditorPreview, uDataModuleAlbaranesProveedor, uEditorBase, cxControls,
|
||||
schAlbaranesProveedorClient_Intf;
|
||||
schAlbaranesProveedorClient_Intf, uStringsUtils;
|
||||
|
||||
{ TAlbaranesProveedorReportController }
|
||||
|
||||
@ -54,6 +56,29 @@ begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TAlbaranesProveedorReportController.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 TAlbaranesProveedorReportController.Preview(const AID : String);
|
||||
var
|
||||
AStream: Binary;
|
||||
|
||||
@ -38,6 +38,7 @@ type
|
||||
|
||||
// Report
|
||||
function GetReport(const AID: String): Binary;
|
||||
function GetRptPDF(const AID: Integer; const ShowLogotipo: Boolean = False): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -79,6 +80,20 @@ begin
|
||||
Result := (RORemoteService as IsrvAlbaranesProveedor).GenerateReport(AID)
|
||||
end;
|
||||
|
||||
function TDataModuleAlbaranesProveedor.GetRptPDF(const AID: Integer;
|
||||
const ShowLogotipo: Boolean): Binary;
|
||||
var
|
||||
AParam : TIntegerArray;
|
||||
begin
|
||||
AParam := TIntegerArray.Create;
|
||||
try
|
||||
AParam.Add(AID);
|
||||
Result := (RORemoteService as IsrvAlbaranesProveedor).GenerarReportPDF(AParam, ShowLogotipo)
|
||||
finally
|
||||
FreeANDNIL(AParam)
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDataModuleAlbaranesProveedor.NewItem: IBizAlbaranProveedor;
|
||||
begin
|
||||
Result := GetItem(ID_NULO)
|
||||
|
||||
@ -9,6 +9,7 @@ type
|
||||
IDataModuleAlbaranesProveedorReport = interface
|
||||
['{AF3C54C4-A892-46FD-9689-081A637DE321}']
|
||||
function GetReport(const AID: String): Binary;
|
||||
function GetRptPDF(const AID: Integer; const ShowLogotipo: Boolean = False): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
@ -1173,4 +1173,18 @@ object RptAlbaranesProveedor: TRptAlbaranesProveedor
|
||||
Left = 344
|
||||
Top = 16
|
||||
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
|
||||
|
||||
@ -7,7 +7,7 @@ uses
|
||||
Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
|
||||
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
|
||||
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
|
||||
uDAInterfaces;
|
||||
uDAInterfaces, FactuGES_Intf, frxExportPDF;
|
||||
|
||||
type
|
||||
TRptAlbaranesProveedor = class(TDataModule)
|
||||
@ -28,6 +28,7 @@ type
|
||||
frxReport: TfrxReport;
|
||||
schReport: TDASchema;
|
||||
DataDictionary: TDADataDictionary;
|
||||
frxPDFExport1: TfrxPDFExport;
|
||||
procedure DataModuleCreate(Sender: TObject);
|
||||
private
|
||||
FConnection: IDAConnection;
|
||||
@ -35,6 +36,7 @@ type
|
||||
procedure _GenerarAlbaran(const ID: integer); overload;
|
||||
public
|
||||
function GenerarAlbaran(const AID : String): Binary; overload;
|
||||
function GenerarReportEnPDF(const ListaID : TIntegerArray; const AConLogotipo: Boolean = False): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -81,6 +83,24 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TRptAlbaranesProveedor.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;
|
||||
|
||||
procedure TRptAlbaranesProveedor._GenerarAlbaran(const ID: integer);
|
||||
var
|
||||
AStream: TMemoryStream;
|
||||
|
||||
@ -39,6 +39,7 @@ type
|
||||
{ IsrvAlbaranesProveedor methods }
|
||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||
function GenerateReport(const ID: String): Binary;
|
||||
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -81,6 +82,19 @@ begin
|
||||
bpAlbaranesProveedor.BusinessRulesID := BIZ_SERVER_ALBARAN_PROVEEDOR;
|
||||
end;
|
||||
|
||||
function TsrvAlbaranesProveedor.GenerarReportPDF(const ListaID: TIntegerArray;
|
||||
const ShowLogotipo: Boolean): Binary;
|
||||
var
|
||||
AReportGenerator : TRptAlbaranesProveedor;
|
||||
begin
|
||||
AReportGenerator := TRptAlbaranesProveedor.Create(nil);
|
||||
try
|
||||
Result := AReportGenerator.GenerarReportEnPDF(ListaID, ShowLogotipo);
|
||||
finally
|
||||
FreeAndNIL(AReportGenerator);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsrvAlbaranesProveedor.GenerateReport(const ID: String): Binary;
|
||||
var
|
||||
AReportGenerator : TRptAlbaranesProveedor;
|
||||
|
||||
@ -92,7 +92,8 @@ requires
|
||||
Almacenes_controller,
|
||||
JSDialog100,
|
||||
AlbProv_FacProv_relation,
|
||||
PedProv_AlbProv_relation;
|
||||
PedProv_AlbProv_relation,
|
||||
dxGDIPlusD10;
|
||||
|
||||
contains
|
||||
uAlbaranesProveedorViewRegister in 'uAlbaranesProveedorViewRegister.pas',
|
||||
@ -110,6 +111,7 @@ contains
|
||||
uViewAlbaranDevProveedor in 'uViewAlbaranDevProveedor.pas' {frViewAlbaranDevProveedor: TCustomView},
|
||||
uEditorAlbaranDevProveedor in 'uEditorAlbaranDevProveedor.pas' {fEditorAlbaranDevProveedor: TCustomEditor},
|
||||
uViewAlbaranesDevProveedor in 'uViewAlbaranesDevProveedor.pas' {frViewAlbaranesDevProveedor: TCustomView},
|
||||
uEditorAlbaranesProveedorReport in 'uEditorAlbaranesProveedorReport.pas' {fEditorAlbaranesProveedorReport: TEditorAlbaranesProveedorReport};
|
||||
uEditorAlbaranesProveedorReport in 'uEditorAlbaranesProveedorReport.pas' {fEditorAlbaranesProveedorReport: TEditorAlbaranesProveedorReport},
|
||||
uDialogListaAlbaranesProvEnvioEMail in 'uDialogListaAlbaranesProvEnvioEMail.pas' {fDialogListaAlbaranesProvEnvioEMail: TDialogListaAlbaranesProvEnvioEMail};
|
||||
|
||||
end.
|
||||
|
||||
@ -11,7 +11,7 @@ uses
|
||||
uEditorRegistryUtils, uEditorAlbaranesProveedor, uEditorAlbaranProveedor,
|
||||
uEditorElegirArticulosAlbaranProveedor, uEditorDireccionEntregaAlbaranProveedor,
|
||||
uEditorElegirAlbaranesProveedor, uEditorAlbaranesDevProveedor, uEditorAlbaranDevProveedor,
|
||||
uEditorAlbaranesProveedorReport;
|
||||
uEditorAlbaranesProveedorReport, uDialogListaAlbaranesProvEnvioEMail;
|
||||
|
||||
procedure RegisterViews;
|
||||
begin
|
||||
@ -23,6 +23,7 @@ begin
|
||||
EditorRegistry.RegisterClass(TfEditorElegirArticulosAlbaranProveedor, 'EditorElegirArticulosAlbaranesProveedor');
|
||||
EditorRegistry.RegisterClass(TfEditorElegirAlbaranesProveedor, 'EditorElegirAlbaranesProveedor');
|
||||
EditorRegistry.RegisterClass(TfEditorAlbaranesProveedorPreview, 'EditorAlbaranesProveedorPreview');
|
||||
EditorRegistry.RegisterClass(TfDialogListaAlbaranesProvEnvioEMail, 'DialogListaAlbaranesProvEnvioEMail');
|
||||
end;
|
||||
|
||||
procedure UnregisterViews;
|
||||
@ -35,6 +36,7 @@ begin
|
||||
EditorRegistry.UnRegisterClass(TfEditorElegirArticulosAlbaranProveedor);
|
||||
EditorRegistry.UnRegisterClass(TfEditorElegirAlbaranesProveedor);
|
||||
EditorRegistry.UnRegisterClass(TfEditorAlbaranesProveedorPreview);
|
||||
EditorRegistry.UnRegisterClass(TfDialogListaAlbaranesProvEnvioEMail);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -0,0 +1,89 @@
|
||||
inherited fDialogListaAlbaranesProvEnvioEMail: TfDialogListaAlbaranesProvEnvioEMail
|
||||
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 = 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 = 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 pr' +
|
||||
'oveedores 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 uDialogListaAlbaranesProvEnvioEMail;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, uDialogBase, ActnList, StdCtrls, ExtCtrls, ComCtrls,
|
||||
uDialogListaEnvioEMail, uIDialogListaAlbaranesProvEnvioEMail, uAlbaranesProveedorController,
|
||||
uBizAlbaranesProveedor;
|
||||
|
||||
type
|
||||
TfDialogListaAlbaranesProvEnvioEMail = class(TfDialogListaEnvioEMail, IDialogListaAlbaranesProvEnvioEMail)
|
||||
procedure actCancelarExecute(Sender: TObject);
|
||||
procedure actAceptarUpdate(Sender: TObject);
|
||||
procedure actAceptarExecute(Sender: TObject);
|
||||
private
|
||||
FAlbaranes : IBizAlbaranProveedor;
|
||||
FController : IAlbaranesProveedorController;
|
||||
protected
|
||||
function GetAlbaranes: IBizAlbaranProveedor;
|
||||
procedure SetAlbaranes(const Value: IBizAlbaranProveedor);
|
||||
|
||||
procedure RellenarLista;
|
||||
procedure BorrarLista;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
property Albaranes: IBizAlbaranProveedor read GetAlbaranes write SetAlbaranes;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
schAlbaranesProveedorClient_Intf, uStringsUtils, cxControls;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
{ TfDialogListaAlbaranesEnvioEMail }
|
||||
|
||||
procedure TfDialogListaAlbaranesProvEnvioEMail.actAceptarExecute(Sender: TObject);
|
||||
var
|
||||
i : Integer;
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
Application.ProcessMessages;
|
||||
try
|
||||
FAlbaranes.First;
|
||||
FController.RecuperarProveedor(FAlbaranes);
|
||||
FAlbaranes.Proveedor.DataTable.Active := True;
|
||||
try
|
||||
for i := 0 to FAlbaranes.DataTable.RecordCount - 1 do
|
||||
begin
|
||||
if not EsCadenaVacia(FAlbaranes.Proveedor.EMAIL_ADMINISTRACION) then
|
||||
begin
|
||||
if FController.EnviarAlbaranPorEMail(FAlbaranes, True, FAlbaranes.Proveedor.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.RecuperarProveedor(FAlbaranes);
|
||||
FAlbaranes.Proveedor.DataTable.Active := True;
|
||||
end;
|
||||
Button2.Enabled := False;
|
||||
finally
|
||||
ListView1.Items.EndUpdate;
|
||||
end;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
|
||||
Button1.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TfDialogListaAlbaranesProvEnvioEMail.actAceptarUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
(Sender as TAction).Enabled := (ListView1.Items.Count > 0)
|
||||
end;
|
||||
|
||||
procedure TfDialogListaAlbaranesProvEnvioEMail.actCancelarExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
ModalResult := mrOk;
|
||||
end;
|
||||
|
||||
procedure TfDialogListaAlbaranesProvEnvioEMail.BorrarLista;
|
||||
begin
|
||||
ListView1.Items.Clear;
|
||||
end;
|
||||
|
||||
constructor TfDialogListaAlbaranesProvEnvioEMail.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
ModalResult := mrCancel;
|
||||
FController := TAlbaranesProveedorController.Create;
|
||||
end;
|
||||
|
||||
function TfDialogListaAlbaranesProvEnvioEMail.GetAlbaranes: IBizAlbaranProveedor;
|
||||
begin
|
||||
Result := FAlbaranes;
|
||||
end;
|
||||
|
||||
procedure TfDialogListaAlbaranesProvEnvioEMail.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.RecuperarProveedor(FAlbaranes);
|
||||
FAlbaranes.Proveedor.DataTable.Active := True;
|
||||
|
||||
with ListView1.Items.Add do
|
||||
begin
|
||||
Caption := FAlbaranes.REFERENCIA;
|
||||
SubItems.Add(FAlbaranes.NOMBRE);
|
||||
SubItems.Add(FAlbaranes.Proveedor.EMAIL_ADMINISTRACION);
|
||||
|
||||
if EsCadenaVacia(FAlbaranes.Proveedor.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 TfDialogListaAlbaranesProvEnvioEMail.SetAlbaranes(
|
||||
const Value: IBizAlbaranProveedor);
|
||||
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 proveedores que tengan relleno su e-mail administrativo.';
|
||||
end;
|
||||
|
||||
RellenarLista;
|
||||
end
|
||||
else
|
||||
BorrarLista;
|
||||
end;
|
||||
|
||||
end.
|
||||
@ -2,6 +2,7 @@ inherited fEditorAlbaranesProveedor: TfEditorAlbaranesProveedor
|
||||
Caption = 'Lista de albaranes de proveedor'
|
||||
ClientWidth = 606
|
||||
ExplicitWidth = 614
|
||||
ExplicitHeight = 240
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||
@ -125,6 +126,9 @@ inherited fEditorAlbaranesProveedor: TfEditorAlbaranesProveedor
|
||||
ExplicitWidth = 606
|
||||
inherited tbxMain: TTBXToolbar
|
||||
ExplicitWidth = 606
|
||||
object TBXItem40: TTBXItem [13]
|
||||
Action = actEnviarEMail
|
||||
end
|
||||
end
|
||||
inherited tbxMenu: TTBXToolbar
|
||||
ExplicitWidth = 606
|
||||
@ -163,16 +167,24 @@ inherited fEditorAlbaranesProveedor: TfEditorAlbaranesProveedor
|
||||
ImageIndex = 22
|
||||
end
|
||||
object actGenerarFactura: TAction
|
||||
Category = 'Acciones'
|
||||
Caption = 'Generar factura'
|
||||
ImageIndex = 23
|
||||
OnExecute = actGenerarFacturaExecute
|
||||
OnUpdate = actGenerarFacturaUpdate
|
||||
end
|
||||
object actGenerarOrden: TAction
|
||||
Category = 'Acciones'
|
||||
Caption = 'Generar orden dev.'
|
||||
ImageIndex = 23
|
||||
OnExecute = actGenerarOrdenExecute
|
||||
end
|
||||
object actEnviarEMail: TAction
|
||||
Category = 'Acciones'
|
||||
Caption = 'Enviar por e-mail...'
|
||||
OnExecute = actEnviarEMailExecute
|
||||
OnUpdate = actEnviarEMailUpdate
|
||||
end
|
||||
end
|
||||
inherited SmallImages: TPngImageList
|
||||
PngImages = <
|
||||
|
||||
@ -24,11 +24,15 @@ type
|
||||
JsListaAlbaranesNoEliminados: TJSDialog;
|
||||
actGenerarOrden: TAction;
|
||||
TBXItem38: TTBXItem;
|
||||
actEnviarEMail: TAction;
|
||||
TBXItem40: TTBXItem;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure actGenerarFacturaExecute(Sender: TObject);
|
||||
procedure actGenerarFacturaUpdate(Sender: TObject);
|
||||
procedure actEliminarUpdate(Sender: TObject);
|
||||
procedure actGenerarOrdenExecute(Sender: TObject);
|
||||
procedure actEnviarEMailExecute(Sender: TObject);
|
||||
procedure actEnviarEMailUpdate(Sender: TObject);
|
||||
|
||||
protected
|
||||
FAlbaranes: IBizAlbaranProveedor;
|
||||
@ -62,7 +66,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
uDataModuleAlbaranesProveedor, uDataModuleUsuarios, uGenerarFacturasProvAlbProvUtils,
|
||||
cxControls, uDataModuleAlbaranesProveedor, uDataModuleUsuarios, uGenerarFacturasProvAlbProvUtils,
|
||||
uGenerarAlbaranesProvUtils, uEditorBase, schAlbaranesProveedorClient_Intf,
|
||||
uGridUtils, uDBSelectionListUtils;
|
||||
|
||||
@ -78,6 +82,40 @@ begin
|
||||
(Sender as TAction).Enabled := not (FAlbaranes.ID_FACTURA > 0)
|
||||
end;
|
||||
|
||||
procedure TfEditorAlbaranesProveedor.actEnviarEMailExecute(Sender: TObject);
|
||||
var
|
||||
AAlbaranes : IBizAlbaranProveedor;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if ViewGrid.NumSeleccionados = 1 then
|
||||
FController.GenerarEmailAlbaran(Albaranes)
|
||||
else begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Albaranes as ISeleccionable).SelectedRecords);
|
||||
AAlbaranes := (Controller as IAlbaranesProveedorController).ExtraerSeleccionados(Albaranes, ViewGrid) as IBizAlbaranProveedor;
|
||||
|
||||
if Assigned(AAlbaranes) then
|
||||
if FController.EnviarEmailAlbaranes(AAlbaranes) then
|
||||
RefrescarInterno;
|
||||
finally
|
||||
AAlbaranes := NIL;
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfEditorAlbaranesProveedor.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 TfEditorAlbaranesProveedor.actGenerarFacturaExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -1371,4 +1371,18 @@ object RptFacturasProveedor: TRptFacturasProveedor
|
||||
Left = 344
|
||||
Top = 184
|
||||
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
|
||||
|
||||
@ -7,7 +7,7 @@ uses
|
||||
Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
|
||||
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
|
||||
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
|
||||
uDAInterfaces;
|
||||
uDAInterfaces, FactuGES_Intf, frxExportPDF;
|
||||
|
||||
type
|
||||
TRptFacturasProveedor = class(TDataModule)
|
||||
@ -31,12 +31,15 @@ type
|
||||
schReport: TDASchema;
|
||||
DataDictionary: TDADataDictionary;
|
||||
frxReport: TfrxReport;
|
||||
frxPDFExport1: TfrxPDFExport;
|
||||
procedure DataModuleCreate(Sender: TObject);
|
||||
private
|
||||
FConnection: IDAConnection;
|
||||
procedure _GenerarFactura(const AFacturaID: integer); overload;
|
||||
public
|
||||
function GenerarFactura(const AFacturaID : String): Binary; overload;
|
||||
function GenerarFacturaEnPDF(const ListaID : TIntegerArray;
|
||||
const AConLogotipo: Boolean = False): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -84,6 +87,24 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TRptFacturasProveedor.GenerarFacturaEnPDF(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
|
||||
_GenerarFactura(ListaID.Items[i]);
|
||||
|
||||
frxPDFExport1.Stream := Result;
|
||||
frxReport.Export(frxPDFExport1)
|
||||
finally
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRptFacturasProveedor._GenerarFactura(const AFacturaID: integer);
|
||||
var
|
||||
AStream: TMemoryStream;
|
||||
|
||||
@ -37,6 +37,7 @@ type
|
||||
{ IsrvFacturasProveedor methods }
|
||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||
function GenerateReport(const FacturaID: String): Binary;
|
||||
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -79,6 +80,19 @@ begin
|
||||
bpFacturasProveedor.BusinessRulesID := BIZ_SERVER_FACTURAS_PROVEEDOR;
|
||||
end;
|
||||
|
||||
function TsrvFacturasProveedor.GenerarReportPDF(const ListaID: TIntegerArray;
|
||||
const ShowLogotipo: Boolean): Binary;
|
||||
var
|
||||
AReportGenerator : TRptFacturasProveedor;
|
||||
begin
|
||||
AReportGenerator := TRptFacturasProveedor.Create(nil);
|
||||
try
|
||||
Result := AReportGenerator.GenerarFacturaEnPDF(ListaID, ShowLogotipo);
|
||||
finally
|
||||
FreeAndNIL(AReportGenerator);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsrvFacturasProveedor.GenerateReport(const FacturaID: String): Binary;
|
||||
var
|
||||
AReportGenerator : TRptFacturasProveedor;
|
||||
|
||||
@ -65,6 +65,7 @@ contains
|
||||
uArticulosPedidoProveedorController in 'uArticulosPedidoProveedorController.pas',
|
||||
uIEditorElegirArticulosPedidosProveedor in 'View\uIEditorElegirArticulosPedidosProveedor.pas',
|
||||
uIEditorDireccionEntregaPedidoProveedor in 'View\uIEditorDireccionEntregaPedidoProveedor.pas',
|
||||
uIEditorSituacionPedidoProveedor in 'View\uIEditorSituacionPedidoProveedor.pas';
|
||||
uIEditorSituacionPedidoProveedor in 'View\uIEditorSituacionPedidoProveedor.pas',
|
||||
uIDialogListaPedidosProvEnvioEMail in 'View\uIDialogListaPedidosProvEnvioEMail.pas';
|
||||
|
||||
end.
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
unit uIDialogListaPedidosProvEnvioEMail;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
uBizPedidosProveedor, uPedidosProveedorController;
|
||||
|
||||
type
|
||||
IDialogListaPedidosProvEnvioEMail = interface
|
||||
['{3D6C6DA3-BC14-4A06-A4E0-99AB2999B082}']
|
||||
function GetPedidos: IBizPedidoProveedor;
|
||||
procedure SetPedidos(const Value: IBizPedidoProveedor);
|
||||
property Pedidos: IBizPedidoProveedor read GetPedidos write SetPedidos;
|
||||
function ShowModal : Integer;
|
||||
procedure Release;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@ -49,6 +49,13 @@ type
|
||||
procedure RecuperarProveedor(APedido: IBizPedidoProveedor);
|
||||
|
||||
procedure Limpiardireccion(APedido: IBizPedidoProveedor);
|
||||
|
||||
function EnviarEmailPedidos(APedidos : IBizPedidoProveedor): Boolean;
|
||||
function GenerarEmailPedido(APedido : IBizPedidoProveedor): Boolean;
|
||||
function EnviarPedidoPorEMail(APedido: IBizPedidoProveedor;
|
||||
const AEnviarDirectamente: Boolean = True;
|
||||
const ADireccionEMail: String = ''; const AAsuntoEMail: String = '';
|
||||
const ATextoEMail: String = ''): Boolean;
|
||||
end;
|
||||
|
||||
TPedidosProveedorController = class(TObservador, IPedidosProveedorController)
|
||||
@ -114,6 +121,13 @@ type
|
||||
function ElegirPedidos(APedido: IBizPedidoProveedor; AMensaje: String; AMultiSelect: Boolean): IBizPedidoProveedor;
|
||||
|
||||
procedure Limpiardireccion(APedido: IBizPedidoProveedor);
|
||||
|
||||
function EnviarEmailPedidos(APedidos : IBizPedidoProveedor): Boolean;
|
||||
function GenerarEmailPedido(APedido : IBizPedidoProveedor): Boolean;
|
||||
function EnviarPedidoPorEMail(APedido: IBizPedidoProveedor;
|
||||
const AEnviarDirectamente: Boolean = True;
|
||||
const ADireccionEMail: String = ''; const AAsuntoEMail: String = '';
|
||||
const ATextoEMail: String = ''): Boolean;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -125,7 +139,8 @@ uses
|
||||
schPedidosProveedorClient_Intf, uDAInterfaces, uPedidosProveedorReportController,
|
||||
uDateUtils, uIEditorPedidoProveedor, uIEditorElegirPedidosProveedor,
|
||||
Dialogs, uIEditorDireccionEntregaPedidoProveedor, Classes,
|
||||
uIEditorSituacionPedidoProveedor, Variants;
|
||||
uIEditorSituacionPedidoProveedor, Variants,
|
||||
uIDialogListaPedidosProvEnvioEMail, uSistemaFunc, uStringsUtils, uDialogElegirEMail, Forms, uEMailUtils;
|
||||
|
||||
{ TPedidosProveedorController }
|
||||
|
||||
@ -572,6 +587,99 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPedidosProveedorController.EnviarEmailPedidos(
|
||||
APedidos: IBizPedidoProveedor): Boolean;
|
||||
var
|
||||
ADialog : IDialogListaPedidosProvEnvioEMail;
|
||||
ARespuesta : Integer;
|
||||
begin
|
||||
ADialog := NIL;
|
||||
|
||||
if not Assigned(APedidos) then
|
||||
raise Exception.Create ('Pedidos no asignadas (EnviarPedidosProvPorEMail)');
|
||||
|
||||
if APedidos.DataTable.Active then
|
||||
APedidos.DataTable.Active := True;
|
||||
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
CreateEditor('DialogListaPedidosProvEnvioEMail', IDialogListaPedidosProvEnvioEMail, 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 TPedidosProveedorController.EnviarPedidoPorEMail(
|
||||
APedido: IBizPedidoProveedor; const AEnviarDirectamente: Boolean;
|
||||
const ADireccionEMail, AAsuntoEMail, ATextoEMail: String): Boolean;
|
||||
var
|
||||
AReportController : IPedidosProveedorReportController;
|
||||
AFicheroTMP : TFileName;
|
||||
AEMail : String;
|
||||
AAsunto : String;
|
||||
AListaEmail : TStringList;
|
||||
begin
|
||||
|
||||
if not Assigned(APedido) then
|
||||
raise Exception.Create ('Pedido no asignada (EnviarPedidoPorEMail)');
|
||||
|
||||
if APedido.DataTable.Active then
|
||||
APedido.DataTable.Active := True;
|
||||
|
||||
RecuperarProveedor(APedido);
|
||||
APedido.Proveedor.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.Proveedor.EMAIL_ADMINISTRACION) then
|
||||
AListaEmail.Add(APedido.Proveedor.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 := TPedidosProveedorReportController.Create;
|
||||
try
|
||||
AReportController.ExportToPDF(APedido.ID, AFicheroTMP);
|
||||
Result := EnviarEMailMAPI(AAsunto, ATextoEMail, AFicheroTMP, '', '', APedido.Proveedor.NOMBRE, AEMail, AEnviarDirectamente);
|
||||
if Result then
|
||||
// _AnadirMarcaEnvioCorreo(APedido);
|
||||
finally
|
||||
SysUtils.DeleteFile(AFicheroTMP);
|
||||
AReportController := NIL;
|
||||
HideHourglassCursor;
|
||||
Application.ProcessMessages;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPedidosProveedorController.EsEliminable(APedido: IBizPedidoProveedor): Boolean;
|
||||
begin
|
||||
if not Assigned(APedido) then
|
||||
@ -834,6 +942,24 @@ begin
|
||||
Result := FProveedorController;
|
||||
end;
|
||||
|
||||
function TPedidosProveedorController.GenerarEmailPedido(
|
||||
APedido: IBizPedidoProveedor): 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
|
||||
RecuperarProveedor(APedido);
|
||||
EnviarPedidoPorEMail(APedido, False, APedido.Proveedor.EMAIL_ADMINISTRACION);
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPedidosProveedorController.GetDetallesController: IDetallesPedidoProveedorController;
|
||||
begin
|
||||
Result := FDetallesController;
|
||||
|
||||
@ -12,6 +12,7 @@ type
|
||||
['{D0686358-251C-43C4-9927-6112F2F4D3B8}']
|
||||
procedure Preview(const AID : String);
|
||||
function Print(const AID : String): Boolean;
|
||||
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
end;
|
||||
|
||||
TPedidosProveedorReportController = class(TInterfacedObject, IPedidosProveedorReportController)
|
||||
@ -24,6 +25,7 @@ type
|
||||
|
||||
procedure Preview(const AID : String);
|
||||
function Print(const AID : String): Boolean;
|
||||
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
end;
|
||||
|
||||
|
||||
@ -32,7 +34,7 @@ implementation
|
||||
uses
|
||||
uROTypes, uEditorRegistryUtils, uIEditorPedidosProveedorPreview,
|
||||
uEditorPreview, uDataModulePedidosProveedor, uEditorBase, cxControls,
|
||||
schPedidosProveedorClient_Intf;
|
||||
schPedidosProveedorClient_Intf, uStringsUtils;
|
||||
|
||||
{ TPedidosProveedorReportController }
|
||||
|
||||
@ -54,6 +56,29 @@ begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TPedidosProveedorReportController.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 TPedidosProveedorReportController.Preview(const AID : String);
|
||||
var
|
||||
AStream: Binary;
|
||||
|
||||
@ -44,7 +44,8 @@ type
|
||||
function GetArticulosPendientes(const IDPedido: Integer): IBizDetallesPedidoProveedorPend;
|
||||
|
||||
// Report
|
||||
function GetReport(const AID: String): Binary;
|
||||
function GetReport(const AID: String): Binary;
|
||||
function GetRptPDF(const AID: Integer; const ShowLogotipo: Boolean = False): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -86,6 +87,21 @@ begin
|
||||
Result := (RORemoteService as IsrvPedidosProveedor).GenerateReport(AID)
|
||||
end;
|
||||
|
||||
function TDataModulePedidosProveedor.GetRptPDF(const AID: Integer;
|
||||
const ShowLogotipo: Boolean): Binary;
|
||||
var
|
||||
AParam : TIntegerArray;
|
||||
begin
|
||||
AParam := TIntegerArray.Create;
|
||||
try
|
||||
AParam.Add(AID);
|
||||
Result := (RORemoteService as IsrvPedidosProveedor).GenerarReportPDF(AParam, ShowLogotipo)
|
||||
finally
|
||||
FreeANDNIL(AParam)
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
function TDataModulePedidosProveedor.NewItem: IBizPedidoProveedor;
|
||||
begin
|
||||
Result := GetItem(ID_NULO)
|
||||
|
||||
@ -9,6 +9,7 @@ type
|
||||
IDataModulePedidosProveedorReport = interface
|
||||
['{3B7564E3-8DFD-4976-BBE8-6EF13185B209}']
|
||||
function GetReport(const AID: String): Binary;
|
||||
function GetRptPDF(const AID: Integer; const ShowLogotipo: Boolean = False): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
@ -23,7 +23,8 @@
|
||||
<Projects Name="FactuGES.exe">..\..\Cliente\FactuGES.bdsproj</Projects>
|
||||
<Projects Name="FactuGES_Server.exe">..\..\Servidor\FactuGES_Server.bdsproj</Projects>
|
||||
<Projects Name="PedProv_AlbProv_relation.bpl">..\Relaciones\Pedidos de proveedor - Albaranes de proveedor\PedProv_AlbProv_relation.bdsproj</Projects>
|
||||
<Projects Name="Targets">DataAbstract_D10.bpl Base.bpl ControllerBase.bpl GUIBase.bpl Contactos_view.bpl Articulos_view.bpl PedidosProveedor_model.bpl PedidosProveedor_data.bpl PedidosProveedor_controller.bpl PedidosProveedor_view.bpl PedidosProveedor_plugin.bpl FactuGES.exe FactuGES_Server.exe PedProv_AlbProv_relation.bpl</Projects>
|
||||
<Projects Name="PedidosCliente_view.bpl">..\Pedidos de cliente\Views\PedidosCliente_view.bdsproj</Projects>
|
||||
<Projects Name="Targets">DataAbstract_D10.bpl Base.bpl ControllerBase.bpl GUIBase.bpl Contactos_view.bpl Articulos_view.bpl PedidosProveedor_model.bpl PedidosProveedor_data.bpl PedidosProveedor_controller.bpl PedidosProveedor_view.bpl PedidosProveedor_plugin.bpl FactuGES.exe FactuGES_Server.exe PedProv_AlbProv_relation.bpl PedidosCliente_view.bpl</Projects>
|
||||
</Projects>
|
||||
<Dependencies/>
|
||||
</Default.Personality>
|
||||
|
||||
@ -97,7 +97,8 @@ requires
|
||||
AlbaranesProveedor_model,
|
||||
AlbaranesProveedor_controller,
|
||||
PedCli_PedProv_relation,
|
||||
PedProv_AlbProv_relation;
|
||||
PedProv_AlbProv_relation,
|
||||
dxGDIPlusD10;
|
||||
|
||||
contains
|
||||
uPedidosProveedorViewRegister in 'uPedidosProveedorViewRegister.pas',
|
||||
@ -112,6 +113,7 @@ contains
|
||||
uEditorDireccionEntregaPedidoProveedor in 'uEditorDireccionEntregaPedidoProveedor.pas' {fEditorDireccionEntregaPedidoProveedor : TfEditorDireccionEntregaPedidoProveedor},
|
||||
uViewElegirArticulosPedidosProveedor in 'uViewElegirArticulosPedidosProveedor.pas' {frViewElegirArticulosPedidosProveedor: TFrame},
|
||||
uEditorElegirArticulosPedidoProveedor in 'uEditorElegirArticulosPedidoProveedor.pas' {fEditorElegirArticulosPedidoProveedor: TForm},
|
||||
uEditorSituacionPedidoProveedor in 'uEditorSituacionPedidoProveedor.pas' {fEditorSituacionPedidoProveedor: TfEditorSituacionPedidoProveedor};
|
||||
uEditorSituacionPedidoProveedor in 'uEditorSituacionPedidoProveedor.pas' {fEditorSituacionPedidoProveedor: TfEditorSituacionPedidoProveedor},
|
||||
uDialogListaPedidosProvEnvioEMail in 'uDialogListaPedidosProvEnvioEMail.pas' {fDialogListaPedidosProvEnvioEMail: TfDialogListaPedidosProvEnvioEMail};
|
||||
|
||||
end.
|
||||
|
||||
@ -0,0 +1,89 @@
|
||||
inherited fDialogListaPedidosProvEnvioEMail: TfDialogListaPedidosProvEnvioEMail
|
||||
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 prov' +
|
||||
'eedores 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 uDialogListaPedidosProvEnvioEMail;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, uDialogBase, ActnList, StdCtrls, ExtCtrls, ComCtrls,
|
||||
uDialogListaEnvioEMail, uIDialogListaPedidosProvEnvioEMail, uPedidosProveedorController,
|
||||
uBizPedidosProveedor;
|
||||
|
||||
type
|
||||
TfDialogListaPedidosProvEnvioEMail = class(TfDialogListaEnvioEMail, IDialogListaPedidosProvEnvioEMail)
|
||||
procedure actCancelarExecute(Sender: TObject);
|
||||
procedure actAceptarUpdate(Sender: TObject);
|
||||
procedure actAceptarExecute(Sender: TObject);
|
||||
private
|
||||
FPedidos : IBizPedidoProveedor;
|
||||
FController : IPedidosProveedorController;
|
||||
protected
|
||||
function GetPedidos: IBizPedidoProveedor;
|
||||
procedure SetPedidos(const Value: IBizPedidoProveedor);
|
||||
|
||||
procedure RellenarLista;
|
||||
procedure BorrarLista;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
property Pedidos: IBizPedidoProveedor read GetPedidos write SetPedidos;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
schPedidosProveedorClient_Intf, uStringsUtils, cxControls;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
{ TfDialogListaPedidosEnvioEMail }
|
||||
|
||||
procedure TfDialogListaPedidosProvEnvioEMail.actAceptarExecute(Sender: TObject);
|
||||
var
|
||||
i : Integer;
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
Application.ProcessMessages;
|
||||
try
|
||||
FPedidos.First;
|
||||
FController.RecuperarProveedor(FPedidos);
|
||||
FPedidos.Proveedor.DataTable.Active := True;
|
||||
try
|
||||
for i := 0 to FPedidos.DataTable.RecordCount - 1 do
|
||||
begin
|
||||
if not EsCadenaVacia(FPedidos.Proveedor.EMAIL_ADMINISTRACION) then
|
||||
begin
|
||||
if FController.EnviarPedidoPorEMail(FPedidos, True, FPedidos.Proveedor.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.RecuperarProveedor(FPedidos);
|
||||
FPedidos.Proveedor.DataTable.Active := True;
|
||||
end;
|
||||
Button2.Enabled := False;
|
||||
finally
|
||||
ListView1.Items.EndUpdate;
|
||||
end;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
|
||||
Button1.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TfDialogListaPedidosProvEnvioEMail.actAceptarUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
(Sender as TAction).Enabled := (ListView1.Items.Count > 0)
|
||||
end;
|
||||
|
||||
procedure TfDialogListaPedidosProvEnvioEMail.actCancelarExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
ModalResult := mrOk;
|
||||
end;
|
||||
|
||||
procedure TfDialogListaPedidosProvEnvioEMail.BorrarLista;
|
||||
begin
|
||||
ListView1.Items.Clear;
|
||||
end;
|
||||
|
||||
constructor TfDialogListaPedidosProvEnvioEMail.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
ModalResult := mrCancel;
|
||||
FController := TPedidosProveedorController.Create;
|
||||
end;
|
||||
|
||||
function TfDialogListaPedidosProvEnvioEMail.GetPedidos: IBizPedidoProveedor;
|
||||
begin
|
||||
Result := FPedidos;
|
||||
end;
|
||||
|
||||
procedure TfDialogListaPedidosProvEnvioEMail.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.RecuperarProveedor(FPedidos);
|
||||
FPedidos.Proveedor.DataTable.Active := True;
|
||||
|
||||
with ListView1.Items.Add do
|
||||
begin
|
||||
Caption := FPedidos.REFERENCIA;
|
||||
SubItems.Add(FPedidos.NOMBRE);
|
||||
SubItems.Add(FPedidos.Proveedor.EMAIL_ADMINISTRACION);
|
||||
|
||||
if EsCadenaVacia(FPedidos.Proveedor.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 TfDialogListaPedidosProvEnvioEMail.SetPedidos(
|
||||
const Value: IBizPedidoProveedor);
|
||||
begin
|
||||
FPedidos := Value;
|
||||
|
||||
if Assigned(FPedidos) then
|
||||
begin
|
||||
FPedidos.DataTable.Open;
|
||||
RellenarLista;
|
||||
end
|
||||
else
|
||||
BorrarLista;
|
||||
end;
|
||||
|
||||
end.
|
||||
@ -44,7 +44,10 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
|
||||
Width = 700
|
||||
ExplicitWidth = 700
|
||||
inherited tbxMain: TTBXToolbar
|
||||
ExplicitWidth = 632
|
||||
ExplicitWidth = 700
|
||||
object TBXItem38: TTBXItem [13]
|
||||
Action = actEnviarEMail
|
||||
end
|
||||
end
|
||||
inherited tbxMenu: TTBXToolbar
|
||||
ExplicitWidth = 700
|
||||
@ -201,6 +204,12 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
|
||||
OnExecute = actRecibirPedidoExecute
|
||||
OnUpdate = actRecibirPedidoUpdate
|
||||
end
|
||||
object actEnviarEMail: TAction
|
||||
Category = 'Acciones'
|
||||
Caption = 'Enviar por e-mail...'
|
||||
OnExecute = actEnviarEMailExecute
|
||||
OnUpdate = actEnviarEMailUpdate
|
||||
end
|
||||
end
|
||||
inherited SmallImages: TPngImageList [5]
|
||||
PngImages = <
|
||||
|
||||
@ -25,11 +25,15 @@ type
|
||||
JsImprimirDialog: TJSDialog;
|
||||
TBXItem39: TTBXItem;
|
||||
JsListaPedidosNoEliminados: TJSDialog;
|
||||
actEnviarEMail: TAction;
|
||||
TBXItem38: TTBXItem;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure actCambiarSituacionExecute(Sender: TObject);
|
||||
procedure actRecibirPedidoUpdate(Sender: TObject);
|
||||
procedure actRecibirPedidoExecute(Sender: TObject);
|
||||
procedure actEliminarUpdate(Sender: TObject);
|
||||
procedure actEnviarEMailExecute(Sender: TObject);
|
||||
procedure actEnviarEMailUpdate(Sender: TObject);
|
||||
|
||||
protected
|
||||
FPedidos: IBizPedidoProveedor;
|
||||
@ -58,7 +62,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
uDataModulePedidosProveedor, uDataModuleUsuarios, uEditorDBBase,
|
||||
cxControls, uDataModulePedidosProveedor, uDataModuleUsuarios, uEditorDBBase,
|
||||
uInventarioController, uBizInventario, uDialogUtils, uGridUtils, uDBSelectionListUtils,
|
||||
uAlbaranesProveedorController, uBizAlbaranesProveedor,
|
||||
uGenerarPedidosProvUtils, uGenerarAlbaranesProvUtils;
|
||||
@ -81,6 +85,40 @@ begin
|
||||
(Sender as TAction).Enabled := (FPedidos.SITUACION = SITUACION_PEDIDO_PENDIENTE);
|
||||
end;
|
||||
|
||||
procedure TfEditorPedidosProveedor.actEnviarEMailExecute(Sender: TObject);
|
||||
var
|
||||
APedidos : IBizPedidoProveedor;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if ViewGrid.NumSeleccionados = 1 then
|
||||
FController.GenerarEmailPedido(Pedidos)
|
||||
else begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Pedidos as ISeleccionable).SelectedRecords);
|
||||
APedidos := (Controller as IPedidosProveedorController).ExtraerSeleccionados(Pedidos, ViewGrid) as IBizPedidoProveedor;
|
||||
|
||||
if Assigned(APedidos) then
|
||||
if FController.EnviarEmailPedidos(APedidos) then
|
||||
RefrescarInterno;
|
||||
finally
|
||||
APedidos := NIL;
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfEditorPedidosProveedor.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 TfEditorPedidosProveedor.actRecibirPedidoExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -11,7 +11,7 @@ uses
|
||||
uEditorRegistryUtils, uEditorPedidosProveedor, uEditorPedidoProveedor,
|
||||
uEditorPedidosProveedorReport, uEditorElegirPedidosProveedor,
|
||||
uEditorElegirArticulosPedidoProveedor, uEditorDireccionEntregaPedidoProveedor,
|
||||
uEditorSituacionPedidoProveedor;
|
||||
uEditorSituacionPedidoProveedor, uDialogListaPedidosProvEnvioEMail;
|
||||
|
||||
procedure RegisterViews;
|
||||
begin
|
||||
@ -21,7 +21,8 @@ begin
|
||||
EditorRegistry.RegisterClass(TfEditorElegirPedidosProveedor, 'EditorElegirPedidosProveedor');
|
||||
EditorRegistry.RegisterClass(TfEditorElegirArticulosPedidoProveedor, 'EditorElegirArticulosPedidoProveedor');
|
||||
EditorRegistry.RegisterClass(TfEditorPedidosProveedorPreview, 'EditorPedidosProveedorPreview');
|
||||
EditorRegistry.RegisterClass(TfEditorSituacionPedidoProveedor, 'EditorSituacionPedidoProveedor');
|
||||
EditorRegistry.RegisterClass(TfEditorSituacionPedidoProveedor, 'EditorSituacionPedidoProveedor');
|
||||
EditorRegistry.RegisterClass(TfDialogListaPedidosProvEnvioEMail, 'DialogListaPedidosProvEnvioEMail');
|
||||
end;
|
||||
|
||||
procedure UnregisterViews;
|
||||
@ -30,9 +31,10 @@ begin
|
||||
EditorRegistry.UnRegisterClass(TfEditorPedidosProveedor);
|
||||
EditorRegistry.UnRegisterClass(TfEditorPedidoProveedor);
|
||||
EditorRegistry.UnRegisterClass(TfEditorElegirPedidosProveedor);
|
||||
EditorRegistry.UnRegisterClass(TfEditorElegirArticulosPedidoProveedor);
|
||||
EditorRegistry.UnRegisterClass(TfEditorElegirArticulosPedidoProveedor);
|
||||
EditorRegistry.UnRegisterClass(TfEditorPedidosProveedorPreview);
|
||||
EditorRegistry.UnRegisterClass(TfEditorSituacionPedidoProveedor);
|
||||
EditorRegistry.UnRegisterClass(TfEditorSituacionPedidoProveedor);
|
||||
EditorRegistry.UnRegisterClass(TfDialogListaPedidosProvEnvioEMail);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -141,8 +141,8 @@ uses
|
||||
uBizContactos, uDataTableUtils, uDataModuleUsuarios, Classes,
|
||||
schPedidosClienteClient_Intf, uDAInterfaces, uDateUtils, uIEditorPedidoCliente,
|
||||
uIEditorElegirPedidosCliente, uIEditorDireccionEntregaPedidoCliente,
|
||||
schContactosClient_Intf, uPedidosClienteReportController, uIDialogListaPedidosCliEnvioEMail,
|
||||
uSistemaFunc, uStringsUtils, uDialogElegirEMail, Forms, uEMailUtils;
|
||||
schContactosClient_Intf, uPedidosClienteReportController,
|
||||
uIDialogListaPedidosCliEnvioEMail, uSistemaFunc, uStringsUtils, uDialogElegirEMail, Forms, uEMailUtils;
|
||||
|
||||
{ TPedidosClienteController }
|
||||
|
||||
|
||||
@ -8,9 +8,7 @@
|
||||
<Option Name="GUID">{31F77077-B4B9-443C-9AA9-F13B4EB640B4}</Option>
|
||||
</Option>
|
||||
</PersonalityInfo>
|
||||
<Default.Personality>
|
||||
|
||||
<Projects>
|
||||
<Default.Personality> <Projects>
|
||||
<Projects Name="Base.bpl">..\..\Base\Base.bdsproj</Projects>
|
||||
<Projects Name="ControllerBase.bpl">..\..\Base\ControllerBase\ControllerBase.bdsproj</Projects>
|
||||
<Projects Name="GUIBase.bpl">..\..\Base\GUIBase\GUIBase.bdsproj</Projects>
|
||||
@ -25,10 +23,7 @@
|
||||
<Projects Name="PedidosCliente_plugin.bpl">Plugin\PedidosCliente_plugin.bdsproj</Projects>
|
||||
<Projects Name="FactuGES_Server.exe">..\..\Servidor\FactuGES_Server.bdsproj</Projects>
|
||||
<Projects Name="FactuGES.exe">..\..\Cliente\FactuGES.bdsproj</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 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>
|
||||
<Dependencies/>
|
||||
</Default.Personality>
|
||||
|
||||
@ -116,7 +116,6 @@ begin
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfEditorPedidosCliente.actEnviarEmailUpdate(Sender: TObject);
|
||||
|
||||
@ -70,6 +70,7 @@ contains
|
||||
uIEditorElegirRecibosCliente in 'View\uIEditorElegirRecibosCliente.pas',
|
||||
uIEditorRecibosClientePreview in 'View\uIEditorRecibosClientePreview.pas',
|
||||
uRecibosClienteReportController in 'uRecibosClienteReportController.pas',
|
||||
uIEditorFechaPago in 'View\uIEditorFechaPago.pas';
|
||||
uIEditorFechaPago in 'View\uIEditorFechaPago.pas',
|
||||
uIDialogListaRecibosCliEnvioEMail in 'View\uIDialogListaRecibosCliEnvioEMail.pas';
|
||||
|
||||
end.
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
unit uIDialogListaRecibosCliEnvioEMail;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
uBizRecibosCliente, uRecibosClienteController;
|
||||
|
||||
type
|
||||
IDialogListaRecibosCliEnvioEMail = interface
|
||||
['{64A85712-8920-47FB-88A9-F8E1677A2102}']
|
||||
function GetRecibos: IBizRecibosCliente;
|
||||
procedure SetRecibos(const Value: IBizRecibosCliente);
|
||||
property Recibos: IBizRecibosCliente read GetRecibos write SetRecibos;
|
||||
function ShowModal : Integer;
|
||||
procedure Release;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@ -76,6 +76,13 @@ type
|
||||
|
||||
procedure Preview(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false);
|
||||
function Print(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false): Boolean;
|
||||
|
||||
function EnviarEmailRecibos(ARecibos : IBizRecibosCliente): Boolean;
|
||||
function GenerarEmailRecibo(ARecibo : IBizRecibosCliente): Boolean;
|
||||
function EnviarReciboPorEMail(ARecibo: IBizRecibosCliente;
|
||||
const AEnviarDirectamente: Boolean = True;
|
||||
const ADireccionEMail: String = ''; const AAsuntoEMail: String = '';
|
||||
const ATextoEMail: String = ''): Boolean;
|
||||
end;
|
||||
|
||||
TRecibosClienteController = class(TObservador, IRecibosClienteController)
|
||||
@ -137,6 +144,13 @@ type
|
||||
|
||||
procedure Preview(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false);
|
||||
function Print(ARecibosCliente : IBizRecibosCliente; AllItems: Boolean = false): Boolean;
|
||||
|
||||
function EnviarEmailRecibos(ARecibos : IBizRecibosCliente): Boolean;
|
||||
function GenerarEmailRecibo(ARecibo : IBizRecibosCliente): Boolean;
|
||||
function EnviarReciboPorEMail(ARecibo: IBizRecibosCliente;
|
||||
const AEnviarDirectamente: Boolean = True;
|
||||
const ADireccionEMail: String = ''; const AAsuntoEMail: String = '';
|
||||
const ATextoEMail: String = ''): Boolean;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -147,7 +161,9 @@ uses
|
||||
uDateUtils, uROTypes, DateUtils, Controls, Windows, Variants,
|
||||
uRecibosClienteReportController, uBizContactos,
|
||||
schRecibosClienteClient_Intf, uIEditorRecibosCliente, uIEditorReciboCliente,
|
||||
uIEditorElegirRecibosCliente, uDataModuleRecibosCliente, uIEditorFechaPago;
|
||||
uIEditorElegirRecibosCliente, uDataModuleRecibosCliente, uIEditorFechaPago,
|
||||
|
||||
uIDialogListaRecibosCliEnvioEMail, uSistemaFunc, uStringsUtils, uDialogElegirEMail, uEMailUtils;
|
||||
|
||||
{ TRecibosClienteController }
|
||||
|
||||
@ -632,11 +648,122 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TRecibosClienteController.EnviarEmailRecibos(
|
||||
ARecibos: IBizRecibosCliente): Boolean;
|
||||
var
|
||||
ADialog : IDialogListaRecibosCliEnvioEMail;
|
||||
ARespuesta : Integer;
|
||||
begin
|
||||
ADialog := NIL;
|
||||
|
||||
if not Assigned(ARecibos) then
|
||||
raise Exception.Create ('Recibos no asignadas (EnviarRecibosCliPorEMail)');
|
||||
|
||||
if ARecibos.DataTable.Active then
|
||||
ARecibos.DataTable.Active := True;
|
||||
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
CreateEditor('DialogListaRecibosCliEnvioEMail', IDialogListaRecibosCliEnvioEMail, ADialog);
|
||||
|
||||
if Assigned(ADialog) then
|
||||
begin
|
||||
try
|
||||
ADialog.Recibos := ARecibos;
|
||||
ARespuesta := ADialog.ShowModal;
|
||||
Result := (ARespuesta = mrOK)
|
||||
finally
|
||||
ADialog.Release;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
ADialog := NIL;
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TRecibosClienteController.EnviarReciboPorEMail(
|
||||
ARecibo: IBizRecibosCliente; const AEnviarDirectamente: Boolean;
|
||||
const ADireccionEMail, AAsuntoEMail, ATextoEMail: String): Boolean;
|
||||
var
|
||||
AReportController : IRecibosClienteReportController;
|
||||
AFicheroTMP : TFileName;
|
||||
AEMail : String;
|
||||
AAsunto : String;
|
||||
AListaEmail : TStringList;
|
||||
begin
|
||||
|
||||
if not Assigned(ARecibo) then
|
||||
raise Exception.Create ('Recibo no asignada (EnviarReciboPorEMail)');
|
||||
|
||||
if ARecibo.DataTable.Active then
|
||||
ARecibo.DataTable.Active := True;
|
||||
|
||||
RecuperarCliente(ARecibo);
|
||||
ARecibo.Cliente.DataTable.Active := True;
|
||||
|
||||
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(ARecibo.REFERENCIA));
|
||||
|
||||
if not EsCadenaVacia(ADireccionEMail) then
|
||||
AEMail := ADireccionEMail
|
||||
else begin
|
||||
AListaEmail := TStringList.Create;
|
||||
try
|
||||
if not EsCadenaVacia(ARecibo.Cliente.EMAIL_ADMINISTRACION) then
|
||||
AListaEmail.Add(ARecibo.Cliente.EMAIL_ADMINISTRACION);
|
||||
|
||||
if not ElegirEMail(AListaEmail, AEMail) then
|
||||
Exit;
|
||||
finally
|
||||
FreeANDNIL(AListaEmail);
|
||||
end;
|
||||
end;
|
||||
|
||||
if not EsCadenaVacia(AAsuntoEMail) then
|
||||
AAsunto := AAsuntoEMail
|
||||
else
|
||||
AAsunto := 'Recibo ' + ARecibo.REFERENCIA;
|
||||
|
||||
ShowHourglassCursor;
|
||||
Application.ProcessMessages;
|
||||
|
||||
AReportController := TRecibosClienteReportController.Create;
|
||||
try
|
||||
AReportController.ExportToPDF(ARecibo.ID, AFicheroTMP);
|
||||
Result := EnviarEMailMAPI(AAsunto, ATextoEMail, AFicheroTMP, '', '', ARecibo.Cliente.NOMBRE, AEMail, AEnviarDirectamente);
|
||||
if Result then
|
||||
// _AnadirMarcaEnvioCorreo(ARecibo);
|
||||
finally
|
||||
SysUtils.DeleteFile(AFicheroTMP);
|
||||
AReportController := NIL;
|
||||
HideHourglassCursor;
|
||||
Application.ProcessMessages;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRecibosClienteController.RecuperarCliente(AReciboCliente: IBizRecibosCliente);
|
||||
begin
|
||||
AReciboCliente._Cliente := (FClienteController.Buscar(AReciboCliente.ID_Cliente) as IBizCliente);
|
||||
end;
|
||||
|
||||
function TRecibosClienteController.GenerarEmailRecibo(
|
||||
ARecibo: IBizRecibosCliente): Boolean;
|
||||
begin
|
||||
if not Assigned(ARecibo) then
|
||||
raise Exception.Create ('Recibos no asignadas (GenerarEmailRecibo)');
|
||||
|
||||
if ARecibo.DataTable.Active then
|
||||
ARecibo.DataTable.Active := True;
|
||||
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
RecuperarCliente(ARecibo);
|
||||
EnviarReciboPorEMail(ARecibo, False, ARecibo.Cliente.EMAIL_ADMINISTRACION);
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TRecibosClienteController.GetPagosController: IPagosClienteController;
|
||||
begin
|
||||
Result := FPagosController;
|
||||
|
||||
@ -11,6 +11,7 @@ type
|
||||
['{3837DFA3-0A38-4BB2-B0DB-D0615249EA49}']
|
||||
procedure Preview(const ID : String);
|
||||
function Print(const ID : String): Boolean;
|
||||
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
end;
|
||||
|
||||
TRecibosClienteReportController = class(TInterfacedObject, IRecibosClienteReportController)
|
||||
@ -23,6 +24,7 @@ type
|
||||
|
||||
procedure Preview(const ID : String);
|
||||
function Print(const ID : String): Boolean;
|
||||
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
end;
|
||||
|
||||
|
||||
@ -31,7 +33,7 @@ implementation
|
||||
uses
|
||||
uROTypes, uEditorRegistryUtils, uIEditorRecibosClientePreview,
|
||||
uEditorPreview, uDataModuleRecibosCliente, uEditorBase, cxControls,
|
||||
schRecibosClienteClient_Intf;
|
||||
schRecibosClienteClient_Intf, uStringsUtils;
|
||||
|
||||
{ TRecibosClienteReportController }
|
||||
|
||||
@ -53,6 +55,28 @@ begin
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TRecibosClienteReportController.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 TRecibosClienteReportController.Preview(const ID : String);
|
||||
var
|
||||
AStream: Binary;
|
||||
|
||||
@ -60,7 +60,7 @@ type
|
||||
function GetItem(const ID : Integer) : IBizRecibosCliente;
|
||||
function NewItem : IBizRecibosCliente;
|
||||
function GetReport(const ID: String): Binary;
|
||||
|
||||
function GetRptPDF(const AID: Integer; const ShowLogotipo: Boolean = False): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -79,6 +79,19 @@ begin
|
||||
Result := (RORemoteService as IsrvRecibosCliente).GenerateReport(ID);
|
||||
end;
|
||||
|
||||
function TDataModuleRecibosCliente.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;
|
||||
|
||||
procedure TDataModuleRecibosCliente.DAClientDataModuleCreate(Sender: TObject);
|
||||
begin
|
||||
RORemoteService.Channel := dmConexion.Channel;
|
||||
|
||||
@ -9,6 +9,7 @@ type
|
||||
IDataModuleRecibosClienteReport = interface
|
||||
['{FBADD967-0008-4ED5-9CCD-5BFE4F527D52}']
|
||||
function GetReport(const ID: String): Binary;
|
||||
function GetRptPDF(const AID: Integer; const ShowLogotipo: Boolean = False): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
@ -172,7 +172,7 @@
|
||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||
</VersionInfoKeys>
|
||||
</Delphi.Personality>
|
||||
<!-- EurekaLog First Line
|
||||
<!-- EurekaLog First Line
|
||||
[Exception Log]
|
||||
EurekaLog Version=519
|
||||
Activate=0
|
||||
|
||||
@ -84,7 +84,8 @@ requires
|
||||
fsTee10,
|
||||
tee,
|
||||
teeui,
|
||||
teedb;
|
||||
teedb,
|
||||
dxGDIPlusD10;
|
||||
|
||||
contains
|
||||
uRecibosClienteViewRegister in 'uRecibosClienteViewRegister.pas',
|
||||
@ -97,6 +98,7 @@ contains
|
||||
uEditorFechaPago in 'uEditorFechaPago.pas' {fEditorFechaPago},
|
||||
uEditorReciboClienteReport in 'uEditorReciboClienteReport.pas' {fEditorReciboClienteReport: TfEditorReciboClienteReport},
|
||||
uViewRecibosCliCompensados in 'uViewRecibosCliCompensados.pas' {frViewRecibosCliCompensados: TFrame},
|
||||
uViewReciboCliImportes in 'uViewReciboCliImportes.pas' {frViewReciboCliImportes: TFrame};
|
||||
uViewReciboCliImportes in 'uViewReciboCliImportes.pas' {frViewReciboCliImportes: TFrame},
|
||||
uDialogListaRecibosCliEnvioEMail in 'uDialogListaRecibosCliEnvioEMail.pas' {frDialogListaRecibosCliEnvioEMail: TfDialogListaRecibosCliEnvioEMail};
|
||||
|
||||
end.
|
||||
|
||||
@ -0,0 +1,89 @@
|
||||
inherited fDialogListaRecibosCliEnvioEMail: TfDialogListaRecibosCliEnvioEMail
|
||||
Caption = 'Enviar recibos 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 = 298
|
||||
Caption = 'Enviar recibos por correo electr'#243'nico'
|
||||
Font.Style = [fsBold]
|
||||
ExplicitWidth = 298
|
||||
end
|
||||
inherited Label2: TLabel
|
||||
Height = 51
|
||||
Caption =
|
||||
'Se generar'#225'n correos electr'#243'nicos autom'#225'ticos adjuntando los rec' +
|
||||
'ibos 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 uDialogListaRecibosCliEnvioEMail;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, uDialogBase, ActnList, StdCtrls, ExtCtrls, ComCtrls,
|
||||
uDialogListaEnvioEMail, uIDialogListaRecibosCliEnvioEMail, uRecibosClienteController,
|
||||
uBizRecibosCliente;
|
||||
|
||||
type
|
||||
TfDialogListaRecibosCliEnvioEMail = class(TfDialogListaEnvioEMail, IDialogListaRecibosCliEnvioEMail)
|
||||
procedure actCancelarExecute(Sender: TObject);
|
||||
procedure actAceptarUpdate(Sender: TObject);
|
||||
procedure actAceptarExecute(Sender: TObject);
|
||||
private
|
||||
FRecibos : IBizRecibosCliente;
|
||||
FController : IRecibosClienteController;
|
||||
protected
|
||||
function GetRecibos: IBizRecibosCliente;
|
||||
procedure SetRecibos(const Value: IBizRecibosCliente);
|
||||
|
||||
procedure RellenarLista;
|
||||
procedure BorrarLista;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
property Recibos: IBizRecibosCliente read GetRecibos write SetRecibos;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
schRecibosClienteClient_Intf, uStringsUtils, cxControls;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
{ TfDialogListaRecibosEnvioEMail }
|
||||
|
||||
procedure TfDialogListaRecibosCliEnvioEMail.actAceptarExecute(Sender: TObject);
|
||||
var
|
||||
i : Integer;
|
||||
begin
|
||||
ShowHourglassCursor;
|
||||
Application.ProcessMessages;
|
||||
try
|
||||
FRecibos.First;
|
||||
FController.RecuperarCliente(FRecibos);
|
||||
FRecibos.Cliente.DataTable.Active := True;
|
||||
try
|
||||
for i := 0 to FRecibos.DataTable.RecordCount - 1 do
|
||||
begin
|
||||
if not EsCadenaVacia(FRecibos.Cliente.EMAIL_ADMINISTRACION) then
|
||||
begin
|
||||
if FController.EnviarReciboPorEMail(FRecibos, True, FRecibos.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;
|
||||
|
||||
FRecibos.Next;
|
||||
FController.RecuperarCliente(FRecibos);
|
||||
FRecibos.Cliente.DataTable.Active := True;
|
||||
end;
|
||||
Button2.Enabled := False;
|
||||
finally
|
||||
ListView1.Items.EndUpdate;
|
||||
end;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
|
||||
Button1.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TfDialogListaRecibosCliEnvioEMail.actAceptarUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
(Sender as TAction).Enabled := (ListView1.Items.Count > 0)
|
||||
end;
|
||||
|
||||
procedure TfDialogListaRecibosCliEnvioEMail.actCancelarExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
ModalResult := mrOk;
|
||||
end;
|
||||
|
||||
procedure TfDialogListaRecibosCliEnvioEMail.BorrarLista;
|
||||
begin
|
||||
ListView1.Items.Clear;
|
||||
end;
|
||||
|
||||
constructor TfDialogListaRecibosCliEnvioEMail.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
ModalResult := mrCancel;
|
||||
FController := TRecibosClienteController.Create;
|
||||
end;
|
||||
|
||||
function TfDialogListaRecibosCliEnvioEMail.GetRecibos: IBizRecibosCliente;
|
||||
begin
|
||||
Result := FRecibos;
|
||||
end;
|
||||
|
||||
procedure TfDialogListaRecibosCliEnvioEMail.RellenarLista;
|
||||
var
|
||||
i : Integer;
|
||||
begin
|
||||
ListView1.Items.BeginUpdate;
|
||||
ListView1.Items.Clear;
|
||||
|
||||
FRecibos.First;
|
||||
FRecibos.DataTable.DisableControls;
|
||||
try
|
||||
for i := 0 to FRecibos.DataTable.RecordCount - 1 do
|
||||
begin
|
||||
FController.RecuperarCliente(FRecibos);
|
||||
FRecibos.Cliente.DataTable.Active := True;
|
||||
|
||||
with ListView1.Items.Add do
|
||||
begin
|
||||
Caption := FRecibos.REFERENCIA;
|
||||
SubItems.Add(FRecibos.NOMBRE_CLIENTE);
|
||||
SubItems.Add(FRecibos.Cliente.EMAIL_ADMINISTRACION);
|
||||
|
||||
if EsCadenaVacia(FRecibos.Cliente.EMAIL_ADMINISTRACION) then
|
||||
SubItems.Add('Sin dirección e-mail administrativa')
|
||||
else
|
||||
SubItems.Add('')
|
||||
end;
|
||||
FRecibos.Next;
|
||||
end;
|
||||
finally
|
||||
FRecibos.DataTable.EnableControls;
|
||||
ListView1.Items.EndUpdate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfDialogListaRecibosCliEnvioEMail.SetRecibos(
|
||||
const Value: IBizRecibosCliente);
|
||||
begin
|
||||
FRecibos := Value;
|
||||
|
||||
if Assigned(FRecibos) then
|
||||
begin
|
||||
FRecibos.DataTable.Open;
|
||||
RellenarLista;
|
||||
end
|
||||
else
|
||||
BorrarLista;
|
||||
end;
|
||||
|
||||
end.
|
||||
@ -41,7 +41,10 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente
|
||||
Width = 645
|
||||
ExplicitWidth = 645
|
||||
inherited tbxMain: TTBXToolbar
|
||||
ExplicitWidth = 434
|
||||
ExplicitWidth = 542
|
||||
object TBXItem38: TTBXItem [13]
|
||||
Action = actEnviarEMail
|
||||
end
|
||||
end
|
||||
inherited tbxMenu: TTBXToolbar
|
||||
ExplicitWidth = 645
|
||||
@ -108,6 +111,9 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente
|
||||
Kind = skSum
|
||||
Column = frViewRecibosCliente1.cxGridViewOTROS_GASTOS
|
||||
end>
|
||||
inherited cxGridViewNUM_COPIAS: TcxGridDBColumn
|
||||
IsCaptionAssigned = True
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
@ -198,6 +204,12 @@ inherited fEditorRecibosCliente: TfEditorRecibosCliente
|
||||
Enabled = False
|
||||
Visible = False
|
||||
end
|
||||
object actEnviarEMail: TAction
|
||||
Category = 'Acciones'
|
||||
Caption = 'Enviar por e-mail...'
|
||||
OnExecute = actEnviarEMailExecute
|
||||
OnUpdate = actEnviarEMailUpdate
|
||||
end
|
||||
end
|
||||
inherited SmallImages: TPngImageList [5]
|
||||
PngImages = <
|
||||
|
||||
@ -44,7 +44,11 @@ type
|
||||
frViewRecibosCliente1: TfrViewRecibosCliente;
|
||||
JsPrevisualizarDialog: TJSDialog;
|
||||
JsImprimirDialog: TJSDialog;
|
||||
actEnviarEMail: TAction;
|
||||
TBXItem38: TTBXItem;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure actEnviarEMailExecute(Sender: TObject);
|
||||
procedure actEnviarEMailUpdate(Sender: TObject);
|
||||
private
|
||||
FRecibosCliente: IBizRecibosCliente;
|
||||
FController : IRecibosClienteController;
|
||||
@ -73,13 +77,46 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
uDataModuleRecibosCliente, uDataModuleUsuarios, uGridUtils, uDBSelectionListUtils;
|
||||
cxControls, uDataModuleRecibosCliente, uDataModuleUsuarios, uGridUtils, uDBSelectionListUtils;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
{
|
||||
*************************** TfEditorRecibosCliente ***************************
|
||||
}
|
||||
procedure TfEditorRecibosCliente.actEnviarEMailExecute(Sender: TObject);
|
||||
var
|
||||
ARecibos : IBizRecibosCliente;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if ViewGrid.NumSeleccionados = 1 then
|
||||
FController.GenerarEmailRecibo(RecibosCliente)
|
||||
else begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (RecibosCliente as ISeleccionable).SelectedRecords);
|
||||
ARecibos := (Controller as IRecibosClienteController).ExtraerSeleccionados(RecibosCliente, ViewGrid) as IBizRecibosCliente;
|
||||
|
||||
if Assigned(ARecibos) then
|
||||
if FController.EnviarEmailREcibos(ARecibos) then
|
||||
RefrescarInterno;
|
||||
finally
|
||||
ARecibos := NIL;
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfEditorRecibosCliente.actEnviarEMailUpdate(Sender: TObject);
|
||||
begin
|
||||
if HayDatos and Assigned(ViewGrid) then
|
||||
(Sender as TAction).Enabled := ViewGrid.esSeleccionCeldaDatos
|
||||
and (ViewGrid.NumSeleccionados > 0)
|
||||
else
|
||||
(Sender as TAction).Enabled := False;
|
||||
end;
|
||||
|
||||
constructor TfEditorRecibosCliente.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -32,7 +32,7 @@ implementation
|
||||
|
||||
uses
|
||||
uEditorRegistryUtils, uEditorRecibosCliente, uEditorReciboCliente, uEditorElegirRecibosCliente,
|
||||
uEditorReciboClienteReport, uEditorFechaPago;
|
||||
uEditorReciboClienteReport, uEditorFechaPago, uDialogListaRecibosCliEnvioEMail;
|
||||
|
||||
procedure RegisterViews;
|
||||
begin
|
||||
@ -41,6 +41,7 @@ begin
|
||||
EditorRegistry.RegisterClass(TfEditorReciboCliente, 'EditorReciboCliente');
|
||||
EditorRegistry.RegisterClass(TfEditorElegirRecibosCliente, 'EditorElegirRecibosCliente');
|
||||
EditorRegistry.RegisterClass(TfEditorReciboClientePreview, 'EditorRecibosClientePreview');
|
||||
EditorRegistry.RegisterClass(TfDialogListaRecibosCliEnvioEMail, 'DialogListaRecibosCliEnvioEMail');
|
||||
end;
|
||||
|
||||
procedure UnregisterViews;
|
||||
@ -50,6 +51,7 @@ begin
|
||||
EditorRegistry.UnRegisterClass(TfEditorReciboCliente);
|
||||
EditorRegistry.UnRegisterClass(TfEditorElegirRecibosCliente);
|
||||
EditorRegistry.UnRegisterClass(TfEditorReciboClientePreview);
|
||||
EditorRegistry.UnRegisterClass(TfDialogListaRecibosCliEnvioEMail);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -40,6 +40,7 @@ type
|
||||
{ IsrvRecibosProveedor methods }
|
||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||
function GenerateReport(const ID: Integer): Binary;
|
||||
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -81,6 +82,12 @@ begin
|
||||
SessionManager := dmServer.SessionManager;
|
||||
end;
|
||||
|
||||
function TsrvRecibosProveedor.GenerarReportPDF(const ListaID: TIntegerArray;
|
||||
const ShowLogotipo: Boolean): Binary;
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
function TsrvRecibosProveedor.GenerateReport(const ID: Integer): Binary;
|
||||
//var
|
||||
// AReportGenerator : TRptRecibosProveedor;
|
||||
|
||||
@ -358,6 +358,16 @@
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
</Operation>
|
||||
<Operation Name="GenerarReportPDF" UID="{2AD678AF-6672-4DA6-ADD7-AFA17E258522}">
|
||||
<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>
|
||||
</Interface>
|
||||
</Interfaces>
|
||||
@ -524,6 +534,16 @@
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
</Operation>
|
||||
<Operation Name="GenerarReportPDF" UID="{AF13569B-91BA-46C1-94C5-87A12489687F}">
|
||||
<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>
|
||||
</Interface>
|
||||
</Interfaces>
|
||||
@ -548,6 +568,16 @@
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
</Operation>
|
||||
<Operation Name="GenerarReportPDF" UID="{29B68ED8-578F-4A84-A8FA-B1B2800EA5BD}">
|
||||
<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>
|
||||
</Interface>
|
||||
</Interfaces>
|
||||
|
||||
@ -452,6 +452,7 @@ type
|
||||
['{66B71884-5CE4-4574-B825-60CDA956B628}']
|
||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||
function GenerateReport(const ID: String): Binary;
|
||||
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||
end;
|
||||
|
||||
{ CosrvAlbaranesProveedor }
|
||||
@ -466,6 +467,7 @@ type
|
||||
|
||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||
function GenerateReport(const ID: String): Binary;
|
||||
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||
end;
|
||||
|
||||
{ IsrvFormasPago }
|
||||
@ -584,6 +586,7 @@ type
|
||||
['{7655160C-7023-452E-BB0E-C97E29B915E7}']
|
||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||
function GenerateReport(const FacturaID: String): Binary;
|
||||
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||
end;
|
||||
|
||||
{ CosrvFacturasProveedor }
|
||||
@ -598,6 +601,7 @@ type
|
||||
|
||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||
function GenerateReport(const FacturaID: String): Binary;
|
||||
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||
end;
|
||||
|
||||
{ IsrvRecibosProveedor }
|
||||
@ -605,6 +609,7 @@ type
|
||||
['{22580F16-8FFC-4FE0-BCDD-5533D5DB1F55}']
|
||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||
function GenerateReport(const ID: Integer): Binary;
|
||||
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||
end;
|
||||
|
||||
{ CosrvRecibosProveedor }
|
||||
@ -619,6 +624,7 @@ type
|
||||
|
||||
function GetNextAutoInc(const GeneratorName: String): Integer;
|
||||
function GenerateReport(const ID: Integer): Binary;
|
||||
function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary;
|
||||
end;
|
||||
|
||||
{ IsrvHistoricoMovimientos }
|
||||
@ -1898,6 +1904,31 @@ begin
|
||||
end
|
||||
end;
|
||||
|
||||
function TsrvAlbaranesProveedor_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;
|
||||
|
||||
{ CosrvFormasPago }
|
||||
|
||||
class function CosrvFormasPago.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvFormasPago;
|
||||
@ -2314,6 +2345,31 @@ begin
|
||||
end
|
||||
end;
|
||||
|
||||
function TsrvFacturasProveedor_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;
|
||||
|
||||
{ CosrvRecibosProveedor }
|
||||
|
||||
class function CosrvRecibosProveedor.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvRecibosProveedor;
|
||||
@ -2375,6 +2431,31 @@ begin
|
||||
end
|
||||
end;
|
||||
|
||||
function TsrvRecibosProveedor_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;
|
||||
|
||||
{ CosrvHistoricoMovimientos }
|
||||
|
||||
class function CosrvHistoricoMovimientos.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvHistoricoMovimientos;
|
||||
|
||||
@ -128,6 +128,7 @@ type
|
||||
published
|
||||
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_GenerarReportPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
end;
|
||||
|
||||
TsrvFormasPago_Invoker = class(TDARemoteService_Invoker)
|
||||
@ -178,6 +179,7 @@ type
|
||||
published
|
||||
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_GenerarReportPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
end;
|
||||
|
||||
TsrvRecibosProveedor_Invoker = class(TDARemoteService_Invoker)
|
||||
@ -186,6 +188,7 @@ type
|
||||
published
|
||||
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_GenerarReportPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
end;
|
||||
|
||||
TsrvHistoricoMovimientos_Invoker = class(TDARemoteService_Invoker)
|
||||
@ -944,6 +947,37 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TsrvAlbaranesProveedor_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 IsrvAlbaranesProveedor).GenerarReportPDF(ListaID, ShowLogotipo);
|
||||
|
||||
__Message.Initialize(__Transport, 'FactuGES', 'srvAlbaranesProveedor', '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;
|
||||
|
||||
{ TsrvFormasPago_Invoker }
|
||||
|
||||
procedure TsrvFormasPago_Invoker.Invoke_GetNextAutoInc(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
@ -1280,6 +1314,37 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TsrvFacturasProveedor_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 IsrvFacturasProveedor).GenerarReportPDF(ListaID, ShowLogotipo);
|
||||
|
||||
__Message.Initialize(__Transport, 'FactuGES', 'srvFacturasProveedor', '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;
|
||||
|
||||
{ TsrvRecibosProveedor_Invoker }
|
||||
|
||||
procedure TsrvRecibosProveedor_Invoker.Invoke_GetNextAutoInc(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
@ -1328,6 +1393,37 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TsrvRecibosProveedor_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 IsrvRecibosProveedor).GenerarReportPDF(ListaID, ShowLogotipo);
|
||||
|
||||
__Message.Initialize(__Transport, 'FactuGES', 'srvRecibosProveedor', '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;
|
||||
|
||||
{ TsrvRemesasProveedor_Invoker }
|
||||
|
||||
procedure TsrvRemesasProveedor_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>
|
||||
<PersonalityInfo>
|
||||
<Option>
|
||||
@ -175,10 +175,11 @@
|
||||
<VersionInfoKeys Name="ProductName">FactuGES Server</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">3.0.9.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompileDate">martes, 30 de septiembre de 2008 19:31</VersionInfoKeys></VersionInfoKeys> <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>
|
||||
</Delphi.Personality>
|
||||
<VersionInfoKeys Name="CompileDate">martes, 30 de septiembre de 2008 19:31</VersionInfoKeys></VersionInfoKeys>
|
||||
<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>
|
||||
</Delphi.Personality>
|
||||
<ModelSupport>False</ModelSupport>
|
||||
<!-- EurekaLog First Line
|
||||
[Exception Log]
|
||||
|
||||
@ -912,12 +912,12 @@
|
||||
#define IdResourceStrings_RSMIMEMIMETypeEmpty 65181
|
||||
#define IdResourceStrings_RSMIMEMIMEExtAlreadyExists 65182
|
||||
#define IdResourceStrings_RSStatusResolving 65183
|
||||
#define uRORes_err_InvalidVarArrayDimCount 65184
|
||||
#define uRORes_err_MessageNotAssigned 65185
|
||||
#define ComConst_SOleError 65186
|
||||
#define ComConst_SNoMethod 65187
|
||||
#define ComConst_SVarNotObject 65188
|
||||
#define ComConst_STooManyParams 65189
|
||||
#define uRODECConst_sFMT_HEXL 65184
|
||||
#define uRODECConst_sFMT_MIME64 65185
|
||||
#define uRODECConst_sFMT_UU 65186
|
||||
#define uRODECConst_sFMT_XX 65187
|
||||
#define uRODECConst_sInvalidKeySize 65188
|
||||
#define uRODECConst_sNotInitialized 65189
|
||||
#define IdResourceStrings_RSCannotAllocateSocket 65190
|
||||
#define IdResourceStrings_RSConnectionClosedGracefully 65191
|
||||
#define IdResourceStrings_RSCouldNotBindSocket 65192
|
||||
@ -928,70 +928,70 @@
|
||||
#define IdResourceStrings_RSThreadClassNotSpecified 65197
|
||||
#define IdResourceStrings_RSFileNotFound 65198
|
||||
#define IdResourceStrings_RSOnlyOneAntiFreeze 65199
|
||||
#define uRORes_err_UnhandledException 65200
|
||||
#define uRORes_err_ChannelBusy 65201
|
||||
#define uRORes_err_ArrayIndexOutOfBounds 65202
|
||||
#define uRORes_err_InvalidHeader 65203
|
||||
#define uRORes_err_UnknownClassInStream 65204
|
||||
#define uRORes_err_UnexpectedClassInStream 65205
|
||||
#define uRORes_err_SessionNotFound 65206
|
||||
#define uRORes_err_ChannelDoesntSupportIROMetadataReader 65207
|
||||
#define uRORes_err_TooManySessions 65208
|
||||
#define uRORes_err_DOMElementIsNIL 65209
|
||||
#define uRORes_err_CannotLoadXMLDocument 65210
|
||||
#define uRORes_err_ErrorCreatingMsXmlDoc 65211
|
||||
#define uRORes_err_NoXMLParsersAvailable 65212
|
||||
#define uRORes_err_IDispatchMarshalingNotSupported 65213
|
||||
#define uRORes_err_UnsupportedVariantType 65214
|
||||
#define uRORes_err_VariantIsNotArray 65215
|
||||
#define uRORes_str_ExceptionReraisedFromServer 65216
|
||||
#define uRORes_err_AssignError 65217
|
||||
#define uRORes_err_InvalidRequestStream 65218
|
||||
#define uRORes_err_NILMessage 65219
|
||||
#define uRORes_err_UnspecifiedInterface 65220
|
||||
#define uRORes_err_UnspecifiedMessage 65221
|
||||
#define uRORes_err_UnknownMethod 65222
|
||||
#define uRORes_err_ClassFactoryDidNotReturnInstance 65223
|
||||
#define uRORes_err_TypeNotSupported 65224
|
||||
#define uRORes_err_ClassFactoryNotFound 65225
|
||||
#define uRORes_err_IROMessageNotSupported 65226
|
||||
#define uRORes_err_ClassAlreadyRegistered 65227
|
||||
#define uRORes_err_UnknownProxyInterface 65228
|
||||
#define uRORes_err_DispatcherAlreadyAssigned 65229
|
||||
#define uRORes_err_CannotFindMessageDispatcher 65230
|
||||
#define uRORes_err_ServerOnlySupportsOneDispatcher 65231
|
||||
#define uRORes_err_InvalidType 65232
|
||||
#define uRORes_err_InvalidStream 65233
|
||||
#define uRORes_err_InvalidParamFlag 65234
|
||||
#define uRORes_err_InvalidStringLength 65235
|
||||
#define uRORes_str_InvalidClassTypeInStream 65236
|
||||
#define uRORes_err_UnexpectedEndOfStream 65237
|
||||
#define uRORes_err_RodlDuplicateName 65238
|
||||
#define uRORes_err_RodlNoDataTypeSpecified 65239
|
||||
#define uRORes_err_RodlNoEnumValues 65240
|
||||
#define uRORes_err_RodlNoStructElementsDefined 65241
|
||||
#define uRORes_err_RodlNoOperationsDefined 65242
|
||||
#define uRORes_err_RodlUsedFileDoesNotExist 65243
|
||||
#define uRORes_err_RodlInvalidDataType 65244
|
||||
#define uRORes_err_RodlStructCannotBeNested 65245
|
||||
#define uRORes_err_RodlInvalidAncestorType 65246
|
||||
#define uRORes_str_ExceptionOnServer 65247
|
||||
#define uRORes_err_NoXMLParsersAvailable 65200
|
||||
#define uRORes_err_IDispatchMarshalingNotSupported 65201
|
||||
#define uRORes_err_UnsupportedVariantType 65202
|
||||
#define uRORes_err_VariantIsNotArray 65203
|
||||
#define uRORes_err_InvalidVarArrayDimCount 65204
|
||||
#define uRORes_err_MessageNotAssigned 65205
|
||||
#define ComConst_SOleError 65206
|
||||
#define ComConst_SNoMethod 65207
|
||||
#define ComConst_SVarNotObject 65208
|
||||
#define ComConst_STooManyParams 65209
|
||||
#define uRODECConst_sProtectionCircular 65210
|
||||
#define uRODECConst_sStringFormatExists 65211
|
||||
#define uRODECConst_sInvalidStringFormat 65212
|
||||
#define uRODECConst_sInvalidFormatString 65213
|
||||
#define uRODECConst_sFMT_COPY 65214
|
||||
#define uRODECConst_sFMT_HEX 65215
|
||||
#define uRORes_err_UnknownProxyInterface 65216
|
||||
#define uRORes_err_DispatcherAlreadyAssigned 65217
|
||||
#define uRORes_err_CannotFindMessageDispatcher 65218
|
||||
#define uRORes_err_ServerOnlySupportsOneDispatcher 65219
|
||||
#define uRORes_err_UnhandledException 65220
|
||||
#define uRORes_err_ChannelBusy 65221
|
||||
#define uRORes_err_ArrayIndexOutOfBounds 65222
|
||||
#define uRORes_err_InvalidHeader 65223
|
||||
#define uRORes_err_UnknownClassInStream 65224
|
||||
#define uRORes_err_UnexpectedClassInStream 65225
|
||||
#define uRORes_err_SessionNotFound 65226
|
||||
#define uRORes_err_ChannelDoesntSupportIROMetadataReader 65227
|
||||
#define uRORes_err_TooManySessions 65228
|
||||
#define uRORes_err_DOMElementIsNIL 65229
|
||||
#define uRORes_err_CannotLoadXMLDocument 65230
|
||||
#define uRORes_err_ErrorCreatingMsXmlDoc 65231
|
||||
#define uRORes_err_RodlInvalidDataType 65232
|
||||
#define uRORes_err_RodlStructCannotBeNested 65233
|
||||
#define uRORes_err_RodlInvalidAncestorType 65234
|
||||
#define uRORes_str_ExceptionOnServer 65235
|
||||
#define uRORes_str_ExceptionReraisedFromServer 65236
|
||||
#define uRORes_err_AssignError 65237
|
||||
#define uRORes_err_InvalidRequestStream 65238
|
||||
#define uRORes_err_NILMessage 65239
|
||||
#define uRORes_err_UnspecifiedInterface 65240
|
||||
#define uRORes_err_UnspecifiedMessage 65241
|
||||
#define uRORes_err_UnknownMethod 65242
|
||||
#define uRORes_err_ClassFactoryDidNotReturnInstance 65243
|
||||
#define uRORes_err_TypeNotSupported 65244
|
||||
#define uRORes_err_ClassFactoryNotFound 65245
|
||||
#define uRORes_err_IROMessageNotSupported 65246
|
||||
#define uRORes_err_ClassAlreadyRegistered 65247
|
||||
#define Consts_SUTF8Encoding 65248
|
||||
#define Consts_SUTF7Encoding 65249
|
||||
#define Consts_SPageControlNotSet 65250
|
||||
#define uRODECConst_sProtectionCircular 65251
|
||||
#define uRODECConst_sStringFormatExists 65252
|
||||
#define uRODECConst_sInvalidStringFormat 65253
|
||||
#define uRODECConst_sInvalidFormatString 65254
|
||||
#define uRODECConst_sFMT_COPY 65255
|
||||
#define uRODECConst_sFMT_HEX 65256
|
||||
#define uRODECConst_sFMT_HEXL 65257
|
||||
#define uRODECConst_sFMT_MIME64 65258
|
||||
#define uRODECConst_sFMT_UU 65259
|
||||
#define uRODECConst_sFMT_XX 65260
|
||||
#define uRODECConst_sInvalidKeySize 65261
|
||||
#define uRODECConst_sNotInitialized 65262
|
||||
#define uRORes_err_InvalidIndex 65263
|
||||
#define uRORes_err_InvalidIndex 65251
|
||||
#define uRORes_err_InvalidType 65252
|
||||
#define uRORes_err_InvalidStream 65253
|
||||
#define uRORes_err_InvalidParamFlag 65254
|
||||
#define uRORes_err_InvalidStringLength 65255
|
||||
#define uRORes_str_InvalidClassTypeInStream 65256
|
||||
#define uRORes_err_UnexpectedEndOfStream 65257
|
||||
#define uRORes_err_RodlDuplicateName 65258
|
||||
#define uRORes_err_RodlNoDataTypeSpecified 65259
|
||||
#define uRORes_err_RodlNoEnumValues 65260
|
||||
#define uRORes_err_RodlNoStructElementsDefined 65261
|
||||
#define uRORes_err_RodlNoOperationsDefined 65262
|
||||
#define uRORes_err_RodlUsedFileDoesNotExist 65263
|
||||
#define Consts_SPictureLabel 65264
|
||||
#define Consts_SPictureDesc 65265
|
||||
#define Consts_SPreviewLabel 65266
|
||||
@ -2170,12 +2170,12 @@ BEGIN
|
||||
IdResourceStrings_RSMIMEMIMETypeEmpty, "Mimetype is empty"
|
||||
IdResourceStrings_RSMIMEMIMEExtAlreadyExists, "Extension already exits"
|
||||
IdResourceStrings_RSStatusResolving, "Resolving hostname %s."
|
||||
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_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."
|
||||
IdResourceStrings_RSCannotAllocateSocket, "Cannot allocate socket."
|
||||
IdResourceStrings_RSConnectionClosedGracefully, "Connection Closed Gracefully."
|
||||
IdResourceStrings_RSCouldNotBindSocket, "Could not bind socket. Address and port are already in use."
|
||||
@ -2186,6 +2186,26 @@ BEGIN
|
||||
IdResourceStrings_RSThreadClassNotSpecified, "Thread Class Not Specified."
|
||||
IdResourceStrings_RSFileNotFound, "File \"%s\" not found"
|
||||
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_ChannelBusy, "Channel is busy. Try again later."
|
||||
uRORes_err_ArrayIndexOutOfBounds, "Array index out of bounds (%d)."
|
||||
@ -2198,10 +2218,10 @@ BEGIN
|
||||
uRORes_err_DOMElementIsNIL, "DOMElement is NIL"
|
||||
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_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_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"
|
||||
uRORes_str_ExceptionReraisedFromServer, "An exception was raised on the server: %s"
|
||||
uRORes_err_AssignError, "Cannot assign a \"%s\" to a \"%s\"."
|
||||
uRORes_err_InvalidRequestStream, "Invalid request stream (%d bytes)"
|
||||
@ -2214,10 +2234,10 @@ BEGIN
|
||||
uRORes_err_ClassFactoryNotFound, "Class factory for interface %s not found"
|
||||
uRORes_err_IROMessageNotSupported, "Class \"%s\" does not support IROMessage"
|
||||
uRORes_err_ClassAlreadyRegistered, "Class \"%s\" is already registered"
|
||||
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"
|
||||
Consts_SUTF8Encoding, "UTF-8"
|
||||
Consts_SUTF7Encoding, "UTF-7"
|
||||
Consts_SPageControlNotSet, "PageControl must first be assigned"
|
||||
uRORes_err_InvalidIndex, "Invalid index %d"
|
||||
uRORes_err_InvalidType, "Invalid type \"%s. Expected \"%s\"\""
|
||||
uRORes_err_InvalidStream, "Invalid stream"
|
||||
uRORes_err_InvalidParamFlag, "Invalid Parameter Flag \"%s\""
|
||||
@ -2230,26 +2250,6 @@ BEGIN
|
||||
uRORes_err_RodlNoStructElementsDefined, "Struct 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_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_SPictureDesc, " (%dx%d)"
|
||||
Consts_SPreviewLabel, "Preview"
|
||||
|
||||
@ -16,7 +16,7 @@ BEGIN
|
||||
VALUE "FileVersion", "3.0.9.0\0"
|
||||
VALUE "ProductName", "FactuGES Server\0"
|
||||
VALUE "ProductVersion", "3.0.9.0\0"
|
||||
VALUE "CompileDate", "lunes, 27 de octubre de 2008 17:32\0"
|
||||
VALUE "CompileDate", "miércoles, 29 de octubre de 2008 13:28\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user