- Tarea #1436 -> Al exportar a PDF cambiar el nombre del fichero

- Mejorada la ventana de elegir email al enviar un documento
- Más espacio para los conceptos en el informe de pedido a Proveedor
- La persona de contacto y el tlf de contacto pasa a ser el vendedor en el pedido a proveedor.

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@645 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
David Arranz 2016-07-22 17:05:20 +00:00
parent 2b1d7f5eda
commit 25143fb973
26 changed files with 439 additions and 195 deletions

View File

@ -58,55 +58,55 @@
<DelphiCompile Include="Base.dpk"> <DelphiCompile Include="Base.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\Modulos\Articulos\Views\adortl.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\cxDataD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\cxEditorsD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\cxExtEditorsD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\cxGridD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\cxLibraryD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\cxPageControlD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\DataAbstract_Core_D11.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\dbrtl.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\dclIndyCore.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\designide.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\dsnap.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\dxGDIPlusD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\dxPSCoreD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\dxThemeD11.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\GUISDK_D11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\IndyCore.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\IndyProtocols.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\IndySystem.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\Jcl.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\JclVcl.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\JSDialog100.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\JvCmpD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\JvCoreD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\JvCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\JvDlgsD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\JvMMD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\JvNetD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\JvPageCompsD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\JvStdCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\JvSystemD11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\pckMD5.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\pckUCDataConnector.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\pckUserControl_RT.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\PluginSDK_D11R.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\PngComponentsD10.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\PNG_D10.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\RemObjects_Core_D11.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\rtl.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\TB2k_D10.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\tbx_d10.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\vcl.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\vclactnband.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\vcldb.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\vcljpg.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\VclSmp.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\vclx.dcp" />
<DCCReference Include="..\Modulos\Articulos\Views\xmlrtl.dcp" />
<DCCReference Include="..\Servicios\FactuGES_Intf.pas" /> <DCCReference Include="..\Servicios\FactuGES_Intf.pas" />
<DCCReference Include="C:\Documents and Settings\Usuario\adortl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxDataD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxEditorsD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxExtEditorsD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxGridD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxLibraryD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\cxPageControlD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\DataAbstract_Core_D11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dbrtl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dclIndyCore.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\designide.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dsnap.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dxGDIPlusD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dxPSCoreD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\dxThemeD11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\GUISDK_D11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\IndyCore.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\IndyProtocols.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\IndySystem.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\Jcl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JclVcl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JSDialog100.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvCmpD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvCoreD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvCtrlsD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvDlgsD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvMMD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvNetD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvPageCompsD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvStdCtrlsD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\JvSystemD11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\pckMD5.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\pckUCDataConnector.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\pckUserControl_RT.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\PluginSDK_D11R.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\PngComponentsD10.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\PNG_D10.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\RemObjects_Core_D11.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\TB2k_D10.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\tbx_d10.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vclactnband.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vcldb.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vcljpg.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\VclSmp.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\vclx.dcp" />
<DCCReference Include="C:\Documents and Settings\Usuario\xmlrtl.dcp" />
<DCCReference Include="Conexion\uConfigurarConexion.pas"> <DCCReference Include="Conexion\uConfigurarConexion.pas">
<Form>fConfigurarConexion</Form> <Form>fConfigurarConexion</Form>
<DesignClass>TForm</DesignClass> <DesignClass>TForm</DesignClass>

View File

@ -52,8 +52,7 @@
<Borland.Personality>Delphi.Personality</Borland.Personality> <Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType> <Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject> <BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">2</VersionInfo><VersionInfo Name="MinorVer">7</VersionInfo><VersionInfo Name="Release">3</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">2.7.3.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">2.7.3.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages> <BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">2</VersionInfo><VersionInfo Name="MinorVer">7</VersionInfo><VersionInfo Name="Release">4</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">2.7.4.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">2.7.4.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages> <Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject> </Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>

View File

@ -1,7 +1,7 @@
MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Factuges.ico" MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Factuges.ico"
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 2,7,2,0 FILEVERSION 2,7,4,0
PRODUCTVERSION 2,7,2,0 PRODUCTVERSION 2,7,4,0
FILEFLAGSMASK 0x3FL FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L FILEFLAGS 0x00L
FILEOS 0x40004L FILEOS 0x40004L
@ -13,10 +13,10 @@ BEGIN
BLOCK "0C0A04E4" BLOCK "0C0A04E4"
BEGIN BEGIN
VALUE "CompanyName", "Rodax Software S.L.\0" VALUE "CompanyName", "Rodax Software S.L.\0"
VALUE "FileVersion", "2.7.2.0\0" VALUE "FileVersion", "2.7.4.0\0"
VALUE "InternalName", "FactuGES\0" VALUE "InternalName", "FactuGES\0"
VALUE "ProductName", "FactuGES\0" VALUE "ProductName", "FactuGES\0"
VALUE "ProductVersion", "2.7.3.0\0" VALUE "ProductVersion", "2.7.4.0\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

Binary file not shown.

View File

@ -27,6 +27,7 @@ inherited fDialogElegirEMail: TfDialogElegirEMail
inherited btnAceptar: TButton inherited btnAceptar: TButton
Left = 369 Left = 369
Top = 6 Top = 6
Default = True
ExplicitLeft = 369 ExplicitLeft = 369
ExplicitTop = 6 ExplicitTop = 6
end end
@ -47,6 +48,7 @@ inherited fDialogElegirEMail: TfDialogElegirEMail
end end
inherited lblComments: TLabel inherited lblComments: TLabel
Width = 456 Width = 456
Height = 27
Visible = False Visible = False
end end
end end

View File

@ -26,9 +26,10 @@ type
FListaDirecciones: TStringList; FListaDirecciones: TStringList;
function GetEMailElegido: String; function GetEMailElegido: String;
procedure ActualizarOpciones; procedure ActualizarOpciones;
procedure SetListaDirecciones(ALista : TStringList);
public public
property EMailElegido: String read GetEMailElegido; property EMailElegido: String read GetEMailElegido;
property ListaDirecciones : TStringList read FListaDirecciones write FListaDirecciones; property ListaDirecciones : TStringList read FListaDirecciones write SetListaDirecciones;
end; end;
@ -75,16 +76,19 @@ procedure TfDialogElegirEMail.ActualizarOpciones;
begin begin
if rbEdit.Checked then if rbEdit.Checked then
begin begin
edtEMail.Enabled := True;
rbCombo.Checked := False; rbCombo.Checked := False;
cbEMail.Enabled := False; cbEMail.Enabled := False;
edtEMail.Enabled := True;
edtEMail.SetFocus;
end end
else begin else begin
if rbCombo.Enabled then if rbCombo.Enabled then
begin begin
cbEMail.Enabled := True;
edtEMail.Enabled := False; edtEMail.Enabled := False;
rbEdit.Checked := False; rbEdit.Checked := False;
cbEMail.Enabled := True;
cbEMail.ItemIndex := 0;
cbEMail.SetFocus;
end end
else else
rbEdit.Checked := True; rbEdit.Checked := True;
@ -136,12 +140,10 @@ begin
if cbEMail.Items.Count = 0 then if cbEMail.Items.Count = 0 then
begin begin
rbCombo.Enabled := False; rbCombo.Enabled := False;
rbEdit.Checked; rbEdit.Checked := True
end end
else begin else
cbEMail.ItemIndex := 0;
rbCombo.Checked := True; rbCombo.Checked := True;
end;
ActualizarOpciones; ActualizarOpciones;
end; end;
@ -168,4 +170,16 @@ begin
ActualizarOpciones; ActualizarOpciones;
end; end;
procedure TfDialogElegirEMail.SetListaDirecciones(ALista: TStringList);
var
i : integer;
begin
FListaDirecciones := ALista;
for i := FListaDirecciones.count - 1 downto 0 do
begin
if Trim(FListaDirecciones[i]) = '' then
FListaDirecciones.Delete(i);
end;
end;
end. end.

