Arreglada la generación de presupuestos en Word para el caso de que haya un capítulo general (no salía la parte del resumen) y para un capítulo normal + un capítulo opcional (en el resumen, el importe del opcional salía en el capítulo normal).
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@980 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
b15b7f6df2
commit
1f23f8860f
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user