Compare commits
21
Commits
c744b6fd61
...
main
+5
-18
@@ -34,7 +34,6 @@ mydatabase.db
|
||||
# ── Logs de ejecución ──
|
||||
*.log
|
||||
*.err
|
||||
PROYECTO/bin/*.TXT
|
||||
|
||||
# ── Spool de reportes (salida temporal de impresión) ──
|
||||
PROYECTO/spool/
|
||||
@@ -53,17 +52,11 @@ desktop.ini
|
||||
# -- Paquetes GAR: se generan en el build (gsmake -t mbs mbsERP.4pw), no van al repo --
|
||||
*.gar
|
||||
|
||||
# -- bin/IMAGENES: solo las imagenes que usan los programas/reportes --
|
||||
# (lo demas son fotos, temporales y archivos subidos en ejecucion, p.ej. comprobantes)
|
||||
PROYECTO/bin/IMAGENES/**
|
||||
!PROYECTO/bin/IMAGENES/Logo.png
|
||||
!PROYECTO/bin/IMAGENES/Logo_DCM.png
|
||||
!PROYECTO/bin/IMAGENES/genero_logo.png
|
||||
!PROYECTO/bin/IMAGENES/LOGO.JPG
|
||||
!PROYECTO/bin/IMAGENES/logo1.png
|
||||
!PROYECTO/bin/IMAGENES/EMPLEADOS/
|
||||
PROYECTO/bin/IMAGENES/EMPLEADOS/*
|
||||
!PROYECTO/bin/IMAGENES/EMPLEADOS/.gitkeep
|
||||
# -- PROYECTO/bin: no se versiona (compilados, imagenes, ejecutables, datos de ejecucion) --
|
||||
# salvo los disenos de reporte .4rp, que son fuentes registradas en mbsERP.4pw.
|
||||
PROYECTO/bin/**
|
||||
!PROYECTO/bin/**/
|
||||
!PROYECTO/bin/**/*.4rp
|
||||
|
||||
# -- Llaves y certificados: NUNCA en el repo (se entregan aparte a quien los necesite) --
|
||||
*.jks
|
||||
@@ -74,9 +67,3 @@ PROYECTO/bin/IMAGENES/EMPLEADOS/*
|
||||
*.key
|
||||
*.crt
|
||||
*.cer
|
||||
|
||||
# ── PROYECTO/bin: solo se versionan los disenos de reporte (.4rp) ──
|
||||
# (decision de Johnny Soto 2026-10-22: todo lo demas de bin queda fuera del repo)
|
||||
PROYECTO/bin/**
|
||||
!PROYECTO/bin/**/
|
||||
!PROYECTO/bin/**/*.4rp
|
||||
|
||||
@@ -81,22 +81,22 @@
|
||||
<Group gridHeight="8" gridWidth="257" name="group2" posX="1" posY="6" text="Detalle">
|
||||
<Table gridHeight="6" gridWidth="254" name="table1" posX="2" posY="1" totalRows="5" unitWidth="characters" width="76">
|
||||
<ComboBox colName="tipo" comment="Digite Codigo de la Maquina" fieldId="11" gridHeight="1" gridWidth="30" items="" name="tipo" posX="0" posY="0" scroll="true" sqlTabName="formonly" tabIndex="5" title="OPERACION" widget="ComboBox"/>
|
||||
<ComboBox fieldId="5" gridHeight="1" gridWidth="30" items="" name="codigo" posX="30" posY="0" scroll="true" tabIndex="-1" title="Equipo" unhidable="true" unmovable="true" unsortable="true" widget="ComboBox"/>
|
||||
<ButtonEdit action="empleado" autoNext="true" colName="emp_no" fieldId="8" gridHeight="1" gridWidth="10" name="emp_no" posX="60" posY="0" sqlTabName="formonly" sqlType="DECIMAL" tabIndex="6" title="EMPLEADO" widget="ButtonEdit"/>
|
||||
<Edit autoNext="true" colName="h_directa" fieldId="12" gridHeight="1" gridWidth="6" name="h_directa" posX="70" posY="0" sqlTabName="formonly" tabIndex="7" title="N.DIRECTA" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="h_indirecta" fieldId="13" gridHeight="1" gridWidth="6" name="h_indirecta" posX="76" posY="0" sqlTabName="formonly" tabIndex="8" title="N.IND." widget="Edit"/>
|
||||
<Edit autoNext="true" colName="e_directa" fieldId="14" gridHeight="1" gridWidth="6" name="e_directa" posX="82" posY="0" sqlTabName="formonly" tabIndex="9" title="E. DIRECTAS" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="e_indirecta" fieldId="15" gridHeight="1" gridWidth="5" name="e_indirecta" posX="88" posY="0" sqlTabName="formonly" tabIndex="10" title="E.INDIRECTAS" widget="Edit"/>
|
||||
<ButtonEdit action="semielaborado" colName="cod_prod" fieldId="9" gridHeight="1" gridWidth="10" name="cod_prod" posX="93" posY="0" sqlTabName="formonly" tabIndex="11" title="SEMI-ELABORADO" widget="ButtonEdit"/>
|
||||
<Edit fieldId="20" gridHeight="1" gridWidth="8" name="lado1" posX="103" posY="0" tabIndex="-1" title="Ancho" widget="Edit"/>
|
||||
<Edit fieldId="21" gridHeight="1" gridWidth="8" name="lado2" posX="111" posY="0" tabIndex="-1" title="Largo" widget="Edit"/>
|
||||
<Edit fieldId="22" gridHeight="1" gridWidth="8" name="lado3" posX="119" posY="0" tabIndex="-1" title="Espesor" widget="Edit"/>
|
||||
<Edit colName="cantidad" comment="Digite Cantidad Producida" fieldId="17" gridHeight="1" gridWidth="12" name="cantidad" posX="127" posY="0" sqlTabName="formonly" tabIndex="12" title="CANTIDAD" widget="Edit"/>
|
||||
<Edit fieldId="23" gridHeight="1" gridWidth="8" name="medida1" noEntry="true" posX="139" posY="0" tabIndex="-1" title="Medida" widget="Edit"/>
|
||||
<Edit case="upper" colName="codigo_bloque" fieldId="2" gridHeight="1" gridWidth="20" name="codigo_bloque" posX="147" posY="0" scroll="true" sqlTabName="formonly" tabIndex="13" title="BLOQUE" widget="Edit"/>
|
||||
<ComboBox colName="turno" fieldId="0" gridHeight="1" gridWidth="20" items="" name="turno" posX="167" posY="0" sqlTabName="formonly" tabIndex="14" title="TURNO" widget="ComboBox"/>
|
||||
<ComboBox fieldId="24" gridHeight="1" gridWidth="13" items="" name="depto_receptor" notNull="false" posX="187" posY="0" required="false" tabIndex="-1" title="DEPTO. RECEPTOR" widget="ComboBox"/>
|
||||
<ButtonEdit action="ordenped" fieldId="50" gridHeight="1" gridWidth="12" name="num_oc" posX="200" posY="0" scroll="true" tabIndex="18" title="ORDEN PED." widget="ButtonEdit"/>
|
||||
<ComboBox fieldId="5" gridHeight="1" gridWidth="48" items="" name="codigo" posX="30" posY="0" scroll="true" tabIndex="-1" title="Equipo" unhidable="true" unmovable="true" unsortable="true" widget="ComboBox"/>
|
||||
<ButtonEdit action="empleado" autoNext="true" colName="emp_no" fieldId="8" gridHeight="1" gridWidth="10" name="emp_no" posX="78" posY="0" sqlTabName="formonly" sqlType="DECIMAL" tabIndex="6" title="EMPLEADO" widget="ButtonEdit"/>
|
||||
<Edit autoNext="true" colName="h_directa" fieldId="12" gridHeight="1" gridWidth="6" name="h_directa" posX="88" posY="0" sqlTabName="formonly" tabIndex="7" title="N.DIRECTA" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="h_indirecta" fieldId="13" gridHeight="1" gridWidth="6" name="h_indirecta" posX="94" posY="0" sqlTabName="formonly" tabIndex="8" title="N.IND." widget="Edit"/>
|
||||
<Edit autoNext="true" colName="e_directa" fieldId="14" gridHeight="1" gridWidth="6" name="e_directa" posX="100" posY="0" sqlTabName="formonly" tabIndex="9" title="E. DIRECTAS" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="e_indirecta" fieldId="15" gridHeight="1" gridWidth="5" name="e_indirecta" posX="106" posY="0" sqlTabName="formonly" tabIndex="10" title="E.INDIRECTAS" widget="Edit"/>
|
||||
<ButtonEdit action="semielaborado" colName="cod_prod" fieldId="9" gridHeight="1" gridWidth="10" name="cod_prod" posX="111" posY="0" sqlTabName="formonly" tabIndex="11" title="SEMI-ELABORADO" widget="ButtonEdit"/>
|
||||
<Edit fieldId="20" gridHeight="1" gridWidth="8" name="lado1" posX="121" posY="0" tabIndex="-1" title="Ancho" widget="Edit"/>
|
||||
<Edit fieldId="21" gridHeight="1" gridWidth="8" name="lado2" posX="129" posY="0" tabIndex="-1" title="Largo" widget="Edit"/>
|
||||
<Edit fieldId="22" gridHeight="1" gridWidth="8" name="lado3" posX="137" posY="0" tabIndex="-1" title="Espesor" widget="Edit"/>
|
||||
<Edit colName="cantidad" comment="Digite Cantidad Producida" fieldId="17" gridHeight="1" gridWidth="12" name="cantidad" posX="145" posY="0" sqlTabName="formonly" tabIndex="12" title="CANTIDAD" widget="Edit"/>
|
||||
<Edit fieldId="23" gridHeight="1" gridWidth="8" name="medida1" noEntry="true" posX="157" posY="0" tabIndex="-1" title="Medida" widget="Edit"/>
|
||||
<Edit case="upper" colName="codigo_bloque" fieldId="2" gridHeight="1" gridWidth="20" name="codigo_bloque" posX="165" posY="0" scroll="true" sqlTabName="formonly" tabIndex="13" title="BLOQUE" widget="Edit"/>
|
||||
<ComboBox colName="turno" fieldId="0" gridHeight="1" gridWidth="20" items="" name="turno" posX="185" posY="0" sqlTabName="formonly" tabIndex="14" title="TURNO" widget="ComboBox"/>
|
||||
<ComboBox fieldId="24" gridHeight="1" gridWidth="13" items="" name="depto_receptor" notNull="false" posX="205" posY="0" required="false" tabIndex="-1" title="DEPTO. RECEPTOR" widget="ComboBox"/>
|
||||
<ButtonEdit action="ordenped" fieldId="50" gridHeight="1" gridWidth="12" name="num_oc" posX="218" posY="0" scroll="true" tabIndex="18" title="ORDEN PED." widget="ButtonEdit"/>
|
||||
<Phantom fieldId="28" name="ref" widget="Phantom"/>
|
||||
</Table>
|
||||
</Group>
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
<?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="60003" version="7.00">
|
||||
<report:Settings RWPageWidth="a4width" RWPageLength="a4length" RWLeftMargin="1.3cm" RWTopMargin="1.3cm" RWRightMargin="1.3cm" RWBottomMargin="1.3cm">
|
||||
<report:FormatList>
|
||||
<report:Format-SVG/>
|
||||
<report:Format-PDF/>
|
||||
<report:Format-image/>
|
||||
</report:FormatList>
|
||||
</report:Settings>
|
||||
<report:Data RWFglReportName="ventas"/>
|
||||
<report:Conflicts/>
|
||||
<rtl:stylesheet>
|
||||
<PXML>
|
||||
<rtl:match name="Report" nameConstraint="Report" minOccurs="1" maxOccurs="1">
|
||||
<MINIPAGE name="page root" width="max" length="max" alignment="near" fontName="Arial" fontSize="8">
|
||||
<LAYOUTNODE name="header" width="min" length="min" alignment="center" port="firstPageHeader">
|
||||
<WORDBOX name="Title" width="500" length="24" alignment="near" fontSize="15" fontBold="true" textAlignment="center" text="Clientes sin Ventas"/>
|
||||
<LAYOUTNODE name="espacio titulo" width="500" length="6"/>
|
||||
</LAYOUTNODE>
|
||||
<rtl:match name="Group sec_vend" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
|
||||
<MINIPAGE name="info" width="min" length="max" layoutDirection="leftToRight" fontBold="true">
|
||||
<rtl:input-variable name="empresa" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="empresa Value" width="170" length="12" alignment="baseline" floatingBehavior="enclosed" text="{{empresa}}"/>
|
||||
<rtl:input-variable name="titulo" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="titulo Value" width="330" length="12" alignment="baseline" floatingBehavior="enclosed" textAlignment="right" text="{{titulo}}"/>
|
||||
</MINIPAGE>
|
||||
<LAYOUTNODE name="espacio info" width="500" length="6"/>
|
||||
<MINIPAGE name="vendedor header" width="min" length="max" layoutDirection="leftToRight" bgColor="#cccccc" fontBold="true">
|
||||
<rtl:input-variable name="vendedor" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="vendedor Value" width="500" length="12" alignment="baseline" floatingBehavior="enclosed" text="{{vendedor}}"/>
|
||||
</MINIPAGE>
|
||||
<MINIPAGE name="encabezado" width="min" length="max" bgColor="#eeeeee" fontBold="true" layoutDirection="leftToRight">
|
||||
<WORDBOX name="h1" width="170" length="12" alignment="baseline" text="Cliente"/>
|
||||
<WORDBOX name="h2" width="55" length="12" alignment="baseline" textAlignment="right" text="Factura"/>
|
||||
<WORDBOX name="h3" width="70" length="12" alignment="baseline" textAlignment="right" text="Fecha"/>
|
||||
<WORDBOX name="h4" width="75" length="12" alignment="baseline" textAlignment="right" text="Valor"/>
|
||||
<WORDBOX name="h5" width="45" length="12" alignment="baseline" textAlignment="right" text="No.dias"/>
|
||||
<WORDBOX name="h6" width="85" length="12" alignment="baseline" textAlignment="right" text="Balance"/>
|
||||
</MINIPAGE>
|
||||
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
|
||||
<MINIPAGE name="fila" width="min" length="max" layoutDirection="leftToRight">
|
||||
<rtl:input-variable name="cli" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="cli Value" width="170" length="12" alignment="baseline" floatingBehavior="enclosed" text="{{cli}}"/>
|
||||
<rtl:input-variable name="x.factura" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="factura Value" width="55" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="------&" value="{{x.factura}}"/>
|
||||
<rtl:input-variable name="fec" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="fec Value" width="70" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" text="{{fec}}"/>
|
||||
<rtl:input-variable name="x.valor" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="valor Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="-,---,--&.&&" value="{{x.valor}}"/>
|
||||
<rtl:input-variable name="dias_c" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="dias Value" width="45" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="---,--&" value="{{dias_c}}"/>
|
||||
<rtl:input-variable name="x.balance" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="balance Value" width="85" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="---,---,--&.&&" value="{{x.balance}}"/>
|
||||
</MINIPAGE>
|
||||
</rtl:match>
|
||||
<LAYOUTNODE name="espacio vendedor" width="500" length="14"/>
|
||||
</rtl:match>
|
||||
</MINIPAGE>
|
||||
</rtl:match>
|
||||
</PXML>
|
||||
</rtl:stylesheet>
|
||||
</report:Report>
|
||||
@@ -0,0 +1,94 @@
|
||||
<?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="60003" version="7.00">
|
||||
<report:Settings RWPageWidth="a4length" RWPageLength="a4width" RWLeftMargin="1.3cm" RWTopMargin="1.3cm" RWRightMargin="1.3cm" RWBottomMargin="1.3cm">
|
||||
<report:FormatList>
|
||||
<report:Format-SVG/>
|
||||
<report:Format-PDF/>
|
||||
<report:Format-image/>
|
||||
</report:FormatList>
|
||||
</report:Settings>
|
||||
<report:Data RWFglReportName="estado3"/>
|
||||
<report:Conflicts/>
|
||||
<rtl:stylesheet>
|
||||
<PXML>
|
||||
<rtl:match name="Report" nameConstraint="Report" minOccurs="1" maxOccurs="1">
|
||||
<MINIPAGE name="page root" width="max" length="max" alignment="near" fontName="Arial" fontSize="8">
|
||||
<LAYOUTNODE name="header" width="min" length="min" alignment="center" port="firstPageHeader">
|
||||
<WORDBOX name="Title" width="720" length="24" alignment="near" fontSize="15" fontBold="true" textAlignment="center" text="Saldos por Antiguedad"/>
|
||||
<LAYOUTNODE name="espacio titulo" width="720" length="6"/>
|
||||
</LAYOUTNODE>
|
||||
<rtl:match name="Group grupo" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
|
||||
<MINIPAGE name="info" width="min" length="max" layoutDirection="leftToRight" fontBold="true">
|
||||
<rtl:input-variable name="x.empresa" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="empresa Value" width="300" length="12" alignment="baseline" floatingBehavior="enclosed" text="{{x.empresa}}"/>
|
||||
<rtl:input-variable name="x.titulo" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="titulo Value" width="420" length="12" alignment="baseline" floatingBehavior="enclosed" textAlignment="right" text="{{x.titulo}}"/>
|
||||
</MINIPAGE>
|
||||
<LAYOUTNODE name="espacio info" width="720" length="6"/>
|
||||
<MINIPAGE name="encabezado" width="min" length="max" bgColor="#cccccc" fontBold="true" layoutDirection="leftToRight">
|
||||
<WORDBOX name="h1" width="190" length="12" alignment="baseline" text="Cliente"/>
|
||||
<WORDBOX name="h2" width="75" length="12" alignment="baseline" textAlignment="right" text="Corriente"/>
|
||||
<WORDBOX name="h3" width="75" length="12" alignment="baseline" textAlignment="right" text="De 1 a 30"/>
|
||||
<WORDBOX name="h4" width="75" length="12" alignment="baseline" textAlignment="right" text="De 31 a 60"/>
|
||||
<WORDBOX name="h5" width="75" length="12" alignment="baseline" textAlignment="right" text="De 61 a 90"/>
|
||||
<WORDBOX name="h6" width="75" length="12" alignment="baseline" textAlignment="right" text="Mas de 90"/>
|
||||
<WORDBOX name="h7" width="85" length="12" alignment="baseline" textAlignment="right" text="Total"/>
|
||||
<WORDBOX name="h8" width="45" length="12" alignment="baseline" textAlignment="right" text="%"/>
|
||||
</MINIPAGE>
|
||||
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
|
||||
<MINIPAGE name="fila" width="min" length="max" layoutDirection="leftToRight">
|
||||
<rtl:input-variable name="x.cliente" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="cliente Value" width="190" length="12" alignment="baseline" floatingBehavior="enclosed" text="{{x.cliente}}"/>
|
||||
<rtl:input-variable name="x.c1" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="c1 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{x.c1}}"/>
|
||||
<rtl:input-variable name="x.c2" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="c2 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{x.c2}}"/>
|
||||
<rtl:input-variable name="x.c3" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="c3 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{x.c3}}"/>
|
||||
<rtl:input-variable name="x.c4" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="c4 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{x.c4}}"/>
|
||||
<rtl:input-variable name="x.c5" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="c5 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{x.c5}}"/>
|
||||
<rtl:input-variable name="x.total" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="total Value" width="85" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,---,--&.&&" value="{{x.total}}"/>
|
||||
<rtl:input-variable name="x.pct" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="pct Value" width="45" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="---&.&&" value="{{x.pct}}"/>
|
||||
</MINIPAGE>
|
||||
</rtl:match>
|
||||
<LAYOUTNODE name="espacio totales" width="720" length="8"/>
|
||||
<MINIPAGE name="totales" width="min" length="max" layoutDirection="leftToRight" bgColor="#eeeeee" fontBold="true">
|
||||
<WORDBOX name="tl" width="190" length="12" alignment="baseline" textAlignment="right" text="Totales -->"/>
|
||||
<rtl:input-variable name="t30" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="t30 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{t30}}"/>
|
||||
<rtl:input-variable name="t45" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="t45 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{t45}}"/>
|
||||
<rtl:input-variable name="t60" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="t60 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{t60}}"/>
|
||||
<rtl:input-variable name="tm60" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="tm60 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{tm60}}"/>
|
||||
<rtl:input-variable name="tm120" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="tm120 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{tm120}}"/>
|
||||
<rtl:input-variable name="tsaldo" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="tsaldo Value" width="85" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,---,--&.&&" value="{{tsaldo}}"/>
|
||||
</MINIPAGE>
|
||||
<MINIPAGE name="cxc" width="min" length="max" layoutDirection="leftToRight" fontBold="true">
|
||||
<WORDBOX name="cl" width="190" length="12" alignment="baseline" textAlignment="right" text="Total CXC -->"/>
|
||||
<rtl:input-variable name="ct30" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="ct30 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{ct30}}"/>
|
||||
<rtl:input-variable name="ct45" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="ct45 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{ct45}}"/>
|
||||
<rtl:input-variable name="ct60" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="ct60 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{ct60}}"/>
|
||||
<rtl:input-variable name="ctm60" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="ctm60 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{ctm60}}"/>
|
||||
<rtl:input-variable name="ctm120" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="ctm120 Value" width="75" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{ctm120}}"/>
|
||||
<rtl:input-variable name="ctsaldo" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="ctsaldo Value" width="85" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,---,--&.&&" value="{{ctsaldo}}"/>
|
||||
</MINIPAGE>
|
||||
</rtl:match>
|
||||
</MINIPAGE>
|
||||
</rtl:match>
|
||||
</PXML>
|
||||
</rtl:stylesheet>
|
||||
</report:Report>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?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="60003" version="7.00">
|
||||
<report:Settings RWPageWidth="a4width" RWPageLength="a4length" RWLeftMargin="1.3cm" RWTopMargin="1.3cm" RWRightMargin="1.3cm" RWBottomMargin="1.3cm">
|
||||
<report:FormatList>
|
||||
<report:Format-SVG/>
|
||||
<report:Format-PDF/>
|
||||
<report:Format-image/>
|
||||
</report:FormatList>
|
||||
</report:Settings>
|
||||
<report:Data RWFglReportName="estado18"/>
|
||||
<report:Conflicts/>
|
||||
<rtl:stylesheet>
|
||||
<PXML>
|
||||
<rtl:match name="Report" nameConstraint="Report" minOccurs="1" maxOccurs="1">
|
||||
<MINIPAGE name="page root" width="max" length="max" alignment="near" fontName="Arial" fontSize="8">
|
||||
<LAYOUTNODE name="header" width="min" length="min" alignment="center" port="firstPageHeader">
|
||||
<WORDBOX name="Title" width="500" length="24" alignment="near" fontSize="15" fontBold="true" textAlignment="center" text="Estado de Cuentas Pendientes de Cobro"/>
|
||||
<LAYOUTNODE name="espacio titulo" width="500" length="8"/>
|
||||
</LAYOUTNODE>
|
||||
<rtl:match name="Group codigo" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
|
||||
<MINIPAGE name="cliente header" width="min" length="max" layoutDirection="leftToRight" bgColor="#cccccc" fontBold="true">
|
||||
<rtl:input-variable name="x.cliente" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="cliente Value" width="290" length="12" alignment="baseline" floatingBehavior="enclosed" text="{{x.cliente}}"/>
|
||||
<rtl:input-variable name="x.limite" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="limite Value" width="210" length="12" alignment="baseline" floatingBehavior="enclosed" textAlignment="right" text="{{x.limite}}"/>
|
||||
</MINIPAGE>
|
||||
<MINIPAGE name="direccion header" width="min" length="max" layoutDirection="leftToRight" bgColor="#eeeeee">
|
||||
<rtl:input-variable name="x.direccion" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="direccion Value" width="230" length="12" alignment="baseline" floatingBehavior="enclosed" text="{{x.direccion}}"/>
|
||||
<rtl:input-variable name="x.zona" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="zona Value" width="190" length="12" alignment="baseline" floatingBehavior="enclosed" text="{{x.zona}}"/>
|
||||
<rtl:input-variable name="x.corte" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="corte Value" width="80" length="12" alignment="baseline" floatingBehavior="enclosed" textAlignment="right" text="{{x.corte}}"/>
|
||||
</MINIPAGE>
|
||||
<MINIPAGE name="encabezado" width="min" length="max" bgColor="#eeeeee" fontBold="true" layoutDirection="leftToRight">
|
||||
<WORDBOX name="h1" width="130" length="12" alignment="baseline" text="Documento"/>
|
||||
<WORDBOX name="h2" width="80" length="12" alignment="baseline" text="Fecha"/>
|
||||
<WORDBOX name="h3" width="100" length="12" alignment="baseline" textAlignment="right" text="Valor"/>
|
||||
<WORDBOX name="h4" width="100" length="12" alignment="baseline" textAlignment="right" text="Balance"/>
|
||||
<WORDBOX name="h5" width="60" length="12" alignment="baseline" textAlignment="right" text="Dias"/>
|
||||
</MINIPAGE>
|
||||
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
|
||||
<MINIPAGE name="fila" width="min" length="max" layoutDirection="leftToRight">
|
||||
<rtl:input-variable name="x.documento" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="documento Value" width="130" length="12" alignment="baseline" floatingBehavior="enclosed" text="{{x.documento}}"/>
|
||||
<rtl:input-variable name="x.fecha" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="fecha Value" width="80" length="12" alignment="baseline" floatingBehavior="enclosed" text="{{x.fecha}}"/>
|
||||
<rtl:input-variable name="x.valor" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="valor Value" width="100" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,---,--&.&&" value="{{x.valor}}"/>
|
||||
<rtl:input-variable name="x.balance" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="balance Value" width="100" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,---,--&.&&" value="{{x.balance}}"/>
|
||||
<rtl:input-variable name="x.dias" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="dias Value" width="60" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="----&" value="{{x.dias}}"/>
|
||||
</MINIPAGE>
|
||||
</rtl:match>
|
||||
<MINIPAGE name="antiguedad header" width="min" length="max" layoutDirection="leftToRight" bgColor="#eeeeee" fontBold="true">
|
||||
<WORDBOX name="a1" width="80" length="12" alignment="baseline" textAlignment="right" text="No vencido"/>
|
||||
<WORDBOX name="a2" width="80" length="12" alignment="baseline" textAlignment="right" text="1 a 30"/>
|
||||
<WORDBOX name="a3" width="80" length="12" alignment="baseline" textAlignment="right" text="31 a 45"/>
|
||||
<WORDBOX name="a4" width="80" length="12" alignment="baseline" textAlignment="right" text="46 a 60"/>
|
||||
<WORDBOX name="a5" width="80" length="12" alignment="baseline" textAlignment="right" text="Mas de 60"/>
|
||||
<WORDBOX name="a6" width="90" length="12" alignment="baseline" textAlignment="right" text="Total"/>
|
||||
</MINIPAGE>
|
||||
<MINIPAGE name="antiguedad valores" width="min" length="max" layoutDirection="leftToRight" fontBold="true">
|
||||
<rtl:input-variable name="nov" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="nov Value" width="80" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{nov}}"/>
|
||||
<rtl:input-variable name="d1" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="d1 Value" width="80" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{d1}}"/>
|
||||
<rtl:input-variable name="d2" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="d2 Value" width="80" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{d2}}"/>
|
||||
<rtl:input-variable name="d3" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="d3 Value" width="80" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{d3}}"/>
|
||||
<rtl:input-variable name="d4" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="d4 Value" width="80" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,--&.&&" value="{{d4}}"/>
|
||||
<rtl:input-variable name="total" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="total Value" width="90" length="12" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" format="--,---,---,--&.&&" value="{{total}}"/>
|
||||
</MINIPAGE>
|
||||
<LAYOUTNODE name="espacio cliente" width="500" length="14"/>
|
||||
</rtl:match>
|
||||
</MINIPAGE>
|
||||
</rtl:match>
|
||||
</PXML>
|
||||
</rtl:stylesheet>
|
||||
</report:Report>
|
||||
@@ -65,7 +65,7 @@
|
||||
<rtl:input-variable name="x.valor" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox32" width="1.5inch" alignment="baseline" baselineType="leftleft" textAlignment="right" text="{{x.valor.format("((,(((,(((.##)")}}"/>
|
||||
<rtl:input-variable name="x.acumulado" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox34" width="1.5inch" alignment="baseline" baselineType="leftleft" textAlignment="right" text="{{x.acumulado.format("#,###,###.##")}}"/>
|
||||
<WORDBOX name="WordBox34" width="1.5inch" alignment="baseline" baselineType="leftleft" textAlignment="right" text="{{x.acumulado.format("###,###,###.##")}}"/>
|
||||
</LAYOUTNODE>
|
||||
</MINIPAGE>
|
||||
</rtl:match>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?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:Settings RWPageWidth="letterlength" RWPageLength="letterwidth" RWLeftMargin="0.5inch" RWTopMargin="0.5inch" RWRightMargin="0.5inch" RWBottomMargin="0.5inch">
|
||||
<report:FormatList>
|
||||
<report:Format-PDF/>
|
||||
<report:Format-image/>
|
||||
@@ -49,7 +49,8 @@
|
||||
<WORDBOX name="WordBox46" width="39.5197" alignment="baseline" baselineType="leftleft" textAlignment="left" text="ancho"/>
|
||||
<WORDBOX name="WordBox119" width="34.8661" floatingBehavior="enclosed" textAlignment="left" text="largo"/>
|
||||
<WORDBOX name="WordBox121" width="59.8661" length="13.3906" alignment="baseline" floatingBehavior="enclosed" text="espesor"/>
|
||||
<WORDBOX name="WordBox120_2" width="57.3465" floatingBehavior="enclosed" textAlignment="left" text="medida"/>
|
||||
<WORDBOX name="WordBox_cantidad" width="60" alignment="baseline" floatingBehavior="enclosed" textAlignment="right" text="cantidad"/>
|
||||
<WORDBOX name="WordBox120_2" width="57.3465" floatingBehavior="enclosed" textAlignment="center" text="medida"/>
|
||||
<WORDBOX name="WordBox120_1" width="77.3465" alignment="baseline" floatingBehavior="enclosed" textAlignment="center" text="bloque"/>
|
||||
<LAYOUTNODE name="espacio5_1_2_2" width="16" length="6" layoutDirection="leftToRight"/>
|
||||
<WORDBOX name="WordBox120_3" width="67.3465" alignment="baseline" floatingBehavior="enclosed" textAlignment="center" text="turno"/>
|
||||
@@ -72,6 +73,9 @@
|
||||
<rtl:input-variable name="arr_costos.lado2" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="arr_costos.lado3" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="WordWrapBox5" width="128.197" length="33.2783" alignment="baseline" baselineType="leftleft" text="{{arr_costos.lado1.format("#,###.##").trim()+" X "+arr_costos.lado2.format("#,###.##").trim()+" X "+arr_costos.lado3.format("#,###.##").trim()}}" trimText="both" textAlignment="center"/>
|
||||
<LAYOUTNODE name="espacio_cant" width="27" length="5" layoutDirection="leftToRight"/>
|
||||
<rtl:input-variable name="arr_costos.cantidad" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="arr_costos.cantidad Value" class="grwNumericValue" width="60" length="30.0469" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,--&.&&" value="{{arr_costos.cantidad}}"/>
|
||||
<LAYOUTNODE name="espacio5_1" width="27" length="5" layoutDirection="leftToRight"/>
|
||||
<rtl:input-variable name="arr_costos.medida1" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="karr_ordenes.valor Value" class="grwNumericValue" width="52.8661" length="30.0469" anchorX="1" floatingBehavior="enclosed" textAlignment="center" format="---,---,---,--&.&&" value="{{arr_costos.medida1}}"/>
|
||||
|
||||
@@ -25,7 +25,7 @@ end
|
||||
tables
|
||||
cctb00002
|
||||
attributes
|
||||
fe = cctb00002.fecha,format = "dd/mm/yyyy";
|
||||
fe = formonly.fecha TYPE DATE,format = "dd/mm/yyyy";
|
||||
f001 = cctb00002.sec_vend,autonext,comments =
|
||||
"Digite Codigo Vendedor o Presione Ctrl-W Para Busqueda";
|
||||
p = formonly.nombre_emp,noentry;
|
||||
|
||||
@@ -188,7 +188,19 @@ GLOBALS
|
||||
descrip6 CHAR(65)
|
||||
END RECORD
|
||||
|
||||
DEFINE relacion RECORD LIKE cctb00002.*
|
||||
-- G6: cctb00002.fecha es datetime en SQL Server; en el programa se maneja como DATE
|
||||
DEFINE relacion RECORD
|
||||
fecha DATE,
|
||||
cod_vend LIKE cctb00002.cod_vend,
|
||||
sec_vend LIKE cctb00002.sec_vend,
|
||||
sec_de LIKE cctb00002.sec_de,
|
||||
sec_a LIKE cctb00002.sec_a,
|
||||
status_t LIKE cctb00002.status_t,
|
||||
us_crea LIKE cctb00002.us_crea,
|
||||
fech_crea LIKE cctb00002.fech_crea,
|
||||
us_mod LIKE cctb00002.us_mod,
|
||||
fech_mod LIKE cctb00002.fech_mod
|
||||
END RECORD
|
||||
DEFINE rec_pago RECORD LIKE cctb00001.*
|
||||
DEFINE cliente_bas RECORD LIKE vetb00004.*
|
||||
DEFINE p_companias RECORD LIKE companias.*
|
||||
|
||||
@@ -51,6 +51,7 @@ END FUNCTION
|
||||
FUNCTION ccpcad002()
|
||||
|
||||
DEFINE hoy CHAR(10)
|
||||
DEFINE n_pg INTEGER
|
||||
## Captura los datos que va a contener el registro
|
||||
# WHENEVER ERROR CONTINUE
|
||||
|
||||
@@ -201,9 +202,11 @@ DEFINE hoy CHAR(10)
|
||||
CALL msg(numero_msg)
|
||||
NEXT FIELD sec_a
|
||||
END IF
|
||||
SELECT *FROM cctb00003 WHERE sec_vend = relacion.sec_vend AND
|
||||
tipo_doc = "PG"
|
||||
IF status = notfound THEN
|
||||
-- G6: el contador de recibos PG es uno solo (ccprmt001/003/005 lo leen por tipo_doc);
|
||||
-- crear otra fila por vendedor hace que esos programas fallen con -284
|
||||
LET n_pg = 0
|
||||
SELECT COUNT(*) INTO n_pg FROM cctb00003 WHERE tipo_doc = "PG"
|
||||
IF n_pg = 0 THEN
|
||||
INSERT INTO cctb00003 (cod_vend,sec_vend,ult_recibo,us_crea,
|
||||
fech_crea,tipo_doc)
|
||||
VALUES (null,relacion.sec_vend,relacion.sec_de,
|
||||
@@ -235,10 +238,11 @@ DEFINE hoy CHAR(10)
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION ccpcmf002()
|
||||
DEFINE ult_rec INTEGER
|
||||
## Aqui se prepara para la captura del criterio de seleccion
|
||||
#WHENEVER ERROR CONTINUE
|
||||
CONSTRUCT criterio ON fecha,sec_vend,sec_de,sec_a
|
||||
FROM cctb00002.fecha,cctb00002.sec_vend,
|
||||
FROM formonly.fecha,cctb00002.sec_vend,
|
||||
cctb00002.sec_de,cctb00002.sec_a
|
||||
|
||||
IF int_flag THEN
|
||||
@@ -433,8 +437,8 @@ FUNCTION ccpcmf002()
|
||||
fecha = relacion.fecha
|
||||
|
||||
|
||||
LET relacion.sec_de = relacion.sec_de - 1
|
||||
UPDATE cctb00003 SET ult_recibo = relacion.sec_de
|
||||
LET ult_rec = relacion.sec_de - 1
|
||||
UPDATE cctb00003 SET ult_recibo = ult_rec
|
||||
WHERE sec_vend = relacion.sec_vend AND
|
||||
tipo_doc = "PG"
|
||||
|
||||
@@ -456,8 +460,11 @@ FUNCTION ccpcmf002()
|
||||
WHERE sec_vend = relacion.sec_vend and
|
||||
fecha = relacion.fecha and
|
||||
sec_de = relacion.sec_de
|
||||
|
||||
LET numero_msg = 39
|
||||
IF sqlca.sqlerrd[3] = 0 THEN
|
||||
LET numero_msg = 3
|
||||
ELSE
|
||||
LET numero_msg = 39
|
||||
END IF
|
||||
CALL msg(numero_msg)
|
||||
|
||||
COMMAND "Retornar"
|
||||
|
||||
+59
-106
@@ -55,8 +55,22 @@ GLOBALS "ccprgb000.4gl"
|
||||
apellido CHAR(30)
|
||||
END RECORD
|
||||
|
||||
MAIN
|
||||
DEFER INTERRUPT
|
||||
CALL ARG_VAL(1) RETURNING usuarios
|
||||
CALL ARG_VAL(2) RETURNING clave
|
||||
|
||||
CONNECT TO "smarmotech" USER usuarios USING clave
|
||||
SELECT * INTO p_companias.* FROM companias
|
||||
|
||||
CALL ccprrp001()
|
||||
END MAIN
|
||||
|
||||
FUNCTION ccprrp001()
|
||||
DEFINE salir2,salir,salir1 CHAR(1)
|
||||
DEFINE r_output STRING
|
||||
DEFINE handler om.SaxDocumentHandler
|
||||
DEFINE hay SMALLINT
|
||||
# WHENEVER ERROR CONTINUE
|
||||
|
||||
OPTIONS
|
||||
@@ -66,7 +80,7 @@ DEFINE salir2,salir,salir1 CHAR(1)
|
||||
|
||||
OPEN FORM ccfmrp001 FROM "ccfmrp001"
|
||||
DISPLAY FORM ccfmrp001
|
||||
CALL pantalla()
|
||||
#CALL pantalla()
|
||||
DISPLAY "ccprrp001" AT 4,3
|
||||
DISPLAY "Clientes sin Ventas" AT 6,30
|
||||
|
||||
@@ -121,7 +135,7 @@ DEFINE salir2,salir,salir1 CHAR(1)
|
||||
"WHERE d.fecha_orig <= ? AND d.tipo_cliente = a.tipo_cliente AND ",
|
||||
criterio CLIPPED," AND d.status_t IS NULL AND d.sec_cliente= a.sec_cliente ",
|
||||
" AND d.tipo_doc[1] = 'F' AND a.status_t is null AND ",
|
||||
criterio clipped, " GROUP BY 1,2,3"
|
||||
criterio clipped, " GROUP BY d.tipo_cliente,d.sec_cliente,a.nombre"
|
||||
|
||||
DISPLAY "<< Buscando Factura del Cliente... Espere Por Favor. >>" AT 19,14
|
||||
ATTRIBUTE (REVERSE,BOLD)
|
||||
@@ -130,7 +144,16 @@ DEFINE salir2,salir,salir1 CHAR(1)
|
||||
DECLARE busca CURSOR FOR comando
|
||||
OPEN busca USING fecha_corte
|
||||
|
||||
START REPORT ventas TO "C:\\archivo"
|
||||
LET r_output = getPreviewDevice()
|
||||
IF NOT fgl_report_loadCurrentSettings("ccprrp001.4rp") THEN
|
||||
CALL fgl_winmessage("ERROR", "No se pudo cargar ccprrp001.4rp", "stop")
|
||||
RETURN
|
||||
END IF
|
||||
CALL fgl_report_selectDevice(r_output)
|
||||
CALL fgl_report_selectPreview(TRUE)
|
||||
LET handler = fgl_report_commitCurrentSettings()
|
||||
START REPORT ventas TO XML HANDLER handler
|
||||
LET hay = 0
|
||||
DISPLAY " " AT 19,14
|
||||
DISPLAY "<< Reporte Generandose ... Por Favor Espere. >>"
|
||||
AT 19,14 ATTRIBUTE (REVERSE)
|
||||
@@ -199,12 +222,15 @@ IF (fecha_corte - vendcli.fecha) >= dia_minimo AND
|
||||
LET vendcli.balance = balancli.balance - valor_de
|
||||
|
||||
OUTPUT TO REPORT ventas(vendcli.*,fecha_corte)
|
||||
LET hay = 1
|
||||
END IF
|
||||
END WHILE
|
||||
|
||||
FINISH REPORT ventas
|
||||
CLEAR SCREEN
|
||||
RUN "type C:\\archivo > %USPRINT%" END FUNCTION
|
||||
FINISH REPORT ventas
|
||||
IF NOT hay THEN
|
||||
CALL fgl_winmessage("INFO", "NO EXISTEN REGISTROS PARA ESTOS PARAMETROS", "info")
|
||||
END IF
|
||||
END FUNCTION
|
||||
|
||||
REPORT ventas(x,fecha5)
|
||||
DEFINE x RECORD
|
||||
@@ -217,112 +243,39 @@ REPORT ventas(x,fecha5)
|
||||
valor DECIMAL(12,2),
|
||||
balance DECIMAL(12,2)
|
||||
END RECORD
|
||||
|
||||
DEFINE nombre1,apellido CHAR(30)
|
||||
DEFINE dias_c INTEGER
|
||||
DEFINE fecha5 DATE
|
||||
DEFINE balance, monto_factura DECIMAL(10,2)
|
||||
DEFINE descrip_zone CHAR(30)
|
||||
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 fecha_factura DATE
|
||||
DEFINE total_monto_zona,total_gral_monto_zona,monto DECIMAL(12,2)
|
||||
|
||||
OUTPUT
|
||||
TOP MARGIN 0
|
||||
LEFT MARGIN 0
|
||||
BOTTOM MARGIN 2
|
||||
DEFINE empresa, titulo, vendedor, cli, fec STRING
|
||||
DEFINE dias_c INTEGER
|
||||
|
||||
ORDER BY x.sec_vend,x.sec_cliente
|
||||
|
||||
FORMAT
|
||||
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
|
||||
|
||||
IF total_gral_monto_zona is null THEN
|
||||
LET total_gral_monto_zona = 0
|
||||
END IF
|
||||
|
||||
LET lj = (96 - LENGTH(p_companias.nombre CLIPPED))/2
|
||||
PRINT COLUMN 1, doce ,negrillas_on
|
||||
PRINT COLUMN 1, "ccprrp001",
|
||||
COLUMN lj, p_companias.nombre,
|
||||
COLUMN 89, "Pag. ",pageno using "###"
|
||||
PRINT COLUMN 32, "Sistema de Cuentas por Cobrar",
|
||||
COLUMN 89, today using "dd/mm/yyyy"
|
||||
|
||||
IF dia_maximo != 3650 THEN
|
||||
PRINT COLUMN 30, "Clientes sin Ventas ",
|
||||
"de ",dia_minimo using "<<<",
|
||||
" a ",dia_maximo using "<<<",
|
||||
" dias",
|
||||
COLUMN 92, hora
|
||||
ELSE
|
||||
PRINT COLUMN 29, "Clientes sin Ventas a mas de ",
|
||||
dia_minimo using "<<"," dias",
|
||||
COLUMN 92, hora
|
||||
END IF
|
||||
|
||||
PRINT COLUMN 41, "Al ", fecha5 using "dd/mm/yyyy"
|
||||
SKIP 1 LINES
|
||||
|
||||
PRINT COLUMN 1, "--------------------------------------------------",
|
||||
"----------------------------------------------"
|
||||
|
||||
PRINT COLUMN 44, "|------ULTIMA VENTA------|"
|
||||
PRINT COLUMN 6, "Cliente",
|
||||
COLUMN 44, "Factura",
|
||||
COLUMN 54, "Fecha",
|
||||
COLUMN 65, "Valor",
|
||||
COLUMN 74, "No.dias",
|
||||
COLUMN 86, "Balance"
|
||||
|
||||
PRINT COLUMN 1, "--------------------------------------------------",
|
||||
"----------------------------------------------"
|
||||
# , negrillas_off
|
||||
|
||||
BEFORE GROUP OF x.sec_vend
|
||||
SKIP 1 LINE
|
||||
SELECT nom1_emp,apell1_emp INTO nombre1,apellido
|
||||
BEFORE GROUP OF x.sec_vend
|
||||
INITIALIZE nombre1, apellido TO NULL
|
||||
SELECT nom1_emp,apell1_emp INTO nombre1,apellido
|
||||
FROM adtb00003 WHERE status_t IS NULL AND num_emp = x.sec_vend
|
||||
LET descrip5 = NULL
|
||||
LET descrip5 = nombre1 CLIPPED," ",apellido CLIPPED
|
||||
|
||||
IF descrip5 IS NULL THEN
|
||||
LET descrip5 = "Vendedor no Existe. Verifique."
|
||||
END IF
|
||||
|
||||
PRINT COLUMN 1," Vendedor : ",x.sec_vend using "&&&&"," ", descrip5
|
||||
clipped
|
||||
LET descrip5 = NULL
|
||||
LET descrip5 = nombre1 CLIPPED," ",apellido CLIPPED
|
||||
IF descrip5 IS NULL OR LENGTH(descrip5 CLIPPED) = 0 THEN
|
||||
LET descrip5 = "Vendedor no Existe. Verifique."
|
||||
END IF
|
||||
LET vendedor = "Vendedor : ", x.sec_vend USING "&&&&", " ", descrip5 CLIPPED
|
||||
LET empresa = p_companias.nombre CLIPPED
|
||||
IF dia_maximo != 3650 THEN
|
||||
LET titulo = "Clientes sin Ventas de ", dia_minimo USING "<<<<<",
|
||||
" a ", dia_maximo USING "<<<<<", " dias Al ",
|
||||
fecha5 USING "dd/mm/yyyy"
|
||||
ELSE
|
||||
LET titulo = "Clientes sin Ventas a mas de ", dia_minimo USING "<<<<<",
|
||||
" dias Al ", fecha5 USING "dd/mm/yyyy"
|
||||
END IF
|
||||
PRINTX empresa, titulo, vendedor
|
||||
|
||||
ON EVERY ROW
|
||||
|
||||
PRINT COLUMN 4, x.tipo_cliente using "&&","-",
|
||||
COLUMN 7, x.sec_cliente using "&&&&",
|
||||
COLUMN 12, x.nombre,
|
||||
COLUMN 44, x.factura using "######",
|
||||
COLUMN 52, x.fecha using "dd/mm/yyyy",
|
||||
COLUMN 61, x.valor using "$,$$$,$$$.$$",
|
||||
COLUMN 73, fecha5 - x.fecha using "###,###",
|
||||
COLUMN 82, x.balance using "---,---,---.##"
|
||||
|
||||
AFTER GROUP OF x.sec_vend
|
||||
SKIP TO TOP OF PAGE
|
||||
|
||||
END REPORT
|
||||
|
||||
LET cli = x.tipo_cliente USING "&&", "-", x.sec_cliente USING "&&&&&",
|
||||
" ", x.nombre CLIPPED
|
||||
LET fec = x.fecha USING "dd/mm/yyyy"
|
||||
LET dias_c = fecha5 - x.fecha
|
||||
PRINTX cli, x.factura, fec, x.valor, dias_c, x.balance
|
||||
END REPORT
|
||||
|
||||
@@ -44,6 +44,20 @@ GLOBALS "ccprgb000.4gl"
|
||||
CALL ccprrp003()
|
||||
END MAIN
|
||||
FUNCTION ccprrp003()
|
||||
DEFINE sql_ag STRING, lit_corte STRING
|
||||
DEFINE ag RECORD
|
||||
tc, sc SMALLINT,
|
||||
nom CHAR(30),
|
||||
c1, c2, c3, c4, c5, tot DECIMAL(14,2)
|
||||
END RECORD
|
||||
DEFINE fila3 RECORD
|
||||
grupo SMALLINT,
|
||||
empresa STRING,
|
||||
titulo STRING,
|
||||
cliente STRING,
|
||||
c1, c2, c3, c4, c5, total DECIMAL(14,2),
|
||||
pct DECIMAL(8,2)
|
||||
END RECORD
|
||||
|
||||
# WHENEVER ERROR CONTINUE
|
||||
|
||||
@@ -157,8 +171,20 @@ LABEL atras:
|
||||
START REPORT reporte3 TO archivo
|
||||
}
|
||||
CALL seleccionarsalida() RETURNING r_output
|
||||
CALL configureoutput(r_output) RETURNING handler
|
||||
START REPORT reporte3 TO XML HANDLER HANDLER
|
||||
CALL configureoutput3(r_output) RETURNING handler
|
||||
IF handler IS NULL THEN
|
||||
CALL fgl_winmessage("ERROR","No se pudo cargar ccprrp003.4rp","stop")
|
||||
RETURN
|
||||
END IF
|
||||
CREATE TEMP TABLE s3
|
||||
(
|
||||
tipo_cliente SMALLINT,
|
||||
sec_cliente SMALLINT,
|
||||
nombre CHAR(30),
|
||||
aplica_a INTEGER,
|
||||
pendiente DECIMAL(12,2),
|
||||
fecha_factura DATE
|
||||
)
|
||||
|
||||
LET cmd = null
|
||||
LET cmd = FGL_GETENV("FGLSPOOL")||"\\DATA.txt"
|
||||
@@ -201,7 +227,11 @@ LET selec1 =
|
||||
IF progreso > 50 THEN
|
||||
LET progreso = 50
|
||||
END IF
|
||||
OUTPUT TO REPORT reporte3(doccli.*,tipo_venta,fecha_corte,valor_total)
|
||||
IF doccli.fecha_factura IS NULL OR doccli.fecha_factura = MDY(12,31,1899) THEN
|
||||
LET doccli.fecha_factura = MDY(1,1,2001)
|
||||
END IF
|
||||
INSERT INTO s3 VALUES (doccli.tipo_cliente, doccli.sec_cliente, doccli.nombre,
|
||||
doccli.aplica_a, doccli.pendiente, doccli.fecha_factura)
|
||||
OUTPUT TO REPORT reporte33(doccli.*,tipo_venta,fecha_corte,valor_total)
|
||||
|
||||
DISPLAY progreso TO progreso
|
||||
@@ -250,7 +280,11 @@ LET selec3 =
|
||||
LET progreso = 95
|
||||
END IF
|
||||
|
||||
OUTPUT TO REPORT reporte3(doccli.*,tipo_venta,fecha_corte,valor_total)
|
||||
IF doccli.fecha_factura IS NULL OR doccli.fecha_factura = MDY(12,31,1899) THEN
|
||||
LET doccli.fecha_factura = MDY(1,1,2001)
|
||||
END IF
|
||||
INSERT INTO s3 VALUES (doccli.tipo_cliente, doccli.sec_cliente, doccli.nombre,
|
||||
doccli.aplica_a, doccli.pendiente, doccli.fecha_factura)
|
||||
OUTPUT TO REPORT reporte33(doccli.*,tipo_venta,fecha_corte,valor_total)
|
||||
|
||||
DISPLAY progreso TO progreso
|
||||
@@ -259,7 +293,46 @@ LET selec3 =
|
||||
LET progreso = 100
|
||||
DISPLAY progreso to progreso
|
||||
CALL ui.Interface.refresh()
|
||||
FINISH REPORT reporte3
|
||||
LET lit_corte = "CONVERT(DATE,'", fecha_corte USING "yyyy-mm-dd", "',23)"
|
||||
LET sql_ag =
|
||||
"SELECT tipo_cliente, sec_cliente, MAX(nombre), ",
|
||||
" SUM(CASE WHEN DATEDIFF(day,fecha_factura,", lit_corte, ") <= 0 THEN pendiente ELSE 0 END), ",
|
||||
" SUM(CASE WHEN DATEDIFF(day,fecha_factura,", lit_corte, ") BETWEEN 1 AND 30 THEN pendiente ELSE 0 END), ",
|
||||
" SUM(CASE WHEN DATEDIFF(day,fecha_factura,", lit_corte, ") BETWEEN 31 AND 60 THEN pendiente ELSE 0 END), ",
|
||||
" SUM(CASE WHEN DATEDIFF(day,fecha_factura,", lit_corte, ") BETWEEN 61 AND 90 THEN pendiente ELSE 0 END), ",
|
||||
" SUM(CASE WHEN DATEDIFF(day,fecha_factura,", lit_corte, ") >= 91 THEN pendiente ELSE 0 END), ",
|
||||
" SUM(pendiente) FROM s3 GROUP BY tipo_cliente, sec_cliente "
|
||||
IF cero = "NO" THEN
|
||||
LET sql_ag = sql_ag, " HAVING SUM(pendiente) <> 0 "
|
||||
END IF
|
||||
LET sql_ag = sql_ag, " ORDER BY tipo_cliente, sec_cliente "
|
||||
|
||||
START REPORT estado3 TO XML HANDLER handler
|
||||
DECLARE c_ag CURSOR FROM sql_ag
|
||||
FOREACH c_ag INTO ag.*
|
||||
LET fila3.grupo = 1
|
||||
LET fila3.empresa = p_companias.nombre CLIPPED
|
||||
IF tipo_venta = "1" THEN
|
||||
LET fila3.titulo = "Saldos por Antiguedad al ", fecha_corte USING "dd/mm/yyyy", " Valores en RD$"
|
||||
ELSE
|
||||
LET fila3.titulo = "Saldos por Antiguedad al ", fecha_corte USING "dd/mm/yyyy", " Valores en US$"
|
||||
END IF
|
||||
LET fila3.cliente = ag.tc USING "&&", "-", ag.sc USING "&&&&&", " ", ag.nom CLIPPED
|
||||
LET fila3.c1 = ag.c1
|
||||
LET fila3.c2 = ag.c2
|
||||
LET fila3.c3 = ag.c3
|
||||
LET fila3.c4 = ag.c4
|
||||
LET fila3.c5 = ag.c5
|
||||
LET fila3.total = ag.tot
|
||||
IF valor_total IS NULL OR valor_total = 0 THEN
|
||||
LET fila3.pct = 0
|
||||
ELSE
|
||||
LET fila3.pct = (ag.tot / valor_total) * 100
|
||||
END IF
|
||||
OUTPUT TO REPORT estado3(fila3.*)
|
||||
END FOREACH
|
||||
FINISH REPORT estado3
|
||||
DROP TABLE s3
|
||||
FINISH REPORT reporte33
|
||||
|
||||
CALL ui.Interface.frontCall("standard","getenv", ["CREDITO"], [dcmd] )
|
||||
@@ -1061,4 +1134,70 @@ END FUNCTION
|
||||
LET total_saldo = 0
|
||||
END REPORT
|
||||
|
||||
FUNCTION configureoutput3(tipo_file)
|
||||
DEFINE tipo_file CHAR(3)
|
||||
IF NOT fgl_report_loadCurrentSettings("ccprrp003.4rp") THEN
|
||||
RETURN NULL
|
||||
END IF
|
||||
CALL fgl_report_setPageMargins("0.5cm","0.5cm","0.5cm","0.5cm")
|
||||
CALL fgl_report_selectDevice(tipo_file)
|
||||
CALL fgl_report_configurexlsxdevice(null,null,null,false,false,null,1)
|
||||
CALL fgl_report_selectPreview(TRUE)
|
||||
RETURN fgl_report_commitCurrentSettings()
|
||||
END FUNCTION
|
||||
|
||||
REPORT estado3(x)
|
||||
DEFINE x RECORD
|
||||
grupo SMALLINT,
|
||||
empresa STRING,
|
||||
titulo STRING,
|
||||
cliente STRING,
|
||||
c1, c2, c3, c4, c5, total DECIMAL(14,2),
|
||||
pct DECIMAL(8,2)
|
||||
END RECORD
|
||||
DEFINE t30, t45, t60, tm60, tm120, tsaldo DECIMAL(14,2)
|
||||
DEFINE ct30, ct45, ct60, ctm60, ctm120, ctsaldo DECIMAL(14,2)
|
||||
|
||||
ORDER EXTERNAL BY x.grupo
|
||||
|
||||
FORMAT
|
||||
BEFORE GROUP OF x.grupo
|
||||
LET t30 = 0
|
||||
LET t45 = 0
|
||||
LET t60 = 0
|
||||
LET tm60 = 0
|
||||
LET tm120 = 0
|
||||
LET tsaldo = 0
|
||||
LET ct30 = 0
|
||||
LET ct45 = 0
|
||||
LET ct60 = 0
|
||||
LET ctm60 = 0
|
||||
LET ctm120 = 0
|
||||
LET ctsaldo = 0
|
||||
PRINTX x.empresa, x.titulo
|
||||
|
||||
ON EVERY ROW
|
||||
LET t30 = t30 + x.c1
|
||||
LET t45 = t45 + x.c2
|
||||
LET t60 = t60 + x.c3
|
||||
LET tm60 = tm60 + x.c4
|
||||
LET tm120 = tm120 + x.c5
|
||||
LET tsaldo = tsaldo + x.total
|
||||
IF x.c1 > 0 THEN LET ct30 = ct30 + x.c1 END IF
|
||||
IF x.c2 > 0 THEN LET ct45 = ct45 + x.c2 END IF
|
||||
IF x.c3 > 0 THEN LET ct60 = ct60 + x.c3 END IF
|
||||
IF x.c4 > 0 THEN LET ctm60 = ctm60 + x.c4 END IF
|
||||
IF x.c5 > 0 THEN LET ctm120 = ctm120 + x.c5 END IF
|
||||
IF x.total > 0 THEN LET ctsaldo = ctsaldo + x.total END IF
|
||||
PRINTX x.cliente, x.c1, x.c2, x.c3, x.c4, x.c5, x.total, x.pct
|
||||
|
||||
AFTER GROUP OF x.grupo
|
||||
LET tot_gen2.total1 = t30
|
||||
LET tot_gen2.total2 = t45
|
||||
LET tot_gen2.total3 = t60
|
||||
LET tot_gen2.total4 = tm60
|
||||
LET tot_gen2.total5 = tsaldo
|
||||
PRINTX t30, t45, t60, tm60, tm120, tsaldo,
|
||||
ct30, ct45, ct60, ctm60, ctm120, ctsaldo
|
||||
END REPORT
|
||||
|
||||
|
||||
+178
-355
@@ -62,6 +62,16 @@ GLOBALS "ccprgb000.4gl"
|
||||
END RECORD
|
||||
DEFINE fecha3 DATE
|
||||
|
||||
MAIN
|
||||
DEFER INTERRUPT
|
||||
CALL ARG_VAL(1) RETURNING usuarios
|
||||
CALL ARG_VAL(2) RETURNING clave
|
||||
|
||||
CONNECT TO "smarmotech" USER usuarios USING clave
|
||||
|
||||
CALL ccprrp018()
|
||||
END MAIN
|
||||
|
||||
FUNCTION ccprrp018()
|
||||
|
||||
# WHENEVER ERROR CONTINUE
|
||||
@@ -75,7 +85,7 @@ FUNCTION ccprrp018()
|
||||
|
||||
OPEN FORM ccfmrp018 FROM "ccfmrp018"
|
||||
DISPLAY FORM ccfmrp018
|
||||
CALL pantalla()
|
||||
#CALL pantalla()
|
||||
DISPLAY "ccprrp018" AT 4,3 ATTRIBUTE(RED)
|
||||
DISPLAY "Estado Cuentas Pendiente De Cobros" AT 6,21 ATTRIBUTE(BLACK)
|
||||
|
||||
@@ -126,7 +136,7 @@ LET selec5 =
|
||||
" a.tipo_cliente = c.tipo_cliente AND ",
|
||||
" a.sec_cliente = c.sec_cliente AND ",
|
||||
#" a.sec_cliente = b.sec_cliente AND a.tipo_doc in ('FE','FT','NC') AND ",
|
||||
criterio CLIPPED," GROUP BY 1,2,3 HAVING SUM(a.valor+a.monto_desc) <> 0 ",
|
||||
criterio CLIPPED," GROUP BY a.tipo_cliente,a.sec_cliente,a.aplica_a HAVING SUM(a.valor+a.monto_desc) <> 0 ",
|
||||
"ORDER BY 3 "
|
||||
|
||||
DISPLAY "<< Buscando los Movimientos del Rango >>" AT 20,14
|
||||
@@ -134,7 +144,7 @@ LET selec5 =
|
||||
|
||||
PREPARE movi FROM selec5
|
||||
DECLARE movtos_cli CURSOR FOR movi
|
||||
OPEN movtos_cli USING fecha_final
|
||||
#OPEN movtos_cli USING fecha_final -- G6: e_ccrp18 carga todo con un INSERT ... SELECT
|
||||
LET destino = "E"
|
||||
IF destino = "E" THEN
|
||||
CALL e_ccrp18()
|
||||
@@ -496,370 +506,183 @@ END IF
|
||||
END REPORT
|
||||
}
|
||||
|
||||
{ G6: la salida original llenaba una plantilla de Excel por DDE (G:\ESTADO.XLS) y
|
||||
copiaba un archivo por cliente a G:\ESTADOS. Ahora se emite un reporte de Genero
|
||||
(ccprrp018.4rp): PDF en el navegador, visor en GDC. }
|
||||
FUNCTION e_ccrp18()
|
||||
DEFINE primera,imprime_ana,imprime_cliente CHAR(1),
|
||||
cliente CHAR(70),
|
||||
codigo_g,codigo_ant,codigo_act CHAR(6),
|
||||
ret CHAR(30),
|
||||
ejecuta,localiza CHAR(80),
|
||||
documento CHAR(9)
|
||||
|
||||
--# CALL fgl_init4js()
|
||||
DEFINE codigo_act, codigo_ant STRING
|
||||
DEFINE handler om.SaxDocumentHandler
|
||||
DEFINE r_output STRING
|
||||
DEFINE hay SMALLINT
|
||||
DEFINE sql_ins STRING
|
||||
DEFINE fila RECORD
|
||||
codigo STRING,
|
||||
cliente STRING,
|
||||
direccion STRING,
|
||||
limite STRING,
|
||||
zona STRING,
|
||||
corte STRING,
|
||||
documento STRING,
|
||||
fecha STRING,
|
||||
valor DECIMAL(12,2),
|
||||
balance DECIMAL(12,2),
|
||||
dias INTEGER
|
||||
END RECORD
|
||||
|
||||
--# LET archivo = NULL
|
||||
--# LET filename = NULL
|
||||
--# LET filename = FGL_GETENV("USPROGRAM")
|
||||
CREATE TEMP TABLE estado
|
||||
(
|
||||
tipo_cliente SMALLINT,
|
||||
sec_cliente SMALLINT,
|
||||
aplica_a INTEGER,
|
||||
fecha_venc DATE,
|
||||
valor DECIMAL(12,2),
|
||||
tipo_doc CHAR(2),
|
||||
fecha_min DATE
|
||||
)
|
||||
|
||||
--# LET archivo = "G:\\\\ESTADO.XLS"
|
||||
--# LET sysos = FGL_GETENV("OS")
|
||||
LET sql_ins =
|
||||
"INSERT INTO estado (tipo_cliente,sec_cliente,aplica_a,fecha_venc,valor,tipo_doc,fecha_min) ",
|
||||
"SELECT g.tipo_cliente,g.sec_cliente,g.aplica_a,d.fmax,g.valor,d.tipo_doc,d.fmin FROM ( ",
|
||||
" SELECT a.tipo_cliente,a.sec_cliente,a.aplica_a,SUM(a.valor+a.monto_desc) AS valor ",
|
||||
" FROM cctb00001 a,vetb00004 c ",
|
||||
" WHERE a.status_t IS NULL AND a.fecha_orig <= ? AND ",
|
||||
" a.num_doc IS NOT NULL AND a.tipo_doc != 'PC' AND ",
|
||||
" a.tipo_cliente = c.tipo_cliente AND ",
|
||||
" a.sec_cliente = c.sec_cliente AND ",
|
||||
criterio CLIPPED,
|
||||
" GROUP BY a.tipo_cliente,a.sec_cliente,a.aplica_a ",
|
||||
" HAVING SUM(a.valor+a.monto_desc) <> 0) g ",
|
||||
"LEFT JOIN (SELECT num_doc,MIN(tipo_doc) AS tipo_doc,MIN(fecha_orig) AS fmin, ",
|
||||
" MAX(fecha_orig) AS fmax ",
|
||||
" FROM cctb00001 ",
|
||||
" WHERE status_t IS NULL AND aplica_a = num_doc ",
|
||||
" GROUP BY num_doc) d ON d.num_doc = g.aplica_a"
|
||||
PREPARE p_ins18 FROM sql_ins
|
||||
EXECUTE p_ins18 USING fecha_final
|
||||
|
||||
--# IF sysos = "Windows_NT" THEN
|
||||
--# LET filename = filename CLIPPED," G:\\\\ESTADO.XLS"
|
||||
--# LET localiza = "G:\\ESTADOS\\"
|
||||
|
||||
--# LET ejecuta = "DEL /S /Q ",localiza CLIPPED,"*.*"
|
||||
RUN ejecuta
|
||||
LET ejecuta = NULL
|
||||
--# ELSE
|
||||
--# LET filename = "C:\\\\ARCHIV~1\\\\MICROS~1\\\\OFFICE\\\\EXCEL.EXE G:\\\\ESTADO.XLS"
|
||||
--# LET localiza = "G:\\ESTADOS\\"
|
||||
--# LET archivo = "G:\\\\ESTADO.XLS"
|
||||
LET r_output = getPreviewDevice()
|
||||
IF NOT fgl_report_loadCurrentSettings("ccprrp018.4rp") THEN
|
||||
CALL fgl_winmessage("ERROR", "No se pudo cargar ccprrp018.4rp", "stop")
|
||||
DROP TABLE estado
|
||||
RETURN
|
||||
END IF
|
||||
CALL fgl_report_selectDevice(r_output)
|
||||
CALL fgl_report_selectPreview(TRUE)
|
||||
LET handler = fgl_report_commitCurrentSettings()
|
||||
START REPORT estado18 TO XML HANDLER handler
|
||||
|
||||
--# LET ejecuta = "DEL ",localiza CLIPPED,"*.xls"
|
||||
RUN ejecuta
|
||||
LET ejecuta = NULL
|
||||
--# END IF
|
||||
DECLARE buscate CURSOR FOR
|
||||
SELECT a.tipo_cliente, a.sec_cliente, a.aplica_a, a.valor,
|
||||
a.fecha_venc, a.tipo_doc, a.fecha_min
|
||||
FROM estado a
|
||||
ORDER BY a.tipo_cliente, a.sec_cliente, a.aplica_a
|
||||
|
||||
|
||||
# CREACION TABLA TEMPORAL
|
||||
CREATE TABLE estado
|
||||
(
|
||||
tipo_cliente SMALLINT,
|
||||
sec_cliente SMALLINT,
|
||||
aplica_a INTEGER,
|
||||
fecha_venc DATE,
|
||||
valor DECIMAL(12,2)
|
||||
)
|
||||
|
||||
|
||||
LET primera = "S"
|
||||
LET salir = "N"
|
||||
WHILE salir != "S"
|
||||
FETCH movtos_cli INTO movtos.*
|
||||
|
||||
IF status = NOTFOUND THEN
|
||||
LET salir = "S"
|
||||
EXIT WHILE
|
||||
END IF
|
||||
|
||||
IF int_flag THEN
|
||||
LET numero_msg = 2
|
||||
CALL msg(numero_msg)
|
||||
LET int_flag = FALSE
|
||||
RETURN
|
||||
END IF
|
||||
|
||||
IF prima IS NOT NULL THEN
|
||||
LET movtos.valor = movtos.valor * prima
|
||||
END IF
|
||||
|
||||
SELECT MAX(a.fecha_orig)
|
||||
INTO fecha3
|
||||
FROM cctb00001 a
|
||||
WHERE a.num_doc = movtos.aplica_a AND
|
||||
a.status_t IS NULL AND
|
||||
a.aplica_a = a.num_doc
|
||||
|
||||
INSERT INTO estado VALUES (movtos.tipo_cliente,movtos.sec_cliente,
|
||||
movtos.aplica_a,fecha3,movtos.valor)
|
||||
END WHILE
|
||||
|
||||
--# IF winexec(filename) THEN
|
||||
|
||||
--# IF DDEconnect("EXCEL",archivo) THEN
|
||||
|
||||
--# LET cels = "R",6 USING "<<","C3"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,fecha_final) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
|
||||
DECLARE buscate CURSOR FOR
|
||||
SELECT a.tipo_cliente,a.sec_cliente,a.aplica_a,SUM(a.valor) FROM estado a
|
||||
GROUP BY 1,2,3
|
||||
ORDER BY 1,2
|
||||
|
||||
LET primera = "S"
|
||||
LET cnt = 16
|
||||
LET hay = 0
|
||||
LET codigo_ant = NULL
|
||||
LET balance = 0
|
||||
LET codigo_ant = "1"
|
||||
LET codigo_Act = NULL
|
||||
FOREACH buscate INTO movtos.*
|
||||
FOREACH buscate INTO movtos.*, fecha3, tipo, fecha2
|
||||
LET hay = 1
|
||||
IF prima IS NOT NULL THEN
|
||||
LET movtos.valor = movtos.valor * prima
|
||||
END IF
|
||||
LET codigo_act = movtos.tipo_cliente USING "##", "-",
|
||||
movtos.sec_cliente USING "<<<<<<<<&"
|
||||
IF codigo_ant IS NULL OR codigo_ant != codigo_act THEN
|
||||
LET codigo_ant = codigo_act
|
||||
LET balance = 0
|
||||
INITIALIZE p_nombre, p_limite_credito, p_zona, p_numero, p_calle,
|
||||
p_casa, ptelefono, pzona, pprovincia, pbarrio,
|
||||
nombre_zona, nombre_p TO NULL
|
||||
SELECT UNIQUE b.nombre, b.limite_credito, b.zona_postal, b.num_rnc,
|
||||
c.calle, c.casa_num, b.telefono, b.cod_zona,
|
||||
b.cod_provincia, c.barrio
|
||||
INTO p_nombre, p_limite_credito, p_zona, p_numero, p_calle, p_casa,
|
||||
ptelefono, pzona, pprovincia, pbarrio
|
||||
FROM vetb00004 b, vetb00005 c
|
||||
WHERE b.tipo_cliente = movtos.tipo_cliente AND
|
||||
b.sec_cliente = movtos.sec_cliente AND
|
||||
b.tipo_cliente = c.tipo_cliente AND
|
||||
b.sec_cliente = c.sec_cliente AND
|
||||
b.status_t IS NULL
|
||||
SELECT a.descrip INTO nombre_zona FROM vetb00008 a
|
||||
WHERE a.cod_zona = pzona
|
||||
SELECT b.nombre_provincia INTO nombre_p
|
||||
FROM vetb00009 a, vetb00020 b
|
||||
WHERE a.cod_zona = pzona AND
|
||||
a.cod_provincia = pprovincia AND
|
||||
b.cod_provincia = a.cod_provincia
|
||||
END IF
|
||||
|
||||
LET codigo_Act = movtos.tipo_cliente USING "##",movtos.sec_cliente USING "&&&&"
|
||||
LET imprime_ana = "N"
|
||||
IF primera = "S" THEN
|
||||
LET codigo_ant = codigo_Act
|
||||
END IF
|
||||
IF codigo_ant != codigo_act THEN
|
||||
LET codigo_ant = codigo_Act
|
||||
LET primera = "S"
|
||||
LET imprime_ana = "S"
|
||||
--# LET cels = "R",38 USING "<<","C2"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,no_v) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
LET balance = balance + movtos.valor
|
||||
LET fila.codigo = codigo_act
|
||||
LET fila.cliente = p_nombre CLIPPED, " (", codigo_act, ")"
|
||||
LET fila.direccion = p_calle CLIPPED, " #", p_casa CLIPPED, ", ",
|
||||
pbarrio CLIPPED, " Tel. ", ptelefono CLIPPED
|
||||
LET fila.limite = "LIMITE: ", p_limite_credito USING "##,###,##&.&&",
|
||||
" RNC: ", p_numero CLIPPED
|
||||
LET fila.zona = nombre_zona CLIPPED, ", ", nombre_p CLIPPED
|
||||
LET fila.corte = "Al ", fecha_final USING "dd/mm/yyyy"
|
||||
LET fila.documento = movtos.aplica_a USING "<<<<<<<<<", "-", tipo CLIPPED
|
||||
LET fila.fecha = fecha2 USING "dd/mm/yyyy"
|
||||
LET fila.valor = movtos.valor
|
||||
LET fila.balance = balance
|
||||
LET fila.dias = (fecha_final - fecha3) - dias2
|
||||
OUTPUT TO REPORT estado18(fila.*)
|
||||
END FOREACH
|
||||
|
||||
--# LET cels = "R",38 USING "<<","C3"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,v1_30) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
FINISH REPORT estado18
|
||||
DROP TABLE estado
|
||||
|
||||
--# LET cels = "R",38 USING "<<","C4"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,v31_45) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
IF NOT hay THEN
|
||||
CALL fgl_winmessage("INFO",
|
||||
"NO EXISTEN REGISTROS PARA ESTOS PARAMETROS", "info")
|
||||
END IF
|
||||
END FUNCTION
|
||||
|
||||
--# LET cels = "R",38 USING "<<","C5"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,v46_60) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
REPORT estado18(x)
|
||||
DEFINE x RECORD
|
||||
codigo STRING,
|
||||
cliente STRING,
|
||||
direccion STRING,
|
||||
limite STRING,
|
||||
zona STRING,
|
||||
corte STRING,
|
||||
documento STRING,
|
||||
fecha STRING,
|
||||
valor DECIMAL(12,2),
|
||||
balance DECIMAL(12,2),
|
||||
dias INTEGER
|
||||
END RECORD
|
||||
DEFINE nov, d1, d2, d3, d4, total DECIMAL(12,2)
|
||||
|
||||
--# LET cels = "R",38 USING "<<","C7"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,vm_60) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
ORDER EXTERNAL BY x.codigo
|
||||
|
||||
--# LET command = "Run(\\\"ESTADO.XLS!SALVAR\\\";FALSE)"
|
||||
--# CALL DDEExecute ("EXCEL",archivo,command) RETURNING ret
|
||||
FORMAT
|
||||
BEFORE GROUP OF x.codigo
|
||||
LET nov = 0
|
||||
LET d1 = 0
|
||||
LET d2 = 0
|
||||
LET d3 = 0
|
||||
LET d4 = 0
|
||||
LET total = 0
|
||||
PRINTX x.cliente, x.limite, x.direccion, x.zona, x.corte
|
||||
|
||||
--# IF sysos = "Windows_NT" THEN
|
||||
LET ejecuta = "COPY G:\\ESTADO.XLS G:\\ESTADOS\\",
|
||||
codigo_g,".xls"
|
||||
--# ELSE
|
||||
LET ejecuta = "COPY G:\\ESTADO.XLS G:\\ESTADOS\\",
|
||||
codigo_g,".xls"
|
||||
--# END IF
|
||||
RUN ejecuta
|
||||
|
||||
--# LET command = "Run(\\\"ESTADO.XLS!LIMPIAR\\\";FALSE)"
|
||||
--# CALL DDEExecute ("EXCEL",archivo,command) RETURNING ret
|
||||
|
||||
LET cnt = 16
|
||||
--# END IF
|
||||
|
||||
--# IF primera = "S" THEN
|
||||
LET primera = "N"
|
||||
LET imprime_cliente = "S"
|
||||
|
||||
LET no_v = 0
|
||||
LET v1_30 = 0
|
||||
LET v31_45 = 0
|
||||
LET v46_60 = 0
|
||||
LET vm_60 = 0
|
||||
|
||||
#### Seleciona los datos generales de identificacion del cliente
|
||||
|
||||
LET codigo_g = movtos.tipo_cliente USING "##",movtos.sec_cliente USING "&&&&"
|
||||
|
||||
SELECT UNIQUE b.nombre,b.limite_credito,b.zona_postal,b.num_rnc,c.calle,
|
||||
c.casa_num,b.telefono,b.cod_zona,b.cod_provincia,c.barrio
|
||||
INTO p_nombre,p_limite_credito,p_zona,p_numero,p_calle,p_casa,
|
||||
ptelefono,pzona,pprovincia,pbarrio
|
||||
FROM vetb00004 b ,vetb00005 c
|
||||
WHERE b.tipo_cliente = movtos.tipo_cliente and b.sec_cliente = movtos.sec_cliente and
|
||||
b.tipo_cliente = c.tipo_cliente and b.sec_cliente = c.sec_cliente and
|
||||
b.status_t is null
|
||||
|
||||
SELECT a.descrip INTO nombre_zona FROM vetb00008 a
|
||||
WHERE a.cod_zona = pzona
|
||||
|
||||
SELECT b.nombre_provincia
|
||||
INTO nombre_p FROM vetb00009 a, vetb00020 b
|
||||
WHERE a.cod_zona = pzona AND
|
||||
a.cod_provincia = pprovincia AND
|
||||
b.cod_provincia = a.cod_provincia
|
||||
|
||||
|
||||
--# LET cliente = p_nombre CLIPPED," ","(",movtos.tipo_cliente USING "##","-",
|
||||
movtos.sec_cliente USING "&&&&",")"
|
||||
--# LET cliente = cliente CLIPPED
|
||||
--# LET cels = "R",8 USING "<<","C2"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,cliente) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
|
||||
LET balance = 0
|
||||
--# LET cliente = null
|
||||
--# LET cliente = p_calle CLIPPED," #",p_casa CLIPPED,", ",pbarrio CLIPPED," Tel. ",ptelefono CLIPPED
|
||||
--# LET cels = "R",9 USING "<<","C2"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,cliente) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
|
||||
--# LET cliente = null
|
||||
--# LET cliente = "LIMITE: ",p_limite_credito USING "##,###,###.##"," ",
|
||||
"RNC: ",p_numero
|
||||
--# LET cels = "R",10 USING "<<","C2"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,cliente) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
|
||||
--# LET cliente = null
|
||||
--# LET cliente = nombre_zona CLIPPED,", ",nombre_p CLIPPED
|
||||
--# LET cels = "R",11 USING "<<","C2"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,cliente) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
|
||||
--# END IF
|
||||
|
||||
|
||||
SELECT UNIQUE a.tipo_doc,MIN(a.fecha_orig) INTO tipo,fecha2
|
||||
FROM cctb00001 a
|
||||
WHERE a.num_doc = movtos.aplica_a AND a.status_t IS NULL AND
|
||||
a.aplica_a = a.num_doc
|
||||
GROUP BY 1
|
||||
--# LET documento = movtos.aplica_a USING "<<<<<<","-",tipo
|
||||
--# LET cels = "R",cnt USING "<<","C2"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,documento) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
|
||||
|
||||
--# LET cels = "R",cnt USING "<<","C3"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,fecha2) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
|
||||
--# LET balance = balance + movtos.valor
|
||||
|
||||
--# LET cels = "R",cnt USING "<<","C5"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,movtos.valor) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
--# LET balance = balance + movtos.valor
|
||||
|
||||
--# LET cels = "R",cnt USING "<<","C7"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,balance) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
|
||||
--# LET cels = "R",35 USING "<<","C7"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,balance) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
|
||||
#LET dias = (fecha_final - fecha2) - dias2
|
||||
LET dias = (fecha_final - fecha3) - dias2
|
||||
|
||||
|
||||
IF dias > 0 AND dias < 31 THEN
|
||||
LET v1_30 = movtos.valor + v1_30
|
||||
END IF
|
||||
IF dias > 30 and dias < 46 THEN
|
||||
LET v31_45 = movtos.valor + v31_45
|
||||
END IF
|
||||
IF dias > 45 and dias < 61 THEN
|
||||
LET v46_60 = movtos.valor + v46_60
|
||||
END IF
|
||||
IF dias > 60 THEN
|
||||
LET vm_60 = vm_60 + movtos.valor
|
||||
END IF
|
||||
|
||||
--# LET cnt = cnt + 1
|
||||
--# END FOREACH
|
||||
IF imprime_ana = "N" THEN
|
||||
--# LET cels = "R",38 USING "<<","C2"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,no_v) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
|
||||
--# LET cels = "R",38 USING "<<","C3"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,v1_30) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
|
||||
--# LET cels = "R",38 USING "<<","C4"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,v31_45) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
|
||||
--# LET cels = "R",38 USING "<<","C5"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,v46_60) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
|
||||
--# LET cels = "R",38 USING "<<","C7"
|
||||
--# IF DDEpoke("EXCEL",archivo,cels,vm_60) THEN
|
||||
--# ELSE
|
||||
--# LET numero_msg =391
|
||||
--# CALL msg(numero_msg)
|
||||
--# END IF
|
||||
|
||||
{--# LET command = "Run(\\\"ESTADO.XLS!PROTEJE\\\";FALSE)"
|
||||
--# CALL DDEExecute ("EXCEL",archivo,command) RETURNING ret
|
||||
}
|
||||
--# LET command = "Run(\\\"ESTADO.XLS!SALVAR\\\";FALSE)"
|
||||
--# CALL DDEExecute ("EXCEL",archivo,command) RETURNING ret
|
||||
|
||||
{--# LET command = "Run(\\\"ESTADO.XLS!DESPROTEJER\\\";FALSE)"
|
||||
--# CALL DDEExecute ("EXCEL",archivo,command) RETURNING ret
|
||||
}
|
||||
|
||||
--# IF sysos = "Windows_NT" THEN
|
||||
LET ejecuta = "COPY G:\\ESTADO.XLS G:\\ESTADOS\\",
|
||||
codigo_g,".xls"
|
||||
--# ELSE
|
||||
LET ejecuta = "COPY G:\\ESTADO.XLS G:\\ESTADOS\\",
|
||||
codigo_g,".xls"
|
||||
--# END IF
|
||||
|
||||
RUN ejecuta
|
||||
|
||||
--# LET command = "Run(\\\"ESTADO.XLS!LIMPIAR\\\";FALSE)"
|
||||
--# CALL DDEExecute ("EXCEL",archivo,command) RETURNING ret
|
||||
|
||||
END IF
|
||||
end if
|
||||
end if
|
||||
DROP TABLE estado
|
||||
--# END FUNCTION
|
||||
ON EVERY ROW
|
||||
LET total = total + x.valor
|
||||
CASE
|
||||
WHEN x.dias <= 0
|
||||
LET nov = nov + x.valor
|
||||
WHEN x.dias < 31
|
||||
LET d1 = d1 + x.valor
|
||||
WHEN x.dias < 46
|
||||
LET d2 = d2 + x.valor
|
||||
WHEN x.dias < 61
|
||||
LET d3 = d3 + x.valor
|
||||
OTHERWISE
|
||||
LET d4 = d4 + x.valor
|
||||
END CASE
|
||||
PRINTX x.documento, x.fecha, x.valor, x.balance, x.dias
|
||||
|
||||
AFTER GROUP OF x.codigo
|
||||
PRINTX nov, d1, d2, d3, d4, total
|
||||
END REPORT
|
||||
|
||||
@@ -62,6 +62,7 @@ MAIN
|
||||
END MAIN
|
||||
|
||||
FUNCTION ccprrp052()
|
||||
DEFINE n_ord INTEGER
|
||||
|
||||
OPTIONS
|
||||
FORM LINE 8,
|
||||
@@ -97,9 +98,10 @@ FUNCTION ccprrp052()
|
||||
END IF
|
||||
AFTER FIELD borden
|
||||
IF borden IS NOT NULL THEN
|
||||
SELECT a.num_oc FROM prtb00012 a WHERE a.num_oc = borden AND
|
||||
LET n_ord = 0
|
||||
SELECT COUNT(*) INTO n_ord FROM prtb00012 a WHERE a.num_oc = borden AND
|
||||
a.status_t IS NULL
|
||||
IF STATUS <> NOTFOUND THEN
|
||||
IF n_ord = 0 THEN
|
||||
CALL fgl_winmessage("INFO","ORDEN NO EXISTE","INFO")
|
||||
NEXT FIELD borden
|
||||
END IF
|
||||
|
||||
@@ -786,11 +786,7 @@ ON ACTION guardar ATTRIBUTE(TEXT="Salvar", IMAGE="save")
|
||||
COMMIT WORK
|
||||
|
||||
CALL seleccionarsalida() RETURNING salida
|
||||
-- La API de configuracion de reportes (fgl_report_*) no esta
|
||||
-- disponible en este FGL; se escribe el XML directo a un archivo
|
||||
-- en FGLSPOOL en lugar de la vista previa/exportacion nativa.
|
||||
LET p_reportfile = FGL_GETENV("FGLSPOOL"), "/coprmt025_req1.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(p_reportfile)
|
||||
CALL configureoutput(salida) RETURNING HANDLER
|
||||
|
||||
START REPORT print_req TO XML HANDLER HANDLER
|
||||
|
||||
@@ -907,9 +903,7 @@ ON ACTION guardar ATTRIBUTE(TEXT="Salvar", IMAGE="save")
|
||||
COMMIT WORK
|
||||
|
||||
CALL seleccionarsalida() RETURNING salida
|
||||
-- Ver nota sobre fgl_report_* mas arriba en este archivo.
|
||||
LET p_reportfile = FGL_GETENV("FGLSPOOL"), "/coprmt025_req2.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(p_reportfile)
|
||||
CALL configureoutput(salida) RETURNING HANDLER
|
||||
START REPORT print_req TO XML HANDLER HANDLER
|
||||
|
||||
PREPARE query FROM
|
||||
@@ -1189,12 +1183,11 @@ FUNCTION copcmf025()
|
||||
|
||||
|
||||
ON ACTION impresor
|
||||
CALL seleccionarsalida() RETURNING salida
|
||||
IF salida IS NULL THEN
|
||||
LET salida = 'PDF'
|
||||
END IF
|
||||
-- Ver nota sobre fgl_report_* mas arriba en este archivo.
|
||||
LET p_reportfile = FGL_GETENV("FGLSPOOL"), "/coprmt025_req3.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(p_reportfile)
|
||||
END IF
|
||||
CALL configureoutput(salida) RETURNING HANDLER
|
||||
START REPORT print_req TO XML HANDLER HANDLER
|
||||
|
||||
PREPARE query FROM
|
||||
|
||||
@@ -144,11 +144,13 @@ FUNCTION coprrp001()
|
||||
archivo,
|
||||
copia
|
||||
|
||||
-- La API de configuracion de reportes (fgl_report_*) no esta
|
||||
-- disponible en este FGL; se escribe el XML directo a un archivo
|
||||
-- en FGLSPOOL en lugar de usar la plantilla .4rp con vista previa.
|
||||
LET r_filename = FGL_GETENV("FGLSPOOL"), "/coprrp001_catalogo.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(r_filename)
|
||||
LET r_filename = 'coprrp001.4rp'
|
||||
CALL seleccionarSalida() RETURNING r_output
|
||||
IF fgl_report_loadCurrentSettings(r_filename) THEN
|
||||
CALL fgl_report_selectDevice(r_output)
|
||||
CALL fgl_report_selectPreview(TRUE)
|
||||
LET handler = fgl_report_commitCurrentSettings()
|
||||
END IF
|
||||
|
||||
START REPORT catalogo2 TO XML HANDLER handler
|
||||
#### Enviando la informacion al registro del reporte
|
||||
|
||||
@@ -117,13 +117,8 @@ END IF
|
||||
# doce,normal,archivo,copia
|
||||
|
||||
|
||||
-- La API de configuracion de reportes (fgl_report_*) no esta
|
||||
-- disponible en este FGL; seleccionarsalida()/configureoutput()
|
||||
-- tampoco estan definidas en este programa. Se escribe el XML
|
||||
-- directo a un archivo en FGLSPOOL en lugar de usar la plantilla
|
||||
-- .4rp con vista previa.
|
||||
LET r_filename = FGL_GETENV("FGLSPOOL"), "/coprrp004_cronologico.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(r_filename)
|
||||
CALL seleccionarsalida() RETURNING r_output
|
||||
CALL configureoutput(r_output) RETURNING handler
|
||||
|
||||
START REPORT cronologico TO XML HANDLER handler
|
||||
|
||||
@@ -194,7 +189,7 @@ REPORT cronologico(x)
|
||||
LET bandera1 = "N"
|
||||
LET hora = time
|
||||
LET l = (80 - LENGTH(p_companias.nombre CLIPPED))/2
|
||||
PRINT COLUMN 3, ASCII 27, ASCII 80,comp_off, negrillas_on
|
||||
PRINT COLUMN 3, comp_off, negrillas_on # sin ESC P (codigo de impresora matricial)
|
||||
PRINT COLUMN 1, "coprrp004",
|
||||
COLUMN l, p_companias.nombre CLIPPED,
|
||||
COLUMN 73, "Pag. ",pageno using "###"
|
||||
@@ -259,7 +254,7 @@ REPORT cronologico(x)
|
||||
SKIP 1 LINES
|
||||
ON LAST ROW
|
||||
PRINT COLUMN 2, "Total Registros Impresos = ", count(*) USING "<<<<"
|
||||
PRINT COLUMN 2, ASCII 27, ASCII 80
|
||||
PRINT COLUMN 2, "" # sin ESC P (codigo de impresora matricial)
|
||||
PRINT COLUMN 1, "==================================================",
|
||||
"============================="
|
||||
END REPORT
|
||||
|
||||
@@ -164,13 +164,8 @@ LET idx = 1
|
||||
END IF
|
||||
IF idx = 1 THEN
|
||||
|
||||
-- La API de configuracion de reportes (fgl_report_*) no esta
|
||||
-- disponible en este FGL; seleccionarsalida()/configureoutput()
|
||||
-- tampoco estan definidas en este programa. Se escribe el XML
|
||||
-- directo a un archivo en FGLSPOOL en lugar de usar la plantilla
|
||||
-- .4rp con vista previa.
|
||||
LET r_filename = FGL_GETENV("FGLSPOOL"), "/coprrp007_organiza.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(r_filename)
|
||||
CALL seleccionarsalida() RETURNING r_output
|
||||
CALL configureoutput(r_output) RETURNING handler
|
||||
START REPORT organiza TO XML HANDLER handler
|
||||
|
||||
END IF
|
||||
@@ -221,6 +216,7 @@ LET idx = 1
|
||||
DEFINE hora CHAR(5)
|
||||
|
||||
OUTPUT
|
||||
RIGHT MARGIN 148
|
||||
|
||||
TOP MARGIN 0
|
||||
LEFT MARGIN 0
|
||||
|
||||
@@ -105,13 +105,8 @@ FUNCTION coprrp019()
|
||||
DECLARE ent_curs SCROLL CURSOR FOR busca_entrega
|
||||
OPEN ent_curs
|
||||
|
||||
-- La API de configuracion de reportes (fgl_report_*) no esta
|
||||
-- disponible en este FGL; seleccionarsalida()/configureoutput()
|
||||
-- tampoco estan definidas en este programa. Se escribe el XML
|
||||
-- directo a un archivo en FGLSPOOL en lugar de usar la plantilla
|
||||
-- .4rp con vista previa.
|
||||
LET r_filename = FGL_GETENV("FGLSPOOL"), "/coprrp019_documento.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(r_filename)
|
||||
CALL seleccionarsalida() RETURNING r_output
|
||||
CALL configureoutput(r_output) RETURNING handler
|
||||
|
||||
START REPORT documento TO XML HANDLER handler
|
||||
|
||||
@@ -249,6 +244,7 @@ FUNCTION coprrp019()
|
||||
DEFINE valor DECIMAL(12,2)
|
||||
DEFINE p_base DECIMAL(10,2)
|
||||
OUTPUT
|
||||
RIGHT MARGIN 165
|
||||
TOP MARGIN 0
|
||||
LEFT MARGIN 0
|
||||
BOTTOM MARGIN 2
|
||||
@@ -256,15 +252,15 @@ FUNCTION coprrp019()
|
||||
ORDER BY x.tipo,x.num_oc,z.codigo
|
||||
FORMAT
|
||||
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 doble_on = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET doble_off = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET negrillas_on = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET negrillas_off = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET comp_on = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET comp_off = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET imp = "T"
|
||||
LET doce = ASCII 27, ASCII 77
|
||||
LET normal = ASCII 27, ASCII 80
|
||||
LET doce = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET normal = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET hora = time
|
||||
|
||||
LET l = (162 - LENGTH(p_companias.nombre CLIPPED))/2
|
||||
@@ -357,7 +353,7 @@ FUNCTION coprrp019()
|
||||
|
||||
PRINT COLUMN 2,negrillas_on,
|
||||
"Puerto: ",negrillas_off,
|
||||
" ","(",x.cod_pt clipped,")"," ",x.nom_pt,
|
||||
" ","(",x.cod_pt clipped,")"," ",x.nom_pt CLIPPED,
|
||||
COLUMN 48, negrillas_on,"Flete: ",negrillas_off,
|
||||
x.c_flete using "##,###,###.##",
|
||||
COLUMN 80, negrillas_on,"Gastos: ",negrillas_off,
|
||||
@@ -391,6 +387,7 @@ FUNCTION coprrp019()
|
||||
COLUMN 101, valor using "##,###,###.##";
|
||||
|
||||
AFTER GROUP OF x.num_oc
|
||||
PRINT -- cierra la ultima linea de detalle (termina en ";")
|
||||
PRINT COLUMN 1, "__________________________________________________",
|
||||
"__________________________________________________",
|
||||
"__________________________________________________",
|
||||
|
||||
@@ -94,12 +94,9 @@ END MAIN
|
||||
RETURN
|
||||
END IF
|
||||
|
||||
CALL defecto(usuarios,clave,impresor) RETURNING imprime,negrilla_on,negrillas_of,
|
||||
doble_on,doble_off,comp_on,comp_off,
|
||||
doce,normal,archivo,copia
|
||||
|
||||
|
||||
START REPORT impreso_mvto TO archivo
|
||||
CALL seleccionarsalida() RETURNING r_output
|
||||
CALL configureoutput(r_output) RETURNING handler
|
||||
START REPORT impreso_mvto TO XML HANDLER handler
|
||||
|
||||
LET selec = "SELECT a.tipo_doc,a.num_doc,a.cod_sp,a.cod_sp_sec, ",
|
||||
"b.nom_sp,a.fecha_orig,a.aplica_a,a.detalle,a.valor ",
|
||||
@@ -145,7 +142,7 @@ END MAIN
|
||||
OUTPUT TO REPORT impreso_mvto(prt_mvto.*,mvto.fecha_in,mvto.fecha_fi)
|
||||
END WHILE
|
||||
FINISH REPORT impreso_mvto
|
||||
RUN imprime
|
||||
-- RUN imprime: era para la impresora matricial; ahora sale por PDF/Excel/pantalla
|
||||
END FUNCTION
|
||||
|
||||
REPORT impreso_mvto(x,fecha1,fecha2)
|
||||
@@ -174,7 +171,8 @@ END MAIN
|
||||
negrillas_off CHAR(6),
|
||||
hora CHAR(5)
|
||||
|
||||
OUTPUT
|
||||
OUTPUT
|
||||
RIGHT MARGIN 138
|
||||
LEFT MARGIN 0
|
||||
TOP MARGIN 1
|
||||
BOTTOM MARGIN 4
|
||||
@@ -182,14 +180,14 @@ END MAIN
|
||||
ORDER BY x.num_doc
|
||||
FORMAT
|
||||
PAGE HEADER
|
||||
LET negrillas_on = ASCII 27, ASCII 69
|
||||
LET negrillas_off = ASCII 27, ASCII 70
|
||||
LET doble_on = ASCII 14
|
||||
LET doble_off = ASCII 20
|
||||
LET comprimido_on = ASCII 15
|
||||
LET comprimido_off = ASCII 18
|
||||
LET comprimido_12_on = ASCII 27, ASCII 77
|
||||
LET comprimido_12_off = ASCII 27, ASCII 80
|
||||
LET negrillas_on = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET negrillas_off = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET doble_on = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET doble_off = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET comprimido_on = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET comprimido_off = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET comprimido_12_on = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET comprimido_12_off = NULL -- sin codigos de impresora (salida PDF/Excel)
|
||||
LET hora = time
|
||||
LET lj = (131 - LENGTH(p_companias.nombre CLIPPED))/2
|
||||
PRINT COLUMN 1,comprimido_on,negrillas_on
|
||||
|
||||
+21
-5
@@ -70,7 +70,7 @@
|
||||
</Settings>
|
||||
<LanguageList version="1.0"/>
|
||||
<PlatformList version="1.0"/>
|
||||
<Group environment="value:CLASSPATH=$(ProjectDir)\\classes\\javax.mail.jar;$(CLASSPATH)" id="-2057013643" label="COMUNES" language="Genero">
|
||||
<Group environment="value:CLASSPATH=$(ProjectDir)\\classes\\javax.mail.jar;$(CLASSPATH),file:FGLJVMPATH=C:\\Users\\alopez\\Java\\jdk8u504-b01-jre\\bin\\server\\jvm.dll,dir:JAVA_HOME=C:\\Users\\alopez\\Java\\jdk8u504-b01-jre,dirlist:PATH=C:\\Users\\alopez\\Java\\jdk8u504-b01-jre\\bin;C:\\Users\\alopez\\Java\\jdk8u504-b01-jre\\bin\\server;$(PATH)" id="-2057013643" label="COMUNES" language="Genero">
|
||||
<Library binaryName="Config" id="1765711908" label="Config">
|
||||
<File filePath="config/Application.xcf"/>
|
||||
</Library>
|
||||
@@ -241,7 +241,7 @@
|
||||
<File filePath="codir/cofmmt016.4fd"/>
|
||||
<File filePath="codir/cofmmt010.per"/>
|
||||
<File filePath="codir/cofmwd015.per"/>
|
||||
<File filePath="codir/cofmmt025.per"/>
|
||||
<File filePath="codir/cofmmt025.4fd"/>
|
||||
<File filePath="codir/cofmcs005.per"/>
|
||||
<File filePath="codir/cofmcs010.4fd"/>
|
||||
<File filePath="codir/cofmcs009.per"/>
|
||||
@@ -491,6 +491,7 @@
|
||||
<File filePath="ccdir/ccfmmt031.4fd"/>
|
||||
<File filePath="ccdir/ccfmmt050.4fd"/>
|
||||
<File filePath="ccdir/ccfmmt051.4fd"/>
|
||||
<File filePath="ccdir/ccfmrp001.per"/>
|
||||
<File filePath="ccdir/ccfmrp003.per"/>
|
||||
<File filePath="ccdir/ccfmrp005.4fd"/>
|
||||
<File filePath="ccdir/ccfmrp006.4fd"/>
|
||||
@@ -571,13 +572,15 @@
|
||||
<Configuration id="-130911542" label="Configuration"/>
|
||||
<File filePath="ccdir/ccprcs006.4gl"/>
|
||||
</Application>
|
||||
<Application binaryName="ccprrp001" dependencies="-764824792,-1766170440,-1423229125,-1026233879,579381494" environment="dir:FGLSPOOL=$(ProjectDir)/spool" id="-1226653666" label="ccprrp001">
|
||||
<Application binaryName="ccprrp001" dependencies="-764824792,-1766170440,-1423229125,-1026233879,579381494" environment="dir:FGLSPOOL=$(ProjectDir)/spool" externalDependencies="libgre.42x" id="-1226653666" label="ccprrp001">
|
||||
<Configuration id="-649515238" label="Configuration"/>
|
||||
<File filePath="ccdir/ccprrp001.4gl"/>
|
||||
<File filePath="bin/ccprrp001.4rp"/>
|
||||
</Application>
|
||||
<Application binaryName="ccprrp003" dependencies="-764824792,-1766170440,-1423229125,-1026233879,579381494" environment="dir:FGLSPOOL=$(ProjectDir)/spool" externalDependencies="libgre.42x" id="-1096311760" label="ccprrp003">
|
||||
<Configuration id="1917407404" label="Configuration"/>
|
||||
<File filePath="ccdir/ccprrp003.4gl"/>
|
||||
<File filePath="bin/ccprrp003.4rp"/>
|
||||
</Application>
|
||||
<Application binaryName="ccprrp005" dependencies="-764824792,-1766170440,-1423229125,-1026233879,579381494" environment="dir:FGLSPOOL=$(ProjectDir)/spool" externalDependencies="libgre.42x" id="-1050567098" label="ccprrp005">
|
||||
<Configuration id="-786255033" label="Configuration"/>
|
||||
@@ -598,9 +601,10 @@
|
||||
<File compilerOptions="--build-rdd" filePath="ccdir/ccprrp016.4gl"/>
|
||||
<File filePath="bin/ccprrp016.4rp"/>
|
||||
</Application>
|
||||
<Application binaryName="ccprrp018" dependencies="-764824792,-1766170440,-1423229125,-1026233879,579381494" environment="dir:FGLSPOOL=$(ProjectDir)/spool" id="558237960" label="ccprrp018">
|
||||
<Application binaryName="ccprrp018" dependencies="-764824792,-1766170440,-1423229125,-1026233879,579381494" environment="dir:FGLSPOOL=$(ProjectDir)/spool" externalDependencies="libgre.42x" id="558237960" label="ccprrp018">
|
||||
<Configuration id="-737983639" label="Configuration"/>
|
||||
<File filePath="ccdir/ccprrp018.4gl"/>
|
||||
<File filePath="bin/ccprrp018.4rp"/>
|
||||
</Application>
|
||||
<Application binaryName="ccprrp025" dependencies="-764824792,-1766170440,-1423229125,-1026233879,579381494" environment="dir:FGLSPOOL=$(ProjectDir)/spool" id="472069542" label="ccprrp025">
|
||||
<Configuration id="1059530363" label="Configuration"/>
|
||||
@@ -1044,9 +1048,11 @@
|
||||
</Application>
|
||||
</Group>
|
||||
<Group id="615555875" label="PRODUCCION">
|
||||
<Application binaryName="prprmt008" dependencies="-837156229,-1026233879,-764824792" id="990112248" label="prprmt008">
|
||||
<Application binaryName="prprmt008" dependencies="-837156229,-1026233879,-764824792,-1423229125" externalDependencies="libgre.42x" id="990112248" label="prprmt008">
|
||||
<Configuration commandLineArguments="jpeguero Peguero2023" id="888443941" label="Configuration"/>
|
||||
<File filePath="PRDIR/prprmt008.4gl"/>
|
||||
<File filePath="PRDIR/prfmwd003.per"/>
|
||||
<File filePath="PRDIR/prfmwd004.per"/>
|
||||
</Application>
|
||||
<Application binaryName="prprmt003" dependencies="-837156229,-1026233879,-764824792,-2079122474" externalDependencies="libgre.42x" id="-655344430" label="prprmt003">
|
||||
<Configuration commandLineArguments="jpeguero Peguero2023" id="-171737906" label="Configuration"/>
|
||||
@@ -1298,6 +1304,11 @@
|
||||
<File filePath="nodir/noprrp044.4gl"/>
|
||||
<File filePath="bin/noprrp044.4rp"/>
|
||||
</Application>
|
||||
<Application binaryName="noprrp008" dependencies="-1026233879,-764824792,-306412216,-335228674,-1423229125,493047263" environment="dir:FGLSPOOL=$(ProjectDir)/spool" externalDependencies="libgre.42x" id="-700000083" label="noprrp008">
|
||||
<Configuration commandLineArguments="alopez Lopez2023" id="-700000084" label="Configuration"/>
|
||||
<File filePath="nodir/noprrp008.4gl"/>
|
||||
<File filePath="bin/noprrp008.4rp"/>
|
||||
</Application>
|
||||
<Application binaryName="noprrp038" dependencies="-1026233879,-764824792,-306412216,-335228674" environment="dir:FGLSPOOL=$(ProjectDir)/spool" id="-700000085" label="noprrp038">
|
||||
<Configuration commandLineArguments="alopez Lopez2023" id="-700000086" label="Configuration"/>
|
||||
<File filePath="nodir/noprrp038.4gl"/>
|
||||
@@ -1335,6 +1346,11 @@
|
||||
<Group id="-802694369" label="REPORTE ENTRADA">
|
||||
<Library binaryName="FORMULARIO_AL" id="267647114" label="FORMULARIO_AL"/>
|
||||
<Library binaryName="FUNCION_AL" id="-1012843001" label="FUNCION_AL"/>
|
||||
<Application binaryName="alprmt006" dependencies="-1026233879,-764824792" id="-960000906" label="alprmt006">
|
||||
<Configuration commandLineArguments="jpeguero Peguero2023" id="-961000906" label="Configuration"/>
|
||||
<File filePath="otrodir/alprmt006.4gl"/>
|
||||
<File filePath="otrodir/alfmmt006.per"/>
|
||||
</Application>
|
||||
</Group>
|
||||
<Group id="-105943532" label="REPUESTOS">
|
||||
<Application binaryName="irprmt006" dependencies="-1026233879,-2079122474,-764824792,-1423229125,18908927" id="-1693664339" label="irprmt006">
|
||||
|
||||
@@ -180,8 +180,8 @@ OPEN busca USING c_entra.num_nomi,c_entra.tipo_emp
|
||||
|
||||
-- configure report engine; the functions prefixed fgl that are called here are part of the GRW API
|
||||
LET r_filename = 'noprrp008.4rp'
|
||||
CALL seleccionarSalida() RETURNING r_output -- Excel / PDF / pantalla (SVG)
|
||||
IF fgl_report_loadCurrentSettings(r_filename) THEN -- load the .4rp file
|
||||
LET r_output='SVG'
|
||||
LET preview=1
|
||||
CALL fgl_report_selectDevice(r_output) -- changing default
|
||||
CALL fgl_report_selectPreview(preview) -- changing default
|
||||
|
||||
@@ -182,8 +182,9 @@ FUNCTION noprrp009()
|
||||
EXIT WHILE
|
||||
END IF
|
||||
IF idx = 1 THEN
|
||||
LET cmd = FGL_GETENV("FGLSPOOL"),"\\noprrp009.txt"
|
||||
START REPORT list_cooper TO cmd
|
||||
CALL seleccionarsalida() RETURNING r_output
|
||||
CALL configureoutput(r_output) RETURNING handler
|
||||
START REPORT list_cooper TO XML HANDLER handler
|
||||
LET idx = 2
|
||||
END IF
|
||||
|
||||
@@ -239,6 +240,7 @@ END FUNCTION
|
||||
OUTPUT
|
||||
|
||||
## DEFINICION DE LOS MARGENES DE IMPRESION
|
||||
RIGHT MARGIN 86
|
||||
TOP MARGIN 0
|
||||
LEFT MARGIN 0
|
||||
BOTTOM MARGIN 3
|
||||
@@ -321,6 +323,7 @@ END FUNCTION
|
||||
SKIP TO TOP OF PAGE
|
||||
LET total1 = 0
|
||||
LET total = 0
|
||||
LET noRegistros = 0 -- el conteo es por codigo de movimiento
|
||||
|
||||
AFTER GROUP OF x.num_emp
|
||||
LET balance = 0
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
Orden de Compra
|
||||
-------------------------------------------------------------------------
|
||||
}
|
||||
DATABASE marmotech
|
||||
SCHEMA smarmotech
|
||||
GLOBALS
|
||||
DEFINE etiqueta CHAR(20)
|
||||
DEFINE descrip_espa CHAR(35)
|
||||
@@ -61,8 +61,14 @@ END GLOBALS
|
||||
|
||||
MAIN
|
||||
DEFINE fecha CHAR(8)
|
||||
DEFINE usuarios, clave STRING
|
||||
DEFER INTERRUPT
|
||||
|
||||
# Migracion Genero 6: conexion explicita con usuario y clave (args 1 y 2)
|
||||
CALL ARG_VAL(1) RETURNING usuarios
|
||||
CALL ARG_VAL(2) RETURNING clave
|
||||
CONNECT TO "smarmotech" USER usuarios USING clave
|
||||
|
||||
CLEAR SCREEN
|
||||
OPTIONS
|
||||
ERROR LINE 24,
|
||||
@@ -500,14 +506,17 @@ INPUT ARRAY movi WITHOUT DEFAULTS FROM s_movi1.*
|
||||
|
||||
IF primera = "S" THEN
|
||||
LET primera = "N"
|
||||
# Migracion G6: el contador iptb00007 es por movimiento y bodega
|
||||
SELECT UNIQUE a.num_doc INTO ip_ultimo FROM iptb00007 a
|
||||
WHERE a.cod_mov = movi[p_act].cod_mov
|
||||
AND a.bodega = datos_gen.bodega
|
||||
LET ip_ultimo = ip_ultimo + 1
|
||||
LET datos_gen.num_doc = ip_ultimo
|
||||
|
||||
LET documento[p_act] = ip_ultimo
|
||||
SELECT UNIQUE num_doc FROM iptb00006
|
||||
WHERE num_doc=datos_gen.num_doc and cod_mov=movi[p_act].cod_mov
|
||||
AND bodega = datos_gen.bodega
|
||||
|
||||
IF STATUS != NOTFOUND THEN
|
||||
LET numero_msg = 128
|
||||
@@ -612,24 +621,32 @@ INPUT ARRAY movi WITHOUT DEFAULTS FROM s_movi1.*
|
||||
IF movi[idx].cantidad_2 IS NOT NULL AND movi[idx].cantidad_2 <> 0 THEN
|
||||
# Actualizacion de las tablas de Productos terminados
|
||||
IF datos_gen.tipo = "02" THEN
|
||||
# Migracion G6: lista explicita de columnas (la tabla tiene columnas nuevas)
|
||||
INSERT INTO iptb00006
|
||||
(cod_cia,num_doc,fecha,fact_no,conduce_no,tipo,orden_compra,
|
||||
cod_sp,cod_sp_sec,cod_transp,sec_transp,placa,cod_tarifa,
|
||||
cod_mov,detalle,cod_n,cod_grupo,cod_tipo,cod_sec,cantidad_1,
|
||||
cantidad_2,cond_recep,uso_tiempo,bodega,status_t,us_crea,
|
||||
fech_crea,us_mod,fech_mod)
|
||||
VALUES ("1",datos_gen.num_doc,datos_gen.fecha,datos_gen.fact_no,
|
||||
datos_gen.conduce_no,datos_gen.tipo,datos_gen.orden_compra,
|
||||
datos_gen.cod_sp, datos_gen.cod_sp_sec,null,null,null,null,
|
||||
movi[idx].cod_mov,null,movi[idx].cod_n,movi[idx].cod_grupo,
|
||||
movi[idx].cod_tipo,movi[idx].cod_sec,movi[idx].cantidad_1,
|
||||
movi[idx].cantidad_2,null,null,datos_gen.bodega,
|
||||
null,user,current,null,null)
|
||||
null,SUSER_SNAME(),getdate(),null,null)
|
||||
|
||||
SELECT a.num_doc FROM iptb00007 a
|
||||
WHERE a.cod_mov = movi[idx].cod_mov
|
||||
AND a.bodega = datos_gen.bodega
|
||||
IF status != notfound THEN
|
||||
UPDATE iptb00007 set num_doc = datos_gen.num_doc
|
||||
WHERE cod_mov = movi[idx].cod_mov
|
||||
AND bodega = datos_gen.bodega
|
||||
ELSE
|
||||
INSERT INTO iptb00007 VALUES
|
||||
(datos_gen.num_doc,movi[idx].cod_mov,null,user,current,
|
||||
null,null)
|
||||
(datos_gen.num_doc,movi[idx].cod_mov,null,SUSER_SNAME(),getdate(),
|
||||
null,null,datos_gen.bodega)
|
||||
END IF
|
||||
END IF
|
||||
IF datos_gen.tipo = "01" THEN
|
||||
@@ -642,7 +659,7 @@ INPUT ARRAY movi WITHOUT DEFAULTS FROM s_movi1.*
|
||||
movi[idx].cantidad_1,
|
||||
movi[idx].cantidad_2,null,null,null,null,null,
|
||||
datos_gen.bodega,
|
||||
null,user,current,null,null)
|
||||
null,SUSER_SNAME(),getdate(),null,null)
|
||||
SELECT a.num_doc FROM intb00023 a
|
||||
WHERE a.cod_mov = movi[idx].cod_mov
|
||||
IF status != notfound THEN
|
||||
@@ -650,7 +667,7 @@ INPUT ARRAY movi WITHOUT DEFAULTS FROM s_movi1.*
|
||||
WHERE cod_mov = movi[idx].cod_mov
|
||||
ELSE
|
||||
INSERT INTO intb00023 VALUES
|
||||
(datos_gen.num_doc,movi[idx].cod_mov,null,user,current,
|
||||
(datos_gen.num_doc,movi[idx].cod_mov,null,SUSER_SNAME(),getdate(),
|
||||
null,null)
|
||||
END IF
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
<ToolBarItem image="new.png" name="nuevo" text="Nuevo"/>
|
||||
<ToolBarItem image="exit.png" name="cancel"/>
|
||||
<ToolBarSeparator name="ToolBarSeparator1"/>
|
||||
<ToolBarItem comment="Desactiva Registro" image="cancel.png" name="desactivar"/>
|
||||
<ToolBarItem comment="Activa Registro" image="accept.png" name="activar"/>
|
||||
<ToolBarItem comment="Desactiva Registro" image="cancel.png" name="desactivar" text="Desactivar"/>
|
||||
<ToolBarItem comment="Activa Registro" image="accept.png" name="activar" text="Activar"/>
|
||||
</ToolBar>
|
||||
<Folder gridHeight="20" gridWidth="125" name="folder" posX="1" posY="1">
|
||||
<Page name="Page1" text="Lista Grupos Clientes">
|
||||
|
||||
@@ -71,6 +71,7 @@ DIALOG ATTRIBUTE(UNBUFFERED)
|
||||
CALL activar(arr_lista[arr_curr()].pcod_grupo)
|
||||
CALL lista_grupos()
|
||||
AFTER DISPLAY
|
||||
IF operacion <> "N" THEN
|
||||
|
||||
LET centra.codigo_grupo = arr_lista[arr_curr()].pcod_grupo
|
||||
LET centra.descripcion = arr_lista[arr_curr()].pdescripcion
|
||||
@@ -90,6 +91,7 @@ DIALOG ATTRIBUTE(UNBUFFERED)
|
||||
LET idx = idx +1
|
||||
END FOREACH
|
||||
|
||||
END IF -- G6: no recargar el grupo seleccionado al crear uno nuevo
|
||||
END DISPLAY
|
||||
|
||||
INPUT BY NAME centra.* ATTRIBUTE(WITHOUT DEFAULTS)
|
||||
|
||||
Reference in New Issue
Block a user