File diff suppressed because one or more lines are too long

View File

@ -740,6 +740,7 @@ procedure TAlbaranesClienteController.EnviarAlbaranPorEMail(
var var
AReportController : IAlbaranesClienteReportController; AReportController : IAlbaranesClienteReportController;
AFicheroTMP : TFileName; AFicheroTMP : TFileName;
ATituloEnvio : String;
AEMail : String; AEMail : String;
AListaEmail : TStringList; AListaEmail : TStringList;
begin begin
@ -749,8 +750,6 @@ begin
if AAlbaran.DataTable.Active then if AAlbaran.DataTable.Active then
AAlbaran.DataTable.Active := True; AAlbaran.DataTable.Active := True;
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(AAlbaran.REFERENCIA));
AListaEmail := TStringList.Create; AListaEmail := TStringList.Create;
try try
RecuperarCliente(AAlbaran); RecuperarCliente(AAlbaran);
@ -768,10 +767,12 @@ begin
end; end;
ShowHourglassCursor; ShowHourglassCursor;
ATituloEnvio := 'Albarán ' + AAlbaran.Cliente.NOMBRE;
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(ATituloEnvio));
AReportController := TAlbaranesClienteReportController.Create; AReportController := TAlbaranesClienteReportController.Create;
try try
AReportController.ExportToPDF(AAlbaran.ID, AFicheroTMP); AReportController.ExportToPDF(AAlbaran.ID, AFicheroTMP);
SendMailMAPI('Albarán ' + AAlbaran.REFERENCIA, '', AFicheroTMP, '', '', AAlbaran.Cliente.NOMBRE, AEMail); SendMailMAPI(ATituloEnvio, '', AFicheroTMP, '', '', AAlbaran.Cliente.NOMBRE, AEMail);
finally finally
SysUtils.DeleteFile(AFicheroTMP); SysUtils.DeleteFile(AFicheroTMP);
AReportController := NIL; AReportController := NIL;

View File

@ -381,6 +381,7 @@ begin
REFERENCIA := ''; REFERENCIA := '';
SITUACION := SITUACION_CONTRATO_PENDIENTE; SITUACION := SITUACION_CONTRATO_PENDIENTE;
end; end;
Result.AsignarVendedor;
Result.Post; Result.Post;
finally finally
HideHourglassCursor; HideHourglassCursor;
@ -661,6 +662,7 @@ procedure TContratosClienteController.EnviarContratoPorEMail(
var var
AReportController : IContratosClienteReportController; AReportController : IContratosClienteReportController;
AFicheroTMP : TFileName; AFicheroTMP : TFileName;
ATituloEnvio : String;
AEMail : String; AEMail : String;
AListaEmail : TStringList; AListaEmail : TStringList;
begin begin
@ -670,8 +672,6 @@ begin
if AContrato.DataTable.Active then if AContrato.DataTable.Active then
AContrato.DataTable.Active := True; AContrato.DataTable.Active := True;
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(AContrato.REFERENCIA));
AListaEmail := TStringList.Create; AListaEmail := TStringList.Create;
try try
RecuperarCliente(AContrato); RecuperarCliente(AContrato);
@ -689,10 +689,12 @@ begin
end; end;
ShowHourglassCursor; ShowHourglassCursor;
ATituloEnvio := 'Contrato ' + AContrato.Cliente.NOMBRE + ' - ' + AContrato.REFERENCIA_CLIENTE;
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(ATituloEnvio));
AReportController := TContratosClienteReportController.Create; AReportController := TContratosClienteReportController.Create;
try try
AReportController.ExportToPDF(AContrato.ID, AFicheroTMP); AReportController.ExportToPDF(AContrato.ID, AFicheroTMP);
SendMailMAPI('Contrato ' + AContrato.REFERENCIA, '', AFicheroTMP, '', '', AContrato.Cliente.NOMBRE, AEMail); SendMailMAPI(ATituloEnvio, '', AFicheroTMP, '', '', AContrato.Cliente.NOMBRE, AEMail);
finally finally
DeleteFile(AFicheroTMP); DeleteFile(AFicheroTMP);
AReportController := NIL; AReportController := NIL;

View File

@ -34,6 +34,7 @@ type
property Detalles: IBizDetallesContratoCliente read GetDetalles write SetDetalles; property Detalles: IBizDetallesContratoCliente read GetDetalles write SetDetalles;
procedure CalcularImporteTotal; procedure CalcularImporteTotal;
procedure AsignarVendedor;
function EsNuevo : Boolean; function EsNuevo : Boolean;
function DarListaSituaciones: TStringList; function DarListaSituaciones: TStringList;
@ -49,7 +50,6 @@ type
procedure CalcularIVA; procedure CalcularIVA;
procedure CalcularRE; procedure CalcularRE;
procedure AsignarTipoIVA (IDTipoIVA : Integer); procedure AsignarTipoIVA (IDTipoIVA : Integer);
procedure AsignarVendedor;
protected protected
FSeleccionableInterface : ISeleccionable; FSeleccionableInterface : ISeleccionable;
@ -87,6 +87,7 @@ type
function DarListaSituaciones: TStringList; function DarListaSituaciones: TStringList;
function EsNuevo : Boolean; function EsNuevo : Boolean;
procedure CalcularImporteTotal; procedure CalcularImporteTotal;
procedure AsignarVendedor;
property Cliente : IBizCliente read GetCliente write SetCliente; property Cliente : IBizCliente read GetCliente write SetCliente;
property _Cliente : IBizCliente read _GetCliente write _SetCliente; property _Cliente : IBizCliente read _GetCliente write _SetCliente;

View File

@ -857,6 +857,7 @@ procedure TFacturasClienteController.EnviarFacturaPorEMail(AFactura: IBizFactura
var var
AReportController : IFacturasClienteReportController; AReportController : IFacturasClienteReportController;
AFicheroTMP : TFileName; AFicheroTMP : TFileName;
ATituloEnvio : String;
AEMail : String; AEMail : String;
AListaEmail : TStringList; AListaEmail : TStringList;
begin begin
@ -866,8 +867,6 @@ begin
if AFactura.DataTable.Active then if AFactura.DataTable.Active then
AFactura.DataTable.Active := True; AFactura.DataTable.Active := True;
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(AFactura.REFERENCIA));
AListaEmail := TStringList.Create; AListaEmail := TStringList.Create;
try try
RecuperarCliente(AFactura); RecuperarCliente(AFactura);
@ -885,10 +884,12 @@ begin
end; end;
ShowHourglassCursor; ShowHourglassCursor;
ATituloEnvio := 'Factura ' + AFactura.REFERENCIA + ' - ' + AFactura.Cliente.NOMBRE;
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(ATituloEnvio));
AReportController := TFacturasClienteReportController.Create; AReportController := TFacturasClienteReportController.Create;
try try
AReportController.ExportToPDF(AFactura.ID, AFicheroTMP); AReportController.ExportToPDF(AFactura.ID, AFicheroTMP);
SendMailMAPI('Factura ' + AFactura.REFERENCIA, '', AFicheroTMP, '', '', AFactura.Cliente.NOMBRE, AEMail); SendMailMAPI(ATituloEnvio, '', AFicheroTMP, '', '', AFactura.Cliente.NOMBRE, AEMail);
finally finally
DeleteFile(AFicheroTMP); DeleteFile(AFicheroTMP);
AReportController := NIL; AReportController := NIL;

