diff --git a/Database/scripts/factuges.sql b/Database/scripts/factuges.sql index da3f6797..0d1c8cd9 100644 --- a/Database/scripts/factuges.sql +++ b/Database/scripts/factuges.sql @@ -3599,6 +3599,7 @@ begin EXISTE = 1; end + num_capitulos = 1; if (existe = 1) then begin contador = 0; @@ -3611,12 +3612,13 @@ begin do begin contador = contador + 1; + num_capitulos = num_capitulos + 1; if ((tipo_detalle <> 'Concepto') or (contador = num_filas)) then begin total_acumulado = total_acumulado + importe_total; importe_total = total_acumulado; tipo_detalle = 'Titulo'; - concepto = 'General'; + concepto = 'CAPÍTULO ' || num_capitulos ||'. General'; visible = 1; ID = -1; posicion = -1; @@ -3649,8 +3651,9 @@ begin end if (tipo_detalle = 'Subtotal') then begin - concepto = concepto_capitulo; + concepto = 'CAPÍTULO ' || num_capitulos || '. ' || concepto_capitulo; tipo_detalle = tipo; + num_capitulos = num_capitulos + 1; suspend; end end