Preguntar antes de generar el contrato en presupuestos de cliente
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@476 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
ba7f4ccf90
commit
8bfaf9a5a6
@ -2,7 +2,6 @@ inherited fEditorPresupuestosCliente: TfEditorPresupuestosCliente
|
||||
Caption = 'Lista de presupuestos de cliente'
|
||||
ClientWidth = 805
|
||||
ExplicitWidth = 813
|
||||
ExplicitHeight = 240
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||
|
||||
@ -204,24 +204,29 @@ begin
|
||||
begin
|
||||
SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Presupuestos as ISeleccionable).SelectedRecords);
|
||||
APresupuestos := (Controller as IPresupuestosClienteController).ExtraerSeleccionados(Presupuestos) as IBizPresupuestoCliente;
|
||||
|
||||
with APresupuestos.DataTable do
|
||||
begin
|
||||
First;
|
||||
while not EOF do
|
||||
begin
|
||||
GenerarContratoCli(APresupuestos.ID, False);
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
actRefrescar.Execute;
|
||||
ShowInfoMessage('Se han generado los contratos');
|
||||
end
|
||||
else begin
|
||||
else
|
||||
APresupuestos := Self.Presupuestos;
|
||||
GenerarContratoCli(APresupuestos.ID);
|
||||
|
||||
if (Application.MessageBox('¿Está seguro que desea generar el/los contrato/s de los presupuesto/s seleccionado/s?', 'Atención', MB_YESNO) = IDYES) then
|
||||
begin
|
||||
if not AllItems then
|
||||
GenerarContratoCli(APresupuestos.ID)
|
||||
else
|
||||
with APresupuestos.DataTable do
|
||||
begin
|
||||
First;
|
||||
while not EOF do
|
||||
begin
|
||||
GenerarContratoCli(APresupuestos.ID, False);
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
actRefrescar.Execute;
|
||||
end;
|
||||
if AllItems then
|
||||
ShowInfoMessage('Se han generado los contratos');
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TfEditorPresupuestosCliente.actGenerarContratoUpdate(Sender: TObject);
|
||||
@ -319,6 +324,7 @@ begin
|
||||
actGenerarContrato.Execute;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user