View File

@ -343,6 +343,8 @@ begin
REF_CON_CLIENTE := ''; REF_CON_CLIENTE := '';
ID_CONTRATO_CLIENTE := 0; ID_CONTRATO_CLIENTE := 0;
end; end;
Result.AsignarVendedor;
Result.Post; Result.Post;
finally finally
HideHourglassCursor; HideHourglassCursor;
@ -602,6 +604,7 @@ procedure TPedidosProveedorController.EnviarPedidoPorEMail(APedido: IBizPedidoPr
var var
AReportController : IPedidosProveedorReportController; AReportController : IPedidosProveedorReportController;
AFicheroTMP : TFileName; AFicheroTMP : TFileName;
ATituloEnvio : String;
AEMail : String; AEMail : String;
AListaEmail : TStringList; AListaEmail : TStringList;
begin begin
@ -611,8 +614,6 @@ begin
if APedido.DataTable.Active then if APedido.DataTable.Active then
APedido.DataTable.Active := True; APedido.DataTable.Active := True;
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(APedido.REFERENCIA));
AListaEmail := TStringList.Create; AListaEmail := TStringList.Create;
try try
RecuperarProveedor(APedido); RecuperarProveedor(APedido);
@ -630,10 +631,16 @@ begin
end; end;
ShowHourglassCursor; ShowHourglassCursor;
if not APedido.DESCRIPCION_GENERALIsNull then
ATituloEnvio := APedido.DESCRIPCION_GENERAL
else
ATituloEnvio := 'Pedido ' + APedido.REFERENCIA;
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(ATituloEnvio));
AReportController := TPedidosProveedorReportController.Create; AReportController := TPedidosProveedorReportController.Create;
try try
AReportController.ExportToPDF(APedido.ID, AFicheroTMP); AReportController.ExportToPDF(APedido.ID, AFicheroTMP);
SendMailMAPI('Pedido ' + APedido.REFERENCIA, '', AFicheroTMP, '', '', APedido.Proveedor.NOMBRE, AEMail); SendMailMAPI(ATituloEnvio, '', AFicheroTMP, '', '', APedido.Proveedor.NOMBRE, AEMail);
finally finally
DeleteFile(AFicheroTMP); DeleteFile(AFicheroTMP);
AReportController := NIL; AReportController := NIL;

View File

@ -34,13 +34,13 @@ type
function EsNuevo : Boolean; function EsNuevo : Boolean;
function DarListaSituaciones: TStringList; function DarListaSituaciones: TStringList;
procedure AsignarVendedor;
end; end;
TBizPedidoProveedor = class(TPedidosProveedorDataTableRules, IBizPedidoProveedor, ISeleccionable) TBizPedidoProveedor = class(TPedidosProveedorDataTableRules, IBizPedidoProveedor, ISeleccionable)
private private
procedure CalcularBaseImponible; procedure CalcularBaseImponible;
procedure CalcularIVA; procedure CalcularIVA;
procedure AsignarVendedor;
protected protected
FSeleccionableInterface : ISeleccionable; FSeleccionableInterface : ISeleccionable;
@ -64,12 +64,14 @@ type
procedure SetID_CONTRATO_CLIENTEValue(const aValue: Integer); override; procedure SetID_CONTRATO_CLIENTEValue(const aValue: Integer); override;
// procedure SetINCIDENCIASValue(const aValue: IROStrings); override; // procedure SetINCIDENCIASValue(const aValue: IROStrings); override;
procedure SetID_FORMA_PAGOValue(const aValue: Integer); override; procedure SetID_FORMA_PAGOValue(const aValue: Integer); override;
procedure SetID_TIENDAValue(const aValue: Integer); procedure SetID_TIENDAValue(const aValue: Integer); override;
procedure SetID_VENDEDORValue(const aValue: Integer); override;
procedure IMPORTE_NETOOnChange(Sender: TDACustomField); procedure IMPORTE_NETOOnChange(Sender: TDACustomField);
procedure IMPORTE_PORTEOnChange(Sender: TDACustomField); procedure IMPORTE_PORTEOnChange(Sender: TDACustomField);
procedure DESCUENTOOnChange(Sender: TDACustomField); procedure DESCUENTOOnChange(Sender: TDACustomField);
procedure IVAOnChange(Sender: TDACustomField); procedure IVAOnChange(Sender: TDACustomField);
procedure ID_VENDEDOROnChange(Sender: TDACustomField);
procedure OnNewRecord(Sender: TDADataTable); override; procedure OnNewRecord(Sender: TDADataTable); override;
procedure IniciarValoresPedidoNuevo; procedure IniciarValoresPedidoNuevo;
@ -77,6 +79,8 @@ type
public public
procedure CalcularImporteTotal; procedure CalcularImporteTotal;
function DarListaSituaciones: TStringList; function DarListaSituaciones: TStringList;
procedure AsignarVendedor;
procedure RellenarContactoVendedor;
function EsNuevo : Boolean; function EsNuevo : Boolean;
property Proveedor : IBizProveedor read GetProveedor write SetProveedor; property Proveedor : IBizProveedor read GetProveedor write SetProveedor;
property _Proveedor : IBizProveedor read _GetProveedor write _SetProveedor; property _Proveedor : IBizProveedor read _GetProveedor write _SetProveedor;
@ -93,12 +97,51 @@ type
implementation implementation
uses uses
SysUtils, Variants, uDataModuleConfiguracion, uDataModuleUsuarios, SysUtils, Dialogs, Variants, uDataModuleConfiguracion, uDataModuleUsuarios,
uDataTableUtils, DateUtils, uDateUtils, DB, uFactuGES_App, uBizEmpresasTiendas, uDataTableUtils, DateUtils, uDateUtils, DB, uFactuGES_App, uBizEmpresasTiendas,
uVendedoresController; uVendedoresController;
{ TBizPedidoProveedor } { TBizPedidoProveedor }
procedure TBizPedidoProveedor.RellenarContactoVendedor;
var
AVendedoresController: IVendedoresController;
AVendedor : IBizVendedor;
ATelefonos : String;
begin
ATelefonos := '';
if ID_VENDEDORIsNull then begin
SetFieldNull(DataTable, fld_PedidosProveedorPERSONA_CONTACTO);
SetFieldNull(DataTable, fld_PedidosProveedorTELEFONO);
end
else begin
AVendedoresController := TVendedoresController.Create;
try
AVendedor := (AVendedoresController.Buscar(ID_VENDEDOR) as IBizVendedor);
if not Assigned(AVendedor) then
raise Exception.Create (Format('No se ha encontrado un vendedor con ID %d (AsignarVendedor)', [ID_VENDEDOR]));
AVendedor.DataTable.Active := True;
PERSONA_CONTACTO := AVendedor.NOMBRE;
if not AVendedor.TELEFONO_1IsNull then
ATelefonos := ATelefonos + AVendedor.TELEFONO_1;
if not AVendedor.MOVIL_1IsNull then
begin
if (Length(ATelefonos) > 0) then
ATelefonos := ATelefonos + ' / ';
ATelefonos := ATelefonos + AVendedor.MOVIL_1;
end;
TELEFONO := ATelefonos;
finally
AVendedor := nil;
AVendedoresController := nil;
end;
end;
end;
procedure TBizPedidoProveedor.AsignarVendedor; procedure TBizPedidoProveedor.AsignarVendedor;
var var
AVendedoresController: IVendedoresController; AVendedoresController: IVendedoresController;
@ -106,6 +149,7 @@ begin
AVendedoresController := TVendedoresController.Create; AVendedoresController := TVendedoresController.Create;
try try
ID_VENDEDOR := AVendedoresController.DarIDVendedorDeUsuario(AppFactuGES.UsuarioActivo.ID); ID_VENDEDOR := AVendedoresController.DarIDVendedorDeUsuario(AppFactuGES.UsuarioActivo.ID);
RellenarContactoVendedor;
finally finally
AVendedoresController := nil; AVendedoresController := nil;
end; end;
@ -154,6 +198,7 @@ begin
FieldByName(fld_PedidosProveedorIMPORTE_PORTE).OnChange := IMPORTE_PORTEOnChange; FieldByName(fld_PedidosProveedorIMPORTE_PORTE).OnChange := IMPORTE_PORTEOnChange;
FieldByName(fld_PedidosProveedorDESCUENTO).OnChange := DESCUENTOOnChange; FieldByName(fld_PedidosProveedorDESCUENTO).OnChange := DESCUENTOOnChange;
FieldByName(fld_PedidosProveedorIVA).OnChange := IVAOnChange; FieldByName(fld_PedidosProveedorIVA).OnChange := IVAOnChange;
FieldByName(fld_PedidosProveedorID_VENDEDOR).OnChange := ID_VENDEDOROnChange;
end; end;
FDetallesLink := TDADataSource.Create(NIL); FDetallesLink := TDADataSource.Create(NIL);
@ -198,6 +243,11 @@ begin
Result := FProveedor; Result := FProveedor;
end; end;
procedure TBizPedidoProveedor.ID_VENDEDOROnChange(Sender: TDACustomField);
begin
RellenarContactoVendedor;
end;
procedure TBizPedidoProveedor.IMPORTE_NETOOnChange(Sender: TDACustomField); procedure TBizPedidoProveedor.IMPORTE_NETOOnChange(Sender: TDACustomField);
begin begin
CalcularImporteTotal; CalcularImporteTotal;
@ -241,6 +291,14 @@ begin
end; end;
procedure TBizPedidoProveedor.SetID_VENDEDORValue(const aValue: Integer);
begin
if (aValue = 0) then
SetFieldNull(DataTable, fld_PedidosProveedorID_VENDEDOR)
else
inherited;
end;
function TBizPedidoProveedor.GetDetalles: IBizDetallesPedidoProveedor; function TBizPedidoProveedor.GetDetalles: IBizDetallesPedidoProveedor;
begin begin
Result := FDetalles; Result := FDetalles;

