From 1f23f8860f907f1d8bce15d2c6ea39366524b8e1 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 27 Nov 2009 14:55:57 +0000 Subject: [PATCH] =?UTF-8?q?Arreglada=20la=20generaci=C3=B3n=20de=20presupu?= =?UTF-8?q?estos=20en=20Word=20para=20el=20caso=20de=20que=20haya=20un=20c?= =?UTF-8?q?ap=C3=ADtulo=20general=20(no=20sal=C3=ADa=20la=20parte=20del=20?= =?UTF-8?q?resumen)=20y=20para=20un=20cap=C3=ADtulo=20normal=20+=20un=20ca?= =?UTF-8?q?p=C3=ADtulo=20opcional=20(en=20el=20resumen,=20el=20importe=20d?= =?UTF-8?q?el=20opcional=20sal=C3=ADa=20en=20el=20cap=C3=ADtulo=20normal).?= 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.Tecsitel_FactuGES2/trunk@980 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- .../Reports/uRptWordPresupuestoCliente.pas | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.pas b/Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.pas index b5f289aa..ac756398 100644 --- a/Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.pas @@ -194,11 +194,13 @@ begin Inc (iContador); end; ListaCapitulos[FContadorCap].Total := TotalConceptos; + // Borrar la fila vacía que sobra Rows.Item(iContador).Cells.Delete(shiftCells); - if FImportes - then Cell(iContador, 1).Range.Text := 'Total: ' + FormatFloat(DISPLAY_EUROS2, TotalConceptos) - else Cell(iContador, 1).Range.Text := ''; + if FImportes then + Cell(iContador, 1).Range.Text := 'Total: ' + FormatFloat(DISPLAY_EUROS2, TotalConceptos) + else + Cell(iContador, 1).Range.Text := ''; AutoFitBehavior(wdAutoFitWindow); end; @@ -352,6 +354,7 @@ begin end else begin NombreCapitulo := 'Capítulo opcional. ' + FieldByName('CONCEPTO').AsString; + Inc(FContadorCap); Inc(FNumCapOpc); Inc(FNumCapitulos); end; @@ -368,6 +371,7 @@ begin if FContadorCap = 0 then begin Inc(FContadorCap); // Se considera el conjunto de conceptos sueltos como un capítulo. + Inc(FNumCapitulos); { Pegar una tabla para rellenarla } FWordApp.Application.Selection.Paste; InsertarConceptos(Document.Tables.Item(Document.Tables.Count - 2)); @@ -463,9 +467,10 @@ begin Cell(iContador, 1).Range.Text := 'General' else Cell(iContador, 1).Range.Text := ListaCapitulos[iAux].Nombre; - if FImportes - then Cell(iContador, 2).Range.Text := FormatFloat(DISPLAY_EUROS2, ListaCapitulos[iAux].Total) - else Cell(iContador, 2).Range.Text := ''; + if FImportes then + Cell(iContador, 2).Range.Text := FormatFloat(DISPLAY_EUROS2, ListaCapitulos[iAux].Total) + else + Cell(iContador, 2).Range.Text := ''; TotalConceptos := TotalConceptos + ListaCapitulos[iAux].Total; Inc (iContador); end;