Compare commits
7
Commits
b09ba2374f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83fffcd31f | ||
|
|
1e64839bf2 | ||
|
|
539af7f912 | ||
|
|
b52ccfae7f | ||
|
|
5b53d994ac | ||
|
|
05d5adf8c9 | ||
|
|
a8c4ab1f78 |
@@ -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"/>
|
<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("((,(((,(((.##)")}}"/>
|
<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"/>
|
<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>
|
</LAYOUTNODE>
|
||||||
</MINIPAGE>
|
</MINIPAGE>
|
||||||
</rtl:match>
|
</rtl:match>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ end
|
|||||||
tables
|
tables
|
||||||
cctb00002
|
cctb00002
|
||||||
attributes
|
attributes
|
||||||
fe = cctb00002.fecha,format = "dd/mm/yyyy";
|
fe = formonly.fecha TYPE DATE,format = "dd/mm/yyyy";
|
||||||
f001 = cctb00002.sec_vend,autonext,comments =
|
f001 = cctb00002.sec_vend,autonext,comments =
|
||||||
"Digite Codigo Vendedor o Presione Ctrl-W Para Busqueda";
|
"Digite Codigo Vendedor o Presione Ctrl-W Para Busqueda";
|
||||||
p = formonly.nombre_emp,noentry;
|
p = formonly.nombre_emp,noentry;
|
||||||
|
|||||||
@@ -188,7 +188,19 @@ GLOBALS
|
|||||||
descrip6 CHAR(65)
|
descrip6 CHAR(65)
|
||||||
END RECORD
|
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 rec_pago RECORD LIKE cctb00001.*
|
||||||
DEFINE cliente_bas RECORD LIKE vetb00004.*
|
DEFINE cliente_bas RECORD LIKE vetb00004.*
|
||||||
DEFINE p_companias RECORD LIKE companias.*
|
DEFINE p_companias RECORD LIKE companias.*
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ END FUNCTION
|
|||||||
FUNCTION ccpcad002()
|
FUNCTION ccpcad002()
|
||||||
|
|
||||||
DEFINE hoy CHAR(10)
|
DEFINE hoy CHAR(10)
|
||||||
|
DEFINE n_pg INTEGER
|
||||||
## Captura los datos que va a contener el registro
|
## Captura los datos que va a contener el registro
|
||||||
# WHENEVER ERROR CONTINUE
|
# WHENEVER ERROR CONTINUE
|
||||||
|
|
||||||
@@ -201,9 +202,11 @@ DEFINE hoy CHAR(10)
|
|||||||
CALL msg(numero_msg)
|
CALL msg(numero_msg)
|
||||||
NEXT FIELD sec_a
|
NEXT FIELD sec_a
|
||||||
END IF
|
END IF
|
||||||
SELECT *FROM cctb00003 WHERE sec_vend = relacion.sec_vend AND
|
-- G6: el contador de recibos PG es uno solo (ccprmt001/003/005 lo leen por tipo_doc);
|
||||||
tipo_doc = "PG"
|
-- crear otra fila por vendedor hace que esos programas fallen con -284
|
||||||
IF status = notfound THEN
|
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,
|
INSERT INTO cctb00003 (cod_vend,sec_vend,ult_recibo,us_crea,
|
||||||
fech_crea,tipo_doc)
|
fech_crea,tipo_doc)
|
||||||
VALUES (null,relacion.sec_vend,relacion.sec_de,
|
VALUES (null,relacion.sec_vend,relacion.sec_de,
|
||||||
@@ -235,10 +238,11 @@ DEFINE hoy CHAR(10)
|
|||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
|
||||||
FUNCTION ccpcmf002()
|
FUNCTION ccpcmf002()
|
||||||
|
DEFINE ult_rec INTEGER
|
||||||
## Aqui se prepara para la captura del criterio de seleccion
|
## Aqui se prepara para la captura del criterio de seleccion
|
||||||
#WHENEVER ERROR CONTINUE
|
#WHENEVER ERROR CONTINUE
|
||||||
CONSTRUCT criterio ON fecha,sec_vend,sec_de,sec_a
|
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
|
cctb00002.sec_de,cctb00002.sec_a
|
||||||
|
|
||||||
IF int_flag THEN
|
IF int_flag THEN
|
||||||
@@ -433,8 +437,8 @@ FUNCTION ccpcmf002()
|
|||||||
fecha = relacion.fecha
|
fecha = relacion.fecha
|
||||||
|
|
||||||
|
|
||||||
LET relacion.sec_de = relacion.sec_de - 1
|
LET ult_rec = relacion.sec_de - 1
|
||||||
UPDATE cctb00003 SET ult_recibo = relacion.sec_de
|
UPDATE cctb00003 SET ult_recibo = ult_rec
|
||||||
WHERE sec_vend = relacion.sec_vend AND
|
WHERE sec_vend = relacion.sec_vend AND
|
||||||
tipo_doc = "PG"
|
tipo_doc = "PG"
|
||||||
|
|
||||||
@@ -456,8 +460,11 @@ FUNCTION ccpcmf002()
|
|||||||
WHERE sec_vend = relacion.sec_vend and
|
WHERE sec_vend = relacion.sec_vend and
|
||||||
fecha = relacion.fecha and
|
fecha = relacion.fecha and
|
||||||
sec_de = relacion.sec_de
|
sec_de = relacion.sec_de
|
||||||
|
IF sqlca.sqlerrd[3] = 0 THEN
|
||||||
LET numero_msg = 39
|
LET numero_msg = 3
|
||||||
|
ELSE
|
||||||
|
LET numero_msg = 39
|
||||||
|
END IF
|
||||||
CALL msg(numero_msg)
|
CALL msg(numero_msg)
|
||||||
|
|
||||||
COMMAND "Retornar"
|
COMMAND "Retornar"
|
||||||
|
|||||||
+56
-103
@@ -55,8 +55,22 @@ GLOBALS "ccprgb000.4gl"
|
|||||||
apellido CHAR(30)
|
apellido CHAR(30)
|
||||||
END RECORD
|
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()
|
FUNCTION ccprrp001()
|
||||||
DEFINE salir2,salir,salir1 CHAR(1)
|
DEFINE salir2,salir,salir1 CHAR(1)
|
||||||
|
DEFINE r_output STRING
|
||||||
|
DEFINE handler om.SaxDocumentHandler
|
||||||
|
DEFINE hay SMALLINT
|
||||||
# WHENEVER ERROR CONTINUE
|
# WHENEVER ERROR CONTINUE
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
@@ -66,7 +80,7 @@ DEFINE salir2,salir,salir1 CHAR(1)
|
|||||||
|
|
||||||
OPEN FORM ccfmrp001 FROM "ccfmrp001"
|
OPEN FORM ccfmrp001 FROM "ccfmrp001"
|
||||||
DISPLAY FORM ccfmrp001
|
DISPLAY FORM ccfmrp001
|
||||||
CALL pantalla()
|
#CALL pantalla()
|
||||||
DISPLAY "ccprrp001" AT 4,3
|
DISPLAY "ccprrp001" AT 4,3
|
||||||
DISPLAY "Clientes sin Ventas" AT 6,30
|
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 ",
|
"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 ",
|
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 ",
|
" 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
|
DISPLAY "<< Buscando Factura del Cliente... Espere Por Favor. >>" AT 19,14
|
||||||
ATTRIBUTE (REVERSE,BOLD)
|
ATTRIBUTE (REVERSE,BOLD)
|
||||||
@@ -130,7 +144,16 @@ DEFINE salir2,salir,salir1 CHAR(1)
|
|||||||
DECLARE busca CURSOR FOR comando
|
DECLARE busca CURSOR FOR comando
|
||||||
OPEN busca USING fecha_corte
|
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 " " AT 19,14
|
||||||
DISPLAY "<< Reporte Generandose ... Por Favor Espere. >>"
|
DISPLAY "<< Reporte Generandose ... Por Favor Espere. >>"
|
||||||
AT 19,14 ATTRIBUTE (REVERSE)
|
AT 19,14 ATTRIBUTE (REVERSE)
|
||||||
@@ -199,12 +222,15 @@ IF (fecha_corte - vendcli.fecha) >= dia_minimo AND
|
|||||||
LET vendcli.balance = balancli.balance - valor_de
|
LET vendcli.balance = balancli.balance - valor_de
|
||||||
|
|
||||||
OUTPUT TO REPORT ventas(vendcli.*,fecha_corte)
|
OUTPUT TO REPORT ventas(vendcli.*,fecha_corte)
|
||||||
|
LET hay = 1
|
||||||
END IF
|
END IF
|
||||||
END WHILE
|
END WHILE
|
||||||
|
|
||||||
FINISH REPORT ventas
|
FINISH REPORT ventas
|
||||||
CLEAR SCREEN
|
IF NOT hay THEN
|
||||||
RUN "type C:\\archivo > %USPRINT%" END FUNCTION
|
CALL fgl_winmessage("INFO", "NO EXISTEN REGISTROS PARA ESTOS PARAMETROS", "info")
|
||||||
|
END IF
|
||||||
|
END FUNCTION
|
||||||
|
|
||||||
REPORT ventas(x,fecha5)
|
REPORT ventas(x,fecha5)
|
||||||
DEFINE x RECORD
|
DEFINE x RECORD
|
||||||
@@ -217,112 +243,39 @@ REPORT ventas(x,fecha5)
|
|||||||
valor DECIMAL(12,2),
|
valor DECIMAL(12,2),
|
||||||
balance DECIMAL(12,2)
|
balance DECIMAL(12,2)
|
||||||
END RECORD
|
END RECORD
|
||||||
|
|
||||||
DEFINE nombre1,apellido CHAR(30)
|
DEFINE nombre1,apellido CHAR(30)
|
||||||
DEFINE dias_c INTEGER
|
|
||||||
DEFINE fecha5 DATE
|
DEFINE fecha5 DATE
|
||||||
DEFINE balance, monto_factura DECIMAL(10,2)
|
DEFINE empresa, titulo, vendedor, cli, fec STRING
|
||||||
DEFINE descrip_zone CHAR(30)
|
DEFINE dias_c INTEGER
|
||||||
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
|
|
||||||
|
|
||||||
ORDER BY x.sec_vend,x.sec_cliente
|
ORDER BY x.sec_vend,x.sec_cliente
|
||||||
|
|
||||||
FORMAT
|
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
|
BEFORE GROUP OF x.sec_vend
|
||||||
SKIP 1 LINE
|
INITIALIZE nombre1, apellido TO NULL
|
||||||
SELECT nom1_emp,apell1_emp INTO nombre1,apellido
|
SELECT nom1_emp,apell1_emp INTO nombre1,apellido
|
||||||
FROM adtb00003 WHERE status_t IS NULL AND num_emp = x.sec_vend
|
FROM adtb00003 WHERE status_t IS NULL AND num_emp = x.sec_vend
|
||||||
LET descrip5 = NULL
|
LET descrip5 = NULL
|
||||||
LET descrip5 = nombre1 CLIPPED," ",apellido CLIPPED
|
LET descrip5 = nombre1 CLIPPED," ",apellido CLIPPED
|
||||||
|
IF descrip5 IS NULL OR LENGTH(descrip5 CLIPPED) = 0 THEN
|
||||||
IF descrip5 IS NULL THEN
|
LET descrip5 = "Vendedor no Existe. Verifique."
|
||||||
LET descrip5 = "Vendedor no Existe. Verifique."
|
END IF
|
||||||
END IF
|
LET vendedor = "Vendedor : ", x.sec_vend USING "&&&&", " ", descrip5 CLIPPED
|
||||||
|
LET empresa = p_companias.nombre CLIPPED
|
||||||
PRINT COLUMN 1," Vendedor : ",x.sec_vend using "&&&&"," ", descrip5
|
IF dia_maximo != 3650 THEN
|
||||||
clipped
|
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
|
ON EVERY ROW
|
||||||
|
LET cli = x.tipo_cliente USING "&&", "-", x.sec_cliente USING "&&&&&",
|
||||||
PRINT COLUMN 4, x.tipo_cliente using "&&","-",
|
" ", x.nombre CLIPPED
|
||||||
COLUMN 7, x.sec_cliente using "&&&&",
|
LET fec = x.fecha USING "dd/mm/yyyy"
|
||||||
COLUMN 12, x.nombre,
|
LET dias_c = fecha5 - x.fecha
|
||||||
COLUMN 44, x.factura using "######",
|
PRINTX cli, x.factura, fec, x.valor, dias_c, x.balance
|
||||||
COLUMN 52, x.fecha using "dd/mm/yyyy",
|
END REPORT
|
||||||
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
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,20 @@ GLOBALS "ccprgb000.4gl"
|
|||||||
CALL ccprrp003()
|
CALL ccprrp003()
|
||||||
END MAIN
|
END MAIN
|
||||||
FUNCTION ccprrp003()
|
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
|
# WHENEVER ERROR CONTINUE
|
||||||
|
|
||||||
@@ -157,8 +171,20 @@ LABEL atras:
|
|||||||
START REPORT reporte3 TO archivo
|
START REPORT reporte3 TO archivo
|
||||||
}
|
}
|
||||||
CALL seleccionarsalida() RETURNING r_output
|
CALL seleccionarsalida() RETURNING r_output
|
||||||
CALL configureoutput(r_output) RETURNING handler
|
CALL configureoutput3(r_output) RETURNING handler
|
||||||
START REPORT reporte3 TO XML HANDLER 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 = null
|
||||||
LET cmd = FGL_GETENV("FGLSPOOL")||"\\DATA.txt"
|
LET cmd = FGL_GETENV("FGLSPOOL")||"\\DATA.txt"
|
||||||
@@ -201,7 +227,11 @@ LET selec1 =
|
|||||||
IF progreso > 50 THEN
|
IF progreso > 50 THEN
|
||||||
LET progreso = 50
|
LET progreso = 50
|
||||||
END IF
|
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)
|
OUTPUT TO REPORT reporte33(doccli.*,tipo_venta,fecha_corte,valor_total)
|
||||||
|
|
||||||
DISPLAY progreso TO progreso
|
DISPLAY progreso TO progreso
|
||||||
@@ -250,7 +280,11 @@ LET selec3 =
|
|||||||
LET progreso = 95
|
LET progreso = 95
|
||||||
END IF
|
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)
|
OUTPUT TO REPORT reporte33(doccli.*,tipo_venta,fecha_corte,valor_total)
|
||||||
|
|
||||||
DISPLAY progreso TO progreso
|
DISPLAY progreso TO progreso
|
||||||
@@ -259,7 +293,46 @@ LET selec3 =
|
|||||||
LET progreso = 100
|
LET progreso = 100
|
||||||
DISPLAY progreso to progreso
|
DISPLAY progreso to progreso
|
||||||
CALL ui.Interface.refresh()
|
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
|
FINISH REPORT reporte33
|
||||||
|
|
||||||
CALL ui.Interface.frontCall("standard","getenv", ["CREDITO"], [dcmd] )
|
CALL ui.Interface.frontCall("standard","getenv", ["CREDITO"], [dcmd] )
|
||||||
@@ -1061,4 +1134,70 @@ END FUNCTION
|
|||||||
LET total_saldo = 0
|
LET total_saldo = 0
|
||||||
END REPORT
|
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
|
END RECORD
|
||||||
DEFINE fecha3 DATE
|
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()
|
FUNCTION ccprrp018()
|
||||||
|
|
||||||
# WHENEVER ERROR CONTINUE
|
# WHENEVER ERROR CONTINUE
|
||||||
@@ -75,7 +85,7 @@ FUNCTION ccprrp018()
|
|||||||
|
|
||||||
OPEN FORM ccfmrp018 FROM "ccfmrp018"
|
OPEN FORM ccfmrp018 FROM "ccfmrp018"
|
||||||
DISPLAY FORM ccfmrp018
|
DISPLAY FORM ccfmrp018
|
||||||
CALL pantalla()
|
#CALL pantalla()
|
||||||
DISPLAY "ccprrp018" AT 4,3 ATTRIBUTE(RED)
|
DISPLAY "ccprrp018" AT 4,3 ATTRIBUTE(RED)
|
||||||
DISPLAY "Estado Cuentas Pendiente De Cobros" AT 6,21 ATTRIBUTE(BLACK)
|
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.tipo_cliente = c.tipo_cliente AND ",
|
||||||
" a.sec_cliente = c.sec_cliente AND ",
|
" a.sec_cliente = c.sec_cliente AND ",
|
||||||
#" a.sec_cliente = b.sec_cliente AND a.tipo_doc in ('FE','FT','NC') 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 "
|
"ORDER BY 3 "
|
||||||
|
|
||||||
DISPLAY "<< Buscando los Movimientos del Rango >>" AT 20,14
|
DISPLAY "<< Buscando los Movimientos del Rango >>" AT 20,14
|
||||||
@@ -134,7 +144,7 @@ LET selec5 =
|
|||||||
|
|
||||||
PREPARE movi FROM selec5
|
PREPARE movi FROM selec5
|
||||||
DECLARE movtos_cli CURSOR FOR movi
|
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"
|
LET destino = "E"
|
||||||
IF destino = "E" THEN
|
IF destino = "E" THEN
|
||||||
CALL e_ccrp18()
|
CALL e_ccrp18()
|
||||||
@@ -496,370 +506,183 @@ END IF
|
|||||||
END REPORT
|
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()
|
FUNCTION e_ccrp18()
|
||||||
DEFINE primera,imprime_ana,imprime_cliente CHAR(1),
|
DEFINE codigo_act, codigo_ant STRING
|
||||||
cliente CHAR(70),
|
DEFINE handler om.SaxDocumentHandler
|
||||||
codigo_g,codigo_ant,codigo_act CHAR(6),
|
DEFINE r_output STRING
|
||||||
ret CHAR(30),
|
DEFINE hay SMALLINT
|
||||||
ejecuta,localiza CHAR(80),
|
DEFINE sql_ins STRING
|
||||||
documento CHAR(9)
|
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
|
||||||
|
|
||||||
--# CALL fgl_init4js()
|
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 = NULL
|
LET sql_ins =
|
||||||
--# LET filename = NULL
|
"INSERT INTO estado (tipo_cliente,sec_cliente,aplica_a,fecha_venc,valor,tipo_doc,fecha_min) ",
|
||||||
--# LET filename = FGL_GETENV("USPROGRAM")
|
"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
|
||||||
|
|
||||||
--# LET archivo = "G:\\\\ESTADO.XLS"
|
LET r_output = getPreviewDevice()
|
||||||
--# LET sysos = FGL_GETENV("OS")
|
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
|
||||||
|
|
||||||
--# IF sysos = "Windows_NT" THEN
|
DECLARE buscate CURSOR FOR
|
||||||
--# LET filename = filename CLIPPED," G:\\\\ESTADO.XLS"
|
SELECT a.tipo_cliente, a.sec_cliente, a.aplica_a, a.valor,
|
||||||
--# LET localiza = "G:\\ESTADOS\\"
|
a.fecha_venc, a.tipo_doc, a.fecha_min
|
||||||
|
FROM estado a
|
||||||
|
ORDER BY a.tipo_cliente, a.sec_cliente, a.aplica_a
|
||||||
|
|
||||||
--# LET ejecuta = "DEL /S /Q ",localiza CLIPPED,"*.*"
|
LET hay = 0
|
||||||
RUN ejecuta
|
LET codigo_ant = NULL
|
||||||
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 ejecuta = "DEL ",localiza CLIPPED,"*.xls"
|
|
||||||
RUN ejecuta
|
|
||||||
LET ejecuta = NULL
|
|
||||||
--# END IF
|
|
||||||
|
|
||||||
|
|
||||||
# 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 balance = 0
|
LET balance = 0
|
||||||
LET codigo_ant = "1"
|
FOREACH buscate INTO movtos.*, fecha3, tipo, fecha2
|
||||||
LET codigo_Act = NULL
|
LET hay = 1
|
||||||
FOREACH buscate INTO movtos.*
|
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 balance = balance + movtos.valor
|
||||||
LET imprime_ana = "N"
|
LET fila.codigo = codigo_act
|
||||||
IF primera = "S" THEN
|
LET fila.cliente = p_nombre CLIPPED, " (", codigo_act, ")"
|
||||||
LET codigo_ant = codigo_Act
|
LET fila.direccion = p_calle CLIPPED, " #", p_casa CLIPPED, ", ",
|
||||||
END IF
|
pbarrio CLIPPED, " Tel. ", ptelefono CLIPPED
|
||||||
IF codigo_ant != codigo_act THEN
|
LET fila.limite = "LIMITE: ", p_limite_credito USING "##,###,##&.&&",
|
||||||
LET codigo_ant = codigo_Act
|
" RNC: ", p_numero CLIPPED
|
||||||
LET primera = "S"
|
LET fila.zona = nombre_zona CLIPPED, ", ", nombre_p CLIPPED
|
||||||
LET imprime_ana = "S"
|
LET fila.corte = "Al ", fecha_final USING "dd/mm/yyyy"
|
||||||
--# LET cels = "R",38 USING "<<","C2"
|
LET fila.documento = movtos.aplica_a USING "<<<<<<<<<", "-", tipo CLIPPED
|
||||||
--# IF DDEpoke("EXCEL",archivo,cels,no_v) THEN
|
LET fila.fecha = fecha2 USING "dd/mm/yyyy"
|
||||||
--# ELSE
|
LET fila.valor = movtos.valor
|
||||||
--# LET numero_msg =391
|
LET fila.balance = balance
|
||||||
--# CALL msg(numero_msg)
|
LET fila.dias = (fecha_final - fecha3) - dias2
|
||||||
--# END IF
|
OUTPUT TO REPORT estado18(fila.*)
|
||||||
|
END FOREACH
|
||||||
|
|
||||||
--# LET cels = "R",38 USING "<<","C3"
|
FINISH REPORT estado18
|
||||||
--# IF DDEpoke("EXCEL",archivo,cels,v1_30) THEN
|
DROP TABLE estado
|
||||||
--# ELSE
|
|
||||||
--# LET numero_msg =391
|
|
||||||
--# CALL msg(numero_msg)
|
|
||||||
--# END IF
|
|
||||||
|
|
||||||
--# LET cels = "R",38 USING "<<","C4"
|
IF NOT hay THEN
|
||||||
--# IF DDEpoke("EXCEL",archivo,cels,v31_45) THEN
|
CALL fgl_winmessage("INFO",
|
||||||
--# ELSE
|
"NO EXISTEN REGISTROS PARA ESTOS PARAMETROS", "info")
|
||||||
--# LET numero_msg =391
|
END IF
|
||||||
--# CALL msg(numero_msg)
|
END FUNCTION
|
||||||
--# END IF
|
|
||||||
|
|
||||||
--# LET cels = "R",38 USING "<<","C5"
|
REPORT estado18(x)
|
||||||
--# IF DDEpoke("EXCEL",archivo,cels,v46_60) THEN
|
DEFINE x RECORD
|
||||||
--# ELSE
|
codigo STRING,
|
||||||
--# LET numero_msg =391
|
cliente STRING,
|
||||||
--# CALL msg(numero_msg)
|
direccion STRING,
|
||||||
--# END IF
|
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"
|
ORDER EXTERNAL BY x.codigo
|
||||||
--# IF DDEpoke("EXCEL",archivo,cels,vm_60) THEN
|
|
||||||
--# ELSE
|
|
||||||
--# LET numero_msg =391
|
|
||||||
--# CALL msg(numero_msg)
|
|
||||||
--# END IF
|
|
||||||
|
|
||||||
--# LET command = "Run(\\\"ESTADO.XLS!SALVAR\\\";FALSE)"
|
FORMAT
|
||||||
--# CALL DDEExecute ("EXCEL",archivo,command) RETURNING ret
|
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
|
ON EVERY ROW
|
||||||
LET ejecuta = "COPY G:\\ESTADO.XLS G:\\ESTADOS\\",
|
LET total = total + x.valor
|
||||||
codigo_g,".xls"
|
CASE
|
||||||
--# ELSE
|
WHEN x.dias <= 0
|
||||||
LET ejecuta = "COPY G:\\ESTADO.XLS G:\\ESTADOS\\",
|
LET nov = nov + x.valor
|
||||||
codigo_g,".xls"
|
WHEN x.dias < 31
|
||||||
--# END IF
|
LET d1 = d1 + x.valor
|
||||||
RUN ejecuta
|
WHEN x.dias < 46
|
||||||
|
LET d2 = d2 + x.valor
|
||||||
--# LET command = "Run(\\\"ESTADO.XLS!LIMPIAR\\\";FALSE)"
|
WHEN x.dias < 61
|
||||||
--# CALL DDEExecute ("EXCEL",archivo,command) RETURNING ret
|
LET d3 = d3 + x.valor
|
||||||
|
OTHERWISE
|
||||||
LET cnt = 16
|
LET d4 = d4 + x.valor
|
||||||
--# END IF
|
END CASE
|
||||||
|
PRINTX x.documento, x.fecha, x.valor, x.balance, x.dias
|
||||||
--# 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
|
|
||||||
|
|
||||||
|
AFTER GROUP OF x.codigo
|
||||||
|
PRINTX nov, d1, d2, d3, d4, total
|
||||||
|
END REPORT
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ MAIN
|
|||||||
END MAIN
|
END MAIN
|
||||||
|
|
||||||
FUNCTION ccprrp052()
|
FUNCTION ccprrp052()
|
||||||
|
DEFINE n_ord INTEGER
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
FORM LINE 8,
|
FORM LINE 8,
|
||||||
@@ -97,9 +98,10 @@ FUNCTION ccprrp052()
|
|||||||
END IF
|
END IF
|
||||||
AFTER FIELD borden
|
AFTER FIELD borden
|
||||||
IF borden IS NOT NULL THEN
|
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
|
a.status_t IS NULL
|
||||||
IF STATUS <> NOTFOUND THEN
|
IF n_ord = 0 THEN
|
||||||
CALL fgl_winmessage("INFO","ORDEN NO EXISTE","INFO")
|
CALL fgl_winmessage("INFO","ORDEN NO EXISTE","INFO")
|
||||||
NEXT FIELD borden
|
NEXT FIELD borden
|
||||||
END IF
|
END IF
|
||||||
|
|||||||
@@ -786,11 +786,7 @@ ON ACTION guardar ATTRIBUTE(TEXT="Salvar", IMAGE="save")
|
|||||||
COMMIT WORK
|
COMMIT WORK
|
||||||
|
|
||||||
CALL seleccionarsalida() RETURNING salida
|
CALL seleccionarsalida() RETURNING salida
|
||||||
-- La API de configuracion de reportes (fgl_report_*) no esta
|
CALL configureoutput(salida) RETURNING HANDLER
|
||||||
-- 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)
|
|
||||||
|
|
||||||
START REPORT print_req TO XML HANDLER HANDLER
|
START REPORT print_req TO XML HANDLER HANDLER
|
||||||
|
|
||||||
@@ -907,9 +903,7 @@ ON ACTION guardar ATTRIBUTE(TEXT="Salvar", IMAGE="save")
|
|||||||
COMMIT WORK
|
COMMIT WORK
|
||||||
|
|
||||||
CALL seleccionarsalida() RETURNING salida
|
CALL seleccionarsalida() RETURNING salida
|
||||||
-- Ver nota sobre fgl_report_* mas arriba en este archivo.
|
CALL configureoutput(salida) RETURNING HANDLER
|
||||||
LET p_reportfile = FGL_GETENV("FGLSPOOL"), "/coprmt025_req2.xml"
|
|
||||||
LET handler = om.XmlWriter.createFileWriter(p_reportfile)
|
|
||||||
START REPORT print_req TO XML HANDLER HANDLER
|
START REPORT print_req TO XML HANDLER HANDLER
|
||||||
|
|
||||||
PREPARE query FROM
|
PREPARE query FROM
|
||||||
@@ -1189,12 +1183,11 @@ FUNCTION copcmf025()
|
|||||||
|
|
||||||
|
|
||||||
ON ACTION impresor
|
ON ACTION impresor
|
||||||
|
CALL seleccionarsalida() RETURNING salida
|
||||||
IF salida IS NULL THEN
|
IF salida IS NULL THEN
|
||||||
LET salida = 'PDF'
|
LET salida = 'PDF'
|
||||||
END IF
|
END IF
|
||||||
-- Ver nota sobre fgl_report_* mas arriba en este archivo.
|
CALL configureoutput(salida) RETURNING HANDLER
|
||||||
LET p_reportfile = FGL_GETENV("FGLSPOOL"), "/coprmt025_req3.xml"
|
|
||||||
LET handler = om.XmlWriter.createFileWriter(p_reportfile)
|
|
||||||
START REPORT print_req TO XML HANDLER HANDLER
|
START REPORT print_req TO XML HANDLER HANDLER
|
||||||
|
|
||||||
PREPARE query FROM
|
PREPARE query FROM
|
||||||
|
|||||||
+13
-4
@@ -70,7 +70,7 @@
|
|||||||
</Settings>
|
</Settings>
|
||||||
<LanguageList version="1.0"/>
|
<LanguageList version="1.0"/>
|
||||||
<PlatformList 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">
|
<Library binaryName="Config" id="1765711908" label="Config">
|
||||||
<File filePath="config/Application.xcf"/>
|
<File filePath="config/Application.xcf"/>
|
||||||
</Library>
|
</Library>
|
||||||
@@ -241,7 +241,7 @@
|
|||||||
<File filePath="codir/cofmmt016.4fd"/>
|
<File filePath="codir/cofmmt016.4fd"/>
|
||||||
<File filePath="codir/cofmmt010.per"/>
|
<File filePath="codir/cofmmt010.per"/>
|
||||||
<File filePath="codir/cofmwd015.per"/>
|
<File filePath="codir/cofmwd015.per"/>
|
||||||
<File filePath="codir/cofmmt025.per"/>
|
<File filePath="codir/cofmmt025.4fd"/>
|
||||||
<File filePath="codir/cofmcs005.per"/>
|
<File filePath="codir/cofmcs005.per"/>
|
||||||
<File filePath="codir/cofmcs010.4fd"/>
|
<File filePath="codir/cofmcs010.4fd"/>
|
||||||
<File filePath="codir/cofmcs009.per"/>
|
<File filePath="codir/cofmcs009.per"/>
|
||||||
@@ -491,6 +491,7 @@
|
|||||||
<File filePath="ccdir/ccfmmt031.4fd"/>
|
<File filePath="ccdir/ccfmmt031.4fd"/>
|
||||||
<File filePath="ccdir/ccfmmt050.4fd"/>
|
<File filePath="ccdir/ccfmmt050.4fd"/>
|
||||||
<File filePath="ccdir/ccfmmt051.4fd"/>
|
<File filePath="ccdir/ccfmmt051.4fd"/>
|
||||||
|
<File filePath="ccdir/ccfmrp001.per"/>
|
||||||
<File filePath="ccdir/ccfmrp003.per"/>
|
<File filePath="ccdir/ccfmrp003.per"/>
|
||||||
<File filePath="ccdir/ccfmrp005.4fd"/>
|
<File filePath="ccdir/ccfmrp005.4fd"/>
|
||||||
<File filePath="ccdir/ccfmrp006.4fd"/>
|
<File filePath="ccdir/ccfmrp006.4fd"/>
|
||||||
@@ -571,13 +572,15 @@
|
|||||||
<Configuration id="-130911542" label="Configuration"/>
|
<Configuration id="-130911542" label="Configuration"/>
|
||||||
<File filePath="ccdir/ccprcs006.4gl"/>
|
<File filePath="ccdir/ccprcs006.4gl"/>
|
||||||
</Application>
|
</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"/>
|
<Configuration id="-649515238" label="Configuration"/>
|
||||||
<File filePath="ccdir/ccprrp001.4gl"/>
|
<File filePath="ccdir/ccprrp001.4gl"/>
|
||||||
|
<File filePath="bin/ccprrp001.4rp"/>
|
||||||
</Application>
|
</Application>
|
||||||
<Application binaryName="ccprrp003" dependencies="-764824792,-1766170440,-1423229125,-1026233879,579381494" environment="dir:FGLSPOOL=$(ProjectDir)/spool" externalDependencies="libgre.42x" id="-1096311760" label="ccprrp003">
|
<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"/>
|
<Configuration id="1917407404" label="Configuration"/>
|
||||||
<File filePath="ccdir/ccprrp003.4gl"/>
|
<File filePath="ccdir/ccprrp003.4gl"/>
|
||||||
|
<File filePath="bin/ccprrp003.4rp"/>
|
||||||
</Application>
|
</Application>
|
||||||
<Application binaryName="ccprrp005" dependencies="-764824792,-1766170440,-1423229125,-1026233879,579381494" environment="dir:FGLSPOOL=$(ProjectDir)/spool" externalDependencies="libgre.42x" id="-1050567098" label="ccprrp005">
|
<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"/>
|
<Configuration id="-786255033" label="Configuration"/>
|
||||||
@@ -598,9 +601,10 @@
|
|||||||
<File compilerOptions="--build-rdd" filePath="ccdir/ccprrp016.4gl"/>
|
<File compilerOptions="--build-rdd" filePath="ccdir/ccprrp016.4gl"/>
|
||||||
<File filePath="bin/ccprrp016.4rp"/>
|
<File filePath="bin/ccprrp016.4rp"/>
|
||||||
</Application>
|
</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"/>
|
<Configuration id="-737983639" label="Configuration"/>
|
||||||
<File filePath="ccdir/ccprrp018.4gl"/>
|
<File filePath="ccdir/ccprrp018.4gl"/>
|
||||||
|
<File filePath="bin/ccprrp018.4rp"/>
|
||||||
</Application>
|
</Application>
|
||||||
<Application binaryName="ccprrp025" dependencies="-764824792,-1766170440,-1423229125,-1026233879,579381494" environment="dir:FGLSPOOL=$(ProjectDir)/spool" id="472069542" label="ccprrp025">
|
<Application binaryName="ccprrp025" dependencies="-764824792,-1766170440,-1423229125,-1026233879,579381494" environment="dir:FGLSPOOL=$(ProjectDir)/spool" id="472069542" label="ccprrp025">
|
||||||
<Configuration id="1059530363" label="Configuration"/>
|
<Configuration id="1059530363" label="Configuration"/>
|
||||||
@@ -1300,6 +1304,11 @@
|
|||||||
<File filePath="nodir/noprrp044.4gl"/>
|
<File filePath="nodir/noprrp044.4gl"/>
|
||||||
<File filePath="bin/noprrp044.4rp"/>
|
<File filePath="bin/noprrp044.4rp"/>
|
||||||
</Application>
|
</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">
|
<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"/>
|
<Configuration commandLineArguments="alopez Lopez2023" id="-700000086" label="Configuration"/>
|
||||||
<File filePath="nodir/noprrp038.4gl"/>
|
<File filePath="nodir/noprrp038.4gl"/>
|
||||||
|
|||||||
@@ -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
|
-- configure report engine; the functions prefixed fgl that are called here are part of the GRW API
|
||||||
LET r_filename = 'noprrp008.4rp'
|
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
|
IF fgl_report_loadCurrentSettings(r_filename) THEN -- load the .4rp file
|
||||||
LET r_output='SVG'
|
|
||||||
LET preview=1
|
LET preview=1
|
||||||
CALL fgl_report_selectDevice(r_output) -- changing default
|
CALL fgl_report_selectDevice(r_output) -- changing default
|
||||||
CALL fgl_report_selectPreview(preview) -- changing default
|
CALL fgl_report_selectPreview(preview) -- changing default
|
||||||
|
|||||||
@@ -182,8 +182,9 @@ FUNCTION noprrp009()
|
|||||||
EXIT WHILE
|
EXIT WHILE
|
||||||
END IF
|
END IF
|
||||||
IF idx = 1 THEN
|
IF idx = 1 THEN
|
||||||
LET cmd = FGL_GETENV("FGLSPOOL"),"\\noprrp009.txt"
|
CALL seleccionarsalida() RETURNING r_output
|
||||||
START REPORT list_cooper TO cmd
|
CALL configureoutput(r_output) RETURNING handler
|
||||||
|
START REPORT list_cooper TO XML HANDLER handler
|
||||||
LET idx = 2
|
LET idx = 2
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
@@ -239,6 +240,7 @@ END FUNCTION
|
|||||||
OUTPUT
|
OUTPUT
|
||||||
|
|
||||||
## DEFINICION DE LOS MARGENES DE IMPRESION
|
## DEFINICION DE LOS MARGENES DE IMPRESION
|
||||||
|
RIGHT MARGIN 86
|
||||||
TOP MARGIN 0
|
TOP MARGIN 0
|
||||||
LEFT MARGIN 0
|
LEFT MARGIN 0
|
||||||
BOTTOM MARGIN 3
|
BOTTOM MARGIN 3
|
||||||
@@ -321,6 +323,7 @@ END FUNCTION
|
|||||||
SKIP TO TOP OF PAGE
|
SKIP TO TOP OF PAGE
|
||||||
LET total1 = 0
|
LET total1 = 0
|
||||||
LET total = 0
|
LET total = 0
|
||||||
|
LET noRegistros = 0 -- el conteo es por codigo de movimiento
|
||||||
|
|
||||||
AFTER GROUP OF x.num_emp
|
AFTER GROUP OF x.num_emp
|
||||||
LET balance = 0
|
LET balance = 0
|
||||||
|
|||||||
@@ -34,8 +34,8 @@
|
|||||||
<ToolBarItem image="new.png" name="nuevo" text="Nuevo"/>
|
<ToolBarItem image="new.png" name="nuevo" text="Nuevo"/>
|
||||||
<ToolBarItem image="exit.png" name="cancel"/>
|
<ToolBarItem image="exit.png" name="cancel"/>
|
||||||
<ToolBarSeparator name="ToolBarSeparator1"/>
|
<ToolBarSeparator name="ToolBarSeparator1"/>
|
||||||
<ToolBarItem comment="Desactiva Registro" image="cancel.png" name="desactivar"/>
|
<ToolBarItem comment="Desactiva Registro" image="cancel.png" name="desactivar" text="Desactivar"/>
|
||||||
<ToolBarItem comment="Activa Registro" image="accept.png" name="activar"/>
|
<ToolBarItem comment="Activa Registro" image="accept.png" name="activar" text="Activar"/>
|
||||||
</ToolBar>
|
</ToolBar>
|
||||||
<Folder gridHeight="20" gridWidth="125" name="folder" posX="1" posY="1">
|
<Folder gridHeight="20" gridWidth="125" name="folder" posX="1" posY="1">
|
||||||
<Page name="Page1" text="Lista Grupos Clientes">
|
<Page name="Page1" text="Lista Grupos Clientes">
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ DIALOG ATTRIBUTE(UNBUFFERED)
|
|||||||
CALL activar(arr_lista[arr_curr()].pcod_grupo)
|
CALL activar(arr_lista[arr_curr()].pcod_grupo)
|
||||||
CALL lista_grupos()
|
CALL lista_grupos()
|
||||||
AFTER DISPLAY
|
AFTER DISPLAY
|
||||||
|
IF operacion <> "N" THEN
|
||||||
|
|
||||||
LET centra.codigo_grupo = arr_lista[arr_curr()].pcod_grupo
|
LET centra.codigo_grupo = arr_lista[arr_curr()].pcod_grupo
|
||||||
LET centra.descripcion = arr_lista[arr_curr()].pdescripcion
|
LET centra.descripcion = arr_lista[arr_curr()].pdescripcion
|
||||||
@@ -90,6 +91,7 @@ DIALOG ATTRIBUTE(UNBUFFERED)
|
|||||||
LET idx = idx +1
|
LET idx = idx +1
|
||||||
END FOREACH
|
END FOREACH
|
||||||
|
|
||||||
|
END IF -- G6: no recargar el grupo seleccionado al crear uno nuevo
|
||||||
END DISPLAY
|
END DISPLAY
|
||||||
|
|
||||||
INPUT BY NAME centra.* ATTRIBUTE(WITHOUT DEFAULTS)
|
INPUT BY NAME centra.* ATTRIBUTE(WITHOUT DEFAULTS)
|
||||||
|
|||||||
Reference in New Issue
Block a user