Registra noprrp015 (Prestamos Cooperativa) con reporte moderno
Se agrega noprrp015 al proyecto usando nofmrp015.per. A diferencia de noprrp009 (donde se opto por salida de archivo de texto), aqui se reescribio REPORT prestamo de PRINT COLUMN clasico a PRINTX, y se creo nodir/../bin/noprrp015.4rp (diseno Report Writer 2.0) para soportar pantalla/PDF/Excel, igual que noprrp002/003/039/ 043/044. configureOutput() en msgrp000.4gl sigue siendo un stub NULL (ver noprrp009), asi que se usa fgl_report_loadCurrentSettings + fgl_report_selectDevice/selectPreview/commitCurrentSettings directamente. Se corrige tambien el mismo problema de signo oculto en los montos (mascaras sin caracter de signo) que se encontro en noprrp009. Probado con empleado especifico y con varios empleados del mismo movimiento, verificado contra BD (valor, interes y balance). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
8ac18135e5
commit
80bd203be6
@@ -0,0 +1,76 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<report:Report xmlns:rtl="http://www.4js.com/2004/RTL" xmlns:report="http://www.4js.com/2007/REPORT" xmlns="http://www.4js.com/2004/PXML" gstVersion="3140a" version="6.00">
|
||||||
|
<report:Settings RWPageWidth="letterwidth" RWPageLength="letterlength" RWLeftMargin="0.5inch" RWTopMargin="0.5inch" RWRightMargin="0.5inch" RWBottomMargin="0.5inch">
|
||||||
|
<report:FormatList>
|
||||||
|
<report:Format-SVG/>
|
||||||
|
<report:Format-PDF/>
|
||||||
|
<report:Format-image/>
|
||||||
|
</report:FormatList>
|
||||||
|
</report:Settings>
|
||||||
|
<report:Data RWDataLocation="../nodir/noprrp015.rdd" RWFglReportName="prestamo"/>
|
||||||
|
<rtl:stylesheet>
|
||||||
|
<PXML>
|
||||||
|
<rtl:match name="Report" nameConstraint="Report" minOccurs="1" maxOccurs="1">
|
||||||
|
<MINIPAGE name="Page Root" width="max" length="max" alignment="near">
|
||||||
|
<LAYOUTNODE name="Page Header" width="max" length="min" port="anyPageHeader">
|
||||||
|
<MINIPAGE name="StripeLayouter3" width="min" length="min" layoutDirection="leftToRight">
|
||||||
|
<rtl:input-variable name="nombre_cia" type="FGLString" expectedLocation="expectedAhead"/>
|
||||||
|
<WORDBOX name="Report Title" width="max-3cm" alignment="baseline" fontSize="20" floatingBehavior="enclosed" text="{{nombre_cia}}"/>
|
||||||
|
<PAGENOBOX name="PageNoBox" width="3cm" alignment="baseline" floatingBehavior="enclosed" textAlignment="right" text="Pagina no."/>
|
||||||
|
</MINIPAGE>
|
||||||
|
<MINIPAGE name="MiniPage" width="min" length="min" alignment="near" layoutDirection="leftToRight">
|
||||||
|
<WORDBOX name="WordBox2" width="12cm" fontBold="true" floatingBehavior="enclosed" text="Descuentos Cooperativa"/>
|
||||||
|
<rtl:input-variable name="hora" type="FGLString" expectedLocation="expectedAhead"/>
|
||||||
|
<WORDBOX name="WordBoxHora" floatingBehavior="enclosed" text="{{hora}}"/>
|
||||||
|
</MINIPAGE>
|
||||||
|
<MINIPAGE name="MiniPage1" width="min" length="min" alignment="near" layoutDirection="leftToRight">
|
||||||
|
<rtl:input-variable name="x.num_nomi" type="FGLNumeric" expectedLocation="expectedAhead"/>
|
||||||
|
<rtl:input-variable name="fecha_al_ch" type="FGLString" expectedLocation="expectedAhead"/>
|
||||||
|
<WORDBOX name="WordBoxNomina" width="10cm" fontBold="true" floatingBehavior="enclosed" text="{{"Nomina No.: "+x.num_nomi.format("<<<<")+" Al: "+fecha_al_ch}}"/>
|
||||||
|
<rtl:input-variable name="descr" type="FGLString" expectedLocation="expectedAhead"/>
|
||||||
|
<WORDBOX name="WordBoxTipo" floatingBehavior="enclosed" text="{{descr}}"/>
|
||||||
|
</MINIPAGE>
|
||||||
|
<MINIPAGE name="MiniPage2" width="min" length="min" fontSize="10" fontBold="true" layoutDirection="leftToRight">
|
||||||
|
<WORDBOX name="WordBoxCod" width="3.5cm" alignment="baseline" floatingBehavior="enclosed" text="Codigo No." roundedCorners="true" borderWidth="1" borderStyle="solid"/>
|
||||||
|
<WORDBOX name="WordBoxNom" width="6cm" alignment="baseline" floatingBehavior="enclosed" text="Nombre" roundedCorners="true" borderWidth="1" borderStyle="solid"/>
|
||||||
|
<WORDBOX name="WordBoxVal" width="3cm" alignment="far" floatingBehavior="enclosed" textAlignment="right" text="Valor" roundedCorners="true" borderWidth="1" borderStyle="solid"/>
|
||||||
|
<WORDBOX name="WordBoxInt" width="2cm" alignment="far" floatingBehavior="enclosed" textAlignment="right" text="Interes" roundedCorners="true" borderWidth="1" borderStyle="solid"/>
|
||||||
|
<WORDBOX name="WordBoxBal" width="3cm" alignment="far" floatingBehavior="enclosed" textAlignment="right" text="Balance" roundedCorners="true" borderWidth="1" borderStyle="solid"/>
|
||||||
|
</MINIPAGE>
|
||||||
|
<MINIPAGE name="Separator" width="1" length="max" bgColor="#000000" layoutDirection="leftToRight"/>
|
||||||
|
</LAYOUTNODE>
|
||||||
|
<rtl:match name="FirstPageHeader" nameConstraint="FirstPageHeader" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<rtl:match name="Group cod_mov" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
|
||||||
|
<MINIPAGE name="movimiento" width="min" length="max" layoutDirection="leftToRight">
|
||||||
|
<rtl:input-variable name="x.descrip_mov" type="FGLString" expectedLocation="expectedHere"/>
|
||||||
|
<WORDBOX name="x.descrip_mov Value" fontSize="11" fontBold="true" floatingBehavior="enclosed" text="{{x.descrip_mov}}"/>
|
||||||
|
</MINIPAGE>
|
||||||
|
<rtl:match name="Group num_emp" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
|
||||||
|
<MINIPAGE name="Table Row" class="grwTableRow" width="min" length="max" fontSize="9" layoutDirection="leftToRight">
|
||||||
|
<rtl:input-variable name="codigo_emp" type="FGLString" expectedLocation="expectedHere"/>
|
||||||
|
<WORDBOX name="codigo_emp Value" width="3.5cm" floatingBehavior="enclosed" text="{{codigo_emp}}"/>
|
||||||
|
<rtl:input-variable name="nombre_completo" type="FGLString" expectedLocation="expectedHere"/>
|
||||||
|
<WORDBOX name="nombre_completo Value" width="6cm" floatingBehavior="enclosed" text="{{nombre_completo}}"/>
|
||||||
|
<rtl:input-variable name="x.valor" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||||
|
<DECIMALFORMATBOX name="x.valor Value" width="3cm" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="-,---,---,--&.&&" value="{{x.valor}}"/>
|
||||||
|
<rtl:input-variable name="interes" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||||
|
<DECIMALFORMATBOX name="interes Value" width="2cm" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="-,---,---,--&.&&" value="{{interes}}"/>
|
||||||
|
<rtl:input-variable name="x.balance" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||||
|
<DECIMALFORMATBOX name="x.balance Value" width="3cm" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="-,---,---,--&.&&" value="{{x.balance}}"/>
|
||||||
|
</MINIPAGE>
|
||||||
|
</rtl:match>
|
||||||
|
<MINIPAGE name="totalgrupo" width="min" length="max" layoutDirection="leftToRight" roundedCorners="true" borderWidth="1" borderStyle="outset">
|
||||||
|
<WORDBOX name="WordBoxTotal" width="9.5cm" fontBold="true" floatingBehavior="enclosed" text="TOTAL GENERAL"/>
|
||||||
|
<rtl:input-variable name="total1" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||||
|
<DECIMALFORMATBOX name="total1 Value" width="3cm" anchorX="1" fontBold="true" floatingBehavior="enclosed" textAlignment="right" format="-,---,---,--&.&&" value="{{total1}}"/>
|
||||||
|
<rtl:input-variable name="t_interes" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||||
|
<DECIMALFORMATBOX name="t_interes Value" width="2cm" anchorX="1" fontBold="true" floatingBehavior="enclosed" textAlignment="right" format="-,---,---,--&.&&" value="{{t_interes}}"/>
|
||||||
|
<rtl:input-variable name="total" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||||
|
<DECIMALFORMATBOX name="total Value" width="3cm" anchorX="1" fontBold="true" floatingBehavior="enclosed" textAlignment="right" format="-,---,---,--&.&&" value="{{total}}"/>
|
||||||
|
</MINIPAGE>
|
||||||
|
</rtl:match>
|
||||||
|
</MINIPAGE>
|
||||||
|
</rtl:match>
|
||||||
|
</PXML>
|
||||||
|
</rtl:stylesheet>
|
||||||
|
</report:Report>
|
||||||
@@ -496,6 +496,7 @@
|
|||||||
<File filePath="nodir/nofmrp008.4fd"/>
|
<File filePath="nodir/nofmrp008.4fd"/>
|
||||||
<File filePath="nodir/nofmrp043.4fd"/>
|
<File filePath="nodir/nofmrp043.4fd"/>
|
||||||
<File filePath="nodir/nofmrp009.per"/>
|
<File filePath="nodir/nofmrp009.per"/>
|
||||||
|
<File filePath="nodir/nofmrp015.per"/>
|
||||||
</Library>
|
</Library>
|
||||||
<Library binaryName="FUNCIONES_NO" id="-306412216" label="FUNCIONES_NO">
|
<Library binaryName="FUNCIONES_NO" id="-306412216" label="FUNCIONES_NO">
|
||||||
<File filePath="nodir/noprgb000.4gl"/>
|
<File filePath="nodir/noprgb000.4gl"/>
|
||||||
@@ -597,6 +598,11 @@
|
|||||||
<Configuration commandLineArguments="alopez Lopez2023" id="-700000090" label="Configuration"/>
|
<Configuration commandLineArguments="alopez Lopez2023" id="-700000090" label="Configuration"/>
|
||||||
<File filePath="nodir/noprrp009.4gl"/>
|
<File filePath="nodir/noprrp009.4gl"/>
|
||||||
</Application>
|
</Application>
|
||||||
|
<Application binaryName="noprrp015" dependencies="-1026233879,-764824792,-306412216,-335228674,-1423229125" environment="dir:FGLSPOOL=$(ProjectDir)/spool" externalDependencies="libgre.42x" id="-700000091" label="noprrp015">
|
||||||
|
<Configuration commandLineArguments="alopez Lopez2023" id="-700000092" label="Configuration"/>
|
||||||
|
<File filePath="nodir/noprrp015.4gl"/>
|
||||||
|
<File filePath="bin/noprrp015.4rp"/>
|
||||||
|
</Application>
|
||||||
</Group>
|
</Group>
|
||||||
<Group id="1667448785" label="PRODUCTOS TERMINADOS">
|
<Group id="1667448785" label="PRODUCTOS TERMINADOS">
|
||||||
<Library binaryName="FORMULARIOS_IP" dependencies="-1026233879" id="-1826025351" label="FORMULARIOS_IP">
|
<Library binaryName="FORMULARIOS_IP" dependencies="-1026233879" id="-1826025351" label="FORMULARIOS_IP">
|
||||||
|
|||||||
@@ -157,9 +157,19 @@ FUNCTION noprrp015()
|
|||||||
doce,normal,archivo,imprime
|
doce,normal,archivo,imprime
|
||||||
|
|
||||||
|
|
||||||
CALL seleccionarsalida() RETURNING r_output
|
LET r_filename = 'noprrp015.4rp'
|
||||||
CALL configureoutput(r_output) RETURNING handler
|
IF fgl_report_loadCurrentSettings(r_filename) THEN
|
||||||
START REPORT prestamo TO XML HANDLER handler
|
CALL seleccionarsalida() RETURNING r_output
|
||||||
|
LET preview = 1
|
||||||
|
CALL fgl_report_selectDevice(r_output)
|
||||||
|
CALL fgl_report_selectPreview(preview)
|
||||||
|
LET handler = fgl_report_commitCurrentSettings()
|
||||||
|
END IF
|
||||||
|
IF handler IS NOT NULL THEN
|
||||||
|
START REPORT prestamo TO XML HANDLER handler
|
||||||
|
ELSE
|
||||||
|
EXIT PROGRAM
|
||||||
|
END IF
|
||||||
|
|
||||||
## SE BUSCA LA INFORMACION DE LOS CAMPOS DEL REGISTRO PARA DARLE
|
## SE BUSCA LA INFORMACION DE LOS CAMPOS DEL REGISTRO PARA DARLE
|
||||||
## SALIDA AL REPORTE
|
## SALIDA AL REPORTE
|
||||||
@@ -222,103 +232,45 @@ END FUNCTION
|
|||||||
fecha_al LIKE notb00010.fecha_al
|
fecha_al LIKE notb00010.fecha_al
|
||||||
END RECORD
|
END RECORD
|
||||||
|
|
||||||
## DEFINICION DE LAS VARIABLES DE IMPRESION
|
|
||||||
DEFINE t_interes,interes DECIMAL(8,2)
|
DEFINE t_interes,interes DECIMAL(8,2)
|
||||||
DEFINE doble_on CHAR(2)
|
|
||||||
DEFINE doble_off CHAR(2)
|
|
||||||
DEFINE negrillas_on CHAR(2)
|
|
||||||
DEFINE negrillas_off CHAR(2)
|
|
||||||
DEFINE comp_on CHAR(2)
|
|
||||||
DEFINE comp_off CHAR(2)
|
|
||||||
DEFINE doce CHAR(2)
|
|
||||||
DEFINE normal CHAR(2)
|
|
||||||
DEFINE hora CHAR(5)
|
DEFINE hora CHAR(5)
|
||||||
DEFINE valor1,total,total1,balance DECIMAL(10,2)
|
DEFINE total,total1 DECIMAL(10,2)
|
||||||
DEFINE l smallint
|
DEFINE codigo_emp VARCHAR(20)
|
||||||
DEFINE varia CHAR(30)
|
DEFINE nombre_completo VARCHAR(80)
|
||||||
|
DEFINE fecha_al_ch VARCHAR(10)
|
||||||
|
DEFINE nombre_cia VARCHAR(100)
|
||||||
|
|
||||||
OUTPUT
|
ORDER BY x.cod_mov,x.num_emp
|
||||||
|
|
||||||
## DEFINICION DE LOS MARGENES DE IMPRESION
|
|
||||||
TOP MARGIN 0
|
|
||||||
LEFT MARGIN 0
|
|
||||||
BOTTOM MARGIN 3
|
|
||||||
PAGE LENGTH 100
|
|
||||||
FORMAT
|
FORMAT
|
||||||
PAGE HEADER
|
FIRST PAGE HEADER
|
||||||
LET doble_on = ASCII 14
|
|
||||||
LET doble_off = ASCII 20
|
|
||||||
LET negrillas_on = ASCII 27, ASCII 69
|
|
||||||
LET negrillas_off = ASCII 27, ASCII 70
|
|
||||||
LET comp_on = ASCII 15
|
|
||||||
LET comp_off = ASCII 18
|
|
||||||
LET doce = ASCII 27, ASCII 77
|
|
||||||
LET normal = ASCII 27, ASCII 80
|
|
||||||
LET hora = time
|
LET hora = time
|
||||||
LET varia = x.descrip_mov
|
LET fecha_al_ch = x.fecha_al USING "dd/mm/yy"
|
||||||
|
LET nombre_cia = p_companias.nombre CLIPPED
|
||||||
## SE CALCULA LA LONGITUD DE LA VARIABLE -VARIA-
|
|
||||||
LET l = (80 - LENGTH(p_companias.nombre CLIPPED))/2
|
|
||||||
|
|
||||||
## AQUI SE INDICA LA IMPRESION DE LOS ENCABEZADOS
|
|
||||||
PRINT COLUMN 1, normal,negrillas_on
|
|
||||||
PRINT COLUMN 1, "noprrp015",
|
|
||||||
COLUMN l, p_companias.nombre CLIPPED,
|
|
||||||
COLUMN 73, "Pag. ",pageno using "###"
|
|
||||||
PRINT COLUMN 29, "Descuentos Cooperativa",
|
|
||||||
COLUMN 73, today using "dd/mm/yy"
|
|
||||||
LET l = (80 - LENGTH(varia CLIPPED))/2
|
|
||||||
PRINT COLUMN l, varia CLIPPED,
|
|
||||||
COLUMN 73, hora
|
|
||||||
|
|
||||||
SKIP 1 LINE
|
|
||||||
## SE IMPRIME EL NUMERO DE NOMINA Y LA FECHA
|
|
||||||
PRINT COLUMN 1, negrillas_on,
|
|
||||||
COLUMN 4, "Nomina No.: ",x.num_nomi using "<<<<",
|
|
||||||
" Al: ",x.fecha_al using "dd/mm/yy",
|
|
||||||
negrillas_off
|
|
||||||
|
|
||||||
## SE SELECCIONA EL TIPO DE NOMINA A IMPRIMIR
|
## SE SELECCIONA EL TIPO DE NOMINA A IMPRIMIR
|
||||||
IF x.tipo_emp = "Q" THEN
|
IF x.tipo_emp = "Q" THEN
|
||||||
LET descr = "QUINCENAL"
|
LET descr = "QUINCENAL"
|
||||||
ELSE
|
ELSE
|
||||||
IF x.tipo_emp = "V" THEN
|
IF x.tipo_emp = "V" THEN
|
||||||
LET descr = "VENDEDOR"
|
LET descr = "VENDEDOR"
|
||||||
ELSE
|
ELSE
|
||||||
LET descr = "SEMANAL"
|
LET descr = "SEMANAL"
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
PRINT doce
|
PRINTX nombre_cia,hora,x.num_nomi,fecha_al_ch,descr
|
||||||
PRINT COLUMN 1, negrillas_on,
|
|
||||||
COLUMN 4, descr,
|
|
||||||
COLUMN 15, negrillas_off
|
|
||||||
|
|
||||||
PRINT COLUMN 2, "---------------------------------------------------",
|
|
||||||
"-------------------------------------------"
|
|
||||||
|
|
||||||
PRINT COLUMN 4, "Codigo No.",
|
|
||||||
COLUMN 23, "Nombre",
|
|
||||||
COLUMN 53, "Valor",
|
|
||||||
COLUMN 61, "Interes",
|
|
||||||
COLUMN 74, "Balance"
|
|
||||||
|
|
||||||
PRINT COLUMN 2, "----------------------------------------------------",
|
|
||||||
"------------------------------------------"
|
|
||||||
|
|
||||||
## SE INDICA EL SALTO DE PAGINA CUANDO SE IMPRIMEN TODOS LOS MOVIMIENTOS
|
## SE INDICA EL SALTO DE PAGINA CUANDO SE IMPRIMEN TODOS LOS MOVIMIENTOS
|
||||||
BEFORE GROUP OF x.cod_mov
|
BEFORE GROUP OF x.cod_mov
|
||||||
SKIP TO TOP OF PAGE
|
|
||||||
LET total1 = 0
|
LET total1 = 0
|
||||||
LET total = 0
|
LET total = 0
|
||||||
LET t_interes = 0
|
LET t_interes = 0
|
||||||
|
PRINTX x.descrip_mov
|
||||||
|
|
||||||
BEFORE GROUP OF x.num_emp
|
BEFORE GROUP OF x.num_emp
|
||||||
LET balance = 0
|
|
||||||
LET valor1 = 0
|
|
||||||
# Busca La cuota de la nomina aqui ya que en el SELECT principal se busca
|
# Busca La cuota de la nomina aqui ya que en el SELECT principal se busca
|
||||||
# pero no es confiable
|
# pero no es confiable
|
||||||
|
|
||||||
SELECT valor INTO x.valor FROM notb00008
|
SELECT valor INTO x.valor FROM notb00008
|
||||||
WHERE num_emp = x.num_emp and num_nomi = x.num_nomi and
|
WHERE num_emp = x.num_emp and num_nomi = x.num_nomi and
|
||||||
tipo_emp = x.tipo_emp and cod_mov = x.cod_mov
|
tipo_emp = x.tipo_emp and cod_mov = x.cod_mov
|
||||||
@@ -353,27 +305,21 @@ END FUNCTION
|
|||||||
END IF
|
END IF
|
||||||
LET total = total + x.balance
|
LET total = total + x.balance
|
||||||
|
|
||||||
|
LET codigo_emp = x.num_emp USING "&&&&","-",
|
||||||
|
x.departamento USING "&&&&","-",
|
||||||
|
x.nivel_emp USING "&&","-",
|
||||||
|
x.cod_puesto USING "&&"
|
||||||
|
LET nombre_completo = x.nom1_emp CLIPPED," ",x.apell1_emp CLIPPED
|
||||||
|
|
||||||
## AQUI COMIENZA LA IMPRESION DEL DETALLE
|
## AQUI COMIENZA LA IMPRESION DEL DETALLE
|
||||||
IF x.valor != 0 OR x.balance > 0 THEN
|
IF x.valor != 0 OR x.balance > 0 THEN
|
||||||
PRINT COLUMN 4, x.num_emp using "&&&&","-",
|
LET t_interes = t_interes + interes
|
||||||
x.departamento using "&&&&","-",
|
PRINTX codigo_emp,nombre_completo,x.valor,interes,x.balance
|
||||||
x.nivel_emp using "&&","-", x.cod_puesto using "&&",
|
|
||||||
" ",x.nom1_emp clipped," ",x.apell1_emp clipped,
|
|
||||||
COLUMN 52, x.valor using "##,###.##",
|
|
||||||
COLUMN 62, interes using "###.##",
|
|
||||||
COLUMN 69, x.balance using "#,###,###.##"
|
|
||||||
LET t_interes = t_interes + interes
|
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
## AQUI SE IMPRIMEN LOS TOTALES GENERALES
|
## AQUI SE IMPRIMEN LOS TOTALES GENERALES
|
||||||
AFTER GROUP OF x.cod_mov
|
AFTER GROUP OF x.cod_mov
|
||||||
SKIP 2 LINES
|
PRINTX total1,t_interes,total
|
||||||
PRINT COLUMN 1, negrillas_on,
|
|
||||||
COLUMN 8, "TOTAL GENERAL",
|
|
||||||
COLUMN 51, total1 using "###,###.##",
|
|
||||||
COLUMN 62, t_interes using "###.##",
|
|
||||||
COLUMN 69, total using "#,###,###.##"
|
|
||||||
PRINT COLUMN 18, negrillas_off
|
|
||||||
|
|
||||||
END REPORT
|
END REPORT
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user