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;