From a65c3de24fcfb70223ea4eb67761f0e33a6bb7f1 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 2 Oct 2008 10:49:08 +0000 Subject: [PATCH] =?UTF-8?q?Ticket=20#151=20->=20En=20el=20informe=20de=20p?= =?UTF-8?q?resupuestos,=20falla=20los=20res=C3=BAmenes=20cuando=20s=C3=B3l?= =?UTF-8?q?o=20hay=20un=20cap=C3=ADtulo.?= 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@657 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Database/scripts/factuges.sql | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index 0964990c..34524641 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -3519,6 +3519,7 @@ begin end ^ + ALTER PROCEDURE PRO_PRES_CAPITULOS ( AID INTEGER) RETURNS ( @@ -3576,6 +3577,10 @@ begin do begin 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 begin importe_total = total_acumulado; @@ -3587,10 +3592,6 @@ begin suspend; break; end - else begin - if (visible <> 0) then - total_acumulado = total_acumulado + importe_total; - end end end @@ -3607,6 +3608,7 @@ begin end ^ + ALTER PROCEDURE PRO_PRES_CAPITULOS_CONCEPTOS ( AID INTEGER) RETURNS ( @@ -3656,6 +3658,7 @@ do end ^ + ALTER PROCEDURE PRO_PRES_RESUMEN ( AID INTEGER) RETURNS ( @@ -3720,23 +3723,24 @@ begin do begin 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 begin - total_acumulado = total_acumulado + importe_total; importe_total = total_acumulado; 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; ID = -1; posicion = -1; suspend; break; end - else begin - if (visible <> 0) then - total_acumulado = total_acumulado + importe_total; - end end end