View File

@ -102,19 +102,16 @@ object RptPedidosProveedor: TRptPedidosProveedor
' POBLACION,'#10' IIF ((PEDIDOS_PROVEEDOR.ID_ALMACEN = 0), PEDIDOS_P' + ' POBLACION,'#10' IIF ((PEDIDOS_PROVEEDOR.ID_ALMACEN = 0), PEDIDOS_P' +
'ROVEEDOR.PROVINCIA, ALMACENES.PROVINCIA) AS PROVINCIA,'#10' IIF ((P' + 'ROVEEDOR.PROVINCIA, ALMACENES.PROVINCIA) AS PROVINCIA,'#10' IIF ((P' +
'EDIDOS_PROVEEDOR.ID_ALMACEN = 0), PEDIDOS_PROVEEDOR.CODIGO_POSTA' + 'EDIDOS_PROVEEDOR.ID_ALMACEN = 0), PEDIDOS_PROVEEDOR.CODIGO_POSTA' +
'L, ALMACENES.CODIGO_POSTAL) AS CODIGO_POSTAL,'#10' IIF ((PEDIDOS_PR' + 'L, ALMACENES.CODIGO_POSTAL) AS CODIGO_POSTAL,'#10' PEDIDOS_PROVEEDO' +
'OVEEDOR.ID_ALMACEN = 0), PEDIDOS_PROVEEDOR.PERSONA_CONTACTO, ALM' + 'R.PERSONA_CONTACTO,'#10' PEDIDOS_PROVEEDOR.TELEFONO'#10#10'FROM'#10' PEDIDOS' +
'ACENES.PERSONA_CONTACTO) AS PERSONA_CONTACTO,'#10' IIF ((PEDIDOS_PR' + '_PROVEEDOR'#10' LEFT OUTER JOIN CONTACTOS PROVEEDOR ON (PROVEEDOR .' +
'OVEEDOR.ID_ALMACEN = 0), PEDIDOS_PROVEEDOR.TELEFONO, ALMACENES.T' + 'ID = PEDIDOS_PROVEEDOR.ID_PROVEEDOR)'#10' LEFT OUTER JOIN CONTACTOS' +
'ELEFONO) AS TELEFONO'#10#10'FROM'#10' PEDIDOS_PROVEEDOR'#10' LEFT OUTER JOIN' + ' VENDEDORES ON (VENDEDORES.ID = PEDIDOS_PROVEEDOR.ID_VENDEDOR)'#10' ' +
' CONTACTOS PROVEEDOR ON (PROVEEDOR .ID = PEDIDOS_PROVEEDOR.ID_PR' + ' LEFT OUTER JOIN CONTRATOS_CLIENTE ON (CONTRATOS_CLIENTE.ID = PE' +
'OVEEDOR)'#10' LEFT OUTER JOIN CONTACTOS VENDEDORES ON (VENDEDORES.I' + 'DIDOS_PROVEEDOR.ID_CONTRATO_CLIENTE)'#10' LEFT OUTER JOIN CONTACTOS' +
'D = PEDIDOS_PROVEEDOR.ID_VENDEDOR)'#10' LEFT OUTER JOIN CONTRATOS_C' + ' CLIENTES ON (CLIENTES.ID = CONTRATOS_CLIENTE.ID_CLIENTE)'#10' LEFT' +
'LIENTE ON (CONTRATOS_CLIENTE.ID = PEDIDOS_PROVEEDOR.ID_CONTRATO_' + ' OUTER JOIN ALMACENES ON (ALMACENES.ID = PEDIDOS_PROVEEDOR.ID_AL' +
'CLIENTE)'#10' LEFT OUTER JOIN CONTACTOS CLIENTES ON (CLIENTES.ID = ' + 'MACEN)'#10'WHERE PEDIDOS_PROVEEDOR.ID = :ID'#10
'CONTRATOS_CLIENTE.ID_CLIENTE)'#10' LEFT OUTER JOIN ALMACENES ON (AL' +
'MACENES.ID = PEDIDOS_PROVEEDOR.ID_ALMACEN)'#10'WHERE PEDIDOS_PROVEED' +
'OR.ID = :ID'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = < ColumnMappings = <
item item
@ -465,7 +462,7 @@ object RptPedidosProveedor: TRptPedidosProveedor
PrintOptions.Printer = 'Por defecto' PrintOptions.Printer = 'Por defecto'
PrintOptions.PrintOnSheet = 0 PrintOptions.PrintOnSheet = 0
ReportOptions.CreateDate = 39065.872423495400000000 ReportOptions.CreateDate = 39065.872423495400000000
ReportOptions.LastChange = 42481.774581759260000000 ReportOptions.LastChange = 42573.662110995400000000
ScriptLanguage = 'PascalScript' ScriptLanguage = 'PascalScript'
ShowProgress = False ShowProgress = False
StoreInDFM = False StoreInDFM = False

View File

