#12 -> Enviar documentos por correo electrónico. Presupuestos y albaranes de cliente.
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@531 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
eba6454bce
commit
1b741365bc
@ -107,13 +107,13 @@ begin
|
||||
begin
|
||||
if not IsValidEmail(edtEMail.Text) then
|
||||
begin
|
||||
ShowErrorMessage('Elegir dirección de correo electrónico', 'La dirección de correo electrónica no es válida. Compruebe que está bien escrita.');
|
||||
ShowErrorMessage('La dirección de correo electrónica no es válida', 'Para poder continuar, compruebe que ha indicado una dirección de correo y que está bien escrita.');
|
||||
edtEMail.SetFocus;
|
||||
CanClose := False;
|
||||
end;
|
||||
end
|
||||
else begin
|
||||
ShowErrorMessage('Elegir dirección de correo electrónico', 'Debe indicar una dirección de correo electrónico.');
|
||||
ShowErrorMessage('Debe indicar una dirección de correo electrónico.', 'Para poder continuar debe elegir o indicar una dirección de correo electrónico.');
|
||||
edtEMail.SetFocus;
|
||||
CanClose := False;
|
||||
end;
|
||||
|
||||
@ -54,6 +54,7 @@ type
|
||||
procedure CopiarDireccionEnvio (const ADireccionEnvio: IBizDireccionesContacto;
|
||||
AAlbaran: IBizAlbaranCliente);
|
||||
procedure QuitarDireccionEnvio(AAlbaran: IBizAlbaranCliente);
|
||||
procedure EnviarAlbaranPorEMail(AAlbaran : IBizAlbaranCliente);
|
||||
procedure RecuperarCliente(AAlbaran: IBizAlbaranCliente);
|
||||
function CambiarSituacion(AAlbaran : IBizAlbaranCliente;
|
||||
ANuevaSituacion: String; AFechaEnvio : TDateTime = 0;
|
||||
@ -127,6 +128,7 @@ type
|
||||
function EsModificable(AAlbaran: IBizAlbaranCliente): Boolean;
|
||||
function EsEliminable(AAlbaran: IBizAlbaranCliente): Boolean;
|
||||
|
||||
procedure EnviarAlbaranPorEMail(AAlbaran : IBizAlbaranCliente);
|
||||
function CambiarSituacion(AAlbaran : IBizAlbaranCliente;
|
||||
ANuevaSituacion: String; AFechaEnvio : TDateTime = 0;
|
||||
AFechaRecibido : TDateTime = 0;
|
||||
@ -152,7 +154,8 @@ uses
|
||||
// Pedidos no estará en TECSITEL
|
||||
// uPedidosClienteController, uBizPedidosCliente, uBizDetallesPedidoCliente, schPedidosClienteClient_Intf,
|
||||
|
||||
uDialogUtils, Windows, Forms, Dialogs, uGUIBase, uIntegerListUtils;
|
||||
uDialogUtils, Windows, Forms, Dialogs, uGUIBase, uIntegerListUtils,
|
||||
uSistemaFunc, uEMailUtils, uDialogElegirEMail;
|
||||
|
||||
|
||||
|
||||
@ -738,6 +741,51 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TAlbaranesClienteController.EnviarAlbaranPorEMail(
|
||||
AAlbaran: IBizAlbaranCliente);
|
||||
var
|
||||
AReportController : IAlbaranesClienteReportController;
|
||||
AFicheroTMP : TFileName;
|
||||
AEMail : String;
|
||||
AListaEmail : TStringList;
|
||||
begin
|
||||
if not Assigned(AAlbaran) then
|
||||
raise Exception.Create ('Albarán no asignado (EnviarAlbaranPorEMail)');
|
||||
|
||||
if AAlbaran.DataTable.Active then
|
||||
AAlbaran.DataTable.Active := True;
|
||||
|
||||
AFicheroTMP := DarFicheroPDFTemporal(EscapeIllegalChars(AAlbaran.REFERENCIA));
|
||||
|
||||
AListaEmail := TStringList.Create;
|
||||
try
|
||||
RecuperarCliente(AAlbaran);
|
||||
AAlbaran.Cliente.DataTable.Active := True;
|
||||
|
||||
if not AAlbaran.Cliente.EMAIL_1IsNull then
|
||||
AListaEmail.Add(AAlbaran.Cliente.EMAIL_1);
|
||||
if not AAlbaran.Cliente.EMAIL_2IsNull then
|
||||
AListaEmail.Add(AAlbaran.Cliente.EMAIL_2);
|
||||
|
||||
if not ElegirEMail(AListaEmail, AEMail) then
|
||||
Exit;
|
||||
finally
|
||||
FreeANDNIL(AListaEmail);
|
||||
end;
|
||||
|
||||
ShowHourglassCursor;
|
||||
AReportController := TAlbaranesClienteReportController.Create;
|
||||
try
|
||||
AReportController.ExportToPDF(AAlbaran.ID, AFicheroTMP);
|
||||
SendMailMAPI('Albarán ' + AAlbaran.REFERENCIA, '', AFicheroTMP, '', '', AAlbaran.Cliente.NOMBRE, AEMail);
|
||||
finally
|
||||
SysUtils.DeleteFile(AFicheroTMP);
|
||||
AReportController := NIL;
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function TAlbaranesClienteController.EsEliminable(AAlbaran: IBizAlbaranCliente): Boolean;
|
||||
begin
|
||||
if not Assigned(AAlbaran) then
|
||||
|
||||
@ -14,7 +14,8 @@ type
|
||||
procedure Print(const AListaID : TIntegerList);
|
||||
procedure EtiquetasPreview(const AID : integer; Const withRefCliente: Boolean);
|
||||
procedure EtiquetasPrint(const AID : integer; Const withRefCliente: Boolean);
|
||||
function ExportToWord(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
function ExportToWord(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
end;
|
||||
|
||||
TAlbaranesClienteReportController = class(TControllerBase, IAlbaranesClienteReportController)
|
||||
@ -29,6 +30,7 @@ type
|
||||
procedure Preview(const AListaID : TIntegerList);
|
||||
procedure Print(const AListaID : TIntegerList);
|
||||
function ExportToWord(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean;
|
||||
procedure EtiquetasPreview(const AID : integer; const withRefCliente: Boolean);
|
||||
procedure EtiquetasPrint(const AID : integer; const withRefCliente: Boolean);
|
||||
end;
|
||||
@ -115,6 +117,29 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteReportController.ExportToPDF(const AID: Integer;
|
||||
const AFileName: String): Boolean;
|
||||
var
|
||||
AStream: Binary;
|
||||
begin
|
||||
Result := False;
|
||||
if EsCadenaVacia(AFileName) then
|
||||
Exit;
|
||||
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
AStream := FDataModule.GetRptPDFAlbaran(AID);
|
||||
try
|
||||
AStream.SaveToFile(AFileName);
|
||||
Result := True;
|
||||
finally
|
||||
FreeAndNil(AStream);
|
||||
end;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TAlbaranesClienteReportController.ExportToWord(const AID: Integer;
|
||||
const AFileName: String): Boolean;
|
||||
var
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,8 @@ uses
|
||||
uViewIncidencias, uAlbaranesClienteController, uViewDetallesBase, uViewDetallesAlbaranCliente,
|
||||
dxLayoutLookAndFeels, JvExComCtrls, JvStatusBar, uViewTotales,
|
||||
uIEditorAlbaranCliente, uBizAlbaranesCliente, uViewAlbaranCliente,
|
||||
uViewDetallesDTO, uViewDetallesArticulos, uDAInterfaces;
|
||||
uViewDetallesDTO, uViewDetallesArticulos, uDAInterfaces,
|
||||
uViewDetallesArticulosParaVenta;
|
||||
|
||||
type
|
||||
TfEditorAlbaranCliente = class(TfEditorDBItem, IEditorAlbaranCliente)
|
||||
@ -24,6 +25,11 @@ type
|
||||
dxLayoutOfficeLookAndFeel1: TdxLayoutOfficeLookAndFeel;
|
||||
frViewDetallesAlbaranCliente1: TfrViewDetallesAlbaranCliente;
|
||||
frViewTotales1: TfrViewTotales;
|
||||
actEnviarEMail: TAction;
|
||||
TBXSubmenuItem2: TTBXSubmenuItem;
|
||||
TBXItem7: TTBXItem;
|
||||
TBXItem33: TTBXItem;
|
||||
TBXSeparatorItem6: TTBXSeparatorItem;
|
||||
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
|
||||
@ -34,6 +40,8 @@ type
|
||||
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
|
||||
procedure frViewTotales1edtIVAPropertiesValidate(Sender: TObject;
|
||||
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
|
||||
procedure actEnviarEMailExecute(Sender: TObject);
|
||||
procedure actEnviarEMailUpdate(Sender: TObject);
|
||||
private
|
||||
procedure RecalcularPortePorUnidad;
|
||||
|
||||
@ -86,10 +94,21 @@ uses
|
||||
{
|
||||
**************************** TfEditorAlbaranCliente ****************************
|
||||
}
|
||||
procedure TfEditorAlbaranCliente.actEnviarEMailExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FController.EnviarAlbaranPorEMail(FAlbaran);
|
||||
end;
|
||||
|
||||
procedure TfEditorAlbaranCliente.actEnviarEMailUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
(Sender as TAction).Enabled := HayDatos;
|
||||
end;
|
||||
|
||||
procedure TfEditorAlbaranCliente.AsignarVista;
|
||||
var
|
||||
AViewAlbaranCliente: TfrViewAlbaranCliente;
|
||||
|
||||
begin
|
||||
AViewAlbaranCliente := TfrViewAlbaranCliente.create(Self);
|
||||
with AViewAlbaranCliente do
|
||||
|
||||
@ -37,47 +37,47 @@ inherited fEditorAlbaranDevCliente: TfEditorAlbaranDevCliente
|
||||
end
|
||||
inherited pgPaginas: TPageControl
|
||||
inherited pagContenido: TTabSheet
|
||||
ExplicitLeft = 4
|
||||
ExplicitTop = 24
|
||||
ExplicitWidth = 751
|
||||
ExplicitHeight = 378
|
||||
inherited frViewDetallesAlbaranCliente1: TfrViewDetallesAlbaranCliente
|
||||
inherited ToolBar1: TToolBar
|
||||
inherited FontSize: TEdit
|
||||
Width = 58
|
||||
ExplicitWidth = 58
|
||||
end
|
||||
inherited UpDown1: TUpDown
|
||||
inherited UpDown1: TUpDown [7]
|
||||
Left = 602
|
||||
Top = 0
|
||||
ExplicitLeft = 602
|
||||
ExplicitTop = 0
|
||||
end
|
||||
inherited ToolButton9: TToolButton [9]
|
||||
inherited ToolButton13: TToolButton [8]
|
||||
end
|
||||
inherited ToolButton6: TToolButton
|
||||
Left = 0
|
||||
ExplicitLeft = 0
|
||||
end
|
||||
inherited ToolButton12: TToolButton [10]
|
||||
Left = 145
|
||||
ExplicitLeft = 145
|
||||
inherited ToolButton7: TToolButton
|
||||
Left = 66
|
||||
ExplicitLeft = 66
|
||||
end
|
||||
inherited ToolButton6: TToolButton [11]
|
||||
Left = 153
|
||||
ExplicitLeft = 153
|
||||
inherited ToolButton8: TToolButton
|
||||
Left = 133
|
||||
ExplicitLeft = 133
|
||||
end
|
||||
inherited ToolButton8: TToolButton [12]
|
||||
Left = 219
|
||||
ExplicitLeft = 219
|
||||
inherited ToolButton12: TToolButton
|
||||
Left = 216
|
||||
ExplicitLeft = 216
|
||||
end
|
||||
inherited ToolButton10: TToolButton [13]
|
||||
Left = 302
|
||||
ExplicitLeft = 302
|
||||
inherited ToolButton9: TToolButton
|
||||
Left = 224
|
||||
ExplicitLeft = 224
|
||||
end
|
||||
inherited ToolButton11: TToolButton [14]
|
||||
Left = 427
|
||||
ExplicitLeft = 427
|
||||
inherited ToolButton10: TToolButton
|
||||
Left = 369
|
||||
ExplicitLeft = 369
|
||||
end
|
||||
inherited ToolButton7: TToolButton [15]
|
||||
Left = 568
|
||||
ExplicitLeft = 568
|
||||
inherited ToolButton11: TToolButton
|
||||
Left = 494
|
||||
ExplicitLeft = 494
|
||||
end
|
||||
end
|
||||
inherited cxGridPopupMenu: TcxGridPopupMenu
|
||||
@ -92,10 +92,6 @@ inherited fEditorAlbaranDevCliente: TfEditorAlbaranDevCliente
|
||||
end
|
||||
end
|
||||
inherited pagInicidencias: TTabSheet
|
||||
ExplicitLeft = 4
|
||||
ExplicitTop = 24
|
||||
ExplicitWidth = 751
|
||||
ExplicitHeight = 378
|
||||
inherited frViewIncidenciasCli: TfrViewIncidencias
|
||||
inherited GroupBox1: TGroupBox
|
||||
inherited eIncidencias: TcxDBMemo
|
||||
@ -113,7 +109,9 @@ inherited fEditorAlbaranDevCliente: TfEditorAlbaranDevCliente
|
||||
LookAndFeel = dxLayoutOfficeLookAndFeel1
|
||||
inherited Bevel3: TBevel
|
||||
Left = 351
|
||||
Height = 54
|
||||
ExplicitLeft = 351
|
||||
ExplicitHeight = 54
|
||||
end
|
||||
inherited Bevel4: TBevel
|
||||
Left = 467
|
||||
@ -122,106 +120,62 @@ inherited fEditorAlbaranDevCliente: TfEditorAlbaranDevCliente
|
||||
ExplicitWidth = 285
|
||||
end
|
||||
inherited ImporteDto: TcxDBCurrencyEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
Style.IsFontAssigned = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 151
|
||||
Width = 151
|
||||
end
|
||||
inherited ImporteIVA: TcxDBCurrencyEdit
|
||||
Left = 538
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
Style.IsFontAssigned = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 538
|
||||
ExplicitWidth = 219
|
||||
Width = 219
|
||||
end
|
||||
inherited ImporteTotal: TcxDBCurrencyEdit
|
||||
Left = 468
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
Style.IsFontAssigned = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 468
|
||||
ExplicitWidth = 289
|
||||
Width = 289
|
||||
end
|
||||
inherited edtDescuento: TcxDBSpinEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
Style.IsFontAssigned = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
end
|
||||
inherited edtIVA: TcxDBSpinEdit
|
||||
Left = 467
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
Style.IsFontAssigned = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 467
|
||||
end
|
||||
inherited ImporteBase: TcxDBCurrencyEdit
|
||||
Left = 467
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
Style.IsFontAssigned = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 467
|
||||
ExplicitWidth = 290
|
||||
Width = 290
|
||||
end
|
||||
inherited edtRE: TcxDBSpinEdit
|
||||
Left = 467
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
Style.IsFontAssigned = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 467
|
||||
end
|
||||
inherited ImporteRE: TcxDBCurrencyEdit
|
||||
Left = 538
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
Style.IsFontAssigned = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 538
|
||||
ExplicitWidth = 219
|
||||
Width = 219
|
||||
end
|
||||
inherited eImporteNeto: TcxDBCurrencyEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
Style.IsFontAssigned = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 222
|
||||
Width = 222
|
||||
end
|
||||
inherited ePorte: TcxDBCurrencyEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
Style.IsFontAssigned = True
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 222
|
||||
Width = 222
|
||||
end
|
||||
inherited eIVA: TcxDBLookupComboBox
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 84
|
||||
Width = 84
|
||||
end
|
||||
@ -230,12 +184,7 @@ inherited fEditorAlbaranDevCliente: TfEditorAlbaranDevCliente
|
||||
ExplicitLeft = 203
|
||||
end
|
||||
inherited cbRecargoEquivalencia: TcxDBCheckBox
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 222
|
||||
ExplicitHeight = 21
|
||||
Width = 222
|
||||
end
|
||||
inherited dxLayoutControl1Group_Root: TdxLayoutGroup
|
||||
|
||||
@ -10,7 +10,8 @@ uses
|
||||
JvStatusBar, uViewIncidencias, uCustomView, uViewBase, uViewDetallesBase,
|
||||
uViewDetallesDTO, uViewDetallesArticulos, uViewDetallesAlbaranCliente, TBX,
|
||||
TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent,
|
||||
JvNavigationPane, uIEditorAlbaranDevCliente, uDAInterfaces, dxGDIPlusClasses;
|
||||
JvNavigationPane, uIEditorAlbaranDevCliente, uDAInterfaces, dxGDIPlusClasses,
|
||||
uViewDetallesArticulosParaVenta;
|
||||
|
||||
type
|
||||
TfEditorAlbaranDevCliente = class(TfEditorAlbaranCliente, IEditorAlbaranDevCliente)
|
||||
|
||||
@ -2,7 +2,6 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
|
||||
Caption = 'Lista de albaranes de cliente'
|
||||
ClientWidth = 583
|
||||
ExplicitWidth = 591
|
||||
ExplicitHeight = 240
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||
@ -131,6 +130,12 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
|
||||
end
|
||||
inherited tbxMenu: TTBXToolbar
|
||||
ExplicitWidth = 583
|
||||
object TBXSubmenuItem2: TTBXSubmenuItem [4]
|
||||
Caption = 'A&cciones'
|
||||
object TBXItem39: TTBXItem
|
||||
Action = actEnviarEMail
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited TBXTMain2: TTBXToolbar
|
||||
Visible = True
|
||||
@ -221,6 +226,12 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
|
||||
OnExecute = actGenerarEtiquetasExecute
|
||||
OnUpdate = actGenerarEtiquetasUpdate
|
||||
end
|
||||
object actEnviarEMail: TAction
|
||||
Category = 'Acciones'
|
||||
Caption = 'Enviar por e-mail...'
|
||||
OnExecute = actEnviarEMailExecute
|
||||
OnUpdate = actEnviarEMailUpdate
|
||||
end
|
||||
end
|
||||
inherited SmallImages: TPngImageList
|
||||
PngImages = <
|
||||
@ -1672,6 +1683,9 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente
|
||||
object Generarfactura1: TMenuItem [7]
|
||||
Action = actGenerarFactura
|
||||
end
|
||||
object Enviarporemail1: TMenuItem [12]
|
||||
Action = actEnviarEMail
|
||||
end
|
||||
end
|
||||
object JsNuevoAlbaranDialog: TJSDialog
|
||||
Content.Strings = (
|
||||
|
||||
@ -36,6 +36,10 @@ type
|
||||
actGenerarEtiquetas: TAction;
|
||||
TBXItem38: TTBXItem;
|
||||
JsListaAlbaranesNoEliminados: TJSDialog;
|
||||
actEnviarEMail: TAction;
|
||||
Enviarporemail1: TMenuItem;
|
||||
TBXSubmenuItem2: TTBXSubmenuItem;
|
||||
TBXItem39: TTBXItem;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure actGenerarFacturaUpdate(Sender: TObject);
|
||||
procedure actGenerarFacturaExecute(Sender: TObject);
|
||||
@ -48,6 +52,8 @@ type
|
||||
procedure actConfirmarRecepcionUpdate(Sender: TObject);
|
||||
procedure actGenerarEtiquetasExecute(Sender: TObject);
|
||||
procedure actGenerarEtiquetasUpdate(Sender: TObject);
|
||||
procedure actEnviarEMailExecute(Sender: TObject);
|
||||
procedure actEnviarEMailUpdate(Sender: TObject);
|
||||
|
||||
protected
|
||||
FAlbaranes: IBizAlbaranCliente;
|
||||
@ -199,6 +205,22 @@ begin
|
||||
and ViewGrid.esSeleccionCeldaDatos;
|
||||
end;
|
||||
|
||||
procedure TfEditorAlbaranesCliente.actEnviarEMailExecute(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
FController.EnviarAlbaranPorEMail(FAlbaranes);
|
||||
end;
|
||||
|
||||
procedure TfEditorAlbaranesCliente.actEnviarEMailUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
if HayDatos and Assigned(ViewGrid) then
|
||||
(Sender as TAction).Enabled := ViewGrid.EsSeleccionCeldaDatos
|
||||
and (ViewGrid.NumSeleccionados > 0)
|
||||
else
|
||||
(Sender as TAction).Enabled := False;
|
||||
end;
|
||||
|
||||
procedure TfEditorAlbaranesCliente.actEnviarExecute(Sender: TObject);
|
||||
//var
|
||||
// AInventarioController : IInventarioController;
|
||||
|
||||
@ -222,10 +222,11 @@ end;
|
||||
procedure TfEditorPresupuestosCliente.actEnviarEMailUpdate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
(Sender as TAction).Enabled := HayDatos
|
||||
and not (ViewGrid.NumSeleccionados > 1)
|
||||
and ViewGrid.esSeleccionCeldaDatos;
|
||||
|
||||
if HayDatos and Assigned(ViewGrid) then
|
||||
(Sender as TAction).Enabled := ViewGrid.EsSeleccionCeldaDatos
|
||||
and (ViewGrid.NumSeleccionados > 0)
|
||||
else
|
||||
(Sender as TAction).Enabled := False;
|
||||
end;
|
||||
|
||||
procedure TfEditorPresupuestosCliente.actGenerarAlbaranCliExecute(Sender: TObject);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user