diff --git a/Source/Base/Base.res b/Source/Base/Base.res
index 1641339f..8b251f31 100644
Binary files a/Source/Base/Base.res and b/Source/Base/Base.res differ
diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj
index 07f2c461..f0f8ca76 100644
--- a/Source/Cliente/FactuGES.dproj
+++ b/Source/Cliente/FactuGES.dproj
@@ -52,7 +52,7 @@
Delphi.Personality
VCLApplication
-FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse2650FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.6.5.0FactuGESFactuGES2.6.5.0
+FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse2660FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.6.6.0FactuGESFactuGES2.6.6.0
File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found
FactuGES.dprFalse
diff --git a/Source/Cliente/FactuGES.rc b/Source/Cliente/FactuGES.rc
index 45fc4a13..f91c9401 100644
--- a/Source/Cliente/FactuGES.rc
+++ b/Source/Cliente/FactuGES.rc
@@ -1,7 +1,7 @@
MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Factuges.ico"
1 VERSIONINFO
-FILEVERSION 2,6,5,0
-PRODUCTVERSION 2,6,5,0
+FILEVERSION 2,6,6,0
+PRODUCTVERSION 2,6,6,0
FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L
FILEOS 0x40004L
@@ -13,10 +13,10 @@ BEGIN
BLOCK "0C0A04E4"
BEGIN
VALUE "CompanyName", "Rodax Software S.L.\0"
- VALUE "FileVersion", "2.6.5.0\0"
+ VALUE "FileVersion", "2.6.6.0\0"
VALUE "InternalName", "FactuGES\0"
VALUE "ProductName", "FactuGES\0"
- VALUE "ProductVersion", "2.6.5.0\0"
+ VALUE "ProductVersion", "2.6.6.0\0"
END
END
BLOCK "VarFileInfo"
diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res
index 145d5389..3fef9d6a 100644
Binary files a/Source/Cliente/FactuGES.res and b/Source/Cliente/FactuGES.res differ
diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj
index 8409acc9..4cf8df42 100644
--- a/Source/GUIBase/GUIBase.dproj
+++ b/Source/GUIBase/GUIBase.dproj
@@ -58,34 +58,34 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Informes/InfPedidoProveedor.fr3 b/Source/Informes/InfPedidoProveedor.fr3
index 5d395313..7a1816cf 100644
--- a/Source/Informes/InfPedidoProveedor.fr3
+++ b/Source/Informes/InfPedidoProveedor.fr3
@@ -1,44 +1,46 @@
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Modulos/Contratos de cliente/Controller/ContratosCliente_controller.dproj b/Source/Modulos/Contratos de cliente/Controller/ContratosCliente_controller.dproj
index 5002c5ca..07d8277c 100644
--- a/Source/Modulos/Contratos de cliente/Controller/ContratosCliente_controller.dproj
+++ b/Source/Modulos/Contratos de cliente/Controller/ContratosCliente_controller.dproj
@@ -49,15 +49,15 @@
MainSource
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas
index 3cc67117..4376bf8b 100644
--- a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas
+++ b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas
@@ -59,12 +59,10 @@ end;
function TContratosClienteReportController.ExportToPDF(const AID: Integer;
const AFileName: String): Boolean;
-{var
- AStream: Binary;}
+var
+ AStream: Binary;
begin
Result := False;
-{
- Result := False;
if EsCadenaVacia(AFileName) then
Exit;
@@ -80,7 +78,6 @@ begin
finally
HideHourglassCursor;
end;
-}
end;
procedure TContratosClienteReportController.Preview(const AListaID : TIntegerList);
diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm
index 01e071b4..38c58aa5 100644
--- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm
+++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm
@@ -126,7 +126,7 @@ inherited fEditorContratosCliente: TfEditorContratosCliente
Width = 1119
ExplicitWidth = 1119
inherited tbxMain: TTBXToolbar
- ExplicitWidth = 775
+ ExplicitWidth = 894
object TBXSubmenuItem3: TTBXSubmenuItem [0]
Caption = 'Nuevo'
DisplayMode = nbdmImageAndText
@@ -159,7 +159,7 @@ inherited fEditorContratosCliente: TfEditorContratosCliente
inherited TBXItem2: TTBXItem
Visible = False
end
- object TBXItem47: TTBXItem [14]
+ object TBXItem47: TTBXItem [13]
Action = actEnviarEMail
DisplayMode = nbdmImageAndText
end
@@ -267,9 +267,8 @@ inherited fEditorContratosCliente: TfEditorContratosCliente
object actEnviarEMail: TAction
Category = 'Acciones'
Caption = 'Enviar por e-mail...'
- Enabled = False
Hint = 'Enviar el contrato por correo electr'#243'nico'
- Visible = False
+ ImageIndex = 29
OnExecute = actEnviarEMailExecute
OnUpdate = actEnviarEMailUpdate
end
@@ -1030,6 +1029,27 @@ inherited fEditorContratosCliente: TfEditorContratosCliente
0049454E44AE426082}
Name = 'PngImage28'
Background = clWindow
+ end
+ item
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 610000000970485973000017120000171201679FD252000001964944415478DA
+ 636440038B371DFFCF8005C4FA5932621347115CB2F9D8FF30075154053F3F30
+ 30FC7CCF6096B49EE1FCCEE98C380D58B9F5F0FF403B09AC9A61B469C1050C43
+ C09C659B8FFE0F7110C3AB194CFFFAC0E0D2FD9B61FFEA1EB8218C203F873B8A
+ 10A59911C806F18DBB85E02E011BF0E1C30786F44015A234671F0B653871742F
+ AA0131BE160C5316EF60C8F012012B9AB1F72F8A8BB2153782C5A73E4B00F3E7
+ 2DDD846A80BF93215862E1BAFD603A27D603C580ACE6B50C5A0ADC0CB97D0F19
+ AEAEF66788C9694235C0D6580DAC70F3DE530CF1418E0CB88063F17D86B3270F
+ 324C2E9267C88DF3441860A4A9C0B0EFF80506171B230C4D319DEF50F8113E1A
+ 0CA5B53319182E64A006A28EBA0A565B4BE6FD61C88B85C83D7EF98FE1EBD76F
+ 60767BDF4AB0216003A4440518AEDD7E80D580054715C006BC7ACFC2F0EBF76F
+ 862F5FBE8231883D73FE4E880BFAA62EC2AAD9C2DA99E1D4536D86A42019860F
+ 5FD9E19ABF7CFDCA307FE97E880B180800E3F4EBFF4101070389D18E70CDF0A4
+ 4C34309801C9A950CDE41980A4190400B843EED8DFC8CDA30000000049454E44
+ AE426082}
+ Name = 'PngImage29'
+ Background = clWindow
end>
Bitmap = {}
end
diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
index 8b6bbbff..e7832cc7 100644
--- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
+++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas
@@ -40,6 +40,7 @@ type
procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false);
procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false);
+ procedure EnviarFacturaPorEMail(AFactura : IBizFacturaCliente);
procedure RecalcularImportes(AFactura: IBizFacturaCliente);
@@ -103,6 +104,7 @@ type
procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false);
procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false);
+ procedure EnviarFacturaPorEMail(AFactura : IBizFacturaCliente);
procedure RecalcularImportes(AFactura: IBizFacturaCliente);
function EsModificable(AFactura: IBizFacturaCliente; var AComentario: Variant): Boolean;
@@ -122,14 +124,15 @@ type
implementation
uses
- Windows, uDateUtils, uNumUtils, Controls, cxControls, DB, uEditorRegistryUtils, schFacturasClienteClient_Intf,
+ uDateUtils, uNumUtils, Controls, cxControls, DB, uEditorRegistryUtils, schFacturasClienteClient_Intf,
uBizContactos, uIEditorFacturasCliente, uIEditorFacturaCliente, uFactuGES_App,
uDataModuleFacturasCliente, uBizDetallesFacturaCliente, uControllerDetallesBase,
uDataModuleUsuarios, uDAInterfaces, uDataTableUtils, uAlbaranesClienteController,
schAlbaranesClienteClient_Intf, uROTypes, uDetallesAlbaranClienteController,
uBizDetallesAlbaranCliente, uFacturasClienteReportController, DateUtils, Forms,
Dialogs, uIntegerListUtils, uFormasPagoController, uBizFormasPago, uIEditorElegirFacturasCliente,
- uBizEjercicios, uRecibosClienteController, uBizRecibosCliente;
+ uBizEjercicios, uRecibosClienteController, uBizRecibosCliente,
+ uSistemaFunc, uEMailUtils, uDialogElegirEMail;
procedure CopiarArticulosAlbaran(AOrigen: IBizDetallesAlbaranCliente;
@@ -850,6 +853,49 @@ begin
end;
end;
+procedure TFacturasClienteController.EnviarFacturaPorEMail(AFactura: IBizFacturaCliente);
+var
+ AReportController : IFacturasClienteReportController;
+ AFicheroTMP : TFileName;
+ AEMail : String;
+ AListaEmail : TStringList;
+begin
+ if not Assigned(AFactura) then
+ raise Exception.Create ('Factura no asignado (EnviarFacturaPorEMail)');
+
+ if AFactura.DataTable.Active then
+ AFactura.DataTable.Active := True;
+
+ AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(AFactura.REFERENCIA));
+
+ AListaEmail := TStringList.Create;
+ try
+ RecuperarCliente(AFactura);
+ AFactura.Cliente.DataTable.Active := True;
+
+ if not AFactura.Cliente.EMAIL_1IsNull then
+ AListaEmail.Add(AFactura.Cliente.EMAIL_1);
+ if not AFactura.Cliente.EMAIL_2IsNull then
+ AListaEmail.Add(AFactura.Cliente.EMAIL_2);
+
+ if not ElegirEMail(AListaEmail, AEMail) then
+ Exit;
+ finally
+ FreeANDNIL(AListaEmail);
+ end;
+
+ ShowHourglassCursor;
+ AReportController := TFacturasClienteReportController.Create;
+ try
+ AReportController.ExportToPDF(AFactura.ID, AFicheroTMP);
+ SendMailMAPI('Factura ' + AFactura.REFERENCIA, '', AFicheroTMP, '', '', AFactura.Cliente.NOMBRE, AEMail);
+ finally
+ DeleteFile(AFicheroTMP);
+ AReportController := NIL;
+ HideHourglassCursor;
+ end;
+end;
+
function TFacturasClienteController.EsEliminable(AFactura: IBizFacturaCliente; var AComentario: Variant): Boolean;
begin
Result := True;
diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas
index 54dd1b5f..85b49b0c 100644
--- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas
+++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas
@@ -12,6 +12,7 @@ type
['{A0F41767-4FF6-4BAE-9FC9-894DD721D756}']
procedure Preview(const AListaID : TIntegerList);
procedure Print(const AListaID : TIntegerList);
+ function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
end;
TFacturasClienteReportController = class(TControllerBase, IFacturasClienteReportController)
@@ -24,6 +25,7 @@ type
procedure Preview(const AListaID : TIntegerList);
procedure Print(const AListaID : TIntegerList);
+ function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
end;
@@ -31,7 +33,8 @@ implementation
uses
uROTypes, uEditorRegistryUtils, uIEditorFacturasClientePreview,
- uEditorPreview, uDataModuleFacturasCliente, uEditorBase, cxControls;
+ uEditorPreview, uDataModuleFacturasCliente, uEditorBase, cxControls,
+ uStringsUtils;
{ TFacturasClienteReportController }
@@ -54,6 +57,29 @@ begin
inherited;
end;
+function TFacturasClienteReportController.ExportToPDF(const AID: Integer;
+ const AFileName: String): Boolean;
+var
+ AStream: Binary;
+begin
+ Result := False;
+ if EsCadenaVacia(AFileName) then
+ Exit;
+
+ ShowHourglassCursor;
+ try
+ AStream := FDataModule.GetRptPDFFactura(AID);
+ try
+ AStream.SaveToFile(AFileName);
+ Result := True;
+ finally
+ FreeAndNil(AStream);
+ end;
+ finally
+ HideHourglassCursor;
+ end;
+end;
+
procedure TFacturasClienteReportController.Preview(const AListaID : TIntegerList);
var
AStream: Binary;
diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas
index c843e620..1741e1be 100644
--- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas
+++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas
@@ -34,6 +34,7 @@ type
// Report
function GetReport(const AListaID: TIntegerList): Binary;
+ function GetRptPDFFactura(const AID: Integer): Binary;
end;
implementation
@@ -64,6 +65,20 @@ begin
end;
end;
+function TDataModuleFacturasCliente.GetRptPDFFactura(const AID: Integer): Binary;
+var
+ AParam : TIntegerArray;
+begin
+ AParam := TIntegerArray.Create;
+ try
+ AParam.Add(AID);
+ Result := (RORemoteService as IsrvFacturasCliente).GenerarInformeEnPDF(AParam)
+ finally
+ FreeANDNIL(AParam)
+ end;
+
+end;
+
function TDataModuleFacturasCliente.NewItem: IBizFacturaCliente;
begin
Result := GetItem(ID_NULO)
diff --git a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj
index 12990993..5f50fe12 100644
--- a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj
+++ b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj
@@ -21,6 +21,8 @@
+
+
@@ -231,14 +233,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas b/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas
index 22b4f5b8..afd4aa57 100644
--- a/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas
+++ b/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas
@@ -9,6 +9,7 @@ type
IDataModuleFacturasClienteReport = interface
['{F498AC70-AA38-4C06-B301-85A4AC0B210B}']
function GetReport(const AListaID: TIntegerList): Binary;
+ function GetRptPDFFactura(const AID: Integer): Binary;
end;
implementation
diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm
index 6fb3a6c2..235357ca 100644
--- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm
+++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm
@@ -1689,4 +1689,26 @@ object RptFacturasCliente: TRptFacturasCliente
Left = 584
Top = 192
end
+ object frxPDFExport1: TfrxPDFExport
+ ShowDialog = False
+ UseFileCache = True
+ ShowProgress = False
+ OverwritePrompt = False
+ PrintOptimized = True
+ Outline = False
+ Background = False
+ HTMLTags = True
+ Author = 'FactuGES'
+ Subject = 'FactuGES'
+ Creator = 'FactuGES'
+ ProtectionFlags = [ePrint, eModify, eCopy, eAnnot]
+ HideToolbar = False
+ HideMenubar = False
+ HideWindowUI = False
+ FitWindow = False
+ CenterWindow = False
+ PrintScaling = False
+ Left = 256
+ Top = 344
+ end
end
diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas
index 27d29c2f..244636fd 100644
--- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas
+++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas
@@ -8,7 +8,7 @@ uses
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
uDAInterfaces, uDADataStreamer, uDABin2DataStreamer, uDAMemDataTable,
- FactuGES_Intf;
+ FactuGES_Intf, frxExportPDF;
type
TRptFacturasCliente = class(TDataModule)
@@ -37,6 +37,7 @@ type
DADSInformeListadoFacturasResumen: TDADataSource;
frxDBInformeListadoFacturasResumen: TfrxDBDataset;
schReport: TDASchema;
+ frxPDFExport1: TfrxPDFExport;
procedure DataModuleCreate(Sender: TObject);
procedure DataModuleDestroy(Sender: TObject);
private
@@ -62,6 +63,7 @@ type
public
function GenerarFactura(const ListaID : TIntegerArray): Binary; overload;
+ function GenerarFacturaEnPDF(const ListaID : TIntegerArray): Binary;
function GenerarInformeIVA(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
function GenerarInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
@@ -119,6 +121,23 @@ begin
end;
end;
+function TRptFacturasCliente.GenerarFacturaEnPDF(
+ const ListaID: TIntegerArray): Binary;
+var
+ i: Integer;
+begin
+ 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;
+
function TRptFacturasCliente.GenerarInformeIVA(const IdEmpresa: Integer; const FechaInicio,
FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean;
const ImporteMinimo: Currency): Binary;
diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas
index 5c4c622d..52856065 100644
--- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas
+++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas
@@ -36,6 +36,7 @@ type
protected
{ IsrvFacturasCliente methods }
function GenerateReport(const FacturaID: TIntegerArray): Binary;
+ function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary;
end;
implementation
@@ -77,6 +78,19 @@ begin
ConnectionName := dmServer.ConnectionName;
end;
+function TsrvFacturasCliente.GenerarInformeEnPDF(
+ const ListaID: TIntegerArray): Binary;
+var
+ AReportGenerator : TRptFacturasCliente;
+begin
+ AReportGenerator := TRptFacturasCliente.Create(nil);
+ try
+ Result := AReportGenerator.GenerarFacturaEnPDF(ListaID);
+ finally
+ FreeAndNIL(AReportGenerator);
+ end;
+end;
+
function TsrvFacturasCliente.GenerateReport(const FacturaID: TIntegerArray): Binary;
var
AReportGenerator : TRptFacturasCliente;
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm
index d979796c..86c45136 100644
--- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm
+++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm
@@ -56,6 +56,10 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
inherited TBXItem2: TTBXItem
Visible = False
end
+ object TBXItem41: TTBXItem [13]
+ Action = actEnviarMail
+ DisplayMode = nbdmImageAndText
+ end
end
inherited tbxFiltro: TTBXToolbar
ExplicitWidth = 431
@@ -200,12 +204,16 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
+ ExplicitWidth = 144
+ Width = 144
end
inherited edtFechaFinFiltro: TcxDateEdit
+ Left = 301
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
+ ExplicitLeft = 301
ExplicitWidth = 263
Width = 263
end
@@ -281,6 +289,13 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
ImageIndex = 25
OnExecute = actInformesExecute
end
+ object actEnviarMail: TAction
+ Category = 'Archivo'
+ Caption = 'Enviar por e-mail'
+ ImageIndex = 26
+ OnExecute = actEnviarMailExecute
+ OnUpdate = actEnviarMailUpdate
+ end
end
inherited SmallImages: TPngImageList [5]
PngImages = <
@@ -1026,6 +1041,27 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente
41A130430000000049454E44AE426082}
Name = 'PngImage25'
Background = clWindow
+ end
+ item
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 610000000970485973000017120000171201679FD252000001964944415478DA
+ 636440038B371DFFCF8005C4FA5932621347115CB2F9D8FF30075154053F3F30
+ 30FC7CCF6096B49EE1FCCEE98C380D58B9F5F0FF403B09AC9A61B469C1050C43
+ C09C659B8FFE0F7110C3AB194CFFFAC0E0D2FD9B61FFEA1EB8218C203F873B8A
+ 10A59911C806F18DBB85E02E011BF0E1C30786F44015A234671F0B653871742F
+ AA0131BE160C5316EF60C8F012012B9AB1F72F8A8BB2153782C5A73E4B00F3E7
+ 2DDD846A80BF93215862E1BAFD603A27D603C580ACE6B50C5A0ADC0CB97D0F19
+ AEAEF66788C9694235C0D6580DAC70F3DE530CF1418E0CB88063F17D86B3270F
+ 324C2E9267C88DF3441860A4A9C0B0EFF80506171B230C4D319DEF50F8113E1A
+ 0CA5B53319182E64A006A28EBA0A565B4BE6FD61C88B85C83D7EF98FE1EBD76F
+ 60767BDF4AB0216003A4440518AEDD7E80D580054715C006BC7ACFC2F0EBF76F
+ 862F5FBE8231883D73FE4E880BFAA62EC2AAD9C2DA99E1D4536D86A42019860F
+ 5FD9E19ABF7CFDCA307FE97E880B180800E3F4EBFF4101070389D18E70CDF0A4
+ 4C34309801C9A950CDE41980A4190400B843EED8DFC8CDA30000000049454E44
+ AE426082}
+ Name = 'PngImage26'
+ Background = clWindow
end>
Left = 395
Bitmap = {}
diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas
index d4dfd512..6537e9ea 100644
--- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas
+++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas
@@ -34,13 +34,17 @@ type
JsListaFacturasNoEliminadas: TJSDialog;
actInformes: TAction;
JSInformesDialog: TJSDialog;
- TBXItem40: TTBXItem;
+ TBXItem40: TTBXItem;
+ actEnviarMail: TAction;
+ TBXItem41: TTBXItem;
procedure FormShow(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject);
procedure actNuevaFacturaExecute(Sender: TObject);
procedure actNuevoAbonoExecute(Sender: TObject);
procedure actInformesExecute(Sender: TObject);
procedure OnListaAnosChange(Sender: TObject; const Text: string);
+ procedure actEnviarMailUpdate(Sender: TObject);
+ procedure actEnviarMailExecute(Sender: TObject);
private
FFacturas: IBizFacturaCliente;
@@ -89,6 +93,22 @@ begin
(Sender as TAction).Enabled := (FFacturas.SITUACION = 'PENDIENTE');
end;
+procedure TfEditorFacturasCliente.actEnviarMailExecute(Sender: TObject);
+begin
+ inherited;
+ FController.EnviarFacturaPorEMail(FFacturas);
+end;
+
+procedure TfEditorFacturasCliente.actEnviarMailUpdate(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 TfEditorFacturasCliente.actInformesExecute(Sender: TObject);
var
Respuesta : Integer;
diff --git a/Source/Modulos/Pedidos a proveedor/Controller/PedidosProveedor_controller.dproj b/Source/Modulos/Pedidos a proveedor/Controller/PedidosProveedor_controller.dproj
index a65d873e..f8b49883 100644
--- a/Source/Modulos/Pedidos a proveedor/Controller/PedidosProveedor_controller.dproj
+++ b/Source/Modulos/Pedidos a proveedor/Controller/PedidosProveedor_controller.dproj
@@ -49,11 +49,11 @@
MainSource
-
-
-
-
-
+
+
+
+
+
diff --git a/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas b/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas
index 6019d5ab..a6239128 100644
--- a/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas
+++ b/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorController.pas
@@ -45,6 +45,7 @@ type
procedure Preview(APedido : IBizPedidoProveedor; AllItems: Boolean = false);
procedure Print(APedido : IBizPedidoProveedor; AllItems: Boolean = false);
+ procedure EnviarPedidoPorEMail(APedido : IBizPedidoProveedor);
procedure RecalcularImportes(APedido: IBizPedidoProveedor);
function EsModificable(APedido : IBizPedidoProveedor): Boolean;
@@ -118,6 +119,7 @@ type
procedure Preview(APedido : IBizPedidoProveedor; AllItems: Boolean = false);
procedure Print(APedido : IBizPedidoProveedor; AllItems: Boolean = false);
+ procedure EnviarPedidoPorEMail(APedido : IBizPedidoProveedor);
procedure RecalcularImportes(APedido: IBizPedidoProveedor);
function EsModificable(APedido : IBizPedidoProveedor): Boolean;
@@ -141,7 +143,7 @@ uses
schPedidosProveedorClient_Intf, uDAInterfaces, uPedidosProveedorReportController,
uDateUtils, uIEditorPedidoProveedor, uIEditorElegirPedidosProveedor,
Dialogs, uIEditorDireccionEntregaPedidoProveedor, Classes, FactuGES_Intf,
- uIEditorSituacionPedidoProveedor, Variants, uStringsUtils;
+ uIEditorSituacionPedidoProveedor, Variants, uStringsUtils, uSistemaFunc, uEMailUtils, uDialogElegirEMail;
{ TPedidosProveedorController }
@@ -596,6 +598,49 @@ begin
end;
end;
+procedure TPedidosProveedorController.EnviarPedidoPorEMail(APedido: IBizPedidoProveedor);
+var
+ AReportController : IPedidosProveedorReportController;
+ AFicheroTMP : TFileName;
+ AEMail : String;
+ AListaEmail : TStringList;
+begin
+ if not Assigned(APedido) then
+ raise Exception.Create ('Pedido no asignado (EnviarPedidoPorEMail)');
+
+ if APedido.DataTable.Active then
+ APedido.DataTable.Active := True;
+
+ AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(APedido.REFERENCIA));
+
+ AListaEmail := TStringList.Create;
+ try
+ RecuperarProveedor(APedido);
+ APedido.Proveedor.DataTable.Active := True;
+
+ if not APedido.Proveedor.EMAIL_1IsNull then
+ AListaEmail.Add(APedido.Proveedor.EMAIL_1);
+ if not APedido.Proveedor.EMAIL_2IsNull then
+ AListaEmail.Add(APedido.Proveedor.EMAIL_2);
+
+ if not ElegirEMail(AListaEmail, AEMail) then
+ Exit;
+ finally
+ FreeANDNIL(AListaEmail);
+ end;
+
+ ShowHourglassCursor;
+ AReportController := TPedidosProveedorReportController.Create;
+ try
+ AReportController.ExportToPDF(APedido.ID, AFicheroTMP);
+ SendMailMAPI('Pedido ' + APedido.REFERENCIA, '', AFicheroTMP, '', '', APedido.Proveedor.NOMBRE, AEMail);
+ finally
+ DeleteFile(AFicheroTMP);
+ AReportController := NIL;
+ HideHourglassCursor;
+ end;
+end;
+
function TPedidosProveedorController.EsEliminable(APedido: IBizPedidoProveedor): Boolean;
begin
if not Assigned(APedido) then
diff --git a/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorReportController.pas b/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorReportController.pas
index 49c968ae..81cb7325 100644
--- a/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorReportController.pas
+++ b/Source/Modulos/Pedidos a proveedor/Controller/uPedidosProveedorReportController.pas
@@ -12,6 +12,7 @@ type
['{D0686358-251C-43C4-9927-6112F2F4D3B8}']
procedure Preview(const AID : String);
procedure Print(const AID : String);
+ function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
end;
TPedidosProveedorReportController = class(TControllerBase, IPedidosProveedorReportController)
@@ -24,6 +25,7 @@ type
procedure Preview(const AID : String);
procedure Print(const AID : String);
+ function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
end;
@@ -31,7 +33,8 @@ implementation
uses
uROTypes, uEditorRegistryUtils, uIEditorPedidosProveedorPreview,
- uEditorPreview, uDataModulePedidosProveedor, uEditorBase, cxControls;
+ uEditorPreview, uDataModulePedidosProveedor, uEditorBase, cxControls,
+ uFactuGES_App, uStringsUtils, uSistemaFunc;
{ TPedidosProveedorReportController }
@@ -54,6 +57,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.GetRptPDFPedido(AID);
+ try
+ AStream.SaveToFile(AFileName);
+ Result := True;
+ finally
+ FreeAndNil(AStream);
+ end;
+ finally
+ HideHourglassCursor;
+ end;
+end;
+
procedure TPedidosProveedorReportController.Preview(const AID : String);
var
AStream: Binary;
diff --git a/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.pas b/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.pas
index bd06d2be..685aa837 100644
--- a/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.pas
+++ b/Source/Modulos/Pedidos a proveedor/Data/uDataModulePedidosProveedor.pas
@@ -38,6 +38,7 @@ type
// Report
function GetReport(const AID: String): Binary;
+ function GetRptPDFPedido(const AID: Integer): Binary;
end;
implementation
@@ -66,6 +67,19 @@ begin
Result := (RORemoteService as IsrvPedidosProveedor).GenerateReport(AID)
end;
+function TDataModulePedidosProveedor.GetRptPDFPedido(const AID: Integer): Binary;
+var
+ AParam : TIntegerArray;
+begin
+ AParam := TIntegerArray.Create;
+ try
+ AParam.Add(AID);
+ Result := (RORemoteService as IsrvPedidosProveedor).GenerarInformeEnPDF(AParam)
+ finally
+ FreeANDNIL(AParam)
+ end;
+end;
+
function TDataModulePedidosProveedor.NewItem: IBizPedidoProveedor;
begin
Result := GetItem(ID_NULO)
diff --git a/Source/Modulos/Pedidos a proveedor/Model/Data/uIDataModulePedidosProveedorReport.pas b/Source/Modulos/Pedidos a proveedor/Model/Data/uIDataModulePedidosProveedorReport.pas
index d0f80122..be5bc311 100644
--- a/Source/Modulos/Pedidos a proveedor/Model/Data/uIDataModulePedidosProveedorReport.pas
+++ b/Source/Modulos/Pedidos a proveedor/Model/Data/uIDataModulePedidosProveedorReport.pas
@@ -9,6 +9,7 @@ type
IDataModulePedidosProveedorReport = interface
['{3B7564E3-8DFD-4976-BBE8-6EF13185B209}']
function GetReport(const AID: String): Binary;
+ function GetRptPDFPedido(const AID: Integer): Binary;
end;
implementation
diff --git a/Source/Modulos/Pedidos a proveedor/PedidosProveedor_Group.groupproj b/Source/Modulos/Pedidos a proveedor/PedidosProveedor_Group.groupproj
index f27ad35c..74c694ac 100644
--- a/Source/Modulos/Pedidos a proveedor/PedidosProveedor_Group.groupproj
+++ b/Source/Modulos/Pedidos a proveedor/PedidosProveedor_Group.groupproj
@@ -19,6 +19,7 @@
+
@@ -211,14 +212,23 @@
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Pedidos a proveedor/Reports/uRptPedidosProveedor_Server.dfm b/Source/Modulos/Pedidos a proveedor/Reports/uRptPedidosProveedor_Server.dfm
index 884d23f1..bea00dd6 100644
--- a/Source/Modulos/Pedidos a proveedor/Reports/uRptPedidosProveedor_Server.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Reports/uRptPedidosProveedor_Server.dfm
@@ -1,8 +1,8 @@
object RptPedidosProveedor: TRptPedidosProveedor
OldCreateOrder = True
OnCreate = DataModuleCreate
- Height = 405
- Width = 447
+ Height = 610
+ Width = 670
object DADataCabecera: TDADataSource
DataSet = tbl_Cabecera.Dataset
DataTable = tbl_Cabecera
@@ -90,22 +90,23 @@ object RptPedidosProveedor: TRptPedidosProveedor
SQL =
'SELECT'#10' V_PEDIDOS_PROVEEDOR.ID,'#10' V_PEDIDOS_PROVEEDOR.ID_EMPRES' +
'A,'#10' V_PEDIDOS_PROVEEDOR.REFERENCIA,'#10' V_PEDIDOS_PROVEEDOR.FECHA' +
- '_PEDIDO,'#10' V_PEDIDOS_PROVEEDOR.OBSERVACIONES,'#10' V_PROVEEDORES.NO' +
- 'MBRE,'#10' V_PROVEEDORES.FAX,'#10#10' V_CONTRATOS_CLIENTE.NOMBRE AS NOMB' +
- 'RE_CLIENTE,'#10' V_CONTRATOS_CLIENTE.CALLE,'#10' V_CONTRATOS_CLIENTE.P' +
- 'OBLACION,'#10' V_CONTRATOS_CLIENTE.PROVINCIA,'#10' V_CONTRATOS_CLIENTE' +
- '.CODIGO_POSTAL,'#10' V_CONTRATOS_CLIENTE.PERSONA_CONTACTO,'#10' V_CONT' +
- 'RATOS_CLIENTE.TELEFONO,'#10#10' EMPRESAS.NIF_CIF AS NIF_CIF_EMPRESA,'#10 +
- ' EMPRESAS.NOMBRE AS NOMBRE_EMPRESA,'#10' EMPRESAS.RAZON_SOCIAL AS ' +
- 'RAZON_SOCIAL_EMPRESA,'#10' EMPRESAS.TELEFONO_1 AS TELEFONO_1_EMPRES' +
- 'A,'#10' EMPRESAS.FAX AS FAX_EMPRESA,'#10' EMPRESAS.MOVIL_1 AS MOVIL_1_' +
- 'EMPRESA,'#10' EMPRESAS.EMAIL_1 AS EMAIL_1_EMPRESA,'#10' EMPRESAS.PAGIN' +
- 'A_WEB AS PAGINA_WEB_EMPRESA'#10'FROM'#10' V_PEDIDOS_PROVEEDOR'#10' LEFT OU' +
- 'TER JOIN V_PROVEEDORES ON (V_PROVEEDORES.ID = V_PEDIDOS_PROVEEDO' +
- 'R.ID_PROVEEDOR)'#10' LEFT OUTER JOIN V_CONTRATOS_CLIENTE ON (V_CONT' +
- 'RATOS_CLIENTE.ID = V_PEDIDOS_PROVEEDOR.ID_CONTRATO_CLIENTE)'#10' LE' +
- 'FT OUTER JOIN EMPRESAS ON (EMPRESAS.ID = V_PEDIDOS_PROVEEDOR.ID_' +
- 'EMPRESA)'#10'WHERE V_PEDIDOS_PROVEEDOR.ID = :ID'#10
+ '_PEDIDO,'#10' V_PEDIDOS_PROVEEDOR.FECHA_ENTREGA,'#10' V_PEDIDOS_PROVEE' +
+ 'DOR.OBSERVACIONES,'#10' V_PROVEEDORES.NOMBRE,'#10' V_PROVEEDORES.FAX,'#10 +
+ #10' V_CONTRATOS_CLIENTE.NOMBRE AS NOMBRE_CLIENTE,'#10' V_CONTRATOS_C' +
+ 'LIENTE.CALLE,'#10' V_CONTRATOS_CLIENTE.POBLACION,'#10' V_CONTRATOS_CLI' +
+ 'ENTE.PROVINCIA,'#10' V_CONTRATOS_CLIENTE.CODIGO_POSTAL,'#10' V_CONTRAT' +
+ 'OS_CLIENTE.PERSONA_CONTACTO,'#10' V_CONTRATOS_CLIENTE.TELEFONO,'#10#10' ' +
+ 'EMPRESAS.NIF_CIF AS NIF_CIF_EMPRESA,'#10' EMPRESAS.NOMBRE AS NOMBRE' +
+ '_EMPRESA,'#10' EMPRESAS.RAZON_SOCIAL AS RAZON_SOCIAL_EMPRESA,'#10' EMP' +
+ 'RESAS.TELEFONO_1 AS TELEFONO_1_EMPRESA,'#10' EMPRESAS.FAX AS FAX_EM' +
+ 'PRESA,'#10' EMPRESAS.MOVIL_1 AS MOVIL_1_EMPRESA,'#10' EMPRESAS.EMAIL_1' +
+ ' AS EMAIL_1_EMPRESA,'#10' EMPRESAS.PAGINA_WEB AS PAGINA_WEB_EMPRESA' +
+ #10'FROM'#10' V_PEDIDOS_PROVEEDOR'#10' LEFT OUTER JOIN V_PROVEEDORES ON (' +
+ 'V_PROVEEDORES.ID = V_PEDIDOS_PROVEEDOR.ID_PROVEEDOR)'#10' LEFT OUTE' +
+ 'R JOIN V_CONTRATOS_CLIENTE ON (V_CONTRATOS_CLIENTE.ID = V_PEDIDO' +
+ 'S_PROVEEDOR.ID_CONTRATO_CLIENTE)'#10' LEFT OUTER JOIN EMPRESAS ON (' +
+ 'EMPRESAS.ID = V_PEDIDOS_PROVEEDOR.ID_EMPRESA)'#10'WHERE V_PEDIDOS_PR' +
+ 'OVEEDOR.ID = :ID'#10
StatementType = stSQL
ColumnMappings = <
item
@@ -196,6 +197,10 @@ object RptPedidosProveedor: TRptPedidosProveedor
DatasetField = 'NOMBRE_CLIENTE'
TableField = ''
SQLOrigin = 'NOMBRE_CLIENTE'
+ end
+ item
+ DatasetField = 'FECHA_ENTREGA'
+ TableField = 'FECHA_ENTREGA'
end>
end>
Name = 'Informe_Cabecera'
@@ -217,6 +222,10 @@ object RptPedidosProveedor: TRptPedidosProveedor
Name = 'FECHA_PEDIDO'
DataType = datDateTime
end
+ item
+ Name = 'FECHA_ENTREGA'
+ DataType = datDateTime
+ end
item
Name = 'OBSERVACIONES'
DataType = datMemo
@@ -477,4 +486,26 @@ object RptPedidosProveedor: TRptPedidosProveedor
Left = 344
Top = 16
end
+ object frxPDFExport1: TfrxPDFExport
+ ShowDialog = False
+ UseFileCache = True
+ ShowProgress = False
+ OverwritePrompt = False
+ PrintOptimized = True
+ Outline = False
+ Background = False
+ HTMLTags = True
+ Author = 'FactuGES'
+ Subject = 'FactuGES'
+ Creator = 'FactuGES'
+ ProtectionFlags = [ePrint, eModify, eCopy, eAnnot]
+ HideToolbar = False
+ HideMenubar = False
+ HideWindowUI = False
+ FitWindow = False
+ CenterWindow = False
+ PrintScaling = False
+ Left = 360
+ Top = 352
+ end
end
diff --git a/Source/Modulos/Pedidos a proveedor/Reports/uRptPedidosProveedor_Server.pas b/Source/Modulos/Pedidos a proveedor/Reports/uRptPedidosProveedor_Server.pas
index d41c8a46..aa507565 100644
--- a/Source/Modulos/Pedidos a proveedor/Reports/uRptPedidosProveedor_Server.pas
+++ b/Source/Modulos/Pedidos a proveedor/Reports/uRptPedidosProveedor_Server.pas
@@ -7,7 +7,7 @@ uses
Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
- uDAInterfaces, uDADataStreamer;
+ uDAInterfaces, uDADataStreamer, frxExportPDF, FactuGES_Intf;
type
TRptPedidosProveedor = class(TDataModule)
@@ -26,15 +26,17 @@ type
frxDBCabecera: TfrxDBDataset;
frxDBDetalles: TfrxDBDataset;
frxReport: TfrxReport;
+ frxPDFExport1: TfrxPDFExport;
schReport: TDASchema;
DataDictionary: TDADataDictionary;
procedure DataModuleCreate(Sender: TObject);
procedure frxReportGetValue(const VarName: string; var Value: Variant);
private
FConnection: IDAConnection;
- procedure GenerarPedido(const AID : Integer); overload;
+ procedure _GenerarPedido(const AID : Integer); overload;
public
function GenerarPedido(const AID : String): Binary; overload;
+ function GenerarPedidoEnPDF(const ListaID : TIntegerArray): Binary;
end;
implementation
@@ -59,7 +61,7 @@ procedure TRptPedidosProveedor.DataModuleCreate(Sender: TObject);
begin
schReport.ConnectionManager := dmServer.ConnectionManager;
FConnection := dmServer.DarNuevaConexion;
- frxReport.EngineOptions.NewSilentMode := simReThrow;
+ frxReport.EngineOptions.NewSilentMode := simReThrow;
end;
function TRptPedidosProveedor.GenerarPedido(const AID: String): Binary;
@@ -77,7 +79,7 @@ begin
//Vamos generando todos y cada uno de los albaranes recibidos
for i := 0 to ID_Pedidos.Count - 1 do
- GenerarPedido(StrToInt(ID_Pedidos.Strings[i]));
+ _GenerarPedido(StrToInt(ID_Pedidos.Strings[i]));
frxReport.PreviewPages.SaveToStream(Result);
@@ -86,6 +88,23 @@ begin
end;
end;
+function TRptPedidosProveedor.GenerarPedidoEnPDF(
+ const ListaID: TIntegerArray): Binary;
+var
+ i: Integer;
+begin
+ Result := Binary.Create;
+ try
+ //Vamos generando todos y cada uno de los presupuestos recibidos
+ for i := 0 to ListaID.Count - 1 do
+ _GenerarPedido(ListaID.Items[i]);
+
+ frxPDFExport1.Stream := Result;
+ frxReport.Export(frxPDFExport1)
+ finally
+ end;
+end;
+
procedure TRptPedidosProveedor.frxReportGetValue(const VarName: string;
var Value: Variant);
begin
@@ -95,7 +114,7 @@ begin
Value := False;
end;
-procedure TRptPedidosProveedor.GenerarPedido(const AID: Integer);
+procedure TRptPedidosProveedor._GenerarPedido(const AID: Integer);
var
AStream: TMemoryStream;
dsMaster: IDADataset;
diff --git a/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.pas b/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.pas
index fa6255dc..a4f29c4f 100644
--- a/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.pas
+++ b/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.pas
@@ -35,6 +35,7 @@ type
protected
{ IsrvPedidosProveedor methods }
function GenerateReport(const ID: String): Binary;
+ function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary;
end;
implementation
@@ -93,6 +94,19 @@ begin
ConnectionName := dmServer.ConnectionName;
end;
+function TsrvPedidosProveedor.GenerarInformeEnPDF(
+ const ListaID: TIntegerArray): Binary;
+var
+ AReportGenerator : TRptPedidosProveedor;
+begin
+ AReportGenerator := TRptPedidosProveedor.Create(nil);
+ try
+ Result := AReportGenerator.GenerarPedidoEnPDF(ListaID);
+ finally
+ FreeAndNIL(AReportGenerator);
+ end;
+end;
+
function TsrvPedidosProveedor.GenerateReport(const ID: String): Binary;
var
AReportGenerator : TRptPedidosProveedor;
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm
index 05daa65e..8b5ea9a6 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.dfm
@@ -2,19 +2,19 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
Left = 332
Top = 147
Caption = 'Nuevo pedido a proveedor'
- ClientHeight = 431
- ClientWidth = 717
+ ClientHeight = 668
+ ClientWidth = 922
OnClose = CustomEditorClose
- ExplicitWidth = 725
- ExplicitHeight = 465
+ ExplicitWidth = 930
+ ExplicitHeight = 702
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
- Width = 717
+ Width = 922
Caption = 'Nuevo pedido a proveedor'
- ExplicitWidth = 717
+ ExplicitWidth = 922
inherited Image1: TImage
- Left = 690
+ Left = 895
Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800
0000180806000000E0773DF80000000970485973000017120000171201679FD2
@@ -43,8 +43,8 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
end
end
inherited TBXDock: TTBXDock
- Width = 717
- ExplicitWidth = 717
+ Width = 922
+ ExplicitWidth = 922
inherited tbxMain: TTBXToolbar
ExplicitWidth = 330
inherited TBXItem2: TTBXItem
@@ -58,32 +58,211 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
end
end
inherited tbxMenu: TTBXToolbar
- ExplicitWidth = 717
+ ExplicitWidth = 922
end
end
inherited StatusBar: TJvStatusBar
- Top = 412
- Width = 717
+ Top = 649
+ Width = 922
Panels = <
item
Width = 200
end>
- ExplicitTop = 412
- ExplicitWidth = 717
+ ExplicitTop = 649
+ ExplicitWidth = 922
end
inherited pgPaginas: TPageControl
- Width = 711
- Height = 254
- ActivePage = pagDocumentos
+ Width = 916
+ Height = 491
TabOrder = 1
OnChanging = pgPaginasChanging
- ExplicitWidth = 711
- ExplicitHeight = 254
+ ExplicitWidth = 916
+ ExplicitHeight = 491
inherited pagGeneral: TTabSheet
ExplicitLeft = 4
ExplicitTop = 24
- ExplicitWidth = 703
- ExplicitHeight = 226
+ ExplicitWidth = 908
+ ExplicitHeight = 463
+ inline frViewPedidoProveedor1: TfrViewPedidoProveedor
+ Left = 0
+ Top = 0
+ Width = 908
+ Height = 463
+ Align = alClient
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 0
+ ReadOnly = False
+ ExplicitWidth = 908
+ ExplicitHeight = 463
+ inherited dxLayoutControl1: TdxLayoutControl
+ Width = 908
+ Height = 463
+ ExplicitWidth = 908
+ ExplicitHeight = 463
+ inherited frViewProveedorPedido: TfrViewDatosYSeleccionProveedor
+ Left = 413
+ ExplicitLeft = 413
+ inherited dxLayoutControl1: TdxLayoutControl
+ inherited edtlNombre: TcxDBTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
+ inherited edtNIFCIF: TcxDBTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
+ inherited edtCalle: TcxDBTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
+ inherited edtPoblacion: TcxDBTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
+ inherited edtProvincia: TcxDBTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
+ inherited edtCodigoPostal: TcxDBTextEdit
+ Left = 392
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ ExplicitLeft = 392
+ end
+ inherited Button3: TBitBtn
+ Left = 265
+ ExplicitLeft = 265
+ end
+ end
+ end
+ inherited edtFechaPedido: TcxDBDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
+ inherited edtFechaConfirmacion: TcxDBDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
+ inherited edtFechaEntrega: TcxDBDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
+ inherited eReferencia: TcxDBTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
+ inherited frViewDireccionEntregaPedidoProv1: TfrViewDireccionEntregaPedidoProv
+ Top = 306
+ ExplicitTop = 306
+ inherited dxLayoutControl1: TdxLayoutControl
+ inherited rdxDestino1: TRadioButton
+ Width = 253
+ ExplicitWidth = 253
+ end
+ inherited rdxDestino2: TRadioButton
+ Width = 253
+ ExplicitWidth = 253
+ end
+ inherited cbLista: TcxDBLookupComboBox
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ ExplicitWidth = 238
+ Width = 238
+ end
+ inherited bModificar: TBitBtn
+ Left = 206
+ Top = 109
+ ExplicitLeft = 206
+ ExplicitTop = 109
+ end
+ inherited txtDireccion: TStaticText
+ Width = 238
+ Height = 42
+ ExplicitWidth = 238
+ ExplicitHeight = 42
+ end
+ end
+ end
+ inherited cbFormaPago: TcxDBLookupComboBox
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
+ inherited bFormasPago: TButton
+ Left = 251
+ ExplicitLeft = 251
+ end
+ inherited edtFechaEnvio: TcxDBDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
+ inherited eReferenciaContratoCli: TcxTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
+ inherited Button1: TButton
+ Left = 251
+ ExplicitLeft = 251
+ end
+ inherited frViewTienda1: TfrViewTienda
+ Left = 413
+ ExplicitLeft = 413
+ inherited dxLayoutControl1: TdxLayoutControl
+ inherited cbTienda: TcxComboBox
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
+ end
+ end
+ inherited frViewObservaciones1: TfrViewObservaciones
+ Left = 413
+ ExplicitLeft = 413
+ inherited memObservaciones: TcxDBMemo
+ DataBinding.DataSource = frViewPedidoProveedor1.DADataSource
+ end
+ end
+ inherited edtlDescripcion: TcxDBTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ end
+ end
+ end
end
object pagContenido: TTabSheet
Caption = 'Contenido'
@@ -91,8 +270,8 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
inline frViewDetallesPedidoProveedor1: TfrViewDetallesPedidoProveedor
Left = 0
Top = 0
- Width = 703
- Height = 226
+ Width = 908
+ Height = 463
Align = alClient
BiDiMode = bdLeftToRight
Font.Charset = DEFAULT_CHARSET
@@ -104,17 +283,96 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
ParentFont = False
TabOrder = 0
ReadOnly = False
- ExplicitWidth = 703
- ExplicitHeight = 226
+ ExplicitWidth = 908
+ ExplicitHeight = 463
inherited ToolBar1: TToolBar
- Width = 703
- ExplicitWidth = 703
+ Width = 908
+ Height = 24
+ ExplicitWidth = 908
+ ExplicitHeight = 24
+ inherited ToolButton4: TToolButton
+ Wrap = False
+ end
+ inherited ToolButton14: TToolButton
+ Left = 334
+ Top = 0
+ ExplicitLeft = 334
+ ExplicitTop = 0
+ end
+ inherited FontName: TJvFontComboBox
+ Left = 368
+ Top = 0
+ ExplicitLeft = 368
+ ExplicitTop = 0
+ end
+ inherited FontSize: TEdit
+ Left = 513
+ Top = 0
+ ExplicitLeft = 513
+ ExplicitTop = 0
+ end
+ inherited UpDown1: TUpDown
+ Left = 555
+ Top = 0
+ ExplicitLeft = 555
+ ExplicitTop = 0
+ end
+ inherited ToolButton13: TToolButton
+ Left = 572
+ Top = 0
+ ExplicitLeft = 572
+ ExplicitTop = 0
+ end
+ inherited ToolButton6: TToolButton
+ Left = 580
+ Top = 0
+ ExplicitLeft = 580
+ ExplicitTop = 0
+ end
+ inherited ToolButton7: TToolButton
+ Left = 614
+ Top = 0
+ ExplicitLeft = 614
+ ExplicitTop = 0
+ end
+ inherited ToolButton8: TToolButton
+ Left = 648
+ Top = 0
+ ExplicitLeft = 648
+ ExplicitTop = 0
+ end
+ inherited ToolButton12: TToolButton
+ Left = 682
+ Top = 0
+ ExplicitLeft = 682
+ ExplicitTop = 0
+ end
+ inherited ToolButton9: TToolButton
+ Left = 690
+ Top = 0
+ ExplicitLeft = 690
+ ExplicitTop = 0
+ end
+ inherited ToolButton10: TToolButton
+ Left = 724
+ Top = 0
+ ExplicitLeft = 724
+ ExplicitTop = 0
+ end
+ inherited ToolButton11: TToolButton
+ Left = 758
+ Top = 0
+ ExplicitLeft = 758
+ ExplicitTop = 0
+ end
end
inherited cxGrid: TcxGrid
- Width = 703
- Height = 154
- ExplicitWidth = 703
- ExplicitHeight = 154
+ Top = 50
+ Width = 908
+ Height = 413
+ ExplicitTop = 50
+ ExplicitWidth = 908
+ ExplicitHeight = 413
inherited cxGridView: TcxGridDBTableView
inherited cxGridViewIMPORTENETO: TcxGridDBColumn
Options.Editing = True
@@ -122,8 +380,10 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
end
end
inherited TBXDock1: TTBXDock
- Width = 703
- ExplicitWidth = 703
+ Top = 24
+ Width = 908
+ ExplicitTop = 24
+ ExplicitWidth = 908
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 548
end
@@ -136,8 +396,8 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
inline frViewIncidenciasProv: TfrViewIncidencias
Left = 0
Top = 0
- Width = 703
- Height = 226
+ Width = 908
+ Height = 463
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -147,25 +407,25 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
ParentFont = False
TabOrder = 0
ReadOnly = False
- ExplicitWidth = 703
- ExplicitHeight = 226
+ ExplicitWidth = 908
+ ExplicitHeight = 463
inherited pnlSup: TPanel
- Width = 703
- ExplicitWidth = 703
+ Width = 908
+ ExplicitWidth = 908
inherited eIncidenciaActiva: TcxDBCheckBox
ExplicitHeight = 21
end
end
inherited GroupBox1: TGroupBox
- Width = 703
- Height = 198
- ExplicitWidth = 703
- ExplicitHeight = 198
+ Width = 908
+ Height = 435
+ ExplicitWidth = 908
+ ExplicitHeight = 435
inherited eIncidencias: TcxDBMemo
- ExplicitWidth = 699
- ExplicitHeight = 181
- Height = 181
- Width = 699
+ ExplicitWidth = 904
+ ExplicitHeight = 418
+ Height = 418
+ Width = 904
end
end
end
@@ -176,8 +436,8 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
inline frViewDocumentosPedidoProveedor1: TfrViewDocumentosPedidoProveedor
Left = 0
Top = 0
- Width = 703
- Height = 226
+ Width = 908
+ Height = 463
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -187,25 +447,25 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
ParentFont = False
TabOrder = 0
ReadOnly = False
- ExplicitWidth = 703
- ExplicitHeight = 226
+ ExplicitWidth = 908
+ ExplicitHeight = 463
inherited TBXDock: TTBXDock
- Width = 703
- ExplicitWidth = 703
+ Width = 908
+ ExplicitWidth = 908
end
inherited ListView1: TListView
- Width = 703
- Height = 203
- ExplicitWidth = 703
- ExplicitHeight = 203
+ Width = 908
+ Height = 440
+ ExplicitWidth = 908
+ ExplicitHeight = 440
end
end
end
end
inline frViewTotales1: TfrViewTotales [4]
Left = 0
- Top = 366
- Width = 717
+ Top = 603
+ Width = 922
Height = 46
Align = alBottom
Font.Charset = DEFAULT_CHARSET
@@ -216,26 +476,26 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
ParentFont = False
TabOrder = 5
ReadOnly = False
- ExplicitTop = 366
- ExplicitWidth = 717
+ ExplicitTop = 603
+ ExplicitWidth = 922
ExplicitHeight = 46
inherited dxLayoutControl1: TdxLayoutControl
- Width = 717
+ Width = 922
LookAndFeel = dxLayoutOfficeLookAndFeel1
- ExplicitWidth = 717
+ ExplicitWidth = 922
inherited Bevel3: TBevel
- Left = 356
+ Left = 453
Top = 11
Height = 30
- ExplicitLeft = 356
+ ExplicitLeft = 453
ExplicitTop = 11
ExplicitHeight = 30
end
inherited Bevel4: TBevel
- Left = 468
+ Left = 565
Top = 53
Width = 21
- ExplicitLeft = 468
+ ExplicitLeft = 565
ExplicitTop = 53
ExplicitWidth = 21
end
@@ -249,19 +509,19 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
Width = 93
end
inherited ImporteIVA: TcxDBCurrencyEdit
- Left = 539
+ Left = 636
Top = 88
Style.IsFontAssigned = True
- ExplicitLeft = 539
+ ExplicitLeft = 636
ExplicitTop = 88
ExplicitWidth = 137
Width = 137
end
inherited ImporteTotal: TcxDBCurrencyEdit
- Left = 469
+ Left = 566
Top = 142
Style.IsFontAssigned = True
- ExplicitLeft = 469
+ ExplicitLeft = 566
ExplicitTop = 142
ExplicitWidth = 137
Width = 137
@@ -274,37 +534,37 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
ExplicitTop = 38
end
inherited edtIVA: TcxDBSpinEdit
- Left = 468
+ Left = 565
Top = 88
Style.IsFontAssigned = True
- ExplicitLeft = 468
+ ExplicitLeft = 565
ExplicitTop = 88
end
inherited ImporteBase: TcxDBCurrencyEdit
- Left = 468
+ Left = 565
Top = 11
Style.IsFontAssigned = True
- ExplicitLeft = 468
+ ExplicitLeft = 565
ExplicitTop = 11
ExplicitWidth = 92
Width = 92
end
inherited edtRE: TcxDBSpinEdit
- Left = 468
+ Left = 565
Top = 115
DataBinding.DataField = ''
DataBinding.DataSource = nil
Style.IsFontAssigned = True
- ExplicitLeft = 468
+ ExplicitLeft = 565
ExplicitTop = 115
end
inherited ImporteRE: TcxDBCurrencyEdit
- Left = 539
+ Left = 636
Top = 115
DataBinding.DataField = ''
DataBinding.DataSource = nil
Style.IsFontAssigned = True
- ExplicitLeft = 539
+ ExplicitLeft = 636
ExplicitTop = 115
ExplicitWidth = 56
Width = 56
@@ -339,9 +599,9 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
Width = 81
end
inherited bTiposIVA: TButton
- Left = 208
+ Left = 305
Top = 92
- ExplicitLeft = 208
+ ExplicitLeft = 305
ExplicitTop = 92
end
inherited cbRecargoEquivalencia: TcxDBCheckBox
@@ -397,10 +657,10 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
end
end
inherited PnlComentario: TPanel [5]
- Width = 717
- ExplicitWidth = 717
+ Width = 922
+ ExplicitWidth = 922
inherited lbComentario: TLabel
- Width = 707
+ Width = 912
Height = 25
end
end
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.pas b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.pas
index f8f67bb1..c6b010a1 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.pas
+++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidoProveedor.pas
@@ -28,6 +28,7 @@ type
frViewTotales1: TfrViewTotales;
pagDocumentos: TTabSheet;
frViewDocumentosPedidoProveedor1: TfrViewDocumentosPedidoProveedor;
+ frViewPedidoProveedor1: TfrViewPedidoProveedor;
procedure FormShow(Sender: TObject);
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
@@ -91,7 +92,7 @@ var
AViewPedidoProveedor: TfrViewPedidoProveedor;
begin
- AViewPedidoProveedor := TfrViewPedidoProveedor.Create(Self);
+ AViewPedidoProveedor := frViewPedidoProveedor1;
with AViewPedidoProveedor do
begin
Parent := pagGeneral;
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm
index b112d930..0c4b1d07 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.dfm
@@ -47,6 +47,10 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
ExplicitWidth = 700
inherited tbxMain: TTBXToolbar
ExplicitWidth = 700
+ object TBXItem38: TTBXItem [12]
+ Action = actEnviarEMail
+ DisplayMode = nbdmImageAndText
+ end
end
inherited tbxMenu: TTBXToolbar
ExplicitWidth = 700
@@ -124,16 +128,30 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
Width = 700
ExplicitWidth = 700
inherited txtFiltroTodo: TcxTextEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 457
Width = 457
end
inherited edtFechaIniFiltro: TcxDateEdit
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 240
Width = 240
end
inherited edtFechaFinFiltro: TcxDateEdit
- Left = 349
- ExplicitLeft = 349
+ Left = 371
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ ExplicitLeft = 371
+ ExplicitWidth = 294
+ Width = 294
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
@@ -202,6 +220,13 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
OnExecute = actRecibirPedidoExecute
OnUpdate = actRecibirPedidoUpdate
end
+ object actEnviarEMail: TAction
+ Category = 'Archivo'
+ Caption = 'Enviar por e-mail'
+ ImageIndex = 24
+ OnExecute = actEnviarEMailExecute
+ OnUpdate = actEnviarEMailUpdate
+ end
end
inherited SmallImages: TPngImageList [5]
PngImages = <
@@ -740,6 +765,27 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
00000049454E44AE426082}
Name = 'PngImage23'
Background = clWindow
+ end
+ item
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 610000000970485973000017120000171201679FD252000001964944415478DA
+ 636440038B371DFFCF8005C4FA5932621347115CB2F9D8FF30075154053F3F30
+ 30FC7CCF6096B49EE1FCCEE98C380D58B9F5F0FF403B09AC9A61B469C1050C43
+ C09C659B8FFE0F7110C3AB194CFFFAC0E0D2FD9B61FFEA1EB8218C203F873B8A
+ 10A59911C806F18DBB85E02E011BF0E1C30786F44015A234671F0B653871742F
+ AA0131BE160C5316EF60C8F012012B9AB1F72F8A8BB2153782C5A73E4B00F3E7
+ 2DDD846A80BF93215862E1BAFD603A27D603C580ACE6B50C5A0ADC0CB97D0F19
+ AEAEF66788C9694235C0D6580DAC70F3DE530CF1418E0CB88063F17D86B3270F
+ 324C2E9267C88DF3441860A4A9C0B0EFF80506171B230C4D319DEF50F8113E1A
+ 0CA5B53319182E64A006A28EBA0A565B4BE6FD61C88B85C83D7EF98FE1EBD76F
+ 60767BDF4AB0216003A4440518AEDD7E80D580054715C006BC7ACFC2F0EBF76F
+ 862F5FBE8231883D73FE4E880BFAA62EC2AAD9C2DA99E1D4536D86A42019860F
+ 5FD9E19ABF7CFDCA307FE97E880B180800E3F4EBFF4101070389D18E70CDF0A4
+ 4C34309801C9A950CDE41980A4190400B843EED8DFC8CDA30000000049454E44
+ AE426082}
+ Name = 'PngImage24'
+ Background = clWindow
end>
Bitmap = {}
end
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas
index d197db35..c98e6baa 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas
+++ b/Source/Modulos/Pedidos a proveedor/Views/uEditorPedidosProveedor.pas
@@ -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;
@@ -86,6 +90,22 @@ begin
(Sender as TAction).Enabled := (FPedidos.SITUACION = SITUACION_PEDIDO_PENDIENTE);
end;
+procedure TfEditorPedidosProveedor.actEnviarEMailExecute(Sender: TObject);
+begin
+ inherited;
+ FController.EnviarPedidoPorEMail(FPedidos);
+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
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.dfm b/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.dfm
index c752e99c..6fa0c52e 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.dfm
@@ -11,6 +11,7 @@ inherited frViewDireccionEntregaPedidoProv: TfrViewDireccionEntregaPedidoProv
Align = alClient
ParentBackground = True
TabOrder = 0
+ TabStop = False
AutoContentSizes = [acsWidth, acsHeight]
DesignSize = (
586
@@ -47,8 +48,8 @@ inherited frViewDireccionEntregaPedidoProv: TfrViewDireccionEntregaPedidoProv
end>
Properties.ListOptions.AnsiSort = True
Properties.ListOptions.GridLines = glNone
- Properties.ListOptions.SyncMode = True
Properties.ListOptions.ShowHeader = False
+ Properties.ListOptions.SyncMode = True
Properties.ListSource = dsAlmacenes
Properties.PostPopupValueOnTab = True
Style.BorderColor = clWindowFrame
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.pas b/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.pas
index 10b0846e..787c1c92 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.pas
+++ b/Source/Modulos/Pedidos a proveedor/Views/uViewDireccionEntregaPedidoProv.pas
@@ -63,7 +63,7 @@ implementation
{$R *.dfm}
uses
- uEditorRegistryUtils, uCustomView;
+ uEditorRegistryUtils, uCustomView, uStringsUtils;
procedure TfrViewDireccionEntregaPedidoProv.actListaExecute(Sender: TObject);
begin
@@ -150,21 +150,26 @@ begin
txtDireccion.Caption := '';
if Assigned(FPedido) then
begin
+ txtDireccion.Enabled := True;
+ txtDireccion.Caption := FPedido.CALLE;
+ txtDireccion.Caption := txtDireccion.Caption + #13#10 + FPedido.CODIGO_POSTAL + ' ' + FPedido.POBLACION;
+ txtDireccion.Caption := txtDireccion.Caption + #13#10 + FPedido.PROVINCIA;
+ if not esCadenaVacia(FPedido.PERSONA_CONTACTO) then
+ txtDireccion.Caption := txtDireccion.Caption + #13#10 + 'Persona contacto: ' + FPedido.PERSONA_CONTACTO;
+ if not esCadenaVacia(FPedido.TELEFONO) then
+ txtDireccion.Caption := txtDireccion.Caption + #13#10 + 'Teléfono: ' + FPedido.TELEFONO;
+
if (actOtro.Checked) then
begin
cbLista.Enabled := False;
cbLista.Text := '';
- txtDireccion.Enabled := True;
- txtDireccion.Caption := FPedido.CALLE;
- txtDireccion.Caption := txtDireccion.Caption + #13#10 + FPedido.CODIGO_POSTAL + ' ' + FPedido.POBLACION;
- txtDireccion.Caption := txtDireccion.Caption + #13#10 + FPedido.PROVINCIA;
bModificar.Enabled := True;
end
else begin
txtDireccion.Enabled := False;
cbLista.Enabled := True;
cbLista.DroppedDown := True;
- bModificar.Enabled := False;
+ bModificar.Enabled := False;
end;
end;
end;
@@ -180,11 +185,10 @@ begin
dsPedido.DataTable := FPedido.DataTable;
cbLista.Properties.OnValidate := cbListaPropertiesValidate;
- if (FPedido.EsNuevo) then
- CambioDireccionAlmacen
+ if (FPedido.ID_ALMACEN < 1) then
+ actOtro.Checked := True
else
- if (FPedido.ID_ALMACEN < 1) then
- actOtro.Checked := True;
+ CambioDireccionAlmacen;
RefrescarDireccion;
end;
@@ -195,7 +199,7 @@ begin
if ReadOnly then
begin
rdxDestino1.Enabled := False;
- rdxDestino2.Enabled := False;
+ rdxDestino2.Enabled := False;
end;
end;
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidoProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidoProveedor.dfm
index 3abe0d0f..ed34e0d7 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidoProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidoProveedor.dfm
@@ -1,25 +1,25 @@
inherited frViewPedidoProveedor: TfrViewPedidoProveedor
- Width = 693
- Height = 293
+ Width = 934
+ Height = 594
OnCreate = CustomViewCreate
OnDestroy = CustomViewDestroy
- ExplicitWidth = 693
- ExplicitHeight = 293
+ ExplicitWidth = 934
+ ExplicitHeight = 594
object dxLayoutControl1: TdxLayoutControl
Left = 0
Top = 0
- Width = 693
- Height = 293
+ Width = 934
+ Height = 594
Align = alClient
ParentBackground = True
TabOrder = 0
TabStop = False
AutoContentSizes = [acsWidth, acsHeight]
DesignSize = (
- 693
- 293)
+ 934
+ 594)
inline frViewProveedorPedido: TfrViewDatosYSeleccionProveedor
- Left = 325
+ Left = 424
Top = 28
Width = 357
Height = 215
@@ -31,7 +31,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
ParentFont = False
TabOrder = 11
ReadOnly = False
- ExplicitLeft = 325
+ ExplicitLeft = 424
ExplicitTop = 28
ExplicitWidth = 357
ExplicitHeight = 215
@@ -39,7 +39,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
Width = 357
Height = 215
Align = alClient
- ExplicitWidth = 357
+ ExplicitWidth = 488
ExplicitHeight = 215
inherited edtlNombre: TcxDBTextEdit
Style.LookAndFeel.SkinName = ''
@@ -82,18 +82,18 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
Width = 283
end
inherited edtCodigoPostal: TcxDBTextEdit
- Left = 248
+ Left = 407
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 248
+ ExplicitLeft = 407
ExplicitWidth = 71
Width = 71
end
inherited Button3: TBitBtn
- Left = 121
- ExplicitLeft = 121
+ Left = 280
+ ExplicitLeft = 280
end
end
end
@@ -200,10 +200,9 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
end
inline frViewDireccionEntregaPedidoProv1: TfrViewDireccionEntregaPedidoProv
Left = 22
- Top = 306
+ Top = 334
Width = 273
Height = 166
- Enabled = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
@@ -213,41 +212,31 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
TabOrder = 10
ReadOnly = False
ExplicitLeft = 22
- ExplicitTop = 306
+ ExplicitTop = 334
ExplicitWidth = 273
ExplicitHeight = 166
inherited dxLayoutControl1: TdxLayoutControl
Width = 273
Height = 166
- ExplicitWidth = 273
- ExplicitHeight = 166
+ ExplicitWidth = 372
+ ExplicitHeight = 238
inherited rdxDestino1: TRadioButton
- Width = 253
- ExplicitWidth = 253
+ Width = 255
+ ExplicitWidth = 255
end
inherited rdxDestino2: TRadioButton
- Width = 253
- ExplicitWidth = 253
+ Width = 287
+ ExplicitWidth = 287
end
inherited cbLista: TcxDBLookupComboBox
- Style.LookAndFeel.SkinName = ''
- StyleDisabled.LookAndFeel.SkinName = ''
- StyleFocused.LookAndFeel.SkinName = ''
- StyleHot.LookAndFeel.SkinName = ''
- ExplicitWidth = 238
- Width = 238
+ ExplicitWidth = 425
+ Width = 425
end
inherited bModificar: TBitBtn
- Left = 118
- Top = 109
- ExplicitLeft = 118
- ExplicitTop = 109
- end
- inherited txtDireccion: TStaticText
- Width = 238
- Height = 42
- ExplicitWidth = 238
- ExplicitHeight = 42
+ Left = 234
+ Top = 203
+ ExplicitLeft = 234
+ ExplicitTop = 203
end
end
inherited ActionList1: TActionList
@@ -295,7 +284,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
Width = 20
end
object bFormasPago: TButton
- Left = 163
+ Left = 262
Top = 136
Width = 132
Height = 21
@@ -357,7 +346,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
Width = 20
end
object Button1: TButton
- Left = 163
+ Left = 262
Top = 163
Width = 132
Height = 23
@@ -365,7 +354,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
TabOrder = 7
end
inline frViewTienda1: TfrViewTienda
- Left = 325
+ Left = 424
Top = 279
Width = 357
Height = 46
@@ -379,13 +368,13 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
ParentFont = False
TabOrder = 12
ReadOnly = False
- ExplicitLeft = 325
+ ExplicitLeft = 424
ExplicitTop = 279
ExplicitWidth = 357
ExplicitHeight = 46
inherited dxLayoutControl1: TdxLayoutControl
Width = 357
- ExplicitWidth = 357
+ ExplicitWidth = 488
inherited cbTienda: TcxComboBox
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
@@ -395,7 +384,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
end
end
inline frViewObservaciones1: TfrViewObservaciones
- Left = 325
+ Left = 424
Top = 361
Width = 521
Height = 150
@@ -408,11 +397,13 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
ParentFont = False
TabOrder = 13
ReadOnly = False
- ExplicitLeft = 325
+ ExplicitLeft = 424
ExplicitTop = 361
inherited memObservaciones: TcxDBMemo
DataBinding.DataField = 'OBSERVACIONES'
DataBinding.DataSource = DADataSource
+ ExplicitWidth = 488
+ ExplicitHeight = 211
end
end
object edtlDescripcion: TcxDBTextEdit
@@ -467,7 +458,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
ControlOptions.ShowBorder = False
end
object dxLayoutControl1Item5: TdxLayoutItem
- Caption = 'Entrega recepci'#243'n:'
+ Caption = 'Entrega de entrega:'
Control = edtFechaEntrega
ControlOptions.ShowBorder = False
end
@@ -546,8 +537,6 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
AlignHorz = ahClient
AlignVert = avClient
Caption = 'Direcci'#243'n de entrega'
- Enabled = False
- Visible = False
object dxLayoutControl1Item8: TdxLayoutItem
AutoAligns = [aaHorizontal]
AlignVert = avClient
diff --git a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.dfm
index 10c9dfa0..553a2c53 100644
--- a/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.dfm
+++ b/Source/Modulos/Pedidos a proveedor/Views/uViewPedidosProveedor.dfm
@@ -95,7 +95,7 @@ inherited frViewPedidosProveedor: TfrViewPedidosProveedor
Width = 46
end
object cxGridViewFECHA_ENTREGA: TcxGridDBColumn
- Caption = 'Fecha recepci'#243'n'
+ Caption = 'Fecha de entrega'
DataBinding.FieldName = 'FECHA_ENTREGA'
Width = 47
end
diff --git a/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj b/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj
index 23749ae9..03a19a53 100644
--- a/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj
+++ b/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj
@@ -17,10 +17,11 @@
-
+
+
@@ -232,23 +233,32 @@
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm
index a25f91b4..38ed16b1 100644
--- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm
+++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.dfm
@@ -124,7 +124,7 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
Width = 805
ExplicitWidth = 805
inherited tbxMain: TTBXToolbar
- ExplicitWidth = 775
+ ExplicitWidth = 805
object TBXSubmenuItem3: TTBXSubmenuItem [0]
Caption = 'Nuevo'
DisplayMode = nbdmImageAndText
@@ -154,7 +154,7 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
OnClick = bVariosClick
end
end
- object TBXItem47: TTBXItem [14]
+ object TBXItem47: TTBXItem [13]
Action = actEnviarEMail
DisplayMode = nbdmImageAndText
end
@@ -263,9 +263,8 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
object actEnviarEMail: TAction
Category = 'Acciones'
Caption = 'Enviar por e-mail...'
- Enabled = False
Hint = 'Enviar el presupuesto por correo electr'#243'nico'
- Visible = False
+ ImageIndex = 29
OnExecute = actEnviarEMailExecute
OnUpdate = actEnviarEMailUpdate
end
@@ -1007,6 +1006,27 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
0049454E44AE426082}
Name = 'PngImage28'
Background = clWindow
+ end
+ item
+ PngImage.Data = {
+ 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
+ 610000000970485973000017120000171201679FD252000001964944415478DA
+ 636440038B371DFFCF8005C4FA5932621347115CB2F9D8FF30075154053F3F30
+ 30FC7CCF6096B49EE1FCCEE98C380D58B9F5F0FF403B09AC9A61B469C1050C43
+ C09C659B8FFE0F7110C3AB194CFFFAC0E0D2FD9B61FFEA1EB8218C203F873B8A
+ 10A59911C806F18DBB85E02E011BF0E1C30786F44015A234671F0B653871742F
+ AA0131BE160C5316EF60C8F012012B9AB1F72F8A8BB2153782C5A73E4B00F3E7
+ 2DDD846A80BF93215862E1BAFD603A27D603C580ACE6B50C5A0ADC0CB97D0F19
+ AEAEF66788C9694235C0D6580DAC70F3DE530CF1418E0CB88063F17D86B3270F
+ 324C2E9267C88DF3441860A4A9C0B0EFF80506171B230C4D319DEF50F8113E1A
+ 0CA5B53319182E64A006A28EBA0A565B4BE6FD61C88B85C83D7EF98FE1EBD76F
+ 60767BDF4AB0216003A4440518AEDD7E80D580054715C006BC7ACFC2F0EBF76F
+ 862F5FBE8231883D73FE4E880BFAA62EC2AAD9C2DA99E1D4536D86A42019860F
+ 5FD9E19ABF7CFDCA307FE97E880B180800E3F4EBFF4101070389D18E70CDF0A4
+ 4C34309801C9A950CDE41980A4190400B843EED8DFC8CDA30000000049454E44
+ AE426082}
+ Name = 'PngImage29'
+ Background = clWindow
end>
Bitmap = {}
end
diff --git a/Source/Modulos/Relaciones/Contratos de cliente - Pedidos de proveedor/uGenerarPedidosProvUtils.pas b/Source/Modulos/Relaciones/Contratos de cliente - Pedidos de proveedor/uGenerarPedidosProvUtils.pas
index f3ad633e..f06e22c8 100644
--- a/Source/Modulos/Relaciones/Contratos de cliente - Pedidos de proveedor/uGenerarPedidosProvUtils.pas
+++ b/Source/Modulos/Relaciones/Contratos de cliente - Pedidos de proveedor/uGenerarPedidosProvUtils.pas
@@ -52,15 +52,16 @@ begin
// APedido.Cliente.Open;
// APedido.NIF_CIF := AContrato.NIF_CIF;
+ APedido.ID_ALMACEN := 0;
APedido.NOMBRE_CLIENTE := AContrato.NOMBRE;
APedido.CALLE := AContrato.CALLE;
APedido.POBLACION := AContrato.POBLACION;
APedido.PROVINCIA := AContrato.PROVINCIA;
APedido.CODIGO_POSTAL := AContrato.CODIGO_POSTAL;
+ APedido.PERSONA_CONTACTO := AContrato.PERSONA_CONTACTO;
+ APedido.TELEFONO := AContrato.TELEFONO;
-
-// APedido.PERSONA_CONTACTO := AContrato.PERSONA_CONTACTO;
-// APedido.DataTable.FieldByName(fld_FacturasClientePLAZO_ENTREGA).AsVariant := AContrato.DataTable.FieldByName(fld_ContratosClientePLAZO_ENTREGA).AsVariant;
+ // APedido.DataTable.FieldByName(fld_FacturasClientePLAZO_ENTREGA).AsVariant := AContrato.DataTable.FieldByName(fld_ContratosClientePLAZO_ENTREGA).AsVariant;
// APedido.DataTable.FieldByName(fld_AlbaranesClienteOBSERVACIONES).AsVariant := AContrato.DataTable.FieldByName(fld_ContratosClienteOBSERVACIONES).AsVariant;
// APedido.IMPORTE_NETO := AContrato.IMPORTE_NETO;
diff --git a/Source/Modulos/Relaciones/Presupuestos de cliente - Contratos de cliente/uGenerarContratosCliUtils.pas b/Source/Modulos/Relaciones/Presupuestos de cliente - Contratos de cliente/uGenerarContratosCliUtils.pas
index dab2b327..f56f18db 100644
--- a/Source/Modulos/Relaciones/Presupuestos de cliente - Contratos de cliente/uGenerarContratosCliUtils.pas
+++ b/Source/Modulos/Relaciones/Presupuestos de cliente - Contratos de cliente/uGenerarContratosCliUtils.pas
@@ -106,6 +106,7 @@ begin
AContrato.MOVIL := APresupuesto.Cliente.MOVIL_1;
AContrato.PERSONA_CONTACTO := APresupuesto.PERSONA_CONTACTO;
+ AContrato.DataTable.FieldByName(fld_ContratosClienteFORMA_PAGO).AsVariant := APresupuesto.DataTable.FieldByName(fld_PresupuestosClienteFORMA_PAGO).AsVariant;
AContrato.DataTable.FieldByName(fld_ContratosClientePLAZO_ENTREGA).AsVariant := APresupuesto.DataTable.FieldByName(fld_PresupuestosClientePLAZO_ENTREGA).AsVariant;
AContrato.DataTable.FieldByName(fld_ContratosClienteOBSERVACIONES).AsVariant := APresupuesto.DataTable.FieldByName(fld_PresupuestosClienteOBSERVACIONES).AsVariant;
AContrato.DataTable.FieldByName(fld_ContratosClienteCALIDADES).AsVariant := Trim(APresupuesto.DataTable.FieldByName(fld_PresupuestosClienteCALIDADES).AsVariant);
diff --git a/Source/Servicios/FactuGES.RODL b/Source/Servicios/FactuGES.RODL
index 51c81830..236e6b5e 100644
--- a/Source/Servicios/FactuGES.RODL
+++ b/Source/Servicios/FactuGES.RODL
@@ -304,6 +304,14 @@
+
+
+
+
+
+
+
+
@@ -360,6 +368,14 @@
+
+
+
+
+
+
+
+
diff --git a/Source/Servicios/FactuGES_Intf.pas b/Source/Servicios/FactuGES_Intf.pas
index 75412d42..6d8d0869 100644
--- a/Source/Servicios/FactuGES_Intf.pas
+++ b/Source/Servicios/FactuGES_Intf.pas
@@ -517,6 +517,7 @@ type
IsrvFacturasCliente = interface(IDataAbstractService)
['{56B4FFF0-AB1B-46B2-BA16-ABD5360F6311}']
function GenerateReport(const FacturaID: TIntegerArray): Binary;
+ function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary;
end;
{ CosrvFacturasCliente }
@@ -530,6 +531,7 @@ type
function __GetInterfaceName:string; override;
function GenerateReport(const FacturaID: TIntegerArray): Binary;
+ function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary;
end;
{ IsrvFacturasProveedor }
@@ -576,6 +578,7 @@ type
IsrvPedidosProveedor = interface(IDataAbstractService)
['{3DCC03E4-E9CE-4798-99D4-7170C9CF815B}']
function GenerateReport(const ID: AnsiString): Binary;
+ function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary;
end;
{ CosrvPedidosProveedor }
@@ -589,6 +592,7 @@ type
function __GetInterfaceName:string; override;
function GenerateReport(const ID: AnsiString): Binary;
+ function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary;
end;
{ IsrvAlbaranesCliente }
@@ -1830,6 +1834,23 @@ begin
end
end;
+function TsrvFacturasCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnPDF');
+ __Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
{ CosrvFacturasProveedor }
class function CosrvFacturasProveedor.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvFacturasProveedor;
@@ -1940,6 +1961,23 @@ begin
end
end;
+function TsrvPedidosProveedor_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnPDF');
+ __Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
{ CosrvAlbaranesCliente }
class function CosrvAlbaranesCliente.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvAlbaranesCliente;
diff --git a/Source/Servicios/FactuGES_Invk.pas b/Source/Servicios/FactuGES_Invk.pas
index 687017e9..045778ed 100644
--- a/Source/Servicios/FactuGES_Invk.pas
+++ b/Source/Servicios/FactuGES_Invk.pas
@@ -174,6 +174,7 @@ type
constructor Create; override;
published
procedure Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
end;
TsrvFacturasProveedor_Invoker = class(TDataAbstractService_Invoker)
@@ -202,6 +203,7 @@ type
constructor Create; override;
published
procedure Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
end;
TsrvAlbaranesCliente_Invoker = class(TDataAbstractService_Invoker)
@@ -961,6 +963,36 @@ begin
end;
end;
+procedure TsrvFacturasCliente_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; }
+var
+ ListaID: FactuGES_Intf.TIntegerArray;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ ListaID := nil;
+ lResult := nil;
+ try
+ __Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
+
+ lResult := (__Instance as IsrvFacturasCliente).GenerarInformeEnPDF(ListaID);
+
+ __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvFacturasCliente', 'GenerarInformeEnPDFResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(ListaID);
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
{ TsrvFacturasProveedor_Invoker }
constructor TsrvFacturasProveedor_Invoker.Create;
@@ -1101,6 +1133,36 @@ begin
end;
end;
+procedure TsrvPedidosProveedor_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; }
+var
+ ListaID: FactuGES_Intf.TIntegerArray;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ ListaID := nil;
+ lResult := nil;
+ try
+ __Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
+
+ lResult := (__Instance as IsrvPedidosProveedor).GenerarInformeEnPDF(ListaID);
+
+ __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvPedidosProveedor', 'GenerarInformeEnPDFResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(ListaID);
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
{ TsrvAlbaranesCliente_Invoker }
constructor TsrvAlbaranesCliente_Invoker.Create;
diff --git a/Source/Servicios/RODLFile.res b/Source/Servicios/RODLFile.res
index 4b3bf465..a27a732e 100644
Binary files a/Source/Servicios/RODLFile.res and b/Source/Servicios/RODLFile.res differ
diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj
index e63a594d..d546d70f 100644
--- a/Source/Servidor/FactuGES_Server.dproj
+++ b/Source/Servidor/FactuGES_Server.dproj
@@ -1,299 +1,298 @@
-
+
-
- {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}
- FactuGES_Server.dpr
- Debug
- AnyCPU
- DCC32
- ..\..\Output\Debug\Servidor\FactuGES_Server.exe
-
-
- 7.0
- False
- False
- 0
- 3
- ..\..\Output\Release\Servidor
- RELEASE
-
-
- 7.0
- 3
- ..\..\Output\Debug\Servidor
- DEBUG;
- True
-
-
- Delphi.Personality
-
-
-FalseTrueFalseTrueFalse2640FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.6.4.0FactuGES (Servidor)2.6.5.0viernes, 13 de marzo de 2015 18:16
-
- File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found
- FactuGES_Server.dpr
-
-
-
-
- MainSource
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDARemoteService
-
-
-
- TRORemoteDataModule
-
-
-
-
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDARemoteService
-
-
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDARemoteService
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
- TDataModule
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
-
-
-
- TDataAbstractService
-
-
-
-
-
- TDataAbstractService
-
-
-
- TFrame
-
-
-
- TFrame
-
-
-
- TForm
-
-
-
- TFrame
-
-
-
- TDARemoteService
-
-
-
-
-
-
- TDataModule
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}
+ FactuGES_Server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Output\Debug\Servidor\FactuGES_Server.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ 3
+ ..\..\Output\Release\Servidor
+ RELEASE
+
+
+ 7.0
+ 3
+ ..\..\Output\Debug\Servidor
+ DEBUG;
+ True
+
+
+ Delphi.Personality
+
+
+ FalseTrueFalseTrueFalse2660FalseFalseFalseFalseFalse30821252Rodax Software S.L.2.6.6.0FactuGES (Servidor)2.6.6.0miércoles, 09 de septiembre de 2015 11:08
+ File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found
+ FactuGES_Server.dpr
+
+
+
+
+ MainSource
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDARemoteService
+
+
+
+ TRORemoteDataModule
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
+
+ TDataAbstractService
+
+
+
+ TFrame
+
+
+
+ TFrame
+
+
+
+ TForm
+
+
+
+ TFrame
+
+
+
+ TDARemoteService
+
+
+
+
+
+
+ TDataModule
+
+
+
+
+
+
+
+
+
+
+
+
+