@ -49,27 +49,27 @@
<DelphiCompile Include="PedidosProveedor_view.dpk"> <DelphiCompile Include="PedidosProveedor_view.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\..\Lib\Almacenes_controller.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\Almacenes_controller.dcp" />
<DCCReference Include="..\..\Lib\Almacenes_model.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\Almacenes_model.dcp" />
<DCCReference Include="..\..\Lib\Articulos_view.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\Articulos_view.dcp" />
<DCCReference Include="..\..\Lib\Contactos_view.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\Contactos_view.dcp" />
<DCCReference Include="..\..\Lib\ContratosCliente_controller.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\ContratosCliente_controller.dcp" />
<DCCReference Include="..\..\Lib\ContratosCliente_model.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\ContratosCliente_model.dcp" />
<DCCReference Include="..\..\Lib\cxLibraryD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\cxLibraryD11.dcp" />
<DCCReference Include="..\..\Lib\dxCoreD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dxCoreD11.dcp" />
<DCCReference Include="..\..\Lib\dxGDIPlusD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dxGDIPlusD11.dcp" />
<DCCReference Include="..\..\Lib\dxThemeD11.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\dxThemeD11.dcp" />
<DCCReference Include="..\..\Lib\GUIBase.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\GUIBase.dcp" />
<DCCReference Include="..\..\Lib\PedidosProveedor_controller.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\PedidosProveedor_controller.dcp" />
<DCCReference Include="..\..\Lib\PedidosProveedor_model.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\PedidosProveedor_model.dcp" />
<DCCReference Include="..\..\Lib\PngComponentsD10.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\PngComponentsD10.dcp" />
<DCCReference Include="..\..\Lib\PNG_D10.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\PNG_D10.dcp" />
<DCCReference Include="..\..\Lib\rtl.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
<DCCReference Include="..\..\Lib\tb2k_d10.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\tb2k_d10.dcp" />
<DCCReference Include="..\..\Lib\tbx_d10.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\tbx_d10.dcp" />
<DCCReference Include="..\..\Lib\vcl.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" />
<DCCReference Include="..\..\Lib\vclactnband.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\vclactnband.dcp" />
<DCCReference Include="..\..\Lib\vclx.dcp" /> <DCCReference Include="C:\Documents and Settings\Usuario\vclx.dcp" />
<DCCReference Include="uEditorDireccionEntregaPedidoProveedor.pas"> <DCCReference Include="uEditorDireccionEntregaPedidoProveedor.pas">
<Form>fEditorDireccionEntregaPedidoProveedor </Form> <Form>fEditorDireccionEntregaPedidoProveedor </Form>
<DesignClass>TfEditorDireccionEntregaPedidoProveedor</DesignClass> <DesignClass>TfEditorDireccionEntregaPedidoProveedor</DesignClass>

View File

@ -56,11 +56,9 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
ExplicitWidth = 700 ExplicitWidth = 700
end end
inherited TBXTMain2: TTBXToolbar inherited TBXTMain2: TTBXToolbar
Left = 343
DockPos = 343 DockPos = 343
Visible = True Visible = True
ExplicitLeft = 343 ExplicitWidth = 156
ExplicitWidth = 119
object TBXItem39: TTBXItem object TBXItem39: TTBXItem
Action = actRecibirPedido Action = actRecibirPedido
DisplayMode = nbdmImageAndText DisplayMode = nbdmImageAndText
@ -75,9 +73,9 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
end end
inline frViewPedidosProveedor1: TfrViewPedidosProveedor [3] inline frViewPedidosProveedor1: TfrViewPedidosProveedor [3]
Left = 0 Left = 0
Top = 102 Top = 116
Width = 700 Width = 700
Height = 478 Height = 464
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -87,14 +85,14 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
ParentFont = False ParentFont = False
TabOrder = 3 TabOrder = 3
ReadOnly = False ReadOnly = False
ExplicitTop = 102 ExplicitTop = 116
ExplicitWidth = 700 ExplicitWidth = 700
ExplicitHeight = 478 ExplicitHeight = 464
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 700 Width = 700
Height = 350 Height = 336
ExplicitWidth = 700 ExplicitWidth = 700
ExplicitHeight = 350 ExplicitHeight = 336
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
DataController.Summary.DefaultGroupSummaryItems = < DataController.Summary.DefaultGroupSummaryItems = <
item item
@ -128,27 +126,15 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
Width = 700 Width = 700
ExplicitWidth = 700 ExplicitWidth = 700
inherited txtFiltroTodo: TcxTextEdit inherited txtFiltroTodo: TcxTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 457 ExplicitWidth = 457
Width = 457 Width = 457
end end
inherited edtFechaIniFiltro: TcxDateEdit inherited edtFechaIniFiltro: TcxDateEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 240 ExplicitWidth = 240
Width = 240 Width = 240
end end
inherited edtFechaFinFiltro: TcxDateEdit inherited edtFechaFinFiltro: TcxDateEdit
Left = 371 Left = 371
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 371 ExplicitLeft = 371
ExplicitWidth = 294 ExplicitWidth = 294
Width = 294 Width = 294
@ -168,8 +154,8 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
end end
end end
inherited pnlAgrupaciones: TTBXDockablePanel inherited pnlAgrupaciones: TTBXDockablePanel
Top = 452 Top = 438
ExplicitTop = 452 ExplicitTop = 438
ExplicitWidth = 700 ExplicitWidth = 700
inherited TBXAlignmentPanel1: TTBXAlignmentPanel inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 700 Width = 700
@ -206,10 +192,6 @@ inherited fEditorPedidosProveedor: TfEditorPedidosProveedor
inherited actImprimir: TAction inherited actImprimir: TAction
Visible = True Visible = True
end end
inherited actDuplicar: TAction
Enabled = False
Visible = False
end
inherited actAnchoAuto: TAction inherited actAnchoAuto: TAction
ImageIndex = 22 ImageIndex = 22
end end

View File

@ -154,10 +154,10 @@ begin
end; end;
procedure TfEditorPedidosProveedor.DuplicarInterno; procedure TfEditorPedidosProveedor.DuplicarInterno;
{var var
APedido : IBizPedidoProveedor;} APedido : IBizPedidoProveedor;
begin begin
{
inherited; inherited;
APedido := FController.Duplicar(Pedidos); APedido := FController.Duplicar(Pedidos);
try try
@ -165,7 +165,6 @@ begin
finally finally
actRefrescar.Execute; actRefrescar.Execute;
end; end;
}
end; end;
procedure TfEditorPedidosProveedor.EliminarInterno; procedure TfEditorPedidosProveedor.EliminarInterno;
@ -305,7 +304,11 @@ procedure TfEditorPedidosProveedor.PonerTitulos(const ATitulo: string);
var var
FTitulo : String; FTitulo : String;
begin begin
FTitulo := FWindowCaption + AppFactuGES.EmpresaActiva.NOMBRE; if (ATitulo = '') then
FTitulo := 'Lista de pedidos a proveedor - ' + AppFactuGES.EmpresaActiva.NOMBRE
else
FTitulo := ATitulo;
inherited PonerTitulos(FTitulo); inherited PonerTitulos(FTitulo);
end; end;

View File

@ -1,9 +1,102 @@
inherited frViewDetallesPedidoProveedor: TfrViewDetallesPedidoProveedor inherited frViewDetallesPedidoProveedor: TfrViewDetallesPedidoProveedor
Width = 1039
Height = 727
inherited ToolBar1: TToolBar
Width = 1039
Height = 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 inherited cxGrid: TcxGrid
Top = 53
Width = 1039
Height = 674
ExplicitTop = 75
ExplicitHeight = 229
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
inherited cxGridViewIMPORTENETO: TcxGridDBColumn inherited cxGridViewIMPORTENETO: TcxGridDBColumn
Properties.ReadOnly = False Properties.ReadOnly = False
end end
end end
end end
inherited TBXDock1: TTBXDock
Top = 24
Width = 1039
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 731
end
end
end end

View File

