Tarea #1311 -> En las formas de pago, no permitir indicar los plazos
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@1095 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
562f7cf4f7
commit
cfe735e2c5
@ -131,9 +131,12 @@ end;
|
||||
|
||||
procedure TfEditorFormaPago.actEliminarUpdate(Sender: TObject);
|
||||
begin
|
||||
(Sender as TAction).Enabled := Assigned(FPlazos) and
|
||||
(Sender as TAction).Enabled := False;
|
||||
|
||||
// No operar con los plazos
|
||||
{(Sender as TAction).Enabled := Assigned(FPlazos) and
|
||||
FPlazos.DataTable.Active and
|
||||
(FPlazos.DataTable.RecordCount > 0);
|
||||
(FPlazos.DataTable.RecordCount > 0);}
|
||||
end;
|
||||
|
||||
constructor TfEditorFormaPago.Create(AOwner: TComponent);
|
||||
@ -153,9 +156,18 @@ end;
|
||||
|
||||
procedure TfEditorFormaPago.actAceptarExecute(Sender: TObject);
|
||||
begin
|
||||
if (ListaFormasPago.ActiveView.DataController.RecordCount = 0) then
|
||||
{if (ListaFormasPago.ActiveView.DataController.RecordCount = 0) then
|
||||
if (ShowConfirmMessage('Forma de pago sin plazos', 'No ha indicado plazos de pago para esta forma de pago por lo tanto no se podrán generarar los recibos correspondientes.' + #10#13 + '¿Desea continuar guardando la forma de pago?') = IDNO) then
|
||||
Exit;
|
||||
Exit;}
|
||||
|
||||
if (FPlazos.RecordCount > 0) then
|
||||
begin
|
||||
FPlazos.Last;
|
||||
while FPlazos.RecordCount > 0 do
|
||||
begin
|
||||
FPlazos.Delete;
|
||||
end;
|
||||
end;
|
||||
|
||||
if FController.Guardar(FFormaPago) then
|
||||
actCerrar.Execute;
|
||||
@ -180,6 +192,17 @@ end;
|
||||
|
||||
procedure TfEditorFormaPago.FormShow(Sender: TObject);
|
||||
begin
|
||||
// Ocultar los plazos
|
||||
Label11.Visible := False;
|
||||
Bevel3.Visible := False;
|
||||
ListaFormasPago.Visible := False;
|
||||
|
||||
bAnadir.Visible := False;
|
||||
bEliminar.Visible := False;
|
||||
|
||||
actAnadir.Enabled := False;
|
||||
actEliminar.Enabled := False;
|
||||
|
||||
if not FFormaPago.DataTable.Active then
|
||||
FFormaPago.DataTable.Active := True;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user