Ticket #151 -> En el informe de presupuestos, falla los resúmenes cuando sólo hay un capítulo.

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@657 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
David Arranz 2008-10-02 10:49:08 +00:00
parent d62053b54f
commit a65c3de24f

View File

@ -3519,6 +3519,7 @@ begin
end end
^ ^
ALTER PROCEDURE PRO_PRES_CAPITULOS ( ALTER PROCEDURE PRO_PRES_CAPITULOS (
AID INTEGER) AID INTEGER)
RETURNS ( RETURNS (
@ -3576,6 +3577,10 @@ begin
do do
begin begin
contador = contador + 1; contador = contador + 1;
if ((visible <> 0) and (tipo_detalle = 'Concepto')) then
total_acumulado = total_acumulado + importe_total;
if ((tipo_detalle <> 'Concepto') or (contador = num_filas)) then if ((tipo_detalle <> 'Concepto') or (contador = num_filas)) then
begin begin
importe_total = total_acumulado; importe_total = total_acumulado;
@ -3587,10 +3592,6 @@ begin
suspend; suspend;
break; break;
end end
else begin
if (visible <> 0) then
total_acumulado = total_acumulado + importe_total;
end
end end
end end
@ -3607,6 +3608,7 @@ begin
end end
^ ^
ALTER PROCEDURE PRO_PRES_CAPITULOS_CONCEPTOS ( ALTER PROCEDURE PRO_PRES_CAPITULOS_CONCEPTOS (
AID INTEGER) AID INTEGER)
RETURNS ( RETURNS (
@ -3656,6 +3658,7 @@ do
end end
^ ^
ALTER PROCEDURE PRO_PRES_RESUMEN ( ALTER PROCEDURE PRO_PRES_RESUMEN (
AID INTEGER) AID INTEGER)
RETURNS ( RETURNS (
@ -3720,23 +3723,24 @@ begin
do do
begin begin
contador = contador + 1; contador = contador + 1;
num_capitulos = num_capitulos + 1;
if ((visible <> 0) and (tipo_detalle = 'Concepto')) then
total_acumulado = total_acumulado + importe_total;
if ((tipo_detalle <> 'Concepto') or (contador = num_filas)) then if ((tipo_detalle <> 'Concepto') or (contador = num_filas)) then
begin begin
total_acumulado = total_acumulado + importe_total;
importe_total = total_acumulado; importe_total = total_acumulado;
tipo_detalle = 'Titulo'; tipo_detalle = 'Titulo';
concepto = 'CAPÍTULO ' || num_capitulos ||'. General'; if (num_capitulos > 1) then
concepto = 'CAPÍTULO ' || num_capitulos ||'. General';
else
concepto = 'General';
visible = 1; visible = 1;
ID = -1; ID = -1;
posicion = -1; posicion = -1;
suspend; suspend;
break; break;
end end
else begin
if (visible <> 0) then
total_acumulado = total_acumulado + importe_total;
end
end end
end end