@ -23,6 +23,7 @@ inherited frViewDireccionEntregaPedidoProv: TfrViewDireccionEntregaPedidoProv
Height = 17 Height = 17
Action = actLista Action = actLista
TabOrder = 0 TabOrder = 0
TabStop = True
end end
object rdxDestino2: TRadioButton object rdxDestino2: TRadioButton
Left = 10 Left = 10
@ -87,9 +88,7 @@ inherited frViewDireccionEntregaPedidoProv: TfrViewDireccionEntregaPedidoProv
Top = 60 Top = 60
Width = 566 Width = 566
Height = 17 Height = 17
Action = actLista Action = actListaCliente
Caption = 'Enviar a esta direcci'#243'n del cliente:'
Enabled = False
TabOrder = 2 TabOrder = 2
end end
object cbListaDireccionesCliente: TcxDBLookupComboBox object cbListaDireccionesCliente: TcxDBLookupComboBox
@ -110,7 +109,7 @@ inherited frViewDireccionEntregaPedidoProv: TfrViewDireccionEntregaPedidoProv
Properties.ListOptions.GridLines = glNone Properties.ListOptions.GridLines = glNone
Properties.ListOptions.ShowHeader = False Properties.ListOptions.ShowHeader = False
Properties.ListOptions.SyncMode = True Properties.ListOptions.SyncMode = True
Properties.ListSource = dsAlmacenes Properties.ListSource = dsDireccionesCliente
Properties.PostPopupValueOnTab = True Properties.PostPopupValueOnTab = True
Style.BorderColor = clWindowFrame Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D Style.BorderStyle = ebs3D
@ -195,6 +194,11 @@ inherited frViewDireccionEntregaPedidoProv: TfrViewDireccionEntregaPedidoProv
GroupIndex = 1 GroupIndex = 1
OnExecute = actOtroExecute OnExecute = actOtroExecute
end end
object actListaCliente: TAction
Caption = 'Enviar a esta direcci'#243'n del cliente:'
GroupIndex = 1
OnExecute = actListaClienteExecute
end
end end
object dsPedido: TDADataSource object dsPedido: TDADataSource
Left = 280 Left = 280

View File

