From 8d20a387460c54d7be3d94d4b567a269d0ba3aec Mon Sep 17 00:00:00 2001 From: david Date: Thu, 4 Sep 2008 14:34:25 +0000 Subject: [PATCH] =?UTF-8?q?Ticket=20#94=20->=20Arreglado=20los=20res=C3=BA?= =?UTF-8?q?menes=20en=20el=20informe.=20(2=C2=BA=20intento)?= 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@566 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Database/scripts/factuges.sql | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index 38a10643..25e43390 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -3455,15 +3455,27 @@ begin /* Tratar el resto de las filas */ - for select id, id_presupuesto, posicion, tipo_detalle, F_RTFTOTEXT(concepto) as concepto, - importe_total, coalesce(visible, 1) - from presupuestos_cliente_detalles - where tipo_detalle = 'Titulo' and id_presupuesto = :AID - order by id_presupuesto, posicion + for select id, id_presupuesto, posicion, tipo_detalle, + F_RTFTOTEXT(concepto) as concepto, importe_total, coalesce(visible, 1) + from presupuestos_cliente_detalles + where id_presupuesto = :AID and + tipo_detalle in ('Titulo', 'Subtotal') + order by posicion into :ID, :ID_PRESUPUESTO, :POSICION, :TIPO_DETALLE, :CONCEPTO, :IMPORTE_TOTAL, :VISIBLE do - suspend; + begin + contador = contador + 1; + if (tipo_detalle = 'Titulo') then + begin + concepto_capitulo = concepto; + end + if (tipo_detalle = 'Subtotal') then + begin + concepto = concepto_capitulo; + suspend; + end + end end^ SET TERM ; ^