From 7e4a22909ceb15ca6883656f71903e64e783e5bd Mon Sep 17 00:00:00 2001 From: david Date: Tue, 6 Oct 2009 12:23:03 +0000 Subject: [PATCH] =?UTF-8?q?-=20Ticket=20#64=20->=20Generar=20factura=20en?= =?UTF-8?q?=20el=20submenu=20(boton=20derecho)=20del=20grid=20de=20contrat?= =?UTF-8?q?os=20no=20va.=20-=20Limpeza=20de=20c=C3=B3digo=20y=20unidades.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@443 f4e31baf-9722-1c47-927c-6f952f962d4b --- .../Views/uEditorContratosCliente.dfm | 6 ++---- .../Views/uEditorContratosCliente.pas | 21 +++++++------------ .../Views/uViewDetallesContratoCliente.pas | 4 ++-- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm index 933819d9..c32eb77e 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm @@ -203,7 +203,7 @@ inherited fEditorContratosCliente: TfEditorContratosCliente object actGenerarFactura: TAction Category = 'Acciones' Caption = 'Generar factura' - ImageIndex = 24 + ImageIndex = 26 OnExecute = actGenerarFacturaExecute OnUpdate = actGenerarFacturaUpdate end @@ -1962,9 +1962,7 @@ inherited fEditorContratosCliente: TfEditorContratosCliente Visible = False end object Generar2: TMenuItem [7] - Caption = 'Generar factura' - ImageIndex = 26 - OnClick = actGenerarExecute + Action = actGenerarFactura end object N4: TMenuItem [8] Caption = '-' diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas index e61fae84..fa4a700b 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas @@ -109,14 +109,13 @@ uGestorInformesController; *************************** TfEditorContratosCliente *************************** } procedure TfEditorContratosCliente.actAceptarExecute(Sender: TObject); -var +{var AContratos: IBizContratoCliente; - AllItems: Boolean; - AFecha: Variant; + AllItems: Boolean;} begin - AContratos := Nil; +{ AContratos := Nil; AllItems := False; -{ + //Pedimos fecha de decision y realizamos todo el proceso de asignacion, en el caso de no darla no se hace nada AFecha := Null; with TfEditorFechaDecision.Create(nil) do @@ -161,10 +160,6 @@ begin end; procedure TfEditorContratosCliente.actAnularExecute(Sender: TObject); -var - AContratos: IBizContratoCliente; - AllItems: Boolean; - AFecha: Variant; begin { AContratos := Nil; AllItems := False; @@ -276,13 +271,11 @@ end; procedure TfEditorContratosCliente.actGenerarFacturaUpdate(Sender: TObject); begin inherited; -{ + (Sender as TAction).Enabled := HayDatos and not (ViewGrid.NumSeleccionados > 1) - and (FContratos.FACTURA = '') - and ViewGrid.esSeleccionCeldaDatos - and (FContratos.SITUACION = SITUACION_PRESUPUESTO_ACEPTADO); -} + and ViewGrid.esSeleccionCeldaDatos; + end; procedure TfEditorContratosCliente.actGenerarPresupuestoProvExecute(Sender: TObject); diff --git a/Source/Modulos/Contratos de cliente/Views/uViewDetallesContratoCliente.pas b/Source/Modulos/Contratos de cliente/Views/uViewDetallesContratoCliente.pas index 2d0f9ed7..112be744 100644 --- a/Source/Modulos/Contratos de cliente/Views/uViewDetallesContratoCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uViewDetallesContratoCliente.pas @@ -109,9 +109,9 @@ begin end; procedure TfrViewDetallesContratoCliente.actAsignarDescuentoExecute(Sender: TObject); -var +{var AuxTop, AuxRow:Integer; - ADescuento: Variant; + ADescuento: Variant;} begin {