@ -9,7 +9,7 @@ uses
cxDBLookupEdit, cxDBLookupComboBox, StdCtrls, cxControls, DB, uDADataTable, cxDBLookupEdit, cxDBLookupComboBox, StdCtrls, cxControls, DB, uDADataTable,
ActnList, uBizAlmacenes, uAlmacenesController, uPedidosProveedorController, ActnList, uBizAlmacenes, uAlmacenesController, uPedidosProveedorController,
Buttons, uDAInterfaces, uClientesController, uDireccionesContactoController, Buttons, uDAInterfaces, uClientesController, uDireccionesContactoController,
uBizDireccionesContacto; uBizDireccionesContacto, uBizContratosCliente, uContratosClienteController;
type type
IViewDireccionEntregaPedidoProv = interface(IViewBase) IViewDireccionEntregaPedidoProv = interface(IViewBase)
@ -17,6 +17,7 @@ type
function GetPedidoProveedor: IBizPedidoProveedor; function GetPedidoProveedor: IBizPedidoProveedor;
procedure SetPedidoProveedor(const Value: IBizPedidoProveedor); procedure SetPedidoProveedor(const Value: IBizPedidoProveedor);
property PedidoProveedor: IBizPedidoProveedor read GetPedidoProveedor write SetPedidoProveedor; property PedidoProveedor: IBizPedidoProveedor read GetPedidoProveedor write SetPedidoProveedor;
procedure RefrescarDireccion;
end; end;
TfrViewDireccionEntregaPedidoProv = class(TfrViewBase, IViewDireccionEntregaPedidoProv) TfrViewDireccionEntregaPedidoProv = class(TfrViewBase, IViewDireccionEntregaPedidoProv)
@ -42,31 +43,33 @@ type
dxLayoutControl1Item6: TdxLayoutItem; dxLayoutControl1Item6: TdxLayoutItem;
cbListaDireccionesCliente: TcxDBLookupComboBox; cbListaDireccionesCliente: TcxDBLookupComboBox;
dsDireccionesCliente: TDADataSource; dsDireccionesCliente: TDADataSource;
actListaCliente: TAction;
procedure actListaExecute(Sender: TObject); procedure actListaExecute(Sender: TObject);
procedure actOtroExecute(Sender: TObject); procedure actOtroExecute(Sender: TObject);
procedure cbListaPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean); procedure cbListaPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
procedure cbListaDireccionesClientePropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean); procedure cbListaDireccionesClientePropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
procedure bModificarClick(Sender: TObject); procedure bModificarClick(Sender: TObject);
procedure txtDireccionDblClick(Sender: TObject); procedure txtDireccionDblClick(Sender: TObject);
procedure actListaClienteExecute(Sender: TObject);
protected protected
FAlmacenesController : IAlmacenesController; FAlmacenesController : IAlmacenesController;
FAlmacenes: IBizAlmacen; FAlmacenes: IBizAlmacen;
FClientesController: IClientesController; FClientesController: IClientesController;
FDireccionesClienteController : IDireccionesContactoController;
FDireccionesCliente : IBizDireccionesContacto; FDireccionesCliente : IBizDireccionesContacto;
FPedido : IBizPedidoProveedor; FPedido : IBizPedidoProveedor;
FController : IPedidosProveedorController; FController : IPedidosProveedorController;
function GetPedidoProveedor: IBizPedidoProveedor; function GetPedidoProveedor: IBizPedidoProveedor;
procedure SetPedidoProveedor(const Value: IBizPedidoProveedor); procedure SetPedidoProveedor(const Value: IBizPedidoProveedor);
procedure CambioDireccionAlmacen; procedure CambioDireccionAlmacen;
procedure CambioDireccionCliente; procedure CambioDireccionCliente;
procedure RefrescarDireccion; procedure RecuperarClienteAsociado;
procedure SetReadOnly(Value: Boolean); override; procedure SetReadOnly(Value: Boolean); override;
public public
property PedidoProveedor: IBizPedidoProveedor read GetPedidoProveedor write SetPedidoProveedor; property PedidoProveedor: IBizPedidoProveedor read GetPedidoProveedor write SetPedidoProveedor;
constructor Create(AOwner: TComponent); override; constructor Create(AOwner: TComponent); override;
destructor Destroy; override; destructor Destroy; override;
procedure RefrescarDireccion;
end; end;
implementation implementation
@ -74,7 +77,15 @@ implementation
{$R *.dfm} {$R *.dfm}
uses uses
uEditorRegistryUtils, uCustomView, uStringsUtils; uEditorRegistryUtils, uCustomView, uStringsUtils, uFactuGES_App;
procedure TfrViewDireccionEntregaPedidoProv.actListaClienteExecute(
Sender: TObject);
begin
inherited;
actListaCliente.Checked := True;
RefrescarDireccion;
end;
procedure TfrViewDireccionEntregaPedidoProv.actListaExecute(Sender: TObject); procedure TfrViewDireccionEntregaPedidoProv.actListaExecute(Sender: TObject);
begin begin
@ -108,8 +119,7 @@ end;
procedure TfrViewDireccionEntregaPedidoProv.CambioDireccionAlmacen; procedure TfrViewDireccionEntregaPedidoProv.CambioDireccionAlmacen;
begin begin
if Assigned(FPedido) if Assigned(FPedido) and Assigned(FAlmacenes) then
and Assigned(FAlmacenes) then
begin begin
FPedido.Edit; FPedido.Edit;
FPedido.CALLE := FAlmacenes.CALLE; FPedido.CALLE := FAlmacenes.CALLE;
@ -117,15 +127,22 @@ begin
FPedido.POBLACION := FAlmacenes.POBLACION; FPedido.POBLACION := FAlmacenes.POBLACION;
FPedido.PROVINCIA := FAlmacenes.PROVINCIA; FPedido.PROVINCIA := FAlmacenes.PROVINCIA;
FPedido.CODIGO_POSTAL := FAlmacenes.CODIGO_POSTAL; FPedido.CODIGO_POSTAL := FAlmacenes.CODIGO_POSTAL;
FPedido.PERSONA_CONTACTO := FAlmacenes.PERSONA_CONTACTO;
FPedido.TELEFONO := FAlmacenes.TELEFONO;
RefrescarDireccion; RefrescarDireccion;
end; end;
end; end;
procedure TfrViewDireccionEntregaPedidoProv.CambioDireccionCliente; procedure TfrViewDireccionEntregaPedidoProv.CambioDireccionCliente;
begin begin
// if Assigned(FPedido) and Assigned(FDireccionesCliente) then
begin
FPedido.Edit;
FPedido.CALLE := FDireccionesCliente.CALLE;
FPedido.POBLACION := FDireccionesCliente.POBLACION;
FPedido.POBLACION := FDireccionesCliente.POBLACION;
FPedido.PROVINCIA := FDireccionesCliente.PROVINCIA;
FPedido.CODIGO_POSTAL := FDireccionesCliente.CODIGO_POSTAL;
RefrescarDireccion;
end;
end; end;
procedure TfrViewDireccionEntregaPedidoProv.cbListaDireccionesClientePropertiesValidate( procedure TfrViewDireccionEntregaPedidoProv.cbListaDireccionesClientePropertiesValidate(
@ -155,15 +172,18 @@ begin
FAlmacenes.DataTable.Active := True; FAlmacenes.DataTable.Active := True;
dsAlmacenes.DataTable := FAlmacenes.DataTable; dsAlmacenes.DataTable := FAlmacenes.DataTable;
FDireccionesClienteController := TDireccionesContactoController.Create;
FDireccionesCliente := NIL; FDireccionesCliente := NIL;
// dsDireccionesCliente.DataTable := FDireccionesCliente.DataTable; dsDireccionesCliente.DataTable := NIL;
end; end;
destructor TfrViewDireccionEntregaPedidoProv.Destroy; destructor TfrViewDireccionEntregaPedidoProv.Destroy;
begin begin
cbListaDireccionesCliente.Properties.OnValidate := Nil; cbListaDireccionesCliente.Properties.OnValidate := Nil;
cbLista.Properties.OnValidate := Nil; cbLista.Properties.OnValidate := Nil;
FDireccionesCliente := NIL;
dsDireccionesCliente.DataTable := NIL;
FAlmacenesController := Nil; FAlmacenesController := Nil;
FAlmacenes := Nil; FAlmacenes := Nil;
FController := NIL; FController := NIL;
@ -175,6 +195,32 @@ begin
Result := FPedido; Result := FPedido;
end; end;
procedure TfrViewDireccionEntregaPedidoProv.RecuperarClienteAsociado;
var
AContratoController : IContratosClienteController;
AContrato : IBizContratoCliente;
begin
FDireccionesCliente := NIL;
dsDireccionesCliente.DataTable := NIL;
if (FPedido.ID_CONTRATO_CLIENTE > 0) then
begin
AContratoController := TContratosClienteController.Create;
try
AContrato := AContratoController.Buscar(FPedido.ID_CONTRATO_CLIENTE);
if Assigned(AContrato) then
begin
AContrato.DataTable.Active := True;
AContratoController.RecuperarCliente(AContrato);
FDireccionesCliente := AContrato._Cliente.Direcciones;
end;
finally
AContratoController := NIL;
AContrato := NIL;
end;
end
end;
procedure TfrViewDireccionEntregaPedidoProv.RefrescarDireccion; procedure TfrViewDireccionEntregaPedidoProv.RefrescarDireccion;
begin begin
txtDireccion.Caption := ''; txtDireccion.Caption := '';
@ -184,22 +230,44 @@ begin
txtDireccion.Caption := FPedido.CALLE; txtDireccion.Caption := FPedido.CALLE;
txtDireccion.Caption := txtDireccion.Caption + #13#10 + FPedido.CODIGO_POSTAL + ' ' + FPedido.POBLACION; txtDireccion.Caption := txtDireccion.Caption + #13#10 + FPedido.CODIGO_POSTAL + ' ' + FPedido.POBLACION;
txtDireccion.Caption := txtDireccion.Caption + #13#10 + FPedido.PROVINCIA; 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;
txtDireccion.Caption := txtDireccion.Caption + #13#10 + 'Persona contacto: ' + FPedido.PERSONA_CONTACTO; txtDireccion.Caption := txtDireccion.Caption + #13#10 + 'Teléfono: ' + FPedido.TELEFONO;
if not esCadenaVacia(FPedido.TELEFONO) then
txtDireccion.Caption := txtDireccion.Caption + #13#10 + 'Teléfono: ' + FPedido.TELEFONO;
if (actOtro.Checked) then if (actOtro.Checked) then
begin begin
txtDireccion.Enabled := True;
bModificar.Enabled := True;
cbLista.Enabled := False; cbLista.Enabled := False;
cbLista.Text := ''; cbLista.Text := '';
bModificar.Enabled := True;
cbListaDireccionesCliente.Enabled := False;
cbListaDireccionesCliente.Text := '';
end end
else begin else begin
txtDireccion.Enabled := False; if (actListaCliente.Checked) then
cbLista.Enabled := True; begin
cbLista.DroppedDown := True; cbListaDireccionesCliente.Enabled := True;
bModificar.Enabled := False; cbListaDireccionesCliente.DroppedDown := True;
cbLista.Enabled := False;
cbLista.Text := '';
txtDireccion.Enabled := False;
bModificar.Enabled := False;
end
else begin
cbLista.Enabled := True;
cbLista.DroppedDown := True;
cbListaDireccionesCliente.Enabled := False;
cbListaDireccionesCliente.Text := '';
txtDireccion.Enabled := False;
bModificar.Enabled := False;
end;
end; end;
end; end;
end; end;
@ -215,7 +283,13 @@ begin
dsPedido.DataTable := FPedido.DataTable; dsPedido.DataTable := FPedido.DataTable;
cbLista.Properties.OnValidate := cbListaPropertiesValidate; cbLista.Properties.OnValidate := cbListaPropertiesValidate;
cbListaDireccionesCliente.Properties.OnValidate := cbListaDireccionesClientePropertiesValidate;
RecuperarClienteAsociado;
if Assigned(FDireccionesCliente) then
begin
dsDireccionesCliente.DataTable := FDireccionesCliente.DataTable;
cbListaDireccionesCliente.Properties.OnValidate := cbListaDireccionesClientePropertiesValidate;
end;
if (FPedido.ID_ALMACEN < 1) then if (FPedido.ID_ALMACEN < 1) then
actOtro.Checked := True actOtro.Checked := True
@ -231,6 +305,7 @@ begin
if ReadOnly then if ReadOnly then
begin begin
rdxDestino1.Enabled := False; rdxDestino1.Enabled := False;
rdxDestinoCliente.Enabled := False;
rdxDestino2.Enabled := False; rdxDestino2.Enabled := False;
end; end;
end; end;

View File

@ -39,7 +39,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
Width = 357 Width = 357
Height = 215 Height = 215
Align = alClient Align = alClient
ExplicitWidth = 335 ExplicitWidth = 357
ExplicitHeight = 215 ExplicitHeight = 215
inherited edtlNombre: TcxDBTextEdit inherited edtlNombre: TcxDBTextEdit
ExplicitWidth = 283 ExplicitWidth = 283
@ -178,8 +178,8 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 273 Width = 273
Height = 166 Height = 166
ExplicitWidth = 525 ExplicitWidth = 273
ExplicitHeight = 116 ExplicitHeight = 166
inherited rdxDestino1: TRadioButton inherited rdxDestino1: TRadioButton
Width = 255 Width = 255
ExplicitWidth = 255 ExplicitWidth = 255
@ -326,7 +326,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
ExplicitHeight = 46 ExplicitHeight = 46
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 357 Width = 357
ExplicitWidth = 335 ExplicitWidth = 357
end end
end end
inline frViewObservaciones1: TfrViewObservaciones inline frViewObservaciones1: TfrViewObservaciones
@ -351,7 +351,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
inherited memObservaciones: TcxDBMemo inherited memObservaciones: TcxDBMemo
DataBinding.DataField = 'OBSERVACIONES' DataBinding.DataField = 'OBSERVACIONES'
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
ExplicitWidth = 389 ExplicitWidth = 422
ExplicitHeight = 90 ExplicitHeight = 90
Height = 90 Height = 90
Width = 422 Width = 422
@ -406,6 +406,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
Top = 219 Top = 219
DataBinding.DataField = 'ID_VENDEDOR' DataBinding.DataField = 'ID_VENDEDOR'
DataBinding.DataSource = DADataSource DataBinding.DataSource = DADataSource
Properties.ImmediatePost = True
Properties.KeyFieldNames = 'ID' Properties.KeyFieldNames = 'ID'
Properties.ListColumns = < Properties.ListColumns = <
item item

View File

@ -479,6 +479,7 @@ begin
REFERENCIA := ''; REFERENCIA := '';
SITUACION := SITUACION_PRESUPUESTO_PENDIENTE; SITUACION := SITUACION_PRESUPUESTO_PENDIENTE;
end; end;
Result.AsignarVendedor;
Result.Post; Result.Post;
finally finally
HideHourglassCursor; HideHourglassCursor;
@ -726,6 +727,7 @@ procedure TPresupuestosClienteController.EnviarPresupuestoPorEMail(
var var
AReportController : IPresupuestosClienteReportController; AReportController : IPresupuestosClienteReportController;
AFicheroTMP : TFileName; AFicheroTMP : TFileName;
ATituloEnvio : String;
AEMail : String; AEMail : String;
AListaEmail : TStringList; AListaEmail : TStringList;
begin begin
@ -735,8 +737,6 @@ begin
if APresupuesto.DataTable.Active then if APresupuesto.DataTable.Active then
APresupuesto.DataTable.Active := True; APresupuesto.DataTable.Active := True;
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(APresupuesto.REFERENCIA));
AListaEmail := TStringList.Create; AListaEmail := TStringList.Create;
try try
RecuperarCliente(APresupuesto); RecuperarCliente(APresupuesto);
@ -754,10 +754,12 @@ begin
end; end;
ShowHourglassCursor; ShowHourglassCursor;
ATituloEnvio := 'Presupuesto ' + APresupuesto.Cliente.NOMBRE + ' - ' + APresupuesto.REFERENCIA_CLIENTE;
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(ATituloEnvio));
AReportController := TPresupuestosClienteReportController.Create; AReportController := TPresupuestosClienteReportController.Create;
try try
AReportController.ExportToPDF(APresupuesto.ID, AFicheroTMP); AReportController.ExportToPDF(APresupuesto.ID, AFicheroTMP);
SendMailMAPI('Presupuesto ' + APresupuesto.REFERENCIA, '', AFicheroTMP, '', '', APresupuesto.Cliente.NOMBRE, AEMail); SendMailMAPI(ATituloEnvio, '', AFicheroTMP, '', '', APresupuesto.Cliente.NOMBRE, AEMail);
finally finally
DeleteFile(AFicheroTMP); DeleteFile(AFicheroTMP);
AReportController := NIL; AReportController := NIL;

View File

@ -34,6 +34,7 @@ type
property Detalles: IBizDetallesPresupuestoCliente read GetDetalles write SetDetalles; property Detalles: IBizDetallesPresupuestoCliente read GetDetalles write SetDetalles;
procedure CalcularImporteTotal; procedure CalcularImporteTotal;
procedure AsignarVendedor;
function EsNuevo : Boolean; function EsNuevo : Boolean;
function DarListaSituaciones: TStringList; function DarListaSituaciones: TStringList;
@ -45,7 +46,6 @@ type
procedure CalcularIVA; procedure CalcularIVA;
procedure CalcularRE; procedure CalcularRE;
procedure AsignarTipoIVA (IDTipoIVA : Integer); procedure AsignarTipoIVA (IDTipoIVA : Integer);
procedure AsignarVendedor;
protected protected
FSeleccionableInterface : ISeleccionable; FSeleccionableInterface : ISeleccionable;
@ -82,6 +82,8 @@ type
public public
function DarListaSituaciones: TStringList; function DarListaSituaciones: TStringList;
function EsNuevo : Boolean; function EsNuevo : Boolean;
procedure AsignarVendedor;
procedure CalcularImporteTotal; procedure CalcularImporteTotal;
property Cliente : IBizCliente read GetCliente write SetCliente; property Cliente : IBizCliente read GetCliente write SetCliente;
property _Cliente : IBizCliente read _GetCliente write _SetCliente; property _Cliente : IBizCliente read _GetCliente write _SetCliente;

View File

@ -28,7 +28,7 @@
<Borland.Personality>Delphi.Personality</Borland.Personality> <Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType/> <Borland.ProjectType/>
<BorlandProject> <BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">2</VersionInfo><VersionInfo Name="MinorVer">7</VersionInfo><VersionInfo Name="Release">3</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">2.7.3.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES (Servidor)</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">2.7.3.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">miércoles, 01 de junio de 2016 9:42</VersionInfoKeys></VersionInfoKeys><Excluded_Packages> <BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">2</VersionInfo><VersionInfo Name="MinorVer">7</VersionInfo><VersionInfo Name="Release">4</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">2.7.4.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES (Servidor)</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">2.7.4.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">viernes, 22 de julio de 2016 15:45</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages> <Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">FactuGES_Server.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject> </Excluded_Packages><Source><Source Name="MainSource">FactuGES_Server.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions> </ProjectExtensions>

View File

@ -1,7 +1,7 @@
MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Servidor.ico" MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Servidor.ico"
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 2,7,3,0 FILEVERSION 2,7,4,0
PRODUCTVERSION 2,7,3,0 PRODUCTVERSION 2,7,4,0
FILEFLAGSMASK 0x3FL FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L FILEFLAGS 0x00L
FILEOS 0x40004L FILEOS 0x40004L
@ -13,10 +13,10 @@ BEGIN
BLOCK "0C0A04E4" BLOCK "0C0A04E4"
BEGIN BEGIN
VALUE "CompanyName", "Rodax Software S.L.\0" VALUE "CompanyName", "Rodax Software S.L.\0"
VALUE "FileVersion", "2.7.3.0\0" VALUE "FileVersion", "2.7.4.0\0"
VALUE "ProductName", "FactuGES (Servidor)\0" VALUE "ProductName", "FactuGES (Servidor)\0"
VALUE "ProductVersion", "2.7.3.0\0" VALUE "ProductVersion", "2.7.4.0\0"
VALUE "CompileDate", "miércoles, 01 de junio de 2016 9:47\0" VALUE "CompileDate", "viernes, 22 de julio de 2016 18:53\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

Binary file not shown.