This commit is contained in:
Luis
2026-10-19 10:11:40 -04:00
parent e0722b2e2a
commit a67f97271a
79 changed files with 19279 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

+84
View File
@@ -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="31409" version="6.00">
<report:Settings RWPageWidth="letterwidth" RWPageLength="letterlength" RWLeftMargin="0.5inch" RWTopMargin="0.5inch" RWRightMargin="0.5inch" RWBottomMargin="0.5inch">
<report:FormatList>
<report:Format-SVG/>
<report:Format-PDF/>
<report:Format-image/>
</report:FormatList>
</report:Settings>
<report:Data RWDataLocation="../cgdir/cgprmt023.rdd" RWFglReportName="gastos_gral"/>
<report:Conflicts/>
<rtl:stylesheet>
<PXML>
<rtl:match name="Report" nameConstraint="Report">
<MINIPAGE name="Page Root" width="max" length="max" alignment="near" fontSize="7">
<LAYOUTNODE name="page header" width="min" length="min" layoutDirection="topToBottom" port="anyPageHeader" floatingBehavior="enclosed">
<rtl:match name="FirstPageHeader" nameConstraint="FirstPageHeader" minOccurs="0" maxOccurs="1">
<LAYOUTNODE name="principal" width="min" length="min" floatingBehavior="enclosed">
<LAYOUTNODE name="encabezado" width="min" length="min" layoutDirection="leftToRight" floatingBehavior="enclosed">
<WORDBOX name="WordBox" width="61" fontBold="true" floatingBehavior="enclosed" text="CGPRRP023"/>
<rtl:input-variable name="pcompanias.nombre" type="FGLString" expectedLocation="expectedHere"/>
<WORDWRAPBOX name="pcompanias.nombre Value" width="411" fontSize="9" fontBold="true" floatingBehavior="enclosed" text="{{pcompanias.nombre}}" textAlignment="center"/>
<WORDBOX name="WordBox1_1" width="38.5" length="15.9285" alignment="far" fontBold="true" floatingBehavior="enclosed" text="Pagina NO:">
<PAGENOBOX name="PageNoBox" x="39.1082" y="-0.0608" anchorX="0" anchorY="0" fontBold="true" floatingBehavior="enclosed"/>
</WORDBOX>
</LAYOUTNODE>
<LAYOUTNODE name="LayoutNode" width="min" length="min" layoutDirection="leftToRight" floatingBehavior="enclosed">
<rtl:input-variable name="fechas" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="fechas Value" width="3inch" fontBold="true" floatingBehavior="enclosed" text="{{fechas}}"/>
</LAYOUTNODE>
</LAYOUTNODE>
</rtl:match>
<MINIPAGE name="MiniPage3" width="min" length="min" layoutDirection="leftToRight" floatingBehavior="enclosed">
<MINIPAGE name="Enc.Secundario" width="min" length="max" layoutDirection="leftToRight">
<WORDBOX name="WordBox9" width="454.69" length="12.1284" fontBold="true" floatingBehavior="enclosed" textAlignment="center" text="GASTOS POR DEPARTAMENTO"/>
<rtl:input-variable name="fecha_reporte" type="FGLString" expectedLocation="expectedBefore"/>
<WORDBOX name="fecha_reporte Value" width="84.789" length="11.5" alignment="near" fontBold="true" floatingBehavior="enclosed" text="{{fecha_reporte}}"/>
</MINIPAGE>
</MINIPAGE>
<MINIPAGE name="Enc.Cuerpo" width="9.357" length="max" alignment="near" layoutDirection="leftToRight" roundedCorners="true" borderWidth="1" borderStyle="solid">
<WORDBOX name="WordBox10" width="47.0492" length="7.8409" fontSize="7" fontBold="true" floatingBehavior="enclosed" text="CUENTA"/>
<WORDBOX name="WordBox3_1" width="160.598" length="8.26137" alignment="near" fontSize="7" fontBold="true" floatingBehavior="enclosed" text="DESCRIPCION"/>
<WORDBOX name="WordBox4" width="83.5391" length="6.76763" alignment="baseline" fontSize="7" fontBold="true" floatingBehavior="enclosed" text="AC. MES ANTERIOR"/>
<WORDBOX name="WordBox6" width="107.411" length="6.37421" alignment="baseline" fontSize="7" fontBold="true" floatingBehavior="enclosed" text="GASTOS RANGO FECHA"/>
<WORDBOX name="WordBox7" width="71.1098" length="7.69521" alignment="baseline" fontSize="7" fontBold="true" floatingBehavior="enclosed" text="AC. FECHA ACT"/>
<WORDBOX name="WordBox8" width="60.1435" length="9" alignment="baseline" fontSize="7" fontBold="true" floatingBehavior="enclosed" text="AÑO ANTERIOR"/>
</MINIPAGE>
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="MiniPage" width="min" length="min" layoutDirection="leftToRight">
<rtl:input-variable name="x.cuenta_no" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.cuenta_no Value" class="grwStringValue" width="48.9847" floatingBehavior="enclosed" text="{{x.cuenta_no}}"/>
<rtl:input-variable name="x.descripcion" type="FGLString" expectedLocation="expectedHere"/>
<WORDWRAPBOX name="x.descripcion Value" class="grwStringValue" width="161.11" floatingBehavior="enclosed" text="{{x.descripcion}}"/>
<rtl:input-variable name="x.ac_mes_anterior" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.ac_mes_anterior Value" class="grwNumericValue" width="63.9518" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{x.ac_mes_anterior}}"/>
<rtl:input-variable name="x.gastos_r_fecha" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.gastos_r_fecha Value" class="grwNumericValue" width="99.1426" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{x.gastos_r_fecha}}"/>
<rtl:input-variable name="x.ac_fecha_ac" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.ac_fecha_ac Value" class="grwNumericValue" width="77.6222" anchorX="1" alignment="baseline" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{x.ac_fecha_ac}}"/>
<rtl:input-variable name="x.anio_anterior" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.anio_anterior Value1" class="grwNumericValue" width="73.0352" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{x.anio_anterior}}"/>
</MINIPAGE>
</rtl:match>
</LAYOUTNODE>
<LAYOUTNODE name="totalGral" width="8.29946" length="min" layoutDirection="leftToRight" floatingBehavior="enclosed">
<WORDBOX name="WordBox17_1" width="187.175" alignment="baseline" fontBold="true" floatingBehavior="enclosed" textAlignment="right" text="TOTAL GENERAL: " borderStyle="none"/>
<rtl:match name="OnLastRow" nameConstraint="OnLastRow" minOccurs="0" maxOccurs="1">
<MINIPAGE name="MiniPage4" width="min" length="min" layoutDirection="leftToRight">
<rtl:input-variable name="totalAc_mes_anterior" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="totalAc_mes_anterior Value" class="grwNumericValue" width="85.5869" length="8.28549" anchorX="1" alignment="near" fontSize="8" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{totalAc_mes_anterior}}"/>
<rtl:input-variable name="totalGastos_r_fecha" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="totalGastos_r_fecha Value" class="grwNumericValue" width="99.4373" anchorX="1" fontSize="8" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{totalGastos_r_fecha}}"/>
<rtl:input-variable name="totalAc_fecha_ac" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="totalAc_fecha_ac Value" class="grwNumericValue" width="77.779" anchorX="1" fontSize="8" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{totalAc_fecha_ac}}"/>
<rtl:input-variable name="totaAnio_anterior" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="totaAnio_anterior Value" class="grwNumericValue" width="74.1127" anchorX="1" fontSize="8" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{totaAnio_anterior}}"/>
</MINIPAGE>
</rtl:match>
</LAYOUTNODE>
</MINIPAGE>
</rtl:match>
</PXML>
</rtl:stylesheet>
</report:Report>
+74
View File
@@ -0,0 +1,74 @@
<?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" version="2.00">
<report:Settings RWPageWidth="letterlength" RWPageLength="letterwidth" RWLeftMargin="0.5cm" RWTopMargin="0.5cm" RWRightMargin="0.5cm" RWBottomMargin="0.5cm">
<report:FormatList>
<report:Format-SVG/>
<report:Format-PDF/>
<report:Format-image/>
</report:FormatList>
</report:Settings>
<report:Data RWDataLocation="../ipdir/ipprrp014.rdd" RWFglReportName="resumen"/>
<rtl:stylesheet>
<rtl:match nameConstraint="Report">
<PXML name="Pxml1">
<MINIPAGE name="Page Root" width="max" length="max" alignment="near">
<LAYOUTNODE name="Page Header" width="max" length="min" port="anyPageHeader">
<MINIPAGE name="StripeLayouter3" width="min" length="max" layoutDirection="leftToRight">
<PAGENOBOX name="PageNoBox" x="1.23857" y="max" anchorX="0" anchorY="1" alignment="baseline" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right"/>
<WORDBOX name="WordBox4" floatingBehavior="enclosed" text="IPPRRP014"/>
<WORDBOX name="WordBox5" x="1.2386" y="453.061" anchorX="0" anchorY="0" floatingBehavior="enclosed" text="PAGINA"/>
<WORDWRAPBOX name="p_companias.nombre Value" x="1.2386" y="184.611" width="width(&quot;M&quot;)*25" anchorX="0" anchorY="0" floatingBehavior="enclosed" text="{{p_companias.nombre}}"/>
</MINIPAGE>
<MINIPAGE name="MiniPage7" width="1.5cm" length="max" fontBold="true" layoutDirection="leftToRight">
<WORDBOX name="WordBox9" x="5.539" y="40.8204" anchorX="0" anchorY="0" floatingBehavior="enclosed" text="SISTEMA DE INVENTARIO DE PRODUCTOS TERMINADOS"/>
<WORDBOX name="WordBox11" x="22.5047" y="143.465" anchorX="0" anchorY="0" floatingBehavior="enclosed" text="RESUMEN MARGEN Y ROTACION POR CLASE - GERENTE DE MARCAS"/>
<WORDBOX name="WordBox23" x="5.539" y="437.976" anchorX="0" anchorY="0" floatingBehavior="enclosed" text="{{&quot;FECHA: &quot;+fecha}}"/>
<WORDBOX name="WordBox24" x="27.0497" y="437.976" anchorX="0" anchorY="0" floatingBehavior="enclosed" text="{{&quot;HORA: &quot;+hora}}"/>
</MINIPAGE>
<MINIPAGE name="PeriodoLine" width="min" length="max" layoutDirection="leftToRight">
<WORDBOX name="WordBoxP1" floatingBehavior="enclosed" text="{{&quot;PERIODO: &quot;+fecha1+&quot; a &quot;+fecha2}}"/>
</MINIPAGE>
<MINIPAGE name="Table Header" width="min" length="max" alignment="near" layoutDirection="leftToRight">
<WORDBOX name="Spacer" alignment="baseline" baselineType="leftleft" port="itemSeparator" text=" "/>
<LAYOUTNODE name="LayoutNodeHdr" width="min" length="max" alignment="near" fontSize="8" fontBold="true" layoutDirection="leftToRight" floatingBehavior="free">
<WORDBOX name="H_clase" width="5cm" floatingBehavior="enclosed" text="CLASE"/>
<WORDBOX name="H_cat" width="3.5cm" floatingBehavior="enclosed" text="CATEGORIA"/>
<WORDBOX name="H_prod" width="1.4cm" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" text="#PROD"/>
<WORDBOX name="H_vinv" width="2.6cm" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" text="VALOR INV"/>
<WORDBOX name="H_vta" width="2.6cm" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" text="CONSUMO VAL"/>
<WORDBOX name="H_gan" width="2.6cm" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" text="GANANCIA"/>
<WORDBOX name="H_mg" width="1.6cm" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" text="MARGEN %"/>
<WORDBOX name="H_rot" width="1.8cm" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" text="ROT.PROM"/>
<WORDBOX name="H_est" width="1.2cm" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" text="#EST"/>
<WORDBOX name="H_rev" width="1.2cm" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" text="#REV"/>
</LAYOUTNODE>
<MINIPAGE name="Separator" width="1" length="max" bgColor="#000000" layoutDirection="leftToRight"/>
</MINIPAGE>
</LAYOUTNODE>
<rtl:match nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
<LAYOUTNODE name="ClaseLine" width="min" length="max" alignment="near" fontSize="8" layoutDirection="leftToRight" floatingBehavior="enclosed">
<WORDBOX name="V_clase" width="5cm" alignment="baseline" baselineType="leftleft" text="{{r.cod_n.format(&quot;####&quot;).trim()+&quot; &quot;+r.nombre_clase.trim()}}"/>
<WORDBOX name="V_cat" width="3.5cm" alignment="baseline" baselineType="leftleft" text="{{r.categoria.trim()}}"/>
<WORDBOX name="V_prod" width="1.4cm" alignment="baseline" baselineType="leftleft" textAlignment="right" text="{{r.c_prod.format(&quot;###,##&amp;&quot;)}}"/>
<WORDBOX name="V_vinv" width="2.6cm" alignment="baseline" baselineType="leftleft" textAlignment="right" text="{{r.c_valor_inv.format(&quot;###,###,###,##&amp;.&amp;&amp;&quot;)}}"/>
<WORDBOX name="V_vta" width="2.6cm" alignment="baseline" baselineType="leftleft" textAlignment="right" text="{{r.c_ventas.format(&quot;###,###,###,##&amp;.&amp;&amp;&quot;)}}"/>
<WORDBOX name="V_gan" width="2.6cm" alignment="baseline" baselineType="leftleft" textAlignment="right" text="{{r.c_ganancia.format(&quot;###,###,###,##&amp;.&amp;&amp;&quot;)}}"/>
<WORDBOX name="V_mg" width="1.6cm" alignment="baseline" baselineType="leftleft" textAlignment="right" text="{{r.c_margen.format(&quot;##&amp;.&amp;&amp;&quot;)}}"/>
<WORDBOX name="V_rot" width="1.8cm" alignment="baseline" baselineType="leftleft" textAlignment="right" text="{{r.c_rot_prom.format(&quot;###,##&amp;.&amp;&amp;&quot;)}}"/>
<WORDBOX name="V_est" width="1.2cm" alignment="baseline" baselineType="leftleft" textAlignment="right" text="{{r.c_estrella.format(&quot;###,##&amp;&quot;)}}"/>
<WORDBOX name="V_rev" width="1.2cm" alignment="baseline" baselineType="leftleft" textAlignment="right" color="{{r.c_revisar&gt;0?Color.RED:Color.BLACK}}" text="{{r.c_revisar.format(&quot;###,##&amp;&quot;)}}"/>
</LAYOUTNODE>
</rtl:match>
<MINIPAGE name="TotalSep" width="1" length="max" bgColor="#000000" layoutDirection="leftToRight"/>
<MINIPAGE name="TotalLine" width="min" length="max" fontBold="true" alignment="near" fontSize="8" layoutDirection="leftToRight">
<WORDBOX name="T_lbl" width="8.5cm" floatingBehavior="enclosed" text="{{&quot;TOTAL GENERAL (productos: &quot;+g_prod.format(&quot;###,##&amp;&quot;).trim()+&quot;)&quot;}}"/>
<WORDBOX name="T_vinv" width="2.6cm" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" text="{{g_valor_inv.format(&quot;###,###,###,##&amp;.&amp;&amp;&quot;)}}"/>
<WORDBOX name="T_vta" width="2.6cm" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" text="{{g_ventas.format(&quot;###,###,###,##&amp;.&amp;&amp;&quot;)}}"/>
<WORDBOX name="T_gan" width="2.6cm" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" text="{{g_ganancia.format(&quot;###,###,###,##&amp;.&amp;&amp;&quot;)}}"/>
<WORDBOX name="T_mg" width="1.6cm" alignment="baseline" textAlignment="right" floatingBehavior="enclosed" text="{{g_margen.format(&quot;##&amp;.&amp;&amp;&quot;)}}"/>
</MINIPAGE>
</MINIPAGE>
</PXML>
</rtl:match>
</rtl:stylesheet>
</report:Report>
+122
View File
@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="UTF-8"?>
<report:Report xmlns:rtl="http://www.4js.com/2004/RTL" xmlns:report="http://www.4js.com/2007/REPORT" xmlns="http://www.4js.com/2004/PXML" gstVersion="3140a" version="6.00">
<report:Settings RWPageWidth="letterwidth" RWPageLength="letterlength" RWLeftMargin="0.5inch" RWTopMargin="0.5inch" RWRightMargin="0.5inch" RWBottomMargin="0.5inch">
<report:FormatList>
<report:Format-SVG/>
<report:Format-PDF/>
<report:Format-image/>
</report:FormatList>
</report:Settings>
<report:Data RWDataLocation="../irdir/imprequisicion.rdd" RWFglReportName="requiere"/>
<report:Conflicts>
<report:Conflict nodeName="despiece" message="Node was in trigger &quot;AfterGroup codigo&quot;, but trigger was removed during schema update"/>
<report:Conflict nodeName="detalledespiece" message="Node was in trigger &quot;AfterGroup codigo&quot;, but trigger was removed during schema update"/>
<report:Conflict nodeName="totaldespiece" message="Node was in trigger &quot;AfterGroup codigo&quot;, but trigger was removed during schema update"/>
</report:Conflicts>
<rtl:stylesheet>
<PXML>
<rtl:match name="Report" nameConstraint="Report" minOccurs="1" maxOccurs="1">
<MINIPAGE name="Page Root" width="max" length="max">
<LAYOUTNODE name="encabezado" width="min" length="max" alignment="center" fontBold="true" layoutDirection="leftToRight" floatingBehavior="enclosed">
<rtl:input-variable name="p_companias.nombre" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="WordBox1" width="467.307" floatingBehavior="enclosed" textAlignment="center" text="{{p_companias.nombre}}"/>
<WORDBOX name="WordBox" floatingBehavior="enclosed" text="Pagina:"/>
<PAGENOBOX name="PageNoBox" floatingBehavior="enclosed"/>
</LAYOUTNODE>
<LAYOUTNODE name="encabezado2" width="min" length="max" layoutDirection="leftToRight" floatingBehavior="enclosed">
<WORDBOX name="WordBox2" width="464.307" fontBold="true" floatingBehavior="enclosed" textAlignment="center" text="REQUISICION DOCUMENTOS"/>
<rtl:input-variable name="hora" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="WordBox3" width="34.6563" floatingBehavior="enclosed" text="{{hora}}"/>
</LAYOUTNODE>
<LAYOUTNODE name="encabezadomaster" width="min" length="min" fontSize="8" layoutDirection="leftToRight" floatingBehavior="enclosed">
<LAYOUTNODE name="LayoutNode1" width="3inch" length="min" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
<rtl:input-variable name="nombreUsuario" type="FGLString" expectedLocation="expectedWayAhead"/>
<WORDBOX name="WordBox4" length="1cm" floatingBehavior="enclosed" text="{{&quot;USUARIO: &quot;+nombreUsuario.trim()}}"/>
<rtl:input-variable name="p_irtb57.numero_doc" type="FGLNumeric" expectedLocation="expectedWayAhead"/>
<WORDBOX name="WordBox5" fontSize="12" fontBold="true" floatingBehavior="enclosed" text="{{&quot;DOCUMENTO: &quot;+p_irtb57.numero_doc.format(&quot;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&quot;)}}"/>
<rtl:input-variable name="p_irtb57.cod_mov" type="FGLNumeric" expectedLocation="expectedWayAhead"/>
<rtl:input-variable name="nombreMov" type="FGLString" expectedLocation="expectedWayAhead"/>
<WORDWRAPBOX name="WordWrapBox" width="width(&quot;M&quot;)*27" alignment="baseline" floatingBehavior="enclosed" text="{{&quot;TIPO DOCUMENTO: &quot;+&quot;(&quot;+p_irtb57.cod_mov.format(&quot;&lt;&lt;&lt;&quot;)+&quot;)&quot;+nombreMov.trim()}}"/>
<rtl:input-variable name="p_irtb57.fecha" type="FGLString" expectedLocation="expectedWayAhead"/>
<WORDBOX name="WordBox6" floatingBehavior="enclosed" text="{{&quot;FECHA: &quot;+p_irtb57.fecha}}"/>
<rtl:input-variable name="nombreBodega" type="FGLString" expectedLocation="expectedWayAhead"/>
<WORDBOX name="WordBox8" floatingBehavior="enclosed" text="{{&quot;BODEGA: &quot;+nombreBodega}}"/>
</LAYOUTNODE>
<LAYOUTNODE name="LayoutNode2" width="3inch" length="89.4558" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
<WORDBOX name="WordBox12" length="1cm" alignment="baseline" floatingBehavior="enclosed"/>
<rtl:input-variable name="p_irtb57.bodega_destino" type="FGLNumeric" expectedLocation="expectedWayAhead"/>
<rtl:input-variable name="nombreBodegaDestino" type="FGLString" expectedLocation="expectedWayAhead"/>
<WORDBOX name="WordBox9" floatingBehavior="enclosed" text="{{&quot;BODEGA DESTINO: &quot;+&quot;(&quot;+p_irtb57.bodega_destino+&quot;)&quot;+nombreBodegaDestino}}"/>
<rtl:input-variable name="p_irtb57.num_oc" type="FGLNumeric" expectedLocation="expectedWayAhead"/>
<WORDBOX name="WordBox10" floatingBehavior="enclosed" text="{{&quot;NUMERO ORDEN:&quot;+p_irtb57.num_oc.format(&quot;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&quot;)}}"/>
<rtl:input-variable name="p_irtb57.cliente" type="FGLString" expectedLocation="expectedWayAhead"/>
<WORDWRAPBOX name="WordWrapBox1" width="width(&quot;M&quot;)*27" floatingBehavior="enclosed" text="{{&quot;CLIENTE: &quot;+p_irtb57.cliente}}"/>
<rtl:input-variable name="p_irtb57.observacion" type="FGLString" expectedLocation="expectedWayAhead"/>
<WORDWRAPBOX name="WordWrapBox2" width="width(&quot;M&quot;)*20" floatingBehavior="enclosed" text="{{&quot;OBSERVACION: &quot;+p_irtb57.observacion.trim()}}"/>
<rtl:input-variable name="p_irtb57.orden_trabajo" type="FGLNumeric" expectedLocation="expectedWayAhead"/>
<DECIMALFORMATBOX name="p_irtb57.orden_trabajo Value" class="grwNumericValue" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="----------#" value="{{&quot;ORDEN DE TRABAJO: &quot;+p_irtb57.orden_trabajo}}"/>
</LAYOUTNODE>
</LAYOUTNODE>
<LAYOUTNODE name="encabezadodetalle" width="min" length="min" fontSize="8" fontBold="true" layoutDirection="leftToRight" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
<WORDBOX name="WordBox13" width="3.5inch" floatingBehavior="enclosed" text="ITEM(S)" roundedCorners="false" borderWidth="1"/>
<WORDBOX name="WordBox14" width="2.2inch" floatingBehavior="enclosed" textAlignment="right" text="UNIDAD"/>
<WORDBOX name="WordBox15" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="CANTIDAD"/>
</LAYOUTNODE>
<rtl:match name="FirstPageHeader" nameConstraint="FirstPageHeader" minOccurs="0" maxOccurs="1"/>
<rtl:match name="Group codigo" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="table" width="min" length="min" fontSize="8" layoutDirection="leftToRight">
<rtl:input-variable name="detalle.cod_n" type="FGLNumeric" expectedLocation="expectedHere"/>
<rtl:input-variable name="detalle.cod_grupo" type="FGLNumeric" expectedLocation="expectedHere"/>
<rtl:input-variable name="detalle.cod_tipo" type="FGLNumeric" expectedLocation="expectedHere"/>
<rtl:input-variable name="detalle.cod_sec" type="FGLNumeric" expectedLocation="expectedHere"/>
<rtl:input-variable name="detalle.descripcion" type="FGLString" expectedLocation="expectedHere"/>
<rtl:input-variable name="detalle.unidad_med" type="FGLString" expectedLocation="expectedHere"/>
<WORDWRAPBOX name="WordWrapBox3" width="width(&quot;M&quot;)*30" length="min" alignment="baseline" floatingBehavior="enclosed" text="{{detalle.cod_n.format(&quot;&amp;&amp;&amp;&amp;&quot;)+&quot;-&quot;+detalle.cod_grupo.format(&quot;&amp;&amp;&amp;&amp;&quot;)+&quot;-&quot;+detalle.cod_tipo.format(&quot;&amp;&amp;&amp;&amp;&amp;&amp;&quot;)+&quot;-&quot;+detalle.cod_sec.format(&quot;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&quot;)+&quot; &quot;+detalle.descripcion.trim()+&quot; &quot;+detalle.unidad_med}}"/>
<rtl:input-variable name="detalle.cantidad_1" type="FGLNumeric" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox17" width="2.4inch" floatingBehavior="enclosed" textAlignment="right" text="{{detalle.cantidad_1.format(&quot;###,###.#####&quot;)}}"/>
<rtl:input-variable name="detalle.cantidad" type="FGLNumeric" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox18" width="1.5inch" floatingBehavior="enclosed" textAlignment="right" text="{{detalle.cantidad.format(&quot;###,###.#####&quot;)}}"/>
</MINIPAGE>
<rtl:input-variable name="tienedespiece" type="FGLNumeric" expectedLocation="expectedAhead"/>
<LAYOUTNODE name="despiece" rtl:condition="tienedespiece==1" width="min" length="min" fontSize="8" layoutDirection="topToBottom" floatingBehavior="enclosed">
<WORDBOX name="WordBox20" width="max" floatingBehavior="enclosed" textAlignment="center" text="DESPIECE" roundedCorners="true" borderWidth="1" borderStyle="solid"/>
<LAYOUTNODE name="encabezadodespiece" width="min" length="max" layoutDirection="leftToRight" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
<WORDBOX name="WordBox24" width="1.5inch" floatingBehavior="enclosed" text="Etiquetas"/>
<WORDBOX name="WordBox26" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Lado 1"/>
<WORDBOX name="WordBox27" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Lado 2"/>
<WORDBOX name="WordBox28" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Lado 3"/>
<WORDBOX name="WordBox29" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Unidades"/>
<WORDBOX name="WordBox30" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Medida"/>
</LAYOUTNODE>
</LAYOUTNODE>
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
<rtl:input-variable name="tienedespiece" type="FGLNumeric" expectedLocation="expectedHere"/>
<LAYOUTNODE name="detalledespiece" rtl:condition="tienedespiece==1" width="min" length="min" fontSize="8" layoutDirection="leftToRight" floatingBehavior="enclosed">
<rtl:input-variable name="etiqueta" type="FGLString" expectedLocation="expectedHere"/>
<WORDWRAPBOX name="etiqueta Value" class="grwStringValue" width="width(&quot;M&quot;)*15" alignment="baseline" floatingBehavior="enclosed" text="{{etiqueta}}"/>
<rtl:input-variable name="xdespiece.lado_1" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="despiece.lado_1 Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{xdespiece.lado_1}}"/>
<rtl:input-variable name="xdespiece.lado_2" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="despiece.lado_2 Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{xdespiece.lado_2}}"/>
<rtl:input-variable name="xdespiece.lado_3" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="despiece.lado_3 Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{xdespiece.lado_3}}"/>
<rtl:input-variable name="xdespiece.cantidad" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="despiece.cantidad Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{xdespiece.cantidad}}"/>
<rtl:input-variable name="xdespiece.medida" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="despiece.medida Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{xdespiece.medida}}"/>
</LAYOUTNODE>
</rtl:match>
<rtl:input-variable name="tienedespiece" type="FGLNumeric" expectedLocation="expectedBefore"/>
<LAYOUTNODE name="totaldespiece" rtl:condition="tienedespiece==1" width="min" length="min" fontSize="8" layoutDirection="leftToRight" floatingBehavior="enclosed">
<WORDBOX name="WordBox21" width="4.8inch" floatingBehavior="enclosed" text="TOTALES"/>
<rtl:input-variable name="total_cantidad" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox22" width="1inch" floatingBehavior="enclosed" text="{{total_cantidad.format(&quot;##,###.#####&quot;)}}"/>
<rtl:input-variable name="total_medida" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox23" width="1inch" floatingBehavior="enclosed" text="{{total_medida.format(&quot;##,###.######&quot;)}}"/>
</LAYOUTNODE>
</rtl:match>
</MINIPAGE>
</rtl:match>
</PXML>
</rtl:stylesheet>
</report:Report>
+126
View File
@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
<report:Report xmlns:rtl="http://www.4js.com/2004/RTL" xmlns:report="http://www.4js.com/2007/REPORT" xmlns="http://www.4js.com/2004/PXML" gstVersion="3140a" version="6.00">
<report:Settings RWPageWidth="letterwidth" RWPageLength="letterlength" RWLeftMargin="0.5inch" RWTopMargin="0.5inch" RWRightMargin="0.5inch" RWBottomMargin="0.5inch">
<report:FormatList>
<report:Format-SVG/>
<report:Format-PDF/>
<report:Format-image/>
</report:FormatList>
</report:Settings>
<report:Data RWDataLocation="../irdir/irautorizareq.rdd" RWFglReportName="requiere"/>
<report:Conflicts>
<report:Conflict nodeName="encabezado" message="Node was in trigger &quot;FirstPageHeader [0; 1]&quot;, but trigger was removed during schema update"/>
<report:Conflict nodeName="encabezado2" message="Node was in trigger &quot;FirstPageHeader [0; 1]&quot;, but trigger was removed during schema update"/>
<report:Conflict nodeName="encabezadomaster" message="Node was in trigger &quot;FirstPageHeader [0; 1]&quot;, but trigger was removed during schema update"/>
<report:Conflict nodeName="encabezadodetalle" message="Node was in trigger &quot;FirstPageHeader [0; 1]&quot;, but trigger was removed during schema update"/>
<report:Conflict nodeName="despiece" message="Node was in trigger &quot;AfterGroup codigo&quot;, but trigger was removed during schema update"/>
<report:Conflict nodeName="detalledespiece" message="Node was in trigger &quot;AfterGroup codigo&quot;, but trigger was removed during schema update"/>
<report:Conflict nodeName="totaldespiece" message="Node was in trigger &quot;AfterGroup codigo&quot;, but trigger was removed during schema update"/>
</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">
<rtl:match name="FirstPageHeader" nameConstraint="FirstPageHeader" minOccurs="0" maxOccurs="1">
<LAYOUTNODE name="encabezado" width="min" length="max" alignment="center" fontBold="true" layoutDirection="leftToRight" floatingBehavior="enclosed">
<rtl:input-variable name="p_companias.nombre" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox1" width="max-2cm" floatingBehavior="enclosed" textAlignment="center" text="{{p_companias.nombre}}"/>
<WORDBOX name="WordBox" floatingBehavior="enclosed" text="Pagina:"/>
<PAGENOBOX name="PageNoBox" floatingBehavior="enclosed"/>
</LAYOUTNODE>
<LAYOUTNODE name="encabezado2" width="min" length="max" layoutDirection="leftToRight" floatingBehavior="enclosed">
<WORDBOX name="WordBox2" width="max-2cm" fontBold="true" floatingBehavior="enclosed" textAlignment="center" text="REQUISICION DOCUMENTOS"/>
<rtl:input-variable name="hora" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox3" floatingBehavior="enclosed" text="{{hora}}"/>
</LAYOUTNODE>
<LAYOUTNODE name="encabezadomaster" width="min" length="min" fontSize="8" layoutDirection="leftToRight" floatingBehavior="enclosed">
<LAYOUTNODE name="LayoutNode1" width="3inch" length="min" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
<rtl:input-variable name="nombreusuario" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox4" length="1cm" floatingBehavior="enclosed" text="{{&quot;USUARIO: &quot;+nombreusuario.trim()}}"/>
<rtl:input-variable name="x.numero_doc" type="FGLNumeric" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox5" fontSize="12" fontBold="true" floatingBehavior="enclosed" text="{{&quot;DOCUMENTO: &quot;+x.numero_doc.format(&quot;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&quot;)}}"/>
<rtl:input-variable name="x.cod_mov" type="FGLNumeric" expectedLocation="expectedHere"/>
<rtl:input-variable name="nombreMov" type="FGLString" expectedLocation="expectedHere"/>
<WORDWRAPBOX name="WordWrapBox" width="width(&quot;M&quot;)*27" alignment="baseline" floatingBehavior="enclosed" text="{{&quot;TIPO DOCUMENTO: &quot;+&quot;(&quot;+x.cod_mov.format(&quot;&lt;&lt;&lt;&quot;)+&quot;)&quot;+nombreMov.trim()}}"/>
<rtl:input-variable name="x.fecha" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox6" floatingBehavior="enclosed" text="{{&quot;FECHA: &quot;+x.fecha}}"/>
<rtl:input-variable name="nombreBodega" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox8" floatingBehavior="enclosed" text="{{&quot;BODEGA: &quot;+nombreBodega}}"/>
</LAYOUTNODE>
<LAYOUTNODE name="LayoutNode2" width="3inch" length="min" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
<WORDBOX name="WordBox12" length="1cm" alignment="baseline" floatingBehavior="enclosed"/>
<rtl:input-variable name="nombreBodegaDestino" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox9" floatingBehavior="enclosed" text="{{&quot;BODEGA DESTINO: &quot;+nombreBodegaDestino}}"/>
<rtl:input-variable name="x.num_oc" type="FGLNumeric" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox10" floatingBehavior="enclosed" text="{{&quot;NUMERO ORDEN:&quot;+x.num_oc.format(&quot;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&quot;)}}"/>
<rtl:input-variable name="vendedor" type="FGLString" expectedLocation="expectedHere"/>
<WORDWRAPBOX name="vendedor Value" class="grwStringValue" width="width(&quot;M&quot;)*25" alignment="baseline" floatingBehavior="enclosed" text="{{&quot;VENDEDOR: &quot;+vendedor.trim()}}"/>
<rtl:input-variable name="x.cliente" type="FGLString" expectedLocation="expectedHere"/>
<WORDWRAPBOX name="WordWrapBox1" width="width(&quot;M&quot;)*27" floatingBehavior="enclosed" text="{{&quot;CLIENTE: &quot;+x.cliente}}"/>
<rtl:input-variable name="x.observacion" type="FGLString" expectedLocation="expectedHere"/>
<WORDWRAPBOX name="WordWrapBox2" width="width(&quot;M&quot;)*20" floatingBehavior="enclosed" text="{{&quot;OBSERVACION: &quot;+x.observacion.trim()}}"/>
</LAYOUTNODE>
</LAYOUTNODE>
<LAYOUTNODE name="encabezadodetalle" width="min" length="min" fontSize="8" fontBold="true" layoutDirection="leftToRight" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
<WORDBOX name="WordBox13" width="3.5inch" floatingBehavior="enclosed" text="ITEM(S)" roundedCorners="false" borderWidth="1"/>
<WORDBOX name="WordBox14" width="2.2inch" floatingBehavior="enclosed" textAlignment="right" text="UNIDAD"/>
<WORDBOX name="WordBox15" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="CANTIDAD"/>
</LAYOUTNODE>
</rtl:match>
<rtl:match name="Group codigo" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="table" width="min" length="min" fontSize="8" layoutDirection="leftToRight">
<rtl:input-variable name="detalle.cod_n" type="FGLNumeric" expectedLocation="expectedHere"/>
<rtl:input-variable name="detalle.cod_grupo" type="FGLNumeric" expectedLocation="expectedHere"/>
<rtl:input-variable name="detalle.cod_tipo" type="FGLNumeric" expectedLocation="expectedHere"/>
<rtl:input-variable name="detalle.cod_sec" type="FGLNumeric" expectedLocation="expectedHere"/>
<rtl:input-variable name="detalle.descripcion" type="FGLString" expectedLocation="expectedHere"/>
<rtl:input-variable name="detalle.unidad_med" type="FGLString" expectedLocation="expectedHere"/>
<WORDWRAPBOX name="WordWrapBox3" width="width(&quot;M&quot;)*30" length="min" alignment="baseline" floatingBehavior="enclosed" text="{{detalle.cod_n.format(&quot;&amp;&amp;&amp;&amp;&quot;)+&quot;-&quot;+detalle.cod_grupo.format(&quot;&amp;&amp;&amp;&amp;&quot;)+&quot;-&quot;+detalle.cod_tipo.format(&quot;&amp;&amp;&amp;&amp;&amp;&amp;&quot;)+&quot;-&quot;+detalle.cod_sec.format(&quot;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&quot;)+&quot; &quot;+detalle.descripcion.trim()+&quot; &quot;+detalle.unidad_med}}"/>
<rtl:input-variable name="detalle.cantidad_1" type="FGLNumeric" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox17" width="2.4inch" floatingBehavior="enclosed" textAlignment="right" text="{{detalle.cantidad_1.format(&quot;###,###.#####&quot;)}}"/>
<rtl:input-variable name="detalle.cantidad" type="FGLNumeric" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox18" width="1.5inch" floatingBehavior="enclosed" textAlignment="right" text="{{detalle.cantidad.format(&quot;###,###.#####&quot;)}}"/>
</MINIPAGE>
<rtl:input-variable name="tienedespiece" type="FGLNumeric" expectedLocation="expectedAhead"/>
<LAYOUTNODE name="despiece" rtl:condition="tienedespiece==1" width="min" length="min" fontSize="8" layoutDirection="topToBottom" floatingBehavior="enclosed">
<WORDBOX name="WordBox20" width="max" floatingBehavior="enclosed" textAlignment="center" text="DESPIECE" roundedCorners="true" borderWidth="1" borderStyle="solid"/>
<LAYOUTNODE name="encabezadodespiece" width="min" length="max" layoutDirection="leftToRight" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
<WORDBOX name="WordBox24" width="1.5inch" floatingBehavior="enclosed" text="Etiquetas"/>
<WORDBOX name="WordBox26" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Lado 1"/>
<WORDBOX name="WordBox27" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Lado 2"/>
<WORDBOX name="WordBox28" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Lado 3"/>
<WORDBOX name="WordBox29" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Unidades"/>
<WORDBOX name="WordBox30" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Medida"/>
</LAYOUTNODE>
</LAYOUTNODE>
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
<rtl:input-variable name="tienedespiece" type="FGLNumeric" expectedLocation="expectedHere"/>
<LAYOUTNODE name="detalledespiece" rtl:condition="tienedespiece==1" width="min" length="min" fontSize="8" layoutDirection="leftToRight" floatingBehavior="enclosed">
<rtl:input-variable name="etiqueta" type="FGLString" expectedLocation="expectedHere"/>
<WORDWRAPBOX name="etiqueta Value" class="grwStringValue" width="width(&quot;M&quot;)*15" alignment="baseline" floatingBehavior="enclosed" text="{{etiqueta}}"/>
<rtl:input-variable name="xdespiece.lado_1" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="despiece.lado_1 Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{xdespiece.lado_1}}"/>
<rtl:input-variable name="xdespiece.lado_2" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="despiece.lado_2 Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{xdespiece.lado_2}}"/>
<rtl:input-variable name="xdespiece.lado_3" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="despiece.lado_3 Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{xdespiece.lado_3}}"/>
<rtl:input-variable name="xdespiece.cantidad" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="despiece.cantidad Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{xdespiece.cantidad}}"/>
<rtl:input-variable name="xdespiece.medida" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="despiece.medida Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{xdespiece.medida}}"/>
</LAYOUTNODE>
</rtl:match>
<rtl:input-variable name="tienedespiece" type="FGLNumeric" expectedLocation="expectedBefore"/>
<LAYOUTNODE name="totaldespiece" rtl:condition="tienedespiece==1" width="min" length="min" fontSize="8" layoutDirection="leftToRight" floatingBehavior="enclosed">
<WORDBOX name="WordBox21" width="4.8inch" floatingBehavior="enclosed" text="TOTALES"/>
<rtl:input-variable name="total_cantidad" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox22" width="1inch" floatingBehavior="enclosed" text="{{total_cantidad.format(&quot;##,###.#####&quot;)}}"/>
<rtl:input-variable name="total_medida" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox23" width="1inch" floatingBehavior="enclosed" text="{{total_medida.format(&quot;##,###.######&quot;)}}"/>
</LAYOUTNODE>
</rtl:match>
</MINIPAGE>
</rtl:match>
</PXML>
</rtl:stylesheet>
</report:Report>
+85
View File
@@ -0,0 +1,85 @@
<?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" version="3.01">
<report:Settings RWPageWidth="letterwidth" RWPageLength="letterlength" RWLeftMargin="0.5cm" RWTopMargin="0.5cm" RWRightMargin="0.5cm" RWBottomMargin="0.5cm">
<report:FormatList>
<report:Format-SVG/>
<report:Format-PDF/>
<report:Format-image/>
</report:FormatList>
</report:Settings>
<report:Data RWDataLocation="../GUI/irdir/irprrp002.rdd" RWFglReportName="maestra"/>
<rtl:stylesheet>
<PXML>
<rtl:match nameConstraint="Report">
<MINIPAGE name="Page Root" width="max" length="max" alignment="near" layoutDirection="topToBottom" swapX="false">
<LAYOUTNODE name="Page Header" width="max" length="min" port="anyPageHeader">
<MINIPAGE name="StripeLayouter3" width="min" length="max" layoutDirection="leftToRight" swapX="false">
<rtl:input-variable name="p_companias.nombre" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="Report Title" x="0" y="max/2" anchorX="0" anchorY="0.5" alignment="baseline" fontSize="14" fontBold="true" layoutDirection="topToBottom" swapX="false" baselineType="leftleft" floatingBehavior="enclosed" text="{{p_companias.nombre}}"/>
<WORDBOX name="WordBox4" alignment="baseline" baselineType="leftleft" text="irprrp002"/>
<WORDBOX name="WordBox30" y="max-3cm" alignment="baseline" baselineType="leftleft" text="PAGINA "/>
<PAGENOBOX name="PageNoBox" y="max" anchorX="0" anchorY="1" alignment="baseline" layoutDirection="topToBottom" swapX="false" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right"/>
</MINIPAGE>
<MINIPAGE name="MiniPage7" width="min" length="max" alignment="center" layoutDirection="leftToRight" baselineType="leftleft">
<WORDBOX name="WordBox5" y="max/3" alignment="baseline" fontBold="true" baselineType="leftleft" text="INFORME MAESTRA ARTICULOS"/>
<LAYOUTNODE name="Layout Node3" y="max-4cm" width="min" length="min" fontSize="10" fontBold="true">
<rtl:input-variable name="fecha" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="WordBox30_1" alignment="baseline" baselineType="leftleft" text="{{&quot;FECHA: &quot;+fecha.value}}"/>
<rtl:input-variable name="hora" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="WordBox31" alignment="baseline" baselineType="leftleft" text="{{&quot;HORA: &quot;+hora}}"/>
</LAYOUTNODE>
</MINIPAGE>
<MINIPAGE name="Separator" width="1" length="max" alignment="near" bgColor="#000000" layoutDirection="leftToRight" swapX="false"/>
<MINIPAGE name="Table Header" width="min" length="max" fontBold="true" layoutDirection="leftToRight" swapX="false">
<WORDBOX name="Spacer" alignment="baseline" layoutDirection="topToBottom" swapX="false" baselineType="leftleft" port="itemSeparator" text=" "/>
<LAYOUTNODE name="ENCABEZADOS" width="min" length="min" fontSize="8" layoutDirection="leftToRight">
<WORDBOX name="DCODIGO" width="2cm" alignment="baseline" baselineType="leftleft" text="CODIGO"/>
<WORDBOX name="DESPACIO1" width="1cm" alignment="baseline" baselineType="leftleft"/>
<WORDBOX name="DDESCRIPCION" width="5.5cm" alignment="baseline" baselineType="leftleft" text="DESCRIPCION"/>
<WORDBOX name="DESPACIO2" width="1.0cm" alignment="baseline" baselineType="leftleft"/>
<WORDBOX name="DMARCA" width="2cm" alignment="baseline" baselineType="leftleft" textAlignment="center" text="REFERENCIA"/>
<WORDBOX name="DESPACIO3" width=".7cm" alignment="baseline" baselineType="leftleft"/>
<WORDBOX name="DEXISTENCIA" width="2.2cm" alignment="baseline" baselineType="leftleft" textAlignment="left" text="EXISTENCIA"/>
<WORDBOX name="COMPRA" width="4.5cm" floatingBehavior="enclosed" textAlignment="right" text="FECHA COMPRA"/>
</LAYOUTNODE>
<MINIPAGE name="Separator_1" width="1" length="max" alignment="near" bgColor="#000000" layoutDirection="leftToRight" swapX="false"/>
</MINIPAGE>
</LAYOUTNODE>
<MINIPAGE name="TitGRUPO" width="max" length="min" floatingBehavior="enclosed">
<WORDBOX name="WordBox20" length=".4cm" alignment="baseline" baselineType="leftleft"/>
</MINIPAGE>
<rtl:match nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="Filas" width="min" length="min" fontSize="6" layoutDirection="leftToRight" floatingBehavior="enclosed">
<rtl:input-variable name="x.pcodigo" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox18" alignment="baseline" baselineType="leftleft" text="{{x.pcodigo.trim()}}"/>
<WORDBOX name="WordBox19" width=".3cm" alignment="baseline" baselineType="leftleft"/>
<rtl:input-variable name="x.descrip_esp" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox33" width="6.2cm" alignment="baseline" baselineType="leftleft" text="{{x.descrip_esp.trim()}}"/>
<WORDBOX name="WordBox21" width=".5cm" alignment="baseline" baselineType="leftleft"/>
<rtl:input-variable name="x.unidad_med" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox22" width=".7cm" alignment="baseline" baselineType="leftleft" text="{{x.unidad_med}}"/>
<WORDBOX name="WordBox23" width=".2cm" alignment="baseline" baselineType="leftleft"/>
<rtl:input-variable name="x.descrip_ing" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox32" width="2.5cm" alignment="baseline" baselineType="leftleft" text="{{x.descrip_ing.trim()}}"/>
<WORDBOX name="WordBox27" width=".2cm" alignment="baseline" baselineType="leftleft"/>
<WORDBOX name="WordBox27_1" width=".2cm" alignment="baseline" baselineType="leftleft"/>
<rtl:input-variable name="x.existencia" type="FGLNumeric" expectedLocation="expectedHere"/>
<WORDBOX name="WordBox31_1" width="1.2cm" alignment="baseline" baselineType="leftleft" textAlignment="right" text="{{x.existencia.format(&quot;###,###&quot;)}}"/>
<WORDBOX name="WordBox36" width=".2cm" alignment="baseline" floatingBehavior="enclosed"/>
<WORDBOX name="WordBox53" width=".2cm" floatingBehavior="enclosed"/>
<rtl:input-variable name="x.referencia" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.referencia Value" width="2.5cm" anchorX="0" anchorY="0" floatingBehavior="enclosed" text="{{x.referencia}}"/>
<rtl:input-variable name="fecha_compra" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="fecha_compra Value" width="2.5cm" floatingBehavior="enclosed" textAlignment="right" text="{{fecha_compra}}"/>
</MINIPAGE>
</rtl:match>
<MINIPAGE name="Separator_1_1" width="1" length="max" alignment="near" bgColor="#000000" layoutDirection="leftToRight" swapX="false"/>
<MINIPAGE name="Total Registros" width="min" length="min" layoutDirection="topToBottom">
<rtl:input-variable name="total_registros" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox28" alignment="baseline" fontSize="14" fontBold="true" baselineType="leftleft" text="{{&quot;TOTAL ARTICULOS IMPRESOS: &quot;+total_registros.format(&quot;&gt;,&gt;&gt;&gt;&quot;)}}"/>
</MINIPAGE>
</MINIPAGE>
</rtl:match>
</PXML>
</rtl:stylesheet>
</report:Report>
+53
View File
@@ -0,0 +1,53 @@
<?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="31408" version="6.00">
<report:Settings RWPageWidth="letterwidth" RWPageLength="letterlength" RWLeftMargin="0.5inch" RWTopMargin="0.5inch" RWRightMargin="0.5inch" RWBottomMargin="0.5inch">
<report:FormatList>
<report:Format-SVG/>
<report:Format-PDF/>
<report:Format-image/>
</report:FormatList>
</report:Settings>
<report:Data RWDataLocation="../irdir/irprrp006.rdd" RWFglReportName="p_cero"/>
<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">
<LAYOUTNODE name="Page Header" width="max" length="min" port="anyPageHeader">
<MINIPAGE name="encabezado" width="min" length="max" layoutDirection="leftToRight">
<rtl:input-variable name="p_companias.nombre" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="Report Title" x="0" y="max/2" anchorX="0" anchorY="0.5" alignment="baseline" fontSize="25" baselineType="leftleft" floatingBehavior="enclosed" text="{{p_companias.nombre}}"/>
<WORDBOX name="WordBox" x="2.2777" y="472.553" width="min" floatingBehavior="enclosed" text="Pagina"/>
<PAGENOBOX name="PageNoBox" x="1.23857" y="max" anchorX="0" anchorY="1" alignment="baseline" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right"/>
<WORDBOX name="WordBox1" floatingBehavior="enclosed" text="irprrp006"/>
</MINIPAGE>
<MINIPAGE name="Separator1" width="1" length="max" bgColor="#000000" layoutDirection="leftToRight"/>
<MINIPAGE name="Table Header" class="grwTableHeader" width="min" length="max" layoutDirection="leftToRight">
<WORDBOX name="WordBox2" floatingBehavior="enclosed" text="CODIGO"/>
<WORDBOX name="WordBox3" y="80" floatingBehavior="enclosed" text="REPUESTOS"/>
<WORDBOX name="WordBox5" y="330" alignment="baseline" floatingBehavior="enclosed" text="EXISTENCIA MINIMA"/>
<WORDBOX name="WordBox4" y="460" alignment="far" floatingBehavior="enclosed" text="EXISTENCIA"/>
</MINIPAGE>
<MINIPAGE name="Separator" width="1" length="max" bgColor="#000000" layoutDirection="leftToRight"/>
</LAYOUTNODE>
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="Table Row" class="grwTableRow" width="min" length="max" layoutDirection="leftToRight">
<WORDBOX name="Spacer_1" alignment="baseline" baselineType="leftleft" port="itemSeparator" text=" "/>
<rtl:input-variable name="codigo" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="codigo Value" class="grwStringValue" width="{max(width(&quot;{&quot;Codigo&quot;.translate()}&quot;),width(&quot;M&quot;)*10)}" floatingBehavior="enclosed" text="{{codigo}}"/>
<rtl:input-variable name="x.descrip_esp" type="FGLString" expectedLocation="expectedHere"/>
<WORDWRAPBOX name="x.descrip_esp Value" class="grwTableStringColumnValue" width="width(&quot;M&quot;)*20" floatingBehavior="enclosed" text="{{x.descrip_esp}}"/>
<rtl:input-variable name="x.unidad_med" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.unidad_med Value" class="grwStringValue" width="{max(width(&quot;{&quot;Unidad Med&quot;.translate()}&quot;),width(&quot;W&quot;)*3)}" floatingBehavior="enclosed" text="{{x.unidad_med}}"/>
<rtl:input-variable name="x.exist_min" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.exist_min Value" class="grwTableNumericColumnValue" width="{max(width(&quot;{&quot;Exist Min&quot;.translate()}&quot;),width(&quot;-00000.E-000&quot;))}" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="-------------&amp;.&amp;&amp;" value="{{x.exist_min}}"/>
<rtl:input-variable name="x.existencia" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.existencia Value" class="grwTableNumericColumnValue" width="{max(width(&quot;{&quot;Existencia&quot;.translate()}&quot;),width(&quot;-0,000,000.00&quot;))}" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="-,---,---,--&amp;.&amp;&amp;" value="{{x.existencia}}"/>
</MINIPAGE>
</rtl:match>
<rtl:match name="OnLastRow" nameConstraint="OnLastRow" minOccurs="0" maxOccurs="1"/>
</MINIPAGE>
</rtl:match>
</PXML>
</rtl:stylesheet>
</report:Report>
+115
View File
@@ -0,0 +1,115 @@
<?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="31408" version="6.00">
<report:Settings RWPageWidth="letterwidth" RWPageLength="letterlength" RWLeftMargin="0.5inch" RWTopMargin="0.5inch" RWRightMargin="0.5inch" RWBottomMargin="0.5inch">
<report:FormatList>
<report:Format-SVG/>
<report:Format-PDF/>
<report:Format-image/>
</report:FormatList>
</report:Settings>
<report:Data RWDataLocation="../irdir/irprrp009.rdd" RWFglReportName="opera"/>
<report:Conflicts>
<report:Conflict nodeName="MiniPage" message="Node was in trigger &quot;Group departamento [0; unbounded]&quot;, but trigger was removed during schema update"/>
</report:Conflicts>
<rtl:stylesheet>
<PXML>
<rtl:match name="Report" nameConstraint="Report">
<MINIPAGE name="Page Root" width="max" length="max" alignment="center">
<LAYOUTNODE name="Cabecera" width="min" length="min" port="anyPageHeader" floatingBehavior="enclosed">
<MINIPAGE name="Enc.Principal" width="min" length="7.5inch" fontSize="9" fontBold="true" layoutDirection="leftToRight">
<WORDBOX name="WordBox" width="48" alignment="far" floatingBehavior="enclosed" text="edprrp118"/>
<rtl:input-variable name="p_companias.nombre" type="FGLString" expectedLocation="expectedAhead"/>
<WORDWRAPBOX name="p_compania.nombre Value" class="grwStringValue" width="428.6" alignment="far" floatingBehavior="enclosed" text="{{p_companias.nombre}}" textAlignment="center"/>
<WORDBOX name="WordBox11" width="40.342" floatingBehavior="enclosed" textAlignment="right" text="Pagina:"/>
<PAGENOBOX name="PageNoBox" width="10.5676" floatingBehavior="enclosed"/>
</MINIPAGE>
<MINIPAGE name="Enc.Secundario" width="min" length="7.5inch" fontSize="9" fontBold="true" layoutDirection="leftToRight" borderWidth="1" borderStyle="solid">
<WORDBOX name="WordBox2" width="66.2322" alignment="near" floatingBehavior="enclosed" text="Rango Fecha:"/>
<rtl:input-variable name="rango_fecha" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="rango_fecha Value" class="grwStringValue" width="113.6" floatingBehavior="enclosed" text="{{rango_fecha}}"/>
<WORDBOX name="WordBox3" width="173.627" alignment="center" floatingBehavior="enclosed" textAlignment="center" text="Operaciones por Movimientos"/>
<WORDWRAPBOX name="WordWrapBox1_1" width="95.6" length="10.4" alignment="center" floatingBehavior="enclosed" text=""/>
<rtl:input-variable name="actual" type="FGLString" expectedLocation="expectedAhead"/>
<WORDWRAPBOX name="actual Value" class="grwStringValue" width="38.6" floatingBehavior="enclosed" text="{{actual}}"/>
<WORDWRAPBOX name="WordWrapBox1" width="10.4" length="10.4" alignment="center" floatingBehavior="enclosed" text=""/>
<rtl:input-variable name="hora" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="hora Value" class="grwStringValue" floatingBehavior="enclosed" text="{{hora}}"/>
</MINIPAGE>
<MINIPAGE name="Enc.Secundario1" width="min" length="7.5inch" fontSize="9" fontBold="true" layoutDirection="leftToRight" borderWidth="1" borderStyle="solid">
<WORDBOX name="WordBox17" width="538.427" alignment="near" floatingBehavior="enclosed" textAlignment="center" text="Operacion por Tipo de Movimiento"/>
</MINIPAGE>
<LAYOUTNODE name="Titulo" width="11.8" length="538.4" alignment="near" layoutDirection="leftToRight" floatingBehavior="enclosed" borderWidth="0.1" borderStyle="solid">
<WORDBOX name="WordBox18" width="4inch" alignment="near" fontSize="8" fontBold="true" floatingBehavior="enclosed" textAlignment="left" text="Articulo"/>
<WORDBOX name="Cuenta" width="0.5inch" alignment="center" fontSize="8" fontBold="true" floatingBehavior="enclosed" text="Cuenta"/>
<WORDBOX name="WordBox19_1" width="0.5inch" alignment="center" fontSize="8" fontBold="true" floatingBehavior="enclosed" textAlignment="left" text="U.Media"/>
<WORDBOX name="WordBox19" width="0.5inch" alignment="center" fontSize="8" fontBold="true" floatingBehavior="enclosed" textAlignment="left" text="Cantidad"/>
<WORDBOX name="WordBox20" width="1inch" length="10.6" alignment="center" fontSize="8" fontBold="true" floatingBehavior="enclosed" textAlignment="right" text="Costo"/>
<WORDBOX name="WordBox21" width="70.2" alignment="far" fontSize="8" fontBold="true" floatingBehavior="enclosed" textAlignment="right" text="Total"/>
</LAYOUTNODE>
</LAYOUTNODE>
<rtl:match name="Group cod_mov" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="MiniPage4" width="11.739" length="538.293" alignment="near" layoutDirection="leftToRight" borderWidth="0.2" borderStyle="solid">
<WORDWRAPBOX name="WordWrapBox8" width="57.8" length="11.8" alignment="center" fontSize="8" fontBold="true" floatingBehavior="enclosed" text="Movimiento:"/>
<rtl:input-variable name="movimiento" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="movimiento Value" class="grwStringValue" alignment="baseline" fontSize="8" fontBold="true" floatingBehavior="enclosed" text="{{movimiento}}"/>
</MINIPAGE>
<rtl:match name="Group departamento" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="MiniPage" width="11.739" length="538.293" alignment="near" fontSize="8" fontBold="true" layoutDirection="leftToRight" borderWidth="0.2" borderStyle="solid">
<WORDWRAPBOX name="WordWrapBox6" width="57.8" length="11.8" alignment="center" fontSize="8" fontBold="true" floatingBehavior="enclosed" text="{{&quot;Departamento:&quot;}}"/>
<rtl:input-variable name="x.departamento" type="FGLNumeric" expectedLocation="expectedHere"/>
<rtl:input-variable name="x.nombre" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.nombre Value" class="grwStringValue" floatingBehavior="enclosed" text="{{&quot;(&quot;+x.departamento.format(&quot;&lt;&lt;&lt;&lt;&lt;&quot;)+&quot;)&quot;+x.nombre}}"/>
</MINIPAGE>
<rtl:match name="Group cuenta" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="MiniPage3" width="min" length="538" layoutDirection="leftToRight" borderWidth="0.2" borderStyle="solid">
<WORDWRAPBOX name="WordWrapBox5" width="58.8" length="8.6" alignment="center" fontSize="8" fontBold="true" floatingBehavior="enclosed" text="Cuenta:"/>
<rtl:input-variable name="x.cuenta" type="FGLString" expectedLocation="expectedHere"/>
<rtl:input-variable name="x.nombre_cuenta" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.cuenta Value1" class="grwStringValue" alignment="near" fontSize="8" fontBold="true" floatingBehavior="enclosed" text="{{x.cuenta+&quot; &quot;+x.nombre_cuenta.trim()}}"/>
</MINIPAGE>
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="Data" width="9.8" length="7.5inch" alignment="far" fontSize="7" layoutDirection="leftToRight">
<rtl:input-variable name="codigo_producto" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="codigo_producto Value" class="grwStringValue" width="4inch" alignment="center" floatingBehavior="enclosed" text="{{codigo_producto}}"/>
<rtl:input-variable name="x.cuenta" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.cuenta Value" class="grwStringValue" width="0.5inch" length="8.8" alignment="near" floatingBehavior="enclosed" text="{{x.cuenta}}"/>
<rtl:input-variable name="x.unidad_med" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.unidad_med Value" class="grwStringValue" width="0.5inch" length="8.2" alignment="near" floatingBehavior="enclosed" textAlignment="right" text="{{x.unidad_med}}"/>
<rtl:input-variable name="x.consumo" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.consumo Value" class="grwNumericValue" width="0.5inch" length="8.8" anchorX="1" alignment="near" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{x.consumo}}"/>
<rtl:input-variable name="x.gasto_ind" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.gasto_ind Value" class="grwNumericValue" width="1inch" length="8.8" anchorX="1" alignment="baseline" floatingBehavior="enclosed" textAlignment="right" format="$&lt;&lt;&lt;,&lt;&lt;&lt;,&lt;&lt;&lt;,&lt;&lt;&amp;.&amp;&amp;" value="{{x.gasto_ind}}"/>
<rtl:input-variable name="x.consumo_cuenta" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.consumo_cuenta Value" class="grwNumericValue" width="1inch" length="8.2" anchorX="1" alignment="baseline" floatingBehavior="enclosed" textAlignment="right" format="$&lt;&lt;&lt;,&lt;&lt;&lt;,&lt;&lt;&lt;,&lt;&lt;&amp;.&amp;&amp;" value="{{x.consumo_cuenta}}"/>
</MINIPAGE>
</rtl:match>
<MINIPAGE name="total cuenta" width="min" length="max" layoutDirection="leftToRight">
<WORDWRAPBOX name="WordWrapBox10" width="1.1inch" alignment="far" fontSize="8" fontBold="true" floatingBehavior="enclosed" text="Total Cuenta:"/>
<rtl:input-variable name="total_cuenta" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="total_cuenta Value" class="grwNumericValue" width="6.4inch" anchorX="1" alignment="baseline" fontSize="8" fontBold="true" floatingBehavior="enclosed" textAlignment="right" format="$&lt;&lt;&lt;,&lt;&lt;&lt;,&lt;&lt;&lt;,&lt;&lt;&amp;.&amp;&amp;" value="{{total_cuenta}}"/>
</MINIPAGE>
</rtl:match>
<MINIPAGE name="Departamento" width="min" length="max" layoutDirection="leftToRight">
<WORDWRAPBOX name="WordWrapBox" width="1.1inch" alignment="far" fontSize="8" fontBold="true" floatingBehavior="enclosed" text="Total Departamento:"/>
<rtl:input-variable name="total_departamento" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="total_departamento Value" class="grwNumericValue" width="6.4inch" anchorX="1" alignment="baseline" fontSize="8" fontBold="true" floatingBehavior="enclosed" textAlignment="right" format="$&lt;&lt;&lt;,&lt;&lt;&lt;,&lt;&lt;&lt;,&lt;&lt;&amp;.&amp;&amp;" value="{{total_departamento}}"/>
</MINIPAGE>
</rtl:match>
<MINIPAGE name="Movimiento" width="min" length="max" layoutDirection="leftToRight">
<WORDWRAPBOX name="WordWrapBox4" width="1.1inch" alignment="baseline" fontSize="8" fontBold="true" floatingBehavior="enclosed" text="Total Movimiento:"/>
<rtl:input-variable name="total_movimiento" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="total_movimiento Value" class="grwNumericValue" width="6.4inch" anchorX="1" alignment="baseline" fontSize="8" fontBold="true" floatingBehavior="enclosed" textAlignment="right" format="$&lt;&lt;&lt;,&lt;&lt;&lt;,&lt;&lt;&lt;,&lt;&lt;&amp;.&amp;&amp;" value="{{total_movimiento}}"/>
</MINIPAGE>
</rtl:match>
<rtl:match name="OnLastRow" nameConstraint="OnLastRow" minOccurs="0" maxOccurs="1">
<MINIPAGE name="MiniPage2" width="10.2" length="max" layoutDirection="leftToRight">
<WORDWRAPBOX name="WordWrapBox3" width="1.1inch" length="9.8" alignment="baseline" fontSize="8" fontBold="true" floatingBehavior="enclosed" text="Total General:"/>
<rtl:input-variable name="total_general" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="total_general Value" class="grwNumericValue" width="6.4inch" anchorX="1" alignment="center" fontSize="8" fontBold="true" floatingBehavior="enclosed" textAlignment="right" format="$&lt;&lt;&lt;,&lt;&lt;&lt;,&lt;&lt;&lt;,&lt;&lt;&amp;.&amp;&amp;" value="{{total_general}}"/>
</MINIPAGE>
</rtl:match>
</MINIPAGE>
</rtl:match>
</PXML>
</rtl:stylesheet>
</report:Report>
+86
View File
@@ -0,0 +1,86 @@
<?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="31408" version="6.00">
<report:Settings RWPageWidth="letterwidth" RWPageLength="letterlength" RWLeftMargin="0.5inch" RWTopMargin="0.5inch" RWRightMargin="0.5inch" RWBottomMargin="0.5inch">
<report:FormatList>
<report:Format-SVG/>
<report:Format-PDF/>
<report:Format-image/>
</report:FormatList>
</report:Settings>
<report:Data RWDataLocation="../irdir/irprrp043.rdd" RWFglReportName="rep_consu"/>
<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">
<LAYOUTNODE name="Page Header" width="max" length="min" port="anyPageHeader">
<MINIPAGE name="encabezado" width="min" length="max" layoutDirection="leftToRight">
<WORDBOX name="WordBox6" floatingBehavior="enclosed" text="irprrp043"/>
<rtl:input-variable name="p_companias.nombre" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="Report Title" x="0" y="max/2" anchorX="0" anchorY="0.5" alignment="baseline" fontSize="25" baselineType="leftleft" floatingBehavior="enclosed" text="{{p_companias.nombre}}"/>
<PAGENOBOX name="PageNoBox" x="1.23857" y="max" anchorX="0" anchorY="1" alignment="baseline" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right"/>
<WORDBOX name="WordBox10" y="462.561" floatingBehavior="enclosed" text="Pagina no"/>
</MINIPAGE>
<MINIPAGE name="encabezado1" width="min" length="max" alignment="near" layoutDirection="leftToRight">
<rtl:input-variable name="datosFechas" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="WordBox7" width="1.7inch" floatingBehavior="enclosed" text="{{datosFechas.trim()}}"/>
<WORDBOX name="WordBox9" width="5inch" length="min" floatingBehavior="enclosed" textAlignment="center" text="CONSUMO POR DEPARTAMENTOS"/>
<rtl:input-variable name="hora" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="hora Value" class="grwStringValue" y="505.675" floatingBehavior="enclosed" text="{{hora}}"/>
</MINIPAGE>
<MINIPAGE name="Table Header" class="grwTableHeader" width="min" length="max" fontBold="true" layoutDirection="leftToRight" roundedCorners="true" borderWidth="1" borderStyle="solid">
<WORDBOX name="WordBox5" alignment="baseline" floatingBehavior="enclosed" text="DEPARTAMENTO"/>
<WORDBOX name="WordBox" y="100" floatingBehavior="enclosed" text="REPUESTO"/>
<WORDBOX name="WordBox1" y="277.845" floatingBehavior="enclosed" text="FECHA"/>
<WORDBOX name="WordBox2" y="346.944" floatingBehavior="enclosed" text="CONSUMO"/>
<WORDBOX name="WordBox3" y="428.357" floatingBehavior="enclosed" text="COSTO ST"/>
<WORDBOX name="WordBox4" y="500" floatingBehavior="enclosed" text="VALOR"/>
<WORDBOX name="WordBox9_1" y="180" floatingBehavior="enclosed" text="DOCUMENTO"/>
</MINIPAGE>
</LAYOUTNODE>
<rtl:match name="Group maquina" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="maquina" width="min" length="max" layoutDirection="leftToRight">
<rtl:input-variable name="x.maquina" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.maquina Value" class="grwNumericValue" width=".7inch" anchorX="1" fontBold="true" floatingBehavior="enclosed" textAlignment="right" format="&amp;&amp;&amp;&amp;&amp;" value="{{x.maquina}}"/>
<rtl:input-variable name="x.nombre" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.nombre Value" class="grwStringValue" y="52.9041" width="min" fontBold="true" floatingBehavior="enclosed" text="{{x.nombre}}"/>
<rtl:match name="Group codigo" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="codigo" width="min" length="max" layoutDirection="leftToRight">
<rtl:input-variable name="x.codigo" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.codigo Value" class="grwStringValue" floatingBehavior="enclosed" text="{{x.codigo}}"/>
<rtl:input-variable name="x.descrip_esp" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.descrip_esp Value" class="grwStringValue" y="98.5399" width="width(&quot;M&quot;)*20" floatingBehavior="enclosed" text="{{x.descrip_esp}}"/>
<rtl:input-variable name="x.unidad_med" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.unidad_med Value" class="grwStringValue" y="327.703" floatingBehavior="enclosed" text="{{x.unidad_med}}"/>
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="Table Row" class="grwTableRow" width="min" length="max" fontSize="8" layoutDirection="leftToRight">
<WORDBOX name="Spacer_1" alignment="baseline" baselineType="leftleft" port="itemSeparator" text=" "/>
<rtl:input-variable name="x.num_doc" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.num_doc Value" class="grwTableNumericColumnValue" width="{max(width(&quot;{&quot;Num Doc&quot;.translate()}&quot;),width(&quot;000000&quot;))}" anchorX="1" alignment="baseline" floatingBehavior="enclosed" textAlignment="right" format="----------#" value="{{x.num_doc}}"/>
<rtl:input-variable name="x.descripcion_mov" type="FGLString" expectedLocation="expectedHere"/>
<WORDWRAPBOX name="x.descripcion_mov Value" class="grwTableStringColumnValue" width="3.7inch" alignment="baseline" floatingBehavior="enclosed" text="{{x.descripcion_mov}}"/>
<rtl:input-variable name="xfecha" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="xfecha Value" class="grwStringValue" width="{max(width(&quot;{&quot;Xfecha&quot;.translate()}&quot;),width(&quot;M&quot;)*10)}" alignment="baseline" floatingBehavior="enclosed" text="{{xfecha}}"/>
<rtl:input-variable name="x.cantidad_2" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.cantidad_2 Value" class="grwTableNumericColumnValue" width="{max(width(&quot;{&quot;Cantidad 2&quot;.translate()}&quot;),width(&quot;0,000.00&quot;))}" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="-,---,---,--&amp;.&amp;&amp;" value="{{x.cantidad_2}}"/>
<rtl:input-variable name="x.costo_st" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.costo_st Value" class="grwTableNumericColumnValue" width="{max(width(&quot;{&quot;Costo St&quot;.translate()}&quot;),width(&quot;0,000,000,000.00&quot;))}" anchorX="1" alignment="far" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{x.costo_st}}"/>
<rtl:input-variable name="x.valor" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.valor Value" class="grwTableNumericColumnValue" width="{max(width(&quot;{&quot;Valor&quot;.translate()}&quot;),width(&quot;000,000,000.00&quot;))}" anchorX="1" alignment="baseline" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&amp;.&amp;&amp;" value="{{x.valor}}"/>
</MINIPAGE>
</rtl:match>
</MINIPAGE>
</rtl:match>
</MINIPAGE>
<MINIPAGE name="totalMaquina" width="min" length="max" fontBold="true" layoutDirection="leftToRight" roundedCorners="true" borderWidth="1" borderStyle="solid">
<rtl:input-variable name="x.nombre" type="FGLString" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox8" y="240.528" width="198" floatingBehavior="enclosed" textAlignment="right" text="{{&quot;Total departamento &quot;+x.nombre}}"/>
<rtl:input-variable name="total_valor_mq" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="total_valor_mq Value" class="grwNumericValue" y="461.561" width="75" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="{{&quot;#,###,##&amp;.&amp;&amp;&quot;}}" value="{{total_valor_mq}}"/>
</MINIPAGE>
</rtl:match>
</MINIPAGE>
</rtl:match>
</PXML>
</rtl:stylesheet>
</report:Report>
+145
View File
@@ -0,0 +1,145 @@
<?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="74cm" RWPageLength="29.70cm" RWLeftMargin="0.5cm" RWTopMargin="1cm" RWRightMargin="0.5cm" RWBottomMargin="1cm">
<report:FormatList>
<report:Format-SVG/>
<report:Format-PDF/>
<report:Format-image/>
</report:FormatList>
</report:Settings>
<report:Data RWDataLocation="noprrp045.rdd" RWFglReportName="r_min"/>
<report:Conflicts/>
<rtl:stylesheet>
<PXML>
<rtl:match name="Report" nameConstraint="Report" minOccurs="1" maxOccurs="1">
<MINIPAGE name="pageRoot" width="max" length="max" fontName="Arial">
<rtl:match name="FirstPageHeader" nameConstraint="FirstPageHeader" minOccurs="0" maxOccurs="1">
<LAYOUTNODE name="Encabezado" width="min" length="min" swapX="true">
<MINIPAGE name="Titulo" width="min" length="max" layoutDirection="leftToRight">
<WORDBOX name="WBTitulo" width="72cm" fontSize="11" fontBold="true" floatingBehavior="enclosed" textAlignment="center" text="INFORME AL MINISTERIO DE TRABAJO - MONTO RD$ (SUELDO) POR NIVEL EDUCATIVO Y CANTIDAD DE EMPLEADOS, POR MES Y SEXO"/>
</MINIPAGE>
<MINIPAGE name="Encabezados" width="min" length="max" bgColor="#cccccc" fontBold="true" layoutDirection="leftToRight">
<WORDBOX name="h_nivel" width="6cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="left" text="NIVEL EDUCATIVO"/>
<WORDBOX name="h01" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="ENE H"/>
<WORDBOX name="h02" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="ENE M"/>
<WORDBOX name="h03" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="#e0e0e0" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="ENE TOT"/>
<WORDBOX name="h04" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="FEB H"/>
<WORDBOX name="h05" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="FEB M"/>
<WORDBOX name="h06" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="#e0e0e0" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="FEB TOT"/>
<WORDBOX name="h07" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="MAR H"/>
<WORDBOX name="h08" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="MAR M"/>
<WORDBOX name="h09" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="#e0e0e0" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="MAR TOT"/>
<WORDBOX name="h10" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="ABR H"/>
<WORDBOX name="h11" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="ABR M"/>
<WORDBOX name="h12" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="#e0e0e0" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="ABR TOT"/>
<WORDBOX name="h13" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="MAY H"/>
<WORDBOX name="h14" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="MAY M"/>
<WORDBOX name="h15" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="#e0e0e0" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="MAY TOT"/>
<WORDBOX name="h16" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="JUN H"/>
<WORDBOX name="h17" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="JUN M"/>
<WORDBOX name="h18" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="#e0e0e0" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="JUN TOT"/>
<WORDBOX name="h19" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="JUL H"/>
<WORDBOX name="h20" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="JUL M"/>
<WORDBOX name="h21" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="#e0e0e0" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="JUL TOT"/>
<WORDBOX name="h22" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="AGO H"/>
<WORDBOX name="h23" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="AGO M"/>
<WORDBOX name="h24" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="#e0e0e0" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="AGO TOT"/>
<WORDBOX name="h25" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="SEP H"/>
<WORDBOX name="h26" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="SEP M"/>
<WORDBOX name="h27" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="#e0e0e0" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="SEP TOT"/>
<WORDBOX name="h28" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="OCT H"/>
<WORDBOX name="h29" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="OCT M"/>
<WORDBOX name="h30" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="#e0e0e0" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="OCT TOT"/>
<WORDBOX name="h31" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="NOV H"/>
<WORDBOX name="h32" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="NOV M"/>
<WORDBOX name="h33" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="#e0e0e0" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="NOV TOT"/>
<WORDBOX name="h34" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="DIC H"/>
<WORDBOX name="h35" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="DIC M"/>
<WORDBOX name="h36" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="#e0e0e0" fontSize="7" fontBold="true" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="center" text="DIC TOT"/>
</MINIPAGE>
</LAYOUTNODE>
</rtl:match>
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
<LAYOUTNODE name="Detalle" width="min" length="max" layoutDirection="leftToRight" borderWidth="1" borderStyle="solid" borderColor="#dfdfdf">
<rtl:input-variable name="x.tipo" type="FGLString" expectedLocation="expectedHere"/>
<rtl:input-variable name="x.nivel" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.nivel Value" width="6cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="left" text="{{x.nivel}}"/>
<rtl:input-variable name="x.v01" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v01 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v01}}"/>
<rtl:input-variable name="x.v02" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v02 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v02}}"/>
<rtl:input-variable name="x.v03" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v03 Value" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;#ffffff&quot;:&quot;#eeeeee&quot;}}" fontSize="7" fontBold="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;false&quot;:&quot;true&quot;}}" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v03}}"/>
<rtl:input-variable name="x.v04" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v04 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v04}}"/>
<rtl:input-variable name="x.v05" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v05 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v05}}"/>
<rtl:input-variable name="x.v06" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v06 Value" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;#ffffff&quot;:&quot;#eeeeee&quot;}}" fontSize="7" fontBold="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;false&quot;:&quot;true&quot;}}" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v06}}"/>
<rtl:input-variable name="x.v07" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v07 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v07}}"/>
<rtl:input-variable name="x.v08" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v08 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v08}}"/>
<rtl:input-variable name="x.v09" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v09 Value" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;#ffffff&quot;:&quot;#eeeeee&quot;}}" fontSize="7" fontBold="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;false&quot;:&quot;true&quot;}}" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v09}}"/>
<rtl:input-variable name="x.v10" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v10 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v10}}"/>
<rtl:input-variable name="x.v11" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v11 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v11}}"/>
<rtl:input-variable name="x.v12" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v12 Value" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;#ffffff&quot;:&quot;#eeeeee&quot;}}" fontSize="7" fontBold="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;false&quot;:&quot;true&quot;}}" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v12}}"/>
<rtl:input-variable name="x.v13" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v13 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v13}}"/>
<rtl:input-variable name="x.v14" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v14 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v14}}"/>
<rtl:input-variable name="x.v15" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v15 Value" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;#ffffff&quot;:&quot;#eeeeee&quot;}}" fontSize="7" fontBold="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;false&quot;:&quot;true&quot;}}" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v15}}"/>
<rtl:input-variable name="x.v16" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v16 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v16}}"/>
<rtl:input-variable name="x.v17" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v17 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v17}}"/>
<rtl:input-variable name="x.v18" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v18 Value" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;#ffffff&quot;:&quot;#eeeeee&quot;}}" fontSize="7" fontBold="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;false&quot;:&quot;true&quot;}}" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v18}}"/>
<rtl:input-variable name="x.v19" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v19 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v19}}"/>
<rtl:input-variable name="x.v20" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v20 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v20}}"/>
<rtl:input-variable name="x.v21" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v21 Value" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;#ffffff&quot;:&quot;#eeeeee&quot;}}" fontSize="7" fontBold="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;false&quot;:&quot;true&quot;}}" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v21}}"/>
<rtl:input-variable name="x.v22" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v22 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v22}}"/>
<rtl:input-variable name="x.v23" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v23 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v23}}"/>
<rtl:input-variable name="x.v24" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v24 Value" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;#ffffff&quot;:&quot;#eeeeee&quot;}}" fontSize="7" fontBold="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;false&quot;:&quot;true&quot;}}" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v24}}"/>
<rtl:input-variable name="x.v25" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v25 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v25}}"/>
<rtl:input-variable name="x.v26" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v26 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v26}}"/>
<rtl:input-variable name="x.v27" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v27 Value" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;#ffffff&quot;:&quot;#eeeeee&quot;}}" fontSize="7" fontBold="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;false&quot;:&quot;true&quot;}}" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v27}}"/>
<rtl:input-variable name="x.v28" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v28 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v28}}"/>
<rtl:input-variable name="x.v29" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v29 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v29}}"/>
<rtl:input-variable name="x.v30" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v30 Value" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;#ffffff&quot;:&quot;#eeeeee&quot;}}" fontSize="7" fontBold="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;false&quot;:&quot;true&quot;}}" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v30}}"/>
<rtl:input-variable name="x.v31" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v31 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v31}}"/>
<rtl:input-variable name="x.v32" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v32 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v32}}"/>
<rtl:input-variable name="x.v33" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v33 Value" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;#ffffff&quot;:&quot;#eeeeee&quot;}}" fontSize="7" fontBold="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;false&quot;:&quot;true&quot;}}" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v33}}"/>
<rtl:input-variable name="x.v34" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v34 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v34}}"/>
<rtl:input-variable name="x.v35" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v35 Value" width="1.8cm" length="0.42cm" alignment="baseline" fontSize="7" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v35}}"/>
<rtl:input-variable name="x.v36" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.v36 Value" width="1.8cm" length="0.42cm" alignment="baseline" bgColor="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;#ffffff&quot;:&quot;#eeeeee&quot;}}" fontSize="7" fontBold="{{(x.tipo==&quot;D&quot;||x.tipo==&quot;H&quot;||x.tipo==&quot;S&quot;)?&quot;false&quot;:&quot;true&quot;}}" baselineType="leftleft" floatingBehavior="enclosed" textAlignment="right" text="{{x.v36}}"/>
</LAYOUTNODE>
</rtl:match>
</MINIPAGE>
</rtl:match>
</PXML>
</rtl:stylesheet>
</report:Report>
+299
View File
@@ -0,0 +1,299 @@
GLOBALS "cgprgb000.4gl"
FUNCTION edprrp118(
fecha1, fecha2, detalle, entra, afecta, p_companias, acumulado_arr, usuario)
DEFINE
handler
om
.SaxDocumentHandler, -- return value from fgl_report_commitCurrentSettings()
r_filename
STRING, -- filename of Report Design Document including .4rp extension
r_output STRING, -- output format option
preview INTEGER
DEFINE
acumulado_arr DYNAMIC ARRAY OF RECORD
cod_mov LIKE irtb00006.cod_mov,
descrip_mov LIKE intb00005.descrip_mov,
departamento SMALLINT,
nombre CHAR(30),
consumo DECIMAL(12, 2),
cuenta CHAR(10),
gasto_ind LIKE irtb00013.costo_st,
descripcion CHAR(50),
consumo_cuenta DECIMAL(12, 2),
cuenta_inv CHAR(10)
END RECORD,
ordenar CHAR(30)
DEFINE
afecta CHAR(3),
fecha1, fecha2 DATE,
p_cctb01 RECORD LIKE cctb00001.*,
entra CHAR(14),
detalle CHAR(100),
p_companias CHAR(30),
idz INT,
###### Variables para almacenar los datos selecionados
usuario, clave CHAR(80),
impresor SMALLINT
LET r_filename = "edprrp118b.4rp"
LET idz = 1
FOR idx = 1 TO acumulado_arr.getLength()
IF idx = 1 THEN
IF fgl_report_loadCurrentSettings(r_filename) THEN
LET preview = 1
CALL seleccionarsalida()
RETURNING r_output -- load the .4rp file
CALL fgl_report_selectDevice(r_output) -- changing default
CALL fgl_report_selectPreview(preview) -- changing default
LET handler =
fgl_report_commitCurrentSettings() -- commit changes
END IF
START REPORT entrada14 TO XML HANDLER HANDLER
END IF
LET ordenar =
acumulado_arr[idz].cuenta CLIPPED,
"-",
acumulado_arr[idz].departamento USING "&&&&&"
OUTPUT TO REPORT entrada14(
p_cctb01.*,
fecha1,
fecha2,
detalle,
entra,
afecta,
p_companias,
acumulado_arr[idz].*,
ordenar, usuario)
LET idz = idz + 1
END FOR
IF idx > 1 THEN
FINISH REPORT entrada14
ELSE
CALL fgl_winmessage(
"INFO",
"NO HAY REGISTROS EN ESTE RANGO DE FECHA Y CON LOS PARAMETROS INDICADOS",
"INFO")
END IF
--RUN imprime
END FUNCTION
REPORT entrada14(
x, fecha1, fecha2, detalle1, entrada, afecta, p_companias, y, xordenar, usuario)
DEFINE x RECORD LIKE cctb00001.*
DEFINE usuario VARCHAR(50)
DEFINE
y RECORD
cod_mov LIKE irtb00006.cod_mov,
descrip_mov LIKE intb00005.descrip_mov,
departamento SMALLINT,
nombre CHAR(30),
consumo DECIMAL(12, 2),
cuenta CHAR(10),
gasto_ind LIKE irtb00013.costo_st,
descripcion CHAR(30),
consumo_cuenta DECIMAL(12, 2),
cuenta_inv CHAR(10)
END RECORD,
xordenar VARCHAR(30)
### Acumula los valores de las diferentes cuentas para entrada diario de nomina
DEFINE
invdebito,
invcredito,
debito,
credito,
total_departamento,
total_haber,
total_deber
DECIMAL(12, 2),
detalle1, nombre_cta, rango_fecha CHAR(100),
fecha1, fecha2 DATE, #### Almacena las fecha del rango de busqueda
hora CHAR(5),
entrada CHAR(14),
actual VARCHAR(20),
afecta CHAR(3),
p_companias, desc_cuenta CHAR(30)
ORDER BY xordenar
FORMAT
FIRST PAGE HEADER
LET hora = TIME
LET actual = TODAY USING "dd/mm/yyyy"
LET rango_fecha =
"Del ",
fecha1 USING "dd/mm/yyyy",
" Al ",
fecha2 USING "dd/mm/yyyy"
LET total_deber = 0
LET total_haber = 0
BEFORE GROUP OF y.departamento
LET total_departamento = 0
AFTER GROUP OF xordenar
IF y.consumo < 0 THEN
LET debito = GROUP SUM(y.consumo_cuenta) * -1
LET credito = 0
ELSE
LET debito = 0
LET credito = GROUP SUM(y.consumo_cuenta)
END IF
PRINTX entrada,
hora,
actual,
rango_fecha,
p_companias,
y.cod_mov,
y.consumo,
y.cuenta,
y.departamento,
y.descrip_mov,
y.gasto_ind,
y.nombre,
y.consumo_cuenta,
y.descripcion,
debito,
credito,
detalle1
IF afecta = "S" THEN
BEGIN WORK
IF y.consumo < 0 THEN
INSERT INTO cgtb00004(
fecha,
tipo,
ref,
cuenta_no,
departamento,
detalle_1,
debito,
credito,
us_crea,
fech_crea)
VALUES(fecha2,
1,
entrada,
y.cuenta,
y.departamento,
detalle1,
debito,
0,
usuarios,
GETDATE())
ELSE
INSERT INTO cgtb00004(
fecha,
tipo,
ref,
cuenta_no,
departamento,
detalle_1,
debito,
credito,
us_crea,
fech_crea)
VALUES(fecha2,
1,
entrada,
y.cuenta,
y.departamento,
detalle1,
0,
credito,
usuarios,
GETDATE())
END IF
COMMIT WORK
END IF
LET total_deber = debito + total_deber
LET total_haber = credito + total_haber
ON LAST ROW
SELECT a.descripcion
INTO nombre_cta
FROM cgtb00001 a
WHERE a.cuenta_no = y.cuenta_inv
IF nombre_cta IS NULL THEN
LET nombre_cta = "CUENTA SIN DESCRIPCION"
END IF
IF y.consumo < 0 THEN
LET invcredito = SUM(y.consumo_cuenta * -1)
LET invdebito = 0
LET total_haber = invcredito + total_haber
ELSE
LET invdebito = SUM(y.consumo_cuenta)
LET invcredito = 0
LET total_deber = invdebito + total_deber
END IF
IF afecta = "S" THEN
BEGIN WORK
IF y.consumo < 0 THEN
INSERT INTO cgtb00004(
fecha,
tipo,
ref,
cuenta_no,
detalle_1,
debito,
credito,
us_crea,
fech_crea)
VALUES(fecha2,
1,
entrada,
y.cuenta_inv,
detalle1,
0,
invcredito,
usuarios,
GETDATE())
ELSE
INSERT INTO cgtb00004(
fecha,
tipo,
ref,
cuenta_no,
detalle_1,
debito,
credito,
us_crea,
fech_crea)
VALUES(fecha2,
1,
entrada,
y.cuenta_inv,
detalle1,
invcredito,
0,
usuarios,
GETDATE())
END IF
{UPDATE cgtb00011
SET referencia = referencia + 1,
us_mod = usuario,
fech_mod = getdate()
WHERE entrada_no = 5}
COMMIT WORK
END IF
PRINTX y.cuenta_inv,
total_haber,
nombre_cta,
desc_cuenta,
total_deber,
invdebito,
invcredito
END REPORT
+128
View File
@@ -0,0 +1,128 @@
DEFINE curr,i INT,
kdatos DYNAMIC ARRAY OF RECORD
bookmash VARCHAR(50),
tipos VARCHAR(50),
lado_1 DEC(8,2),
lado_2 DEC(8,2),
lado_3 DEC(8,2),
cantidad SMALLINT,
cantidad2 FLOAT,
tono,calidad VARCHAR(100),
xobservacion VARCHAR(200),
id_producto CHAR(25),
bodega INT,
seccion INT,
tramo INT,
codid,idrow,idtrx INT
END RECORD,
xcodid,xbodega,xseccion,xtramo,xcodn,xcodgrupo,xcodtipo,xcodsec,kidtrx INT,
xfecha DATE,
totalmedida DEC(12,5)
FUNCTION desglose_conteo(pcodid,pfecha,pbodega,pseccion,ptramo,pcodn,pcodgrupo,pcodtipo,pcodsec,descripcion,idtrx)
DEFINE pcodid,pbodega,pseccion,ptramo,pcodn,pcodgrupo,pcodtipo,pcodsec,idtrx INT,pfecha DATE,
descripcion VARCHAR(100)
LET xcodid = pcodid
LET xbodega = pbodega
LET xseccion = pseccion
LET xtramo = ptramo
LET xfecha = pfecha
LET xcodn = pcodn
LET xcodgrupo = pcodgrupo
LET xcodtipo = pcodtipo
LET xcodsec = pcodsec
LET kidtrx = idtrx
CALL kdatos.clear()
CALL busca_detalle()
OPEN WINDOW w1 WITH FORM "irfmwd015"
DISPLAY BY NAME pcodn,pcodgrupo,pcodtipo,pcodsec,descripcion
INPUT ARRAY kdatos FROM sdatos.* ATTRIBUTES(WITHOUT DEFAULTS)
BEFORE INPUT
LET curr = arr_curr()
LET totalmedida =0
LET kdatos[curr].cantidad2 =0
CALL bodegas('1')
CALL cseccion(kdatos[curr].bodega)
CALL ctramo(kdatos[curr].bodega,kdatos[curr].seccion)
AFTER FIELD cantidad
IF kdatos[arr_curr()].cantidad IS NOT NULL THEN
IF kdatos[arr_curr()].lado_1 IS NOT NULL THEN
LET kdatos[arr_curr()].cantidad2 =kdatos[arr_curr()].lado_1 *kdatos[arr_curr()].cantidad
END IF
IF kdatos[arr_curr()].lado_2 IS NOT NULL THEN
LET kdatos[arr_curr()].cantidad2 =kdatos[arr_curr()].lado_1 * kdatos[arr_curr()].lado_2* kdatos[arr_curr()].cantidad
END IF
IF kdatos[arr_curr()].lado_3 IS NOT NULL THEN
LET kdatos[arr_curr()].cantidad2 =kdatos[arr_curr()].cantidad2* kdatos[arr_curr()].lado_3* kdatos[arr_curr()].cantidad
END IF
DISPLAY kdatos[arr_curr()].cantidad2 TO sdatos[scr_line()].cantidad2
LET totalmedida = totalmedida + kdatos[arr_curr()].cantidad2
DISPLAY BY NAME totalmedida
END IF
AFTER INPUT
IF int_flag THEN
LET int_flag = FALSE
CALL msg(2)
END IF
LET totalmedida =0
FOR i =1 to kdatos.getLength()
IF kdatos[i].cantidad IS NOT NULL THEN
IF kdatos[i].lado_1 IS NOT NULL THEN
LET kdatos[i].cantidad2 =kdatos[i].lado_1 *kdatos[i].cantidad
END IF
IF kdatos[i].lado_2 IS NOT NULL THEN
LET kdatos[i].cantidad2 =kdatos[i].lado_1 * kdatos[i].lado_2* kdatos[i].cantidad
END IF
IF kdatos[i].lado_3 IS NOT NULL THEN
LET kdatos[i].cantidad2 =kdatos[i].cantidad2* kdatos[i].lado_3
END IF
LET totalmedida = totalmedida + kdatos[i].cantidad2
END IF
END FOR
EXIT INPUT
ON ACTION salvar ATTRIBUTE(TEXT="Guardar",IMAGE="fa-save")
CALL guarda_info()
END INPUT
CLOSE WINDOW w1
RETURN totalmedida
END FUNCTION
FUNCTION busca_detalle()
DECLARE busca_desglose CURSOR FOR
SELECT a.book,a.tipos,a.lado_1,a.lado_2,a.lado_3,a.cantidad,a.cantidad2,a.tono,a.calidad,
a.observacion,
a.idproducto,a.bodega,a.cod_seccion,a.cod_tramo,a.codid, a.idrow,a.idtrx
FROM iptb00062 a WHERE a.codid = xcodid AND a.fecha = xfecha
ORDER BY a.lado_1
LET i = 1
FOREACH busca_desglose INTO kdatos[i].*
LET i = i + 1
END FOREACH
END FUNCTION
FUNCTION guarda_info()
BEGIN WORK
DELETE FROM iptb00062 WHERE fecha = xfecha AND bodega = xbodega AND codid = xcodid
FOR i = 1 TO kdatos.getLength()
IF kdatos[i].cantidad2 IS NOT NULL THEN
INSERT INTO iptb00062 (codid,cod_n,cod_grupo,cod_tipo,cod_Sec,cantidad,cantidad2,lado_1,lado_2,lado_3,
book,tipos,cod_seccion,cod_tramo,bodega,us_crea,fech_crea,idproducto,idtrx,tono,calidad,fecha,
observacion)
VALUES (kdatos[i].codid,xcodn,xcodgrupo,xcodtipo,xcodsec,kdatos[i].cantidad,kdatos[i].cantidad2,
kdatos[i].lado_1,kdatos[i].lado_2,kdatos[i].lado_3,kdatos[i].bookmash,kdatos[i].tipos,
kdatos[i].seccion,kdatos[i].tramo,kdatos[i].bodega,suser_sname(),getdate(),
kdatos[i].id_producto,kidtrx,kdatos[i].tono,kdatos[i].calidad,xfecha,
kdatos[i].xobservacion)
END IF
END FOR
COMMIT WORK
CALL msg(1)
END FUNCTION
+165
View File
@@ -0,0 +1,165 @@
GLOBALS "irprgb000.4gl"
DEFINE xcodigo VARCHAR(50)
DEFINE despiece1 DYNAMIC ARRAY OF RECORD
id_etiqueta SMALLINT,
cod_n SMALLINT,
cod_grupo SMALLINT,
cod_tipo SMALLINT,
cod_sec SMALLINT,
lado_1 DEC(12,5),
lado_2 DEC(12,5),
lado_3 DEC(12,5),
cantidad DEC(12,5),
medida DEC(12,5),
secuencia,id_despiece INT,
bodega SMALLINT
END RECORD
DEFINE vendedor VARCHAR(100)
FUNCTION impdocumentos(numeroid,codmov)
DEFINE numeroid,codmov INT
CALL buscadoc(numeroid,codmov)
LET r_filename = "irprmt020.4rp"
iF fgl_report_loadCurrentSettings(r_filename) THEN -- load the .4rp file
LET r_output="PDF"
LET preview=1
CALL fgl_report_selectDevice(r_output) -- changing default
CALL fgl_report_selectPreview(preview) -- changing default
LET handler = fgl_report_commitCurrentSettings() -- commit changes
ELSE
RETURN
END IF
START REPORT requiere TO XML HANDLER HANDLER
FOR idx = 1 TO arr_irtb58.getLength()
IF arr_irtb58[idx].cod_Sec IS NOT NULL THEN
LET xcodigo =arr_irtb58[idx].cod_n USING '&&&&&','-',
arr_irtb58[idx].cod_grupo USING '&&&&&','-',
arr_irtb58[idx].cod_tipo USING '&&&&&&','-',
arr_irtb58[idx].cod_sec USING '&&&&&&&'
DISPLAY arr_irtb58[idx].*
DISPLAY xcodigo
OUTPUT TO REPORT requiere(arr_irtb58[idx].*,despiece[idx].*, xcodigo)
END IF
END FOR
FINISH REPORT requiere
LET tienedespiece = FALSE
END FUNCTION
REPORT requiere(detalle,xdespiece,codigo)
DEFINE hora STRING,
detalle RECORD
area INT,
cod_n,cod_grupo,cod_tipo,cod_sec INT,
descripcion VARCHAR(100),
unidad_med VARCHAR(4),
cantidad_1,cantidad,cantidad_o1,cantidad1,factor_conv DEC(12,5)
END RECORD,
xdespiece RECORD
id_etiqueta SMALLINT,
cod_n SMALLINT,
cod_grupo SMALLINT,
cod_tipo SMALLINT,
cod_sec SMALLINT,
lado_1 DEC(12,5),
lado_2 DEC(12,5),
lado_3 DEC(12,5),
cantidad DEC(12,5),
medida DEC(12,5),
secuencia,id_despiece INT,
bodega SMALLINT
END RECORD,
codigo VARCHAR(50),
x INT,
etiqueta VARCHAR(100)
ORDER BY codigo
FORMAT
FIRST PAGE HEADER
SELECT a.nombre INTO p_companias.nombre FROM companias a
LET hora = CURRENT
PRINTX hora,p_companias.nombre
BEFORE GROUP OF codigo
PRINTX detalle.*,p_irtb57.*,
nombreMov,nombreBodega,nombreBodegaDestino,nombreUsuario
ON EVERY ROW
SELECT a.descripcion INTO etiqueta FROM vetb00026 a
WHERE a.codid = xdespiece.id_etiqueta
LET total_cantidad = total_cantidad + xdespiece.cantidad
PRINTX codigo,xdespiece.*,tienedespiece,etiqueta,total_cantidad,total_medida
END REPORT
FUNCTION buscadoc(numid,codmov)
DEFINE numid,codmov INT
LET vendedor = null
SELECT a.numero_Doc,a.cod_mov,a.fecha,a.num_oc,a.tipo_cliente,a.sec_cliente,a.nombre,a.bodega,a.bodega_destino,
a.estado,a.url_destino,a.observacion,b.descrip_mov,c.descripcion,
'('||ISNULL(CAST(f.num_emp AS VARCHAR(10)),' ')||')'||ISNULL(rtrim(f.nom1_emp),' ')||' '||ISNULL(f.apell1_emp,' ')
INTO p_irtb57.numero_doc,p_irtb57.cod_mov,p_irtb57.fecha,p_irtb57.num_oc,p_irtb57.tipo_cliente,p_irtb57.sec_cliente,
p_irtb57.cliente,p_irtb57.bodega,p_irtb57.bodega_destino,p_irtb57.estado,
p_irtb57.url_file,p_irtb57.observacion,nombreMov,nombreBodega,vendedor
FROM irtb00057 a INNER JOIN irtb00005 b ON b.cod_mov = a.cod_mov
INNER JOIN intb00009 c ON c.cod_bodega = a.bodega
LEFT OUTER JOIN prtb00012 d ON d.num_oc = a.num_oc
LEFT OUTER JOIN adtb00003 f ON f.num_emp = d.sec_vend
WHERE a.numero_doc = numid AND a.cod_mov = codmov
#BODEGA DESTINO
IF p_irtb57.bodega_destino IS NOT NULL THEN
SELECT a.descripcion INTO nombreBodegaDestino FROM intb00009 a WHERE a.cod_bodega = p_irtb57.bodega_destino
END IF
DECLARE buscardetalle CURSOR FOR
SELECT a.area,a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.descripcion,a.unidad_med,
a.cantidad_1,a.cantidad_2,
c.id_etiqueta,
c.lado_1,c.lado_2,c.lado_3,c.cantidad,c.medida
FROM irtb00058 a
LEFT OUTER JOIN irtb00060 c ON c.cod_n =a.cod_n AND c.cod_grupo = a.cod_grupo AND
c.cod_tipo = a.cod_tipo AND c.cod_sec = a.cod_Sec AND
c.id_despiece = a.numero_Doc
WHERE a.numero_Doc = numid AND a.cod_mov = codmov
LET idx = 1
CALL arr_irtb58.clear()
LET tienedespiece = FALSE
FOREACH buscardetalle INTO arr_irtb58[idx].area,
arr_irtb58[idx].cod_n,
arr_irtb58[idx].cod_grupo,
arr_irtb58[idx].cod_tipo,
arr_irtb58[idx].cod_sec,
arr_irtb58[idx].descripcion,
arr_irtb58[idx].unidad_med,
arr_irtb58[idx].cantidad_1,
arr_irtb58[idx].cantidad,
#arr_irtb58[idx].factor_conv,
despiece1[idx].id_etiqueta,
despiece1[idx].lado_1,
despiece1[idx].lado_2,
despiece1[idx].lado_3,
despiece1[idx].cantidad,
despiece1[idx].medida
IF despiece1[idx].cantidad > 0 THEN
LET tienedespiece = TRUE
ELSE
LET tienedespiece = FALSE
END IF
LET idx = idx + 1
END FOREACH
END FUNCTION
+62
View File
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm fileVersion="31400" gstVersion="3140a" name="irautorizared" uid="{b2fa7045-bc87-4030-a88f-caa7495d9d8b}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record name="sbusqueda" uid="{27bf1e71-6d5e-4dbd-807c-41c2e8f275ee}">
<RecordField defaultValue="NO" fieldIdRef="1" name="procesa" uid="{c1020a45-3bef-4960-b202-4c12a193b383}"/>
<RecordField fieldIdRef="15" name="estado" uid="{ba494f46-a6bc-46e4-902c-b2ffe4af7152}"/>
<RecordField fieldIdRef="18" name="idestado" uid="{f662e07a-b551-48f6-afc9-441925395822}"/>
<RecordField fieldIdRef="2" name="num_doc" uid="{b1ba6077-ac0b-42f1-b641-85058081878d}"/>
<RecordField fieldIdRef="3" name="tipo_documento" uid="{4572f47f-03bc-47a9-a895-f8663a807782}"/>
<RecordField fieldIdRef="4" name="numeroid" uid="{cf191b06-333a-45fc-aa99-b4d573f2978f}"/>
<RecordField fieldIdRef="5" name="fechadoc" uid="{fb733254-f678-41b7-9500-a6975135c155}"/>
<RecordField fieldIdRef="6" name="nombre" uid="{b5e1f023-64a3-48e0-8390-e812ff796835}"/>
<RecordField fieldIdRef="7" name="observacion1" uid="{905dd063-2a37-483a-b79b-dd9746180d7f}"/>
<RecordField fieldIdRef="20" name="origen" uid="{e48ff579-16fd-4d8b-adcc-79b694f34b32}"/>
<RecordField fieldIdRef="21" name="destino" uid="{20ef0f7c-03d8-4272-bcd6-1b80640953bc}"/>
<RecordField fieldIdRef="8" name="usuario" uid="{44a99621-2d53-4c17-ade9-8f237610b3f5}"/>
<RecordField fieldIdRef="19" name="vendedor" uid="{9ab54188-043b-4b20-b192-a7fb03f5c06f}"/>
<RecordField fieldIdRef="17" name="archivo" uid="{b8644af2-77e0-4282-bd85-ac1e58ad21ee}"/>
<RecordField fieldIdRef="9" name="cod_mov1" uid="{2e4dce79-d479-4f66-bd3a-872e96b92419}"/>
<RecordField fieldIdRef="10" name="us_crea" uid="{5126c8d1-c3af-4e26-be88-7df339613cfa}"/>
<RecordField fieldIdRef="12" name="rtipo_cliente" uid="{dddb5844-92d0-4fb4-8312-562be99008ee}"/>
<RecordField fieldIdRef="13" name="rsec_cliente" uid="{e2a436fa-aebb-44d1-9308-d7de756f98a8}"/>
<RecordField fieldIdRef="14" name="bodega" uid="{c54a090a-46f4-424c-b3f1-cebfde9fc349}"/>
<RecordField fieldIdRef="16" name="bodega_destino" uid="{e2c3816f-4a1f-4566-b70e-98718a2c9959}"/>
</Record>
<Record name="record1" uid="{53c9169a-e785-45e1-810c-afdc9fdd40aa}">
<RecordField fieldIdRef="11" name="etiqueta" uid="{778e9556-3ccb-4e67-b46d-7cdf41860cb6}"/>
</Record>
<Form gridHeight="16" gridWidth="225" name="form" text="Requisiciones Autorizadas">
<Grid gridHeight="10" gridWidth="222" name="grid1" posX="3" posY="4">
<Edit fieldId="11" gridHeight="1" gridWidth="88" name="etiqueta" posX="8" posY="1" tabIndex="-1" title="edit1" widget="Edit"/>
<Button gridHeight="1" gridWidth="10" image="fa-paperclip" name="tfile" posX="114" posY="1" tabIndex="-1"/>
<Table gridHeight="6" gridWidth="221" name="table2" posX="1" posY="3" totalRows="5">
<CheckBox defaultValue="NO" fieldId="1" gridHeight="1" gridWidth="8" name="procesa" posX="0" posY="0" tabIndex="-1" title="Procesar" valueChecked="SI" valueUnchecked="NO" widget="CheckBox"/>
<Edit fieldId="15" gridHeight="1" gridWidth="20" name="estado" noEntry="true" posX="8" posY="0" scroll="true" tabIndex="-1" title="Estado" widget="Edit"/>
<ComboBox fieldId="18" gridHeight="1" gridWidth="8" items="" name="idestado" posX="28" posY="0" tabIndex="-1" title="Estado Proceso" widget="ComboBox"/>
<Edit fieldId="2" gridHeight="1" gridWidth="8" name="num_doc" noEntry="true" posX="36" posY="0" tabIndex="-1" title="Orden" widget="Edit"/>
<ButtonEdit fieldId="3" gridHeight="1" gridWidth="8" name="tipo_documento" noEntry="true" posX="44" posY="0" scroll="true" tabIndex="-1" title="Tipo Documento" widget="ButtonEdit"/>
<Edit fieldId="4" gridHeight="1" gridWidth="14" name="numeroid" noEntry="true" posX="52" posY="0" scroll="true" tabIndex="-1" title="Numero Documento" widget="Edit"/>
<Edit fieldId="5" gridHeight="1" gridWidth="8" name="fechadoc" noEntry="true" posX="66" posY="0" tabIndex="-1" title="Fecha" widget="Edit"/>
<Edit fieldId="6" gridHeight="1" gridWidth="8" name="nombre" noEntry="true" posX="74" posY="0" scroll="true" tabIndex="-1" title="Cliente" widget="Edit"/>
<Edit fieldId="7" gridHeight="1" gridWidth="8" name="observacion1" noEntry="false" posX="82" posY="0" scroll="true" tabIndex="-1" title="Observacion" widget="Edit"/>
<Edit fieldId="20" gridHeight="1" gridWidth="8" name="origen" posX="90" posY="0" scroll="true" tabIndex="-1" title="B. Origen" widget="Edit"/>
<Edit fieldId="21" gridHeight="1" gridWidth="8" name="destino" posX="98" posY="0" scroll="true" tabIndex="-1" title="B. Destino" widget="Edit"/>
<Edit fieldId="8" gridHeight="1" gridWidth="30" name="usuario" noEntry="true" posX="106" posY="0" scroll="true" tabIndex="-1" title="Usuario" widget="Edit"/>
<Edit fieldId="19" gridHeight="1" gridWidth="8" name="vendedor" posX="136" posY="0" scroll="true" tabIndex="-1" title="Vendedor" widget="Edit"/>
<ButtonEdit action="tfile" fieldId="17" gridHeight="1" gridWidth="8" image="fa-paperclip" name="archivo" noEntry="true" posX="144" posY="0" tabIndex="-1" widget="ButtonEdit"/>
<Edit fieldId="9" gridHeight="1" gridWidth="8" hidden="true" name="cod_mov1" posX="152" posY="0" tabIndex="-1" title="edit2" widget="Edit"/>
<Edit fieldId="10" gridHeight="1" gridWidth="8" hidden="true" name="us_crea" posX="160" posY="0" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="12" gridHeight="1" gridWidth="8" hidden="true" name="rtipo_cliente" posX="168" posY="0" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="13" gridHeight="1" gridWidth="8" hidden="true" name="rsec_cliente" posX="176" posY="0" tabIndex="-1" title="edit2" widget="Edit"/>
<Edit fieldId="14" gridHeight="1" gridWidth="8" hidden="true" name="bodega" posX="184" posY="0" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="16" gridHeight="1" gridWidth="8" hidden="true" name="bodega_destino" posX="192" posY="0" tabIndex="-1" title="edit2" widget="Edit"/>
</Table>
</Grid>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewA1ADMAYwA5ADEANgA5AGEALQBlADcAOAA1AC0ANAA1AGUAMQAtADgAMQAwAGMALQBhAGYAZABjADkAZgBkAGQANAAwAGEAYQB9QFFmZqNMzS9AKZmZ8zMzwwAAAAAAAAAAAQAAAEwAewAyADcAYgBmADEAZQA3ADEALQA2AGQANQBlAC0ANABkAGIAZAAtADgAMAA3AGMALQA0ADEAYwAyAGUAOABmADIANwA1AGUAZQB9AAAAAAAAAAAAAAAAAAAAAD9QYk3S8an8AQ==]]>
</DiagramLayout>
</ManagedForm>
+438
View File
@@ -0,0 +1,438 @@
{
PROGRAMA: irautorizareq
OBJETIVO: Mostrar al usuario las requisiciones autorizadas
FECHA : Mayo 9, 2022
}
GLOBALS "irprgb000.4gl"
DEFINE
r INT,
arr_busqueda1 DYNAMIC ARRAY OF RECORD
procesar VARCHAR(3),
estado VARCHAR(20),
idestado INT,
num_oc INT,
tipo_documento VARCHAR(100),
numeroid INT,
fecha DATE,
nombre, observacion1, origen, destino, usuario VARCHAR(100),
vendedor VARCHAR(100),
archivo VARCHAR(200),
cod_mov1 INT,
us_crea VARCHAR(50),
rtipo_cliente, rsec_cliente, bodega, bodega_destino INT
END RECORD,
nombreusuario, email, vendedor VARCHAR(100),
tienedespiece BOOLEAN,
cuentaimp INT
DEFINE despiece1 DYNAMIC ARRAY OF RECORD
id_etiqueta SMALLINT,
cod_n SMALLINT,
cod_grupo SMALLINT,
cod_tipo SMALLINT,
cod_sec SMALLINT,
lado_1 DEC(12, 5),
lado_2 DEC(12, 5),
lado_3 DEC(12, 5),
cantidad DEC(12, 5),
medida DEC(12, 5),
secuencia, id_despiece INT,
bodega SMALLINT
END RECORD
DEFINE curr INT
FUNCTION irautorizadas(xusuario)
DEFINE
data RECORD
rnumeroDoc,
rcodMov,
rtipo_cliente,
num_oc,
tipo_cliente,
sec_cliente,
bodega,
bodega_destino
INT,
nombre VARCHAR(100)
END RECORD,
xusuario VARCHAR(50)
CALL arr_busqueda1.clear()
INITIALIZE curr TO NULL
CALL buscadataReq(xusuario)
IF r = 1 THEN
RETURN data.*
END IF
OPEN WINDOW w1 WITH FORM "irautorizareq"
INPUT ARRAY arr_busqueda1
FROM sbusqueda.*
ATTRIBUTE(WITHOUT DEFAULTS, UNBUFFERED)
BEFORE INPUT
DISPLAY 'REQUISICIONES TRANSACCIONES AUTORIZADAS' TO etiqueta
CALL DIALOG.setActionActive("accept", FALSE)
{ BEFORE ROW
LET r = arr_curr()
IF arr_busqueda1[r].archivo IS NULL THEN
CALL DIALOG.setActionActive( "tfile", FALSE )
ELSE
CALL DIALOG.setActionActive( "tfile", TRUE )
END IF}
CALL estadosprocesos(1)
ON ACTION tfile
LET r = arr_curr()
IF arr_busqueda1[r].archivo IS NOT NULL THEN
CALL ui.Interface.frontCall(
"standard", "launchURL", [arr_busqueda1[r].archivo], [])
END IF
ON ACTION imprimir ATTRIBUTE(TEXT = "Imprimir", IMAGE = "printer")
IF arr_busqueda1[arr_curr()].numeroid > 0 THEN
CALL buscadoc(
arr_busqueda1[arr_curr()].numeroid,
arr_busqueda1[arr_curr()].cod_mov1)
LET data.rnumeroDoc = arr_busqueda1[arr_curr()].numeroid
LET data.rcodMov = arr_busqueda1[arr_curr()].cod_mov1
LET data.rtipo_cliente = arr_busqueda1[arr_curr()].rtipo_cliente
LET data.sec_cliente = arr_busqueda1[arr_curr()].rsec_cliente
LET data.nombre = arr_busqueda1[arr_curr()].nombre
LET data.num_oc = arr_busqueda1[arr_curr()].num_oc
LET data.bodega = arr_busqueda1[arr_curr()].bodega
LET data.bodega_destino =
arr_busqueda1[arr_curr()].bodega_destino
LET nombreUsuario = arr_busqueda1[arr_curr()].usuario
DISPLAY data.*
DISPLAY nombreUsuario
CALL impdocumento()
END IF
ON ACTION procesar ATTRIBUTE(TEXT = "Procesa", IMAGE = "")
LET curr = arr_curr()
IF arr_busqueda1[curr].numeroid > 0 THEN
LET data.rnumeroDoc = arr_busqueda1[curr].numeroid
LET data.rcodMov = arr_busqueda1[curr].cod_mov1
LET data.rtipo_cliente = arr_busqueda1[curr].rtipo_cliente
LET data.sec_cliente = arr_busqueda1[curr].rsec_cliente
LET data.nombre = arr_busqueda1[curr].nombre
LET data.num_oc = arr_busqueda1[curr].num_oc
LET data.bodega = arr_busqueda1[curr].bodega
LET data.bodega_destino = arr_busqueda1[curr].bodega_destino
EXIT INPUT
END IF
ON CHANGE observacion1
IF arr_busqueda1[arr_curr()].numeroid > 0 THEN
UPDATE irtb00057
SET observacion = arr_busqueda1[arr_curr()].observacion1,
us_mod = usuarios,
fech_mod = getdate()
WHERE numero_doc = arr_busqueda1[arr_curr()].numeroid
END IF
ON CHANGE idestado
IF arr_busqueda1[arr_curr()].numeroid > 0 THEN
UPDATE irtb00057
SET idestado = arr_busqueda1[arr_curr()].idestado,
observacion = arr_busqueda1[arr_curr()].observacion1,
us_mod = usuarios,
fech_mod = getdate()
WHERE numero_doc = arr_busqueda1[arr_curr()].numeroid
END IF
AFTER INPUT
IF int_flag THEN
LET data.rnumeroDoc = NULL
LET data.rcodMov = NULL
LET data.rtipo_cliente = NULL
LET data.sec_cliente = NULL
LET data.nombre = NULL
LET data.num_oc = NULL
LET data.bodega = NULL
LET data.bodega_destino = NULL
LET int_flag = FALSE
END IF
EXIT INPUT
END INPUT
CLOSE WINDOW w1
RETURN data.*
END FUNCTION
FUNCTION buscadataReq(pusuario)
DEFINE pusuario VARCHAR(50)
DECLARE buscar CURSOR FOR
SELECT ' ',
b.estado,
b.idestado,
b.num_oc,
CAST(a.cod_mov AS VARCHAR(10)) || ' ' || a.descrip_mov,
b.numero_doc,
b.fecha,
'',
b.observacion,
(SELECT p1.descripcion
FROM intb00009 p1
WHERE p1.cod_bodega = b.bodega)
AS ORIGEN,
(SELECT p2.descripcion
FROM intb00009 p2
WHERE p2.cod_bodega = b.bodega_destino),
' ',
' '
,
b.url_destino,
b.cod_mov,
b.us_crea,
'0',
'0',
b.bodega,
b.bodega_destino
FROM irtb00005 a,
irtb00057 b
INNER
JOIN irtb00048 d
ON d.bodega = b.bodega AND d.usuario = pusuario
WHERE a.cod_mov = b.cod_mov
AND b.estado = 'AUTORIZADA'
AND b.status_t IS NULL
LET r = 1
CALL arr_busqueda1.clear()
FOREACH buscar INTO arr_busqueda1[r].*
CALL usuarioSistema(
arr_busqueda1[r].us_crea)
RETURNING nombreUsuario, email
LET arr_busqueda1[r].usuario = nombreUsuario
LET r = r + 1
END FOREACH
END FUNCTION
FUNCTION buscadoc(numid, codmov)
DEFINE numid, codmov INT
LET vendedor = NULL
SELECT a.numero_Doc,
a.cod_mov,
a.fecha,
a.num_oc,
a.tipo_cliente,
a.sec_cliente,
a.nombre,
a.bodega,
a.bodega_destino,
a.estado,
a.url_destino,
a.observacion,
b.descrip_mov,
c.descripcion
INTO p_irtb57.numero_doc,
p_irtb57.cod_mov,
p_irtb57.fecha,
p_irtb57.num_oc,
p_irtb57.tipo_cliente,
p_irtb57.sec_cliente,
p_irtb57.cliente,
p_irtb57.bodega,
p_irtb57.bodega_destino,
p_irtb57.estado,
p_irtb57.url_file,
p_irtb57.observacion,
nombreMov,
nombreBodega
FROM irtb00057 a INNER JOIN irtb00005 b ON b.cod_mov = a.cod_mov
INNER
JOIN intb00009 c
ON c.cod_bodega = a.bodega
#-> Se eliminaron los JOIN a prtb00012 y adtb00003: una requisicion de
# REPUESTOS no puede tener orden de pedido de cliente ni nada de ventas,
# y el join por sec_vend rompia la consulta (-4104 f.sec_vend).
WHERE a.numero_doc = numid AND a.cod_mov = codmov
#BODEGA DESTINO
IF p_irtb57.bodega_destino IS NOT NULL THEN
SELECT a.descripcion
INTO nombreBodegaDestino
FROM intb00009 a
WHERE a.cod_bodega = p_irtb57.bodega_destino
END IF
DECLARE buscardetalle CURSOR FOR
SELECT a.area,
a.cod_n,
a.cod_grupo,
a.cod_tipo,
a.cod_sec,
a.descripcion,
a.unidad_med,
a.cantidad_1,
a.cantidad_2,
c.id_etiqueta,
c.lado_1,
c.lado_2,
c.lado_3,
c.cantidad,
c.medida
FROM irtb00058 a
LEFT OUTER
JOIN irtb00060 c
ON c.cod_n = a.cod_n
AND c.cod_grupo = a.cod_grupo
AND c.cod_tipo = a.cod_tipo
AND c.cod_sec = a.cod_Sec
AND c.id_despiece = a.numero_Doc
WHERE a.numero_Doc = numid AND a.cod_mov = codmov
LET idx = 1
CALL arr_irtb58.clear()
LET tienedespiece = FALSE
FOREACH buscardetalle
INTO arr_irtb58[idx].area,
arr_irtb58[idx].cod_n,
arr_irtb58[idx].cod_grupo,
arr_irtb58[idx].cod_tipo,
arr_irtb58[idx].cod_sec,
arr_irtb58[idx].descripcion,
arr_irtb58[idx].unidad_med,
arr_irtb58[idx].cantidad_1,
arr_irtb58[idx].cantidad,
#arr_irtb58[idx].factor_conv,
despiece1[idx].id_etiqueta,
despiece1[idx].lado_1,
despiece1[idx].lado_2,
despiece1[idx].lado_3,
despiece1[idx].cantidad,
despiece1[idx].medida
IF despiece1[idx].cantidad > 0 THEN
LET tienedespiece = TRUE
ELSE
LET tienedespiece = FALSE
END IF
LET idx = idx + 1
END FOREACH
END FUNCTION
FUNCTION impdocumento()
DEFINE
idx_l INT,
xcodigo VARCHAR(50)
LET r_filename = "irprmt020_1.4rp"
IF fgl_report_loadCurrentSettings(r_filename) THEN -- load the .4rp file
LET r_output = "PDF"
LET preview = 1
CALL fgl_report_selectDevice(r_output) -- changing default
CALL fgl_report_selectPreview(preview) -- changing default
LET handler = fgl_report_commitCurrentSettings() -- commit changes
ELSE
RETURN
END IF
START REPORT requiere TO XML HANDLER HANDLER
FOR idx = 1 TO arr_irtb58.getLength()
IF arr_irtb58[idx].cod_Sec IS NOT NULL THEN
LET xcodigo =
arr_irtb58[idx].cod_n USING '&&&&&',
'-',
arr_irtb58[idx].cod_grupo USING '&&&&&',
'-',
arr_irtb58[idx].cod_tipo USING '&&&&&&',
'-',
arr_irtb58[idx].cod_sec USING '&&&&&&&'
OUTPUT TO REPORT requiere(
p_irtb57.*, arr_irtb58[idx].*, despiece1[idx].*, xcodigo)
END IF
END FOR
FINISH REPORT requiere
END FUNCTION
REPORT requiere(x, detalle, xdespiece, codigo)
DEFINE
hora STRING,
detalle RECORD
area INT,
cod_n, cod_grupo, cod_tipo, cod_sec INT,
descripcion VARCHAR(100),
unidad_med VARCHAR(4),
cantidad_1, cantidad, cantidad_o1, cantidad1, factor_conv DEC(12, 5)
END RECORD,
xdespiece RECORD
id_etiqueta SMALLINT,
cod_n SMALLINT,
cod_grupo SMALLINT,
cod_tipo SMALLINT,
cod_sec SMALLINT,
lado_1 DEC(12, 5),
lado_2 DEC(12, 5),
lado_3 DEC(12, 5),
cantidad DEC(12, 5),
medida DEC(12, 5),
secuencia, id_despiece INT,
bodega SMALLINT
END RECORD,
codigo VARCHAR(50),
x RECORD
numero_doc INT,
cod_mov SMALLINT,
fecha DATE,
num_oc INT,
orden_trabajo INT,
observacion VARCHAR(200),
tipo_cliente SMALLINT,
sec_cliente INT,
cliente VARCHAR(100),
bodega SMALLINT,
bodega_destino SMALLINT,
estado VARCHAR(50),
ruta_documento, url_file VARCHAR(250),
idstado VARCHAR(60)
END RECORD,
etiqueta VARCHAR(100),
total_cantidad, total_medida DEC(12, 5)
ORDER BY codigo
FORMAT
FIRST PAGE HEADER
SELECT a.nombre INTO p_companias.nombre FROM companias a
LET hora = CURRENT
PRINTX p_companias.nombre,
hora,
x.*,
nombreMov,
nombreBodega,
nombreBodegaDestino,
nombreUsuario,
vendedor
BEFORE GROUP OF codigo
PRINTX dEtalle.*
ON EVERY ROW
SELECT a.descripcion
INTO etiqueta
FROM vetb00026 a
WHERE a.codid = xdespiece.id_etiqueta
LET total_cantidad = total_cantidad + xdespiece.cantidad
PRINTX codigo,
xdespiece.*,
tienedespiece,
etiqueta,
total_cantidad,
total_medida
END REPORT
+103
View File
@@ -0,0 +1,103 @@
#-----------------------------------------------------------------------------
# irbuscaprod.4gl
# busca_prod() tomada de PROYECTOS/otrodir/funciones.4gl (3.20), que es la que
# enlazaba irprmt020. Va aparte porque funciones_ip.4gl redefine bodegas()
# y disponibles(), ya presentes en la libreria FUNCIONES.
#-----------------------------------------------------------------------------
FUNCTION busca_prod(pinventario)
DEFINE
arr_prod DYNAMIC ARRAY OF RECORD
cod_n INTEGER,
cod_grupo INTEGER,
cod_tipo INTEGER,
cod_sec INTEGER,
descrip_esp CHAR(50),
unidad_med CHAR(4),
existencia1 DEC(18, 4),
cantidad_o DEC(18, 4),
cantidad_c DEC(18, 4),
existencia DEC(18, 4)
END RECORD,
selec_pt, criterio STRING,
f, pinventario, idx SMALLINT,
pcodn, pcodgrupo, pcodtipo, pcodsec INT,
pdescripcion CHAR(100)
OPEN WINDOW busca_2
AT 8, 4
WITH FORM "vefmwd100"
ATTRIBUTE(BORDER, FORM LINE FIRST + 1, PROMPT LINE LAST)
CONSTRUCT criterio
ON a.cod_n, a.cod_grupo, a.cod_tipo, a.descrip_esp
FROM cod_n, cod_grupo, cod_tipo, descrip_esp
IF pinventario = '02' THEN
LET selec_pt =
"SELECT a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.descrip_esp,a.unidad_med,SUM(b.cantidad_2),'0','0',SUM(b.cantidad_2) ",
" FROM iptb00002 AS a INNER JOIN iptb00001 AS c ON a.cod_n = c.cod_n AND a.cod_grupo = c.cod_grupo AND ",
" a.cod_tipo = c.cod_tipo and a.cod_Sec = c.cod_Sec LEFT OUTER JOIN ",
" iptb00006 AS b ON a.cod_n = b.cod_n AND a.cod_grupo = b.cod_grupo AND ",
" a.cod_tipo = b.cod_tipo AND a.cod_sec = b.cod_sec AND b.status_t IS NULL ",
" WHERE a.status_t IS NULL AND ",
CRITERIO CLIPPED,
" GROUP BY a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.descrip_esp,a.unidad_med ",
" ORDER BY a.descrip_esp "
END IF
IF pinventario = '01' THEN
LET selec_pt =
"SELECT a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.descrip_esp,a.unidad_med,'0','0','0',SUM(b.cantidad_2) ",
" FROM intb00001 AS a ",
" LEFT OUTER JOIN ",
" intb00006 AS b ON a.cod_n = b.cod_n AND a.cod_grupo = b.cod_grupo AND ",
" a.cod_tipo = b.cod_tipo AND a.cod_sec = b.cod_sec AND b.status_t IS NULL ",
" WHERE a.status_t IS NULL AND ",
CRITERIO CLIPPED,
" GROUP BY a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.descrip_esp,a.unidad_med ",
" ORDER BY a.descrip_esp "
END IF
IF pinventario = '03' THEN
LET selec_pt =
"SELECT a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.descrip_esp,a.unidad_med,'0','0','0',SUM(b.cantidad_2) ",
" FROM irtb00002 AS a ",
" LEFT OUTER JOIN ",
" irtb00006 AS b ON a.cod_n = b.cod_n AND a.cod_grupo = b.cod_grupo AND ",
" a.cod_tipo = b.cod_tipo AND a.cod_sec = b.cod_sec AND b.status_t IS NULL ",
" WHERE a.status_t IS NULL AND ",
CRITERIO CLIPPED,
" GROUP BY a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.descrip_esp,a.unidad_med ",
" ORDER BY a.descrip_esp "
END IF
IF int_flag THEN
LET Int_flag = FALSE
CLOSE WINDOW busca_2
RETURN pcodn, pcodgrupo, pcodtipo, pcodsec, pdescripcion
END IF
PREPARE comando_p FROM selec_pt
DECLARE busca_2 CURSOR FOR comando_p
LET idx = 1
FOREACH busca_2 INTO arr_prod[idx].*
LET idx = idx + 1
END FOREACH
CALL SET_COUNT(idx - 1)
DISPLAY ARRAY arr_prod TO s_prod.*
AFTER ROW
LET idx = arr_curr()
LET pcodn = arr_prod[idx].cod_n
LET pcodgrupo = arr_prod[idx].cod_grupo
LET pcodtipo = arr_prod[idx].cod_tipo
LET pcodsec = arr_prod[idx].cod_sec
LET pdescripcion = arr_prod[idx].descrip_esp
AFTER DISPLAY
EXIT DISPLAY
END DISPLAY
CLOSE WINDOW busca_2
RETURN pcodn, pcodgrupo, pcodtipo, pcodsec, pdescripcion
END FUNCTION
+73
View File
@@ -0,0 +1,73 @@
{----------------------------------------------------------------------------
AUTOR: JUAN FCO SOTO
FECHA:
DECRIPCION: FORMATO DE PANTALLA PARA EL REPORTE DE ENTRADA
MODIFICA: ING. JOSE ALFREDO PAULINO
FECHA: 15 DE OCTUBRE DEL 1992
DESCRIPCION: ADAPTACION PARA SISTEMA DE INVENTARIO DE HERRAMIENTAS
----------------------------------------------------------------------------
}
database smarmotech
screen size 24 by 80
{
Tipo Movimiento:[t ][t1 ]Doc. No. [f00 ]
\gp-------------------------------------------------------------------------q\g
\g|\gSuplidor:[p1]-[f01 ][a ] Orden de Compra:[f02 ] \g|\g
\gp-------------------------------------------------------------------------q\g
\g|\gConduce:[f03 ] Factura No.[f04 ] Fecha:[f05 ] \g|\g
\gb-------------------------------------------------------------------------d\g
C A N T I D A D Exceso o
Codigo Ordenada Recibida Diferencia Maquina
\gp---------------------------------------------------------------------------q\g
[b ] [f06 ][f07 ][c ] [ma ]
Descripcion: [g ] Unidad: [f08]
[b ] [f06 ][f07 ][c ] [ma ]
Descripcion: [g ] Unidad: [f08]
[b ] [f06 ][f07 ][c ] [ma ]
Descripcion: [g ] Unidad: [f08]
\gb---------------------------------------------------------------------------d\g
}
end
tables
irtb00006,
cotb00001,
irtb00002,
irtb00005
attributes
ma = irtb00006.maquina,noentry;
f00 = irtb00006.num_doc,
comments =
"Digite el Numero Documento o Presione <Esc> Para Buscar Todos Los Documentos";
p1 = irtb00006.cod_sp,picture = "##",autonext,
comments = "Digite el Codigo del Suplidor";
f01 = irtb00006.cod_sp_sec,picture = "####",
comments = "Digite el Codigo del Suplidor";
f02 = irtb00006.orden_compra,
comments = "Digite el Numero de la Orden de Compras";
f03 = irtb00006.conduce_no,
comments = "Digite el Numero del Conduce Del Suplidor, Si Tiene Conduce";
f04 = irtb00006.fact_no,
comments = "Digite el Numero de la Factura del Suplidor";
f05 = formonly.fecha type date,format = "dd/mm/yy",
comments = "Digite la Fecha Correspondiente al Documento";
f06 = irtb00006.cantidad_1,
comments = "Digite la Cantidad Pedida ";
f07 = irtb00006.cantidad_2,
comments = "Digite la Cantidad Llegada desde el Suplidor";
f08 = irtb00002.unidad_med,noentry;
a = cotb00001.nom_sp,noentry;
b = formonly.codigo,noentry;
c = formonly.diferencia, noentry;
g = irtb00002.descrip_esp,noentry;
t = irtb00006.cod_mov,autonext,
comments =
"Digite Codigo Movimiento de Entrada (01 - Local 02 - Exterior)",
include = (1 to 2);
t1 = irtb00005.descrip_mov,noentry;
INSTRUCTIONS
screen record s_movi1[3] (codigo,cantidad_1,cantidad_2,diferencia,
descrip_esp,unidad_med,maquina)
delimiters " "
end
+54
View File
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="3140a" name="ManagedForm" uid="{dd59fb30-d0b5-4490-b587-2cc3cc312bca}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record name="s_csmov" uid="{230d7094-d690-402f-8eb3-942bd8824ff7}">
<RecordField colName="num_doc" fieldIdRef="9" fieldType="TABLE_COLUMN" name="irtb00006.num_doc" sqlTabName="irtb00006" uid="{eb6224e5-535c-426d-869e-c418679eacc4}"/>
<RecordField colName="fecha" fieldIdRef="10" name="fecha" sqlTabName="formonly" sqlType="DATE" uid="{206d6ae2-e032-4e66-b1f1-724400b02250}"/>
<RecordField colName="descrip_mov" fieldIdRef="6" name="descrip_mov" sqlTabName="formonly" uid="{241a0b1b-8462-482b-86ea-037f5d783566}"/>
<RecordField colName="entrada" fieldIdRef="11" name="entrada" precisionDecimal="8" scaleDecimal="2" sqlTabName="formonly" sqlType="DECIMAL" uid="{9dabc2c5-68ea-46b2-a363-f8caa3f2aec8}"/>
<RecordField colName="salida" fieldIdRef="12" name="salida" precisionDecimal="8" scaleDecimal="2" sqlTabName="formonly" sqlType="DECIMAL" uid="{38989fa1-e97a-46ad-bd0e-ef8bf9c8855d}"/>
<RecordField colName="balance" fieldIdRef="13" name="balance" precisionDecimal="8" scaleDecimal="2" sqlTabName="formonly" sqlType="DECIMAL" uid="{f93c6d21-07b3-468b-80a4-72f6d6054ed0}"/>
</Record>
<Record name="record1" uid="{765f73d4-1fc3-4130-afe9-f5d8bbd2de4c}">
<RecordField colName="cod_n" fieldIdRef="0" fieldType="TABLE_COLUMN" name="irtb00002.cod_n" sqlTabName="irtb00002" uid="{eee9c7fc-c6ee-4527-bc66-83e9c0dc1f2d}"/>
<RecordField colName="cod_grupo" fieldIdRef="1" fieldType="TABLE_COLUMN" name="irtb00002.cod_grupo" sqlTabName="irtb00002" uid="{6a4b6f86-cd33-4aad-924e-176fcbda0c89}"/>
<RecordField colName="cod_tipo" fieldIdRef="2" fieldType="TABLE_COLUMN" name="irtb00002.cod_tipo" sqlTabName="irtb00002" uid="{9dbd63af-a697-4d90-93db-ff6263ecc0d8}"/>
<RecordField colName="cod_sec" fieldIdRef="3" fieldType="TABLE_COLUMN" name="irtb00002.cod_sec" sqlTabName="irtb00002" uid="{4883450b-42b9-4261-a6ec-3d6748c79de4}"/>
<RecordField colName="descrip_esp" fieldIdRef="4" fieldType="TABLE_COLUMN" name="irtb00002.descrip_esp" sqlTabName="irtb00002" uid="{67f657ff-2796-4089-b5f9-3e4e135008de}"/>
<RecordField colName="unidad_med" fieldIdRef="5" fieldType="TABLE_COLUMN" name="irtb00002.unidad_med" sqlTabName="irtb00002" uid="{ecfc9067-7f22-4306-9a4a-8c502a1fcb7f}"/>
<RecordField colName="fech_in" fieldIdRef="7" name="fech_in" sqlTabName="formonly" sqlType="DATE" uid="{496e134d-39b6-46a3-b7ac-cfd50d75d1e8}"/>
<RecordField colName="fech_fi" fieldIdRef="8" name="fech_fi" sqlTabName="formonly" sqlType="DATE" uid="{9c746d9a-0796-43b0-83f4-e21b8cb8b384}"/>
</Record>
<Form gridHeight="13" gridWidth="82" name="irfmcs006" text="CONSULTA TRANSACCIONES REPUESTOS">
<Grid gridHeight="13" gridWidth="82" name="grid1" posX="0" posY="0">
<Group gridHeight="4" gridWidth="80" name="group1" posX="2" posY="0">
<Label gridHeight="1" gridWidth="15" name="label1" posX="1" posY="1" text="Codigo Repuesto"/>
<Label gridHeight="1" gridWidth="1" name="label2" posX="18" posY="1" text=":"/>
<Edit autoNext="true" colName="cod_n" fieldId="0" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="irtb00002.cod_n" posX="20" posY="1" sqlTabName="irtb00002" tabIndex="1" widget="Edit"/>
<Edit autoNext="true" colName="cod_grupo" fieldId="1" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="irtb00002.cod_grupo" posX="25" posY="1" sqlTabName="irtb00002" tabIndex="2" widget="Edit"/>
<Edit autoNext="true" colName="cod_tipo" fieldId="2" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="irtb00002.cod_tipo" posX="30" posY="1" sqlTabName="irtb00002" tabIndex="3" widget="Edit"/>
<Edit autoNext="true" colName="cod_sec" fieldId="3" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="4" name="irtb00002.cod_sec" posX="35" posY="1" sqlTabName="irtb00002" tabIndex="4" widget="Edit"/>
<Edit colName="descrip_esp" fieldId="4" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="31" name="irtb00002.descrip_esp" noEntry="true" posX="41" posY="1" sqlTabName="irtb00002" tabIndex="5" widget="Edit"/>
<Edit colName="unidad_med" fieldId="5" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="irtb00002.unidad_med" noEntry="true" posX="75" posY="1" sqlTabName="irtb00002" tabIndex="6" widget="Edit"/>
<Label gridHeight="1" gridWidth="13" name="label3" posX="1" posY="2" text="Fecha Inicial"/>
<Label gridHeight="1" gridWidth="1" name="label4" posX="18" posY="2" text=":"/>
<DateEdit colName="fech_in" fieldId="7" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="fech_in" posX="20" posY="2" sqlTabName="formonly" sqlType="DATE" tabIndex="7" widget="DateEdit"/>
<Label gridHeight="1" gridWidth="12" name="label5" posX="32" posY="2" text="Fecha Final:"/>
<DateEdit colName="fech_fi" fieldId="8" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="fech_fi" posX="45" posY="2" sqlTabName="formonly" sqlType="DATE" tabIndex="8" widget="DateEdit"/>
</Group>
<Table gridHeight="9" gridWidth="81" name="table1" posX="1" posY="4" totalRows="8" unitWidth="characters" width="81">
<Edit colName="fecha" fieldId="10" format="dd/mm/yy" gridHeight="1" gridWidth="8" name="fecha" posX="0" posY="0" sqlTabName="formonly" sqlType="DATE" tabIndex="9" title="FECHA" widget="Edit"/>
<Edit colName="num_doc" fieldId="9" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="6" name="irtb00006.num_doc" posX="8" posY="0" sqlTabName="irtb00006" tabIndex="10" title="DOCUMENTO" widget="Edit"/>
<Edit colName="descrip_mov" fieldId="6" gridHeight="1" gridWidth="33" name="descrip_mov" posX="14" posY="0" sqlTabName="formonly" tabIndex="11" widget="Edit"/>
<Edit colName="entrada" fieldId="11" gridHeight="1" gridWidth="6" name="entrada" posX="47" posY="0" precisionDecimal="8" scaleDecimal="2" sqlTabName="formonly" sqlType="DECIMAL" tabIndex="12" title="ENTRADAS" widget="Edit"/>
<Edit colName="salida" fieldId="12" gridHeight="1" gridWidth="6" name="salida" posX="53" posY="0" precisionDecimal="8" scaleDecimal="2" sqlTabName="formonly" sqlType="DECIMAL" tabIndex="13" title="SALIDAS" widget="Edit"/>
<Edit colName="balance" fieldId="13" gridHeight="1" gridWidth="7" name="balance" posX="59" posY="0" precisionDecimal="8" scaleDecimal="2" sqlTabName="formonly" sqlType="DECIMAL" tabIndex="14" title="BALANCE" widget="Edit"/>
</Table>
</Grid>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewA3ADYANQBmADcAMwBkADQALQAxAGYAYwAzAC0ANAAxADMAMAAtAGEAZgBlADkALQBmADUAZAA4AGIAYgBkADIAZABlADQAYwB9QCqqqrgAAABAKqqquAAAAAAAAAAAAAAAAQAAAEwAewAyADMAMABkADcAMAA5ADQALQBkADYAOQAwAC0ANAAwADIAZgAtADgAZQBiADMALQA5ADQAMgBiAGQAOAA4ADIANABmAGYANwB9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ==]]>
</DiagramLayout>
</ManagedForm>
+101
View File
@@ -0,0 +1,101 @@
schema smarmotech
TOPMENU
GROUP g1 (TEXT="CONTEO FISICO")
COMMAND actualizarf (TEXT="Actualizacion Conteo PDA")
COMMAND Eliminarf (TEXT="Eliminar Conteo",IMAGE="cancel")
END
GROUP g2 (TEXT="INVENTARIO FISICO")
COMMAND actualizari (TEXT="Actualiza inventario",IMAGE="pda")
COMMAND eliminari (TEXT="Eliminar Inventario Fisico",IMAGE="cancel")
COMMAND imprimir (TEXT="Impresion",IMAGE="printer")
END
GROUP g3 (TEXT="DOCUMENTO")
COMMAND actualizard (TEXT="Actualziacion Documento")
COMMAND eliminard (TEXT="Eliminar Documento",IMAGE="cancel")
END
GROUP g4 (TEXT="Interrumpir")
COMMAND salir (TEXT="Salir Sistema",IMAGE="exit")
END
END
LAYOUT (TEXT="Visualizacion Conteo y Ajuste",STYLE="Basic")
GRID
{
<G Encabezado >
Fecha Conteo : [f1 ] Busca Fecha Conteo[fb ]
Numero Documento Ajuste: [doc ]Fecha Documento:[fd ]No. Registros: [no ]
Codigo Movimiento : [cod ][DESc ]
TIPO INVENTARIO : [tp ] Registros Sumarizados [rs ]
ALMACEN : [al ] Incluye Registros
SECCION : [se ] Que no esten en el conteo[ii ]
TRAMO O FILA : [fila ] Igualo Existencia En
Libro a Fisica? [fs ]
0 50 100
[p000 ]
<G Detalle >
<t >
[a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ]
[a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ]
[a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ]
[a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ]
[a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ]
[a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ]
[a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ]
[a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ]
[a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ]
[a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ]
TOTAL AJUSTE [t1 ]
TOTAL FISICO[tf ]TOTAL TEORICO[fi ]
}
END
attributes
PROGRESSBAR p000 = formonly.progreso,VALUEMIN=0,VALUEMAX=100,COLOR=GREEN;
doc= formonly.num_doc;
COMBOBOX fb = formonly.busca_fecha;
DATEEDIT fd = formonly.fecha_doc type date,format="dd/mm/yyyy";
DATEEDIT f1 = formonly.xfecha type date,format="dd/mm/yyyy" ;
COD = formonly.cod_mov;
desc = formonly.descrip_mov;
CHECKBOX rs = formonly.sumarizo type char,NOT NULL,VALUECHECKED="S",VALUEUNCHECKED="N",default="N";
CHECKBOX ii = formonly.incluye type char,NOT NULL,VALUECHECKED="S",VALUEUNCHECKED="N",default="N";
CHECKBOX fs = formonly.igualo type char,NOT NULL,VALUECHECKED="S",VALUEUNCHECKED="N",default="N";
COMBOBOX tp = formonly.tipo_inventario,include = ("MATERIA PRIMA","PRODUCTOS TERMINADOS","REPUESTOS");
COMBOBOX al = formonly.almacen;
COMBOBOX se = formonly.seccion;
COMBOBOX fila = formonly.tramo;
a = formonly.cod_n, UNSORTABLE, TITLE="CLASE";
b = formonly.cod_grupo,UNSORTABLE, TITLE="GRUPO";
c = formonly.cod_tipo, UNSORTABLE,TITLE = "TIPO";
d = formonly.cod_sec, UNSORTABLE,TITLE = "SECUENCIA";
de = formonly.descripcion, NOENTRY,TITLE="DESCRIPCION";
u = formonly.unidad_med, NOENTRY,TITLE="UNIDAD MEDIDA";
c1 = formonly.fisico, TITLE = "FISICO",FORMAT="###,###.#####";
c2 = formonly.teorico, UNSORTABLE,TITLE ="TEORICO",noentry,FORMAT="---,--#.#####";
d1 = formonly.diferencia, UNSORTABLE,TITLE="DIFERENCIA",noentry,FORMAT="---,--#.#####";
p1 = formonly.costo, UNSORTABLE,TITLE ="COSTO",noentry,FORMAT="###,###.####";
v1 = formonly.valor1, UNSORTABLE,TITLE="VALOR",noentry,FORMAT="---,---,--#.##";
v2 = formonly.valor2, UNSORTABLE,TITLE="VALOR DIF",noentry,FORMAT="-,---,--#.##";
t1 = formonly.total2, FORMAT="---,---,--#.##";
u1 = formonly.usuario,UNSORTABLE,noentry;
f11 = formonly.fechacrea,UNSORTABLE,noentry;
no = formonly.numero_registros,UNSORTABLE,noentry;
z1 = formonly.bodega,UNSORTABLE,noentry,TITLE="bodega";
z2 = formonly.cod_seccion,UNSORTABLE,noentry,TITLE="SECCION";
z3 = formonly.cod_tramo,UNSORTABLE,noentry,TITLE="TRAMO O FILA";
kj = formonly.trxid,UNSORTABLE,noentry;
fi = formonly.total_teorico,FORMAT="--,---,---,--#.##";
tf = formonly.total_fisico,FORMAT="--,---,---,--#.##";
INSTRUCTIONS
DELIMITERS " "
SCREEN RECORD sconteo[10](cod_n,cod_grupo,cod_tipo,cod_Sec,descripcion,unidad_med,fisico,teorico,diferencia,costo,valor1,valor2,usuario,fechacrea,bodega,cod_seccion,cod_tramo,trxid)
END
+172
View File
@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="3140a" name="ManagedForm" uid="{b959d81b-cf8b-43f1-a439-ab4f31f8add2}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record name="record1" uid="{e40936dd-27f0-4a7b-bb08-43e0ff8c9c04}">
<RecordField colName="cod_n" fieldIdRef="0" fieldType="TABLE_COLUMN" name="irtb00002.cod_n" sqlTabName="irtb00002" uid="{4233f8fd-6c26-4796-9e12-5805ed4a92e8}"/>
<RecordField colName="cod_grupo" fieldIdRef="1" fieldType="TABLE_COLUMN" name="irtb00002.cod_grupo" sqlTabName="irtb00002" uid="{8b065012-c46d-452d-ace5-177200da41c7}"/>
<RecordField colName="cod_tipo" fieldIdRef="2" fieldType="TABLE_COLUMN" name="irtb00002.cod_tipo" sqlTabName="irtb00002" uid="{b532ac2b-d690-48f9-b50f-c4cd565c762a}"/>
<RecordField colName="cod_sec" fieldIdRef="3" fieldType="TABLE_COLUMN" name="irtb00002.cod_sec" sqlTabName="irtb00002" uid="{791144be-be21-4d3a-a9c9-c947b7f62ca9}"/>
<RecordField colName="descrip_esp" fieldIdRef="8" name="descrip_esp" sqlTabName="formonly" uid="{c2efbcec-8232-42a5-a614-06fc7933f114}"/>
<RecordField colName="descrip_ing" fieldIdRef="9" name="descrip_ing" sqlTabName="formonly" uid="{7ebae860-8b94-4f67-8a15-807c5a2971ac}"/>
<RecordField colName="unidad_med" fieldIdRef="10" name="unidad_med" sqlTabName="formonly" uid="{ecf1d866-9a58-4127-a555-7623d41e9cb9}"/>
<RecordField colName="existencia" fieldIdRef="4" fieldType="TABLE_COLUMN" name="irtb00002.existencia" sqlTabName="irtb00002" uid="{1f6a722f-5e4d-40f7-a21f-7a92b29be64c}"/>
<RecordField colName="exist_min" fieldIdRef="5" fieldType="TABLE_COLUMN" name="irtb00002.exist_min" sqlTabName="irtb00002" uid="{9f906283-9753-4a74-9545-516e6eb049be}"/>
<RecordField colName="dia_llegada" fieldIdRef="6" fieldType="TABLE_COLUMN" name="irtb00002.dia_llegada" sqlTabName="irtb00002" uid="{83746c52-07b8-4bc8-b351-2227a4e43251}"/>
<RecordField colName="categoria" fieldIdRef="7" fieldType="TABLE_COLUMN" name="irtb00002.categoria" sqlTabName="irtb00002" uid="{f97f1829-3634-4393-b5ed-0d5661ec1a5d}"/>
<RecordField colName="status_t" fieldIdRef="11" fieldType="TABLE_COLUMN" name="irtb00002.status_t" sqlTabName="irtb00002" uid="{36884fe8-60e0-41d1-af72-3c06330bb1c6}"/>
<RecordField colName="us_crea" fieldIdRef="12" fieldType="TABLE_COLUMN" name="irtb00002.us_crea" sqlTabName="irtb00002" uid="{ca246dc8-4c77-4e2e-ae4e-877e24b69e5e}"/>
<RecordField colName="us_mod" fieldIdRef="14" fieldType="TABLE_COLUMN" name="irtb00002.us_mod" sqlTabName="irtb00002" uid="{898e09a0-7e63-4284-8042-7b8f5bfef002}"/>
<RecordField colName="fech_crea" fieldIdRef="13" fieldType="TABLE_COLUMN" name="irtb00002.fech_crea" sqlTabName="irtb00002" uid="{65a6f561-bd5e-4281-9708-bd8ad91fcebd}"/>
<RecordField colName="fech_mod" fieldIdRef="15" fieldType="TABLE_COLUMN" name="irtb00002.fech_mod" sqlTabName="irtb00002" uid="{ac8e5039-1c1a-44d6-a327-5e4d7a6c9026}"/>
<RecordField fieldIdRef="16" name="codid" uid="{9a6e9192-cbcd-4081-8c40-cafc7141acfb}"/>
<RecordField fieldIdRef="17" name="xcuenta" uid="{f2b69329-f99a-4ea5-b96c-f4a9cdbe6fb7}"/>
<RecordField fieldIdRef="30" name="existencia" uid="{fb57a3b0-9e8c-4136-b9ea-b8499b7ae9b7}"/>
<RecordField fieldIdRef="31" name="progressbar1" uid="{283a22c0-074a-4498-abec-c2eafabf2a8d}"/>
<RecordField fieldIdRef="33" name="codn1" uid="{629d8663-1d58-4a69-9c4f-152926bd9e89}"/>
<RecordField fieldIdRef="34" name="codgrupo1" uid="{6f566327-6c23-407f-9067-c1b51646c406}"/>
<RecordField fieldIdRef="35" name="codtipo1" uid="{2164a890-9025-4d62-94df-7216e81a9bf7}"/>
<RecordField fieldIdRef="36" name="codsec1" uid="{c8e6230b-b699-4d1a-ac7f-eeb3f2f8f559}"/>
<RecordField fieldIdRef="37" name="descripcion1" uid="{97d21b26-92b1-484d-9125-6df0a4d759cd}"/>
<RecordField fieldIdRef="39" name="id_maintainX" uid="{d1ca876b-7bc5-46b4-8a7d-f53c78762c74}"/>
<RecordField defaultValue="false" fieldIdRef="40" fieldType="NON_DATABASE" length="10" name="maintainGO" sqlType="BOOLEAN" uid="{95b9eadd-2ccd-4a90-bd9b-0c102a749962}"/>
<RecordField fieldIdRef="41" name="enviarMX" uid="{ff0f281d-31df-4dfd-9d4d-bbaf238c3615}"/>
<RecordField fieldIdRef="42" name="cuenta" uid="{98dc2d70-6d50-4c4e-9211-055ef3ecc0e4}"/>
<RecordField fieldIdRef="45" name="control_existencia" uid="{69b9c7ca-508e-43a3-bd40-0eb962018fdc}"/>
<RecordField fieldIdRef="46" name="cod_sp" uid="{9c254e69-7513-4511-8c11-1f5df5e8cf15}"/>
<RecordField fieldIdRef="47" name="cod_sp_sec" uid="{00dc503e-e894-438f-b14b-7ab143567251}"/>
<RecordField fieldIdRef="48" name="sp_nom" uid="{4a9bcf64-3d07-4385-8308-4c30d84925c4}"/>
<RecordField fieldIdRef="49" name="desglose" uid="{2220bbaa-c61f-4326-9bd1-7d7873c8d122}"/>
</Record>
<Record name="stabla" uid="{3ebe6076-ee46-4140-a12f-b0364eb3791d}">
<RecordField fieldIdRef="18" name="articulo" uid="{74961641-6c90-4b2e-9273-39b131c146ce}"/>
<RecordField fieldIdRef="19" name="existencia1" uid="{8f0f71c9-b475-414c-b985-4eef630705a3}"/>
<RecordField fieldIdRef="20" name="exist_minima" uid="{770f6379-88d8-4cb5-8e84-0431abf20824}"/>
<RecordField fieldIdRef="21" name="dias_transito" uid="{728d9ff2-6118-4165-b6ce-63aa6d684c5a}"/>
<RecordField fieldIdRef="32" name="xcuenta1" uid="{66a385bb-385a-4a62-8a4c-6a3560619669}"/>
<RecordField fieldIdRef="44" name="status_t" uid="{ef3643ff-39f5-4cc7-8111-161d32f8f415}"/>
<RecordField fieldIdRef="38" name="enviarMX1" uid="{4d68cf64-a29d-4e40-be88-adced71aa009}"/>
<RecordField fieldIdRef="22" name="codn" uid="{d644a6f6-dd8c-410d-8f54-fc67697be6b0}"/>
<RecordField fieldIdRef="23" name="codgrupo" uid="{f085189b-f65b-4a5c-88ba-9f2d5e2abaf9}"/>
<RecordField fieldIdRef="24" name="codtipo" uid="{b464d8d0-b5d9-4986-af61-dac3c49265bf}"/>
<RecordField fieldIdRef="25" name="codsec" uid="{3acb180d-ebf6-4a67-8d41-50b706fdc3b1}"/>
<RecordField fieldIdRef="43" name="id_maintainx1" uid="{f42e74a4-a772-414c-817e-70df51f6acd9}"/>
</Record>
<Record name="sdocs" uid="{c1c1ed11-b0a7-4838-9908-92e388a7a27c}">
<RecordField fieldIdRef="26" name="fecha" uid="{fe3c09b6-2d9c-4e09-8a95-cbcb28316d41}"/>
<RecordField fieldIdRef="27" name="movimiento" uid="{f962930a-85cb-4fd3-9a7a-7a7ba9238341}"/>
<RecordField fieldIdRef="28" name="documento" uid="{10b700bb-ac8e-488b-a916-ad6eae64e86e}"/>
<RecordField fieldIdRef="29" name="cantidad" uid="{4d42bf1c-978f-4614-a587-64be00b78196}"/>
</Record>
<Form gridHeight="26" gridWidth="118" name="irfmmt002" text="MAESTRA REPUESTOS">
<Folder gridHeight="21" gridWidth="116" name="folder1" posX="2" posY="1">
<Page name="page1" text="Tabla Maestra">
<Grid gridHeight="17" gridWidth="115" name="grid2" posX="1" posY="1">
<Label gridHeight="1" gridWidth="10" name="label16" posX="3" posY="1" text="Progreso Busqueda"/>
<ProgressBar fieldId="31" gridHeight="1" gridWidth="17" name="progressbar1" posX="15" posY="1" title="progressbar1" widget="ProgressBar"/>
<Label gridHeight="1" gridWidth="10" name="label17" posX="3" posY="2" text="Codigo"/>
<Edit fieldId="33" gridHeight="1" gridWidth="6" name="codn1" posX="15" posY="2" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="34" gridHeight="1" gridWidth="7" name="codgrupo1" posX="23" posY="2" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="35" gridHeight="1" gridWidth="7" name="codtipo1" posX="32" posY="2" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="36" gridHeight="1" gridWidth="8" name="codsec1" posX="40" posY="2" tabIndex="-1" title="edit1" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="label18" posX="51" posY="2" text="Descripcion"/>
<Edit fieldId="37" gridHeight="1" gridWidth="28" name="descripcion1" posX="63" posY="2" scroll="true" tabIndex="-1" title="edit1" widget="Edit"/>
<Table gridHeight="11" gridWidth="112" name="table1" posX="3" posY="3" totalRows="5">
<Edit fieldId="18" gridHeight="1" gridWidth="8" justify="left" name="articulo" posX="0" posY="0" tabIndex="-1" title="ARTICULOS" widget="Edit"/>
<Edit fieldId="19" gridHeight="1" gridWidth="8" justify="center" name="existencia1" posX="8" posY="0" tabIndex="-1" title="EXISTENCIA" widget="Edit"/>
<Edit fieldId="20" gridHeight="1" gridWidth="8" justify="center" name="exist_minima" posX="16" posY="0" tabIndex="-1" title="EXISTENCIA MIN" widget="Edit"/>
<Edit fieldId="21" gridHeight="1" gridWidth="8" justify="center" name="dias_transito" posX="24" posY="0" tabIndex="-1" title="DIAS TRANSITO" widget="Edit"/>
<Edit fieldId="32" gridHeight="1" gridWidth="14" justify="center" name="xcuenta1" posX="32" posY="0" scroll="true" tabIndex="-1" title="CUENTA" widget="Edit"/>
<ComboBox fieldId="44" gridHeight="1" gridWidth="8" items="DESACTIVADO" justify="center" name="status_t" noEntry="true" posX="46" posY="0" tabIndex="-1" title="ESTADO" widget="ComboBox">
<Item lstrtext="false" name="E" text="DESACTIVADO"/>
</ComboBox>
<Edit fieldId="38" gridHeight="1" gridWidth="14" justify="center" name="enviarMX1" posX="54" posY="0" tabIndex="-1" title="ENVIADO MAINTAINX" widget="Edit"/>
<Edit fieldId="22" gridHeight="1" gridWidth="8" hidden="true" name="codn" posX="68" posY="0" tabIndex="-1" title="edit6" widget="Edit"/>
<Edit fieldId="23" gridHeight="1" gridWidth="8" hidden="true" name="codgrupo" posX="76" posY="0" tabIndex="-1" title="edit7" widget="Edit"/>
<Edit fieldId="24" gridHeight="1" gridWidth="8" hidden="true" name="codtipo" posX="84" posY="0" tabIndex="-1" title="edit8" widget="Edit"/>
<Edit fieldId="25" gridHeight="1" gridWidth="8" hidden="true" name="codsec" posX="92" posY="0" tabIndex="-1" title="edit9" widget="Edit"/>
<Phantom fieldId="43" name="id_maintainx1" widget="Phantom"/>
</Table>
</Grid>
</Page>
<Page name="page2" text="Informacion">
<Grid gridHeight="17" gridWidth="106" name="grid1" posX="0" posY="2">
<Group gridHeight="15" gridWidth="100" name="group1" posX="2" posY="1">
<Label gridHeight="1" gridWidth="6" name="label1" posX="1" posY="1" text="Codigo"/>
<Edit autoNext="true" colName="cod_n" comment="Digite el NIVEL de repuestos" fieldId="0" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="irtb00002.cod_n" posX="13" posY="1" sqlTabName="irtb00002" tabIndex="1" widget="Edit"/>
<Edit autoNext="true" colName="cod_grupo" comment="Digite la UBICACION de repuestos" fieldId="1" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="4" name="irtb00002.cod_grupo" posX="18" posY="1" sqlTabName="irtb00002" tabIndex="2" widget="Edit"/>
<Edit autoNext="true" colName="cod_tipo" comment="Digite el GRUPO de repuestos" fieldId="2" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="4" name="irtb00002.cod_tipo" posX="24" posY="1" sqlTabName="irtb00002" tabIndex="3" widget="Edit"/>
<Edit autoNext="true" colName="cod_sec" comment="Digite la SECUENCIA de repuestos" fieldId="3" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="5" name="irtb00002.cod_sec" posX="30" posY="1" sqlTabName="irtb00002" tabIndex="4" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" justify="right" name="label13" posX="53" posY="1" text="CodId"/>
<Edit fieldId="16" gridHeight="1" gridWidth="10" name="codid" posX="65" posY="1" tabIndex="-1" title="edit1" widget="Edit"/>
<Label gridHeight="1" gridWidth="20" name="label2" posX="1" posY="2" text="Descripcion Espanol"/>
<Edit case="upper" colName="descrip_esp" fieldId="8" gridHeight="1" gridWidth="30" name="descrip_esp" posX="22" posY="2" scroll="true" sqlTabName="formonly" tabIndex="5" widget="Edit"/>
<Label gridHeight="1" gridWidth="8" justify="right" name="label14" posX="55" posY="2" text="Cuenta"/>
<ComboBox fieldId="17" gridHeight="1" gridWidth="31" items="" name="xcuenta" posX="65" posY="2" tabIndex="-1" title="combobox1" widget="ComboBox"/>
<Label gridHeight="1" gridWidth="18" name="label3" posX="1" posY="3" text="Descripcion Ingles"/>
<Edit case="upper" colName="descrip_ing" fieldId="9" gridHeight="1" gridWidth="30" name="descrip_ing" posX="22" posY="3" scroll="true" sqlTabName="formonly" tabIndex="6" widget="Edit"/>
<Label gridHeight="1" gridWidth="8" justify="right" name="label15" posX="55" posY="3" text="Existencia"/>
<Edit fieldId="30" gridHeight="1" gridWidth="10" name="existencia" noEntry="true" posX="65" posY="3" scroll="true" tabIndex="-1" title="edit6" widget="Edit"/>
<Label gridHeight="1" gridWidth="13" name="label4" posX="1" posY="4" text="Unidad Medida"/>
<Edit case="upper" colName="unidad_med" fieldId="10" gridHeight="1" gridWidth="3" name="unidad_med" posX="22" posY="4" sqlTabName="formonly" tabIndex="7" widget="Edit"/>
<Label gridHeight="1" gridWidth="11" justify="right" name="label20" posX="52" posY="4" text="Enviado a MaintainX"/>
<ComboBox fieldId="41" gridHeight="1" gridWidth="10" items="SI, NO" name="enviarMX" noEntry="true" posX="65" posY="4" tabIndex="-1" title="edit1" widget="ComboBox">
<Item lstrtext="false" name="SI" text="SI"/>
<Item lstrtext="false" name="NO" text="NO"/>
</ComboBox>
<Label gridHeight="1" gridWidth="18" name="label5" posX="1" posY="5" text="Existencia Inicial"/>
<Edit colName="existencia" comment="Digite la existencia actual" fieldId="4" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="12" name="irtb00002.existencia" posX="22" posY="5" sqlTabName="irtb00002" tabIndex="8" widget="Edit"/>
<Label gridHeight="1" gridWidth="11" justify="right" name="label21" posX="52" posY="5" text="Proveedor"/>
<Edit fieldId="46" gridHeight="1" gridWidth="3" name="cod_sp" posX="65" posY="5" scroll="true" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="47" gridHeight="1" gridWidth="5" name="cod_sp_sec" posX="69" posY="5" scroll="true" tabIndex="-1" title="edit2" widget="Edit"/>
<Edit fieldId="48" gridHeight="1" gridWidth="20" name="sp_nom" noEntry="true" posX="75" posY="5" scroll="true" tabIndex="-1" title="edit3" widget="Edit"/>
<Label gridHeight="1" gridWidth="17" name="label6" posX="1" posY="6" text="Existencia Minima"/>
<Edit autoNext="true" colName="exist_min" fieldId="5" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="12" name="irtb00002.exist_min" posX="22" posY="6" sqlTabName="irtb00002" tabIndex="9" widget="Edit"/>
<Label gridHeight="1" gridWidth="11" name="label7" posX="1" posY="7" text="Dia Llegada"/>
<Edit autoNext="true" colName="dia_llegada" comment="Digite Dia Llegada, expresado en dias" fieldId="6" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="irtb00002.dia_llegada" posX="22" posY="7" sqlTabName="irtb00002" tabIndex="10" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="label8" posX="27" posY="7" text="Categoria"/>
<Edit case="upper" colName="categoria" comment="Digite La Categoria del Repuesto" fieldId="7" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="1" name="irtb00002.categoria" posX="38" posY="7" sqlTabName="irtb00002" tabIndex="11" widget="Edit"/>
<Label gridHeight="1" gridWidth="11" justify="center" name="label19" posX="51" posY="7" text="ID MaintainX"/>
<Edit fieldId="49" gridHeight="1" gridWidth="10" hidden="true" name="desglose" posX="89" posY="7" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="39" gridHeight="1" gridWidth="13" justify="center" name="id_maintainX" noEntry="true" posX="50" posY="8" tabIndex="-1" title="edit1" widget="Edit"/>
<CheckBox defaultValue="false" fieldId="40" fieldType="NON_DATABASE" gridHeight="1" gridWidth="17" hidden="false" justify="center" length="10" name="maintainGO" posX="48" posY="9" sqlType="BOOLEAN" tabIndex="-1" text="Aplicar cambios en MaintainX" title="checkbox1" valueChecked="true" valueUnchecked="false" widget="CheckBox"/>
<Edit colName="status_t" fieldId="11" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="1" name="irtb00002.status_t" noEntry="true" posX="1" posY="10" sqlTabName="irtb00002" tabIndex="12" widget="Edit"/>
<Label gridHeight="1" gridWidth="15" name="label9" posX="1" posY="11" text="Usuario creador"/>
<Edit colName="us_crea" fieldId="12" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="16" name="irtb00002.us_crea" noEntry="true" posX="19" posY="11" sqlTabName="irtb00002" tabIndex="13" widget="Edit"/>
<Label gridHeight="1" gridWidth="19" name="label10" posX="38" posY="11" text="Usuario modificador"/>
<Edit colName="us_mod" fieldId="14" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="16" name="irtb00002.us_mod" noEntry="true" posX="60" posY="11" sqlTabName="irtb00002" tabIndex="14" widget="Edit"/>
<Label gridHeight="1" gridWidth="14" name="label11" posX="1" posY="12" text="Fecha Creacion"/>
<Edit colName="fech_crea" fieldId="13" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="16" name="irtb00002.fech_crea" noEntry="true" posX="19" posY="12" sqlTabName="irtb00002" tabIndex="15" widget="Edit"/>
<Label gridHeight="1" gridWidth="18" name="label12" posX="38" posY="12" text="Fecha Modificacion"/>
<Edit colName="fech_mod" fieldId="15" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="16" name="irtb00002.fech_mod" noEntry="true" posX="60" posY="12" sqlTabName="irtb00002" tabIndex="16" widget="Edit"/>
<Phantom fieldId="42" name="cuenta" widget="Phantom"/>
<Phantom fieldId="45" name="control_existencia" widget="Phantom"/>
</Group>
</Grid>
</Page>
<Page name="page3" text="Transacciones">
<Grid gridHeight="14" gridWidth="80" name="grid3" posX="3" posY="1">
<Table gridHeight="9" gridWidth="63" name="table2" posX="3" posY="2" totalRows="5">
<Edit fieldId="26" gridHeight="1" gridWidth="12" name="fecha" posX="0" posY="0" scroll="true" tabIndex="-1" title="FECHA" widget="Edit"/>
<Edit fieldId="27" gridHeight="1" gridWidth="20" name="movimiento" posX="12" posY="0" scroll="true" tabIndex="-1" title="MOVIMIENTO" widget="Edit"/>
<Edit fieldId="28" gridHeight="1" gridWidth="8" name="documento" posX="32" posY="0" scroll="true" tabIndex="-1" title="DOCUMENTO" widget="Edit"/>
<Edit fieldId="29" gridHeight="1" gridWidth="12" name="cantidad" posX="40" posY="0" scroll="true" tabIndex="-1" title="CANTIDAD" widget="Edit"/>
</Table>
</Grid>
</Page>
</Folder>
<ToolBar name="ToolBar1">
<ToolBarItem image="fa-gear" name="adicionar" text="Nuevo"/>
<ToolBarItem image="fa-check-square-o" name="actualiza" text="Modificar"/>
<ToolBarSeparator name="toolbarseparator1"/>
<ToolBarItem image="delete" name="eliminar" text="Desactivar"/>
<ToolBarItem image="refresh" name="refrescar" text="Refrescar"/>
<ToolBarItem image="fa-recycle" name="activar" text="Re-activar"/>
<ToolBarItem image="exit" name="salir" text="SALIR"/>
</ToolBar>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewBlADQAMAA5ADMANgBkAGQALQAyADcAZgAwAC0ANABhADcAYgAtAGIAYgAwADgALQA0ADMAZQAwAGYAZgA4AGMAOQBjADAANAB9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAEwAewBjADEAYwAxAGUAZAAxADEALQBiADAAYQA3AC0ANAA4ADMAOAAtADkAOQAwADgALQA5ADIAZQAzADgAOABhADcAYQAyADcAYwB9QHmzNA2madVAQszNbJmcHT90euFHrhR7AQAAAEwAewAzAGUAYgBlADYAMAA3ADYALQBlAGUANAA2AC0ANAAxADQAMAAtAGEAMQAyAGYALQBiADAAMwA2ADQAZQBiADMANwA5ADEAZAB9QHAzM7zmaJBAPZmalTM3Kj94k3S8an76AQ==]]>
</DiagramLayout>
</ManagedForm>
+79
View File
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="3140a" name="ManagedForm" uid="{aa5900b5-1f35-4467-a7a5-af3b13862b43}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record name="record1" uid="{71a4e957-423a-4996-9c0f-30ddcb7df286}">
<RecordField colName="cod_mov" fieldIdRef="0" fieldType="TABLE_COLUMN" name="irtb00005.cod_mov" sqlTabName="irtb00005" uid="{8e95985e-3010-4727-9461-458a6f85f6de}"/>
<RecordField colName="cuenta_1" fieldIdRef="3" fieldType="TABLE_COLUMN" name="irtb00005.cuenta_1" sqlTabName="irtb00005" uid="{24d85a0b-4d23-469f-a489-885a5df9c759}"/>
<RecordField colName="descrip_mov" fieldIdRef="1" fieldType="TABLE_COLUMN" name="irtb00005.descrip_mov" sqlTabName="irtb00005" uid="{74f09694-6458-4fa2-9ec8-981695f19443}"/>
<RecordField colName="cuenta_2" fieldIdRef="4" fieldType="TABLE_COLUMN" name="irtb00005.cuenta_2" sqlTabName="irtb00005" uid="{e34cdde8-4fef-4e8d-aa57-d069ac1a794a}"/>
<RecordField colName="status_mov" fieldIdRef="2" fieldType="TABLE_COLUMN" name="irtb00005.status_mov" sqlTabName="irtb00005" uid="{aed9c0e6-5d6b-414b-acb4-169d82862223}"/>
<RecordField colName="cuenta_3" fieldIdRef="5" fieldType="TABLE_COLUMN" name="irtb00005.cuenta_3" sqlTabName="irtb00005" uid="{cc359149-f01d-4307-98ee-4538471bcd42}"/>
<RecordField colName="status_t" fieldIdRef="10" fieldType="TABLE_COLUMN" name="irtb00005.status_t" sqlTabName="irtb00005" uid="{6f3ee9b7-3efd-49a8-8e7d-0fbee61b4737}"/>
<RecordField colName="us_crea" fieldIdRef="6" fieldType="TABLE_COLUMN" name="irtb00005.us_crea" sqlTabName="irtb00005" uid="{1e82b1ce-c043-4deb-be01-a4d2c9b43e75}"/>
<RecordField colName="us_mod" fieldIdRef="8" fieldType="TABLE_COLUMN" name="irtb00005.us_mod" sqlTabName="irtb00005" uid="{079c8a08-e4c7-4398-bca5-88bfa2623486}"/>
<RecordField colName="fech_crea" fieldIdRef="7" name="fech_crea" sqlTabName="formonly" uid="{05fc3fd2-35e5-4ef7-a30d-25d4c8c572bf}"/>
<RecordField colName="fech_mod" fieldIdRef="9" name="fech_mod" sqlTabName="formonly" uid="{1b2c0d1b-4979-4554-b8ea-fca3a557211b}"/>
<RecordField defaultValue="NO" fieldIdRef="11" name="consumo" uid="{8ded7569-1893-4277-89ed-0d7be1601bfd}"/>
<RecordField defaultValue="NO" fieldIdRef="12" name="control_departamento" uid="{92b7ed1a-30dd-4de8-a1c8-7056cc7cf519}"/>
<RecordField defaultValue="NO" fieldIdRef="13" name="control_maquina" uid="{1580a96e-a981-4ce5-9264-c9070a0dfbb4}"/>
<RecordField defaultValue="NO" fieldIdRef="14" name="requiere_autorizacion" uid="{0db5f86a-0d20-459d-879f-71ab7bc5b033}"/>
<RecordField defaultValue="NO" fieldIdRef="15" name="requisiciones" uid="{d04fafca-c7dd-4d5a-bc1d-901c20edc432}"/>
</Record>
<Form gridHeight="24" gridWidth="80" name="irfmmt003" text="Tipos Movimientos">
<Grid gridHeight="24" gridWidth="80" name="grid1" posX="0" posY="0">
<Label gridHeight="1" gridWidth="21" name="label1" posX="1" posY="2" text="Codigo del movimiento"/>
<Edit autoNext="true" colName="cod_mov" comment="Digite el codigo del movimiento" fieldId="0" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="2" name="irtb00005.cod_mov" posX="30" posY="2" sqlTabName="irtb00005" tabIndex="1" widget="Edit"/>
<Label gridHeight="1" gridWidth="7" name="label2" posX="58" posY="2" text="Cta. Db"/>
<Edit autoNext="true" colName="cuenta_1" comment="Digite el numero de la cuenta" fieldId="3" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="8" name="irtb00005.cuenta_1" posX="68" posY="2" required="true" sqlTabName="irtb00005" tabIndex="2" widget="Edit"/>
<Label gridHeight="1" gridWidth="11" name="label3" posX="1" posY="3" text="Descripcion"/>
<Edit autoNext="true" case="upper" colName="descrip_mov" comment="Digite la descripcion del movimiento" fieldId="1" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="40" name="irtb00005.descrip_mov" posX="15" posY="3" sqlTabName="irtb00005" tabIndex="3" widget="Edit"/>
<Label gridHeight="1" gridWidth="9" name="label4" posX="58" posY="3" text="Cta. Cr."/>
<Edit autoNext="true" colName="cuenta_2" comment="Digite el numero de la cuenta" fieldId="4" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="8" name="irtb00005.cuenta_2" posX="68" posY="3" required="true" sqlTabName="irtb00005" tabIndex="4" widget="Edit"/>
<Label gridHeight="1" gridWidth="9" name="label6" posX="58" posY="4" text="Departa."/>
<Edit colName="cuenta_3" comment="Digite el numero de la cuenta" fieldId="5" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="8" name="irtb00005.cuenta_3" posX="68" posY="4" sqlTabName="irtb00005" tabIndex="6" widget="Edit"/>
<Group gridHeight="7" gridWidth="27" name="group1" posX="2" posY="5" text="Propiedades">
<Label gridHeight="1" gridWidth="10" name="label11" posX="1" posY="1" text="Afecta Consumo"/>
<ComboBox defaultValue="NO" fieldId="11" gridHeight="1" gridWidth="10" items="SI, NO" name="consumo" posX="14" posY="1" tabIndex="-1" title="combobox1" widget="ComboBox">
<Item lstrtext="false" name="SI" text="SI"/>
<Item lstrtext="false" name="NO" text="NO"/>
</ComboBox>
<Label gridHeight="1" gridWidth="10" name="label12" posX="1" posY="2" text="Control Departamento"/>
<ComboBox defaultValue="NO" fieldId="12" gridHeight="1" gridWidth="10" items="SI, NO" name="control_departamento" posX="14" posY="2" tabIndex="-1" title="combobox1" widget="ComboBox">
<Item lstrtext="false" name="SI" text="SI"/>
<Item lstrtext="false" name="NO" text="NO"/>
</ComboBox>
<Label gridHeight="1" gridWidth="10" name="label13" posX="1" posY="3" text="Control Maquina"/>
<ComboBox defaultValue="NO" fieldId="13" gridHeight="1" gridWidth="10" items="SI, NO" name="control_maquina" posX="14" posY="3" tabIndex="-1" title="combobox1" widget="ComboBox">
<Item lstrtext="false" name="SI" text="SI"/>
<Item lstrtext="false" name="NO" text="NO"/>
</ComboBox>
<Label gridHeight="1" gridWidth="10" name="label14" posX="1" posY="4" text="Autorizacion"/>
<ComboBox defaultValue="NO" fieldId="14" gridHeight="1" gridWidth="10" items="SI, NO" name="requiere_autorizacion" posX="14" posY="4" tabIndex="-1" title="combobox1" widget="ComboBox">
<Item lstrtext="false" name="SI" text="SI"/>
<Item lstrtext="false" name="NO" text="NO"/>
</ComboBox>
<Label gridHeight="1" gridWidth="10" name="label15" posX="1" posY="5" text="Requisicion"/>
<ComboBox defaultValue="NO" fieldId="15" gridHeight="1" gridWidth="10" items="SI, NO" name="requisiciones" posX="14" posY="5" tabIndex="-1" title="combobox2" widget="ComboBox">
<Item lstrtext="false" name="SI" text="SI"/>
<Item lstrtext="false" name="NO" text="NO"/>
</ComboBox>
</Group>
<Label gridHeight="1" gridWidth="21" name="label5" posX="1" posY="12" text="Status del movimiento"/>
<Edit autoNext="true" colName="status_mov" comment="1.- Entradas 2.- Salidas 3- Transferencia" fieldId="2" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="1" include="1|2|3" name="irtb00005.status_mov" posX="30" posY="12" required="true" sqlTabName="irtb00005" tabIndex="5" widget="Edit"/>
<Edit colName="status_t" fieldId="10" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="1" name="irtb00005.status_t" noEntry="true" posX="2" posY="13" sqlTabName="irtb00005" tabIndex="7" widget="Edit"/>
<Label gridHeight="1" gridWidth="15" name="label7" posX="1" posY="14" text="Usuario creador"/>
<Edit colName="us_crea" fieldId="6" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="16" name="irtb00005.us_crea" noEntry="true" posX="20" posY="14" sqlTabName="irtb00005" tabIndex="8" widget="Edit"/>
<Label gridHeight="1" gridWidth="19" name="label8" posX="43" posY="14" text="Usuario modificador"/>
<Edit colName="us_mod" fieldId="8" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="14" name="irtb00005.us_mod" noEntry="true" posX="65" posY="14" sqlTabName="irtb00005" tabIndex="9" widget="Edit"/>
<Label gridHeight="1" gridWidth="14" name="label9" posX="1" posY="15" text="Fecha creacion"/>
<Edit colName="fech_crea" fieldId="7" gridHeight="1" gridWidth="16" name="fech_crea" noEntry="true" posX="20" posY="15" sqlTabName="formonly" tabIndex="10" widget="Edit"/>
<Label gridHeight="1" gridWidth="19" name="label10" posX="43" posY="15" text="Fecha modificacion"/>
<Edit colName="fech_mod" fieldId="9" gridHeight="1" gridWidth="16" name="fech_mod" noEntry="true" posX="63" posY="15" sqlTabName="formonly" tabIndex="11" widget="Edit"/>
</Grid>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewA3ADEAYQA0AGUAOQA1ADcALQA0ADIAMwBhAC0ANAA5ADkANgAtADkAYwAwAGYALQAzADAAZABkAGMAYgA3AGQAZgAyADgANgB9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ==]]>
</DiagramLayout>
</ManagedForm>
+40
View File
@@ -0,0 +1,40 @@
database smarmotech
screen size 24 by 80
{
Mes Inicial [f1] [g4 ]
Mes Final [f2] [g5 ]
Ano [f002]
Codigo [a ]-[b ]-[c ]-[d ][e ] [g ]
Costo Estandar [f005 ]
[j]
Usuario Creador [f006 ] Usuario Modificador [f008 ]
Fecha Creacion [f007 ] Fecha Modificacion [f009 ]
}
end
tables
irtb00013,irtb00002
attributes
f1 = irtb00013.mes_ini,autonext,
comments = "Digite el mes inicial",default = 01,noentry;
g4 = formonly.descrip1 type char,default = "ENERO";
f2 = irtb00013.mes_fin,autonext,noentry,
comments = "Digite el mes final",default = 12;
g5 = formonly.descrip2 type char,default = "DICIEMBRE";
f002 = irtb00013.ano,autonext,comments = "Digite el ano";
a = irtb00013.cod_n,autonext,comments = "Digite el NIVEL";
b = irtb00013.cod_grupo,autonext,comments = "Digite el GRUPO";
c = irtb00013.cod_tipo,autonext,comments = "Digite el TIPO";
d = irtb00013.cod_sec,autonext,comments = "Digite la SECUENCIA";
e = irtb00002.descrip_esp,noentry;
g = irtb00002.unidad_med,noentry;
f005 = irtb00013.costo_st,comments = "Digite el costo";
j = irtb00013.status_t,noentry;
f006 = irtb00013.us_crea,noentry;
f007 = irtb00013.fech_crea,noentry;
f008 = irtb00013.us_mod,noentry;
f009 = irtb00013.fech_mod,noentry;
instructions
delimiters " "
end
+83
View File
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="3140a" name="ManagedForm" uid="{4851f539-3567-4305-bf28-9e20c3e2c827}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record name="s_movi1" uid="{cf0a417c-be9c-40e0-8a21-546f4274a8ef}">
<RecordField colName="cod_n" fieldIdRef="13" fieldType="TABLE_COLUMN" name="irtb00006.cod_n" sqlTabName="irtb00006" uid="{56513617-bae1-427a-83c4-df70cf749bc3}"/>
<RecordField colName="cod_grupo" fieldIdRef="14" fieldType="TABLE_COLUMN" name="irtb00006.cod_grupo" sqlTabName="irtb00006" uid="{0dd6c187-41f7-4602-b223-084dfac84f56}"/>
<RecordField colName="cod_tipo" fieldIdRef="15" fieldType="TABLE_COLUMN" name="irtb00006.cod_tipo" sqlTabName="irtb00006" uid="{aadb6bc1-820b-4f26-b67a-5b464a6424c4}"/>
<RecordField colName="cod_sec" fieldIdRef="16" fieldType="TABLE_COLUMN" name="irtb00006.cod_sec" sqlTabName="irtb00006" uid="{66a723e9-212a-4ba1-91cf-1d6e9dec221a}"/>
<RecordField colName="descrip_esp" fieldIdRef="17" fieldType="TABLE_COLUMN" name="irtb00002.descrip_esp" sqlTabName="irtb00002" uid="{5305ccd8-0a9e-40ac-9736-c49e0d770069}"/>
<RecordField colName="unidad_med" fieldIdRef="9" fieldType="TABLE_COLUMN" name="irtb00002.unidad_med" sqlTabName="irtb00002" uid="{9ad32acd-dcf0-4137-a32d-f70e161bd4c2}"/>
<RecordField colName="cantidad_1" fieldIdRef="7" fieldType="TABLE_COLUMN" name="irtb00006.cantidad_1" sqlTabName="irtb00006" uid="{18dee236-a126-40a4-85fa-736751112f63}"/>
<RecordField colName="cantidad_2" fieldIdRef="8" fieldType="TABLE_COLUMN" name="irtb00006.cantidad_2" sqlTabName="irtb00006" uid="{7f5c0264-7f1a-404c-a644-30f64bff6535}"/>
<RecordField colName="maquina" fieldIdRef="10" fieldType="TABLE_COLUMN" name="irtb00006.maquina" sqlTabName="irtb00006" uid="{473ff570-a564-4261-b163-e92ae126be21}"/>
</Record>
<Record name="record1" uid="{58de6f40-028e-4410-9aa7-f95a1c50efae}">
<RecordField colName="cod_mov" fieldIdRef="19" fieldType="TABLE_COLUMN" name="irtb00006.cod_mov" sqlTabName="irtb00006" uid="{bd543bb2-596c-4e34-aa05-f439f8ea74b9}"/>
<RecordField colName="descrip_mov" fieldIdRef="21" fieldType="TABLE_COLUMN" name="irtb00005.descrip_mov" sqlTabName="irtb00005" uid="{d1ed5c98-afa6-4974-a799-c609d42392df}"/>
<RecordField colName="num_doc" fieldIdRef="0" fieldType="TABLE_COLUMN" name="irtb00006.num_doc" sqlTabName="irtb00006" uid="{635b45b8-1581-4d97-98d7-3c9d80bca81f}"/>
<RecordField colName="tipo" fieldIdRef="18" name="tipo" sqlTabName="formonly" sqlType="CHAR" uid="{b484ea8a-09da-40d2-807c-6c5c2cb50569}"/>
<RecordField colName="orden_compra" fieldIdRef="3" fieldType="TABLE_COLUMN" name="irtb00006.orden_compra" sqlTabName="irtb00006" uid="{8e838b1f-b7c3-4703-9d89-49fbd26d8e9c}"/>
<RecordField colName="cod_sp" fieldIdRef="1" fieldType="TABLE_COLUMN" name="irtb00006.cod_sp" sqlTabName="irtb00006" uid="{2f384968-2841-486e-b5ac-f66038fbacbf}"/>
<RecordField colName="cod_sp_sec" fieldIdRef="2" fieldType="TABLE_COLUMN" name="irtb00006.cod_sp_sec" sqlTabName="irtb00006" uid="{98795392-219f-4af4-9725-3ed8e7c542a2}"/>
<RecordField colName="nom_sp" fieldIdRef="12" fieldType="TABLE_COLUMN" name="cotb00001.nom_sp" sqlTabName="cotb00001" uid="{f4ed99d8-116d-445c-8d28-c5770dc624cd}"/>
<RecordField colName="conduce_no" fieldIdRef="4" fieldType="TABLE_COLUMN" name="irtb00006.conduce_no" sqlTabName="irtb00006" uid="{b7bc9366-2788-4c50-93fc-b31ff6a640a3}"/>
<RecordField colName="fact_no" fieldIdRef="5" fieldType="TABLE_COLUMN" name="irtb00006.fact_no" sqlTabName="irtb00006" uid="{526cbfc8-3306-4c40-a57b-ee14ee676bcb}"/>
<RecordField colName="fecha" defaultValue="TODAY" fieldIdRef="6" name="fecha" sqlTabName="formonly" sqlType="DATE" uid="{98e5a80e-ecbe-49a4-ad61-0a6bfff379e9}"/>
<RecordField colName="sec_a" fieldIdRef="20" name="sec_a" sqlTabName="formonly" uid="{c2a33cb3-e2a6-4fd3-8f56-ab8e5f9d90d9}"/>
<RecordField colName="nombre" fieldIdRef="11" name="nombre" sqlTabName="formonly" uid="{6620c8a0-d7c3-4cf9-8ed8-1a47fcd24324}"/>
</Record>
<Form gridHeight="18" gridWidth="92" name="irfmmt006" style="basic" text="REPORTES ENTRADA">
<ToolBar name="toolbar1">
<ToolBarItem comment="Nuevo Reporte Entradan" image="new" name="nuevo" text="Documento"/>
<ToolBarItem comment="Criterio de busqueda" image="find" name="buscar" text="Buscar Documentos"/>
<ToolBarSeparator name="toolbarseparator1"/>
<ToolBarItem image="quit" name="salir" text="Salir"/>
</ToolBar>
<Grid gridHeight="18" gridWidth="92" name="grid1" posX="0" posY="0">
<Group gridHeight="5" gridWidth="79" name="group1" posX="2" posY="0" text="encabezado">
<Label gridHeight="1" gridWidth="11" name="label1" posX="2" posY="1" text="Movimiento:"/>
<Edit autoNext="true" colName="cod_mov" fieldId="19" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="2" name="irtb00006.cod_mov" posX="14" posY="1" sqlTabName="irtb00006" tabIndex="1" widget="Edit"/>
<Edit colName="descrip_mov" fieldId="21" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="40" name="irtb00005.descrip_mov" noEntry="true" posX="18" posY="1" sqlTabName="irtb00005" tabIndex="2" widget="Edit"/>
<Label gridHeight="1" gridWidth="9" name="label2" posX="60" posY="1" text="Doc. No."/>
<Edit colName="num_doc" fieldId="0" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="6" name="irtb00006.num_doc" noEntry="true" posX="70" posY="1" sqlTabName="irtb00006" tabIndex="3" widget="Edit"/>
<Label gridHeight="1" gridWidth="13" name="label3" posX="2" posY="2" text="Orden Compra:"/>
<Edit autoNext="true" colName="tipo" fieldId="18" gridHeight="1" gridWidth="2" name="tipo" posX="16" posY="2" sqlTabName="formonly" sqlType="CHAR" tabIndex="4" widget="Edit"/>
<Edit autoNext="true" colName="orden_compra" comment="Digite el Numero de la Orden de Compras" fieldId="3" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="6" name="irtb00006.orden_compra" posX="20" posY="2" sqlTabName="irtb00006" tabIndex="5" widget="Edit"/>
<Label gridHeight="1" gridWidth="9" name="label4" posX="29" posY="2" text="Suplidor:"/>
<Edit colName="cod_sp" fieldId="1" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="2" name="irtb00006.cod_sp" noEntry="true" posX="39" posY="2" sqlTabName="irtb00006" tabIndex="6" widget="Edit"/>
<Label gridHeight="1" gridWidth="1" name="label5" posX="42" posY="2" text="-"/>
<Edit colName="cod_sp_sec" fieldId="2" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="4" name="irtb00006.cod_sp_sec" noEntry="true" posX="44" posY="2" sqlTabName="irtb00006" tabIndex="7" widget="Edit"/>
<Edit colName="nom_sp" fieldId="12" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="26" name="cotb00001.nom_sp" noEntry="true" posX="50" posY="2" sqlTabName="cotb00001" tabIndex="8" widget="Edit"/>
<Label gridHeight="1" gridWidth="8" name="label6" posX="2" posY="3" text="Conduce:"/>
<Edit autoNext="true" colName="conduce_no" comment="Digite el Numero del Conduce Del Suplidor, Si Tiene Conduce" fieldId="4" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="10" name="irtb00006.conduce_no" posX="11" posY="3" sqlTabName="irtb00006" tabIndex="9" widget="Edit"/>
<Label gridHeight="1" gridWidth="11" name="label7" posX="27" posY="3" text="Factura No."/>
<Edit autoNext="true" colName="fact_no" comment="Digite el Numero de la Factura del Suplidor" fieldId="5" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="10" name="irtb00006.fact_no" posX="39" posY="3" sqlTabName="irtb00006" tabIndex="10" widget="Edit"/>
<Label gridHeight="1" gridWidth="6" name="label8" posX="51" posY="3" text="Fecha:"/>
<Edit colName="fecha" comment="Digite la Fecha Correspondiente al Documento" defaultValue="TODAY" fieldId="6" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="fecha" posX="58" posY="3" sqlTabName="formonly" sqlType="DATE" tabIndex="11" widget="Edit"/>
<Label gridHeight="1" gridWidth="3" name="label9" posX="69" posY="3" text="Dep"/>
<Edit colName="sec_a" comment="Digite Departamento Nomina" fieldId="20" gridHeight="1" gridWidth="4" name="sec_a" posX="73" posY="3" sqlTabName="formonly" tabIndex="12" widget="Edit"/>
</Group>
<Group gridHeight="13" gridWidth="91" name="group2" posX="1" posY="5" text="detalle">
<Label gridHeight="1" gridWidth="15" name="label10" posX="49" posY="1" text="C A N T I D A D"/>
<Label gridHeight="1" gridWidth="6" name="label11" posX="4" posY="2" text="Codigo"/>
<Label gridHeight="1" gridWidth="8" name="label12" posX="46" posY="2" text="Ordenada"/>
<Label gridHeight="1" gridWidth="8" name="label13" posX="60" posY="2" text="Recibida"/>
<Label gridHeight="1" gridWidth="7" name="label14" posX="70" posY="2" text="Maquina"/>
<Edit autoNext="true" colName="cod_n" columnCount="1" comment="Digite el Codigo De la herramienta" fieldId="13" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="irtb00006.cod_n" posX="4" posY="4" repeat="true" rowCount="6" sqlTabName="irtb00006" stepX="1" stepY="0" tabIndex="13" widget="Edit"/>
<Edit autoNext="true" colName="cod_grupo" columnCount="1" comment="Digite el Codigo De la herramienta" fieldId="14" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="irtb00006.cod_grupo" posX="9" posY="4" repeat="true" rowCount="6" sqlTabName="irtb00006" stepX="1" stepY="0" tabIndex="14" widget="Edit"/>
<Edit autoNext="true" colName="cod_tipo" columnCount="1" comment="Digite el Codigo De la herramienta" fieldId="15" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="4" name="irtb00006.cod_tipo" posX="14" posY="4" repeat="true" rowCount="6" sqlTabName="irtb00006" stepX="1" stepY="0" tabIndex="15" widget="Edit"/>
<Edit autoNext="true" colName="cod_sec" columnCount="1" comment="Digite el Codigo De la herramienta" fieldId="16" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="7" name="irtb00006.cod_sec" posX="20" posY="4" repeat="true" rowCount="6" sqlTabName="irtb00006" stepX="1" stepY="0" tabIndex="16" widget="Edit"/>
<Edit colName="descrip_esp" columnCount="1" fieldId="17" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="29" name="irtb00002.descrip_esp" noEntry="true" posX="29" posY="4" repeat="true" rowCount="6" sqlTabName="irtb00002" stepX="1" stepY="0" tabIndex="17" widget="Edit"/>
<Edit colName="unidad_med" columnCount="1" fieldId="9" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="irtb00002.unidad_med" noEntry="true" posX="60" posY="4" repeat="true" rowCount="6" sqlTabName="irtb00002" stepX="1" stepY="0" tabIndex="18" widget="Edit"/>
<Edit colName="cantidad_1" columnCount="1" comment="Digite la Cantidad Pedida " fieldId="7" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="8" name="irtb00006.cantidad_1" posX="65" posY="4" repeat="true" rowCount="6" sqlTabName="irtb00006" stepX="1" stepY="0" tabIndex="19" widget="Edit"/>
<Edit colName="cantidad_2" columnCount="1" comment="Digite la Cantidad Llegada desde el Suplidor" fieldId="8" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="8" name="irtb00006.cantidad_2" posX="75" posY="4" repeat="true" rowCount="6" sqlTabName="irtb00006" stepX="1" stepY="0" tabIndex="20" widget="Edit"/>
<Edit autoNext="true" colName="maquina" columnCount="1" comment="Digite la maquina que pertence el repuesto" fieldId="10" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="irtb00006.maquina" posX="85" posY="4" repeat="true" rowCount="6" sqlTabName="irtb00006" stepX="1" stepY="0" tabIndex="21" widget="Edit"/>
<Label gridHeight="1" gridWidth="21" name="label15" posX="2" posY="10" text="Descripcion Maquina :"/>
<Edit colName="nombre" fieldId="11" gridHeight="1" gridWidth="30" name="nombre" noEntry="true" posX="24" posY="10" sqlTabName="formonly" tabIndex="22" widget="Edit"/>
</Group>
</Grid>
</Form>
</ManagedForm>
+75
View File
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="3140a" name="ManagedForm" uid="{880abc76-a5ca-4068-8928-35f1ad27d533}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record additionalTables="" joinLeft="" joinOperator="" joinRight="" name="Undefined" order="" uid="{dca6f33c-3a18-4b8c-a78c-e6b7ea8cb404}" where="">
<RecordField colName="codigo" fieldIdRef="0" fieldType="TABLE_COLUMN" name="irtb00009.codigo" sqlTabName="irtb00009" sqlType="SMALLINT" table_alias_name="" uid="{a567507f-3f28-45fd-86d7-bcd6c222a7ef}"/>
<RecordField colName="nombre" fieldIdRef="1" fieldType="TABLE_COLUMN" name="irtb00009.nombre" sqlTabName="irtb00009" sqlType="VARCHAR" table_alias_name="" uid="{ebae22c0-049a-447f-9631-f6266799f8c0}"/>
<RecordField colName="unidad_med" fieldIdRef="2" fieldType="TABLE_COLUMN" name="irtb00009.unidad_med" sqlTabName="irtb00009" sqlType="VARCHAR" table_alias_name="" uid="{121d108f-42ff-4d7a-ae34-2bf557f96aa5}"/>
<RecordField colName="modelo" fieldIdRef="3" fieldType="TABLE_COLUMN" name="irtb00009.modelo" sqlTabName="irtb00009" sqlType="VARCHAR" table_alias_name="" uid="{d984f754-b6be-4178-97aa-8655e9971a40}"/>
<RecordField colName="serie" fieldIdRef="4" fieldType="TABLE_COLUMN" name="irtb00009.serie" sqlTabName="irtb00009" sqlType="VARCHAR" table_alias_name="" uid="{60487471-d3f5-46fb-8231-a61164e02c28}"/>
<RecordField colName="fabricante" fieldIdRef="5" fieldType="TABLE_COLUMN" name="irtb00009.fabricante" sqlTabName="irtb00009" sqlType="VARCHAR" table_alias_name="" uid="{b1263bbb-6ccf-412d-98d0-b8468e3ccf1f}"/>
<RecordField colName="status_t" fieldIdRef="10" fieldType="TABLE_COLUMN" name="irtb00009.status_t" sqlTabName="irtb00009" sqlType="VARCHAR" table_alias_name="" uid="{5c0a2a4f-132b-47f1-aa64-f55d3a201112}"/>
<RecordField colName="us_crea" fieldIdRef="6" fieldType="TABLE_COLUMN" name="irtb00009.us_crea" sqlTabName="irtb00009" sqlType="VARCHAR" table_alias_name="" uid="{2c2829f3-4a73-4b9b-bc28-267f573eceec}"/>
<RecordField colName="us_mod" fieldIdRef="8" fieldType="TABLE_COLUMN" name="irtb00009.us_mod" sqlTabName="irtb00009" sqlType="VARCHAR" table_alias_name="" uid="{9587f90b-a0bf-416c-a97f-790734234bff}"/>
<RecordField colName="fech_crea" fieldIdRef="7" fieldType="TABLE_COLUMN" name="irtb00009.fech_crea" qual1="YEAR" qualFraction="FRACTION(3)" sqlTabName="irtb00009" sqlType="DATETIME" table_alias_name="" uid="{cdae8379-cc6a-46e9-9474-b48daff67b04}"/>
<RecordField colName="fech_mod" fieldIdRef="9" fieldType="TABLE_COLUMN" name="irtb00009.fech_mod" qual1="YEAR" qualFraction="FRACTION(3)" sqlTabName="irtb00009" sqlType="DATETIME" table_alias_name="" uid="{93c461e0-fee8-49db-867a-9f5784bb58ce}"/>
<RecordField colName="" fieldIdRef="11" name="departamento" sqlTabName="" table_alias_name="" uid="{40ce2fcd-a9e0-40f6-b2f9-1766102e98e9}"/>
<RecordField fieldIdRef="12" name="xcodigo_externo" uid="{8a1fd0ec-b66a-4b87-92b9-05c5215c04ee}"/>
<RecordField fieldIdRef="13" name="id_codigo" uid="{1accc97e-3806-4cbb-8b19-383080704cb8}"/>
<RecordField fieldIdRef="14" name="desc_activo" uid="{fddd333f-5ceb-4434-9966-b08afa839c95}"/>
<RecordField fieldIdRef="15" name="num_emp" uid="{203158d0-baad-41fc-be67-2348c1b6dc1b}"/>
<RecordField fieldIdRef="16" name="cuenta_no" uid="{c9ab8f1a-65cf-4600-bede-595a26a062d4}"/>
<RecordField fieldIdRef="17" name="ubicacion" uid="{30ca4a44-8231-42da-a9bf-be2651836922}"/>
<RecordField fieldIdRef="18" name="marca" uid="{0b3a8435-afe3-4155-8fcc-6f093d096e2a}"/>
<RecordField fieldIdRef="19" name="codigo_externo" uid="{3e842fbe-8cf8-4d59-a480-e282b113ea66}"/>
<RecordField fieldIdRef="20" name="id_maintain" uid="{e14d60f1-6e46-479d-abda-8d078762969e}"/>
</Record>
<Form gridHeight="16" gridWidth="90" name="irfmmt009" text="MAQUINAS">
<ToolBar name="menu">
<ToolBarItem image="find" name="buscar" text="Buscar"/>
<ToolBarItem image="quit" name="salir" text="Salir"/>
</ToolBar>
<Grid gridHeight="14" gridWidth="84" name="Grid1" posX="3" posY="1">
<Label gridHeight="1" gridWidth="6" name="Label1" posX="4" posY="1" text="Codigo"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" autoNext="true" case="upper" colName="codigo" comment="Digite el codigo de la unidad de medida" fieldId="0" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="irtb00009.codigo" posX="17" posY="1" sqlTabName="irtb00009" sqlType="SMALLINT" tabIndex="1" table_alias_name="" widget="Edit"/>
<Label gridHeight="1" gridWidth="18" name="Label7" posX="51" posY="1" text="Departamento"/>
<Label gridHeight="1" gridWidth="8" name="Label2" posX="4" posY="2" text="Nombre"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" case="upper" colName="nombre" comment="Digite el nombre de la unidad de medida" fieldId="1" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="30" name="irtb00009.nombre" posX="17" posY="2" sqlTabName="irtb00009" sqlType="VARCHAR" tabIndex="2" table_alias_name="" widget="Edit"/>
<ComboBox aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="11" gridHeight="1" gridWidth="30" items="" name="departamento" posX="51" posY="2" scroll="true" sqlTabName="" tabIndex="12" table_alias_name="" title="ComboBox1" widget="ComboBox"/>
<Label gridHeight="1" gridWidth="6" name="Label3" posX="4" posY="3" text="Unidad"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" case="upper" colName="unidad_med" comment="Digite la unidad medida de la unidad de medida" fieldId="2" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="4" name="irtb00009.unidad_med" posX="17" posY="3" sqlTabName="irtb00009" sqlType="VARCHAR" tabIndex="3" table_alias_name="" widget="Edit"/>
<Label gridHeight="1" gridWidth="6" name="Label4" posX="4" posY="4" text="Modelo"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" autoNext="true" case="upper" colName="modelo" fieldId="3" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="16" name="irtb00009.modelo" posX="17" posY="4" sqlTabName="irtb00009" sqlType="VARCHAR" tabIndex="4" table_alias_name="" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="label8" posX="37" posY="4" text="Activo"/>
<Edit fieldId="13" gridHeight="1" gridWidth="10" name="id_codigo" posX="49" posY="4" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="14" gridHeight="1" gridWidth="23" name="desc_activo" noEntry="true" posX="60" posY="4" tabIndex="-1" title="edit1" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="label10" posX="37" posY="5" text="ID MaintainX"/>
<Edit fieldId="20" gridHeight="1" gridWidth="10" name="id_maintain" noEntry="true" posX="49" posY="5" scroll="true" tabIndex="-1" title="edit1" widget="Edit"/>
<Label gridHeight="1" gridWidth="5" name="Label5" posX="4" posY="7" text="Serie"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" autoNext="true" case="upper" colName="serie" fieldId="4" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="16" name="irtb00009.serie" posX="17" posY="7" sqlTabName="irtb00009" sqlType="VARCHAR" tabIndex="5" table_alias_name="" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="label9" posX="37" posY="7" text="Codigo Externo"/>
<Edit fieldId="12" gridHeight="1" gridWidth="10" name="xcodigo_externo" posX="49" posY="7" tabIndex="-1" title="edit1" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="Label6" posX="4" posY="8" text="Fabricante"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" autoNext="true" case="upper" colName="fabricante" fieldId="5" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="45" name="irtb00009.fabricante" posX="17" posY="8" sqlTabName="irtb00009" sqlType="VARCHAR" tabIndex="6" table_alias_name="" widget="Edit"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="status_t" fieldId="10" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="1" name="irtb00009.status_t" noEntry="true" posX="2" posY="9" sqlTabName="irtb00009" sqlType="VARCHAR" tabIndex="7" table_alias_name="" widget="Edit"/>
<Label posX="1" posY="11" text="Usuario Creador"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="us_crea" fieldId="6" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="10" name="irtb00009.us_crea" noEntry="true" posX="18" posY="11" sqlTabName="irtb00009" sqlType="VARCHAR" tabIndex="8" table_alias_name="" widget="Edit"/>
<Label posX="42" posY="11" text="Usuario Modificador"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="us_mod" fieldId="8" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="11" name="irtb00009.us_mod" noEntry="true" posX="62" posY="11" sqlTabName="irtb00009" sqlType="VARCHAR" tabIndex="9" table_alias_name="" widget="Edit"/>
<Label posX="1" posY="12" text="Fecha Creacion"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="fech_crea" fieldId="7" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="17" name="irtb00009.fech_crea" noEntry="true" posX="18" posY="12" qual1="YEAR" qualFraction="FRACTION(3)" sqlTabName="irtb00009" sqlType="DATETIME" tabIndex="10" table_alias_name="" widget="Edit"/>
<Label posX="42" posY="12" text="Fecha Modificacion"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="fech_mod" fieldId="9" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="16" name="irtb00009.fech_mod" noEntry="true" posX="62" posY="12" qual1="YEAR" qualFraction="FRACTION(3)" sqlTabName="irtb00009" sqlType="DATETIME" tabIndex="11" table_alias_name="" widget="Edit"/>
<Phantom fieldId="15" name="num_emp" widget="Phantom"/>
<Phantom fieldId="16" name="cuenta_no" widget="Phantom"/>
<Phantom fieldId="17" name="ubicacion" widget="Phantom"/>
<Phantom fieldId="18" name="marca" widget="Phantom"/>
<Phantom fieldId="19" name="codigo_externo" widget="Phantom"/>
</Grid>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewBkAGMAYQA2AGYAMwAzAGMALQAzAGEAMQA4AC0ANABiADgAYwAtAGEANwA4AGMALQBlADYAYgA3AGUAYQA4AGMAYgA0ADAANAB9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ==]]>
</DiagramLayout>
</ManagedForm>
+128
View File
@@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="3140a" name="managedform" uid="{badb9c4b-e871-4b1c-8417-60cbbc020477}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record name="record1" uid="{b00fd119-b065-4717-8b79-3423175c51e9}">
<RecordField fieldIdRef="1" name="numero_doc" uid="{eaa7f67e-2f78-4834-b8ad-f14be3febbd5}"/>
<RecordField fieldIdRef="2" name="fecha" uid="{36a9b843-a9a5-48e8-b708-7a37fa211910}"/>
<RecordField fieldIdRef="3" name="nombreUsuario" uid="{70496c7b-0fb7-4223-b77e-1c586ded8259}"/>
<RecordField fieldIdRef="4" name="email" uid="{428fc4f8-11fd-4bcb-a264-27d3a33149a7}"/>
<RecordField fieldIdRef="5" name="num_oc" uid="{6f889b23-5120-4d4e-8671-74634e76d3ca}"/>
<RecordField fieldIdRef="40" name="orden_trabajo" uid="{7d91381a-0546-4e8f-9d12-6503ea94bebe}"/>
<RecordField fieldIdRef="6" name="cliente" uid="{5c79dfec-1aaa-410c-b6a4-a29013f94b3a}"/>
<RecordField fieldIdRef="7" name="bodega" uid="{6680e9b9-1e52-4fa2-b01f-9ada9873b7fc}"/>
<RecordField fieldIdRef="16" name="bodega_destino" uid="{65a13c2b-c67a-437c-8935-a8d31bb25e68}"/>
<RecordField fieldIdRef="21" name="tipo_cliente" uid="{82cc74ed-a84f-4fc1-99e4-329e6493f2d2}"/>
<RecordField fieldIdRef="22" name="sec_cliente" uid="{7bebbe71-76e3-4ad4-8206-7d1b04908dcc}"/>
<RecordField fieldIdRef="24" name="estado" uid="{0bb6854e-4d3b-44a7-bda4-f3eff5358c5e}"/>
<RecordField fieldIdRef="15" name="cod_mov" uid="{792f75f2-05cc-4a80-b33a-960a5a7e1b1c}"/>
<RecordField fieldIdRef="32" name="observacion" uid="{8d49204b-4b05-489a-91a0-12c56538f49d}"/>
<RecordField fieldIdRef="35" name="url_file" uid="{5b17e78b-6cf6-4233-9867-c8244bd78aaf}"/>
<RecordField fieldIdRef="36" name="estado_proceso" uid="{5ea7d045-d40c-470d-98ca-4589e7a89c33}"/>
</Record>
<Record name="sdetalle" uid="{c2538d05-dba8-4d07-846a-4a21d5982959}">
<RecordField fieldIdRef="23" name="area" uid="{ffbb45e2-2d02-4ad8-ae53-e1b6bfa4fa59}"/>
<RecordField fieldIdRef="8" name="cod_n" uid="{92a0675a-25c1-4745-be7b-665cd0af0aa8}"/>
<RecordField fieldIdRef="9" name="cod_grupo" uid="{36167830-7d99-42ee-b0b1-a45a8d415086}"/>
<RecordField fieldIdRef="10" name="cod_tipo" uid="{3ce38a71-7140-4a2a-bf7b-edb037c79d09}"/>
<RecordField fieldIdRef="11" name="cod_sec" uid="{cc429c14-dc69-4218-90f2-964bc7a250f3}"/>
<RecordField fieldIdRef="12" name="descripcion" uid="{3a121d14-7c13-4e5b-94e8-4d6c88d2183b}"/>
<RecordField fieldIdRef="13" name="unidad_med" uid="{a87db087-ea33-4058-9b69-a6840e980c60}"/>
<RecordField fieldIdRef="14" name="cantidad_1" uid="{db3234ee-579e-4967-93d0-ba30d6cee501}"/>
<RecordField fieldIdRef="19" name="cantidad" uid="{32f10087-7851-42f2-b767-7e43a2b4e27c}"/>
<RecordField fieldIdRef="17" name="cantidad_o1" uid="{d06d1953-7cc0-4a31-a173-4d429a2a0c61}"/>
<RecordField fieldIdRef="18" name="cantidad1" uid="{8b2dd901-147e-4cd3-bd9c-7b0b7f871e55}"/>
<RecordField fieldIdRef="20" name="factor_conv" uid="{440baef4-fe66-40db-a954-4dc0d2807466}"/>
</Record>
<Record name="busqueda" uid="{36e01065-1f79-4410-af47-9740966ca97e}">
<RecordField fieldIdRef="29" name="estado1" uid="{c5077cdd-2acd-42b6-8f7b-e17c4e5a8ef9}"/>
<RecordField fieldIdRef="37" name="estado_proceso1" uid="{b78666c6-92e4-443d-814f-32d569ca4cbf}"/>
<RecordField fieldIdRef="25" name="tipo_documento" uid="{5e1ded01-49da-48f5-9b7d-774197eb6ac9}"/>
<RecordField fieldIdRef="26" name="numeroid" uid="{a797005b-74d3-4c68-b518-71e10f888fc2}"/>
<RecordField fieldIdRef="27" name="fechadoc" uid="{cffee896-52db-45db-9d9b-30f207e1b6bc}"/>
<RecordField fieldIdRef="28" name="nombre" uid="{e04ea53e-fb57-41f4-b158-d95f631081e3}"/>
<RecordField fieldIdRef="31" name="observacion1" uid="{7ec63531-db16-459a-b40e-31a784b7a6fb}"/>
<RecordField fieldIdRef="34" name="bodega_origen" uid="{ea512b5b-81d3-4680-8ad5-7072f924ed7a}"/>
<RecordField fieldIdRef="38" name="bodega_destino1" uid="{21ef1fc4-b84f-4225-8281-8bff165758d1}"/>
<RecordField fieldIdRef="30" name="cod_mov1" uid="{1f3cc51d-70d8-4e72-9bf4-8c8965db47ac}"/>
<RecordField fieldIdRef="33" name="bodega1" uid="{7a23f987-88c2-43b3-9d85-987cff8d8170}"/>
<RecordField fieldIdRef="39" name="bodega2" uid="{0f7b5d80-052f-4105-8704-9d449851f579}"/>
</Record>
<Form gridHeight="26" gridWidth="142" name="form" text="Requisiciones Productos Almacenes">
<Folder gridHeight="24" gridWidth="137" name="folder1" posX="5" posY="2">
<Page name="page1" text="Requisiciones">
<Grid gridHeight="10" gridWidth="114" name="grid2" posX="3" posY="2">
<Table gridHeight="6" gridWidth="112" name="table2" posX="2" posY="2" totalRows="5">
<Edit fieldId="29" gridHeight="1" gridWidth="8" name="estado1" posX="0" posY="0" scroll="true" tabIndex="-1" title="Estado" widget="Edit"/>
<Edit fieldId="37" gridHeight="1" gridWidth="8" name="estado_proceso1" posX="8" posY="0" scroll="true" tabIndex="-1" title="Estado Proceso" widget="Edit"/>
<Edit fieldId="25" gridHeight="1" gridWidth="8" name="tipo_documento" posX="16" posY="0" tabIndex="-1" title="Tipo Documento" widget="Edit"/>
<Edit fieldId="26" gridHeight="1" gridWidth="8" name="numeroid" posX="24" posY="0" tabIndex="-1" title="Numero Documento" widget="Edit"/>
<Edit fieldId="27" gridHeight="1" gridWidth="8" name="fechadoc" posX="32" posY="0" tabIndex="-1" title="Fecha" widget="Edit"/>
<Edit fieldId="28" gridHeight="1" gridWidth="8" name="nombre" posX="40" posY="0" scroll="true" tabIndex="-1" title="Cliente" widget="Edit"/>
<Edit fieldId="31" gridHeight="1" gridWidth="8" name="observacion1" posX="48" posY="0" scroll="true" tabIndex="-1" title="Observacion" widget="Edit"/>
<Edit fieldId="34" gridHeight="1" gridWidth="8" name="bodega_origen" posX="56" posY="0" scroll="true" tabIndex="-1" title="Bodega Origen" widget="Edit"/>
<Edit fieldId="38" gridHeight="1" gridWidth="11" name="bodega_destino1" posX="64" posY="0" scroll="true" tabIndex="-1" title="Bodega Destino" widget="Edit"/>
<Edit fieldId="30" gridHeight="1" gridWidth="8" hidden="true" name="cod_mov1" posX="75" posY="0" tabIndex="-1" title="edit2" widget="Edit"/>
<Edit fieldId="33" gridHeight="1" gridWidth="8" hidden="true" name="bodega1" posX="83" posY="0" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="39" gridHeight="1" gridWidth="8" hidden="true" name="bodega2" posX="91" posY="0" tabIndex="-1" title="edit1" widget="Edit"/>
</Table>
</Grid>
</Page>
<Page name="page2" text="Administracion">
<Grid gridHeight="22" gridWidth="134" name="grid1" posX="3" posY="1">
<Group gridHeight="8" gridWidth="131" name="group1" posX="2" posY="2" text="Encabezado">
<Label gridHeight="1" gridWidth="10" name="label3" posX="1" posY="1" text="Usuario"/>
<Edit fieldId="3" gridHeight="1" gridWidth="24" name="nombreUsuario" noEntry="true" posX="12" posY="1" scroll="true" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="4" gridHeight="1" gridWidth="21" name="email" noEntry="true" posX="38" posY="1" tabIndex="-1" title="edit2" widget="Edit"/>
<Edit fieldId="24" gridHeight="1" gridWidth="23" justify="center" name="estado" noEntry="true" posX="61" posY="1" reverse="true" scroll="true" tabIndex="-1" title="edit2" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="label7" posX="1" posY="2" text="Codigo Mov"/>
<ComboBox fieldId="15" gridHeight="1" gridWidth="24" items="" name="cod_mov" posX="12" posY="2" tabIndex="-1" title="combobox1" widget="ComboBox"/>
<Label gridHeight="1" gridWidth="10" name="label4" posX="38" posY="2" text="Orden Compra"/>
<Edit fieldId="5" gridHeight="1" gridWidth="10" name="num_oc" posX="49" posY="2" tabIndex="-1" title="edit2" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="label1" posX="1" posY="3" text="Numero Doc."/>
<Edit fieldId="1" gridHeight="1" gridWidth="10" name="numero_doc" noEntry="true" posX="12" posY="3" tabIndex="-1" title="edit1" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="label11" posX="38" posY="3" text="Orden Trabajo"/>
<Edit fieldId="40" gridHeight="1" gridWidth="19" name="orden_trabajo" posX="49" posY="3" tabIndex="-1" title="edit1" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="label2" posX="1" posY="4" text="Fecha"/>
<Edit fieldId="2" gridHeight="1" gridWidth="10" name="fecha" noEntry="true" posX="12" posY="4" tabIndex="-1" title="edit2" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="label5" posX="38" posY="4" text="Proveedor"/>
<Edit fieldId="21" gridHeight="1" gridWidth="4" name="tipo_cliente" noEntry="true" posX="49" posY="4" tabIndex="-1" title="edit2" widget="Edit"/>
<Edit fieldId="22" gridHeight="1" gridWidth="10" name="sec_cliente" noEntry="true" posX="55" posY="4" tabIndex="-1" title="edit3" widget="Edit"/>
<Edit fieldId="6" gridHeight="1" gridWidth="29" name="cliente" noEntry="true" posX="67" posY="4" scroll="true" tabIndex="-1" title="edit2" widget="Edit"/>
<Button gridHeight="1" gridWidth="10" image="fa-paperclip" name="atardocumento" posX="101" posY="4" tabIndex="-1"/>
<Label gridHeight="1" gridWidth="10" name="label6" posX="1" posY="5" text="Bodega"/>
<ComboBox fieldId="7" gridHeight="1" gridWidth="24" items="" name="bodega" posX="12" posY="5" tabIndex="-1" title="edit2" widget="ComboBox"/>
<Label gridHeight="1" gridWidth="10" name="label9" posX="38" posY="5" text="Observacion"/>
<Edit fieldId="32" gridHeight="1" gridWidth="46" name="observacion" posX="49" posY="5" scroll="true" tabIndex="-1" title="edit1" widget="Edit"/>
<Button gridHeight="1" gridWidth="10" image="open2" name="abrirdocumento" posX="101" posY="5" tabIndex="-1"/>
<Label gridHeight="1" gridWidth="10" name="label10" posX="1" posY="6" text="Estado Proceso"/>
<Edit fieldId="36" gridHeight="1" gridWidth="24" name="estado_proceso" noEntry="true" posX="12" posY="6" scroll="true" tabIndex="-1" title="edit1" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="label8" posX="38" posY="6" text="Bodega Destino"/>
<ComboBox fieldId="16" gridHeight="1" gridWidth="18" items="" name="bodega_destino" noEntry="true" posX="49" posY="6" tabIndex="-1" title="combobox1" widget="ComboBox"/>
<Edit fieldId="35" gridHeight="1" gridWidth="31" name="url_file" noEntry="true" posX="68" posY="6" scroll="true" tabIndex="-1" title="edit1" widget="Edit"/>
</Group>
<Group gridHeight="10" gridWidth="132" name="group2" posX="2" posY="10" text="Detalle">
<Table gridHeight="6" gridWidth="129" name="table1" posX="2" posY="2" totalRows="5">
<Phantom fieldId="23" name="area" widget="Phantom"/>
<ButtonEdit action="buscar" fieldId="8" gridHeight="1" gridWidth="8" name="cod_n" posX="0" posY="0" tabIndex="-1" title="Clase" widget="ButtonEdit"/>
<ButtonEdit action="buscar" fieldId="9" gridHeight="1" gridWidth="8" name="cod_grupo" posX="8" posY="0" tabIndex="-1" title="Grupo" widget="ButtonEdit"/>
<ButtonEdit action="buscar" fieldId="10" gridHeight="1" gridWidth="8" name="cod_tipo" posX="16" posY="0" tabIndex="-1" title="Tipo" widget="ButtonEdit"/>
<ButtonEdit action="buscar" fieldId="11" gridHeight="1" gridWidth="8" name="cod_sec" noEntry="false" posX="24" posY="0" tabIndex="-1" title="Medida" widget="ButtonEdit"/>
<Edit fieldId="12" gridHeight="1" gridWidth="20" name="descripcion" noEntry="true" posX="32" posY="0" scroll="true" tabIndex="-1" title="Descripcion" widget="Edit"/>
<Edit fieldId="13" gridHeight="1" gridWidth="8" name="unidad_med" noEntry="true" posX="52" posY="0" tabIndex="-1" title="Unidad Med" widget="Edit"/>
<Edit fieldId="14" gridHeight="1" gridWidth="12" name="cantidad_1" posX="60" posY="0" tabIndex="-1" title="Cantidad" widget="Edit"/>
<Edit fieldId="19" gridHeight="1" gridWidth="12" name="cantidad" noEntry="true" posX="72" posY="0" tabIndex="-1" title="Cantidad Afectar" widget="Edit"/>
<Edit fieldId="17" gridHeight="1" gridWidth="8" hidden="true" name="cantidad_o1" posX="84" posY="0" tabIndex="-1" title="edit2" widget="Edit"/>
<Edit fieldId="18" gridHeight="1" gridWidth="8" hidden="true" name="cantidad1" posX="92" posY="0" tabIndex="-1" title="edit3" widget="Edit"/>
<Edit fieldId="20" gridHeight="1" gridWidth="8" hidden="true" name="factor_conv" posX="100" posY="0" tabIndex="-1" title="edit2" widget="Edit"/>
</Table>
</Group>
</Grid>
</Page>
</Folder>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewBjADIANQAzADgAZAAwADUALQBkAGIAYQA4AC0ANABkADAANwAtADgANAA2AGEALQA0AGEAMgAxAGQANQA5ADgAMgA5ADUAOQB9QHWzM6rszgG/+ZmZxmZlpj9gYk3S8an8AQAAAEwAewAzADYAZQAwADEAMAA2ADUALQAxAGYANwA5AC0ANAA0ADEAMAAtAGEAZgA0ADcALQA5ADcANAAwADkANgA2AGMAYQA5ADcAZQB9QEMzM6GZmsVAOMzNW2Zn6T9wYk3S8an8AQAAAEwAewBiADAAMABmAGQAMQAxADkALQBiADAANgA1AC0ANAA3ADEANwAtADgAYgA3ADkALQAzADQAMgAzADEANwA1AGMANQAxAGUAOQB9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ==]]>
</DiagramLayout>
</ManagedForm>
+61
View File
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm fileVersion="31400" gstVersion="3140a" name="managedform" uid="{491cae32-ecef-4e5f-9cae-5c64a6477442}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record name="record1" uid="{88b7371d-2575-4008-afe2-57d2c06a0f6e}">
<RecordField fieldIdRef="1" name="etiqueta" uid="{6b3b61c0-086b-4e9e-8678-12c4c1d799f6}"/>
<RecordField fieldIdRef="10" name="estado1" uid="{4b503268-dd99-43aa-aba4-573622468730}"/>
<RecordField fieldIdRef="14" name="idestado1" uid="{765948bf-00e0-49ee-bcaf-5cbaf98feb75}"/>
</Record>
<Record name="sautoriza" uid="{c3c0a67e-4a33-4a40-86ce-4d650995b9c9}">
<RecordField fieldIdRef="2" name="estado" uid="{401d8c4d-c2fb-4392-91f9-da4c021bda1f}"/>
<RecordField fieldIdRef="13" name="idestado" uid="{b276571b-8a23-4d3a-a9b8-4433c6e0d0bb}"/>
<RecordField fieldIdRef="3" name="tipo_documento" uid="{ba452fdb-60ae-456e-9c77-b7a70b1aac20}"/>
<RecordField fieldIdRef="4" name="numeroid" uid="{347dfce9-07d0-47df-b417-98dce54caa8d}"/>
<RecordField fieldIdRef="5" name="fechadoc" uid="{236af850-2f3c-4464-b177-cf7acbcb437a}"/>
<RecordField fieldIdRef="6" name="nombre" uid="{bb372441-2342-4a81-b815-e61a87d2d3cd}"/>
<RecordField fieldIdRef="7" name="observacion" uid="{03371e43-b435-44b9-95cc-5aed11acfdfb}"/>
<RecordField fieldIdRef="11" name="usuario" uid="{8d00c906-ef85-4edd-b224-74343b9647f3}"/>
<RecordField fieldIdRef="8" name="cod_mov" uid="{1d1ee03a-9460-4416-adcb-1351ff37e6ae}"/>
<RecordField fieldIdRef="12" name="us_crea" uid="{db4f1974-2ab0-4ffb-af38-feeab66329ea}"/>
</Record>
<Form gridHeight="18" gridWidth="197" name="form" text="AUTORIZACIONES REQUISICIONES REPUESTOS">
<Grid gridHeight="16" gridWidth="194" name="grid1" posX="3" posY="1">
<Edit fieldId="1" gridHeight="1" gridWidth="54" justify="center" name="etiqueta" posX="5" posY="1" style="encabezado" tabIndex="-1" title="edit1" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="label1" posX="2" posY="3" text="Criterio Busqueda"/>
<Label gridHeight="1" gridWidth="8" name="label2" posX="18" posY="3" text="Estado"/>
<ComboBox fieldId="10" gridHeight="1" gridWidth="22" items="AUTORIZADA, CERRADA, NO AUTORIZADA" name="estado1" posX="28" posY="3" tabIndex="-1" title="edit1" widget="ComboBox">
<Item lstrtext="false" name="AUTORIZADA" text="AUTORIZADA"/>
<Item lstrtext="false" name="CERRADA" text="CERRADA"/>
<Item lstrtext="false" name="NO AUTORIZADA" text="NO AUTORIZADA"/>
</ComboBox>
<Label gridHeight="1" gridWidth="8" name="label3" posX="18" posY="4" text="Proceso"/>
<ComboBox fieldId="14" gridHeight="1" gridWidth="22" items="EN PRODUCCION, EN PRE DESPACHO, PRODUCTOS INCOMPLETOS, EN PICKING" name="idestado1" posX="28" posY="4" tabIndex="-1" title="combobox1" widget="ComboBox">
<Item lstrtext="false" name="EN PRODUCCION" text="EN PRODUCCION"/>
<Item lstrtext="false" name="EN PRE DESPACHO" text="EN PRE DESPACHO"/>
<Item lstrtext="false" name="PRODUCTOS INCOMPLETOS" text="PRODUCTOS INCOMPLETOS"/>
<Item lstrtext="false" name="EN PICKING" text="EN PICKING"/>
</ComboBox>
<Table gridHeight="6" gridWidth="190" name="table2" posX="4" posY="6" totalRows="5">
<ComboBox fieldId="2" gridHeight="1" gridWidth="20" items="AUTORIZADA, CERRADA, NO AUTORIZADA" name="estado" noEntry="false" posX="0" posY="0" tabIndex="-1" title="Estado" widget="ComboBox">
<Item lstrtext="false" name="AUTORIZADA" text="AUTORIZADA"/>
<Item lstrtext="false" name="CERRADA" text="CERRADA"/>
<Item lstrtext="false" name="NO AUTORIZADA" text="NO AUTORIZADA"/>
</ComboBox>
<ComboBox fieldId="13" gridHeight="1" gridWidth="20" items="" name="idestado" posX="20" posY="0" scroll="true" tabIndex="-1" title="Estado Proceso" widget="ComboBox"/>
<ButtonEdit fieldId="3" gridHeight="1" gridWidth="30" name="tipo_documento" noEntry="true" posX="40" posY="0" scroll="true" tabIndex="-1" title="Tipo Documento" widget="ButtonEdit"/>
<Edit fieldId="4" gridHeight="1" gridWidth="8" name="numeroid" noEntry="true" posX="70" posY="0" tabIndex="-1" title="Numero Documento" widget="Edit"/>
<Edit fieldId="5" gridHeight="1" gridWidth="8" name="fechadoc" noEntry="true" posX="78" posY="0" tabIndex="-1" title="Fecha" widget="Edit"/>
<Edit fieldId="6" gridHeight="1" gridWidth="8" name="nombre" noEntry="true" posX="86" posY="0" tabIndex="-1" title="Cliente" widget="Edit"/>
<Edit fieldId="7" gridHeight="1" gridWidth="30" name="observacion" posX="94" posY="0" scroll="true" tabIndex="-1" title="Observacion" widget="Edit"/>
<Edit fieldId="11" gridHeight="1" gridWidth="30" name="usuario" noEntry="true" posX="124" posY="0" scroll="true" tabIndex="-1" title="Usuario" widget="Edit"/>
<Edit fieldId="8" gridHeight="1" gridWidth="8" hidden="true" name="cod_mov" posX="154" posY="0" tabIndex="-1" title="edit2" widget="Edit"/>
<Edit fieldId="12" gridHeight="1" gridWidth="8" hidden="true" name="us_crea" posX="162" posY="0" tabIndex="-1" title="edit1" widget="Edit"/>
</Table>
</Grid>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewBjADMAYwAwAGEANgA3AGUALQA0AGEAMwAzAC0ANABhADQAMAAtADgANgBjAGUALQA0AGQANgA1ADAAOQA5ADUAYgA5AGMAOQB9QCAAACQAACNAIAAAJAAAIz9wYk3S8an8AQAAAEwAewA4ADgAYgA3ADMANwAxAGQALQAyADUANwA1AC0ANAAwADAAOAAtAGEAZgBlADIALQA1ADcAZAAyAGMAMAA2AGEAMABmADYAZQB9wFJmZoszM1LATszNCmZmmz9gYk3S8an8AQ==]]>
</DiagramLayout>
</ManagedForm>
+82
View File
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="3140a" name="ManagedForm" uid="{cbadd891-34fb-4068-9a5d-352a4275838b}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record name="record1" uid="{a245a08c-6d04-4b10-91b2-4b8ea8ded8f4}">
<RecordField colName="cod_mov" fieldIdRef="17" name="cod_mov" sqlTabName="formonly" sqlType="SMALLINT" uid="{e4332d8d-736e-452d-928f-6fa2396cc405}"/>
<RecordField colName="descrip_mov" fieldIdRef="18" name="descrip_mov" sqlTabName="formonly" uid="{7153b0bb-91a8-4471-9e06-cf90c773ecf2}"/>
<RecordField colName="num_doc" fieldIdRef="6" name="num_doc" sqlTabName="formonly" uid="{fef87638-10b4-4516-a7f4-91d125819121}"/>
<RecordField colName="tipo" fieldIdRef="1" name="tipo" sqlTabName="formonly" uid="{37f43811-03ba-4d5c-a182-d22732a81c2f}"/>
<RecordField colName="orden_compra" fieldIdRef="0" fieldType="TABLE_COLUMN" name="irtb00006.orden_compra" sqlTabName="irtb00006" uid="{5e78e088-e69d-4b6a-b380-b64cfadd4516}"/>
<RecordField colName="cod_sp" fieldIdRef="3" name="cod_sp" sqlTabName="formonly" uid="{13774a63-b867-4e53-9ed5-efcb8a218a4a}"/>
<RecordField colName="cod_sp_sec" fieldIdRef="4" name="cod_sp_sec" sqlTabName="formonly" uid="{cb03fe26-c466-476b-98f9-653328c9f6c0}"/>
<RecordField colName="nom_sp" fieldIdRef="5" name="nom_sp" sqlTabName="formonly" uid="{b0afd485-df31-4980-a624-d55b5299549f}"/>
<RecordField colName="fecha" fieldIdRef="7" fieldType="TABLE_COLUMN" name="irtb00006.fecha" sqlTabName="irtb00006" uid="{d64c57aa-58cd-46b4-bd82-0118380771d6}"/>
<RecordField colName="conduce_no" fieldIdRef="2" name="conduce_no" sqlTabName="formonly" uid="{0cb15711-7f03-45da-b6bb-0f7aec36c94a}"/>
<RecordField colName="nombre_d" fieldIdRef="9" name="departamento" sqlTabName="formonly" uid="{58633aaf-63c6-4272-a87b-b5b31e65d6e0}"/>
</Record>
<Record name="s_movi1" uid="{febe8603-24c5-4743-941f-c3c6647b924c}">
<RecordField fieldIdRef="10" name="cod_n" uid="{2865dbd9-116f-4e95-b52b-721e11f86255}"/>
<RecordField fieldIdRef="12" name="cod_grupo" uid="{99f061e1-1e1a-48d7-94bd-7b3c8e285ee4}"/>
<RecordField fieldIdRef="14" name="cod_tipo" uid="{f4b0864d-dbf2-4d46-b8f7-525d53995d29}"/>
<RecordField fieldIdRef="13" name="cod_sec" uid="{ed6d5537-fdca-48e0-a1ef-7af8114e69a0}"/>
<RecordField fieldIdRef="11" name="cantidad_2" uid="{295be116-5b77-415e-9488-33de6e711c9e}"/>
<RecordField fieldIdRef="15" name="unidad_med" uid="{2f285cbc-2412-4a22-9719-cf6ea8b85d9a}"/>
<RecordField fieldIdRef="16" name="descrip_esp" uid="{27ae64ed-fe98-461c-8b44-7d629f9fd6fa}"/>
<RecordField defaultValue="NULL" fieldIdRef="19" name="codigo" uid="{057a3fee-ecb6-45c6-811a-40a1429c5ac9}"/>
<RecordField fieldIdRef="8" name="orden_trabajo" uid="{23ab2f51-ed82-4521-9528-9f9f3bc1f485}"/>
<RecordField fieldIdRef="20" name="Existencia" uid="{9253183f-a928-4bed-9d3d-63119fbc9acb}"/>
<RecordField fieldIdRef="21" name="num_emp" uid="{3e1e40f9-73ae-4100-b490-350b88675d3d}"/>
</Record>
<Form gridHeight="25" gridWidth="103" name="irfmmt036" style="basic" text="TRANSACCIONES INVENTARIOS">
<ToolBar name="toolbar1">
<ToolBarItem comment="Nuevo Documento Transaccional" image="new" name="nuevo" text="Documento"/>
<ToolBarItem comment="Criterio de busqueda" image="find" name="buscar" text="Buscar Documentos"/>
<ToolBarSeparator name="toolbarseparator1"/>
<ToolBarItem image="quit" name="salir" text="Salir"/>
</ToolBar>
<Grid gridHeight="25" gridWidth="103" name="grid1" posX="0" posY="0">
<Group gridHeight="7" gridWidth="68" name="group1" posX="1" posY="1" text="encabezado">
<Label gridHeight="1" gridWidth="15" name="label1" posX="2" posY="1" text="Tipo Movimiento"/>
<Edit autoNext="true" colName="cod_mov" comment="Digite Codigo Del Movimiento Correspondiente" fieldId="17" gridHeight="1" gridWidth="2" name="cod_mov" posX="20" posY="1" scroll="true" sqlTabName="formonly" sqlType="SMALLINT" tabIndex="1" widget="Edit"/>
<Edit colName="descrip_mov" fieldId="18" gridHeight="1" gridWidth="42" name="descrip_mov" noEntry="true" posX="25" posY="1" scroll="true" sqlTabName="formonly" tabIndex="2" widget="Edit"/>
<Label gridHeight="1" gridWidth="17" name="label2" posX="2" posY="2" text="Documento Numero"/>
<Edit colName="num_doc" fieldId="6" gridHeight="1" gridWidth="6" name="num_doc" posX="20" posY="2" scroll="true" sqlTabName="formonly" tabIndex="3" widget="Edit"/>
<Label gridHeight="1" gridWidth="6" name="label3" posX="27" posY="2" text="Orden"/>
<Edit autoNext="true" colName="tipo" fieldId="1" gridHeight="1" gridWidth="2" name="tipo" posX="34" posY="2" scroll="true" sqlTabName="formonly" tabIndex="4" widget="Edit"/>
<Edit autoNext="true" colName="orden_compra" comment="Digite Orden Compras para devolver " fieldId="0" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="8" name="irtb00006.orden_compra" posX="38" posY="2" scroll="true" sqlTabName="irtb00006" tabIndex="5" widget="Edit"/>
<Label gridHeight="1" gridWidth="9" name="label4" posX="2" posY="3" text="Suplidor"/>
<Edit colName="cod_sp" fieldId="3" gridHeight="1" gridWidth="2" name="cod_sp" posX="12" posY="3" scroll="true" sqlTabName="formonly" tabIndex="6" widget="Edit"/>
<Edit colName="cod_sp_sec" fieldId="4" gridHeight="1" gridWidth="4" name="cod_sp_sec" posX="16" posY="3" scroll="true" sqlTabName="formonly" tabIndex="7" widget="Edit"/>
<Edit colName="nom_sp" fieldId="5" gridHeight="1" gridWidth="32" name="nom_sp" noEntry="true" posX="23" posY="3" scroll="true" sqlTabName="formonly" tabIndex="8" widget="Edit"/>
<Label gridHeight="1" gridWidth="5" name="label5" posX="2" posY="4" text="Fecha"/>
<Edit autoNext="true" colName="fecha" comment="Digite Fecha Documento" fieldId="7" fieldType="TABLE_COLUMN" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="irtb00006.fecha" notNull="true" posX="10" posY="4" required="true" scroll="true" sqlTabName="irtb00006" tabIndex="9" widget="Edit"/>
<Label gridHeight="1" gridWidth="11" name="label6" posX="24" posY="4" text="Conduce No."/>
<Edit colName="conduce_no" fieldId="2" gridHeight="1" gridWidth="13" name="conduce_no" posX="42" posY="4" scroll="true" sqlTabName="formonly" tabIndex="10" widget="Edit"/>
<Label gridHeight="1" gridWidth="12" name="label7" posX="2" posY="5" text="Departamento"/>
<ComboBox colName="nombre_d" fieldId="9" gridHeight="1" gridWidth="28" items="" name="departamento" noEntry="false" posX="17" posY="5" scroll="true" sqlTabName="formonly" tabIndex="11" widget="ComboBox"/>
</Group>
<Group gridHeight="17" gridWidth="102" name="group2" posX="1" posY="8" text="detalle">
<Table gridHeight="9" gridWidth="100" name="s_movi1" posX="1" posY="2" totalRows="5">
<ButtonEdit action="buscaprod" fieldId="10" gridHeight="1" gridWidth="8" name="cod_n" posX="0" posY="0" tabIndex="-1" title="Codigo" unmovable="true" widget="ButtonEdit"/>
<ButtonEdit action="buscaprod" fieldId="12" gridHeight="1" gridWidth="8" name="cod_grupo" posX="8" posY="0" tabIndex="-1" title="" unmovable="true" widget="ButtonEdit"/>
<ButtonEdit action="buscaprod" fieldId="14" gridHeight="1" gridWidth="8" name="cod_tipo" posX="16" posY="0" tabIndex="-1" title="" unmovable="true" widget="ButtonEdit"/>
<ButtonEdit action="buscaprod" fieldId="13" gridHeight="1" gridWidth="8" name="cod_sec" posX="24" posY="0" tabIndex="-1" title="" unmovable="true" widget="ButtonEdit"/>
<Edit fieldId="11" gridHeight="1" gridWidth="8" name="cantidad_2" posX="32" posY="0" tabIndex="-1" title="Cantidad" unmovable="true" widget="Edit"/>
<Edit fieldId="15" gridHeight="1" gridWidth="8" name="unidad_med" noEntry="true" posX="40" posY="0" tabIndex="-1" title="Unidad Medida" unmovable="true" widget="Edit"/>
<Edit fieldId="16" gridHeight="1" gridWidth="8" name="descrip_esp" noEntry="true" posX="48" posY="0" scroll="true" tabIndex="-1" title="Descripcion" unmovable="true" widget="Edit"/>
<ComboBox defaultValue="NULL" fieldId="19" gridHeight="1" gridWidth="8" items="" name="codigo" posX="56" posY="0" tabIndex="-1" title="Maquina" unmovable="true" widget="ComboBox">
<Item lstrtext="false" name="NULL" text=""/>
</ComboBox>
<Edit fieldId="8" gridHeight="1" gridWidth="8" hidden="false" name="orden_trabajo" noEntry="false" posX="64" posY="0" scroll="true" tabIndex="-1" title="Orden trabajo" widget="Edit"/>
<Edit fieldId="20" gridHeight="1" gridWidth="8" name="Existencia" posX="72" posY="0" tabIndex="-1" title="Existencia" unmovable="true" widget="Edit"/>
<Edit fieldId="21" gridHeight="1" gridWidth="8" name="num_emp" posX="80" posY="0" scroll="true" tabIndex="-1" title="Empleado" unmovable="true" widget="Edit"/>
</Table>
</Group>
</Grid>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewBmAGUAYgBlADgANgAwADMALQAyADQAYwA1AC0ANAA3ADQAMwAtADkANAAxAGYALQBjADMAYwA2ADYANAA3AGIAOQAyADQAYwB9QHkVVYeAACdAS1VVjAAAKj9QYk3S8an8AQAAAEwAewBhADIANAA1AGEAMAA4AGMALQA2AGQAMAA0AC0ANABiADEAMAAtADkAMQBiADIALQA0AGIAOABlAGEAOABkAGUAZAA4AGYANAB9QCqqqu1VVZhAKqqq7VVVmAAAAAAAAAAAAQ==]]>
</DiagramLayout>
</ManagedForm>
+31
View File
@@ -0,0 +1,31 @@
database smarmotech
screen size 24 by 80
{
Departamento [a ][des ]
Maquina [cod] [f000 ]
[j]
Usuario Creador [f004 ] Usuario Modificador [f006 ]
Fecha Creacion [f005 ] Fecha Modificacion [f007 ]
}
end
tables
adtb00001,irtb00009,irtb00029
attributes
a = irtb00029.departamento,autonext,
comments= "Digite el Codigo del Departamento o <Ctrl-W> para ver departamentos";
cod = irtb00029.maquina, autonext,
comments= "Digite el Codigo de la Maquina o <Ctrl-W> para ver maquinas";
des = adtb00001.nom_dpto,noentry;
f000 = irtb00009.nombre,noentry;
f004 = irtb00029.us_crea, noentry;
f005 = irtb00029.fech_crea, noentry;
f006 = irtb00029.us_mod, noentry;
f007 = irtb00029.fech_mod, noentry;
j = irtb00029.status_t, noentry;
instructions
delimiters " "
end
+21
View File
@@ -0,0 +1,21 @@
database smarmotech
screen size 24 by 80
{
Ordenamiento [k]
Fecha de Corte [e ]
Codigo [a][b][c ][d ]
}
end
tables
irtb00002
attributes
a = irtb00002.cod_n;
b = irtb00002.cod_grupo;
c = irtb00002.cod_tipo;
d = irtb00002.cod_sec;
e = formonly.fecha1 type date,format = "dd/mm/yyyy";
k = formonly.decide type char,required,autonext,
comments = "Digite A - Alfabetico N - Numerico",
include = ("A","N"),upshift;
end
+23
View File
@@ -0,0 +1,23 @@
database smarmotech
screen size 24 by 80
{
Fecha Inicial [k ]
Fecha Final [p ]
Codigo [a]-[b]-[c ]-[d ]
}
end
tables
irtb00006
attributes
k = formonly.fech_in type date,format = "dd/mm/yyyy",
comments = "Introduzca Fecha Inicial ";
p = formonly.fech_fi type date,format = "dd/mm/yyyy",
comments = "Introduzca Fecha Final";
a = irtb00006.cod_n,autonext;
b = irtb00006.cod_grupo,autonext;
c = irtb00006.cod_tipo,autonext;
d = irtb00006.cod_sec,autonext;
instructions
delimiters " "
end
+16
View File
@@ -0,0 +1,16 @@
database smarmotech
screen size 24 by 80
{
Ordenamiento [k]
Codigo Movimiento [a ]
}
end
tables
irtb00005
attributes
a = irtb00005.cod_mov;
k = formonly.decide type char,required,autonext,
comments = "Digite A - Alfabetico N - Numerico",
include = ("A","N"),upshift;
end
+21
View File
@@ -0,0 +1,21 @@
database smarmotech
screen size 24 by 80
{
Fecha Corte [f ] Existencia [f4 ]
Codigo Repuesto [a]-[b]-[c ]-[d ] Total [f5 ]
}
end
tables
irtb00002
attributes
f = formonly.fech_fi type date ,format="dd/mm/yyyy";
f4 = formonly.t_existe,noentry;
f5 = formonly.t_valor,noentry;
a = irtb00002.cod_n;
b = irtb00002.cod_grupo;
c = irtb00002.cod_tipo;
d = irtb00002.cod_sec;
instructions
delimiters " "
end
+39
View File
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="31408" name="ManagedForm" uid="{644fde06-efcf-4d33-83a2-698130dc65ac}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record name="record1" uid="{db73b6e4-d90f-4f34-9f24-4fdf337d1ddc}">
<RecordField colName="decide" defaultValue="N" fieldIdRef="6" name="decide" sqlTabName="formonly" sqlType="CHAR" uid="{e0663fb8-38c5-4c23-bb30-38be26db87f8}"/>
<RecordField colName="cod_n" fieldIdRef="0" fieldType="TABLE_COLUMN" name="irtb00002.cod_n" sqlTabName="irtb00002" uid="{7c7060b1-360b-4960-9518-693acf86a9b1}"/>
<RecordField colName="cod_grupo" fieldIdRef="1" fieldType="TABLE_COLUMN" name="irtb00002.cod_grupo" sqlTabName="irtb00002" uid="{55de378d-8ad3-4a4b-829d-deee4c36f17c}"/>
<RecordField colName="cod_tipo" fieldIdRef="2" fieldType="TABLE_COLUMN" name="irtb00002.cod_tipo" sqlTabName="irtb00002" uid="{6543e891-7a7e-414b-b338-550c736ccee1}"/>
<RecordField colName="cod_sec" fieldIdRef="3" fieldType="TABLE_COLUMN" name="irtb00002.cod_sec" sqlTabName="irtb00002" uid="{72e26eb1-52c2-4b62-a06f-cf0299ee9a23}"/>
<RecordField colName="existencia" defaultValue="NO" fieldIdRef="4" name="existencia" sqlTabName="formonly" uid="{029690a5-8e27-4571-be07-b5ddd6c1dbc9}"/>
<RecordField colName="descrip_esp" fieldIdRef="5" fieldType="TABLE_COLUMN" name="irtb00002.descrip_esp" sqlTabName="irtb00002" uid="{018ab736-b9c8-4065-93b8-2827e99c5a44}"/>
</Record>
<Form gridHeight="12" gridWidth="68" name="irfmrp006" text="EXISTENCIAS REPUESTOS">
<Grid gridHeight="11" gridWidth="60" name="grid1" posX="0" posY="0">
<Label gridHeight="1" gridWidth="12" name="label1" posX="1" posY="1" text="Ordenamiento"/>
<ComboBox colName="decide" comment="Digite A - Alfabetico N - Numerico" defaultValue="N" fieldId="6" gridHeight="1" gridWidth="8" items="NUMERICO, ALFABETICO" name="decide" posX="23" posY="1" required="true" sqlTabName="formonly" sqlType="CHAR" tabIndex="1" widget="ComboBox">
<Item lstrtext="false" name="N" text="NUMERICO"/>
<Item lstrtext="false" name="A" text="ALFABETICO"/>
</ComboBox>
<Label gridHeight="1" gridWidth="6" name="label2" posX="1" posY="2" text="Codigo"/>
<Edit colName="cod_n" fieldId="0" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="irtb00002.cod_n" posX="23" posY="2" sqlTabName="irtb00002" tabIndex="2" widget="Edit"/>
<Edit colName="cod_grupo" fieldId="1" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="4" name="irtb00002.cod_grupo" posX="28" posY="2" sqlTabName="irtb00002" tabIndex="3" widget="Edit"/>
<Edit colName="cod_tipo" fieldId="2" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="5" name="irtb00002.cod_tipo" posX="34" posY="2" sqlTabName="irtb00002" tabIndex="4" widget="Edit"/>
<Edit colName="cod_sec" fieldId="3" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="5" name="irtb00002.cod_sec" posX="42" posY="2" sqlTabName="irtb00002" tabIndex="5" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="label3" posX="1" posY="3" text="Con Existencia?"/>
<ComboBox colName="existencia" comment="SI- Para imprimir solo los repuestos con existencias, NO- Para imprimir todos" defaultValue="NO" fieldId="4" gridHeight="1" gridWidth="6" items="SI, NO" name="existencia" posX="23" posY="3" sqlTabName="formonly" tabIndex="6" widget="ComboBox">
<Item lstrtext="false" name="SI" text="SI"/>
<Item lstrtext="false" name="NO" text="NO"/>
</ComboBox>
<Label gridHeight="1" gridWidth="11" name="label4" posX="1" posY="4" text="Descripcion"/>
<Edit colName="descrip_esp" fieldId="5" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="30" name="irtb00002.descrip_esp" posX="23" posY="4" sqlTabName="irtb00002" tabIndex="7" widget="Edit"/>
</Grid>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewBkAGIANwAzAGIANgBlADQALQBkADkAMABmAC0ANABmADMANAAtADkAZgAyADQALQA0AGYAZABmADMAMwA3AGQAMQBkAGQAYwB9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ==]]>
</DiagramLayout>
</ManagedForm>
+33
View File
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="31408" name="ManagedForm" uid="{49cf58f8-0836-404a-8a30-ef813c88a4b4}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record name="record1" uid="{566d70f2-eb24-43d8-91be-ffb4a14598e6}">
<RecordField colName="fech_in" fieldIdRef="3" name="fech_in" sqlTabName="formonly" sqlType="DATE" uid="{b7f721bd-ca6d-46de-a21c-a44238d25ac5}"/>
<RecordField colName="fech_fi" fieldIdRef="4" name="fech_fi" sqlTabName="formonly" sqlType="DATE" uid="{a40b22b5-76e5-4e95-b2dc-fac4e78dd6cc}"/>
<RecordField fieldIdRef="5" name="cod_mov" uid="{62224751-237f-4cae-be0e-624babdb6dba}"/>
<RecordField fieldIdRef="1" name="cod_n" uid="{85983bdc-d7e4-4f11-83d3-8e3dcb0df7a1}"/>
<RecordField fieldIdRef="2" name="cod_grupo" uid="{aab9923f-fd28-4b70-8612-5553991ba685}"/>
<RecordField fieldIdRef="6" name="cod_tipo" uid="{4d7ce396-e490-48a0-939e-fe1bceeca4de}"/>
<RecordField fieldIdRef="7" name="cod_sec" uid="{e74feb1d-38ea-4281-9340-fc9b4ea3bc5f}"/>
</Record>
<Form gridHeight="12" gridWidth="45" name="edfmrp118">
<Grid gridHeight="9" gridWidth="43" name="grid1" posX="1" posY="1">
<Label gridHeight="1" gridWidth="8" name="label5" posX="2" posY="2" text="Codigos Movimientos"/>
<ComboBox fieldId="5" gridHeight="1" gridWidth="29" items="" name="cod_mov" posX="11" posY="2" required="true" scroll="true" tabIndex="-1" title="combobox1" widget="ComboBox"/>
<Label gridHeight="1" gridWidth="8" name="label1" posX="2" posY="3" text="Codigo"/>
<Edit fieldId="1" gridHeight="1" gridWidth="4" name="cod_n" posX="11" posY="3" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="2" gridHeight="1" gridWidth="5" name="cod_grupo" posX="16" posY="3" tabIndex="-1" title="edit2" widget="Edit"/>
<Edit fieldId="6" gridHeight="1" gridWidth="5" name="cod_tipo" posX="22" posY="3" tabIndex="-1" title="edit3" widget="Edit"/>
<Edit fieldId="7" gridHeight="1" gridWidth="7" name="cod_sec" posX="28" posY="3" tabIndex="-1" title="edit4" widget="Edit"/>
<Label gridHeight="1" gridWidth="8" name="label3" posX="2" posY="4" text="Fecha Inicial"/>
<DateEdit colName="fech_in" fieldId="3" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="fech_in" posX="11" posY="4" required="true" sqlTabName="formonly" sqlType="DATE" tabIndex="1" widget="DateEdit"/>
<Label gridHeight="1" gridWidth="8" name="label4" posX="2" posY="5" text="Fecha Final"/>
<DateEdit colName="fech_fi" fieldId="4" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="fech_fi" posX="11" posY="5" required="true" sqlTabName="formonly" sqlType="DATE" tabIndex="2" widget="DateEdit"/>
</Grid>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewA1ADYANgBkADcAMABmADIALQBlAGIAMgA0AC0ANAAzAGQAOAAtADkAMQBiAGUALQBmAGYAYgA0AGEAMQA0ADUAOQA4AGUANgB9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ==]]>
</DiagramLayout>
</ManagedForm>
+33
View File
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="31408" name="ManagedForm" uid="{9eae210b-c0d8-4cc4-ab4f-d5e521d44605}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record name="record1" uid="{49236bed-8b4f-4072-82bc-fd7a7bb7608e}">
<RecordField colName="fecha1" fieldIdRef="0" name="fecha1" sqlTabName="formonly" sqlType="DATE" uid="{59fa1a62-0f27-4e01-92d8-4232afab454d}"/>
<RecordField colName="fecha2" fieldIdRef="1" name="fecha2" sqlTabName="formonly" sqlType="DATE" uid="{d19086da-c709-459e-9e70-2726cec0583b}"/>
<RecordField colName="cod_n" fieldIdRef="3" fieldType="TABLE_COLUMN" name="irtb00006.cod_n" sqlTabName="irtb00006" uid="{f85909f2-10ee-4da3-bc63-54b4d76e17a7}"/>
<RecordField colName="cod_grupo" fieldIdRef="4" fieldType="TABLE_COLUMN" name="irtb00006.cod_grupo" sqlTabName="irtb00006" uid="{5d1508db-a224-4694-9c60-8151f010a544}"/>
<RecordField colName="cod_tipo" fieldIdRef="5" fieldType="TABLE_COLUMN" name="irtb00006.cod_tipo" sqlTabName="irtb00006" uid="{02757f57-d2de-4548-8467-583da95172e2}"/>
<RecordField colName="cod_sec" fieldIdRef="6" fieldType="TABLE_COLUMN" name="irtb00006.cod_sec" sqlTabName="irtb00006" uid="{5320dbf5-1e18-427e-8faf-bd5e40053ef4}"/>
<RecordField fieldIdRef="2" name="departamento" uid="{441b34ef-940f-442a-8f13-2f4d3d5c0738}"/>
</Record>
<Form gridHeight="8" gridWidth="66" name="irfmrp008" text="CONSUMO POR MAQUINAS">
<Grid gridHeight="6" gridWidth="60" name="grid1" posX="1" posY="1">
<Label gridHeight="1" gridWidth="13" name="label1" posX="10" posY="0" text="Fecha Inicial"/>
<DateEdit colName="fecha1" comment="Digite Fecha Inicial" fieldId="0" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="fecha1" posX="29" posY="0" sqlTabName="formonly" sqlType="DATE" tabIndex="1" widget="DateEdit"/>
<Label gridHeight="1" gridWidth="11" name="label2" posX="10" posY="1" text="Fecha Final"/>
<DateEdit colName="fecha2" comment="Digite Fecha Final" fieldId="1" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="fecha2" posX="29" posY="1" sqlTabName="formonly" sqlType="DATE" tabIndex="2" widget="DateEdit"/>
<Label gridHeight="1" gridWidth="7" name="label3" posX="10" posY="2" text="Departamento"/>
<ComboBox fieldId="2" gridHeight="1" gridWidth="24" items="" name="departamento" posX="29" posY="2" scroll="true" tabIndex="-1" title="combobox1" widget="ComboBox"/>
<Label gridHeight="1" gridWidth="8" name="label4" posX="10" posY="3" text="Repuesto"/>
<Edit colName="cod_n" fieldId="3" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="1" name="irtb00006.cod_n" posX="29" posY="3" sqlTabName="irtb00006" tabIndex="3" widget="Edit"/>
<Edit colName="cod_grupo" fieldId="4" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="1" name="irtb00006.cod_grupo" posX="32" posY="3" sqlTabName="irtb00006" tabIndex="4" widget="Edit"/>
<Edit colName="cod_tipo" fieldId="5" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="2" name="irtb00006.cod_tipo" posX="35" posY="3" sqlTabName="irtb00006" tabIndex="5" widget="Edit"/>
<Edit colName="cod_sec" fieldId="6" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="irtb00006.cod_sec" posX="39" posY="3" sqlTabName="irtb00006" tabIndex="6" widget="Edit"/>
</Grid>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewA0ADkAMgAzADYAYgBlAGQALQA4AGIANABmAC0ANAAwADcAMgAtADgAMgBiAGMALQBmAGQANwBhADcAYgBiADcANgAwADgAZQB9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ==]]>
</DiagramLayout>
</ManagedForm>
+32
View File
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="31408" name="ManagedForm" uid="{33233fda-6e5d-4905-8531-82ceaccdd6ab}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record name="s_prod" uid="{8a8b4322-7f90-44d6-a69f-b9269e2c1395}">
<RecordField fieldIdRef="6" name="cod_n" uid="{8eb43f46-54b6-41be-b922-cad606793854}"/>
<RecordField fieldIdRef="7" name="cod_grupo" uid="{c7f3268c-a5ed-4aa0-9bf7-185ebc2e84bc}"/>
<RecordField fieldIdRef="8" name="cod_tipo" uid="{ebfec4e9-3f63-402e-95c7-95a324d6c59e}"/>
<RecordField fieldIdRef="9" name="cod_sec" uid="{f791bb9f-d625-47a5-997c-82359fcfb3d5}"/>
<RecordField fieldIdRef="10" name="descrip_esp" uid="{1b421356-6f98-46f8-81f3-52083291bf11}"/>
<RecordField fieldIdRef="11" name="unidad_med" uid="{a5ea400b-4c6d-45d3-b894-4b5172614bd0}"/>
<RecordField fieldIdRef="12" name="existencia" uid="{5f81b113-aba1-4683-a497-b90bdce6be24}"/>
</Record>
<Form gridHeight="14" gridWidth="80" name="irfmwd001">
<Grid gridHeight="12" gridWidth="72" name="grid1" posX="2" posY="1">
<Label gridHeight="1" gridWidth="21" name="label1" posX="15" posY="0" text="Busqueda de Repuestos"/>
<Table gridHeight="6" gridWidth="64" name="table1" posX="2" posY="3" totalRows="5">
<Edit fieldId="6" gridHeight="1" gridWidth="8" name="cod_n" posX="0" posY="0" scroll="true" tabIndex="-1" title="PRODUCTOS" widget="Edit"/>
<Edit fieldId="7" gridHeight="1" gridWidth="8" name="cod_grupo" posX="8" posY="0" tabIndex="-1" title="" widget="Edit"/>
<Edit fieldId="8" gridHeight="1" gridWidth="8" name="cod_tipo" posX="16" posY="0" tabIndex="-1" title="" widget="Edit"/>
<Edit fieldId="9" gridHeight="1" gridWidth="8" name="cod_sec" posX="24" posY="0" tabIndex="-1" title="" widget="Edit"/>
<Edit fieldId="10" gridHeight="1" gridWidth="8" name="descrip_esp" posX="32" posY="0" scroll="true" tabIndex="-1" title="Descripcion" widget="Edit"/>
<Edit fieldId="11" gridHeight="1" gridWidth="8" name="unidad_med" posX="40" posY="0" tabIndex="-1" title="Unidad MEd" widget="Edit"/>
<Edit fieldId="12" gridHeight="1" gridWidth="8" name="existencia" posX="48" posY="0" scroll="true" tabIndex="-1" title="Existencia" widget="Edit"/>
</Table>
</Grid>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewA4AGEAOABiADQAMwAyADIALQA3AGYAOQAwAC0ANAA0AGQANgAtAGEANgA5AGYALQBiADkAMgA2ADkAZQAyAGMAMQAzADkANQB9QHgzMzlAAABAHMzM1AAAAD9gYk3S8an8AQ==]]>
</DiagramLayout>
</ManagedForm>
+80
View File
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm fileVersion="31400" gstVersion="3140a" name="ManagedForm" uid="{4d2f3576-b7eb-41ed-b7b0-fa0c5b7ce564}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record additionalTables="" joinLeft="" joinOperator="" joinRight="" name="Undefined" order="" uid="{8176c44c-2b7a-42a7-8fa4-9a2b375fdd56}" where="">
<RecordField fieldIdRef="21" name="totalMedida" uid="{7f77af31-66bb-4bba-b747-8adb6412dab4}"/>
<RecordField fieldIdRef="1" name="pcodn" uid="{44f26024-ebcd-4089-828c-92be9a9bd2ce}"/>
<RecordField fieldIdRef="2" name="descripcion" uid="{933ce48c-b679-4652-b7dd-aa8d074bb856}"/>
<RecordField fieldIdRef="5" name="pcodgrupo" uid="{a1f10fa4-0281-478b-990b-d1432ddc04b8}"/>
<RecordField fieldIdRef="7" name="pcodtipo" uid="{0a7ec91b-9130-4921-93eb-2909a59debc1}"/>
<RecordField fieldIdRef="14" name="pcodsec" uid="{d01951b7-ead4-4d27-b8f8-8bf284afe69f}"/>
</Record>
<Record additionalTables="" joinLeft="" joinOperator="" joinRight="" name="sdatos" order="" uid="{c35d3dde-8983-4a70-a162-743de71d9eef}" where="">
<RecordField colName="" fieldIdRef="3" name="bookmash" sqlTabName="" table_alias_name="" uid="{3131637e-00f0-46e1-8599-c99271137100}"/>
<RecordField colName="" fieldIdRef="8" name="tipo" sqlTabName="" table_alias_name="" uid="{58d2e0ad-13d5-4065-9456-f9417374cc70}"/>
<RecordField colName="" fieldIdRef="9" name="lado_1" sqlTabName="" table_alias_name="" uid="{4d59d3a8-b9f7-40b7-ac8e-da792e0c8db0}"/>
<RecordField colName="" fieldIdRef="11" name="lado_2" sqlTabName="" table_alias_name="" uid="{dbce7d0c-71a9-47fe-8cd3-fb7cba753f6c}"/>
<RecordField colName="" fieldIdRef="12" name="lado_3" sqlTabName="" table_alias_name="" uid="{765225ec-faac-4389-aca3-e6f577d9f83d}"/>
<RecordField colName="" fieldIdRef="13" name="cantidad" sqlTabName="" table_alias_name="" uid="{c3e9c782-1692-4956-aea5-2d3c192e6531}"/>
<RecordField colName="" fieldIdRef="19" name="Cantidad2" sqlTabName="" table_alias_name="" uid="{c9143fac-bcc2-4990-b154-4d6f7593ab2e}"/>
<RecordField fieldIdRef="17" name="tono" uid="{1c58fa98-42e1-4d7e-8004-b8b580b89e3a}"/>
<RecordField fieldIdRef="18" name="calidad" uid="{b5a3dbe4-f85d-43b4-81f1-c18b660ac9db}"/>
<RecordField colName="" fieldIdRef="4" name="xobservacion" sqlTabName="" table_alias_name="" uid="{7e570d42-d3cc-4f3e-85dc-c5489cf0e39f}"/>
<RecordField colName="" fieldIdRef="16" name="id_producto" sqlTabName="" table_alias_name="" uid="{d8c1d99e-f6d1-413e-8718-6234894fb5c0}"/>
<RecordField fieldIdRef="22" name="bodega" uid="{38646a45-3896-4feb-8daf-6e8bbd1157a9}"/>
<RecordField fieldIdRef="23" name="seccion" uid="{86990433-f26a-43a6-b431-f3758ba83ec1}"/>
<RecordField fieldIdRef="20" name="tramo" uid="{545c9783-1f1c-4889-839d-caa91ce99710}"/>
<RecordField fieldIdRef="24" name="fila" uid="{0e00f818-8efd-4b64-bb3d-83dc1b18019a}"/>
<RecordField fieldIdRef="25" name="posicion" uid="{fe02c9ce-b296-4a60-8542-b7ec155c2147}"/>
<RecordField colName="" fieldIdRef="6" name="codid" sqlTabName="" table_alias_name="" uid="{39e44f0f-a08c-4832-9c6c-63aa3aae5693}"/>
<RecordField colName="" fieldIdRef="10" name="idrow" sqlTabName="" sqlType="BIGINT" table_alias_name="" uid="{41bd0363-ca56-4ab3-adf9-1d50ca9f05ab}"/>
<RecordField fieldIdRef="15" name="idtrx" uid="{e14c51ee-7072-48f9-b556-cea629a696b7}"/>
</Record>
<Form gridHeight="23" gridWidth="200" name="Form" text="Administrador Fotos">
<Grid gridHeight="19" gridWidth="196" name="Grid1" posX="4" posY="2">
<Label gridHeight="1" gridWidth="10" name="Label1" posX="2" posY="1" text="PRODUCTO"/>
<Edit fieldId="1" gridHeight="1" gridWidth="5" name="pcodn" posX="3" posY="2" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="5" gridHeight="1" gridWidth="5" name="pcodgrupo" posX="9" posY="2" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="7" gridHeight="1" gridWidth="5" name="pcodtipo" posX="15" posY="2" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="14" gridHeight="1" gridWidth="5" name="pcodsec" posX="21" posY="2" tabIndex="-1" title="edit1" widget="Edit"/>
<Edit fieldId="2" gridHeight="1" gridWidth="45" name="descripcion" posX="28" posY="2" style="encabezado" tabIndex="-1" title="edit1" widget="Edit"/>
<Label gridHeight="1" gridWidth="10" name="label4" posX="2" posY="4" text="Total Medida"/>
<Edit fieldId="21" gridHeight="1" gridWidth="10" name="totalMedida" posX="13" posY="4" tabIndex="-1" title="edit1" widget="Edit"/>
<Group gridHeight="9" gridWidth="194" name="Group1" posX="2" posY="7" text="Informacion">
<Table gridHeight="6" gridWidth="191" name="Table1" posX="2" posY="1" totalRows="5">
<ComboBox aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="3" gridHeight="1" gridWidth="8" items="Bookmatch, NDmash" name="bookmash" posX="0" posY="0" sqlTabName="" tabIndex="1" table_alias_name="" title="Bookmatch" widget="ComboBox">
<Item lstrtext="false" name="bookmatch" text="Bookmatch"/>
<Item lstrtext="false" name="ndmash" text="NDmash"/>
</ComboBox>
<ComboBox aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="8" gridHeight="1" gridWidth="8" items="Comportamiento Estable(1), Semi-Variable(2), Variable(3)" name="tipo" posX="8" posY="0" sqlTabName="" tabIndex="4" table_alias_name="" title="Tipos" widget="ComboBox">
<Item lstrtext="false" name="tipo1" text="Comportamiento Estable(1)"/>
<Item lstrtext="false" name="tipo2" text="Semi-Variable(2)"/>
<Item lstrtext="false" name="tipo3" text="Variable(3)"/>
</ComboBox>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="9" gridHeight="1" gridWidth="8" name="lado_1" posX="16" posY="0" sqlTabName="" tabIndex="5" table_alias_name="" title="Altura" widget="Edit"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="11" gridHeight="1" gridWidth="8" name="lado_2" posX="24" posY="0" sqlTabName="" tabIndex="7" table_alias_name="" title="Ancho" widget="Edit"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="12" gridHeight="1" gridWidth="8" name="lado_3" posX="32" posY="0" sqlTabName="" tabIndex="8" table_alias_name="" title="Espesor" widget="Edit"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="13" gridHeight="1" gridWidth="8" name="cantidad" posX="40" posY="0" sqlTabName="" tabIndex="9" table_alias_name="" title="Cantidad" widget="Edit"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="19" gridHeight="1" gridWidth="12" name="Cantidad2" noEntry="true" posX="48" posY="0" sqlTabName="" tabIndex="11" table_alias_name="" title="Metraje" widget="Edit"/>
<Edit fieldId="17" gridHeight="1" gridWidth="8" name="tono" posX="60" posY="0" tabIndex="-1" title="Tono" widget="Edit"/>
<Edit fieldId="18" gridHeight="1" gridWidth="8" name="calidad" posX="68" posY="0" tabIndex="-1" title="Calidad" widget="Edit"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="4" gridHeight="1" gridWidth="13" name="xobservacion" posX="76" posY="0" scroll="true" sqlTabName="" tabIndex="2" table_alias_name="" title="OBSERVACION" widget="Edit"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="16" gridHeight="1" gridWidth="16" name="id_producto" posX="89" posY="0" sqlTabName="" tabIndex="10" table_alias_name="" title="ID PROD" widget="Edit"/>
<ComboBox fieldId="22" gridHeight="1" gridWidth="8" items="" name="bodega" posX="105" posY="0" tabIndex="-1" title="Bodega" widget="ComboBox"/>
<ComboBox fieldId="23" gridHeight="1" gridWidth="8" items="" name="seccion" posX="113" posY="0" tabIndex="-1" title="Seccion" widget="ComboBox"/>
<ComboBox fieldId="20" gridHeight="1" gridWidth="8" items="" name="tramo" posX="121" posY="0" scroll="true" tabIndex="-1" title="Tramo" widget="ComboBox"/>
<Edit fieldId="24" gridHeight="1" gridWidth="8" name="fila" posX="129" posY="0" tabIndex="-1" title="FILA" widget="Edit"/>
<Edit fieldId="25" gridHeight="1" gridWidth="8" name="posicion" posX="137" posY="0" tabIndex="-1" title="POSICION" widget="Edit"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="6" gridHeight="1" gridWidth="10" name="codid" noEntry="true" posX="145" posY="0" sqlTabName="" tabIndex="3" table_alias_name="" title="ID" widget="Edit"/>
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="10" gridHeight="1" gridWidth="8" hidden="true" name="idrow" posX="155" posY="0" sqlTabName="" sqlType="BIGINT" tabIndex="6" table_alias_name="" title="Edit1" widget="Edit"/>
<Edit fieldId="15" gridHeight="1" gridWidth="8" hidden="true" name="idtrx" posX="163" posY="0" tabIndex="-1" title="edit1" widget="Edit"/>
</Table>
</Group>
</Grid>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewA4ADEANwA2AGMANAA0AGMALQAyAGIANwBhAC0ANAAyAGEANwAtADgAZgBhADQALQA5AGEAMgBiADMANwA1AGYAZABkADUANgB9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAEwAewBjADMANQBkADMAZABkAGUALQA4ADkAOAAzAC0ANABhADcAMAAtAGEAMQA2ADIALQA3ADQAMwBkAGUANwAxAGQAOQBlAGUAZgB9QDAAAFQAANFAMAAAVAAA0T9QYk3S8an8AQ==]]>
</DiagramLayout>
</ManagedForm>
+37
View File
@@ -0,0 +1,37 @@
{
-------------------------------------------------------------------------
NOMBRE : IRFMWD066
OBJETIVO : Anula Documentos de Repuestos
PROGRAMADOR : JOSE ALFREDO PAULINO ALEJO
FECHA REALIZADO : Diciembre 4, 1996.
PROGRAMA UTILIZA: IRPRMT066
--------------------------------------------------------------------------
}
database smarmotech
LAYOUT (TEXT="ANULAR DOCUMENTOS")
GRID
{
Codigo Movimiento [f0][a ]
Numero Documento [f02 ]
Fecha [f5 ]
[f1][f2 ]
Orden Compra [oc ]
}
END
end
tables
irtb00006
ATTRIBUTES
oc = formonly.orden_compras;
a = formonly.descrip_mov,noentry;
f0 = irtb00006.cod_mov;
f02 = irtb00006.num_doc;
f1 = formonly.cod_sp,noentry;
f2 = formonly.cod_sp_sec,noentry;
f5 = irtb00006.fecha,noentry,format = "dd/mm/yy";
instructions
delimiters " "
end
+35
View File
@@ -0,0 +1,35 @@
{
-----------------------------------------------------------------------------
FORMULARIO : IRFMWD068
OBJETIVO : Desplegar las maquinas
PROGRAMADOR : Lic. Abner Montalvo
FECHA REALIZACION : Julio 14, 1998.
-----------------------------------------------------------------------------
}
DATABASE smarmotech
SCREEN SIZE 24 by 80
{
Busqueda De Maquinarias
\g-----------------------------------------\g
Codigo Descripcion
\g-----------------------------------------\g
[f1 ] [f2 ]
[f1 ] [f2 ]
[f1 ] [f2 ]
[f1 ] [f2 ]
[f1 ] [f2 ]
[f1 ] [f2 ]
}
end
tables
irtb00009
attributes
f1 = formonly.maquina,noentry,
comments = "Elegir Este Registro Con La Tecla <Esc>";
f2 = irtb00009.nombre,upshift,
comments = "<Esc> Busca Todos Las Maquinas";
instructions
screen record s_desp1[6] (maquina,nombre)
delimiters " "
end
+22
View File
@@ -0,0 +1,22 @@
#-----------------------------------------------------------------------------
# irpantalla.4gl
# Encabezado de pantalla del Sistema Inventario de Repuestos.
# Copia de pantalla() de PROYECTOS/irdir/irmn00000.4gl (menu 3.20), para los
# programas de irdir que la llaman sin enlazar el menu (ej. irprrp002).
#-----------------------------------------------------------------------------
GLOBALS "irprgb000.4gl"
FUNCTION pantalla()
DEFINE fecha CHAR(8),
hora char(5)
LET fecha = today USING "dd/mm/yy"
LET hora = time
LET lj = (80 - LENGTH(p_companias.nombre CLIPPED))/2
DISPLAY p_companias.nombre CLIPPED AT 4,lj ATTRIBUTE (REVERSE,blue)
DISPLAY fecha AT 4,70 ATTRIBUTE (blue)
DISPLAY "Sistema Inventario de Repuestos" AT 5,26
DISPLAY hora AT 6,73 ATTRIBUTE(blue)
CALL fgl_drawbox(5,79,3,1)
CALL fgl_drawbox(1,79,22,1)
END FUNCTION
+256
View File
@@ -0,0 +1,256 @@
{
--------------------------------------------------------------------------
PROGRAMA : IRPRCS001
OBJETIVO : Programa Consulta Movimientos Repuestos:
Reporte de Entrada.
PROGRAMADOR : Juan Fco. Soto (Johnny)
FECHA REALIZACION : Marzo 2, 1992.
--------------------------------------------------------------------------
}
GLOBALS
"irprgb000.4gl"
MAIN
DEFER INTERRUPT
-- G6: no conectaba (solo SCHEMA en irprgb000) y el VM terminaba al arrancar
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 irprcs001()
END MAIN
FUNCTION irprcs001()
DEFINE idx1 SMALLINT
DEFINE voy CHAR(1)
DEFINE fecha1 char(8)
DEFINE hora1 char(5)
LET fecha1 = today using "dd/mm/yy"
LET hora1 = time
LET int_flag = false
LET bandera = 0
#WHENEVER ERROR CONTINUE
CLEAR SCREEN
OPTIONS
ERROR LINE 24,
FORM LINE 6,
COMMENT LINE 22,
PROMPT LINE 23
DISPLAY " R A Y . O . V A C D O M I N I C A N A " AT 3,19
ATTRIBUTE (REVERSE,blue)
DISPLAY fecha1 AT 3,70 ATTRIBUTE (blue)
DISPLAY hora1 AT 4,73 ATTRIBUTE (blue)
DISPLAY " Reporte de Entrada" at 4,35
DISPLAY "<Esc> Realiza Busqueda" AT 5,2 ATTRIBUTE (blue,REVERSE)
DISPLAY "<Ctrl-C> Cancela Operacion" AT 5,50 ATTRIBUTE (blue,REVERSE)
DISPLAY "irprcs001" AT 3,2 ATTRIBUTE (blue)
OPEN FORM irfmcs001 FROM "irfmcs001"
DISPLAY FORM irfmcs001
INITIALIZE datos_gen.* TO NULL
LABEL volver:
DISPLAY " "
AT 1,1
CONSTRUCT criterio ON a.cod_mov,a.num_doc,a.cod_sp,
a.cod_sp_sec,a.orden_compra,
a.conduce_no,a.fact_no,a.fecha
FROM cod_mov,num_doc,cod_sp,
cod_sp_sec,orden_compra,
conduce_no,fact_no,fecha
LET SELEC = "SELECT UNIQUE a.cod_mov,b.descrip_mov,a.num_doc,",
"a.cod_sp,a.cod_sp_sec,a.orden_compra,a.fact_no, ",
"a.conduce_no, a.fecha FROM irtb00006 a,",
"irtb00005 b ",
" WHERE ", criterio clipped,
" and a.cod_mov = b.cod_mov ",
" and a.cod_mov between 1 and 4 ",
" ORDER BY 1,3"
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = false
RETURN
END IF
PREPARE busca FROM selec
DECLARE johnn SCROLL CURSOR FOR busca
OPEN johnn
FETCH FIRST johnn INTO datos_gen.cod_mov,datos_gen.descrip_mov,
datos_gen.num_doc,datos_gen.cod_sp,datos_gen.cod_sp_sec,
datos_gen.orden_compra, datos_gen.fact_no,
datos_gen.conduce_no, datos_gen.fecha
IF status = notfound THEN
LET numero_msg = 3
CALL msg(numero_msg)
GOTO volver
END IF
IF status < 0 THEN
CALL integridad()
IF bandera = 1 THEN
LET bandera = 0
END IF
END IF
SELECT nom_sp INTO datos_gen.nom_sp FROM cotb00001
WHERE cod_sp = datos_gen.cod_sp AND
cod_sp_sec = datos_gen.cod_sp_sec
DISPLAY BY NAME datos_gen.cod_mov,datos_gen.descrip_mov,
datos_gen.num_doc,datos_gen.cod_sp,datos_gen.cod_sp_sec,
datos_gen.orden_compra,datos_gen.nom_sp,
datos_gen.fact_no,datos_gen.conduce_no,datos_gen.fecha
LABEL vuelve1:
MENU "OPCION"
COMMAND "Siguiente"
"Presenta en pantalla SIGUIENTE registro encontrado."
FETCH NEXT johnn INTO datos_gen.cod_mov,datos_gen.descrip_mov,
datos_gen.num_doc,datos_gen.cod_sp,datos_gen.cod_sp_sec,
datos_gen.orden_compra,datos_gen.nom_sp,
datos_gen.fact_no,datos_gen.conduce_no,datos_gen.fecha
IF status = notfound THEN
LET numero_msg = 4
CALL msg(numero_msg)
END IF
SELECT nom_sp INTO datos_gen.nom_sp FROM cotb00001
WHERE cod_sp = datos_gen.cod_sp AND
cod_sp_sec = datos_gen.cod_sp_sec
DISPLAY BY NAME datos_gen.cod_mov,datos_gen.descrip_mov,
datos_gen.num_doc,datos_gen.cod_sp,datos_gen.cod_sp_sec,
datos_gen.orden_compra,datos_gen.nom_sp,
datos_gen.fact_no,datos_gen.conduce_no,datos_gen.fecha
COMMAND "Anterior"
"Presenta en pantalla el registro ANTERIOR encontrado."
FETCH PREVIOUS johnn INTO datos_gen.cod_mov,datos_gen.descrip_mov,
datos_gen.num_doc,datos_gen.cod_sp,datos_gen.cod_sp_sec,
datos_gen.orden_compra,datos_gen.nom_sp,
datos_gen.fact_no,datos_gen.conduce_no,datos_gen.fecha
IF status = notfound THEN
LET numero_msg = 5
CALL msg(numero_msg)
END IF
SELECT nom_sp INTO datos_gen.nom_sp FROM cotb00001
WHERE cod_sp = datos_gen.cod_sp AND
cod_sp_sec = datos_gen.cod_sp_sec
DISPLAY BY NAME datos_gen.cod_mov,datos_gen.descrip_mov,
datos_gen.num_doc,datos_gen.cod_sp,datos_gen.cod_sp_sec,
datos_gen.orden_compra,datos_gen.nom_sp,
datos_gen.fact_no,datos_gen.conduce_no,datos_gen.fecha
COMMAND "Primero"
"Presenta en pantalla PRIMER registro encontrado."
FETCH FIRST johnn INTO datos_gen.cod_mov,datos_gen.descrip_mov,
datos_gen.num_doc,datos_gen.cod_sp,datos_gen.cod_sp_sec,
datos_gen.orden_compra,datos_gen.nom_sp,
datos_gen.fact_no,datos_gen.conduce_no,datos_gen.fecha
IF status = notfound THEN
LET numero_msg = 5
CALL msg(numero_msg)
END IF
SELECT nom_sp INTO datos_gen.nom_sp FROM cotb00001
WHERE cod_sp = datos_gen.cod_sp AND
cod_sp_sec = datos_gen.cod_sp_sec
DISPLAY BY NAME datos_gen.cod_mov,datos_gen.descrip_mov,
datos_gen.num_doc,datos_gen.cod_sp,datos_gen.cod_sp_sec,
datos_gen.orden_compra,datos_gen.nom_sp,
datos_gen.fact_no,datos_gen.conduce_no,datos_gen.fecha
COMMAND "Ultimo"
"Presenta en pantalla ULTIMO registro encontrado."
FETCH LAST johnn INTO datos_gen.cod_mov,datos_gen.descrip_mov,
datos_gen.num_doc,datos_gen.cod_sp,datos_gen.cod_sp_sec,
datos_gen.orden_compra,datos_gen.nom_sp,
datos_gen.fact_no,datos_gen.conduce_no,datos_gen.fecha
IF status = notfound THEN
LET numero_msg = 4
CALL msg(numero_msg)
END IF
SELECT nom_sp INTO datos_gen.nom_sp FROM cotb00001
WHERE cod_sp = datos_gen.cod_sp AND
cod_sp_sec = datos_gen.cod_sp_sec
DISPLAY BY NAME datos_gen.cod_mov,datos_gen.descrip_mov,
datos_gen.num_doc,datos_gen.cod_sp,datos_gen.cod_sp_sec,
datos_gen.orden_compra,datos_gen.nom_sp,
datos_gen.fact_no,datos_gen.conduce_no,datos_gen.fecha
COMMAND "Ver"
CALL desplega()
DISPLAY ARRAY movi5 TO s_movi1.*
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = false
GOTO vuelve1
END IF
CLEAR FORM
GOTO volver
COMMAND "Retornar"
EXIT MENU
END MENU
END FUNCTION
FUNCTION desplega()
DECLARE jhonn CURSOR FOR
SELECT p.cod_n,p.cod_grupo,p.cod_tipo,p.cod_sec,p.cantidad_1,p.cantidad_2,
k.unidad_med,k.descrip_esp,p.maquina FROM intb00001 k,irtb00006 p
WHERE
p.num_doc = datos_gen.num_doc and
p.cod_mov = datos_gen.cod_mov and
p.cod_n = k.cod_n and
p.cod_grupo = k.cod_grupo and
p.cod_tipo = k.cod_tipo and
p.cod_sec = k.cod_sec and
p.status_t is null and
k.status_t is null
OPEN jhonn
CALL integridad()
IF bandera = 1 THEN
LET bandera = 0
RETURN
END IF
LET idx = 1
FOREACH jhonn INTO movi9[idx].*
IF STATUS = NOTFOUND THEN
EXIT FOREACH
RETURN
END IF
IF status < 0 THEN
CALL integridad()
IF bandera = 1 THEN
LET bandera = 0
END IF
END IF
IF movi[idx].cantidad_2 < 0 THEN
LET movi9[idx].cantidad_2 = movi9[idx].cantidad_2 * - 1
END IF
LET movi5[idx].codigo = movi9[idx].cod_n using "&", "-",
movi9[idx].cod_grupo using "&", "-",
movi9[idx].cod_tipo using "&&","-",
movi9[idx].cod_sec using "&&&"
LET movi5[idx].cantidad_1 = movi9[idx].cantidad_1 using "##,###,###.##"
LET movi5[idx].cantidad_2 = movi9[idx].cantidad_2 using "##,###,###.##"
LET movi5[idx].unidad_med = movi9[idx].unidad_med
LET movi5[idx].descrip_esp = movi9[idx].descrip_esp
LET movi5[idx].diferencia = movi9[idx].cantidad_1 - movi9[idx].cantidad_2
using "##,###,###.##"
LET idx = idx + 1
END FOREACH
CALL set_count(idx - 1)
END FUNCTION
+186
View File
@@ -0,0 +1,186 @@
{
---------------------------------------------------------------------
PROGRAMA : IRPRCS006
OBJETIVO : Programa Consulta Balances Repuestos.
PROGRAMADOR : Juan Fco. Soto (Johnny)
FECHA REALIZACION : Marzo 2, 1993.
---------------------------------------------------------------------
}
GLOBALS
"irprgb000.4gl"
MAIN
DEFER INTERRUPT
CALL arg_val(1) RETURNING usuarios
CALL arg_val(2) RETURNING clave
CALL arg_val(3) RETURNING impresor
CONNECT TO "smarmotech" USER usuarios USING clave
SELECT * INTO p_companias.* FROM companias
CALL irprcs006()
END MAIN
FUNCTION irprcs006()
DEFINE idx1 INTEGER
DEFINE segunda CHAR(1)
DEFINE fecha1 char(8)
DEFINE hora1 char(5)
DEFINE balance_in DECIMAL(12,2)
DEFINE primera CHAR(1)
DEFINE nombre CHAR(8)
LET fecha1 = today using "dd/mm/yy"
LET hora1 = time
LET int_flag = false
LET bandera = 0
#WHENEVER ERROR CONTINUE
CLEAR SCREEN
OPTIONS
ERROR LINE 24,
FORM LINE 4,
COMMENT LINE 22,
PROMPT LINE 23
OPEN FORM irfmcs006 FROM "irfmcs006"
DISPLAY FORM irfmcs006
INITIALIZE datos_cons.* TO NULL
#WHENEVER ERROR CONTINUE
LABEL volver:
INPUT BY NAME datos_cons.* WITHOUT DEFAULTS
BEFORE INPUT
CALL csmov1.clear()
BEFORE FIELD fech_fi
LET datos_cons.fech_fi = today using "dd/mm/yy"
DISPLAY BY NAME datos_cons.fech_fi
AFTER FIELD cod_n
IF datos_cons.cod_n !=7 THEN
LET numero_msg = 114
CALL msg(numero_msg)
NEXT FIELD cod_n
END IF
AFTER FIELD cod_sec
SELECT a.descrip_esp INTO datos_cons.descrip_esp FROM irtb00002 a
WHERE a.cod_n= datos_cons.cod_n and a.cod_grupo = datos_cons.cod_grupo and
a.cod_tipo= datos_cons.cod_tipo and a.cod_sec=datos_cons.cod_sec and
a.status_t is null
IF STATUS = NOTFOUND THEN
LET numero_msg = 3
CALL msg(numero_msg)
CLEAR FORM
NEXT FIELD cod_n
END IF
CALL integridad()
if bandera = 1 THEN
LET bandera = 0
RETURN
end if
DISPLAY BY NAME datos_cons.descrip_esp
DISPLAY BY NAME datos_cons.*
AFTER FIELD fech_fi
IF datos_cons.fech_fi IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD fech_in
END IF
IF datos_cons.fech_in IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD fech_in
END IF
IF datos_cons.fech_in > datos_cons.fech_fi THEN
LET numero_msg = 36
CALL msg(numero_msg)
NEXT FIELD fech_in
END IF
AFTER INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = false
CLEAR SCREEN
RETURN
END IF
SELECT sum(a.cantidad_2) INTO balance_in FROM irtb00006 a
WHERE a.cod_n = datos_cons.cod_n and a.cod_grupo = datos_cons.cod_grupo and
a.cod_tipo = datos_cons.cod_tipo and a.cod_sec = datos_cons.cod_sec and
a.status_t is null and fecha < datos_cons.fech_in
IF balance_in is null THEN
LET balance_in = 0
END IF
DECLARE jhonn_1 CURSOR FOR
SELECT p.num_doc,p.fecha,p.cantidad_1,p.cantidad_2,p.cod_mov,
b.descrip_mov
FROM irtb00006 p,OUTER irtb00005 b
WHERE p.fecha between datos_cons.fech_in and datos_cons.fech_fi and
p.cod_mov = b.cod_mov and p.cod_n = datos_cons.cod_n and
p.cod_grupo=datos_cons.cod_grupo and p.cod_tipo=datos_cons.cod_tipo and
p.cod_sec=datos_cons.cod_sec and p.status_t is null
ORDER BY 2,1
OPEN jhonn_1
LET idx = 1
LET balance = balance_in
FOREACH jhonn_1 INTO csmov.*
IF idx = 1 THEN
LET csmov1[idx].descrip_mov = "BALANCE INICIAL"
LET csmov1[idx].fecha_2 = datos_cons.fech_in
LET csmov1[idx].balance = balance USING "---,---.##"
LET idx = idx + 1
END IF
IF csmov.cantidad_2 IS NULL THEN
LET csmov.cantidad_2 = 0
END IF
LET balance = balance + csmov.cantidad_2
LET csmov1[idx].descrip_mov = "(",csmov.cod_mov using "&&",")",
csmov.descrip_mov clipped
LET csmov1[idx].fecha_2 = csmov.fecha_1
LET csmov1[idx].balance = balance USING "---,---.##"
LET csmov1[idx].num_doc = csmov.num_doc USING "&&&&&"
IF csmov.cantidad_2 <= 0 THEN
LET csmov1[idx].entrada = null
LET csmov1[idx].salida = csmov.cantidad_2 USING "---,---.##"
ELSE
LET csmov1[idx].salida = null
LET csmov1[idx].entrada = csmov.cantidad_2 USING "---,---.##"
END IF
LET idx = idx + 1
END FOREACH
CALL set_count(idx - 1)
DISPLAY ARRAY csmov1 TO s_csmov.*
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
CLEAR SCREEN
EXIT INPUT
END IF
CLEAR FORM
CONTINUE INPUT
END INPUT
IF INT_FLAG THEN
LET int_flag = FALSE
RETURN
END IF
END FUNCTION
File diff suppressed because it is too large Load Diff
+457
View File
@@ -0,0 +1,457 @@
SCHEMA smarmotech
GLOBALS
DEFINE arr_prod DYNAMIC ARRAY OF RECORD
cod_n INTEGER,
cod_grupo INTEGER,
cod_tipo INTEGER,
cod_sec INTEGER,
descrip_esp CHAR(30),
unidad_med CHAR(5),
existencia FLOAT
END RECORD,
p_irtb57 RECORD
numero_doc INT,
cod_mov SMALLINT,
fecha DATE,
num_oc INT,
orden_trabajo INT,
observacion VARCHAR(200),
tipo_cliente SMALLINT,
sec_cliente INT,
cliente VARCHAR(100),
bodega SMALLINT,
bodega_destino SMALLINT,
estado VARCHAR(50),
ruta_documento ,
url_file STRING,
idstado VARCHAR(60)
END RECORD,
arr_irtb58 DYNAMIC ARRAY OF RECORD
area INT,
cod_n,cod_grupo,cod_tipo,cod_sec INT,
descripcion VARCHAR(100),
unidad_med VARCHAR(4),
cantidad_1,cantidad,cantidad_o1,cantidad1,factor_conv DEC(12,5)
END RECORD,
arr_busqueda DYNAMIC ARRAY OF RECORD
estadp1 VARCHAR(50),
estado_proceso1 VARCHAR(100),
tipo_documento VARCHAR(100),
numeroid INT,
fechadoc DATE,
nombre VARCHAR(100),
observacion VARCHAR(200),
bodega_origen VARCHAR(100),
bodega_destino VARCHAR(100),
cod_mov INT,
bodega1 SMALLINT,
bodega2 SMALLINT
END RECORD,
secuencia INT,
nombreUsuario,email,nombreBodega,nombreBodegaDestino,nombreMov STRING,
cbmovimiento ui.ComboBox
DEFINE
tieneDetalle,requiere VARCHAR(2),
ordenPedidos,existe BOOLEAN,
xestado VARCHAR(50),xtiene VARCHAR(3),tienedespiece BOOLEAN,
total_cantidad,total_medida DEC(12,5),
xtiene VARCHAR(3),
cuentaimp INT
DEFINE consulta,pflag CHAR(1),
USUARIOS, CLAVE CHAR(50),
progreso SMALLINT
DEFINE cmd,imprime,copia CHAR(150),archivo CHAR(80),i,impresor SMALLINT
DEFINE doce,normal,doble,doble_of,negras,negras_off CHAR(3)
DEFINE negrilla_on,negrillas_of,comp_on,comp_off,doble_on,doble_off
CHAR(3),
pprograma CHAR(12),
handler om.SaxDocumentHandler, -- return value from fgl_report_commitCurrentSettings()
r_filename,inventario STRING, -- filename of Report Design Document including .4rp extension
r_output,selec_pt,TOEmail,subject,ccemail,PCCEMAIL,cuerpo_correo,procedimiento STRING
DEFINE regi,p_ultimo,curr1 INTEGER
DEFINE p_param,ya CHAR(1), -- G6: existe ya esta definida como BOOLEAN (-4319)
formulario CHAR(100) ,
lj SMALLINT,
p_companias RECORD LIKE companias.*,
nombre_d CHAR(50)
DEFINE chequea RECORD
existe LIKE irtb00002.existencia,
pto LIKE irtb00002.existencia
END RECORD,
preview smallint
DEFINE movimientos RECORD
num_doc LIKE intb00006.num_doc,
cod_mov LIKE intb00006.cod_mov,
fecha LIKE intb00006.fecha,
tipo LIKE cotb00014.tipo,
orden_compra LIKE intb00006.orden_compra,
cod_sp LIKE intb00006.cod_sp,
cod_sp_sec LIKE intb00006.cod_sp_sec,
fact_no LIKE intb00006.fact_no,
conduce_no LIKE intb00006.conduce_no,
sec_de LIKE intb00006.depto_de,
sec_a LIKE intb00006.depto_a
END RECORD
DEFINE ultimo RECORD
cond_recep LIKE intb00006.cond_recep,
uso_tiempo LIKE intb00006.uso_tiempo
END RECORD
DEFINE busca_wd1 ARRAY [100] OF RECORD
codigo LIKE adtb00001.departamento,
nom_dpto LIKE adtb00001.nom_dpto
END RECORD
DEFINE busca_wd2 ARRAY [500] OF RECORD
codigo LIKE irtb00009.codigo,
nombre LIKE irtb00009.nombre
END RECORD
DEFINE datos1 RECORD
cod_mov LIKE irtb00006.cod_mov,
descrip_mov LIKE irtb00005.descrip_mov,
num_doc LIKE intb00006.num_doc,
tipo LIKE irtb00006.tipo,
orden_compra LIKE irtb00006.orden_compra,
cod_sp SMALLINT,
cod_sp_sec SMALLINT,
fecha DATE,
conduce_no VARCHAR(50),
departamento INT,
nom_sp CHAR(30)
END RECORD
DEFINE p_conteo RECORD
fecha LIKE intb00006.fecha,
bodega LIKE intb00006.bodega,
cod_n LIKE intb00006.cod_n,
cod_grupo LIKE intb00006.cod_grupo,
cod_tipo LIKE intb00006.cod_tipo,
cod_sec LIKE intb00006.cod_sec,
cantidad LIKE intb00006.cantidad_2
END RECORD
DEFINE costos RECORD
mes_ini LIKE intb00013.mes_ini,
mes_fin LIKE intb00013.mes_fin,
ano LIKE intb00013.ano,
cod_n LIKE intb00001.cod_N,
cod_grupo LIKE intb00001.cod_grupo,
cod_tipo LIKE intb00001.cod_tipo,
cod_sec LIKE intb00001.cod_sec,
costo_st LIKE intb00013.costo_st,
us_crea LIKE intb00013.us_crea,
fech_crea LIKE intb00013.fech_crea,
us_mod LIKE intb00013.us_mod,
fech_mod LIKE intb00013.fech_mod
END RECORD
DEFINE datos RECORD
num_doc LIKE intb00006.num_doc,
fecha LIKE intb00006.fecha,
depto_de LIKE intb00006.depto_de,
depto_a LIKE intb00006.depto_a,
nom_dpto LIKE adtb00001.nom_dpto,
nom_dpto1 LIKE adtb00001.nom_dpto,
bodega LIKE intb00006.bodega
END RECORD
DEFINE datos_gen RECORD
cod_mov LIKE irtb00006.cod_mov,
num_doc LIKE irtb00006.num_doc,
tipo SMALLINT,
orden_compra LIKE irtb00006.orden_compra,
cod_sp LIKE irtb00006.cod_sp,
cod_sp_sec LIKE irtb00006.cod_sp_sec,
conduce_no LIKE irtb00006.conduce_no,
fact_no LIKE irtb00006.fact_no,
fecha DATE,
sec_a LIKE irtb00006.sec_a,
nom_sp LIKE cotb00001.nom_sp,
descrip_mov LIKE irtb00005.descrip_mov
END RECORD
DEFINE otros_mov RECORD
num_doc LIKE intb00006.num_doc,
cod_mov LIKE intb00006.cod_mov,
fecha LIKE intb00006.fecha,
descrip_mov LIKE intb00005.descrip_mov,
bodega LIKE intb00006.bodega
END RECORD
DEFINE dm_rep RECORD
departamento LIKE irtb00029.departamento,
maquina LIKE irtb00029.maquina
END RECORD
DEFINE p_fechas DATE
DEFINE bandera smallint
DEFINE nombre_dia ARRAY[7] OF char(10)
DEFINE nombre_mes ARRAY[12] OF char(10)
DEFINE general decimal(12,2)
DEFINE p_bodega SMALLINT
DEFINE mq_rep RECORD LIKE irtb00008.*
DEFINE depto RECORD LIKE adtb00001.*
DEFINE maquinaria RECORD LIKE irtb00009.*
DEFINE motor_e RECORD LIKE irtb00007.*
DEFINE arancel RECORD LIKE cotb00005.*
DEFINE motores RECORD LIKE irtb00005.*
DEFINE especifica RECORD LIKE irtb00006.*
DEFINE maquinas RECORD LIKE irtb00006.*
DEFINE status_m char(1)
DEFINE decide char(1)
DEFINE cant DECIMAL(10,2)
DEFINE tipo_papel smallint
DEFINE balance,existen DECIMAL(12,2)
DEFINE cod_mov_ant LIKE intb00006.cod_mov
DEFINE existe_comp,suplidor1,doc_existe,actual,mat_prima CHAR (1000)
DEFINE opc,opt CHAR(3)
DEFINE optc CHAR(2)
DEFINE medida CHAR (3)
DEFINE fila smallint
DEFINE m_articulos RECORD LIKE irtb00002.*
DEFINE numero_msg LIKE msgtable.cod_msg
DEFINE articulos RECORD LIKE intb00001.*
DEFINE suplidor RECORD LIKE intb00008.*
DEFINE mensajes RECORD {LIKE msgtable.* }
cod_msg smallint,
desc_msg char(60),
us_crea char(9),
fech_crea char(16),
us_mod char(9),
fech_mod char(16)
END RECORD
DEFINE despiece DYNAMIC ARRAY OF RECORD
id_etiqueta SMALLINT,
cod_n SMALLINT,
cod_grupo SMALLINT,
cod_tipo SMALLINT,
cod_sec SMALLINT,
lado_1 DEC(12,5),
lado_2 DEC(12,5),
lado_3 DEC(12,5),
cantidad DEC(12,5),
medida DEC(12,5),
secuencia,id_despiece INT,
bodega SMALLINT
END RECORD
DEFINE transacc RECORD LIKE irtb00005.*
DEFINE medidas RECORD LIKE intb00007.*
DEFINE descrip_esp,descrip_ing,descrip1,descrip2,descrip3,descrip4 CHAR(30)
DEFINE c_sustituto RECORD LIKE intb00003.*
DEFINE c_equivalente RECORD LIKE intb00004.*
DEFINE criterio CHAR(1000)
DEFINE selec1,selec CHAR(3000)
DEFINE cod_n_a,cod_grupo_a,cod_tipo_a,cod_sec_a SMALLINT
DEFINE p_act,idx,scr_l,curr SMALLINT
DEFINE opcion CHAR(1)
DEFINE movi2 DYNAMIC ARRAY OF RECORD
cod_n LIKE intb00003.cod_n,
cod_grupo LIKE intb00003.cod_grupo,
cod_tipo LIKE intb00003.cod_tipo,
cod_sec LIKE intb00003.cod_sec,
cantidad_2 LIKE intb00006.cantidad_2,
unidad_med LIKE intb00001.unidad_med,
descrip_esp LIKE intb00001.descrip_esp
END RECORD
DEFINE art ARRAY[200] OF RECORD
cod_n1 SMALLINT,
cod_grupo1 SMALLINT,
cod_tipo1 SMALLINT,
cod_sec1 SMALLINT,
descrip_esp1 CHAR(30),
unidad_med LIKE intb00001.unidad_med,
existencia like irtb00002.existencia,
dia_llegada like irtb00002.dia_llegada ,
precio LIKE cotb00015.precio,
descrip_esp2 CHAR(30),
valor decimal(10,2)
END RECORD
DEFINE csmov1 DYNAMIC ARRAY OF RECORD
num_doc integer,
fecha_2 LIKE intb00006.fecha,
descrip_mov char(70),
entrada DECIMAL(8,2),
salida DECIMAL(8,2),
balance DECIMAL(8,2)
END RECORD
DEFINE csmov RECORD
num_doc LIKE intb00006.num_doc,
fecha_1 LIKE intb00006.fecha,
cantidad_1 LIKE intb00006.cantidad_1,
cantidad_2 LIKE intb00006.cantidad_2,
cod_mov LIKE intb00005.cod_mov,
descrip_mov LIKE irtb00005.descrip_mov
END RECORD
DEFINE datos_cons RECORD
cod_n LIKE intb00001.cod_n,
cod_grupo LIKE intb00001.cod_grupo,
cod_tipo LIKE intb00001.cod_tipo,
cod_sec LIKE intb00001.cod_sec,
descrip_esp LIKE intb00001.descrip_esp,
unidad_med LIKE intb00001.unidad_med,
fech_in LIKE intb00006.fecha,
fech_fi LIKE intb00006.fecha
END RECORD
DEFINE movi4 ARRAY[100] OF RECORD
codigo CHAR(10),
cantidad_2 LIKE intb00006.cantidad_2,
unidad_med LIKE intb00001.unidad_med ,
descrip_esp LIKE intb00001.descrip_esp,
maquina LIKE irtb00006.maquina
END RECORD
DEFINE movi5 ARRAY[100] OF RECORD
codigo CHAR(10),
cantidad_1 LIKE intb00006.cantidad_1,
cantidad_2 LIKE intb00006.cantidad_2,
diferencia DECIMAL(10,2),
descrip_esp LIKE intb00001.descrip_esp,
unidad_med LIKE intb00001.unidad_med,
maquina LIKE irtb00006.maquina
END RECORD
DEFINE movi3 ARRAY[100] OF RECORD
codigo CHAR(10),
cantidad_1 LIKE intb00006.cantidad_1,
cantidad_2 LIKE intb00006.cantidad_2,
diferencia DECIMAL(10,2),
descrip_esp LIKE intb00001.descrip_esp,
unidad_med LIKE intb00001.unidad_med
END RECORD
DEFINE movi8_ant DYNAMIC ARRAY OF RECORD
cod_n LIKE intb00003.cod_n,
cod_grupo LIKE intb00003.cod_grupo,
cod_tipo LIKE intb00003.cod_tipo,
cod_sec LIKE intb00003.cod_sec,
cant_ant1 LIKE irtb00006.cantidad_2
END RECORD
DEFINE movi9 ARRAY[100] OF RECORD
cod_n LIKE intb00003.cod_n,
cod_grupo LIKE intb00003.cod_grupo,
cod_tipo LIKE intb00003.cod_tipo,
cod_sec LIKE intb00003.cod_sec,
cantidad_1 LIKE intb00006.cantidad_1,
cantidad_2 LIKE intb00006.cantidad_2,
unidad_med LIKE intb00001.unidad_med,
descrip_esp LIKE intb00001.descrip_esp,
maquina LIKE irtb00006.maquina
END RECORD
DEFINE movi8 DYNAMIC ARRAY OF RECORD
cod_n LIKE intb00003.cod_n,
cod_grupo LIKE intb00003.cod_grupo,
cod_tipo LIKE intb00003.cod_tipo,
cod_sec LIKE intb00003.cod_sec,
cantidad_2 LIKE irtb00006.cantidad_2,
unidad_med LIKE intb00001.unidad_med,
descrip_esp LIKE intb00001.descrip_esp,
codigo LIKE irtb00009.codigo,
orden_trabajo INT,
existencia FLOAT,
num_emp SMALLINT
END RECORD
DEFINE movi1 ARRAY[100] OF RECORD
cod_n LIKE intb00003.cod_n,
cod_grupo LIKE intb00003.cod_grupo,
cod_tipo LIKE intb00003.cod_tipo,
cod_sec LIKE intb00003.cod_sec,
cantidad_2 LIKE intb00006.cantidad_2,
unidad_med LIKE intb00001.unidad_med,
descrip_esp LIKE intb00001.descrip_esp ,
maquina LIKE irtb00006.maquina
END RECORD
DEFINE movi DYNAMIC ARRAY OF RECORD
cod_n LIKE irtb00006.cod_n,
cod_grupo LIKE irtb00006.cod_grupo,
cod_tipo LIKE irtb00006.cod_tipo,
cod_sec LIKE irtb00006.cod_sec,
descrip_esp LIKE intb00001.descrip_esp,
unidad_med LIKE intb00001.unidad_med,
cantidad_1 LIKE irtb00006.cantidad_1,
cantidad_2 LIKE irtb00006.cantidad_2,
maquina LIKE irtb00006.maquina
END RECORD
DEFINE ant_art RECORD
cod_n LIKE cotb00002.cod_n,
cod_grupo LIKE cotb00002.cod_grupo,
cod_tipo LIKE cotb00002.cod_tipo,
cod_sec LIKE cotb00002.cod_sec ,
maquina SMALLINT
END RECORD
DEFINE c_articulos ARRAY[100] OF RECORD
cod_n LIKE cotb00002.cod_n,
cod_grupo LIKE cotb00002.cod_grupo,
cod_tipo LIKE cotb00002.cod_tipo,
cod_sec LIKE cotb00002.cod_sec,
descripcion CHAR(30)
# costo_mp LIKE cotb00002.costo_mp,
# fecha_act LIKE cotb00002.fecha_act
END RECORD
DEFINE consulta_mv ARRAY[200] OF RECORD
num_doc LIKE intb00006.num_doc,
fecha LIKE intb00006.fecha,
nombre char(7),
cantidad_1 LIKE intb00006.cantidad_1,
cantidad_2 LIKE intb00006.cantidad_1,
balance decimal(12,2)
END RECORD
DEFINE c_det_inv ARRAY[200] OF RECORD
cod_n LIKE intb00001.cod_n,
cod_grupo LIKE intb00001.cod_grupo,
cod_tipo LIKE intb00001.cod_tipo,
cod_sec LIKE intb00001.cod_sec,
descrip_esp LIKE intb00001.descrip_esp,
existencia LIKE irtb00002.existencia
# costo_mp LIKE cotb00002.costo_mp,
# valor DECIMAL(12,2)
END RECORD
DEFINE datos_cs RECORD
cod_n LIKE intb00006.cod_n,
cod_grupo LIKE intb00006.cod_grupo,
cod_tipo LIKE intb00006.cod_tipo,
cod_sec LIKE intb00006.cod_sec,
descrip_esp LIKE intb00001.descrip_esp,
fecha_in LIKE intb00006.fecha,
fecha_fi LIKE intb00006.fecha
END RECORD
DEFINE furgon RECORD LIKE cotb00003.*
DEFINE furgonart RECORD LIKE cotb00004.*
DEFINE arancelart RECORD LIKE cotb00006.*
DEFINE otrab SMALLINT
DEFINE comp_fech,comp_fech1 DATE
DEFINE mes_control CHAR(2)
DEFINE mes_calc,dia SMALLINT
DEFINE fecha_c DATE
DEFINE c_ano,a_ano CHAR(4)
END GLOBALS
+725
View File
@@ -0,0 +1,725 @@
{
------------------------------------------------------------------
PROGRAMA : IRPRMT002
OBJETIVO : Capturar, Modificar, Eliminar registros de la
Tabla Maestra Repuestos.
PROGRAMADOR : Ing. Juan Fco. Soto
FECHA REALIZACION : Febrero 15, 1992.
MODIFICADO POR : Ing. Elvis García
FECHA : Agosto 15, 2024
------------------------------------------------------------------
}
GLOBALS "irprgb000.4gl"
DEFINE exist_act DECIMAL(12,2)
DEFINE user1 CHAR(9)
DEFINE fech1 DATETIME YEAR TO MINUTE,
arr_tabla DYNAMIC ARRAY OF RECORD
articulo VARCHAR(150),
existencia FLOAT,
exist_minima FLOAT,
dias_transito INT,
xcuenta1 VARCHAR(14),
status_t CHAR(1),
enviarMX CHAR(5),
codn,codgrupo,codtipo,codsec INT,
id_maintainX INT
END RECORD
DEFINE xcodid INT,
xcuenta VARCHAR(14),
arr_trans DYNAMIC ARRAY OF RECORD
fecha VARCHAR(15),
movimiento VARCHAR(100),
num_doc INT,
cantidad FLOAT
END RECORD, maintainGO BOOLEAN , answer, checkMaintainID INT
DEFINE sp_nom STRING, colors DYNAMIC ARRAY OF STRING
MAIN
DEFER INTERRUPT
CALL ARG_VAL(1) RETURNING usuarios
CALL ARG_VAL(2) RETURNING clave
CALL ARG_VAL(3) RETURNING impresor
CONNECT TO "smarmotech" USER usuarios USING clave
SELECT * INTO p_companias.* FROM companias
CALL irprmt002()
END MAIN
FUNCTION irprmt002()
CLEAR SCREEN
OPTIONS
FORM LINE 8,
ERROR LINE 23,
COMMENT LINE 21
OPEN FORM irfmmt002 FROM "irfmmt002"
DISPLAY FORM irfmmt002
#CALL pantalla()
DISPLAY "irprmt002" AT 4,3
DISPLAY "Maestra de Repuestos" at 6,30
CALL busca_maestra()
END FUNCTION
FUNCTION irpcad002()
## Captura los datos que va a contener el registro
INPUT BY NAME m_articulos.*,xcuenta, maintainGO
BEFORE INPUT
INITIALIZE m_articulos TO NULL
CALL cuentas()
LET maintainGo = FALSE
## Verifica que el codigo no exista en el catalogo de m_aINPrticulos. Si existe,
## entonces despliega los datos del registro existente.
BEFORE FIELD cod_sec
SELECT MAX(a.cod_sec) INTO m_articulos.cod_sec
FROM irtb00002 a
WHERE a.cod_n = m_articulos.cod_n and
a.cod_grupo = m_articulos.cod_grupo and
a.cod_tipo = m_articulos.cod_tipo
IF m_articulos.cod_sec IS NULL THEN
LET m_articulos.cod_sec = 1
ELSE
LET m_articulos.cod_sec = m_articulos.cod_sec + 1
END IF
DISPLAY m_articulos.cod_sec
AFTER FIELD cod_sec
IF (m_articulos.cod_n = 0 AND m_articulos.cod_grupo = 0 AND
m_articulos.cod_tipo = 0 AND m_articulos.cod_sec = 0 ) THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD cod_n
END IF
SELECT a.* INTO articulos.* FROM irtb00002 a
WHERE a.cod_n = m_articulos.cod_n AND
a.cod_grupo = m_articulos.cod_grupo AND
a.cod_tipo = m_articulos.cod_tipo AND
a.cod_sec = m_articulos.cod_sec
IF status != NOTFOUND THEN
IF articulos.status_t IS NOT NULL THEN
LET numero_msg = 39
CALL msg(numero_msg)
DISPLAY BY NAME articulos.descrip_esp,
articulos.status_t THRU articulos.fech_mod
END IF
LET numero_msg = 12
CALL msg(numero_msg)
NEXT FIELD cod_n
END IF
{ AFTER FIELD codid
NEXT FIELD xcuenta
AFTER FIELD xcuenta
NEXT FIELD cod_sp }
AFTER FIELD cod_sp_sec
IF m_articulos.cod_sp IS NOT NULL AND m_articulos.cod_sp_sec IS NOT NULL THEN
SELECT nom_sp, id_maintainx INTO sp_nom, checkMaintainID FROM cotb00001
WHERE cod_sp = m_articulos.cod_sp
AND cod_sp_sec = m_articulos.cod_sp_sec
IF STATUS = NOTFOUND THEN
CALL msg(3)
ELSE
DISPLAY BY NAME sp_nom
END IF
END IF
AFTER INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = false
RETURN
END IF
SELECT unique cod_n FROM irtb00006
WHERE cod_n = m_articulos.cod_n and
cod_grupo = m_articulos.cod_grupo and
cod_tipo = m_articulos.cod_tipo and
cod_sec = m_articulos.cod_sec and
cod_mov = 99 and status_t is null
IF status = notfound THEN
LET datos_gen.num_doc = 0
SELECT MAX(a.num_doc) INTO datos_gen.num_doc FROM irtb00006 a
WHERE a.status_t IS NULL AND a.cod_mov = 99
IF datos_gen.num_doc IS NULL THEN
LET datos_gen.num_doc = 0
END IF
LET datos_gen.num_doc = datos_gen.num_doc + 1
IF xcuenta IS NULL THEN
CALL msg(16)
NEXT FIELD xcuenta
END IF
IF m_articulos.unidad_med IS NULL THEN
CALL msg(16)
NEXT FIELD unidad_med
END IF
IF maintainGo THEN
IF checkMaintainID IS NULL THEN
CALL fgl_winmessage(
"NO EXISTE PROVEEDOR",
"El proveedor insertado no se encuentra en MaintainX",
"stop")
NEXT FIELD cod_sp
END IF
END IF
IF MaintainGO THEN
CALL ApiMaintainR('POST',NULL, m_articulos.*,null) RETURNING m_articulos.id_maintainX
IF m_articulos.id_maintainX IS NULL OR m_articulos.id_maintainX = 0 THEN
ROLLBACK WORK
ELSE
DISPLAY "nuevo ID: ",m_articulos.id_maintainX
LET m_articulos.enviarMX = 'SI'
END IF
DISPLAY "YES"
END IF
INSERT INTO irtb00006
(num_doc
,fecha
,cod_mov
,cod_n
,cod_grupo
,cod_tipo
,cod_sec
,cantidad_2
,us_crea
,fech_crea
,bodega
,costo_act
,costo_old)
VALUES (datos_gen.num_doc,today,99,
m_articulos.cod_n,m_articulos.cod_grupo,
m_articulos.cod_tipo,m_articulos.cod_sec,
m_articulos.existencia,
USUARIOS,GETDATE(),1,0,0)
END IF
BEGIN WORK
INSERT INTO irtb00002
(cod_n,cod_grupo,cod_tipo,cod_sec,descrip_esp,descrip_ing,unidad_med,existencia
,exist_min,{dia_llegada,}categoria,us_crea,fech_crea,cuenta, id_maintainX, enviarMX,cod_sp,cod_sp_sec)
VALUES (m_articulos.cod_n,m_articulos.cod_grupo,
m_articulos.cod_tipo,m_articulos.cod_sec, m_articulos.descrip_esp,
m_articulos.descrip_ing,m_articulos.unidad_med,
m_articulos.existencia,
m_articulos.exist_min,{dia_llegada,}
m_articulos.categoria,usuarios,getdate(),xcuenta,
m_articulos.id_maintainX, m_articulos.enviarMX,
m_articulos.cod_sp, m_articulos.cod_sp_sec)
IF m_articulos.categoria IS NOT NULL THEN
INSERT INTO irtb00016
VALUES (m_articulos.cod_n,m_articulos.cod_grupo,
m_articulos.cod_tipo,m_articulos.cod_sec,
m_articulos.categoria,TODAY,null,usuarios,getdate(),null,null)
END IF
IF SQLCA.SQLCODE < 0 THEN
ROLLBACK WORK
ELSE
COMMIT WORK
LET numero_msg = 1
CALL msg(numero_msg)
END IF
CLEAR FORM
END input
END FUNCTION
FUNCTION irpcmf002()
{CLEAR FORM
## Aqui se prepara para la captura del criterio de seleccion
CONSTRUCT criterio ON a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,
a.descrip_esp,a.descrip_ing
FROM cod_n,cod_grupo,cod_tipo,cod_sec,descrip_esp,
descrip_ing
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
LET SELEC = "SELECT UNIQUE a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec, ",
" a.existencia,a.exist_min,a.dia_llegada,a.categoria, ",
" a.status_t,a.us_crea,a.fech_crea,a.us_mod,a.fech_mod, ",
" a.descrip_esp,a.descrip_ing,a.unidad_med,a.codid ",
"FROM irtb00002 a ",
"WHERE ",
criterio clipped," ORDER BY 1,2,3,4 "
PREPARE busca FROM selec
DECLARE datos SCROLL CURSOR FOR busca
OPEN datos
FETCH FIRST datos INTO m_articulos.cod_n ,m_articulos.cod_grupo ,m_articulos.cod_tipo ,m_articulos.cod_sec ,
m_articulos.existencia,m_articulos.exist_min,m_articulos.dia_llegada,m_articulos.categoria,
m_articulos.status_t,m_articulos.us_crea,m_articulos.fech_crea,m_articulos.us_mod,
m_articulos.fech_mod,
descrip_esp,descrip_ing,medida,xcodid
IF STATUS = NOTFOUND THEN
LET numero_msg = 3
CALL msg(numero_msg)
RETURN
END IF
CALL art_existe()
DISPLAY BY NAME m_articulos.*
MENU "OPCIONES "
COMMAND "Siguiente" "Presenta en pantalla el proximo registro encontrado"
FETCH NEXT datos INTO m_articulos.cod_n ,m_articulos.cod_grupo ,m_articulos.cod_tipo ,m_articulos.cod_sec ,
m_articulos.existencia,m_articulos.exist_min,m_articulos.dia_llegada,m_articulos.categoria,
m_articulos.status_t,m_articulos.us_crea,m_articulos.fech_crea,m_articulos.us_mod,
m_articulos.fech_mod,
descrip_esp,descrip_ing,medida,xcodid
IF STATUS = NOTFOUND THEN
LET numero_msg = 4
CALL msg(numero_msg)
END IF
CALL art_existe()
DISPLAY BY NAME m_articulos.*
COMMAND "Anterior" "Presenta en pantalla el registro anterior encontrado"
FETCH PREVIOUS datos INTO m_articulos.cod_n ,m_articulos.cod_grupo ,m_articulos.cod_tipo ,m_articulos.cod_sec ,
m_articulos.existencia,m_articulos.exist_min,m_articulos.dia_llegada,m_articulos.categoria,
m_articulos.status_t,m_articulos.us_crea,m_articulos.fech_crea,m_articulos.us_mod,
m_articulos.fech_mod,
descrip_esp,descrip_ing,medida,xcodid
IF STATUS = NOTFOUND THEN
LET numero_msg = 5
CALL msg(numero_msg)
END IF
CALL art_existe()
DISPLAY BY NAME m_articulos.*
LET numero_msg = 5
CALL msg(numero_msg)
COMMAND "Ultimo" "Presenta en pantalla el ultimo registro encontrado"
FETCH LAST datos INTO m_articulos.cod_n ,m_articulos.cod_grupo ,m_articulos.cod_tipo ,m_articulos.cod_sec ,
m_articulos.existencia,m_articulos.exist_min,m_articulos.dia_llegada,m_articulos.categoria,
m_articulos.status_t,m_articulos.us_crea,m_articulos.fech_crea,m_articulos.us_mod,
m_articulos.fech_mod,
descrip_esp,descrip_ing,medida,xcodid
CALL art_existe()
DISPLAY BY NAME m_articulos.*
LET numero_msg = 4
CALL msg(numero_msg)
COMMAND "Escoger" "<Esc> Actualiza Registro <Ctrl-C> Cancela Operacion"
}
INITIALIZE maintainGO TO NULL
LET user1 = m_articulos.us_crea
LET fech1 = m_articulos.fech_crea
INPUT BY NAME m_articulos.descrip_esp,m_articulos.descrip_ing,m_articulos.unidad_med,m_articulos.exist_min,
m_articulos.dia_llegada,xcuenta, m_articulos.id_maintainX, m_articulos.enviarMX, maintainGO,
m_articulos.cod_sp, m_articulos.cod_sp_sec WITHOUT DEFAULTS
AFTER FIELD cod_sp_sec
IF m_articulos.cod_sp IS NOT NULL AND m_articulos.cod_sp_sec IS NOT NULL THEN
SELECT nom_sp, id_maintainx INTO sp_nom, checkMaintainID FROM cotb00001
WHERE cod_sp = m_articulos.cod_sp
AND cod_sp_sec = m_articulos.cod_sp_sec
IF STATUS = NOTFOUND THEN
CALL msg(3)
NEXT FIELD cod_sp
ELSE
DISPLAY BY NAME sp_nom
END IF
END IF
NEXT FIELD maintainGO
AFTER INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
IF xcuenta IS NULL THEN
CALL msg(16)
NEXT FIELD xcuenta
END IF
IF m_articulos.unidad_med IS NULL THEN
CALL msg(16)
NEXT FIELD unidad_med
END IF
IF maintainGo THEN
IF checkMaintainID IS NULL THEN
CALL fgl_winmessage(
"NO EXISTE PROVEEDOR",
"El proveedor insertado no se encuentra en MaintainX",
"stop")
NEXT FIELD cod_sp
END IF
END IF
SELECT costo_st INTO m_articulos.descrip_ing from irtb00013 where mes_fin = 12 and ano = 2024
and cod_n =m_articulos.cod_n AND cod_grupo = m_articulos.cod_grupo
AND cod_tipo = m_articulos.cod_tipo AND cod_sec = m_articulos.cod_sec
AND status_t IS NULL
SELECT SUM(cantidad_2) INTO m_articulos.existencia from irtb00006
WHERE cod_n =m_articulos.cod_n AND cod_grupo = m_articulos.cod_grupo
AND cod_tipo = m_articulos.cod_tipo AND cod_sec = m_articulos.cod_sec
AND status_t IS NULL
BEGIN WORK
IF MaintainGO THEN
IF m_articulos.id_maintainX IS NULL THEN
CALL ApiMaintainR('POST',NULL, m_articulos.*,usuarios) RETURNING answer
IF answer IS NOT NULL THEN
LET m_articulos.id_maintainx = answer
END IF
ELSE
CALL ApiMaintainR('PATCH',m_articulos.id_maintainX, m_articulos.*,usuarios) RETURNING answer
END IF
IF answer IS NULL THEN
ROLLBACK WORK
DISPLAY "NULL ANSWER"
ELSE
DISPLAY "SUCCESS"
LET m_articulos.enviarmx = 'SI'
INITIALIZE m_articulos.descrip_ing, m_articulos.existencia TO NULL
END IF
END IF
UPDATE irtb00002 SET (descrip_esp,descrip_ing,unidad_med
,exist_min,dia_llegada,categoria,us_mod,fech_mod,cuenta, id_maintainX, enviarMX,
cod_sp, cod_sp_sec)
=
(m_articulos.descrip_esp,
m_articulos.descrip_ing,m_articulos.unidad_med,
m_articulos.exist_min,
m_articulos.dia_llegada,m_articulos.categoria,
usuarios,GETDATE(),xcuenta, m_articulos.id_maintainX, m_articulos.enviarMX,
m_articulos.cod_sp, m_articulos.cod_sp_sec)
WHERE codid = xcodid
IF m_articulos.existencia is null THEN
LET m_articulos.existencia = 0
END IF
SELECT a.* FROM irtb00006 a
WHERE a.cod_n=m_articulos.cod_n and
a.cod_grupo=m_articulos.cod_grupo and
a.cod_tipo=m_articulos.cod_tipo and
a.cod_sec=m_articulos.cod_sec and
a.cod_mov = 99 and status_t is null
IF STATUS = NOTFOUND THEN
INSERT INTO irtb00006
VALUES (1,today,null,null,null,null,null,null,99,null,
m_articulos.cod_n,m_articulos.cod_grupo,m_articulos.cod_tipo,
m_articulos.cod_sec,null,m_articulos.existencia,null,null,null,
null,user1,fech1,useruarios,getdate())
ELSE
UPDATE irtb00006 SET (cantidad_2,us_mod,fech_mod) =
(m_articulos.existencia,usuarios,getdate())
WHERE @cod_n=m_articulos.cod_n and @cod_grupo=m_articulos.cod_grupo and
@cod_tipo=m_articulos.cod_tipo and @cod_sec=m_articulos.cod_sec
and @cod_mov = 99 and status_t is null
END IF
SELECT a.* FROM irtb00016 a
WHERE a.cod_n=m_articulos.cod_n and a.cod_grupo=m_articulos.cod_grupo and
a.cod_tipo=m_articulos.cod_tipo and a.cod_sec=m_articulos.cod_sec
IF STATUS = NOTFOUND THEN
IF m_articulos.categoria IS NOT NULL THEN
INSERT INTO irtb00016
VALUES(m_articulos.cod_n,m_articulos.cod_grupo,m_articulos.cod_tipo,
m_articulos.cod_sec,m_articulos.categoria,today,null,usuarios,
GETDATE(),null,null)
END IF
ELSE
IF m_articulos.categoria IS NOT NULL THEN
UPDATE irtb00016 SET categoria = m_articulos.categoria,
us_mod = usuarios,
fech_mod = getdate()
WHERE @cod_n = m_articulos.cod_n AND
@cod_grupo = m_articulos.cod_grupo AND
@cod_tipo = m_articulos.cod_tipo AND
@cod_sec = m_articulos.cod_sec
ELSE
DELETE FROM irtb00016
WHERE @cod_n = m_articulos.cod_n AND
@cod_grupo = m_articulos.cod_grupo AND
@cod_tipo = m_articulos.cod_tipo AND
@cod_sec = m_articulos.cod_sec
END IF
END IF
IF SQLCA.SQLCODE < 0 THEN
ROLLBACK WORK
ELSE
COMMIT WORK
LET numero_msg = 13
CALL msg(numero_msg)
END IF
END INPUT
END FUNCTION
FUNCTION llena_tabla()
CALL arr_tabla.clear()
CONSTRUCT criterio ON a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_Sec,a.descrip_esp FROM
codn1,codgrupo1,codtipo1,codsec1,descripcion1
AFTER CONSTRUCT
IF int_flag THEN
CALL msg(2)
EXIT CONSTRUCT
END IF
END CONSTRUCT
IF int_flag THEN
LET int_flag = FALSE
RETURN
END IF
LET selec = "
SELECT CAST(a.cod_n AS VARCHAR(5))+'-'+CAST(a.cod_grupo AS VARCHAR(5))+'-'+CAST(a.cod_tipo AS VARCHAR(5))+'-'+
CAST(a.cod_sec AS VARCHAR(5))+' '+RTRIM(a.descrip_esp)+' '+a.unidad_med,
ISNULL(SUM(b.cantidad_2),0),a.exist_min,a.dia_llegada,a.cuenta,a.status_t,a.enviarMX,
a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_Sec, a.id_maintainX, a.cod_sp, a.cod_sp_sec
FROM irtb00002 a,irtb00006 b
WHERE ",criterio CLIPPED," AND (a.cod_n = b.cod_n AND a.cod_grupo = b.cod_grupo AND a.cod_Tipo = b.cod_tipo AND a.cod_sec = b.cod_sec) "
#(b.status_t IS NULL) AND (a.status_t IS NULL)
,"GROUP BY a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_Sec,a.descrip_Esp,a.exist_min,a.dia_llegada,a.unidad_med,
a.cuenta,a.status_t,a.enviarMX, a.id_maintainX, a.cod_sp, a.cod_sp_sec
ORDER BY a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_Sec
"
#DISPLAY SELEC
PREPARE cllena FROM selec
DECLARE busca_maestra CURSOR FOR cllena
LET idx = 1
FOREACH busca_maestra INTO arr_tabla[idx].*
IF arr_tabla[idx].status_t IS NOT NULL THEN
LET colors[idx] = "lightred reverse"
ELSE
LET colors[idx] = NULL
END IF
LET idx =idx + 1
END FOREACH
END FUNCTION
FUNCTION busca_maestra()
CALL llena_tabla()
DIALOG ATTRIBUTE(UNBUFFERED)
DISPLAY ARRAY arr_tabla TO stabla.*
BEFORE DISPLAY
IF arr_tabla[arr_curr()].status_t IS NOT NULL THEN
CALL dialog.setCellAttributes(colors)
END IF
ON ACTION eliminar ATTRIBUTE(TEXT="DESACTIVAR",IMAGE="delete")
IF m_articulos.cod_n IS NOT NULL THEN
LET exist_act = 0
SELECT ISNULL(SUM(a.cantidad_2),0) INTO exist_act FROM irtb00006 a
WHERE a.cod_n = m_articulos.cod_n AND
a.cod_grupo = m_articulos.cod_grupo AND
a.cod_tipo = m_articulos.cod_tipo AND
a.cod_sec = m_articulos.cod_sec AND
a.status_t IS NULL
IF exist_act = 0 THEN
LET opt = fgl_winquestion("ELIMINAR","ESTA SEGURO?","NO","NO|YES","QUESTION",0)
LET opt =upshift(opt)
IF opt = "YES" THEN
BEGIN WORK
INITIALIZE answer TO NULL
UPDATE irtb00002 SET (status_t,us_mod,fech_mod) = ("E",usuarios,GETDATE())
WHERE @cod_n = arr_tabla[arr_curr()].codn AND
@cod_grupo = arr_tabla[arr_curr()].codgrupo AND
@cod_tipo = arr_tabla[arr_curr()].codtipo AND
@cod_sec = arr_tabla[arr_curr()].codsec
UPDATE irtb00016 SET (status_t,us_mod,fech_mod) = ("E",usuarios,GETDATE())
WHERE @cod_n = arr_tabla[arr_curr()].codn AND
@cod_grupo = arr_tabla[arr_curr()].codgrupo AND
@cod_tipo = arr_tabla[arr_curr()].codtipo AND
@cod_sec = arr_tabla[arr_curr()].codsec
IF arr_tabla[arr_curr()].id_maintainX IS NOT NULL THEN
CALL ApiMaintainR('DELETE',arr_tabla[arr_curr()].id_maintainX, m_articulos.*,NULL) RETURNING answer
IF answer != 1 THEN
ROLLBACK WORK
END IF
END IF
IF SQLCA.SQLCODE < 0 THEN
ROLLBACK WORK
ELSE
COMMIT WORK
LET numero_msg = 39
CALL msg(numero_msg)
END IF
END IF
ELSE
CALL fgl_Winmessage("INFO","NO PUEDES DESACTIVAR ESTE PRODUCTO, TIENE EXISTENCIA","INFO")
END IF
END IF
ON ACTION refrescar ATTRIBUTE(TEXT="Refrescar",IMAGE="refresh")
CALL llena_tabla()
ON ACTION actualiza
IF arr_tabla[arr_curr()].codn IS NOT NULL THEN
INITIALIZE m_articulos TO NULL
LET SELEC = "SELECT UNIQUE a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec, ",
" a.exist_min,a.dia_llegada,a.categoria, ",
" a.status_t,a.us_crea,a.fech_crea,a.us_mod,a.fech_mod, ",
" a.descrip_esp,a.descrip_ing,a.unidad_med,a.codid, ",
" a.cuenta, a.enviarMX, a.id_maintainx, a.cod_sp, a.cod_sp_sec ",
"FROM irtb00002 a ",
"WHERE (a.cod_n = ",arr_tabla[arr_curr()].codn," AND ",
" a.cod_Grupo = ",arr_tabla[arr_curr()].codgrupo, " AND ",
" a.cod_tipo = ",arr_tabla[arr_curr()].codtipo, " AND ",
" a.cod_sec = ",arr_tabla[arr_curr()].codsec, ")"
PREPARE busca FROM selec
EXECUTE busca INTO m_articulos.cod_n ,m_articulos.cod_grupo ,m_articulos.cod_tipo ,m_articulos.cod_sec ,
m_articulos.exist_min,m_articulos.dia_llegada,m_articulos.categoria,
m_articulos.status_t,m_articulos.us_crea,m_articulos.fech_crea,m_articulos.us_mod,
m_articulos.fech_mod,
m_articulos.descrip_esp,m_articulos.descrip_ing,medida,xcodid,xcuenta, m_articulos.enviarMX, m_articulos.id_maintainX,
m_articulos.cod_sp, m_articulos.cod_sp_sec
LET m_articulos.unidad_med =medida
DISPLAY BY NAME m_articulos.unidad_med
DISPLAY arr_tabla[arr_curr()].existencia TO existencia1
CALL cuentas()
DISPLAY BY NAME m_articulos.cod_n ,m_articulos.cod_grupo ,m_articulos.cod_tipo ,m_articulos.cod_sec ,
m_articulos.exist_min,m_articulos.dia_llegada,m_articulos.categoria,
m_articulos.status_t,m_articulos.us_crea,m_articulos.fech_crea,m_articulos.us_mod,
m_articulos.fech_mod,
m_articulos.descrip_esp,m_articulos.descrip_ing,
m_articulos.unidad_med,xcuenta, m_articulos.enviarMX, m_articulos.id_maintainX,
m_articulos.cod_sp, m_articulos.cod_sp_sec
CALL irpcmf002()
END IF
AFTER DISPLAY
LET m_articulos.cod_n = arr_tabla[arr_curr()].codn
LET m_articulos.cod_grupo = arr_tabla[arr_curr()].codgrupo
LET m_articulos.cod_tipo = arr_tabla[arr_curr()].codtipo
LET m_articulos.cod_sec = arr_tabla[arr_curr()].codsec
CALL transacciones()
END DISPLAY
DISPLAY ARRAY arr_trans TO sdocs.*
END DISPLAY
ON ACTION adicionar ATTRIBUTE(TEXT="Nuevo",IMAGE="new")
INITIALIZE m_articulos TO NULL
CALL irpcad002()
ON ACTION activar ATTRIBUTE(TEXT="Re-activar",IMAGE="refresh")
LET opt = fgl_winquestion("ACTIVACION","SEGURO QUE QUIERE ACTIVAR ESTE REGISTRO?","YES","YES|NO","QUESTION",0)
LET opt =upshift(opt)
IF opt = "YES" THEN
UPDATE irtb00002 SET status_t = NULL WHERE
cod_n = arr_tabla[arr_curr()].codn AND cod_grupo = arr_tabla[arr_curr()].codgrupo
AND cod_tipo = arr_tabla[arr_curr()].codtipo AND cod_sec = arr_tabla[arr_curr()].codsec
IF STATUS != NOTFOUND THEN
LET numero_msg = 14
CALL msg(numero_msg)
ELSE
LET numero_msg = 1663
CALL msg(numero_msg)
END IF
END IF
ON ACTION salir ATTRIBUTE(TEXT="Salir",IMAGE="quit")
EXIT DIALOG
END DIALOG
END FUNCTION
FUNCTION transacciones()
DECLARE busca_trx CURSOR FOR
SELECT CAST(a.fecha AS VARCHAR(15)),CAST(b.cod_mov AS VARCHAR(5))+' '+b.descrip_mov,a.num_doc,a.cantidad_2
FROM irtb00006 a,irtb00005 b
WHERE a.cod_mov = b.cod_mov AND
(a.cod_n = m_articulos.cod_n AND
a.cod_grupo = m_articulos.cod_grupo AND
a.cod_tipo = m_articulos.cod_tipo AND
a.cod_sec = m_articulos.cod_sec)
AND a.status_T IS NULL
ORDER BY a.fecha
LET idx = 1
FOREACH busca_trx INTO arr_trans[idx].*
LET idx = idx + 1
END FOREACH
END FUNCTION
+281
View File
@@ -0,0 +1,281 @@
{
------------------------------------------------------------------
PROGRAMA : IPPRMT003
OBJETIVO : Capturar, Modificar, Eliminar registros de la
Tabla Tipos de Movimientos.
PROGRAMADOR : Ing. Juan Soto.
FECHA REALIZACION : Enero 20, 1993.
------------------------------------------------------------------
}
GLOBALS "irprgb000.4gl"
DEFINE xconsumo VARCHAR(10)
MAIN
DEFER INTERRUPT
CALL ARG_VAL(1) RETURNING usuarios
CALL ARG_VAL(2) RETURNING clave
CALL ARG_VAL(3) RETURNING impresor
CONNECT to "smarmotech" USER usuarios USING clave
SELECT * INTO p_companias.* FROM companias
CALL irprmt003()
END MAIN
FUNCTION irprmt003()
CLEAR SCREEN
OPTIONS
FORM LINE 9,
ERROR LINE 23,
COMMENT LINE 21
OPEN FORM irfmmt003 FROM "irfmmt003"
DISPLAY FORM irfmmt003
DISPLAY "irprmt003" AT 4,3
DISPLAY "Tipos de Movimientos" AT 6,30
MENU "OPCIONES"
COMMAND "Adicionar"
"<Esc> Adiciona Registro <Ctrl-C> Cancela Operacion"
let int_flag = false
CLEAR FORM
let int_flag = false
CALL irpcad003()
COMMAND "Consultar-modificar"
"<Esc> Realiza Busqueda <Ctrl-C> Cancela Operacion"
CALL irpcmf003()
COMMAND "Salir" "Retorna Menu Anterior"
EXIT MENU
END MENU
END FUNCTION
FUNCTION irpcad003()
## Captura los datos que va a contener el registro
#WHENEVER ERROR CONTINUE
INPUT BY NAME transacc.*
## Verifica que el codigo no exista en el catalogo de transacciones. Si existe,
## entonces despliega los datos del registro existente.
AFTER FIELD cod_mov
IF transacc.cod_mov = 0 OR
transacc.cod_mov IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD cod_mov
ELSE
SELECT * INTO transacc.* FROM irtb00005
WHERE cod_mov = transacc.cod_mov
IF status >= 0 THEN
IF STATUS != NOTFOUND THEN
IF transacc.status_t = "E" THEN
LET numero_msg = 36
CALL msg(numero_msg)
NEXT FIELD cod_mov
END IF
DISPLAY BY NAME transacc.*
LET numero_msg = 12
CALL msg(numero_msg)
LET transacc.descrip_mov = NULL
LET transacc.status_mov = NULL
LET transacc.cuenta_1 = NULL
LET transacc.cuenta_2 = NULL
LET transacc.cuenta_3 = NULL
NEXT FIELD cod_mov
END IF
ELSE
END IF
END IF
AFTER FIELD descrip_mov
IF transacc.descrip_mov IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD descrip_mov
END IF
AFTER INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
IF transacc.descrip_mov IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD descrip_mov
ELSE
INSERT INTO irtb00005 VALUES (transacc.cod_mov,
transacc.descrip_mov, transacc.status_mov,
transacc.cuenta_1, transacc.cuenta_2,
transacc.cuenta_3, null,SUSER_SNAME(), GETDATE(), null, NULL,transacc.consumo,
transacc.control_departamento,transacc.control_maquina, transacc.requisiciones, transacc.requiere_autorizacion )
LET numero_msg = 1
CALL msg(numero_msg)
CLEAR FORM
INITIALIZE transacc.* TO NULL
NEXT FIELD cod_mov
END IF
AFTER FIELD fech_mod
EXIT INPUT
END INPUT
END FUNCTION
FUNCTION irpcmf003()
DEFINE encontrados INTEGER
## Aqui se prepara para la captura del criterio de seleccion
#WHENEVER ERROR CONTINUE
CONSTRUCT criterio ON irtb00005.cod_mov,irtb00005.descrip_mov FROM cod_mov,descrip_mov
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
LET SELEC = " SELECT UNIQUE * FROM irtb00005 where ",
" status_t is null and ",
criterio clipped,
" ORDER BY 1"
PREPARE busca FROM selec
DECLARE datos SCROLL CURSOR WITH HOLD FOR busca
OPEN datos
FETCH FIRST datos INTO transacc.*
IF status >= 0 THEN
IF STATUS = NOTFOUND THEN
LET numero_msg = 3
CALL msg(numero_msg)
RETURN
END IF
ELSE
END IF
DISPLAY BY NAME transacc.*
MENU "OPCIONES "
COMMAND "Siguiente"
"Presenta en pantalla el proximo registro encontrado"
FETCH NEXT datos INTO transacc.*,xconsumo
IF STATUS = NOTFOUND THEN
LET numero_msg = 4
CALL msg(numero_msg)
END IF
DISPLAY BY NAME transacc.*
COMMAND "Anterior"
"Presenta en pantalla el registro anterior encontrado"
FETCH PREVIOUS datos INTO transacc.*,xconsumo
IF STATUS = NOTFOUND THEN
LET numero_msg = 5
CALL msg(numero_msg)
END IF
DISPLAY BY NAME transacc.*
COMMAND "Primero"
"Presenta en pantalla el primer registro encontrado"
FETCH FIRST datos INTO transacc.*
DISPLAY BY NAME transacc.*
LET numero_msg = 5
CALL msg(numero_msg)
COMMAND "Ultimo"
"Presenta en pantalla el ultimo registro encontrado"
FETCH LAST datos INTO transacc.*
DISPLAY BY NAME transacc.*,xconsumo
LET numero_msg = 4
CALL msg(numero_msg)
COMMAND "Escoger"
"<Esc> Actualiza Registro <Ctrl-C> Cancela Operacion"
INPUT BY NAME transacc.descrip_mov,
transacc.status_mov,
transacc.consumo,
transacc.control_departamento,
transacc.control_maquina,
transacc.requisiciones,
transacc.requiere_autorizacion,
transacc.cuenta_1,
transacc.cuenta_2,
transacc.cuenta_3,
transacc.us_crea,
transacc.fech_crea,
transacc.us_mod,
transacc.fech_mod WITHOUT DEFAULTS
AFTER FIELD descrip_mov
IF transacc.descrip_mov IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD descrip_mov
END IF
AFTER INPUT
#### Verifica si el usuario presiono la tecla <Ctrl-C>
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
UPDATE irtb00005 SET descrip_mov = transacc.descrip_mov,
status_mov = transacc.status_mov,
cuenta_1 = transacc.cuenta_1,
cuenta_2 = transacc.cuenta_2,
cuenta_3 = transacc.cuenta_3,
consumo = transacc.consumo,
control_departamento = transacc.control_departamento,
control_maquina = transacc.control_maquina,
requisiciones = transacc.requisiciones,
requiere_autorizacion = transacc.requiere_autorizacion,
us_mod = SUSER_SNAME(),
fech_mod = GETDATE()
WHERE cod_mov = transacc.cod_mov
LET numero_msg = 13
CALL msg(numero_msg)
EXIT INPUT
END INPUT
COMMAND KEY ("L") "eLiminar"
LET encontrados = 0
SELECT count(*) INTO encontrados
FROM irtb00006
WHERE cod_mov = transacc.cod_mov AND status_t IS NULL
IF encontrados = 0 THEN
UPDATE irtb00005 SET status_t = "E"
WHERE cod_mov = transacc.cod_mov
LET numero_msg = 39
CALL msg(numero_msg)
ELSE
LET numero_msg = 383
CALL msg(numero_msg)
END IF
COMMAND "Retornar"
"Retorna al menu anterior"
CLEAR FORM
EXIT MENU
END MENU
END FUNCTION
+457
View File
@@ -0,0 +1,457 @@
{
-------------------------------------------------------------------------------
PROGRAMA : IRPRMT004
OBJETIVO : Capturar, Modificar, Eliminar registros de la
Tabla de Costos Estandares
PROGRAMADOR : Ing. Juan Fco. Soto.
FECHA REALIZACION : Marzo 1, 1993.
-------------------------------------------------------------------------------
}
GLOBALS "irprgb000.4gl"
DEFINE checkapi, answer INT
## Arreglo consulta/modificacion: se navega sobre un arreglo en memoria en vez
## de un SCROLL CURSOR vivo, porque bajo el RDD de SQL Server cualquier otra
## sentencia (los SELECT a mestable, el COMMIT del Escoger, el UPDATE de
## eLiminar) cierra el cursor de servidor y provoca el error -400
## "Fetch attempted on unopen cursor".
DEFINE arr_costos DYNAMIC ARRAY OF RECORD
mes_ini LIKE intb00013.mes_ini,
mes_fin LIKE intb00013.mes_fin,
ano LIKE intb00013.ano,
cod_n LIKE intb00001.cod_n,
cod_grupo LIKE intb00001.cod_grupo,
cod_tipo LIKE intb00001.cod_tipo,
cod_sec LIKE intb00001.cod_sec,
costo_st LIKE intb00013.costo_st,
us_crea LIKE intb00013.us_crea,
fech_crea LIKE intb00013.fech_crea,
us_mod LIKE intb00013.us_mod,
fech_mod LIKE intb00013.fech_mod,
descrip_esp LIKE intb00001.descrip_esp,
unidad_med LIKE intb00001.unidad_med
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 irprmt004()
END MAIN
FUNCTION irprmt004()
CLEAR SCREEN
OPTIONS
FORM LINE 9,
ERROR LINE 23,
COMMENT LINE 22
OPEN FORM irfmmt004 FROM "irfmmt004"
DISPLAY FORM irfmmt004
DISPLAY "irprmt004" AT 4,3
DISPLAY "Costo Standard " AT 6,31
MENU "OPCIONES"
COMMAND "Adicionar"
"<Esc> Adiciona Registro <Ctrl-C> Cancela Operacion"
CLEAR FORM
LET int_flag = false
CALL irpcad004()
COMMAND "Consultar-modificar"
"<Esc> Realiza Busqueda <Ctrl-C> Cancela Operacion"
LET int_flag = false
CALL irpcmf004()
COMMAND "Salir" "Retorna Menu Anterior"
EXIT MENU
END MENU
END FUNCTION
FUNCTION irpcad004()
#WHENEVER ERROR CONTINUE
## Captura los datos que va a contener el registro
INPUT BY NAME costos.mes_ini THRU costos.costo_st
## Verifica que el costo exista en el catalogo de costos. Si existe,
## entonces despliega los datos del registro existente.
AFTER FIELD mes_ini
IF costos.mes_ini IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD mes_ini
ELSE
SELECT descrip INTO descrip1 FROM mestable
WHERE mes = costos.mes_ini and
status_t is null
IF status >= 0 THEN
IF status = NOTFOUND THEN
LET numero_msg = 3
CALL msg(numero_msg)
NEXT FIELD mes_ini
END IF
END IF
DISPLAY BY NAME descrip1
END IF
AFTER FIELD mes_fin
IF costos.mes_fin IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD mes_fin
ELSE
SELECT descrip INTO descrip2 FROM mestable
WHERE mes = costos.mes_fin and
status_t is null
IF status >= 0 THEN
IF status = NOTFOUND THEN
LET numero_msg = 3
CALL msg(numero_msg)
NEXT FIELD mes_fin
END IF
END IF
DISPLAY BY NAME descrip2
END IF
AFTER FIELD ano
IF costos.ano IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD ano
END IF
AFTER FIELD cod_sec
SELECT mes_ini,mes_fin,ano,cod_n,cod_grupo,cod_tipo,cod_sec
FROM irtb00013
WHERE mes_ini = costos.mes_ini AND
mes_fin = costos.mes_fin AND
ano = costos.ano AND
cod_n = costos.cod_n AND
cod_grupo = costos.cod_grupo AND
cod_tipo = costos.cod_tipo AND
cod_sec = costos.cod_sec
IF status != NOTFOUND THEN
LET numero_msg = 12
CALL msg(numero_msg)
NEXT FIELD mes_ini
END IF
IF ( costos.cod_n = 0 AND costos.cod_grupo = 0 AND
costos.cod_tipo = 0 AND costos.cod_sec = 0 ) THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD cod_n
ELSE
SELECT a.descrip_esp,a.unidad_med
INTO articulos.descrip_esp,articulos.unidad_med
FROM irtb00002 a
WHERE a.cod_n=costos.cod_n AND a.cod_grupo=costos.cod_grupo AND
a.cod_tipo=costos.cod_tipo AND a.cod_sec=costos.cod_sec AND
a.status_t is null
IF status >= 0 THEN
IF status = NOTFOUND THEN
LET numero_msg = 3
CALL msg(numero_msg)
NEXT FIELD cod_n
END IF
END IF
DISPLAY BY NAME articulos.descrip_esp,articulos.unidad_med
END IF
AFTER FIELD costo_st
IF costos.costo_st IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD costo_st
END IF
AFTER INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
IF costos.costo_st IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD costo_st
ELSE
LET m_articulos.cod_n = costos.cod_n
LET m_articulos.cod_grupo = costos.cod_grupo
LET m_articulos.cod_tipo = costos.cod_tipo
LET m_articulos.cod_sec = costos.cod_sec
LET m_articulos.descrip_esp = articulos.descrip_esp
LET m_articulos.descrip_ing = costos.costo_st
SELECT SUM(cantidad_2) INTO m_articulos.existencia from irtb00006
WHERE cod_n = costos.cod_n and cod_grupo = costos.cod_grupo
and cod_tipo = costos.cod_tipo and cod_sec = costos.cod_sec
AND status_t IS NULL
SELECT exist_min, id_maintainx INTO m_articulos.exist_min, checkapi FROM irtb00002
WHERE cod_n = costos.cod_n and cod_grupo = costos.cod_grupo
and cod_tipo = costos.cod_tipo and cod_sec = costos.cod_sec
AND status_t IS NULL
BEGIN WORK
IF checkapi IS NOT NULL THEN
CALL ApiMaintainR('PATCH',checkapi, m_articulos.*, usuarios) RETURNING answer
IF answer != 1 THEN
DISPLAY "AQUI 6"
ROLLBACK WORK
END IF
END IF
INSERT INTO irtb00013 VALUES (costos.mes_ini,costos.mes_fin,
costos.ano,costos.cod_n,costos.cod_grupo,
costos.cod_tipo,costos.cod_sec,costos.costo_st,
null,USER,getdate(),null, NULL)
LET numero_msg = 1
CALL msg(numero_msg)
COMMIT WORK
LET costos.cod_n = NULL
LET costos.cod_grupo = NULL
LET costos.cod_tipo = NULL
LET costos.cod_sec = NULL
LET costos.costo_st = NULL
NEXT FIELD cod_n
END IF
END INPUT
END FUNCTION
FUNCTION irp_show004(p_idx)
## Copia el registro p_idx del arreglo en memoria a la pantalla.
DEFINE p_idx SMALLINT
LET costos.mes_ini = arr_costos[p_idx].mes_ini
LET costos.mes_fin = arr_costos[p_idx].mes_fin
LET costos.ano = arr_costos[p_idx].ano
LET costos.cod_n = arr_costos[p_idx].cod_n
LET costos.cod_grupo = arr_costos[p_idx].cod_grupo
LET costos.cod_tipo = arr_costos[p_idx].cod_tipo
LET costos.cod_sec = arr_costos[p_idx].cod_sec
LET costos.costo_st = arr_costos[p_idx].costo_st
LET costos.us_crea = arr_costos[p_idx].us_crea
LET costos.fech_crea = arr_costos[p_idx].fech_crea
LET costos.us_mod = arr_costos[p_idx].us_mod
LET costos.fech_mod = arr_costos[p_idx].fech_mod
LET articulos.descrip_esp = arr_costos[p_idx].descrip_esp
LET articulos.unidad_med = arr_costos[p_idx].unidad_med
SELECT descrip INTO descrip1 FROM mestable
WHERE mes = costos.mes_ini and status_t is null
DISPLAY BY NAME descrip1
SELECT descrip INTO descrip2 FROM mestable
WHERE mes = costos.mes_fin and status_t is null
DISPLAY BY NAME descrip2
DISPLAY BY NAME costos.*,articulos.descrip_esp,articulos.unidad_med
END FUNCTION
FUNCTION irpcmf004()
#WHENEVER ERROR CONTINUE
## Aqui se prepara para la captura del criterio de seleccion
DEFINE idx, tot SMALLINT
CONSTRUCT criterio ON c.mes_ini,c.mes_fin,c.ano,
c.cod_n,c.cod_grupo,
c.cod_tipo,c.cod_sec,c.costo_st
FROM mes_ini,mes_fin,ano,
cod_n,cod_grupo,
cod_tipo,cod_sec,costo_st
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
LET SELEC =
"SELECT UNIQUE c.mes_ini,c.mes_fin,c.ano,d.cod_n,d.cod_grupo, ",
" d.cod_tipo,d.cod_sec,c.costo_st,c.us_crea,c.fech_crea, ",
" c.us_mod,c.fech_mod,d.descrip_esp,d.unidad_med ",
"FROM irtb00013 c, irtb00002 d ",
"WHERE c.cod_n=d.cod_n AND c.cod_grupo=d.cod_grupo AND ",
" c.cod_tipo = d.cod_tipo AND c.cod_sec = d.cod_sec AND ",
" c.status_t is null AND d.status_t IS NULL AND ",
criterio clipped," ORDER BY 4,5,6,7"
## Se carga TODO el resultado a memoria de una sola vez y se cierra el cursor.
## Asi la navegacion no depende de un cursor vivo (que SQL Server cierra al
## ejecutar cualquier otra sentencia sobre la conexion).
PREPARE busca FROM selec
DECLARE datos CURSOR FOR busca
CALL arr_costos.clear()
LET tot = 1
FOREACH datos INTO arr_costos[tot].*
LET tot = tot + 1
END FOREACH
LET tot = tot - 1
FREE datos
IF tot = 0 THEN
LET numero_msg = 3
CALL msg(numero_msg)
RETURN
END IF
LET idx = 1
CALL irp_show004(idx)
MENU "OPCIONES"
COMMAND "Siguiente"
"Presenta en pantalla el proximo registro encontrado"
IF idx < tot THEN
LET idx = idx + 1
CALL irp_show004(idx)
ELSE
LET numero_msg = 4
CALL msg(numero_msg)
END IF
COMMAND "Anterior"
"Presenta en pantalla el registro anterior encontrado"
IF idx > 1 THEN
LET idx = idx - 1
CALL irp_show004(idx)
ELSE
LET numero_msg = 5
CALL msg(numero_msg)
END IF
COMMAND "Primero"
"Presenta en pantalla el primer registro encontrado"
LET idx = 1
CALL irp_show004(idx)
COMMAND "Ultimo"
"Presenta en pantalla el ultimo registro encontrado"
LET idx = tot
CALL irp_show004(idx)
COMMAND "Escoger"
"<Esc> Actualiza Registro <Ctrl-C> Cancela Operacion"
INPUT BY NAME costos.costo_st,
costos.us_crea,
costos.fech_crea,
costos.us_mod,
costos.fech_mod WITHOUT DEFAULTS
AFTER FIELD costo_st
IF costos.costo_st IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD costo_st
END IF
## Verifica si el usuario presiono la tecla <Ctrl-C>
AFTER INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
LET m_articulos.cod_n = costos.cod_n
LET m_articulos.cod_grupo = costos.cod_grupo
LET m_articulos.cod_tipo = costos.cod_tipo
LET m_articulos.cod_sec = costos.cod_sec
LET m_articulos.descrip_esp = articulos.descrip_esp
LET m_articulos.descrip_ing = costos.costo_st
SELECT SUM(cantidad_2) INTO m_articulos.existencia from irtb00006
WHERE cod_n = costos.cod_n and cod_grupo = costos.cod_grupo
and cod_tipo = costos.cod_tipo and cod_sec = costos.cod_sec
AND status_t IS NULL
SELECT exist_min, id_maintainx INTO m_articulos.exist_min, checkapi FROM irtb00002
WHERE cod_n = costos.cod_n and cod_grupo = costos.cod_grupo
and cod_tipo = costos.cod_tipo and cod_sec = costos.cod_sec
AND status_t IS NULL
BEGIN WORK
IF checkapi IS NOT NULL THEN
CALL ApiMaintainR('PATCH',checkapi, m_articulos.*, usuarios) RETURNING answer
IF answer != 1 THEN
DISPLAY "AQUI 6"
ROLLBACK WORK
END IF
END IF
UPDATE irtb00013 SET costo_st = costos.costo_st,
us_mod = USER,
fech_mod = getdate()
WHERE cod_n = costos.cod_n and
cod_grupo = costos.cod_grupo and
cod_tipo = costos.cod_tipo and
cod_sec = costos.cod_sec
## Refleja el nuevo costo en el arreglo en memoria para que la navegacion
## siga mostrando el valor actualizado.
LET arr_costos[idx].costo_st = costos.costo_st
LET arr_costos[idx].us_mod = usuarios
LET arr_costos[idx].fech_mod = TODAY
LET numero_msg = 13
CALL msg(numero_msg)
COMMIT WORK
EXIT INPUT
END INPUT
COMMAND KEY ("L") "eLiminar"
UPDATE irtb00013 SET status_t = "E"
WHERE cod_n = costos.cod_n and
cod_grupo = costos.cod_grupo and
cod_tipo = costos.cod_tipo and
cod_sec = costos.cod_sec
LET numero_msg = 39
CALL msg(numero_msg)
## Quita el registro eliminado del arreglo en memoria y reposiciona.
CALL arr_costos.deleteElement(idx)
LET tot = arr_costos.getLength()
IF tot = 0 THEN
CLEAR FORM
EXIT MENU
END IF
IF idx > tot THEN
LET idx = tot
END IF
CALL irp_show004(idx)
COMMAND "Retornar"
"Retorna al menu anterior"
CLEAR FORM
EXIT MENU
END MENU
END FUNCTION
File diff suppressed because it is too large Load Diff
+375
View File
@@ -0,0 +1,375 @@
{
------------------------------------------------------------------
PROGRAMA : IRPRMT009
OBJETIVO : Capturar, Modificar, Eliminar registros de la
Tabla Maquinas.
PROGRAMADOR : Ing. Juan Fco. Soto.
FECHA REALIZACION : Marzo 2, 1993.
------------------------------------------------------------------
}
GLOBALS "irprgb000.4gl"
DEFINE
# xcuenta VARCHAR(14),
xcodigo_externo VARCHAR(60)
DEFINE desc_activo STRING, id_maintain STRING
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 irprmt009()
END MAIN
FUNCTION irprmt009()
CLEAR SCREEN
OPTIONS
FORM LINE 9,
ERROR LINE 23,
COMMENT LINE 21
OPEN FORM irfmmt009 FROM "irfmmt009"
DISPLAY FORM irfmmt009
DISPLAY "irprmt009" AT 4,3
DISPLAY "Maquinas" AT 6,35
MENU
{ ON ACTION Adicionar
let int_flag = false
CLEAR FORM
CALL irpcad009()}
ON ACTION buscar
let int_flag = FALSE
CALL irpcmf009()
ON ACTION salir
EXIT MENU
END MENU
END FUNCTION
FUNCTION irpcad009()
# WHENEVER ERROR CONTINUE
## Captura los datos que va a contener el registro
INPUT BY NAME maquinaria.*,xcodigo_externo
BEFORE INPUT
CALL busca_departamento()
NEXT FIELD nombre
AFTER FIELD nombre
IF maquinaria.nombre IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD nombre
END IF
AFTER FIELD serie
IF maquinaria.serie IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD serie
END IF
AFTER FIELD id_codigo
SELECT descripcion INTO desc_activo FROM actb00001
WHERE codigo = maquinaria.id_codigo
DISPLAY BY NAME desc_activo
AFTER INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
IF maquinaria.serie IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD serie
END IF
IF maquinaria.departamento IS NULL THEN
CALL msg(16)
NEXT FIELD departamento
END IF
IF maquinaria.nombre IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD nombre
ELSE
SELECT ISNULL(MAX(codigo),0) INTO maquinaria.codigo FROM irtb00009
LET maquinaria.codigo = maquinaria.codigo + 1
DISPLAY BY NAME maquinaria.codigo
INSERT INTO irtb00009 (codigo,nombre,unidad_med,modelo,serie,fabricante,us_crea,fech_crea,departamento,
codigo_externo, id_codigo)
VALUES (maquinaria.codigo, maquinaria.nombre,
maquinaria.unidad_med,
maquinaria.modelo,maquinaria.serie,
maquinaria.fabricante,
usuarios, getdate(),maquinaria.departamento,xcodigo_externo, maquinaria.id_codigo)
IF maquinaria.id_codigo IS NOT NULL THEN
UPDATE actb00001 SET id_codigo = maquinaria.codigo
WHERE codigo = maquinaria.id_codigo
END IF
LET numero_msg = 1
CALL msg(numero_msg)
NEXT FIELD codigo
END IF
AFTER FIELD fech_mod
EXIT INPUT
END INPUT
END FUNCTION
FUNCTION irpcmf009()
## Aqui se prepara para la captura del criterio de seleccion
# WHENEVER ERROR CONTINUE
DEFINE activo INT
CONSTRUCT criterio ON irtb00009.codigo,irtb00009.nombre FROM irtb00009.codigo,nombre
BEFORE CONSTRUCT
CALL busca_departamento()
AFTER CONSTRUCT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
EXIT CONSTRUCT
END CONSTRUCT
LET SELEC = " SELECT codigo,nombre,unidad_med,modelo,serie,fabricante,us_crea,fech_crea,departamento,
codigo_externo, id_codigo FROM irtb00009 where ",
" status_t is null and ",
criterio clipped,
" ORDER BY codigo"
PREPARE busca FROM selec
DECLARE datos SCROLL CURSOR FOR busca
OPEN datos
FETCH FIRST datos INTO maquinaria.codigo,maquinaria.nombre,maquinaria.unidad_med,maquinaria.modelo,maquinaria.serie,
maquinaria.fabricante,maquinaria.us_crea,maquinaria.fech_crea,maquinaria.departamento,
xcodigo_externo, maquinaria.id_codigo
IF status >= 0 THEN
IF STATUS = NOTFOUND THEN
LET numero_msg = 3
CALL msg(numero_msg)
RETURN
END IF
end IF
SELECT descripcion, id_maintainx INTO desc_activo, id_maintain FROM actb00001 WHERE codigo = maquinaria.id_codigo
IF status = NOTFOUND THEN
INITIALIZE desc_activo, id_maintain TO NULL
END IF
DISPLAY BY NAME maquinaria.codigo,maquinaria.nombre,maquinaria.unidad_med,maquinaria.modelo,maquinaria.serie,
maquinaria.fabricante,maquinaria.us_crea,maquinaria.fech_crea,maquinaria.departamento,
xcodigo_externo, maquinaria.id_codigo, desc_activo, id_maintain
MENU "OPCIONES "
COMMAND "Siguiente"
"Presenta en pantalla el proximo registro encontrado"
FETCH NEXT datos INTO maquinaria.codigo,maquinaria.nombre,maquinaria.unidad_med,maquinaria.modelo,maquinaria.serie,
maquinaria.fabricante,maquinaria.us_crea,maquinaria.fech_crea,maquinaria.departamento,
xcodigo_externo, maquinaria.id_codigo
IF STATUS = NOTFOUND THEN
LET numero_msg = 4
CALL msg(numero_msg)
END IF
SELECT descripcion, id_maintainx INTO desc_activo, id_maintain FROM actb00001 WHERE codigo = maquinaria.id_codigo
IF STATUS = NOTFOUND THEN
INITIALIZE desc_activo, id_maintain TO NULL
END IF
DISPLAY BY NAME maquinaria.codigo,maquinaria.nombre,maquinaria.unidad_med,maquinaria.modelo,maquinaria.serie,
maquinaria.fabricante,maquinaria.us_crea,maquinaria.fech_crea,maquinaria.departamento,
xcodigo_externo, maquinaria.id_codigo,desc_activo, id_maintain
COMMAND "Anterior"
"Presenta en pantalla el registro anterior encontrado"
FETCH PREVIOUS datos INTO maquinaria.codigo,maquinaria.nombre,maquinaria.unidad_med,maquinaria.modelo,maquinaria.serie,
maquinaria.fabricante,maquinaria.us_crea,maquinaria.fech_crea,maquinaria.departamento,
xcodigo_externo, maquinaria.id_codigo
IF STATUS = NOTFOUND THEN
LET numero_msg = 5
CALL msg(numero_msg)
END IF
SELECT descripcion, id_maintainx INTO desc_activo, id_maintain FROM actb00001 WHERE codigo = maquinaria.id_codigo
IF STATUS = NOTFOUND THEN
INITIALIZE desc_activo, id_maintain TO NULL
END IF
DISPLAY BY NAME maquinaria.codigo,maquinaria.nombre,maquinaria.unidad_med,maquinaria.modelo,maquinaria.serie,
maquinaria.fabricante,maquinaria.us_crea,maquinaria.fech_crea,maquinaria.departamento,
xcodigo_externo, maquinaria.id_codigo, desc_activo, id_maintain
COMMAND "Primero"
"Presenta en pantalla el primer registro encontrado"
FETCH FIRST datos INTO maquinaria.codigo,maquinaria.nombre,maquinaria.unidad_med,maquinaria.modelo,maquinaria.serie,
maquinaria.fabricante,maquinaria.us_crea,maquinaria.fech_crea,maquinaria.departamento,
xcodigo_externo, maquinaria.id_codigo
SELECT descripcion, id_maintainx INTO desc_activo, id_maintain FROM actb00001 WHERE codigo = maquinaria.id_codigo
IF status = NOTFOUND THEN
INITIALIZE desc_activo, id_maintain TO NULL
END IF
DISPLAY BY NAME maquinaria.codigo,maquinaria.nombre,maquinaria.unidad_med,maquinaria.modelo,maquinaria.serie,
maquinaria.fabricante,maquinaria.us_crea,maquinaria.fech_crea,maquinaria.departamento,
xcodigo_externo, maquinaria.id_codigo,desc_activo, id_maintain
LET numero_msg = 5
CALL msg(numero_msg)
COMMAND "Ultimo"
"Presenta en pantalla el ultimo registro encontrado"
FETCH LAST datos INTO maquinaria.codigo,maquinaria.nombre,maquinaria.unidad_med,maquinaria.modelo,maquinaria.serie,
maquinaria.fabricante,maquinaria.us_crea,maquinaria.fech_crea,maquinaria.departamento,
xcodigo_externo, maquinaria.id_codigo
SELECT descripcion, id_maintainx INTO desc_activo, id_maintain FROM actb00001 WHERE codigo = maquinaria.id_codigo
IF status = NOTFOUND THEN
INITIALIZE desc_activo, id_maintain TO NULL
END IF
DISPLAY BY NAME maquinaria.codigo,maquinaria.nombre,maquinaria.unidad_med,maquinaria.modelo,maquinaria.serie,
maquinaria.fabricante,maquinaria.us_crea,maquinaria.fech_crea,maquinaria.departamento,
xcodigo_externo, maquinaria.id_codigo,desc_activo, id_maintain
LET numero_msg = 4
CALL msg(numero_msg)
COMMAND "Escoger"
"<Esc> Actualiza Registro <Ctrl-C> Cancela Operacion"
IF maquinaria.status_t = "E" THEN
LET numero_msg = 39
CALL msg(numero_msg)
RETURN
END IF
INPUT BY NAME maquinaria.*,xcodigo_externo
WITHOUT DEFAULTS
BEFORE INPUT
CALL dialog.setFieldActive('codigo', FALSE)
CALL dialog.setFieldActive('nombre', FALSE)
BEFORE FIELD codigo
NEXT FIELD nombre
AFTER FIELD nombre
IF maquinaria.nombre IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD nombre
END IF
AFTER FIELD serie
IF maquinaria.serie IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD serie
END IF
AFTER FIELD id_codigo
SELECT descripcion INTO desc_activo FROM actb00001
WHERE codigo = maquinaria.id_codigo
DISPLAY BY NAME desc_activo
#### Verifica si el usuario presiono la tecla <Ctrl-C>
AFTER INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
CLEAR FORM
RETURN
END IF
IF maquinaria.departamento IS NULL THEN
CALL msg(16)
NEXT FIELD departamento
END IF
IF maquinaria.id_codigo IS NOT NULL THEN
SELECT codigo INTO activo FROM actb00001 WHERE codigo = maquinaria.id_codigo
AND status_t IS NULL
IF activo IS NOT NULL THEN
UPDATE actb00001 SET id_codigo = NULL
WHERE codigo = activo
SELECT codigo INTO activo FROM irtb00009 WHERE id_codigo = maquinaria.id_codigo
IF activo IS NOT NULL THEN
UPDATE irtb00009 SET id_codigo = NULL WHERE codigo = activo
END IF
END IF
UPDATE actb00001 SET id_codigo = maquinaria.codigo
WHERE codigo = maquinaria.id_codigo
END IF
UPDATE irtb00009 SET nombre = maquinaria.nombre,
modelo = maquinaria.modelo,
unidad_med = maquinaria.unidad_med,
serie = maquinaria.serie,
fabricante = maquinaria.fabricante,
departamento = maquinaria.departamento,
codigo_externo = xcodigo_externo,
us_mod = USUARIOS,
fech_mod = GETDATE(),
id_codigo = maquinaria.id_codigo
WHERE codigo = maquinaria.codigo
LET numero_msg = 13
CALL msg(numero_msg)
EXIT INPUT
END INPUT
COMMAND KEY ("L") "eLiminar"
UPDATE irtb00009 SET status_t = "E",
us_mod = usuarios,
fech_mod = GETDATE()
WHERE codigo = maquinaria.codigo
LET numero_msg = 39
CALL msg(numero_msg)
COMMAND "Retornar"
"Retorna al menu anterior"
CLEAR FORM
EXIT MENU
END MENU
END FUNCTION
+961
View File
@@ -0,0 +1,961 @@
{
PROGRAMA: irprmt020
OBEJETIVO: Requisicion de Respuestos
DESARROLLADO POR: ING. ELVIS GARCÍA
FECHA DESARROLLO: NOVIEMBRE 01, 2024
}
IMPORT os
GLOBALS "irprgb000.4gl"
# fakeData se pasa POR POSICION (fakeData.*) al parametro Data de
# ApiMaintainC en api_test.4gl, por lo que su estructura (orden y tipos)
# debe ser IDENTICA a ese record. No usar RECORD LIKE cotb00001.* porque
# el orden y la cantidad de columnas de cotb00001 ya no coinciden con ese
# record y provoca el error -6200 al enlazar (27 vs 22 parametros).
DEFINE fakeData RECORD
area_sp VARCHAR(10),
ciu_sp VARCHAR(30),
cod_pais VARCHAR(3),
cod_sp SMALLINT,
cod_sp_sec SMALLINT,
cont_sp VARCHAR(30),
contactID INTEGER,
cuenta_no VARCHAR(10), -- G6: Data de ApiMaintainC (api_test.4gl) tiene 22 campos
dir_sp VARCHAR(60),
email VARCHAR(60),
fax_sp VARCHAR(25),
fech_crea DATETIME YEAR TO FRACTION,
fech_mod DATETIME YEAR TO FRACTION,
id_maintainx INTEGER,
nom_sp VARCHAR(41),
rnc VARCHAR(11),
status_t VARCHAR(1),
tel_sp VARCHAR(25),
term_sp SMALLINT,
tipo_doc VARCHAR(10),
us_crea VARCHAR(50),
us_mod VARCHAR(50)
END RECORD
DEFINE answer, answer2 STRING -- G6: ApiMaintainC devuelve 2 valores
DEFINE Toemail,
subject,
cuerpo_correo,
xusername,
xsmtphost,
xsmtpport,
xpassword,
emailadd,
retorne
STRING
DEFINE
d_tipos,
mensaje,
f_tipos,
filepath,
extension,
xdestino,
l_file,
tmpdir_file,
dir_file,
url_destino,
attachment
STRING,
tmpnumero, dcodn, dcodgrupo, dcodtipo, dcodsec INT
MAIN
DEFER INTERRUPT
CALL ARG_VAL(1) RETURNING usuarios
CALL ARG_VAL(2) RETURNING clave
CONNECT TO "smarmotech" USER usuarios USING clave
LET url_destino = fgl_getenv("URLIMAGENES")
CALL usuarioSistema(usuarios) RETURNING nombreUsuario, email
CALL ipprmt020()
END MAIN
FUNCTION ipprmt020()
OPEN WINDOW w1 WITH FORM "irfmmt020"
DIALOG ATTRIBUTE(UNBUFFERED)
DISPLAY ARRAY arr_busqueda TO busqueda.*
BEFORE DISPLAY
LET toemail = email
LET xtiene = 'NO'
SELECT from_address, puerto, nombre_servidor, clave
INTO xusername, xsmtpport, xsmtphost, xpassword
FROM tbperfil_mail
WHERE cod_perfil = 2
# LET xusername ='notificacion@marmotech.com.do'
# LET xsmtphost ='smtp.office365.com'
# LET xsmtpport = '587'
# LET xpassword = 'Lmmjvsd2020'
CALL buscarData()
ON ACTION nuevo ATTRIBUTE(TEXT = "Nuevo", IMAGE = "new")
INITIALIZE p_irtb57.* TO NULL
CALL arr_irtb58.clear()
CLEAR FORM
LET tmpnumero = 0
SELECT a.num_doc
INTO tmpnumero
FROM irtb00043 a
WHERE usuario = usuarios
IF STATUS = NOTFOUND THEN
INSERT INTO irtb00043 VALUES(1, usuarios)
LET tmpnumero = 1
ELSE
LET tmpnumero = tmpnumero + 1
UPDATE irtb00043
SET num_doc = tmpnumero
WHERE usuario = usuarios
END IF
LET p_irtb57.numero_doc = tmpnumero
DISPLAY BY NAME p_irtb57.numero_doc
LET p_irtb57.bodega = 3
LET opcion = "Adicionar"
LET subject = 'CREACION REQUISICION PARA ALMACEN NO.'
CALL entradas()
{ ON ACTION editar ATTRIBUTE(TEXT="Editar",IMAGE="edit")
LET opcion="Actualializar"
LET p_irtb57.numero_doc = arr_busqueda[arr_curr()].numeroid
LET p_irtb57.estado = arr_busqueda[arr_curr()].estadp1
DISPLAY BY NAME p_irtb57.numero_doc,p_irtb57.estado
SELECT DISTINCT a.numero_doc FROM irtb00006 a
WHERE a.numero_doc = p_irtb57.numero_doc AND
a.cod_mov = p_irtb57.cod_mov
IF STATUS != NOTFOUND THEN
CALL msg(1014)
CONTINUE DIALOG
END IF
LET subject = 'MODIFICACION REQUISICION PARA ALMACEN NO.'
CALL buscadoc(arr_busqueda[arr_curr()].numeroid,arr_busqueda[arr_curr()].cod_mov ) RETURNING p_irtb57.*,arr_irtb58
CALL entradas()}
ON ACTION anular ATTRIBUTE(TEXT = "Anular", IMAGE = "garbage")
LET p_irtb57.numero_doc = arr_busqueda[arr_curr()].numeroid
LET p_irtb57.cod_mov = arr_busqueda[arr_curr()].cod_mov
CALL anular()
ON ACTION imprimir ATTRIBUTE(TEXT = "Imprimir", IMAGE = "printer")
CALL buscadoc(
arr_busqueda[arr_curr()].numeroid,
arr_busqueda[arr_curr()]
.cod_mov) #RETURNING p_irtb57.*,arr_irtb58
CALL impdocumentos(
arr_busqueda[arr_curr()].numeroid,
arr_busqueda[arr_curr()].cod_mov)
ON ACTION CANCEL ATTRIBUTE(TEXT = "Cancelar", IMAGE = "quit")
RETURN
END DISPLAY
END DIALOG
CLOSE WINDOW w1
END FUNCTION
FUNCTION buscardata()
DEFINE i INT
DECLARE buscardata CURSOR FOR
SELECT b.estado,
f.descripcion,
CAST(a.cod_mov AS VARCHAR(10)) || ' ' || a.descrip_mov,
b.numero_doc,
b.fecha,
c.nom_sp AS nom_cliente,
b.observacion,
d.descripcion,
' ',
b.cod_mov,
b.bodega,
b.bodega_destino
FROM irtb00005 a,
irtb00057 b INNER JOIN irtb00061 f ON b.idestado = f.idestado
LEFT OUTER
JOIN cotb00001 c
ON c.cod_sp = b.tipo_cliente
AND c.cod_sp_sec = b.sec_cliente,
intb00009 d
WHERE a.cod_mov = b.cod_mov
AND b.bodega = d.cod_bodega
AND b.us_crea = usuarios
AND b.status_t IS NULL
LET i = 1
FOREACH buscardata INTO arr_busqueda[i].*
LET p_irtb57.cod_mov = arr_busqueda[i].cod_mov
LET p_irtb57.num_oc = arr_busqueda[i].numeroid
IF arr_busqueda[i].bodega2 IS NOT NULL THEN
SELECT a.descripcion
INTO arr_busqueda[i].bodega_destino
FROM intb00009 a
WHERE a.cod_bodega = arr_busqueda[i].bodega2
END IF
LET i = i + 1
END FOREACH
END FUNCTION
FUNCTION codigomov()
DEFINE
ketiquetas SMALLINT,
detiquetas STRING
LET cbmovimiento = ui.combobox.forname("formonly.cod_mov")
DECLARE bmovimiento_t CURSOR FOR
SELECT a.cod_mov,
RTRIM(a.descrip_mov) || '(' || CAST(a.cod_mov AS VARCHAR(6)) || ')'
FROM irtb00005 a
WHERE a.requisiciones = "SI" AND a.status_t IS NULL
ORDER BY a.descrip_mov
CALL cbmovimiento.clear()
FOREACH bmovimiento_t INTO ketiquetas, detiquetas
CALL cbmovimiento.additem(ketiquetas, detiquetas)
END FOREACH
END FUNCTION
FUNCTION entradas()
DIALOG ATTRIBUTE(UNBUFFERED)
INPUT BY NAME p_irtb57.cod_mov,
p_irtb57.num_oc,
p_irtb57.orden_trabajo,
p_irtb57.observacion,
p_irtb57.bodega,
p_irtb57.bodega_destino,
p_irtb57.url_file
ATTRIBUTE(WITHOUT DEFAULTS)
ON ACTION abrirdocumento
IF p_irtb57.url_file IS NOT NULL THEN
CALL ui.Interface.frontCall(
"standard", "launchURL", [p_irtb57.url_file], [])
END IF
ON ACTION atardocumento
CALL ui.Interface.frontCall(
"standard",
"openfile",
[dir_file, d_tipos, f_tipos, mensaje],
[filepath])
IF filepath IS NOT NULL THEN
IF downshift(os.Path.extension(filepath)) = "pdf"
OR downshift(os.Path.extension(filepath)) = "jpg"
OR downshift(os.Path.extension(filepath)) = "xls"
OR downshift(os.Path.extension(filepath)) = "xlsx"
OR downshift(os.Path.extension(filepath)) = "doc"
OR downshift(os.Path.extension(filepath)) = "docx"
OR downshift(os.Path.extension(filepath)) = "png" THEN
LET dir_file = os.Path.basename(filepath)
LET tmpdir_file = dir_file
LET dir_file =
fgl_getenv("IMAGENES"), "\\", dir_file CLIPPED
DISPLAY "imagenes ", dir_file
CALL fgl_getfile(filepath, dir_file)
LET p_irtb57.url_file =
url_destino CLIPPED, "/", tmpdir_file CLIPPED
ELSE
CALL fgl_winmessage(
"ERROR", "EL FILE DEBE SER PDF, JPG, PNG", "INFO")
END IF
END IF
BEFORE INPUT
LET d_tipos = "PDF"
LET f_tipos = "*.pdf *.jpg *.png, *.xls, *.xlsx, *.doc, *.docx"
LET mensaje = %"Elige Documento"
LET selec =
"INSERT INTO irtb00060(id_etiqueta,id_despiece,cod_n,cod_grupo,cod_tipo,cod_sec,lado_1,lado_2,lado_3,
cantidad,medida,secuencia,bodega)
SELECT id_etiqueta,?,cod_n,cod_grupo,cod_tipo,cod_sec,lado_1,lado_2,lado_3,
cantidad,medida,secuencia,bodega
FROM tmpdespiece WHERE id_despiece = ?"
PREPARE insertad FROM selec
DISPLAY BY NAME nombreUsuario, email
CALL codigomov()
CALL bodegas('2')
IF opcion = "Adicionar" THEN
LET p_irtb57.fecha = TODAY
ELSE
IF p_irtb57.estado = 'AUTORIZADA' THEN
CALL msg(1004)
EXIT DIALOG
END IF
END IF
DISPLAY BY NAME p_irtb57.fecha
IF p_irtb57.num_oc IS NOT NULL THEN
LET ordenPedidos = TRUE
ELSE
LET ordenPedidos = FALSE
END IF
AFTER FIELD num_oc
IF p_irtb57.num_oc IS NOT NULL AND ordenPedidos = FALSE THEN
SELECT a.cod_sp, a.cod_sp_sec, b.nom_sp
INTO p_irtb57.tipo_cliente,
p_irtb57.sec_cliente,
p_irtb57.cliente
FROM cotb00014 a, cotb00001 b
WHERE a.cod_sp = b.cod_sp
AND a.cod_sp_sec = b.cod_sp_sec
AND a.cierre = 'N'
AND a.num_oc = p_irtb57.num_oc
AND a.tipo = '03'
AND a.status_t IS NULL
IF STATUS = NOTFOUND THEN
CALL msg(3)
NEXT FIELD num_oc
END IF
DISPLAY BY NAME p_irtb57.tipo_cliente,
p_irtb57.sec_cliente,
p_irtb57.cliente
END IF
AFTER FIELD orden_trabajo
IF p_irtb57.orden_trabajo IS NOT NULL THEN
INITIALIZE fakedata.* TO NULL
CALL ApiMaintainC('CHECK', p_irtb57.orden_trabajo, fakeData.*, usuarios) RETURNING answer, answer2
IF answer IS NULL OR answer = 0 THEN
CALL fgl_winmessage(
"ORDEN DE TRABAJO EN MAINTAINX",
"El ID de la orden de trabajo colocada no se encuentra en MaintainX",
"stop")
NEXT FIELD orden_trabajo
END IF
END IF
AFTER FIELD cod_mov
IF p_irtb57.cod_mov IS NOT NULL THEN
LET nombreMov =
ui.ComboBox.forName('formonly.cod_mov')
.getTextOf(p_irtb57.cod_mov)
SELECT a.requiere_autorizacion {,a.control_transferencia}
INTO requiere {,transacc.control_transferencia }
FROM irtb00005 a
WHERE a.cod_mov = p_irtb57.cod_mov
IF requiere = "NO" THEN
LET xestado = 'AUTORIZADA'
ELSE
LET xestado = 'NO AUTORIZADA'
END IF
END IF
AFTER FIELD bodega
IF p_irtb57.bodega IS NOT NULL THEN
LET nombreBodega =
ui.ComboBox.forName('formonly.bodega')
.getTextOf(p_irtb57.bodega)
CALL emailbodegas() RETURNING emailadd
END IF
AFTER FIELD bodega_destino
IF p_irtb57.bodega_destino IS NOT NULL THEN
LET nombreBodegaDestino =
ui.ComboBox.forName('formonly.bodega_destino')
.getTextOf(p_irtb57.bodega_destino)
END IF
AFTER INPUT
IF p_irtb57.bodega IS NULL THEN
CALL msg(16)
NEXT FIELD bodega
END IF
IF p_irtb57.bodega IS NOT NULL THEN
LET nombreBodega =
ui.ComboBox.forName('formonly.bodega')
.getTextOf(p_irtb57.bodega)
CALL emailbodegas() RETURNING emailadd
END IF
{ IF transacc.control_transferencia = "SI" THEN
IF p_irtb57.bodega_destino IS NULL THEN
CALL msg(16)
NEXT FIELD bodega_destino
END IF
END IF }
IF p_irtb57.num_oc IS NOT NULL THEN
SELECT a.cod_sp, a.cod_sp_sec, b.nom_sp
INTO p_irtb57.tipo_cliente,
p_irtb57.sec_cliente,
p_irtb57.cliente
FROM cotb00014 a, cotb00001 b
WHERE a.cod_sp = b.cod_sp
AND a.cod_sp_sec = b.cod_sp_sec
AND a.cierre = 'N'
AND a.num_oc = p_irtb57.num_oc
AND a.status_t IS NULL
IF STATUS = NOTFOUND THEN
CALL msg(3)
NEXT FIELD num_oc
END IF
DISPLAY BY NAME p_irtb57.tipo_cliente,
p_irtb57.sec_cliente,
p_irtb57.cliente
IF p_irtb57.cod_mov IS NOT NULL THEN
LET nombreMov =
ui.ComboBox.forName('formonly.cod_mov')
.getTextOf(p_irtb57.cod_mov)
END IF
IF p_irtb57.num_oc IS NOT NULL AND ordenPedidos = FALSE THEN
LET idx = 1
DECLARE buscaOrden CURSOR FOR
SELECT a.tipo,
a.cod_n,
a.cod_grupo,
a.cod_tipo,
a.cod_sec,
b.descrip_esp,
b.unidad_med,
a.cantidad,
a.cantidad,
a.cantidad,
a.cantidad
FROM cotb00015 a, irtb00002 b
WHERE a.num_oc = p_irtb57.num_oc
AND a.tipo = 3
AND (a.cod_n = b.cod_n
AND a.cod_grupo = b.cod_grupo
AND a.cod_tipo = b.cod_tipo
AND a.cod_sec = b.cod_sec)
AND (a.cod_n = b.cod_n
AND a.cod_grupo = b.cod_grupo
AND a.cod_tipo = b.cod_tipo
AND a.cod_sec = b.cod_sec)
FOREACH buscaOrden INTO arr_irtb58[idx].*
LET idx = idx + 1
END FOREACH
END IF
END IF
END INPUT
INPUT ARRAY arr_irtb58 FROM sdetalle.* ATTRIBUTE(WITHOUT DEFAULTS)
ON ACTION buscar
LET idx = arr_curr()
LET scr_l = scr_line()
CALL busca_prod(
'03')
RETURNING arr_irtb58[idx].cod_n,
arr_irtb58[idx].cod_grupo,
arr_irtb58[idx].cod_tipo,
arr_irtb58[idx].cod_sec,
arr_irtb58[idx].descripcion
CALL producto()
IF tienedespiece THEN
LET dcodn = arr_irtb58[idx].cod_n
LET dcodgrupo = arr_irtb58[idx].cod_grupo
LET dcodtipo = arr_irtb58[idx].cod_tipo
LET dcodsec = arr_irtb58[idx].cod_sec
CALL despiece()
END IF
NEXT FIELD cantidad_1
{ON ACTION despiece ATTRIBUTE(TEXT="Despiece",IMAGE="")
LET idx = arr_curr()
CALL producto()
IF tienedespiece THEN
LET dcodn = arr_irtb58[idx].cod_n
LET dcodgrupo = arr_irtb58[idx].cod_grupo
LET dcodtipo = arr_irtb58[idx].cod_tipo
LET dcodsec = arr_irtb58[idx].cod_sec
CALL despiece()
END IF
NEXT FIELD cantidad_1 }
BEFORE ROW
LET idx = arr_curr()
LET arr_irtb58[idx].area = 1
DISPLAY arr_irtb58[idx].area TO sdetalle[scr_line()].area
AFTER FIELD cod_Sec
LET idx = arr_curr()
IF arr_irtb58[idx].cod_sec IS NOT NULL THEN
CALL producto()
IF NOT existe THEN
CALL msg(3)
NEXT FIELD cod_sec
END IF
IF tienedespiece THEN
LET dcodn = arr_irtb58[idx].cod_n
LET dcodgrupo = arr_irtb58[idx].cod_grupo
LET dcodtipo = arr_irtb58[idx].cod_tipo
LET dcodsec = arr_irtb58[idx].cod_sec
CALL despiece()
END IF
IF p_irtb57.num_oc IS NOT NULL THEN
{SELECT DISTINCT a.cod_sp FROM cotb00015 a WHERE a.num_oc = p_irtb57.num_oc AND
a.cod_n = arr_irtb58[idx].cod_n AND
a.cod_grupo = arr_irtb58[idx].cod_grupo AND
a.cod_tipo = arr_irtb58[idx].cod_tipo AND
a.cod_sec = arr_irtb58[idx].cod_sec }
SELECT DISTINCT a.cod_sp
FROM cotb00014 a
INNER
JOIN cotb00015 b
ON a.num_oc = b.num_oc
WHERE a.num_oc = p_irtb57.num_oc
AND b.cod_n = arr_irtb58[idx].cod_n
AND b.cod_grupo = arr_irtb58[idx].cod_grupo
AND b.cod_tipo = arr_irtb58[idx].cod_tipo
AND b.cod_sec = arr_irtb58[idx].cod_sec
IF STATUS = NOTFOUND THEN
CALL msg(397)
NEXT FIELD cod_Sec
END IF
END IF
END IF
AFTER FIELD cantidad_1
IF arr_irtb58[idx].cantidad_1 IS NOT NULL THEN
IF arr_irtb58[idx].cantidad_1
> arr_irtb58[idx].cantidad_o1 THEN
CALL msg(46)
NEXT FIELD cantidad_1
END IF
LET arr_irtb58[idx].cantidad =
arr_irtb58[idx].cantidad_1
* 1 {arr_irtb58[idx].factor_conv}
DISPLAY arr_irtb58[idx].cantidad TO sdetalle[scr_l].cantidad
END IF
ON ACTION guardar ATTRIBUTE(TEXT = "Adicionar", IMAGE = "save")
IF p_irtb57.bodega IS NOT NULL THEN
LET nombreBodega =
ui.ComboBox.forName('formonly.bodega')
.getTextOf(p_irtb57.bodega)
END IF
{ IF transacc.control_transferencia = "SI" THEN
IF p_irtb57.bodega_destino IS NULL THEN
CALL msg(16)
NEXT FIELD bodega_destino
END IF
END IF}
IF p_irtb57.bodega_destino IS NOT NULL THEN
LET nombreBodegaDestino =
ui.ComboBox.forName('formonly.bodega_destino')
.getTextOf(p_irtb57.bodega_destino)
END IF
IF emailadd IS NOT NULL THEN
LET Toemail = toemail CLIPPED, ",", emailadd CLIPPED
ELSE
LET Toemail = toemail CLIPPED
END IF
# IF opcion = "Adicionar" THEN
LET p_irtb57.fecha = TODAY
IF p_irtb57.bodega IS NULL THEN
CALL msg(16)
NEXT FIELD bodega
END IF
BEGIN WORK
SELECT a.numero_doc INTO secuencia FROM irtb00059 a
IF STATUS = NOTFOUND THEN
INSERT INTO irtb00059(
numero_doc, us_mod, fech_mod)
VALUES(0, usuarios, getdate())
END IF
LET secuencia = secuencia + 1
LET p_irtb57.numero_doc = secuencia
UPDATE irtb00059
SET numero_doc = p_irtb57.numero_doc,
us_mod = usuarios,
fech_mod = getdate()
LET subject =
subject CLIPPED, p_irtb57.numero_doc USING "&&&&&&&&"
INSERT INTO irtb00057(
numero_doc,
fecha,
cod_mov,
num_oc,
orden_trabajo,
tipo_cliente,
sec_cliente,
nombre,
bodega,
bodega_destino,
estado,
us_crea,
fech_crea,
observacion,
url_destino,
idestado)
VALUES(p_irtb57.numero_doc,
p_irtb57.fecha,
p_irtb57.cod_mov,
p_irtb57.num_oc,
p_irtb57.orden_trabajo,
p_irtb57.tipo_cliente,
p_irtb57.sec_cliente,
p_irtb57.cliente,
p_irtb57.bodega,
p_irtb57.bodega_destino,
xestado,
usuarios,
getdate(),
p_irtb57.observacion,
p_irtb57.url_file,
5)
IF STATUS < 0 THEN
ROLLBACK WORK
DISPLAY 'ROLLBACK 1'
RETURN
END IF
LET tieneDetalle = "NO"
FOR idx = 1 TO arr_irtb58.getLength()
IF arr_irtb58[idx].cantidad IS NOT NULL THEN
LET tieneDetalle = "SI"
IF arr_irtb58[idx].cantidad_1
> arr_irtb58[idx].cantidad_o1 THEN
CALL msg(46)
ROLLBACK WORK
END IF
{IF arr_irtb58[idx].area IS NULL THEN
ROLLBACK WORK
CALL msg(16)
NEXT FIELD area
END IF}
INSERT INTO irtb00058(
numero_doc,
cod_mov,
area,
cod_n,
cod_grupo,
cod_tipo,
cod_Sec,
descripcion,
unidad_med,
cantidad_1,
cantidad_2,
us_crea,
fech_crea)
VALUES(p_irtb57.numero_doc,
p_irtb57.cod_mov,
arr_irtb58[idx].area,
arr_irtb58[idx].cod_n,
arr_irtb58[idx].cod_grupo,
arr_irtb58[idx].cod_tipo,
arr_irtb58[idx].cod_sec,
arr_irtb58[idx].descripcion,
arr_irtb58[idx].unidad_med,
arr_irtb58[idx].cantidad_1,
arr_irtb58[idx].cantidad,
usuarios,
getdate())
IF STATUS < 0 THEN
ROLLBACK WORK
DISPLAY 'ROLLBACK 2'
RETURN
END IF
END IF
END FOR
#DESPIECE
DELETE FROM irtb00060
WHERE id_despiece = p_irtb57.numero_doc
EXECUTE insertad USING p_irtb57.numero_doc, tmpnumero
DELETE FROM tmpdespiece WHERE id_despiece = tmpnumero
IF tieneDetalle = "SI" THEN
COMMIT WORK
CALL msg(1)
CALL buscarData()
CALL impdocumentos(
p_irtb57.numero_doc, p_irtb57.cod_mov)
# CALL contenido() RETURNING cuerpo_correo
LET attachment = NULL
# CALL enviaemail(toEmail,subject,cuerpo_correo,attachment,xusername,xsmtphost,xsmtpport,xpassword)
#RETURNING mensajes
ELSE
ROLLBACK WORK
CALL msg(1663)
END IF
{ELSE
LET subject =
subject CLIPPED, p_irtb57.numero_doc USING "&&&&&&&&"
BEGIN WORK
UPDATE irtb00057
SET num_oc = p_irtb57.num_oc,
tipo_cliente = p_irtb57.tipo_cliente,
sec_cliente = p_irtb57.sec_cliente,
nombre = p_irtb57.cliente,
observacion = p_irtb57.observacion,
bodega = p_irtb57.bodega,
bodega_destino = p_irtb57.bodega_destino,
us_mod = usuarios,
fech_mod = getdate(),
url_destino = p_irtb57.url_file,
idestado = p_irtb57.idstado
WHERE numero_doc = p_irtb57.numero_doc
AND cod_mov = p_irtb57.cod_mov
DELETE FROM irtb00058
WHERE numero_doc = p_irtb57.numero_doc
AND cod_mov = p_irtb57.cod_mov
LET tieneDetalle = "NO"
FOR idx = 1 TO arr_irtb58.getLength()
IF arr_irtb58[idx].cantidad IS NOT NULL THEN
LET tieneDetalle = "SI"
IF arr_irtb58[idx].cantidad_1
> arr_irtb58[idx].cantidad_o1 THEN
CALL msg(46)
NEXT FIELD cantidad_1
END IF
# IF arr_irtb58[idx].area IS NULL THEN
# ROLLBACK WORK
# CALL msg(16)
# NEXT FIELD area
# END IF
INSERT INTO irtb00058(
numero_doc,
cod_mov,
area,
cod_n,
cod_grupo,
cod_tipo,
cod_Sec,
descripcion,
unidad_med,
cantidad_1,
cantidad_2,
us_crea,
fech_crea)
VALUES(p_irtb57.numero_doc,
p_irtb57.cod_mov,
arr_irtb58[idx].area,
arr_irtb58[idx].cod_n,
arr_irtb58[idx].cod_grupo,
arr_irtb58[idx].cod_tipo,
arr_irtb58[idx].cod_sec,
arr_irtb58[idx].descripcion,
arr_irtb58[idx].unidad_med,
arr_irtb58[idx].cantidad_1,
arr_irtb58[idx].cantidad,
usuarios,
getdate())
IF STATUS < 0 THEN
ROLLBACK WORK
RETURN
END IF
END IF
END FOR
#DESPIECE
DELETE FROM irtb00060
WHERE id_despiece = p_irtb57.numero_doc
EXECUTE insertad USING p_irtb57.numero_doc, tmpnumero
DELETE FROM tmpdespiece
WHERE id_despiece = p_irtb57.numero_doc
IF tieneDetalle = "SI" THEN
COMMIT WORK
CALL msg(13)
CALL buscarData()
CALL impdocumentos(
p_irtb57.numero_doc, p_irtb57.cod_mov)
CALL contenido() RETURNING cuerpo_correo
# CALL enviaemail(Toemail,subject,cuerpo_correo,NULL,xusername,xsmtphost,xsmtpport,xpassword)
# RETURNING retorne
ELSE
ROLLBACK WORK
CALL msg(1663)
END IF
END IF }
END INPUT
ON ACTION CANCEL ATTRIBUTE(TEXT = "Salir", IMAGE = 'quit')
DELETE FROM tmpdespiece WHERE id_despiece = tmpnumero
EXIT DIALOG
END DIALOG
END FUNCTION
FUNCTION anular()
DEFINE respuesta STRING
SELECT DISTINCT a.num_doc
FROM irtb00006 a
WHERE a.num_req = p_irtb57.numero_doc AND a.cod_mov = p_irtb57.cod_mov
IF STATUS != NOTFOUND THEN
CALL msg(1014)
RETURN
END IF
DISPLAY "ANULAR: ", p_irtb57.numero_doc
LET respuesta =
fgl_winquestion(
"Borrar",
"Esta seguro de elminiar esta requisicion?",
"NO",
"YES|NO",
"QUESTION",
0)
IF respuesta = "YES" THEN
UPDATE irtb00057
SET status_t = 'E', us_mod = usuarios, fech_mod = getdate()
WHERE numero_doc = p_irtb57.numero_doc
AND cod_mov = p_irtb57.cod_mov
IF STATUS < 0 THEN
DISPLAY "nothing happened..."
ELSE
CALL msg(39)
CALL arr_busqueda.clear()
CALL buscarData()
END IF
END IF
END FUNCTION
FUNCTION producto()
DEFINE pcodn INT
SELECT a.descrip_esp, a.unidad_med, null
INTO arr_irtb58[idx].descripcion, arr_irtb58[idx].unidad_med, pcodn
FROM irtb00002 a
LEFT OUTER
JOIN irtb00028 b
ON a.cod_n = b.cod_n
AND a.cod_grupo = b.cod_grupo
AND a.cod_tipo = b.cod_tipo
AND a.cod_sec = b.cod_sec
WHERE a.cod_n = arr_irtb58[idx].cod_n
AND a.cod_grupo = arr_irtb58[idx].cod_grupo
AND a.cod_tipo = arr_irtb58[idx].cod_tipo
AND a.cod_sec = arr_irtb58[idx].cod_sec
IF STATUS = NOTFOUND THEN
LET existe = FALSE
ELSE
IF pcodn IS NOT NULL THEN
LET tienedespiece = TRUE
ELSE
LET tienedespiece = FALSE
END IF
LET existe = TRUE
END IF
END FUNCTION
FUNCTION contenido()
DEFINE xcuerpo1, xcuerpo2 STRING
LET xcuerpo1 =
"<!DOCTYPE html><body>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
</style>
</head>"
LET xcuerpo1 =
xcuerpo1 CLIPPED, "<h1>Solicitado por: ", nombreUsuario CLIPPED, "</h1>"
LET xcuerpo1 = xcuerpo1 CLIPPED, "<h2>", nombreMov CLIPPED, "</h2>"
IF p_irtb57.num_oc IS NOT NULL THEN
LET xcuerpo1 =
xcuerpo1 CLIPPED,
"<h2>Orden:",
p_irtb57.num_oc USING "&&&&&&&&",
"</h2>",
"<h2>Cliente:",
p_irtb57.cliente CLIPPED,
"</h2>"
END IF
LET xcuerpo1 =
xcuerpo1 CLIPPED, "<h2>Bodega Origen:", nombreBodega CLIPPED, "</h2>"
LET xcuerpo1 =
xcuerpo1 CLIPPED,
"<table><tr><th>Productos</th><th>Unidades</th> <th>cantidad</th><th>"
FOR idx = 1 TO arr_irtb58.getLength()
IF arr_irtb58[idx].cod_sec IS NOT NULL THEN
LET xcuerpo2 =
xcuerpo2 CLIPPED,
"<tr><td>",
arr_irtb58[idx].descripcion CLIPPED,
"</td>",
"<td>",
arr_irtb58[idx].cantidad_1 USING "##,###.##",
"</td>",
"<td>",
arr_irtb58[idx].cantidad USING "##,###.##",
"</td>",
"</tr>"
END IF
END FOR
LET xcuerpo1 = xcuerpo1 CLIPPED, xcuerpo2 CLIPPED, "</table></body>"
RETURN xcuerpo1
END FUNCTION
FUNCTION emailbodegas()
DEFINE
xemailadd, remailadd STRING,
jj INT
DECLARE bemails CURSOR FOR
SELECT b.email FROM seg0001 b WHERE b.bodega = p_irtb57.bodega
LET remailadd = NULL
LET jj = 1
FOREACH bemails INTO xemailadd
IF xemailadd IS NOT NULL THEN
LET remailadd = xemailadd CLIPPED, ",", remailadd
END IF
LET jj = jj + 1
END FOREACH
RETURN remailadd
END FUNCTION
FUNCTION despiece()
END FUNCTION
+106
View File
@@ -0,0 +1,106 @@
{
PROGRAMA: ipprmt021.4gl
OBJETIVO: AUTORIZAR REQUISICIONES A ALMACENES
DESARROLLADO POR: ING. JUAN SOTO
FECHA : MAYO 5, 2022
}
GLOBALS
"irprgb000.4gl"
DEFINE arr_busqueda DYNAMIC ARRAY OF RECORD
estado VARCHAR(50),
idestado int,
tipo_documento VARCHAR(100),
numeroid INT,
fechadoc DATE,
nombre VARCHAR(100),
observacion,usuario VARCHAR(200),
cod_mov INT ,
us_crea VARCHAR(50)
END RECORD
DEFINE nombreUsuario,email,etiqueta STRING
MAIN
DEFER INTERRUPT
CALL ARG_VAL(1) RETURNING usuarios
CALL ARG_VAL(2) RETURNING clave
CONNECT to "smarmotech" USER usuarios USING clave
CALL ipprmt021()
END MAIN
FUNCTION ipprmt021()
OPEN WINDOW w1 WITH FORM "irfmmt021"
DIALOG ATTRIBUTE(UNBUFFERED)
CONSTRUCT criterio ON b.estado,b.idestado FROM estado1,idestado1
BEFORE CONSTRUCT
LET etiqueta = "AUTORIZACIONES REQUISICIONES REPUESTOS"
DISPLAY BY NAME etiqueta
CALL estadosprocesos(2)
CALL arr_busqueda.clear()
ON ACTION buscar ATTRIBUTE(TEXT="Buscar",IMAGE="find")
CALL arr_busqueda.clear()
LET selec =
"SELECT b.estado,b.idestado,CAST(a.cod_mov AS VARCHAR(10))||' '||a.descrip_mov,b.numero_doc,b.fecha,c.nombre,
b.observacion,' ',b.cod_mov,b.us_crea
FROM irtb00005 a,irtb00057 b INNER JOIN irtb00061 d ON b.idestado = d.idestado
LEFT OUTER JOIN vetb00004 c ON c.tipo_cliente = b.tipo_cliente AND
c.sec_cliente = b.sec_cliente
WHERE a.cod_mov = b.cod_mov AND
b.status_t IS NULL AND
", criterio CLIPPED
PREPARE comando FROM selec
DECLARE buscardata CURSOR FOR comando
LET idx = 1
FOREACH buscardata INTO arr_busqueda[idx].*
CALL usuarioSistema(arr_busqueda[idx].us_crea) RETURNING nombreUsuario,email
LET arr_busqueda[idx].usuario = nombreUsuario
LET idx = idx + 1
END FOREACH
IF idx = 1 THEN
CALL msg(3)
CALL arr_busqueda.clear()
END IF
END CONSTRUCT
INPUT ARRAY arr_busqueda FROM sautoriza.* ATTRIBUTE(WITHOUT DEFAULTS)
BEFORE INPUT
CALL estadosprocesos(1)
ON CHANGE estado
UPDATE irtb00057 SET estado = arr_busqueda[arr_curr()].estado,us_mod=usuarios,fech_mod=getdate()
WHERE numero_doc = arr_busqueda[arr_curr()].numeroid AND
cod_mov = arr_busqueda[arr_curr()].cod_mov
ON CHANGE observacion
UPDATE irtb00057 SET us_mod=usuarios,fech_mod=getdate(),
observacion = arr_busqueda[arr_curr()].observacion
WHERE numero_doc = arr_busqueda[arr_curr()].numeroid AND
cod_mov = arr_busqueda[arr_curr()].cod_mov
ON CHANGE idestado
UPDATE irtb00057 SET us_mod=usuarios,fech_mod=getdate(),
idestado = arr_busqueda[arr_curr()].idestado -- G6: estado_proceso no existe en irtb00057 (-207)
WHERE numero_doc = arr_busqueda[arr_curr()].numeroid AND
cod_mov = arr_busqueda[arr_curr()].cod_mov
ON ACTION imprime ATTRIBUTE(TEXT="Imprimir", IMAGE="printer")
CALL impdocumentos(arr_busqueda[arr_curr()].numeroid,arr_busqueda[arr_curr()].cod_mov)
AFTER INPUT
END INPUT
ON ACTION CANCEL ATTRIBUTE(TEXT="Cancelar",IMAGE="quit")
EXIT PROGRAM
END DIALOG
CLOSE WINDOW w1
END FUNCTION
File diff suppressed because it is too large Load Diff
+231
View File
@@ -0,0 +1,231 @@
{
--------------------------------------------------------------------------
PROGRAMA : IRPRMT066
OBJETIVO : Programa Para Anular en Forma Logica Movimientos de
Inventario de Repuestos.
PROGRAMADOR : Juan Soto
FECHA : Diciembre 4, 1996
--------------------------------------------------------------------------
}
GLOBALS
"irprgb000.4gl"
DEFINE anular RECORD
cod_mov SMALLINT,
num_doc INTEGER,
fecha DATE,
cod_sp SMALLINT,
cod_sp_sec SMALLINT
END RECORD
DEFINE descrip_mov CHAR(30)
DEFINE opc1 CHAR(1),
orden_compras INT, answer STRING, APIexistencia DECIMAL(12,2)
MAIN
CALL ARG_VAL(1) RETURNING usuarios
CALL ARG_VAL(2) RETURNING clave
CALL ARG_VAL(3) RETURNING impresor
CONNECT to "smarmotech" USER usuarios USING clave
SELECT a.* INTO p_companias.* FROM companias a
CALL irprmt066()
END MAIN
FUNCTION irprmt066()
DEFINE okED BOOLEAN, refED VARCHAR(25)
DEFINE fecha CHAR(8)
DEFINE hora CHAR(5),
chcodigo CHAR(100)
OPTIONS
ERROR LINE 24,
FORM LINE 4,
COMMENT LINE 22,
PROMPT LINE 23
OPEN WINDOW anular AT 8,4 WITH FORM "irfmwd066" ATTRIBUTE (BORDER,FORM LINE
FIRST + 1,PROMPT LINE LAST)
INPUT BY NAME anular.cod_mov,anular.num_doc ATTRIBUTE (BOLD)
AFTER FIELD cod_mov
IF anular.cod_mov is null THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD cod_mov
END IF
SELECT a.descrip_mov INTO descrip_mov FROM irtb00005 a
WHERE a.cod_mov = anular.cod_mov AND a.status_t IS NULL
IF STATUS = NOTFOUND THEN
LET numero_msg = 3
CALL msg(numero_msg)
NEXT FIELD cod_mov
END IF
DISPLAY BY NAME descrip_mov
AFTER FIELD num_doc
IF anular.num_doc is null THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD num_doc
END IF
SELECT UNIQUE a.num_doc FROM irtb00006 a
WHERE a.cod_mov = anular.cod_mov AND a.num_doc = anular.num_doc AND
a.status_t IS NULL
IF status = notfound THEN
LET numero_msg = 3
CALL msg(numero_msg)
NEXT FIELD cod_mov
END IF
SELECT MAX(a.fecha),MAX(a.cod_sp),MAX(a.cod_sp_sec),MAX(a.orden_compra)
INTO anular.fecha,anular.cod_sp,anular.cod_sp_sec,orden_compras
FROM irtb00006 a
WHERE a.cod_mov = anular.cod_mov AND a.num_doc = anular.num_doc AND
a.status_t IS NULL
DISPLAY BY NAME anular.fecha,anular.cod_sp,anular.cod_sp_sec,orden_compras
LET p_fechas = anular.fecha USING "dd/mm/yyyy"
LET bandera = 0
CALL prd(p_fechas,usuarios) RETURNING bandera
IF bandera = 1 THEN
CALL fgl_winmessage("ERROR","NO PUEDE ANULAR DOCUMENTO, ESTA FUERA DE CORTE","STOP")
EXIT INPUT
END IF
END INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
CLOSE WINDOW anular
RETURN
END IF
PROMPT "Quiere Proceder Anulacion de Este Dcto. (S/N)? " FOR CHAR opc1
LET opc1 = upshift(opc1)
IF opc1 = "S" THEN
SELECT a.status_mov INTO status_m FROM irtb00005 a
WHERE a.cod_mov = anular.cod_mov
DECLARE busca CURSOR FOR
SELECT a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.cantidad_2
FROM irtb00006 a
WHERE a.num_doc=anular.num_doc and
a.cod_mov=anular.cod_mov
# a.fecha > "01012008"
LET decide = "N"
LET idx = 1
FOREACH busca INTO movi2[idx].cod_n,movi2[idx].cod_grupo,
movi2[idx].cod_tipo,movi2[idx].cod_sec,
movi2[idx].cantidad_2
IF status_m = "1" THEN
SELECT SUM(a.cantidad_2) INTO chequea.existe FROM irtb00006 a
WHERE a.cod_n = movi2[idx].cod_n and
a.cod_grupo = movi2[idx].cod_grupo and
a.cod_tipo=movi2[idx].cod_tipo and
a.cod_sec = movi2[idx].cod_sec and
a.status_t is null
IF chequea.existe IS NULL THEN
LET chequea.existe = 0
END IF
LET chequea.existe = chequea.existe - movi2[idx].cantidad_2
IF chequea.existe < 0 THEN
LET chcodigo = "SI ANULA ESTE DOCUMENTO ESTE CODIGO SERA NEGATIVO, ANULACION ABORTADA ",
movi2[idx].cod_n," ",movi2[idx].cod_grupo," ",
movi2[idx].cod_tipo," ",movi2[idx].cod_sec
CALL fgl_winmessage("ERROR",chcodigo,"stop")
LET bandera = 1
EXIT FOREACH
END IF
END IF
LET idx = idx + 1
END FOREACH
IF bandera = 1 THEN
GOTO salir
END IF
BEGIN WORK
UPDATE irtb00006 set status_t = "E",
us_mod = SUSER_SNAME(),
fech_mod = GETDATE()
WHERE cod_mov = anular.cod_mov AND
num_doc = anular.num_doc
#-> ANULAR TAMBIEN EL ASIENTO AL MAYOR DEL DOCUMENTO.
# Si el movimiento se anula y el asiento queda vivo, el mayor queda inflado.
# Aqui no se filtra por bodega porque el UPDATE de arriba tampoco lo hace.
CALL anulaEntradaInventario(usuarios, 'R', anular.num_doc, anular.cod_mov, NULL)
RETURNING okED, refED
IF NOT okED THEN
ROLLBACK WORK
CALL msgmodal(1695)
GOTO salir
END IF
FOR idx = 1 TO movi2.getLength() - 1
INITIALIZE answer TO NULL
select id_maintainX INTO answer from irtb00002 WHERE
cod_n = movi2[idx].cod_n AND cod_grupo = movi2[idx].cod_grupo
AND cod_tipo = movi2[idx].cod_tipo AND cod_sec = movi2[idx].cod_sec
DISPLAY answer
IF answer IS NULL THEN
-- G6: sin id MaintainX no hay nada que sincronizar; antes hacia ROLLBACK
-- (deshacia la anulacion) y luego el COMMIT caia -255 Not in transaction
CONTINUE FOR
ELSE
select sum(cantidad_2) INTO APIexistencia from irtb00006
WHERE cod_n = movi2[idx].cod_n and cod_grupo = movi2[idx].cod_grupo
and cod_tipo = movi2[idx].cod_tipo and cod_sec = movi2[idx].cod_sec
AND status_t IS NULL
LET m_articulos.cod_n = movi2[idx].cod_n
LET m_articulos.cod_grupo = movi2[idx].cod_grupo
LET m_articulos.cod_tipo = movi2[idx].cod_tipo
LET m_articulos.cod_sec = movi2[idx].cod_sec
LET m_articulos.descrip_esp = movi2[idx].descrip_esp
LET m_articulos.existencia = APIexistencia
LET m_articulos.exist_min = 0
CALL ApiMaintainR('PATCH',answer, m_articulos.*, usuarios) RETURNING answer
IF answer != 1 THEN
ROLLBACK WORK -- G6: fallo MaintainX: no seguir al COMMIT
CALL fgl_winmessage("ERROR","NO SE PUDO ACTUALIZAR MAINTAINX, ANULACION CANCELADA","stop")
GOTO salir
ELSE
DISPLAY "SUCCESS"
END IF
END IF
END FOR
IF orden_compras IS NOT NULL THEN
UPDATE cotb00014 SET cierre = 'N',us_mod = SUSER_SNAME(),
fech_mod = getdate()
WHERE num_oc = orden_compras
END IF
COMMIT WORK
LET numero_msg = 39
CALL msg(numero_msg)
END IF
LABEL salir:
CLOSE WINDOW anular
END FUNCTION
+416
View File
@@ -0,0 +1,416 @@
{
------------------------------------------------------------------
PROGRAMA : IRPRMT068
OBJETIVO : Capturar, Modificar, Eliminar registros de la
Relacion Departamento - Maquinas.
PROGRAMADOR : Ing. JUAN SOTO
FECHA REALIZACION : Julio 14, 1998.
------------------------------------------------------------------
}
GLOBALS "irprgb000.4gl"
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 irprmt068()
END MAIN
FUNCTION irprmt068()
CLEAR SCREEN
OPTIONS
FORM LINE 9,
ERROR LINE 23,
COMMENT LINE 21
OPEN FORM irfmmt068 FROM "irfmmt068"
DISPLAY FORM irfmmt068
DISPLAY "irprmt068" AT 4,3
DISPLAY "Departamento - Maquina" AT 6,30
MENU "OPCIONES"
COMMAND "Adicionar"
"<Esc> Adiciona Registro <Ctrl-C> Cancela Operacion"
let int_flag = false
CLEAR FORM
INITIALIZE dm_rep.* TO NULL
CALL irpcad068()
COMMAND "Consultar"
"<Esc> Realiza Busqueda <Ctrl-C> Cancela Operacion"
let int_flag = false
CALL irpcmf068()
COMMAND "Salir" "Retorna Menu Anterior"
EXIT MENU
END MENU
END FUNCTION
FUNCTION irpcad068()
DEFINE total_reg INTEGER
# WHENEVER ERROR CONTINUE
## Captura los datos que va a contener el registro
INPUT BY NAME dm_rep.* WITHOUT DEFAULTS
ON KEY (CONTROL-W)
CASE
WHEN INFIELD (departamento)
CALL busca_dpto()
IF int_flag THEN
LET int_flag = false
LET numero_msg = 2
CALL msg(numero_msg)
NEXT FIELD departamento
END IF
LET dm_rep.departamento = depto.departamento
DISPLAY BY NAME depto.departamento, depto.nom_dpto
LET int_flag = false
WHEN INFIELD (maquina)
CALL busca_maquina()
IF int_flag THEN
LET int_flag = false
LET numero_msg = 2
CALL msg(numero_msg)
NEXT FIELD maquina
END IF
LET dm_rep.maquina = maquinaria.codigo
DISPLAY BY NAME dm_rep.maquina, maquinaria.nombre
LET int_flag = false
END CASE
## Verifica que el cod_maq no exista en el catalogo de maquinas. Si existe,
## entonces despliega los datos del registro existente.
AFTER FIELD departamento
IF dm_rep.departamento is null THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD departamento
ELSE
SELECT nom_dpto INTO depto.nom_dpto FROM adtb00001
WHERE departamento = dm_rep.departamento
IF status = NOTFOUND THEN
DISPLAY BY NAME dm_rep.*
LET numero_msg = 134
CALL msg(numero_msg)
NEXT FIELD departamento
END IF
END IF
DISPLAY BY NAME depto.nom_dpto, dm_rep.departamento
AFTER FIELD maquina
IF dm_rep.maquina is null THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD maquina
ELSE
SELECT nombre INTO maquinaria.nombre FROM irtb00009
WHERE codigo = dm_rep.maquina
IF status = NOTFOUND THEN
DISPLAY BY NAME dm_rep.*
LET numero_msg = 116
CALL msg(numero_msg)
NEXT FIELD maquina
END IF
END IF
DISPLAY BY NAME maquinaria.nombre, dm_rep.maquina
LET total_reg = 0
SELECT COUNT(*) INTO total_reg FROM irtb00029
WHERE departamento = dm_rep.departamento AND
maquina = dm_rep.maquina AND
status_t IS NULL
IF total_reg > 0 THEN
LET numero_msg = 12
CALL msg(numero_msg)
NEXT FIELD departamento
END IF
AFTER INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
LET total_reg = 0
SELECT COUNT(*) INTO total_reg FROM irtb00029
WHERE departamento = dm_rep.departamento AND
maquina = dm_rep.maquina AND
status_t IS NULL
IF total_reg > 0 THEN
LET numero_msg = 12
CALL msg(numero_msg)
NEXT FIELD departamento
END IF
INSERT INTO irtb00029
VALUES (dm_rep.departamento,dm_rep.maquina,
null, usuarios, GETDATE(), null, null)
LET numero_msg = 1
CALL msg(numero_msg)
CLEAR FORM
LET dm_rep.maquina = NULL
NEXT FIELD departamento
END INPUT
END FUNCTION
FUNCTION irpcmf068()
## Aqui se prepara para la captura del criterio de seleccion
#WHENEVER ERROR CONTINUE
CONSTRUCT BY NAME criterio ON departamento,maquina
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
LET SELEC = " SELECT UNIQUE * FROM irtb00029 WHERE ",
" status_t is null and ",
criterio clipped,
" ORDER BY 1"
PREPARE busca FROM selec
DECLARE datos SCROLL CURSOR FOR busca
OPEN datos
FETCH FIRST datos INTO dm_rep.*
IF STATUS = NOTFOUND THEN
LET numero_msg = 3
CALL msg(numero_msg)
RETURN
END IF
SELECT nom_dpto INTO depto.nom_dpto FROM adtb00001
WHERE departamento = dm_rep.departamento
SELECT nombre INTO maquinaria.nombre FROM irtb00009
WHERE codigo = dm_rep.maquina
DISPLAY BY NAME dm_rep.*, depto.nom_dpto, maquinaria.nombre
MENU "OPCIONES "
COMMAND "Siguiente"
"Presenta en pantalla el proximo registro encontrado"
FETCH NEXT datos INTO dm_rep.*
IF STATUS = NOTFOUND THEN
LET numero_msg = 4
CALL msg(numero_msg)
END IF
SELECT nom_dpto INTO depto.nom_dpto FROM adtb00001
WHERE departamento = dm_rep.departamento
SELECT nombre INTO maquinaria.nombre FROM irtb00009
WHERE codigo = dm_rep.maquina
DISPLAY BY NAME dm_rep.*, depto.nom_dpto, maquinaria.nombre
COMMAND "Anterior"
"Presenta en pantalla el registro anterior encontrado"
FETCH PREVIOUS datos INTO dm_rep.*
IF STATUS = NOTFOUND THEN
LET numero_msg = 5
CALL msg(numero_msg)
END IF
SELECT nom_dpto INTO depto.nom_dpto FROM adtb00001
WHERE departamento = dm_rep.departamento
SELECT nombre INTO maquinaria.nombre FROM irtb00009
WHERE codigo = dm_rep.maquina
DISPLAY BY NAME dm_rep.*, depto.nom_dpto, maquinaria.nombre
COMMAND "Primero"
"Presenta en pantalla el primer registro encontrado"
FETCH FIRST datos INTO dm_rep.*
SELECT nom_dpto INTO depto.nom_dpto FROM adtb00001
WHERE departamento = dm_rep.departamento
SELECT nombre INTO maquinaria.nombre FROM irtb00009
WHERE codigo = dm_rep.maquina
DISPLAY BY NAME dm_rep.*, depto.nom_dpto, maquinaria.nombre
CALL msg(numero_msg)
COMMAND "Ultimo"
"Presenta en pantalla el ultimo registro encontrado"
FETCH LAST datos INTO dm_rep.*
SELECT nom_dpto INTO depto.nom_dpto FROM adtb00001
WHERE departamento = dm_rep.departamento
SELECT nombre INTO maquinaria.nombre FROM irtb00009
WHERE codigo = dm_rep.maquina
DISPLAY BY NAME dm_rep.*, depto.nom_dpto, maquinaria.nombre
CALL msg(numero_msg)
COMMAND KEY ("L") "eLiminar"
UPDATE irtb00029 SET status_t = "E",
us_mod = usuarios,
fech_mod = getdate()
WHERE departamento = dm_rep.departamento AND
maquina = dm_rep.maquina
LET numero_msg = 39
CALL msg(numero_msg)
COMMAND "Retornar"
"Retorna al menu anterior"
CLEAR FORM
EXIT MENU
END MENU
END FUNCTION
FUNCTION busca_dpto()
OPEN WINDOW busqueda AT 8,8 WITH FORM "cofmwd002"
ATTRIBUTE (BORDER,FORM LINE FIRST + 2,COMMENT LINE LAST)
LET int_flag = false
CONSTRUCT criterio ON adtb00001.nom_dpto FROM adtb00001.nom_dpto
LET selec = "SELECT departamento,nom_dpto FROM adtb00001 ",
" WHERE ",
" status_t is null AND ",
criterio clipped,
"ORDER BY 1 "
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
GO TO sale
RETURN
END IF
PREPARE busca1 FROM selec
IF status = notfound THEN
LET numero_msg = 12
CALL msg(numero_msg)
END IF
DECLARE johnn1 CURSOR FOR busca1
LET idx = 1
FOREACH johnn1 INTO busca_wd1[idx].*
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
GO TO sale1
END IF
IF status = notfound THEN
EXIT FOREACH
END IF
LET idx = idx + 1
LABEL sale1:
END FOREACH
CALL set_count(idx-1)
DISPLAY ARRAY busca_wd1 TO s_desp1.*
LET curr1 = arr_curr()
LET dm_rep.departamento = busca_wd1[curr1].codigo
LET depto.departamento = busca_wd1[curr1].codigo
LET depto.nom_dpto = busca_wd1[curr1].nom_dpto
LABEL sale:
CLOSE WINDOW busqueda
END FUNCTION
FUNCTION busca_maquina()
# LET formulario = fgl_getenv("FORMS") CLIPPED,"/codir/"
# LET formulario = formulario CLIPPED, "cofmwd002"
LET formulario = "irfmwd068"
OPEN WINDOW busqueda AT 8,8 WITH FORM "irfmwd068"
ATTRIBUTE (BORDER,FORM LINE FIRST + 2,COMMENT LINE LAST)
LET int_flag = false
IF consulta = "S" THEN
CONSTRUCT criterio ON irtb00009.nombre FROM irtb00009.nombre
LET selec = "SELECT codigo,nombre FROM irtb00009 ",
" WHERE ",
" status_t is null AND ",
criterio clipped,
"ORDER BY 1 "
ELSE
{
LET selec = "SELECT a.codigo,a.nombre FROM irtb00009 a,irtb00008 b ",
" WHERE ",
" b.cod_n =7 AND ",
" b.cod_grupo = 0 AND ",
" b.cod_tipo = 0 AND ",
" b.cod_sec = 2 AND ",
" a.codigo = b.cod_maq ",
"ORDER BY 1 "
}
LET selec = "SELECT a.codigo,a.nombre FROM irtb00009 a,irtb00008 b ",
" WHERE ",
" b.cod_n = '",movi8[p_act].cod_n,"' AND ",
" b.cod_grupo = '",movi8[p_act].cod_grupo, "' AND ",
" b.cod_tipo = '",movi8[p_act].cod_tipo,"' AND ",
" b.cod_sec = '",movi8[p_act].cod_sec,"' AND ",
" a.codigo = b.cod_maq ",
"ORDER BY 1 "
END IF
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
GO TO sale2
RETURN
END IF
PREPARE busca2 FROM selec
IF status = notfound THEN
LET numero_msg = 12
CALL msg(numero_msg)
END IF
DECLARE johnn2 CURSOR FOR busca2
LET idx = 1
FOREACH johnn2 INTO busca_wd2[idx].*
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
GO TO sale3
END IF
IF status = notfound THEN
EXIT FOREACH
END IF
LET idx = idx + 1
LABEL sale3:
END FOREACH
CALL set_count(idx-1)
DISPLAY ARRAY busca_wd2 TO s_desp1.*
LET curr1 = arr_curr()
LET dm_rep.maquina = busca_wd2[curr1].codigo
LET maquinaria.codigo = busca_wd2[curr1].codigo
LET maquinaria.nombre = busca_wd2[curr1].nombre
LABEL sale2:
CLOSE WINDOW busqueda
END FUNCTION
+283
View File
@@ -0,0 +1,283 @@
{
-------------------------------------------------------------------------------
PROGRAMA : IRPRRP002
OBJETIVO : CATALOGO DE REPUESTOS.
PROGRAMADOR : Ing. Juan Fco. Soto.
FECHA REALIZACION : Enero 29, 1993.
-------------------------------------------------------------------------------
}
GLOBALS "irprgb000.4gl"
DEFINE fecha1 DATE
MAIN
DEFER INTERRUPT
CALL ARG_VAL(1) RETURNING usuarios
CALL ARG_VAL(2) RETURNING clave
CALL ARG_VAL(3) RETURNING impresor
CONNECT to "smarmotech" USER usuarios USING clave
SELECT * INTO p_companias.* FROM companias
CALL irprrp002()
END MAIN
FUNCTION irprrp002()
DEFINE sel_exist CHAR(300)
DEFINE salir1,salir CHAR(1)
DEFINE idx1,idx SMALLINT
DEFINE hoy DATE
DEFINE dat_exist RECORD
cod_n SMALLINT,
cod_grupo SMALLINT,
cod_tipo SMALLINT,
cod_sec SMALLINT,
existencia SMALLINT
END RECORD
DEFINE materia RECORD
cod_n LIKE intb00002.cod_n,
cod_grupo LIKE intb00002.cod_grupo,
cod_tipo LIKE intb00002.cod_tipo,
cod_sec LIKE intb00002.cod_sec,
descrip_esp LIKE intb00001.descrip_esp,
descrip_ing LIKE intb00001.descrip_ing,
dia_llegada LIKE intb00002.dia_llegada,
unidad_med LIKE intb00001.unidad_med,
descripcion LIKE intb00001.descrip_esp,
codigo LIKE irtb00010.codigo,
existencia LIKE irtb00002.existencia
END RECORD,
cod smallint
#WHENEVER ERROR CONTINUE
OPTIONS
FORM LINE 8,
ERROR LINE 23,
COMMENT LINE 21
CLEAR SCREEN
OPEN FORM irfmrp02 FROM "irfmrp002"
DISPLAY FORM irfmrp02
CALL pantalla()
DISPLAY "irprrp002" AT 4,3
DISPLAY "Catalogo de Repuestos " AT 6,28
LET tipo_papel = 1
CALL msgrp000(tipo_papel)
INPUT BY NAME decide,fecha1
BEFORE FIELD fecha1
LET fecha1 = TODAY
DISPLAY BY NAME fecha1
AFTER FIELD fecha1
IF fecha1 IS NULL THEN
LET numero_msg = 2
CALL msg(numero_msg)
NEXT FIELD fecha1
END IF
END INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
CONSTRUCT criterio ON b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec
FROM cod_n,cod_grupo,cod_tipo,cod_sec
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 maestra TO archivo
IF decide = "A" THEN
LET SELEC =
"SELECT UNIQUE b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec, ",
" b.descrip_esp,b.descrip_ing,b.dia_llegada,b.unidad_med, ",
" c.nombre,c.codigo ",
" FROM irtb00002 b, OUTER irtb00010 c ",
" WHERE ",criterio clipped,
" AND c.codigo = b.cod_tipo ",
"ORDER BY 10,5"
ELSE
LET SELEC =
"SELECT UNIQUE b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec, ",
" b.descrip_esp,b.descrip_ing,b.dia_llegada,b.unidad_med, ",
" c.nombre,c.codigo ",
" FROM irtb00002 b, OUTER irtb00010 c ",
" WHERE ",criterio clipped,
" AND c.codigo = b.cod_tipo AND b.status_t IS NULL ",
"ORDER BY 10,1,2,3,4 "
END IF
LET selec1 = "SELECT COUNT(*) FROM irtb00002 b,irtb00010 c ",
"WHERE ",criterio clipped,
" AND c.codigo = b.cod_tipo AND b.status_t IS NULL"
PREPARE comando1 FROM selec1
DECLARE busca1 CURSOR FOR comando1
OPEN busca1
FETCH busca1 INTO regi
DISPLAY "<< Buscando Informacion ... Espere Por Favor >>" AT 17,14
ATTRIBUTE (BOLD)
PREPARE busca FROM selec
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
DECLARE accion CURSOR FOR busca
DISPLAY " " AT 17,14
LET p_param = "S"
FOREACH accion INTO materia.*
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = false
RETURN
END IF
OUTPUT TO REPORT maestra(materia.*)
END FOREACH
FINISH REPORT maestra
CLEAR SCREEN
RUN "type C:\\archivo > %USPRINT%"
END FUNCTION
REPORT maestra(x)
DEFINE x RECORD
cod_n LIKE intb00002.cod_n,
cod_grupo LIKE intb00002.cod_grupo,
cod_tipo LIKE intb00002.cod_tipo,
cod_sec LIKE intb00002.cod_sec,
descrip_esp LIKE intb00001.descrip_esp,
descrip_ing LIKE intb00001.descrip_ing,
dia_llegada LIKE intb00002.dia_llegada,
unidad_med LIKE intb00001.unidad_med,
descripcion LIKE intb00001.descrip_esp,
codigo LIKE irtb00010.codigo,
existencia LIKE irtb00002.existencia
END RECORD
DEFINE l smallint
DEFINE varia CHAR(20)
DEFINE descripcion CHAR(60)
DEFINE primera CHAR(1)
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 normal CHAR(2)
DEFINE doce CHAR(2)
DEFINE hora CHAR(5)
OUTPUT
TOP MARGIN 0
LEFT MARGIN 0
BOTTOM MARGIN 2
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
PRINT COLUMN 3, comp_off,negrillas_on
PRINT COLUMN 1, "irprrp002",
COLUMN 31, p_companias.nombre CLIPPED, -- antes "E U R O S T O N E" fijo
COLUMN 75, "Pag. ",pageno using "###"
PRINT COLUMN 17, " Sistema de Inventario de Repuestos ",
COLUMN 75, today using "dd/mm/yyyy"
PRINT COLUMN 17, " Catalogo de Repuestos ",
COLUMN 78, hora
IF decide = "N" THEN
LET varia = " N u m e r i c o"
ELSE
LET varia = " A l f a b e t i c o"
END IF
LET l = (80 - LENGTH(varia))/2
LET l = l - 8
PRINT COLUMN l+2, varia clipped," AL ",fecha1 USING "dd/mm/yyyy"
PRINT COLUMN 1, comp_on
PRINT COLUMN 1, "----------------------------------------------------",
"----------------------------------------------------" ,
"----------------------------------------"
PRINT COLUMN 99, "Dia de",
COLUMN 109, "Existencia"
PRINT COLUMN 1, "codigo",
COLUMN 15, "Descripcion",
COLUMN 91, "Unidad",
COLUMN 99, "Llegada",
COLUMN 109, "S/Mvto."
PRINT COLUMN 1, "----------------------------------------------------",
"----------------------------------------------------" ,
"----------------------------------------"
BEFORE GROUP OF x.codigo
SKIP 1 LINE
PRINT COLUMN 2, negrillas_on,x.descripcion CLIPPED,negrillas_off
SKIP 1 LINE
ON EVERY ROW
SELECT SUM(a.cantidad_2) INTO x.existencia
FROM irtb00006 a
WHERE a.cod_n = x.cod_n and a.cod_grupo = x.cod_grupo and
a.cod_tipo = x.cod_tipo and a.cod_sec = x.cod_sec and
a.status_t is null AND a.fecha <= fecha1
IF x.existencia is null THEN
LET x.existencia = 0
END IF
PRINT COLUMN 1, x.cod_n USING "&","-",x.cod_grupo USING "&&","-",
x.cod_tipo USING "&&","-",x.cod_sec USING "&&&&"," ", -- &&& daba *** con sec >= 1000
x.descrip_esp CLIPPED," ",x.descrip_ing,
COLUMN 91, x.unidad_med,
COLUMN 100, x.dia_llegada using "###",
COLUMN 107, x.existencia using "---,---.##"
AFTER GROUP OF x.cod_tipo
SKIP 1 LINE
PRINT COLUMN 3, "Total del grupo = ",
GROUP count(*) USING "####"
SKIP 1 LINE
ON LAST ROW
SKIP 1 LINE
PRINT COLUMN 3, "Total de Registros Impresos = ", count(*) USING "####"
PRINT COLUMN 1, "====================================================",
"====================================================" ,
"==========================="
PRINT COLUMN 3, comp_off
END REPORT
+314
View File
@@ -0,0 +1,314 @@
{
-------------------------------------------------------------------------------
PROGRAMA : IRPRRP003
OBJETIVO : REPORTE DE MOVIMIENTOS APARTIR DE UN RANGO DE FECHA.
EL REPORTE SE PUEDE LISTAR TANTO PARA UN CODIGO COMO
PARA UN RANGO DE CODIGO O TODOS LOS CODIGOS
PROGRAMADOR : Ing. Juan Fco. Soto
FECHA REALIZACION : Marzo 1, 1993.
-------------------------------------------------------------------------------
}
GLOBALS "irprgb000.4gl"
MAIN
DEFER INTERRUPT
CALL STARTLOG("irprrp03.log")
CALL ARG_VAL(1) RETURNING usuarios
CALL ARG_VAL(2) RETURNING clave
CALL ARG_VAL(3) RETURNING impresor
CONNECT to "smarmotech" USER usuarios USING clave
SELECT a.* INTO p_companias.* FROM companias a
CALL irprrp03()
END MAIN
FUNCTION irprrp03()
# Estas variables son tando de control de indice de busqueda como de control de
# cambio de codigo y termino de loops
DEFINE idx_b SMALLINT
DEFINE cambio,salir,salir1 CHAR(1)
# Variable que contiene los movimientos del rango para cada codigo
DEFINE transacc RECORD
cod_n LIKE irtb00006.cod_n,
cod_grupo LIKE irtb00006.cod_grupo,
cod_tipo LIKE irtb00006.cod_tipo,
cod_sec LIKE irtb00006.cod_sec,
descrip_esp LIKE intb00001.descrip_esp,
unidad_med LIKE intb00001.unidad_med,
num_doc LIKE irtb00006.num_doc,
fecha CHAR(10),
cantidad_2 LIKE irtb00006.cantidad_2,
cod_mov LIKE irtb00006.cod_mov,
descrip_mov LIKE irtb00005.descrip_mov,
codigo CHAR(8),
balance_in DECIMAL(12,2)
END RECORD
# Variable control de validacion de cambio de codigo
DEFINE codigo_ant RECORD
cod_n SMALLINT,
cod_grupo SMALLINT,
cod_tipo SMALLINT,
cod_sec SMALLINT
END RECORD
# Variable para los balances iniciales de todos los codigos
DEFINE balances RECORD
cod_n SMALLINT,
cod_grupo SMALLINT,
cod_tipo SMALLINT,
cod_sec SMALLINT,
balance LIKE irtb00006.cantidad_2
END RECORD
# Variable para el select de los balances iniciales
DEFINE select_balan CHAR(1000)
# WHENEVER ERROR CONTINUE
OPTIONS
FORM LINE 9,
ERROR LINE 23,
COMMENT LINE 21
OPEN FORM irfmrp03 FROM "irfmrp003"
DISPLAY FORM irfmrp03
# Rutina para mensaje de papel en la pantalla
LET tipo_papel = 1
CALL msgrp000(tipo_papel)
LET int_flag = false
# Captura de rango de fecha
INPUT BY NAME datos_cons.fech_in,datos_cons.fech_fi
# Control interrupcion del programa
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = false
CLEAR SCREEN
RETURN
END IF
# Control para imprimir los movimientos pertenecientes a un codigo o
# movimientos para varios codigos
CONSTRUCT criterio ON a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec
FROM cod_n,cod_grupo,cod_tipo,cod_sec
# Concatenacion para la configuracion del select de busqueda de los balances
# Iniciales
LET selec =
"SELECT a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,b.descrip_esp,b.unidad_med, ",
" a.num_doc,CONVERT(CHAR(10),a.fecha,103),a.cantidad_2,a.cod_mov,c.descrip_mov,'1' ",
"FROM irtb00006 a, irtb00002 b, irtb00005 c ",
"WHERE ",criterio clipped," AND a.cod_n=b.cod_n AND a.cod_grupo=b.cod_grupo ",
"AND a.cod_tipo=b.cod_tipo AND a.cod_sec=b.cod_sec AND c.cod_mov=a.cod_mov ",
-- antes CONVERT(CHAR(10),a.fecha,103) BETWEEN 'dd/mm/yyyy' AND ...: comparaba TEXTO y traia
-- movimientos de cualquier ano cuyo dd/mm cayera en el rango -> fecha real con parametros
"AND b.status_t is NULL AND a.fecha BETWEEN ? AND ? AND a.status_t IS NULL ",
"ORDER BY a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.fecha"
# Abrir el archivo del spool para la impresion
DISPLAY "<< Estoy Buscando los Movimientos >>"
AT 17,14 ATTRIBUTE (REVERSE,BOLD)
DISPLAY selec
PREPARE busca FROM selec
DECLARE accion CURSOR FOR busca
LET selec1 =
"SELECT COUNT(*) FROM irtb00006 a, irtb00002 b, irtb00005 c ",
"WHERE ",criterio clipped," AND a.cod_n=b.cod_n AND a.cod_grupo=b.cod_grupo ",
"AND a.cod_tipo=b.cod_tipo AND a.cod_sec=b.cod_sec AND c.cod_mov=a.cod_mov ",
"AND b.status_t is NULL AND a.fecha BETWEEN ? AND ? AND a.status_t IS NULL "
PREPARE comando1 FROM selec1
DECLARE busca1 CURSOR FOR comando1
OPEN busca1 USING datos_cons.fech_in, datos_cons.fech_fi
FETCH busca1 INTO regi
LET p_param = "S"
{ CALL defecto(usuarios,clave,impresor) RETURNING imprime,negrilla_on,negrillas_of,
doble_on,doble_off,comp_on,comp_off,
doce,normal,archivo,copia
}
CALL seleccionarsalida() RETURNING r_output
CALL configureoutput(r_output) RETURNING HANDLER
START REPORT reporte3 TO XML HANDLER handler
DISPLAY "<< Reporte Generandose ... Por Favor Espere. >>"
AT 17,14 ATTRIBUTE (REVERSE,BOLD)
# Loop para la busqueda de los movimientos de los codigos especificados
FOREACH accion USING datos_cons.fech_in, datos_cons.fech_fi INTO transacc.*
CALL termometro(regi,p_param)
LET p_param = "N"
LET transacc.codigo = transacc.cod_n USING "&",
transacc.cod_grupo USING "&",
transacc.cod_tipo USING "&&",
transacc.cod_sec USING "&&&&" -- &&& = *** con sec >= 1000: mezclaba articulos en un grupo
LET transacc.balance_in = 0
IF transacc.balance_in IS NULL THEN
LET transacc.balance_in = 0
END IF
DISPLAY "ESTOY ENVIANDO "
OUTPUT TO REPORT reporte3(transacc.*)
END FOREACH
FINISH REPORT reporte3
#RUN imprime
END FUNCTION
# Rutina generadora del reporte
REPORT reporte3(x)
# Record para validacion de los valores de la funcion matriz
DEFINE x RECORD
cod_n LIKE irtb00006.cod_n,
cod_grupo LIKE irtb00006.cod_grupo,
cod_tipo LIKE irtb00006.cod_tipo,
cod_sec LIKE irtb00006.cod_sec,
descrip_esp LIKE intb00001.descrip_esp,
unidad_med LIKE intb00001.unidad_med,
num_doc LIKE irtb00006.num_doc,
fecha CHAR(10),
cantidad_2 LIKE irtb00006.cantidad_2,
cod_mov LIKE irtb00006.cod_mov,
descrip_mov LIKE irtb00005.descrip_mov,
codigo CHAR(8),
balance_in DECIMAL(12,2)
END RECORD
# Variables para control de nombre y caracteres ASCII
DEFINE doble_on CHAR(2),
doble_off CHAR(2),
negrillas_on CHAR(2),
negrillas_off CHAR(2),
comprimido_on CHAR(2),
comprimido_off,doce CHAR(3),
hora CHAR(5),
# Calculo para el reporte
canti DECIMAL(12,2),
entrada,salida DECIMAL(12,2)
OUTPUT
LEFT MARGIN 0
RIGHT MARGIN 170 -- el balance se imprime hasta la col. 166; con el default (132) GRE lo cortaba
ORDER BY x.codigo
FORMAT
PAGE HEADER
# Validacion de los caracteres ASCII
{ 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 comprimido_on = ASCII 15
LET comprimido_off = ASCII 18
LET doce = ASCII 27, ASCII 77}
LET hora = time
# Impresion del encabezado de la compania y demas letreros
PRINT COLUMN 1, ASCII 27,ASCII 80
PRINT COLUMN 1, "irprrp003",
COLUMN 17, p_companias.nombre,
COLUMN 75, "Pag. ",pageno using "###"
PRINT COLUMN 17, " Sistema de Inventario de Repuestos ",
COLUMN 75, today using "dd/mm/yyyy"
PRINT COLUMN 17, " Movimientos de Repuestos ",
COLUMN 78, hora
SKIP 2 LINES
#--------------------------------------------------------------------------
# Encabezados de detalles
PRINT COLUMN 1, "Desde ",datos_cons.fech_in using "dd/mm/yyyy",
COLUMN 18, "Hasta ",datos_cons.fech_fi using "dd/mm/yyyy"
PRINT doce,comprimido_on
PRINT COLUMN 1, "--------------------------------------------------",
"--------------------------------------------------",
"--------------------------------------------------",
"---------------"
PRINT COLUMN 124, "C a n t i d a d"
PRINT COLUMN 1, "Codigo ",
COLUMN 15, "Descripcion",
COLUMN 45, "Unidad",
COLUMN 52, "Documento",
COLUMN 63, "fecha",
COLUMN 74, "Movimiento",
COLUMN 121, "Entrada",
COLUMN 136, "Salida",
COLUMN 159, "Balance"
PRINT COLUMN 1, "--------------------------------------------------",
"--------------------------------------------------",
"--------------------------------------------------",
"---------------"
# Control para la impresion del codigo del repuesto una sola vez
BEFORE GROUP OF x.codigo
SKIP 1 LINE
LET x.balance_in = 0
LET canti = 0
SELECT SUM(a.cantidad_2) INTO x.balance_in FROM irtb00006 a
WHERE a.status_t IS NULL AND a.cod_n = x.cod_n AND
a.cod_grupo = x.cod_grupo AND a.cod_tipo = x.cod_tipo AND
a.cod_sec = x.cod_sec AND a.fecha < datos_cons.fech_in
IF x.balance_in is null THEN
LET x.balance_in = 0
END IF
PRINT COLUMN 1, x.cod_n USING "&","-",
COLUMN 3, x.cod_grupo USING "&","-",
COLUMN 5, x.cod_tipo USING "&&","-",
COLUMN 8, x.cod_sec USING "&&&&",
COLUMN 15, x.descrip_esp,
COLUMN 45, x.unidad_med,
COLUMN 132, "Inicial ---> ",
x.balance_in using "---,---,---.##"
LET canti = x.balance_in
# Impresion de los movimientos con sus respctivas descripcion y
# cantidades afectadas
ON EVERY ROW
# Control para impresion del balance inicial una sola vez
# IF primera = "S" THEN
#----------------------------------------------------------------------------
LET canti = canti + x.cantidad_2
IF x.cantidad_2 > 0 THEN
LET salida = null
LET entrada = x.cantidad_2
ELSE
LET entrada = null
LET salida = x.cantidad_2
END IF
PRINT COLUMN 53, x.num_doc USING "&&&&&&",
COLUMN 63, x.fecha ,
COLUMN 74, x.descrip_mov,
COLUMN 111, entrada USING "---,---,---.##",
COLUMN 127, salida USING "---,---,---.##",
COLUMN 152, canti using "---,---,---.##"
ON LAST ROW
PRINT comprimido_off
END REPORT
+189
View File
@@ -0,0 +1,189 @@
{
-------------------------------------------------------------------------------
PROGRAMA : INPRRP004
OBJETIVO : TIPOS DE MOVIMIENTOS
PROGRAMADOR : Ing. Betania Guerrero Perez
FECHA REALIZACION : Enero 07, 1993
-------------------------------------------------------------------------------
}
GLOBALS "irprgb000.4gl"
MAIN
DEFER INTERRUPT
CALL ARG_VAL(1) RETURNING usuarios
CALL ARG_VAL(2) RETURNING clave
CALL ARG_VAL(3) RETURNING impresor
CONNECT to "smarmotech" USER usuarios USING clave
SELECT * INTO p_companias.* FROM companias
CALL irprrp04()
END MAIN
FUNCTION irprrp04()
DEFINE tipos RECORD
cod_mov LIKE irtb00005.cod_mov,
descrip_mov LIKE irtb00005.descrip_mov,
status_mov LIKE irtb00005.status_mov,
cuenta_1 LIKE irtb00005.cuenta_1,
cuenta_2 LIKE irtb00005.cuenta_2,
cuenta_3 LIKE irtb00005.cuenta_3
END RECORD
#WHENEVER ERROR CONTINUE
OPTIONS
FORM LINE 8,
ERROR LINE 23,
COMMENT LINE 21
CLEAR SCREEN
OPEN FORM irfmrp004 FROM "irfmrp004"
DISPLAY FORM irfmrp004
DISPLAY "irprrp004" AT 4,3
DISPLAY "Tipos de Movimientos" AT 6,27
LET tipo_papel = 1
CALL msgrp000(tipo_papel)
INPUT BY NAME decide
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
CONSTRUCT criterio ON irtb00005.cod_mov FROM cod_mov -- antes intb00005 (tabla de MP): con filtro el SQL sobre irtb00005 fallaba
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
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 mover TO archivo
IF decide = "A" THEN
LET SELEC =
"SELECT cod_mov,descrip_mov,status_mov,cuenta_1,cuenta_2,cuenta_3 ",
"FROM irtb00005 WHERE ", criterio clipped," AND status_t is null ",
"ORDER BY descrip_mov"
ELSE
LET SELEC =
"SELECT cod_mov,descrip_mov,status_mov,cuenta_1,cuenta_2,cuenta_3 ",
"FROM irtb00005 WHERE ", criterio clipped," AND status_t is null ",
"ORDER BY cod_mov"
END IF
LET selec1 = "SELECT COUNT(*) FROM irtb00005 ",
"WHERE ",criterio clipped, " AND status_t is null "
DISPLAY "Buscando Informacion ... Espere Por Favor" AT 17,14
ATTRIBUTE (REVERSE,BOLD)
PREPARE busca FROM selec
DECLARE accion CURSOR FOR busca
PREPARE comando1 FROM selec1
DECLARE busca1 CURSOR FOR comando1
OPEN busca1
FETCH busca1 INTO regi
LET p_param = "S"
FOREACH accion INTO tipos.*
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
OUTPUT TO REPORT mover(tipos.*)
END FOREACH
FINISH REPORT mover
RUN imprime
END FUNCTION
REPORT mover(x)
DEFINE x RECORD
cod_mov LIKE irtb00005.cod_mov,
descrip_mov LIKE irtb00005.descrip_mov,
status_mov LIKE irtb00005.status_mov,
cuenta_1 LIKE irtb00005.cuenta_1,
cuenta_2 LIKE irtb00005.cuenta_2,
cuenta_3 LIKE irtb00005.cuenta_3
END RECORD
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 hora CHAR(5)
OUTPUT
TOP MARGIN 0
LEFT MARGIN 1
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 hora = time
PRINT COLUMN 1, ASCII 27,ASCII 80
PRINT COLUMN 1, "irprrp004",
COLUMN 17, " M A R M O T E C H S. A.",
COLUMN 73, "Pag. ",pageno using "###"
PRINT COLUMN 17, " Sistema de Inventario de Repuestos ",
COLUMN 73, today using "dd/mm/yy"
PRINT COLUMN 17, " Tipos de Movimientos",
COLUMN 76, hora
SKIP 1 LINE
PRINT COLUMN 1, doce
PRINT COLUMN 1, "----------------------------------------------------",
"-----------------------------------------------"
PRINT COLUMN 1, "Codigo",
COLUMN 9, "Descripcion del Movimiento",
COLUMN 53, "Status",
COLUMN 61, "Cuenta_1",
COLUMN 72, "Cuenta_2",
COLUMN 83, "Cuenta_3"
PRINT COLUMN 1, "----------------------------------------------------",
"-----------------------------------------------"
ON EVERY ROW
PRINT COLUMN 3, x.cod_mov using "<<",
COLUMN 9, x.descrip_mov,
COLUMN 55, x.status_mov,
COLUMN 63, x.cuenta_1,
COLUMN 74, x.cuenta_2,
COLUMN 85, x.cuenta_3
ON LAST ROW
SKIP 1 LINE
PRINT COLUMN 3, "Total de Registros Impresos = ", count(*) USING "####"
PRINT COLUMN 3, ASCII 27, ASCII 80
END REPORT
+263
View File
@@ -0,0 +1,263 @@
{
-------------------------------------------------------------------------------
PROGRAMA : IRPRRP005
OBJETIVO : REPORTE EXISTENCIAS
PROGRAMADOR : Ing. Juan Fco. Soto.
FECHA REALIZACION : Marzo 1, 1993.
Modificado por : Johnny Soto
Fecha Modificacion : 22 Enero 1995
-------------------------------------------------------------------------------
}
GLOBALS "irprgb000.4gl"
DEFINE ano_c CHAR(4),
p_mes INTEGER,
nomb1 CHAR(12),
t_existe,t_valor DECIMAL(12,2),
opt5 CHAR(1)
MAIN
DEFER INTERRUPT
CALL arg_val(1) RETURNING usuarios
CALL arg_val(2) RETURNING Clave
CALL arg_val(3) RETURNING impresor
CONNECT TO "smarmotech" USER usuarios USING clave
SELECT * INTO p_companias.* FROM companias
CALL irprrp005()
END MAIN
FUNCTION irprrp005()
DEFINE mes CHAR(2)
DEFINE idx_ant,idx_cos,idx_act SMALLINT
DEFINE salir,primera CHAR(1)
DEFINE balance_in DECIMAL(12,2)
DEFINE existe RECORD
cod_n LIKE intb00001.cod_n,
cod_grupo LIKE intb00001.cod_grupo,
cod_tipo LIKE intb00001.cod_tipo,
cod_sec LIKE intb00001.cod_sec,
descrip_esp LIKE intb00001.descrip_esp,
unidad_med LIKE intb00001.unidad_med,
codigo LIKE irtb00010.codigo,
nombre LIKE irtb00010.nombre,
existe_act DECIMAL(10,2),
costo LIKE intb00013.costo_st
END RECORD
DEFINE select_cost,select_act,select_ant CHAR(1000)
OPTIONS
FORM LINE 8,
ERROR LINE 23,
COMMENT LINE 21
OPEN FORM infmrp005 FROM "irfmrp005"
DISPLAY FORM infmrp005
INPUT BY NAME datos_cons.fech_fi
AFTER FIELD fech_fi
IF datos_cons.fech_fi IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD fech_fi
END IF
AFTER INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = false
RETURN
END IF
EXIT INPUT
END INPUT
CONSTRUCT criterio ON d.cod_n,d.cod_grupo,d.cod_tipo,d.cod_sec
FROM cod_n,cod_grupo,cod_tipo,cod_sec
LET select_cost =
"SELECT d.cod_n,d.cod_grupo,d.cod_tipo,d.cod_sec,d.descrip_esp, ",
" d.unidad_med,a.codigo,a.nombre ",
"FROM irtb00002 d,irtb00010 a ",
"WHERE ",criterio CLIPPED," AND d.status_t is null ",
" AND d.cod_tipo = a.codigo ",
" ORDER BY a.codigo,d.cod_n,d.cod_grupo,d.cod_tipo,d.cod_Sec "
DISPLAY "<< Estoy Buscando Los Costos Actuales >>"
AT 17,14 ATTRIBUTE (REVERSE,BOLD)
CALL seleccionarsalida() RETURNING r_output
LET handler = configureOutput(r_output)
START REPORT reporte_5 TO XML HANDLER handler
PREPARE busca_costo FROM select_cost
DECLARE material_costo SCROLL CURSOR FOR busca_costo
OPEN material_costo
FOREACH material_costo INTO existe.*
LET existe.existe_act = 0
LET existe.costo = 0
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
LET p_param = "N"
LET ano_c = YEAR(datos_cons.fech_fi)
SELECT MAX(a.mes_fin) INTO p_mes
FROM irtb00013 a
WHERE (a.cod_n = existe.cod_n and a.cod_grupo = existe.cod_grupo and
a.cod_tipo = existe.cod_tipo and a.cod_sec = existe.cod_sec) and
(a.ano = ano_c) and a.status_t is null
SELECT a.costo_st INTO existe.costo FROM irtb00013 a
WHERE (a.cod_n = existe.cod_n and a.cod_grupo = existe.cod_grupo and
a.cod_tipo = existe.cod_tipo and a.cod_sec = existe.cod_sec) and
(a.ano = ano_c and a.mes_fin = p_mes) and a.status_t is null
IF existe.costo IS NULL THEN
LET existe.costo = 0
END IF
SELECT SUM(a.cantidad_2) INTO existe.existe_act
FROM irtb00006 a
WHERE a.cod_n = existe.cod_n and a.cod_grupo = existe.cod_grupo and
a.cod_tipo = existe.cod_tipo and a.cod_sec = existe.cod_sec and
a.fecha <= datos_cons.fech_fi and a.status_t is null
IF existe.existe_act IS NULL THEN
LET existe.existe_act = 0
END IF
OUTPUT TO REPORT reporte_5(existe.*)
END FOREACH
FINISH REPORT reporte_5
END FUNCTION
REPORT reporte_5(x)
DEFINE x RECORD
cod_n LIKE intb00001.cod_n,
cod_grupo LIKE intb00001.cod_grupo,
cod_tipo LIKE intb00001.cod_tipo,
cod_sec LIKE intb00001.cod_sec,
descrip_esp LIKE intb00001.descrip_esp,
unidad_med LIKE intb00001.unidad_med,
codigo LIKE irtb00010.codigo,
nombre LIKE irtb00010.nombre,
existe_act DECIMAL(10,2),
costo LIKE intb00013.costo_st
END RECORD,
no_reg SMALLINT
DEFINE total_c,total_p DECIMAL (12,2)
DEFINE doble_on CHAR(2)
DEFINE doble_off CHAR(2)
DEFINE negrillas_on CHAR(2)
DEFINE negrillas_off CHAR(2)
DEFINE comp_on CHAR(3)
DEFINE comp_off CHAR(2)
DEFINE doce CHAR(3)
DEFINE hora CHAR(5)
OUTPUT
TOP MARGIN 0
LEFT MARGIN 0
BOTTOM MARGIN 2
PAGE LENGTH 150
FORMAT
PAGE HEADER
LET hora = time
PRINT COLUMN 1, doce
PRINT COLUMN 1, "irprrp005",
COLUMN 24, " M A R M O T E C H S. A.",
COLUMN 89, "Pag. ",pageno using "###"
PRINT COLUMN 1,
COLUMN 24, " Sistema de Inventario de Repuestos",
COLUMN 89, today using "dd/mm/yyyy"
PRINT COLUMN 24, " Valorizacion Inventario Al ",datos_cons.fech_fi
USING "dd/mm/yyyy",
COLUMN 92, hora
SKIP 1 LINES
PRINT COLUMN 1, "--------------------------------------------------",
"--------------------------------------------------",
"----------------------------------------"
PRINT COLUMN 96, "Costo"
PRINT COLUMN 1, "Codigo",
COLUMN 12, "Descripcion",
COLUMN 82, "Existencia",
COLUMN 96, "Standard",
COLUMN 115, "Total"
PRINT COLUMN 1, "--------------------------------------------------",
"--------------------------------------------------",
"----------------------------------------"
IF t_existe is null THEN
LET t_existe = 0
END IF
IF t_valor is null THEN
LET t_valor = 0
END IF
SKIP 1 LINE
BEFORE GROUP OF x.codigo
SKIP 1 LINE
PRINT negrillas_on, x.nombre,negrillas_off
SKIP 1 LINE
ON EVERY ROW
IF x.existe_act <> 0 THEN
IF no_reg is null THEN
LET no_reg = 0
END IF
PRINT COLUMN 1, x.cod_n USING "&","-",x.cod_grupo USING "&&&","-",
x.cod_tipo USING "&&&","-",x.cod_sec USING "&&&&&&",
" ",x.descrip_esp WORDWRAP RIGHT MARGIN 70 , ' ', x.unidad_med CLIPPED,
COLUMN 79, x.existe_act USING "---,---,---.##",
COLUMN 94, x.costo USING "#,###,###.####",
COLUMN 109, x.existe_act * x.costo USING "---,---,---.##"
LET no_reg = no_reg + 1
LET t_existe = t_existe + x.existe_act
END IF
ON LAST ROW
LET t_valor = SUM(x.existe_act * x.costo)
PRINT COLUMN 109, "--------------"
PRINT COLUMN 109, t_valor USING "(((,(((,(##.##)"
PRINT COLUMN 1, "==================================================",
"==================================================",
"========="
PRINT COLUMN 4, "Total Registros Impresos =", no_reg USING "<<<<"
PRINT COLUMN 1, "==================================================",
"==================================================",
"========="
PRINT COLUMN 4, comp_off
END REPORT
+204
View File
@@ -0,0 +1,204 @@
{
-------------------------------------------------------------------------------
PROGRAMA : IRPRRP006
OBJETIVO : CATALOGO DE REPUESTOS CON EXISTENCIAS
PROGRAMADOR : Ing. Juan Fco. Soto.
FECHA REALIZACION : Mayo 18, 1993.
-------------------------------------------------------------------------------
}
GLOBALS "irprgb000.4gl"
DEFINE existencia VARCHAR(2)
MAIN
DEFER INTERRUPT
CALL arg_val(1) RETURNING usuarios
CALL arg_val(2) RETURNING clave
CALL arg_val(3) RETURNING impresor
CONNECT TO "smarmotech" USER usuarios USING clave
SELECT * INTO p_companias.* FROM companias
CALL irprrp006()
END MAIN
FUNCTION irprrp006()
DEFINE idx SMALLINT
DEFINE materia RECORD
cod_n LIKE intb00002.cod_n,
cod_grupo LIKE intb00002.cod_grupo,
cod_tipo LIKE intb00002.cod_tipo,
cod_sec LIKE intb00002.cod_sec,
descrip_esp LIKE irtb00002.descrip_esp,
descrip_ing LIKE irtb00002.descrip_ing,
unidad_med LIKE irtb00002.unidad_med,
exist_min FLOAT,
existencia LIKE irtb00002.existencia
END RECORD,
cod smallint
#WHENEVER ERROR CONTINUE
OPTIONS
FORM LINE 8,
ERROR LINE 23,
COMMENT LINE 21
CLEAR SCREEN
OPEN FORM irfmrp006 FROM "irfmrp006"
DISPLAY FORM irfmrp006
LET tipo_papel = 1
CALL msgrp000(tipo_papel)
INPUT BY NAME decide,existencia
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
CONSTRUCT criterio ON b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec
FROM cod_n,cod_grupo,cod_tipo,cod_sec
IF decide = "A" THEN
LET SELEC =
"SELECT b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec,b.descrip_esp, ",
" b.descrip_ing,b.unidad_med,b.exist_min,ISNULL(sum(c.cantidad_2),0) ",
"FROM irtb00002 b,irtb00006 c ",
"WHERE ",criterio CLIPPED,
" AND (b.cod_n = c.cod_n AND b.cod_Grupo = c.cod_Grupo AND b.cod_tipo = c.cod_tipo AND b.cod_sec = c.cod_sec) ",
" AND c.status_t IS NULL " ,
" AND b.status_t IS NULL ",
"GROUP BY b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec,b.exist_min,b.descrip_esp,b.descrip_ing,b.unidad_med ",
"ORDER BY b.descrip_esp"
ELSE
LET SELEC =
"SELECT b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec,b.descrip_esp, ",
" b.descrip_ing,b.unidad_med,b.exist_min,ISNULL(sum(c.cantidad_2),0) ",
"FROM irtb00002 b,irtb00006 c ",
"WHERE ",criterio CLIPPED,
" AND (b.cod_n = c.cod_n AND b.cod_Grupo = c.cod_Grupo AND b.cod_tipo = c.cod_tipo AND b.cod_sec = c.cod_sec) ",
" AND c.status_t IS NULL " ,
" AND b.status_t IS NULL ",
"GROUP BY b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec,b.exist_min,b.descrip_esp,b.descrip_ing,b.unidad_med ",
"ORDER BY b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec "
END IF
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
PREPARE busca FROM selec
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
DECLARE accion SCROLL CURSOR FOR busca
OPEN accion
LET idx = 1
LET p_param = "S"
WHILE status != notfound
FETCH ABSOLUTE idx accion INTO materia.*
IF status = NOTFOUND THEN
EXIT WHILE
END IF
IF idx = 1 THEN
LET r_filename = 'irprrp006.4rp'
IF fgl_report_loadCurrentSettings(r_filename) THEN
LET preview=1
CALL seleccionarsalida() RETURNING r_output -- load the .4rp file
CALL fgl_report_selectDevice(r_output) -- changing default
CALL fgl_report_selectPreview(preview) -- changing default
CALL fgl_report_configurexlsxdevice(null,null,null,false,false,null,1)
LET handler = fgl_report_commitCurrentSettings() -- commit changes
END IF
START REPORT p_cero TO XML HANDLER handler
END IF
LET idx = idx + 1
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = false
RETURN
END IF
LET p_param = "N"
IF existencia = 'SI' THEN
IF materia.existencia =0 OR materia.existencia IS NULL THEN
CONTINUE WHILE
END IF
END IF
OUTPUT TO REPORT p_cero(materia.*)
END WHILE
IF idx > 1 THEN
FINISH REPORT p_cero
ELSE
CALL fgl_winmessage("INFO","NO EXISTEN INFORMACIONES CON ESTOS PARAMETROS","INFO")
END IF
END FUNCTION
REPORT p_cero(x)
DEFINE x RECORD
cod_n LIKE intb00002.cod_n,
cod_grupo LIKE intb00002.cod_grupo,
cod_tipo LIKE intb00002.cod_tipo,
cod_sec LIKE intb00002.cod_sec,
descrip_esp LIKE irtb00002.descrip_esp,
descrip_ing LIKE irtb00002.descrip_ing,
unidad_med LIKE irtb00002.unidad_med,
exist_min FLOAT,
existencia LIKE irtb00002.existencia
END RECORD
DEFINE dia_l,l smallint
DEFINE varia CHAR(20)
DEFINE descripcion CHAR(60)
DEFINE primera CHAR(1)
DEFINE hora CHAR(5),
codigo VARCHAR(25),
cantidad_registros INT
OUTPUT
TOP MARGIN 0
LEFT MARGIN 0
BOTTOM MARGIN 2
FORMAT
PAGE HEADER
LET hora = TIME
IF decide = "N" THEN
LET varia = "N u m e r i c o"
ELSE
LET varia = "A l f a b e t i c o"
END IF
PRINTX hora,p_companias.nombre,varia
ON EVERY ROW
LET codigo = x.cod_n USING "&","-",x.cod_grupo USING "&&","-",x.cod_tipo USING "&&&","-",
x.cod_sec USING "&&&&"
PRINTX x.*,p_companias.nombre,codigo
ON LAST ROW
LET cantidad_registros= count(*)
PRINTX cantidad_registros
END REPORT
+298
View File
@@ -0,0 +1,298 @@
{------------------------------------------------------------------------------
PROGRAMA : IRPRRP009
OBJETIVO : Operacion por Tipo de Movimiento Repuestos
PROGRAMADOR : VALENTIN RODRIGUEZ
FECHA REALIZACION : MARZO, 13 2020
---------------------------------------------------------------------------------}
GLOBALS "irprgb000.4gl"
DEFINE p_fecha DATE
DEFINE afecta CHAR(1)
DEFINE handler om.SaxDocumentHandler, -- return value from fgl_report_commitCurrentSettings()
r_filename STRING, -- filename of Report Design Document including .4rp extension
r_output STRING, -- output format option
preview INTEGER, -- TRUE/FALSE, to set preview option
criterio STRING
MAIN
DEFER INTERRUPT
CALL arg_val(1) RETURNING usuarios
CALL arg_val(2) RETURNING clave
CALL arg_val(3) RETURNING impresor
CONNECT TO "smarmotech" USER usuarios USING clave
SELECT * INTO p_companias.* FROM companias
CALL irprrp009()
END MAIN
FUNCTION irprrp009()
DEFINE select_ac CHAR(1000)
DEFINE c_ano CHAR(4)
DEFINE entra,nombre_mes CHAR(14)
DEFINE entra1 CHAR(5)
DEFINE detalle CHAR(100)
DEFINE numero_ent CHAR(2)
DEFINE p_ano, ano_act CHAR(4)
DEFINE tiempo CHAR(4)
DEFINE idz INT
DEFINE acumulado RECORD
cod_n LIKE irtb00002.cod_n,
cod_grupo LIKE irtb00002.cod_grupo,
cod_tipo LIKE irtb00002.cod_tipo,
cod_sec LIKE irtb00002.cod_sec,
descrip_esp LIKE irtb00002.descrip_esp,
unidad_med LIKE irtb00002.unidad_med,
cod_mov LIKE irtb00006.cod_mov,
descrip_mov LIKE intb00005.descrip_mov,
departamento SMALLINT,
nombre CHAR(30),
consumo decimal(12,2),
cuenta CHAR(10),
cuenta_inv CHAR(10),
gasto_ind LIKE irtb00013.costo_st,
consumo_cuenta DECIMAL(12,2),
nombre_cuenta VARCHAR(50)
END RECORD
DEFINE acumulado_arr DYNAMIC ARRAY OF RECORD
cod_mov LIKE irtb00006.cod_mov,
descrip_mov LIKE intb00005.descrip_mov,
departamento SMALLINT,
nombre CHAR(30),
consumo decimal(12,2),
cuenta CHAR(10),
gasto_ind LIKE irtb00013.costo_st,
descripcion CHAR(50),
consumo_cuenta DECIMAL(12,2),
cuenta_inv CHAR(10)
END RECORD
OPEN FORM edfmrp118 FROM "irfmrp009"
DISPLAY FORM edfmrp118
-- columnas calificadas con b. (irtb00006): sin prefijo, cod_n/cod_grupo/cod_tipo/cod_sec
-- son ambiguas en el JOIN con irtb00002 y cualquier filtro por codigo fallaba
CONSTRUCT criterio ON b.cod_mov,b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec
FROM cod_mov,cod_n,cod_grupo,cod_tipo,cod_sec
BEFORE CONSTRUCT
CALL ircmovimientos()
AFTER CONSTRUCT
IF int_flag THEN
CALL msg(2)
LET int_flag = FALSE
RETURN
END IF
EXIT CONSTRUCT
END CONSTRUCT
INPUT BY NAME datos_cons.fech_in,datos_cons.fech_fi
BEFORE FIELD fech_in
SELECT MAX(a.fecha) INTO p_fecha FROM cgtb00004 a
WHERE a.ref[1,9] = entra1
LET datos_cons.fech_in = p_fecha + 1
DISPLAY BY NAME datos_cons.fech_in
AFTER FIELD fech_in
IF datos_cons.fech_in IS NULL THEN
ERROR "(16) CAMPO EN BLANCO"
NEXT FIELD fech_in
END IF
LET p_ano = YEAR(datos_cons.fech_in)
AFTER FIELD fech_fi
IF datos_cons.fech_fi IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD fech_final
END IF
LET ano_act = year(datos_cons.fech_fi)
AFTER INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = false
RETURN
END IF
LET select_ac =
"SELECT b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec,a.descrip_esp, ",
"a.unidad_med,b.cod_mov,c.descrip_mov,b.sec_a,d.nom_dpto,SUM(b.cantidad_2), a.cuenta,e.cuenta_no ",
"FROM irtb00002 AS a INNER JOIN ",
"irtb00006 AS b ON a.cod_n = b.cod_n AND a.cod_grupo = b.cod_grupo AND a.cod_tipo = b.cod_tipo AND ",
criterio CLIPPED," and ",
"a.cod_sec = b.cod_sec and b.status_t IS NULL INNER JOIN ",
" iptb00022 e ON e.cod_cia = a.cod_n INNER JOIN ",
"irtb00005 AS c ON b.cod_mov = c.cod_mov LEFT OUTER JOIN ",
"adtb00001 AS d ON b.sec_a = d.departamento ",
"WHERE ",
" b.fecha BETWEEN ? AND ? AND b.status_t IS NULL ",
" GROUP BY b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec,a.descrip_esp,a.unidad_med,b.cod_mov,c.descrip_mov,b.sec_a,d.nom_dpto, a.cuenta,e.cuenta_no ",
" ORDER BY b.cod_mov,b.sec_a,b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec"
DISPLAY "<< Estoy Buscando Acumulado Del Periodo Dado >>"
AT 17,14 ATTRIBUTE (REVERSE,BOLD)
PREPARE busca_ant FROM select_ac
DECLARE actual SCROLL CURSOR FOR busca_ant
OPEN actual USING datos_cons.fech_in,datos_cons.fech_fi
LET r_filename ="irprrp009.4rp"
LET idx = 1
LET idz = 1
FOREACH actual INTO acumulado.*
IF idx = 1 THEN
IF fgl_report_loadCurrentSettings(r_filename) THEN
LET preview=1
CALL seleccionarsalida() RETURNING r_output -- load the .4rp file
CALL fgl_report_selectDevice(r_output) -- changing default
CALL fgl_report_selectPreview(preview) -- changing default
LET handler = fgl_report_commitCurrentSettings() -- commit changes
END IF
LET idx = 2
START REPORT opera TO XML HANDLER HANDLER
END IF
LET c_ano = YEAR(datos_cons.fech_fi)
LET acumulado.gasto_ind = 0
SELECT a.costo_st INTO acumulado.gasto_ind FROM irtb00013 a
WHERE (a.cod_n = acumulado.cod_n and a.cod_grupo = acumulado.cod_grupo and
a.cod_tipo = acumulado.cod_tipo and a.cod_sec=acumulado.cod_sec) and
a.ano = c_ano and
a.status_t is NULL
IF acumulado.gasto_ind IS NULL THEN
LET acumulado.gasto_ind = 0
END IF
SELECT ISNULL(descripcion,'NO EXISTE CUENTA')
INTO acumulado_arr[idz].descripcion
FROM cgtb00001
WHERE cgtb00001.cuenta_no = acumulado.cuenta
IF acumulado.consumo is null THEN
LET acumulado.consumo = 0
END IF
IF acumulado.nombre IS NULL THEN
LET acumulado.nombre = 'NO ESPECIFICADO'
END IF
LET acumulado.nombre_cuenta = acumulado_arr[idz].descripcion
LET acumulado.consumo_cuenta = acumulado.consumo * acumulado.gasto_ind
LET acumulado_arr[idz].cod_mov = acumulado.cod_mov
LET acumulado_arr[idz].descrip_mov = acumulado.descrip_mov
LET acumulado_arr[idz].departamento = acumulado.departamento
LET acumulado_arr[idz].nombre = acumulado.nombre
LET acumulado_arr[idz].consumo = acumulado.consumo
LET acumulado_arr[idz].cuenta = acumulado.cuenta
LET acumulado_arr[idz].gasto_ind = acumulado.gasto_ind
LET acumulado_arr[idz].consumo_cuenta = acumulado.consumo_cuenta
LET acumulado_arr[idz].cuenta_inv = acumulado.cuenta_inv
LET idz = idz + 1
OUTPUT TO REPORT opera(acumulado.*)
END FOREACH
IF idx > 1 THEN
FINISH REPORT opera
ELSE
CALL fgl_winmessage("INFO", "NO HAY REGISTROS EN ESTE RANGO DE FECHA Y CON LOS PARAMETROS INDICADOS", "INFO")
END IF
END INPUT
END FUNCTION
REPORT opera(x)
DEFINE x RECORD
cod_n LIKE irtb00002.cod_n,
cod_grupo LIKE irtb00002.cod_grupo,
cod_tipo LIKE irtb00002.cod_tipo,
cod_sec LIKE irtb00002.cod_sec,
descrip_esp LIKE irtb00002.descrip_esp,
unidad_med LIKE irtb00002.unidad_med,
cod_mov LIKE irtb00006.cod_mov,
descrip_mov LIKE intb00005.descrip_mov,
departamento SMALLINT,
nombre CHAR(30),
consumo decimal(12,2),
cuenta CHAR(10),
cuenta_inv CHAR(10),
gasto_ind LIKE irtb00013.costo_st,
consumo_cuenta DECIMAL(12,2),
nombre_cuenta VARCHAR(50)
END RECORD
DEFINE rango_fecha CHAR(30)
DEFINE movimiento CHAR(50)
DEFINE codigo_producto CHAR(100)
DEFINE hora CHAR(5),
actual VARCHAR(20)
DEFINE total_material, total_movimiento,total_cuenta, total_departamento,
total_general DECIMAL (12,2)
FORMAT
PAGE HEADER
LET hora = TIME
LET actual = today using "dd/mm/yy"
LET rango_fecha = datos_cons.fech_in ,"--",datos_cons.fech_fi
BEFORE GROUP OF x.cod_mov
LET movimiento = x.cod_mov,"--",x.descrip_mov
LET total_movimiento = 0
PRINTX movimiento
BEFORE GROUP OF x.departamento
LET total_departamento = 0
PRINTX x.nombre,x.departamento
BEFORE GROUP OF x.cuenta
LET total_cuenta = 0
PRINTX x.cuenta,x.nombre_cuenta
ON EVERY ROW
LET codigo_producto = '(',x.cod_n,'-',x.cod_grupo,'-',x.cod_tipo,'-',x.cod_sec,')',x.descrip_esp
LET total_movimiento = total_movimiento + x.consumo_cuenta
LET total_departamento = total_departamento + x.consumo_cuenta
LET total_cuenta = total_cuenta + x.consumo_cuenta
LET total_general = total_general + x.consumo_cuenta
PRINTX codigo_producto,x.unidad_med,x.consumo,x.gasto_ind,
rango_fecha,p_companias.nombre, x.consumo_cuenta,
hora,actual,x.cuenta
AFTER GROUP OF x.departamento
PRINTX x.nombre,total_departamento
AFTER GROUP OF x.cod_mov
PRINTX total_movimiento
AFTER GROUP OF x.cuenta
PRINTX total_cuenta
ON LAST ROW
LET total_general = SUM(x.consumo_cuenta)
PRINTX total_general
LET total_material = 0
END REPORT
+354
View File
@@ -0,0 +1,354 @@
{
-------------------------------------------------------------------------------
PROGRAMA : IRPRRP043
OBJETIVO : Rreporte de Consumo Por Maquina
PROGRAMADOR : Juan Soto
FECHA REALIZACION : Agosto 20, 2020
MODIFICACION : Incluir costo estandar del repuesto y valor consumo por departamento.
-------------------------------------------------------------------------------
}
IMPORT os
GLOBALS "irprgb000.4gl"
DEFINE fecha1,fecha2 DATE,
departamento INT
MAIN
DEFER INTERRUPT
CALL ARG_VAL(1) RETURNING usuarios
CALL ARG_VAL(2) RETURNING clave
CALL ARG_VAL(3) RETURNING impresor
CONNECT to "smarmotech" USER usuarios USING clave
SELECT * INTO p_companias.* FROM companias
CALL irprrp008()
END MAIN
FUNCTION irprrp008()
##### Definicion de la variables a imprimir
DEFINE cons_maq RECORD
tipoinventario VARCHAR(40),
maquina LIKE irtb00006.maquina,
nombre LIKE irtb00009.nombre,
cod_n LIKE irtb00006.cod_n,
cod_grupo LIKE irtb00006.cod_grupo,
cod_tipo LIKE irtb00006.cod_tipo,
cod_sec LIKE irtb00006.cod_sec,
descrip_esp CHAR(30),
unidad_med CHAR(4),
fecha DATE,
num_doc INT,
descripcion_mov VARCHAR(100),
cantidad_2 LIKE irtb00006.cantidad_2,
codigo CHAR(25),
costo_st LIKE irtb00013.costo_st,
valor DECIMAL(12,2)
END RECORD
#WHENEVER ERROR CONTINUE
OPTIONS
FORM LINE 9,
ERROR LINE 23,
COMMENT LINE 21
CLEAR SCREEN
OPEN FORM irfmrp008 FROM "irfmrp043"
DISPLAY FORM irfmrp008
DISPLAY "irprrp008" AT 4,3
DISPLAY "Consumo de Repuesto Por Maquina" AT 6,25
LET tipo_papel = 1
CALL msgrp000(tipo_papel)
DISPLAY " "
at 19,14
####### Creando criterio de busqueda
INPUT BY NAME fecha1,fecha2,departamento
BEFORE INPUT
CALL busca_departamento()
AFTER FIELD fecha1
IF fecha1 IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD fecha1
END IF
AFTER FIELD fecha2
IF fecha2 IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD fecha2
END IF
IF fecha1 > fecha2 THEN
LET numero_msg = 168
CALL msg(numero_msg)
NEXT FIELD fecha1
END IF
END INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
CONSTRUCT criterio ON a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec
FROM cod_n,cod_grupo,cod_tipo,cod_sec
AFTER CONSTRUCT
##### Creando la facilidad para cancelar opreacion mediante DELETE
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
EXIT CONSTRUCT
END CONSTRUCT
##### Selecionando la informacion requerida para la salida de
##### informacion
IF departamento IS NULL THEN
LET selec =
"SELECT 'REPUESTOS',a.sec_a as departamento,b.nom_dpto,a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec, ",
" c.descrip_esp,c.unidad_med,a.fecha,a.num_doc,cast(d.cod_mov as char(5))+'-'+d.descrip_mov, a.cantidad_2*-1 ",
"FROM irtb00006 a,adtb00001 b,irtb00002 c,irtb00005 d ",
"WHERE a.cod_n = c.cod_n AND a.cod_grupo = c.cod_grupo AND ",
" a.cod_tipo = c.cod_tipo AND a.cod_sec = c.cod_sec AND ",
" a.cod_mov = d.cod_mov AND d.consumo = 'SI' AND ",
" a.sec_a = b.departamento AND a.status_t is NULL AND ",
" a.fecha BETWEEN ? AND ? AND a.cantidad_2 < 0 AND ",
criterio CLIPPED ,
" UNION ",
"SELECT 'MAT PRIMA', a.depto_a as departamento,b.nom_dpto,a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec, ",
" c.descrip_esp,c.unidad_med,a.fecha,a.num_doc,cast(d.cod_mov as char(5))+'-'+d.descrip_mov, a.cantidad_2*-1 ",
"FROM intb00006 a,adtb00001 b,intb00001 c,intb00005 d ",
"WHERE a.cod_n = c.cod_n AND a.cod_grupo = c.cod_grupo AND ",
" a.cod_tipo = c.cod_tipo AND a.cod_sec = c.cod_sec AND ",
" a.cod_mov = d.cod_mov AND d.consumo = 'SI' AND ",
" a.depto_a = b.departamento AND a.status_t is NULL AND ",
" a.fecha BETWEEN ? AND ? AND a.cantidad_2 < 0 AND ",
criterio CLIPPED,
" ORDER BY a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec"
ELSE
LET selec =
"SELECT 'REPUESTOS',a.sec_a as departamento,b.nom_dpto,a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec, ",
" c.descrip_esp,c.unidad_med,a.fecha,a.num_doc,cast(d.cod_mov as char(5))+'-'+d.descrip_mov, a.cantidad_2*-1 ",
"FROM irtb00006 a,adtb00001 b,irtb00002 c,irtb00005 d ",
"WHERE a.cod_n = c.cod_n AND a.cod_grupo = c.cod_grupo AND ",
" a.cod_tipo = c.cod_tipo AND a.cod_sec = c.cod_sec AND ",
" a.cod_mov = d.cod_mov AND d.consumo = 'SI' AND ",
" a.sec_a = ", departamento, " and ",
" a.sec_a = b.departamento AND a.status_t is NULL AND ",
" a.fecha BETWEEN ? AND ? AND a.cantidad_2 < 0 AND ",
criterio CLIPPED ,
" UNION ",
"SELECT 'MAT PRIMA', a.depto_a as departamento,b.nom_dpto,a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec, ",
" c.descrip_esp,c.unidad_med,a.fecha,a.num_doc,cast(d.cod_mov as char(5))+'-'+d.descrip_mov, a.cantidad_2*-1 ",
"FROM intb00006 a,adtb00001 b,intb00001 c,intb00005 d ",
"WHERE a.cod_n = c.cod_n AND a.cod_grupo = c.cod_grupo AND ",
" a.cod_tipo = c.cod_tipo AND a.cod_sec = c.cod_sec AND ",
" a.cod_mov = d.cod_mov AND d.consumo = 'SI' AND ",
" a.depto_a = ", departamento, " and ",
" a.depto_a = b.departamento AND a.status_t is NULL AND ",
" a.fecha BETWEEN ? AND ? AND a.cantidad_2 < 0 AND ",
criterio CLIPPED,
" ORDER BY a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec"
END IF
DISPLAY "<< Buscando Informacion ... Espere Por Favor. >>"
AT 17,14 ATTRIBUTE (REVERSE,BOLD)
LET selec1 =
"SELECT COUNT(*) ",
"FROM irtb00006 a,adtb00001 b,irtb00002 c ",
"WHERE a.cod_n = c.cod_n AND a.cod_grupo = c.cod_grupo AND ",
" a.cod_tipo = c.cod_tipo AND a.cod_sec = c.cod_sec AND ",
" a.sec_a = b.departamento AND a.status_t is NULL AND ",
" a.fecha BETWEEN ? AND ? AND a.cantidad_2 <0 AND ",
criterio clipped
# PREPARE comando1 FROM selec1
# DECLARE busca1 CURSOR FOR comando1
# OPEN busca1 USING fecha1,fecha2
# FETCH busca1 INTO regi
PREPARE busca FROM selec
DECLARE accion CURSOR FOR busca
OPEN accion USING fecha1,fecha2,fecha1,fecha2
LET idx = 1
LET p_param = "S"
FOREACH accion INTO cons_maq.*
IF idx =1 THEN
LET r_filename = 'irprrp043.4rp'
IF fgl_report_loadCurrentSettings(r_filename) THEN
LET preview = 1
CALL seleccionarsalida() RETURNING r_output -- load the .4rp file
CALL fgl_report_selectDevice(r_output) -- changing default
CALL fgl_report_selectPreview(preview) -- changing default
CALL fgl_report_configurexlsxdevice(null,null,null,false,false,null,1)
LET handler = fgl_report_commitCurrentSettings() -- commit changes
START REPORT rep_consu TO XML HANDLER HANDLER
END IF
END IF
LET idx = idx +1
# CALL termometro(regi,p_param)
LET p_param = "N"
LET cons_maq.codigo = cons_maq.cod_n USING "&",'-',
cons_maq.cod_grupo USING "&&",'-',
cons_maq.cod_tipo USING "&&&",'-',
cons_maq.cod_sec USING "&&&&"
LET cons_maq.costo_st = 0
IF cons_maq.tipoinventario = 'REPUESTOS' THEN
SELECT costo_st INTO cons_maq.costo_st
FROM irtb00013
WHERE cod_n = cons_maq.cod_n AND
cod_grupo = cons_maq.cod_grupo AND
cod_tipo = cons_maq.cod_tipo AND
cod_sec = cons_maq.cod_sec AND
ano = YEAR(cons_maq.fecha) AND
status_t IS NULL
ELSE
SELECT costo_st INTO cons_maq.costo_st
FROM intb00013
WHERE cod_n = cons_maq.cod_n AND
cod_grupo = cons_maq.cod_grupo AND
cod_tipo = cons_maq.cod_tipo AND
cod_sec = cons_maq.cod_sec AND
ano = YEAR(cons_maq.fecha) AND
status_t IS NULL
END IF
LET cons_maq.valor = 0
LET cons_maq.valor = cons_maq.costo_st * cons_maq.cantidad_2
OUTPUT TO REPORT rep_consu(cons_maq.*)
END FOREACH
FINISH REPORT rep_consu
END FUNCTION
###### Proceso de generacion del reporte.
REPORT rep_consu(x)
DEFINE x RECORD
tipoinventario VARCHAR(50),
maquina LIKE irtb00006.maquina,
nombre LIKE irtb00009.nombre,
cod_n LIKE intb00001.cod_n,
cod_grupo LIKE intb00001.cod_grupo,
cod_tipo LIKE intb00001.cod_tipo,
cod_sec LIKE intb00001.cod_sec,
descrip_esp CHAR(30),
unidad_med CHAR(4),
fecha DATE,
num_doc INT,
descripcion_mov VARCHAR(100),
cantidad_2 LIKE irtb00006.cantidad_2,
codigo CHAR(25),
costo_st LIKE irtb00013.costo_st,
valor DECIMAL(12,2)
END RECORD
DEFINE p RECORD
descrip_esp LIKE intb00001.descrip_esp,
unidad_med LIKE intb00001.unidad_med,
descrip_mov LIKE irtb00005.descrip_mov
END RECORD
DEFINE primera CHAR(1),
hora CHAR(6),
xfecha CHAR(10),
datosFechas VARCHAR(30),
dia,mes smallint,
nom_dia,nom_mes CHAR(10),
total_consumo_co,total_valor_co,total_general,total_valor_mq FLOAT
OUTPUT
LEFT MARGIN 0
ORDER BY x.maquina,x.codigo
###### Formateando la salida de la informacion
FORMAT
PAGE HEADER
LET hora = time
LET dia = WEEKDAY(x.fecha)
LET mes = MONTH(x.fecha)
LET primera = "S"
CALL busca_mes()
LET nom_mes = nombre_mes[mes]
LET dia = dia + 1
CALL busca_dia()
LET nom_dia = nombre_dia[dia]
LET datosFechas = "Del ",fecha1 USING "dd/mm/yyyy", " Al ",
fecha2 USING "dd/mm/yyyy"
BEFORE GROUP OF x.maquina
PRINTX p_companias.nombre,fecha1,fecha2,hora,datosFechas,x.maquina,x.nombre
BEFORE GROUP OF x.codigo
PRINTX x.codigo,x.descrip_esp,x.unidad_med
ON EVERY ROW
LET xfecha = x.fecha USING "dd/mm/yyyy"
PRINTX xfecha, x.cantidad_2, x.costo_st, x.valor ,x.num_doc,x.descripcion_mov
AFTER GROUP OF x.codigo
LET total_consumo_co = GROUP SUM(x.cantidad_2)
LET total_valor_co = GROUP SUM(x.valor)
AFTER GROUP OF x.maquina
LET total_valor_mq= GROUP SUM(x.valor)
PRINTX total_Valor_mq
ON LAST ROW
LET total_General= SUM(x.valor)
END REPORT
##### Igualandon los dias de la semana a la descripcion del mismo
FUNCTION busca_dia()
LET nombre_dia[1] = "Domingo"
LET nombre_dia[2] = "Lunes"
LET nombre_dia[3] = "Martes"
LET nombre_dia[4] = "Miercoles"
LET nombre_dia[5] = "Jueves"
LET nombre_dia[6] = "Viernes"
LET nombre_dia[7] = "Sabado"
END FUNCTION
####### Igualando el numero del mes a la descripcion del mismo
FUNCTION busca_mes()
LET nombre_mes[1] = "Enero"
LET nombre_mes[2] = "Febrero"
LET nombre_mes[3] = "Marzo"
LET nombre_mes[4] = "Abril"
LET nombre_mes[5] = "Mayo"
LET nombre_mes[6] = "Junio"
LET nombre_mes[7] = "Julio"
LET nombre_mes[8] = "Agosto"
LET nombre_mes[9] = "Septiembre"
LET nombre_mes[10] = "Octubre"
LET nombre_mes[11] = "Noviembre"
LET nombre_mes[12] = "Diciembre"
END FUNCTION
+353
View File
@@ -0,0 +1,353 @@
{
-------------------------------------------------------------------------------
PROGRAMA : IRPRRP045
OBJETIVO : Rreporte de Consumo Por Maquina USUARIOS
PROGRAMADOR : Juan Soto
FECHA REALIZACION : Junio 14, 20, 2022
-------------------------------------------------------------------------------
}
IMPORT os
GLOBALS "irprgb000.4gl"
DEFINE fecha1,fecha2 DATE,
departamento INT
MAIN
DEFER INTERRUPT
CALL ARG_VAL(1) RETURNING usuarios
CALL ARG_VAL(2) RETURNING clave
CALL ARG_VAL(3) RETURNING impresor
CONNECT to "smarmotech" USER usuarios USING clave
SELECT * INTO p_companias.* FROM companias
CALL irprrp045()
END MAIN
FUNCTION irprrp045()
##### Definicion de la variables a imprimir
DEFINE cons_maq RECORD
tipoinventario VARCHAR(40),
maquina LIKE irtb00006.maquina,
nombre LIKE irtb00009.nombre,
cod_n LIKE irtb00006.cod_n,
cod_grupo LIKE irtb00006.cod_grupo,
cod_tipo LIKE irtb00006.cod_tipo,
cod_sec LIKE irtb00006.cod_sec,
descrip_esp CHAR(30),
unidad_med CHAR(4),
fecha DATE,
num_doc INT,
descripcion_mov VARCHAR(100),
cantidad_2 LIKE irtb00006.cantidad_2,
codigo CHAR(25),
costo_st LIKE irtb00013.costo_st,
valor DECIMAL(12,2)
END RECORD
#WHENEVER ERROR CONTINUE
OPTIONS
FORM LINE 9,
ERROR LINE 23,
COMMENT LINE 21
CLEAR SCREEN
OPEN FORM irfmrp008 FROM "irfmrp043"
DISPLAY FORM irfmrp008
DISPLAY "irprrp008" AT 4,3
DISPLAY "Consumo de Repuesto Por Maquina" AT 6,25
####### Creando criterio de busqueda
INPUT BY NAME fecha1,fecha2,departamento
BEFORE INPUT
CALL departamento_user(usuarios)
AFTER FIELD fecha1
IF fecha1 IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD fecha1
END IF
AFTER FIELD fecha2
IF fecha2 IS NULL THEN
LET numero_msg = 16
CALL msg(numero_msg)
NEXT FIELD fecha2
END IF
IF fecha1 > fecha2 THEN
LET numero_msg = 168
CALL msg(numero_msg)
NEXT FIELD fecha1
END IF
END INPUT
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
CONSTRUCT criterio ON a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec
FROM cod_n,cod_grupo,cod_tipo,cod_sec
AFTER CONSTRUCT
##### Creando la facilidad para cancelar opreacion mediante DELETE
IF int_flag THEN
LET numero_msg = 2
CALL msg(numero_msg)
LET int_flag = FALSE
RETURN
END IF
EXIT CONSTRUCT
END CONSTRUCT
##### Selecionando la informacion requerida para la salida de
##### informacion
IF departamento IS NULL THEN
-- Sin departamento: solo los departamentos asignados al usuario (adtb00056), igual
-- que el combo; antes dejarlo vacio mostraba el consumo de TODOS los departamentos.
LET selec =
"SELECT 'REPUESTOS',a.sec_a as departamento,b.nom_dpto,a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec, ",
" c.descrip_esp,c.unidad_med,a.fecha,a.num_doc,cast(d.cod_mov as char(5))+'-'+d.descrip_mov, a.cantidad_2*-1 ",
"FROM irtb00006 a,adtb00001 b,irtb00002 c,irtb00005 d ",
"WHERE a.cod_n = c.cod_n AND a.cod_grupo = c.cod_grupo AND ",
" a.cod_tipo = c.cod_tipo AND a.cod_sec = c.cod_sec AND ",
" a.cod_mov = d.cod_mov AND d.consumo = 'SI' AND ",
" a.sec_a IN (SELECT u.departamento_visualiza FROM adtb00056 u WHERE u.usuario = '", usuarios CLIPPED, "') AND ",
" a.sec_a = b.departamento AND a.status_t is NULL AND ",
" a.fecha BETWEEN ? AND ? AND a.cantidad_2 < 0 AND ",
criterio CLIPPED ,
" UNION ",
"SELECT 'MAT PRIMA', a.depto_a as departamento,b.nom_dpto,a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec, ",
" c.descrip_esp,c.unidad_med,a.fecha,a.num_doc,cast(d.cod_mov as char(5))+'-'+d.descrip_mov, a.cantidad_2*-1 ",
"FROM intb00006 a,adtb00001 b,intb00001 c,intb00005 d ",
"WHERE a.cod_n = c.cod_n AND a.cod_grupo = c.cod_grupo AND ",
" a.cod_tipo = c.cod_tipo AND a.cod_sec = c.cod_sec AND ",
" a.cod_mov = d.cod_mov AND d.consumo = 'SI' AND ",
" a.depto_a IN (SELECT u.departamento_visualiza FROM adtb00056 u WHERE u.usuario = '", usuarios CLIPPED, "') AND ",
" a.depto_a = b.departamento AND a.status_t is NULL AND ",
" a.fecha BETWEEN ? AND ? AND a.cantidad_2 < 0 AND ",
criterio CLIPPED,
" ORDER BY a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec"
ELSE
LET selec =
"SELECT 'REPUESTOS',a.sec_a as departamento,b.nom_dpto,a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec, ",
" c.descrip_esp,c.unidad_med,a.fecha,a.num_doc,cast(d.cod_mov as char(5))+'-'+d.descrip_mov, a.cantidad_2*-1 ",
"FROM irtb00006 a,adtb00001 b,irtb00002 c,irtb00005 d ",
"WHERE a.cod_n = c.cod_n AND a.cod_grupo = c.cod_grupo AND ",
" a.cod_tipo = c.cod_tipo AND a.cod_sec = c.cod_sec AND ",
" a.cod_mov = d.cod_mov AND d.consumo = 'SI' AND ",
" a.sec_a = ", departamento, " and ",
" a.sec_a = b.departamento AND a.status_t is NULL AND ",
" a.fecha BETWEEN ? AND ? AND a.cantidad_2 < 0 AND ",
criterio CLIPPED ,
" UNION ",
"SELECT 'MAT PRIMA', a.depto_a as departamento,b.nom_dpto,a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec, ",
" c.descrip_esp,c.unidad_med,a.fecha,a.num_doc,cast(d.cod_mov as char(5))+'-'+d.descrip_mov, a.cantidad_2*-1 ",
"FROM intb00006 a,adtb00001 b,intb00001 c,intb00005 d ",
"WHERE a.cod_n = c.cod_n AND a.cod_grupo = c.cod_grupo AND ",
" a.cod_tipo = c.cod_tipo AND a.cod_sec = c.cod_sec AND ",
" a.cod_mov = d.cod_mov AND d.consumo = 'SI' AND ",
" a.depto_a = ", departamento, " and ",
" a.depto_a = b.departamento AND a.status_t is NULL AND ",
" a.fecha BETWEEN ? AND ? AND a.cantidad_2 < 0 AND ",
criterio CLIPPED,
" ORDER BY a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec"
END IF
DISPLAY "<< Buscando Informacion ... Espere Por Favor. >>"
AT 17,14 ATTRIBUTE (REVERSE,BOLD)
LET selec1 =
"SELECT COUNT(*) ",
"FROM irtb00006 a,adtb00001 b,irtb00002 c ",
"WHERE a.cod_n = c.cod_n AND a.cod_grupo = c.cod_grupo AND ",
" a.cod_tipo = c.cod_tipo AND a.cod_sec = c.cod_sec AND ",
" a.sec_a = b.departamento AND a.status_t is NULL AND ",
" a.fecha BETWEEN ? AND ? AND a.cantidad_2 <0 AND ",
criterio clipped
# PREPARE comando1 FROM selec1
# DECLARE busca1 CURSOR FOR comando1
# OPEN busca1 USING fecha1,fecha2
# FETCH busca1 INTO regi
PREPARE busca FROM selec
DECLARE accion CURSOR FOR busca
OPEN accion USING fecha1,fecha2,fecha1,fecha2
LET idx = 1
LET p_param = "S"
FOREACH accion INTO cons_maq.*
IF idx =1 THEN
LET r_filename = 'irprrp043.4rp'
IF fgl_report_loadCurrentSettings(r_filename) THEN
LET preview = 1
CALL seleccionarsalida() RETURNING r_output -- load the .4rp file
CALL fgl_report_selectDevice(r_output) -- changing default
CALL fgl_report_selectPreview(preview) -- changing default
CALL fgl_report_configurexlsxdevice(null,null,null,false,false,null,1)
LET handler = fgl_report_commitCurrentSettings() -- commit changes
START REPORT rep_consu TO XML HANDLER HANDLER
END IF
END IF
LET idx = idx +1
# CALL termometro(regi,p_param)
LET p_param = "N"
LET cons_maq.codigo = cons_maq.cod_n USING "&",'-',
cons_maq.cod_grupo USING "&&",'-',
cons_maq.cod_tipo USING "&&&",'-',
cons_maq.cod_sec USING "&&&&"
LET cons_maq.costo_st = 0
IF cons_maq.tipoinventario = 'REPUESTOS' THEN
SELECT costo_st INTO cons_maq.costo_st
FROM irtb00013
WHERE cod_n = cons_maq.cod_n AND
cod_grupo = cons_maq.cod_grupo AND
cod_tipo = cons_maq.cod_tipo AND
cod_sec = cons_maq.cod_sec AND
ano = YEAR(cons_maq.fecha) AND
status_t IS NULL
ELSE
SELECT costo_st INTO cons_maq.costo_st
FROM intb00013
WHERE cod_n = cons_maq.cod_n AND
cod_grupo = cons_maq.cod_grupo AND
cod_tipo = cons_maq.cod_tipo AND
cod_sec = cons_maq.cod_sec AND
ano = YEAR(cons_maq.fecha) AND
status_t IS NULL
END IF
LET cons_maq.valor = 0
LET cons_maq.valor = cons_maq.costo_st * cons_maq.cantidad_2
OUTPUT TO REPORT rep_consu(cons_maq.*)
END FOREACH
IF idx > 1 THEN
FINISH REPORT rep_consu
END IF
END FUNCTION
###### Proceso de generacion del reporte.
REPORT rep_consu(x)
DEFINE x RECORD
tipoinventario VARCHAR(50),
maquina LIKE irtb00006.maquina,
nombre LIKE irtb00009.nombre,
cod_n LIKE intb00001.cod_n,
cod_grupo LIKE intb00001.cod_grupo,
cod_tipo LIKE intb00001.cod_tipo,
cod_sec LIKE intb00001.cod_sec,
descrip_esp CHAR(30),
unidad_med CHAR(4),
fecha DATE,
num_doc INT,
descripcion_mov VARCHAR(100),
cantidad_2 LIKE irtb00006.cantidad_2,
codigo CHAR(25),
costo_st LIKE irtb00013.costo_st,
valor DECIMAL(12,2)
END RECORD
DEFINE p RECORD
descrip_esp LIKE intb00001.descrip_esp,
unidad_med LIKE intb00001.unidad_med,
descrip_mov LIKE irtb00005.descrip_mov
END RECORD
DEFINE primera CHAR(1),
hora CHAR(6),
xfecha CHAR(10),
datosFechas VARCHAR(30),
dia,mes smallint,
nom_dia,nom_mes CHAR(10),
total_consumo_co,total_valor_co,total_general,total_valor_mq FLOAT
OUTPUT
LEFT MARGIN 0
ORDER BY x.maquina,x.codigo
###### Formateando la salida de la informacion
FORMAT
PAGE HEADER
LET hora = time
LET dia = WEEKDAY(x.fecha)
LET mes = MONTH(x.fecha)
LET primera = "S"
CALL busca_mes()
LET nom_mes = nombre_mes[mes]
LET dia = dia + 1
CALL busca_dia()
LET nom_dia = nombre_dia[dia]
LET datosFechas = "Del ",fecha1 USING "dd/mm/yyyy", " Al ",
fecha2 USING "dd/mm/yyyy"
BEFORE GROUP OF x.maquina
PRINTX p_companias.nombre,fecha1,fecha2,hora,datosFechas,x.maquina,x.nombre
BEFORE GROUP OF x.codigo
PRINTX x.codigo,x.descrip_esp,x.unidad_med
ON EVERY ROW
LET xfecha = x.fecha USING "dd/mm/yyyy"
PRINTX xfecha, x.cantidad_2, x.costo_st, x.valor ,x.num_doc,x.descripcion_mov
AFTER GROUP OF x.codigo
LET total_consumo_co = GROUP SUM(x.cantidad_2)
LET total_valor_co = GROUP SUM(x.valor)
AFTER GROUP OF x.maquina
LET total_valor_mq= GROUP SUM(x.valor)
PRINTX total_Valor_mq
ON LAST ROW
LET total_General= SUM(x.valor)
END REPORT
##### Igualandon los dias de la semana a la descripcion del mismo
FUNCTION busca_dia()
LET nombre_dia[1] = "Domingo"
LET nombre_dia[2] = "Lunes"
LET nombre_dia[3] = "Martes"
LET nombre_dia[4] = "Miercoles"
LET nombre_dia[5] = "Jueves"
LET nombre_dia[6] = "Viernes"
LET nombre_dia[7] = "Sabado"
END FUNCTION
####### Igualando el numero del mes a la descripcion del mismo
FUNCTION busca_mes()
LET nombre_mes[1] = "Enero"
LET nombre_mes[2] = "Febrero"
LET nombre_mes[3] = "Marzo"
LET nombre_mes[4] = "Abril"
LET nombre_mes[5] = "Mayo"
LET nombre_mes[6] = "Junio"
LET nombre_mes[7] = "Julio"
LET nombre_mes[8] = "Agosto"
LET nombre_mes[9] = "Septiembre"
LET nombre_mes[10] = "Octubre"
LET nombre_mes[11] = "Noviembre"
LET nombre_mes[12] = "Diciembre"
END FUNCTION
+152
View File
@@ -0,0 +1,152 @@
{
======================================================================
PROGRAMA :irprrpcs008
OBJETIVO :DRIVER PARA IMPRIMIR LAS INFORMACIONES DEL CONTEO FISICO
DESARROLADOR :JUAN SOTO
FECHA :26/11/2009
======================================================================
}
REPORT imprime(x,nombre_cia,xalmacen,xseccion,xtramo,xtipo,znumDoc,zcodMov,zdescripMov,ptipo,porigen,jfecha,desglose)
DEFINE kdatos DYNAMIC ARRAY OF RECORD
lado_2 DEC(8,5),
lado_1 DEC(8,5),
lado_3 DEC(8,5),
cantidad FLOAT,
cantidad2 FLOAT,
tono VARCHAR(100),
calidad VARCHAR(100),
xobservacion VARCHAR(200),
id_producto CHAR(25),
seccion INT,
tramo INT
END RECORD
DEFINE x RECORD
cod_n SMALLINT,
cod_grupo SMALLINT,
cod_tipo SMALLINT,
cod_Sec SMALLINT,
descripcion CHAR(100),
unidad_med CHAR(4),
fisico DEC(12,5),
teorico DEC(12,5),
diferencia DEC(12,5),
costo DEC(12,4),
valor1 DEC(12,4),
valor2 DEC(12,4),
almacen SMALLINT,
seccion SMALLINT,
tramo SMALLINT
END RECORD,
nombre_cia CHAR(50),
porigen CHAR(30),
ptipo,pcodigo,xtipo,chtipo CHAR(25),
jfecha DATE,
total_g_material ,total_g_material_libro,ototal_fisico,ototal_teorico,ototal_ajuste,total_teorico,
total_general,total_general1,total_seccion,total_tramo,total_fisico,total_almacen dec(12,2),
xalmacen,xseccion,xtramo,zdescripMov,dseccion,dtramo CHAR(30),
zcodMov,numero_registros,ttotal_registros,stotal_registros,ototal_registros SMALLINT,
znumDoc,i INT,
chfecha CHAR(20),
desglose VARCHAR(2)
ORDER BY nombre_cia,x.almacen,x.seccion,x.tramo,porigen,x.cod_n,
x.cod_grupo,x.cod_tipo,x.cod_Sec
FORMAT
FIRST PAGE HEADER
IF ptipo = "CONTEO" THEN
LET chtipo = "CONTEO FISICO"
END IF
IF ptipo = "INVENTA" THEN
LET chtipo = "INVENTARIO FISICO"
END IF
IF ptipo = "DOC" THEN
LET chtipo = "DOCUMENTO AJUSTE"
END IF
LET total_General = 0
LET total_g_material = 0
LET total_g_material_libro = 0
LET total_fisico = 0
LET total_teorico = 0
BEFORE GROUP OF x.almacen
LET total_almacen = 0
LET numero_registros = 0
BEFORE GROUP OF x.seccion
LET stotal_registros = 0
LET total_Seccion = 0
BEFORE GROUP OF x.tramo
LET total_tramo = 0
LET ttotal_registros = 0
BEFORE GROUP OF porigen
LET ototal_registros = 0
LET ototal_teorico = 0
LET ototal_fisico = 0
LET ototal_ajuste = 0
ON EVERY ROW
LET chfecha = CURRENT YEAR TO MINUTE
LET numero_registros = numero_registros + 1
LET pcodigo = x.cod_n USING "&&&&","-",x.cod_grupo USING "&&&&","-",
x.cod_tipo USING "&&&&","-",x.cod_sec USING "&&&&&&"
LET total_general = total_general + x.valor2 # DIFERENCIA
LET total_general1 = total_general1 + x.valor1 #FISICO
LET total_fisico = total_fisico + x.valor1 # FISICO
LET total_teorico = total_teorico + (x.teorico * x.costo)
LET total_Seccion = x.valor1 + total_Seccion
LET total_tramo = x.valor1 + total_tramo
LET stotal_registros = stotal_registros + 1
LET ttotal_registros = ttotal_registros + 1
LET total_g_material = total_g_material + x.fisico
LET total_g_material_libro = total_g_material_libro + x.teorico
LET ototal_registros = ototal_registros + 1
LET ototal_fisico = ototal_fisico + x.valor1 # FISICO ORIGEN
LET ototal_teorico = ototal_teorico +(x.teorico*x.costo)
LET ototal_ajuste = ototal_ajuste + x.valor2
PRINTX pcodigo,x.*,nombre_cia,total_general,total_general1,xalmacen,xseccion,xtramo,
total_Seccion,total_tramo,numero_registros,
total_g_material,stotal_registros,ttotal_registros,xtipo,znumdoc,zcodMov,zdescripMov,chfecha,
total_teorico,chtipo,ptipo,porigen,ototal_registros,ototal_fisico,ototal_teorico,
ototal_ajuste,total_g_material_libro,jfecha,total_fisico,total_almacen,desglose
#------------------------ DESGLOSE -----------------------------------------------------------------
IF desglose = "SI" THEN
DECLARE busca_desglose CURSOR FOR
SELECT a.lado_1,a.lado_2,a.lado_3,a.cantidad, a.cantidad2,a.tono,a.calidad,
RTRIM(b.descripcion) ||', '|| RTRIM(c.descripcion)
FROM iptb00062 a,intb00010 b,intb00043 c
WHERE a.cod_n = x.cod_n AND
a.cod_grupo = x.cod_grupo AND
a.cod_tipo = x.cod_tipo AND
a.cod_sec = x.cod_sec AND
a.cod_seccion = b.cod_seccion AND
a.bodega = x.almacen AND
a.bodega = b.cod_bodega AND
a.cod_seccion = b.cod_seccion AND
a.cod_tramo = c.cod_tramo AND
b.cod_seccion = c.cod_seccion AND
b.cod_bodega = c.cod_bodega
LET i = 1
FOREACH busca_desglose INTO kdatos[i].lado_1,kdatos[i].lado_2,kdatos[i].lado_3,
kdatos[i].cantidad,kdatos[i].cantidad2,kdatos[i].tono,
kdatos[i].calidad,dseccion,dtramo
PRINT kdatos[i].lado_1,kdatos[i].lado_2,kdatos[i].lado_3,
kdatos[i].cantidad,kdatos[i].cantidad2,kdatos[i].tono,
kdatos[i].calidad,dseccion,dtramo
LET i = i +1
END FOREACH
END IF
END REPORT
+200
View File
@@ -0,0 +1,200 @@
<?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.5cm" RWTopMargin="0.5cm" RWRightMargin="0.5cm" RWBottomMargin="0.5cm">
<report:FormatList>
<report:Format-SVG/>
<report:Format-PDF/>
<report:Format-image/>
</report:FormatList>
</report:Settings>
<report:Data RWDataLocation="irprrpcs008.rdd" RWFglReportName="imprime"/>
<report:Conflicts/>
<rtl:stylesheet>
<PXML>
<rtl:match name="Report" nameConstraint="Report">
<MINIPAGE name="Page Root" width="max" length="min" alignment="center">
<LAYOUTNODE name="Page Header" width="max" length="min" fontSize="12" fontBold="true" layoutDirection="topToBottom" baselineType="leftleft" port="anyPageHeader" floatingBehavior="enclosed">
<LAYOUTNODE name="LayoutNode16" width="min" length="max" alignment="near" layoutDirection="leftToRight" floatingBehavior="enclosed">
<IMAGEBOX name="ImageBox1" length="39.7106" anchorX="0" anchorY="0" url="{{&quot;IMAGENES/LOGO.JPG&quot;}}" intendedResolution="96"/>
<rtl:input-variable name="nombre_cia" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="WordBox47" y="max-13cm" floatingBehavior="enclosed" text="{{nombre_cia.value}}"/>
<rtl:input-variable name="chfecha" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="WordBox35" y="max-3.8cm" alignment="baseline" baselineType="leftleft" text="{{chfecha}}"/>
</LAYOUTNODE>
<LAYOUTNODE name="LayoutNode18" width="min" length="max" layoutDirection="leftToRight" floatingBehavior="enclosed">
<WORDBOX name="WordBox28" y="max-3.8cm" alignment="baseline" baselineType="leftleft" text="Pagina No. "/>
<PAGENOBOX name="PageNoBox1" y="max-1.6cm" alignment="baseline" baselineType="leftleft" textAlignment="right"/>
<rtl:input-variable name="chtipo" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="WordBox10" y="max-13cm" alignment="baseline" baselineType="leftleft" text="{{chtipo.value}}"/>
</LAYOUTNODE>
<LAYOUTNODE name="LayoutNode19" width="max" length="min" alignment="near" floatingBehavior="enclosed">
<rtl:input-variable name="jfecha" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="WordBox46" x="max-13cm" floatingBehavior="enclosed" text="{{&quot;FECHA CONTEO: &quot;+jfecha.value}}"/>
<rtl:input-variable name="xtipo" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="WordBox31" x="max-13cm" alignment="far" baselineType="leftleft" text="{{xtipo}}"/>
</LAYOUTNODE>
<rtl:input-variable name="znumDoc" type="FGLNumeric" expectedLocation="expectedAhead"/>
<LAYOUTNODE name="Layout Node13" rtl:condition="znumDoc&gt;0" width="min" length="max-1cm" layoutDirection="leftToRight">
<rtl:input-variable name="znumDoc" type="FGLNumeric" expectedLocation="expectedAhead"/>
<WORDBOX name="WordBox33" alignment="baseline" baselineType="leftleft" text="{{&quot;NUMERO DOCUMENTO: &quot;+znumDoc.format(&quot;&amp;&amp;&amp;&amp;&amp;&amp;&quot;)}}"/>
<WORDBOX name="WordBox32" width="10" anchorX="1" anchorY="1" alignment="far" baselineType="leftleft" text=""/>
<rtl:input-variable name="zcodMov" type="FGLNumeric" expectedLocation="expectedAhead"/>
<rtl:input-variable name="zdescripMov" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="WordBox34" width="200" alignment="baseline" baselineType="leftleft" text="{{&quot;(&quot;+zcodMov.format(&quot;&amp;&amp;&amp;&quot;)+&quot;)&quot;+zdescripMov}}"/>
</LAYOUTNODE>
<MINIPAGE name="SPAGEHEADER" width="565.809" length="60" alignment="baseline" bgColor="#f3f3b6" fontSize="9" floatingBehavior="free">
<WORDBOX name="CODIGO" y="20.0697" alignment="baseline" baselineType="leftleft" text="CODIGOS"/>
<WORDBOX name="DESCRIPCION" x="118.44" y="20" alignment="baseline" baselineType="leftleft" text="DESCRIPCION"/>
<WORDBOX name="FISICO" x="267.672" y="20.6547" alignment="baseline" baselineType="leftleft" text="FISICO"/>
<WORDBOX name="TEORICO" x="305.281" y="20.6547" width="32.5281" alignment="baseline" baselineType="leftleft" text="LIBRO"/>
<WORDBOX name="DIFERENCIA" x="342.431" y="20.4951" alignment="baseline" baselineType="leftleft" text="DIFERENCIA"/>
<WORDBOX name="WordBox19" x="410.034" y="20.6547" anchorX="0" anchorY="0" alignment="baseline" baselineType="leftleft" text="COSTO STD"/>
<WORDWRAPBOX name="VALORDIF" x="515.947" y="21.1408" width="51.9209" length="10.1607" anchorX="0" anchorY="0" alignment="baseline" baselineType="leftleft" text="VALOR DIF"/>
<WORDWRAPBOX name="WordWrapBox5" x="473.513" y="20.7211" width="43.64" length="24.9303" alignment="baseline" baselineType="leftleft" text=" VALOR LIBRO"/>
<MINIPAGE name="RAYA1" width=".1cm" length="max" alignment="far" bgColor="#0d0d0d" fontBold="true" layoutDirection="leftToRight" baselineType="leftleft" hidePageFooterOnLastPage="true"/>
<LAYOUTNODE name="Layout Node4" y="1.9cm" width="min" length="min">
<MINIPAGE name="RAYA2" x="0.397127" y="2.84528" width=".1cm" length="max" anchorX="0.000701874" anchorY="1" alignment="baseline" bgColor="#0d0d0d" fontBold="true" layoutDirection="leftToRight" baselineType="leftleft" hidePageFooterOnLastPage="true"/>
</LAYOUTNODE>
</MINIPAGE>
</LAYOUTNODE>
<rtl:match name="Group nombre_cia" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<rtl:match name="Group almacen" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="ALMACEN" width="max-1cm" length="20" alignment="baseline" fontSize="10">
<LAYOUTNODE name="Layout Node4_1" width="max-2cm" length="min">
<rtl:input-variable name="xalmacen" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="xalmacen Value" x="4.83163" y="7.5708" alignment="baseline" fontBold="true" baselineType="leftleft" text="{{xalmacen}}"/>
<WORDBOX name="WordBox32_1" alignment="baseline" baselineType="leftleft" text=" "/>
</LAYOUTNODE>
<rtl:match name="Group seccion" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="SECCION" width="max-1cm" length="20" alignment="near" fontSize="10">
<LAYOUTNODE name="Layout Node5" width="max-2cm" length="min">
<rtl:input-variable name="xseccion" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="xseccion Value" x="7.22956" y="6.989" anchorX="0" anchorY="0" alignment="baseline" fontBold="true" baselineType="leftleft" text="{{xseccion}}"/>
<WORDBOX name="WordBox33_1" alignment="baseline" baselineType="leftleft" text=" "/>
</LAYOUTNODE>
<MINIPAGE name="TRAMO" width="max-1cm" length="20" alignment="near" fontSize="10">
<LAYOUTNODE name="Layout Node6" width="max-2cm" length="min">
<rtl:input-variable name="xtramo" type="FGLString" expectedLocation="expectedAhead"/>
<WORDBOX name="xtramo Value" x="10" y="10" anchorX="0" anchorY="0" alignment="baseline" fontItalic="true" baselineType="leftleft" text="{{xtramo}}"/>
<WORDBOX name="WordBox34_1" alignment="baseline" baselineType="leftleft" text=" "/>
</LAYOUTNODE>
<rtl:match name="Group tramo" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<rtl:match name="Group porigen" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<rtl:match name="Group cod_n" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<rtl:match name="Group cod_grupo" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<rtl:match name="Group cod_tipo" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<rtl:match name="Group cod_Sec" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
<MINIPAGE name="Table Row" width="max" length="max" alignment="baseline" fontSize="8" layoutDirection="topToBottom">
<rtl:input-variable name="x.descripcion" type="FGLString" expectedLocation="expectedHere"/>
<WORDWRAPBOX name="x.descripcion Value" x="40" y="10.32" width="width(&quot;M&quot;)*25" anchorX="0" anchorY="0" alignment="baseline" baselineType="leftleft" text="{{x.descripcion}}"/>
<rtl:input-variable name="x.unidad_med" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="x.unidad_med Value" x="225" y="10.32" anchorX="0" anchorY="0" alignment="baseline" baselineType="leftleft" text="{{x.unidad_med}}"/>
<rtl:input-variable name="x.fisico" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.fisico Value" x="300" y="10.32" anchorX="1" anchorY="0" alignment="baseline" baselineType="leftleft" textAlignment="right" format="###,###,##&amp;.&amp;&amp;" value="{{x.fisico}}"/>
<rtl:input-variable name="x.teorico" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.teorico Value" x="350" y="10.32" anchorX="1" anchorY="0" alignment="baseline" baselineType="leftleft" textAlignment="right" format="(((,(((,(#&amp;.&amp;&amp;)" value="{{x.teorico}}"/>
<rtl:input-variable name="x.diferencia" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.diferencia Value" x="405.829" y="9.48235" anchorX="1" anchorY="0" alignment="baseline" color="{{x.diferencia&lt;0?Color.RED:Color.BLACK}}" baselineType="leftleft" textAlignment="right" format="(((,(#&amp;.&amp;&amp;)" value="{{x.diferencia}}"/>
<rtl:input-variable name="x.valor2" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.valor2 Value" x="565.239" y="9.03974" anchorX="1" anchorY="0" alignment="baseline" color="{{x.valor2&lt;0?Color.RED:Color.BLACK}}" baselineType="leftleft" textAlignment="right" format="(((,(((,(#&amp;.&amp;&amp;)" value="{{x.valor2}}"/>
<rtl:input-variable name="x.valor1" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.valor1 Value" x="513.255" y="9.87832" anchorX="1" anchorY="0" alignment="baseline" baselineType="leftleft" textAlignment="right" format="(((,(((,((&amp;.&amp;&amp;)" value="{{x.valor1}}"/>
<rtl:input-variable name="pcodigo" type="FGLString" expectedLocation="expectedHere"/>
<WORDBOX name="pcodigo Value" x="3.50196" y="10.32" anchorX="0" anchorY="0" alignment="baseline" fontSize="8" baselineType="leftleft" text="{{pcodigo}}"/>
<rtl:input-variable name="x.costo" type="FGLNumeric" expectedLocation="expectedHere"/>
<DECIMALFORMATBOX name="x.costo Value" x="463.38" y="10.32" anchorX="1" anchorY="0" alignment="baseline" baselineType="leftleft" textAlignment="right" format="###,###,##&amp;.&amp;&amp;" value="{{x.costo}}"/>
</MINIPAGE>
<rtl:match name="If" nameConstraint="If" minOccurs="1" maxOccurs="1">
<rtl:match name="IfThen" nameConstraint="IfThen" minOccurs="0" maxOccurs="1">
<rtl:match name="Foreach" nameConstraint="Foreach" minOccurs="1" maxOccurs="1">
<rtl:match name="ForeachItem" nameConstraint="ForeachItem" minOccurs="0" maxOccurs="unbounded"/>
</rtl:match>
</rtl:match>
</rtl:match>
</rtl:match>
</rtl:match>
</rtl:match>
</rtl:match>
</rtl:match>
</rtl:match>
<rtl:input-variable name="chtipo" type="FGLString" expectedLocation="expectedBefore"/>
<MINIPAGE name="TOTALTRAMO" rtl:condition="chtipo==&quot;CONTEO&quot;" width="max-1cm" length="min" alignment="near" fontSize="9" layoutDirection="topToBottom">
<WORDBOX name="SPACIO" length="1cm" alignment="baseline" baselineType="leftleft" text=" "/>
<LAYOUTNODE name="Layout Node12" width="min" length="min" layoutDirection="leftToRight">
<rtl:input-variable name="xtramo" type="FGLString" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox25" width="200" alignment="baseline" baselineType="leftleft" text="{{&quot;TOTAL &quot;+xtramo}}"/>
<rtl:input-variable name="total_tramo" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox26" alignment="baseline" baselineType="leftleft" text="{{total_tramo.format(&quot;(((,((#.##)&quot;)}}"/>
</LAYOUTNODE>
<LAYOUTNODE name="Layout Node9" width="min" length="min" layoutDirection="leftToRight">
<WORDBOX name="WordBox17" width="200" alignment="baseline" baselineType="leftleft" text="TOTAL REGISTROS"/>
<rtl:input-variable name="ttotal_registros" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox20" alignment="baseline" baselineType="leftleft" text="{{ttotal_registros.format(&quot;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&quot;)}}"/>
</LAYOUTNODE>
</MINIPAGE>
</rtl:match>
</MINIPAGE>
</MINIPAGE>
<MINIPAGE name="TOTALSECCION" width="max-1cm" length="min" fontSize="9" layoutDirection="topToBottom">
<LAYOUTNODE name="Layout Node8" width="min" length="min" layoutDirection="leftToRight">
<rtl:input-variable name="xseccion" type="FGLString" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox16" width="200" alignment="baseline" baselineType="leftleft" text="{{&quot;TOTAL &quot;+xseccion}}"/>
<rtl:input-variable name="total_seccion" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox19_1" alignment="baseline" baselineType="leftleft" text="{{total_seccion.format(&quot;(((,((#.##)&quot;)}}"/>
</LAYOUTNODE>
<LAYOUTNODE name="Layout Node11" width="min" length="min" layoutDirection="leftToRight">
<WORDBOX name="WordBox23" width="200" alignment="baseline" baselineType="leftleft" text="TOTAL REGISTROS"/>
<rtl:input-variable name="stotal_registros" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox24" alignment="baseline" baselineType="leftleft" text="{{stotal_registros.format(&quot;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&quot;)}}"/>
</LAYOUTNODE>
</MINIPAGE>
</rtl:match>
</MINIPAGE>
<MINIPAGE name="TOTALALMACEN" width="max-1cm" length="min" fontSize="9" layoutDirection="topToBottom">
<LAYOUTNODE name="Layout Node7" width="min" length="min" layoutDirection="leftToRight">
<rtl:input-variable name="xalmacen" type="FGLString" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox15" width="200" alignment="baseline" baselineType="leftleft" text="{{&quot;TOTAL &quot;+xalmacen}}"/>
<rtl:input-variable name="total_general1" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox18" alignment="baseline" baselineType="leftleft" text="{{total_general1.format(&quot;(((,((#.##)&quot;)}}"/>
</LAYOUTNODE>
<LAYOUTNODE name="Layout Node10" width="min" length="min" layoutDirection="leftToRight">
<WORDBOX name="WordBox21" width="200" alignment="baseline" baselineType="leftleft" text="{{&quot;TOTAL REGISTROS &quot;}}"/>
<rtl:input-variable name="numero_registros" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox22" alignment="baseline" baselineType="leftleft" text="{{numero_registros.format(&quot;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&quot;)}}"/>
</LAYOUTNODE>
</MINIPAGE>
</rtl:match>
<LAYOUTNODE name="TOTALGENERAL" width="min" length="max" anchorX="0" anchorY="0.5" alignment="baseline" fontSize="9" fontBold="true" layoutDirection="topToBottom" baselineType="leftleft">
<LAYOUTNODE name="Layout Node16" width="max-.8cm" length="min">
<MINIPAGE name="RAYA1_1" width=".1cm" length="max" alignment="near" bgColor="#0d0d0d" fontBold="true" layoutDirection="leftToRight" baselineType="leftleft" hidePageFooterOnLastPage="true"/>
</LAYOUTNODE>
<LAYOUTNODE name="Layout Node14" width="min" length="min" fontSize="12" layoutDirection="leftToRight">
<MINIPAGE name="MiniPage14" width="min" length="min">
<WORDBOX name="WordBox37" alignment="baseline" baselineType="leftleft" text="TOTAL FISICO"/>
<WORDBOX name="WordBox38" alignment="baseline" baselineType="leftleft" text="TOTAL TEORICO"/>
<WORDBOX name="WordBox39" alignment="baseline" baselineType="leftleft" text="TOTAL AJUSTE"/>
<WORDBOX name="WordBox41" alignment="baseline" baselineType="leftleft" text="TOTAL M. FISICO"/>
<WORDBOX name="WordBox43" alignment="baseline" baselineType="leftleft" text="TOTAL M. LIBRO"/>
</MINIPAGE>
<MINIPAGE name="MiniPage15" width="min" length="min" alignment="near"/>
<MINIPAGE name="MiniPage16" width="min" length="min">
<rtl:input-variable name="total_fisico" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox40" alignment="baseline" baselineType="leftleft" text="{{total_fisico.format(&quot;(,(((,(((,((&amp;.##)&quot;)}}"/>
<rtl:input-variable name="total_teorico" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox41_1" alignment="baseline" baselineType="leftleft" text="{{total_teorico.format(&quot;(,(((,(((,((&amp;.##)&quot;)}}"/>
<rtl:input-variable name="total_general" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox42" alignment="baseline" baselineType="leftleft" text="{{total_general.format(&quot;((,(((,((&amp;.##)&quot;)}}"/>
<rtl:input-variable name="total_g_material" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox43_1" alignment="baseline" baselineType="leftleft" text="{{total_g_material.format(&quot;(((,(((,(##.##)&quot;)}}"/>
<rtl:input-variable name="total_g_material_libro" type="FGLNumeric" expectedLocation="expectedBefore"/>
<WORDBOX name="WordBox44" alignment="baseline" baselineType="leftleft" text="{{total_g_material_libro.format(&quot;(((,(((,(##.##)&quot;)}}"/>
</MINIPAGE>
</LAYOUTNODE>
</LAYOUTNODE>
</rtl:match>
</MINIPAGE>
</rtl:match>
</PXML>
</rtl:stylesheet>
</report:Report>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+305
View File
@@ -0,0 +1,305 @@
OPTIONS SHORT CIRCUIT
IMPORT util
IMPORT com
FUNCTION apiclient(pemail)
DEFINE data_apilayer RECORD
email,did_you_mean,USER,domain,syntax_valid STRING,
is_disposable,is_role_account,is_catch_all,is_deliverable,can_connect_smtp,
is_inbox_full,is_disabled,mx_records,FREE,score BOOLEAN
END RECORD
DEFINE data RECORD
data RECORD
status ,
result,
deprecation_notice string,
score smallint,
email string,
regexp,
gibberish,
disposable,
webmail,
mx_records,
smtp_server,
smtp_check,
accept_all,
block BOOLEAN
END RECORD,
source DYNAMIC ARRAY OF STRING,
meta RECORD
param STRING
END RECORD
END RECORD
DEFINE data_ipq RECORD
MESSAGE STRING,
success,
valid,
disposable BOOLEAN,
smtp_score ,
overall_score DEC(10,2),
first_name string,
generic,
common,
dns_valid,
honeypot BOOLEAN,
deliverability STRING,
frequent_complainer BOOLEAN,
spam_trap_score STRING,
catch_all,
timed_out,
suspect,
recent_abuse BOOLEAN,
fraud_score DEC(10,2),
suggested_domain string,
leaked BOOLEAN
END RECORD
DEFINE estado,purl,cmd,res, msg,s,pemail,tiposervice STRING,
ret INT
# LA API PARA VERIFICAR ESTA OFFLINE 29/05/2025
{ LET estado = 'VALIDO'
LET ret = 200
RETURN estado,ret
}
# SE DEVUELVE SI EL EMAIL ESTA EN BLANCO
IF pemail IS NULL THEN
LET ret = 400
LET estado = 'DEBES DIGITAR EL EMAIL POR FAVOR'
RETURN estado,ret
END IF
DISPLAY "llego: ",pemail
# ELECCION DE SERVICIOS, POR EL MOMENTO ES IPQUALITY
SELECT a.IDENTIFICACION INTO tiposervice FROM APIS a
WHERE a.estado = 'ONLINE'
IF STATUS = NOTFOUND THEN
RETURN estado,ret
END IF
# LET tiposervice = 'ipq1'
IF tiposervice = 'HUNTER' THEN
LET purl = "https://api.hunter.io/v2/email-verifier?email=",pemail CLIPPED,"&api_key=2a50343f3a2842b082ee2c4b3ecccaf4ae5a7766"
CALL ipquality_send_command(purl) RETURNING ret,res
DISPLAY "response api: ",res," longitud: ",res.getLength()
IF res.getLength() =0 THEN
INSERT INTO envia_email_log (email,estado,fecha,programa_envio,us_crea,score)
VALUES (pemail,data.data.status,getdate(),'mt101_hunter',suser_Sname(),data.data.score)
LET ret = 400
LET estado = 'NO SE PUEDE ENTREGAR MENSAJE A ESTA DIRECCION EMAIL'
RETURN estado,ret
END IF
TRY
CALL util.JSON.parse(res,data)
CATCH
LET ret = 400
LET estado = 'NO SE PUEDE ENTREGAR MENSAJE A ESTA DIRECCION EMAIL'
RETURN estado,ret
END TRY
# INSERT INTO envia_email_log (email,estado,fecha,programa_envio,us_crea,score)
# VALUES (pemail,data.data.status,getdate(),'forzado',suser_Sname(),data.data.score)
# LET estado = 'VALIDO'
# LET ret = 200
# RETURN estado,ret
LET s = util.JSON.stringify(res)
DISPLAY "DATA EMAIL: ",pemail CLIPPED, " score: ",data.data.score
INSERT INTO envia_email_log (email,estado,fecha,programa_envio,us_crea,score)
VALUES (pemail,data.data.status,getdate(),'mt101_hunter',suser_Sname(),data.data.score)
IF ret ==0 THEN
IF data.data.mx_records = TRUE THEN
LET estado = 'VALIDO'
LET ret = 200
RETURN estado,ret
ELSE
LET estado = 'NO SE PUEDE ENTREGAR MENSAJE A ESTA DIRECCION EMAIL'
LET ret = 400
RETURN estado,ret
END IF
IF data.data.smtp_server = TRUE THEN
LET estado = 'VALIDO'
LET ret = 200
RETURN estado,ret
ELSE
LET estado = 'NO SE PUEDE ENTREGAR MENSAJE A ESTA DIRECCION EMAIL'
LET ret = 400
RETURN estado,ret
END IF
IF data.data.regexp = TRUE THEN
LET estado = 'VALIDO'
LET ret = 200
RETURN estado,ret
ELSE
LET estado = 'NO SE PUEDE ENTREGAR MENSAJE A ESTA DIRECCION EMAIL'
LET ret = 400
RETURN estado,ret
END IF
IF data.data.disposable = TRUE THEN
LET estado = 'NO SE PUEDE ENTREGAR MENSAJE A ESTA DIRECCION EMAIL'
LET ret = 400
RETURN estado,ret
ELSE
LET estado = 'VALIDO'
LET ret = 200
RETURN estado,ret
END IF
IF (data.data.status = 'valid' OR data.data.status = 'accept_all' OR
data.data.status = 'unknown') AND data.data.score > 29 THEN
LET estado = 'VALIDO'
LET ret = 200
RETURN estado,ret
ELSE
LET ret = 400
LET estado = 'NO SE PUEDE ENTREGAR MENSAJE A ESTA DIRECCION EMAIL'
RETURN estado,ret
END IF
END IF
END IF
IF tiposervice = 'IPQUALITY' THEN
LET purl = 'https://ipqualityscore.com/api/json/email/cHZNnfXkbJDtx43YcrQqHSjXzBrndwT3/',pemail CLIPPED
CALL ipquality_send_command(purl) RETURNING ret,res
IF ret ==0 THEN
LET s = util.JSON.stringify(res)
CALL util.JSON.parse(res,data_ipq)
IF data_ipq.valid THEN
LET estado = 'VALIDO'
LET ret = 200
ELSE
LET ret = 400
LET estado = 'NO SE PUEDE ENTREGAR MENSAJE A ESTA DIRECCION EMAIL'
END IF
END IF
END IF
IF tiposervice = 'APILAYER' THEN
# DISPLAY " ESTOY EN APILAYER"
LET purl= "https://api.apilayer.com/email_verification/",pemail CLIPPED
CALL apilayer_send_command(purl, cmd) RETURNING ret, res
# DISPLAY "res ",res," ",ret
IF ret ==0 THEN
LET s = util.JSON.stringify(res)
CALL util.JSON.parse(res,data_apilayer)
IF data_apilayer.can_connect_smtp THEN
LET estado = 'VALIDO'
LET ret = 200
ELSE
LET ret = 400
LET estado = 'NO SE PUEDE ENTREGAR MENSAJE A ESTA DIRECCION EMAIL'
END IF
# DISPLAY "sintax ",data.syntax_valid," deliv ",data.is_deliverable
ELSE
IF ret = 429 THEN
LET ret = 200
LET estado ='VALIDO POR EXESO DE REQUEST'
ELSE
LET ret = 400
LET estado = 'NO FUE POSIBLE LA CONEXION, '
END IF
END IF
END IF
# LET ret = 200
DISPLAY "en return ",estado," ",ret
RETURN estado,ret
END FUNCTION
#
## Communications library using com (http or https)
#
FUNCTION apilayer_send_command(url, cmd)
DEFINE url, cmd STRING
DEFINE result, tmp STRING
DEFINE http_req com.HTTPRequest
DEFINE http_resp com.HTTPResponse
TRY
UPDATE apis SET cuenta = cuenta + 1 WHERE estado = 'ONLINE'
LET http_req = com.HTTPRequest.Create(url)
CALL http_req.setHeader("api_key","2a50343f3a2842b082ee2c4b3ecccaf4ae5a7766")
CALL http_req.doRequest()
LET http_resp=http_req.getResponse()
IF http_resp.getStatusCode() != 200 THEN
RETURN http_resp.getStatusCode(), http_resp.getStatusDescription()
END IF
LET tmp = http_resp.getStatusDescription()
IF (tmp == "OK" || tmp == "no error" ) THEN
RETURN -1, SFMT("HTTP request status description: %1 ",tmp)
END IF
LET result = http_resp.getTextResponse()
CATCH
RETURN -2, SFMT("HTTP request error: STATUS=%1 (%2)",STATUS,SQLCA.sqlerrd[2])
END TRY
RETURN 0, result
END FUNCTION
FUNCTION ipquality_send_command(url)
DEFINE url, cmd STRING
DEFINE result, tmp STRING
DEFINE http_req com.HTTPRequest
DEFINE http_resp com.HTTPResponse
DISPLAY "url", url
TRY
LET http_req = com.HTTPRequest.Create(url)
CALL http_req.setHeader("apikey","cHZNnfXkbJDtx43YcrQqHSjXzBrndwT3")
CALL http_req.doRequest()
LET http_resp=http_req.getResponse()
IF http_resp.getStatusCode() != 200 THEN
RETURN http_resp.getStatusCode(), http_resp.getStatusDescription()
END IF
LET tmp = http_resp.getStatusDescription()
IF (tmp == "OK" || tmp == "no error" ) THEN
RETURN -1, SFMT("HTTP request status description: %1 ",tmp)
END IF
LET result = http_resp.getTextResponse()
CATCH
RETURN -2, SFMT("HTTP request error: STATUS=%1 (%2)",STATUS,SQLCA.sqlerrd[2])
END TRY
RETURN 0, result
END FUNCTION
+149
View File
@@ -0,0 +1,149 @@
{
FUNCION : costoLiquidacion
OBJETIVO : Determinar el costo unitario que debe tener un producto terminado
o un repuesto para valorizar el asiento de inventario en linea,
de acuerdo a la liquidacion de mercancia (cttb00013) o al costo
estandard. Centraliza el criterio de costeo que antes aplicaba
el usuario de forma manual.
DESARROLLADO : Equipo Tecnologia (Juan Soto)
FECHA : 14 Septiembre 2026
REGLA DE COSTO (definida por el usuario):
- Repuestos (ptipoInv = 'R'):
Siempre costo estandard irtb00013.costo_st (ano del documento, mes_fin = 12).
- Terminados (ptipoInv = 'P'):
* iptb00002.es_produccion = TRUE -> SIEMPRE costo estandard iptb00004
(material + labor + gastos, mes_fin = 12).
* es_produccion = FALSE (compra/venta):
- Se busca la ULTIMA liquidacion DEL MES del documento en cttb00013.
(Solo el mes: si la liquidacion fue en un mes anterior, lqprrp004
ya actualizo el costo estandard, por lo que ese ya lo refleja.)
- Si hay liquidacion del mes Y su cantidad liquidada > existencia actual
(SUM iptb00006.cantidad_2 WHERE status_t IS NULL) -> costo_lq.
- En caso contrario (existencia >= liquidada, o no hay liquidacion
del mes) -> costo estandard iptb00004.
NOTA: usa nombres calificados marmotech.dbo.* igual que GeneraEntradaDiario.4gl y
controlNumericoED.4gl, para leer siempre la BD correcta sin depender de la
conexion del programa llamador.
}
FUNCTION costoLiquidacion(pcod_n, pcod_grupo, pcod_tipo, pcod_sec, pfecha, ptipoInv)
DEFINE
pcod_n, pcod_grupo, pcod_tipo, pcod_sec INT,
pfecha DATE,
ptipoInv CHAR(1),
costo DEC(18, 4),
costo_std DEC(18, 4),
xcosto_lq DEC(18, 4),
cant_lq DEC(18, 4),
existencia DEC(18, 4),
es_prod SMALLINT,
qsql STRING
LET costo = 0
LET costo_std = 0
LET xcosto_lq = 0
LET cant_lq = 0
LET existencia = 0
LET es_prod = 0
#-------------------------------------------------------------------------
# REPUESTOS -> costo estandard irtb00013.costo_st
#-------------------------------------------------------------------------
IF ptipoInv = 'R' THEN
LET qsql =
"SELECT ISNULL(a.costo_st,0)
FROM marmotech.dbo.irtb00013 a
WHERE a.cod_n = ? AND a.cod_grupo = ? AND a.cod_tipo = ? AND a.cod_sec = ?
AND a.ano = YEAR(?) AND a.mes_fin = 12 AND a.status_t IS NULL"
PREPARE sc_rep FROM qsql
EXECUTE sc_rep INTO costo
USING pcod_n, pcod_grupo, pcod_tipo, pcod_sec, pfecha
FREE sc_rep
IF costo IS NULL THEN
LET costo = 0
END IF
RETURN costo
END IF
#-------------------------------------------------------------------------
# TERMINADOS -> costo estandard iptb00004 (material + labor + gastos)
# Se calcula siempre porque es el respaldo y el valor para es_produccion.
#-------------------------------------------------------------------------
LET qsql =
"SELECT ISNULL(AVG(ISNULL(a.material,0)+ISNULL(a.labor,0)+ISNULL(a.gastos,0)),0)
FROM marmotech.dbo.iptb00004 a
WHERE a.cod_n = ? AND a.cod_grupo = ? AND a.cod_tipo = ? AND a.cod_sec = ?
AND a.ano = YEAR(?) AND a.mes_fin = 12 AND a.status_t IS NULL"
PREPARE sc_std FROM qsql
EXECUTE sc_std INTO costo_std
USING pcod_n, pcod_grupo, pcod_tipo, pcod_sec, pfecha
FREE sc_std
IF costo_std IS NULL THEN
LET costo_std = 0
END IF
# es_produccion del articulo
LET qsql =
"SELECT TOP 1 ISNULL(a.es_produccion,0)
FROM marmotech.dbo.iptb00002 a
WHERE a.cod_n = ? AND a.cod_grupo = ? AND a.cod_tipo = ? AND a.cod_sec = ?"
PREPARE sc_esp FROM qsql
EXECUTE sc_esp INTO es_prod
USING pcod_n, pcod_grupo, pcod_tipo, pcod_sec
FREE sc_esp
IF es_prod IS NULL THEN
LET es_prod = 0
END IF
# Producto de produccion -> siempre estandard
IF es_prod = 1 THEN
RETURN costo_std
END IF
#-------------------------------------------------------------------------
# COMPRA/VENTA -> ultima liquidacion DEL MES vs existencia
#-------------------------------------------------------------------------
LET qsql =
"SELECT TOP 1 ISNULL(a.costo_lq,0), ISNULL(a.cantidad,0)
FROM marmotech.dbo.cttb00013 a
WHERE a.cod_n = ? AND a.cod_grupo = ? AND a.cod_tipo = ? AND a.cod_sec = ?
AND YEAR(a.fecha_lq) = YEAR(?) AND MONTH(a.fecha_lq) = MONTH(?)
AND a.fecha_lq <= ?
AND a.status_t IS NULL
ORDER BY a.fecha_lq DESC, a.fech_crea DESC"
PREPARE sc_lq FROM qsql
EXECUTE sc_lq INTO xcosto_lq, cant_lq
USING pcod_n, pcod_grupo, pcod_tipo, pcod_sec, pfecha, pfecha, pfecha
FREE sc_lq
# No hay liquidacion en el mes -> estandard
IF STATUS = NOTFOUND OR xcosto_lq IS NULL THEN
RETURN costo_std
END IF
# Existencia actual del articulo (solo movimientos vigentes)
LET qsql =
"SELECT ISNULL(SUM(a.cantidad_2),0)
FROM marmotech.dbo.iptb00006 a
WHERE a.cod_n = ? AND a.cod_grupo = ? AND a.cod_tipo = ? AND a.cod_sec = ?
AND a.status_t IS NULL"
PREPARE sc_exi FROM qsql
EXECUTE sc_exi INTO existencia
USING pcod_n, pcod_grupo, pcod_tipo, pcod_sec
FREE sc_exi
IF existencia IS NULL THEN
LET existencia = 0
END IF
# Cantidad liquidada mayor que la existencia -> costo liquidado
IF cant_lq > existencia THEN
RETURN xcosto_lq
END IF
# Existencia mayor o igual -> costo estandard
RETURN costo_std
END FUNCTION
+19
View File
@@ -0,0 +1,19 @@
FUNCTION cuentas()
DEFINE kcuenta VARCHAR(14),
kdescripcion CHAR(60),
cuentas ui.ComboBox
LET cuentas = ui.combobox.forname("formonly.xcuenta")
DECLARE busca_cuenta CURSOR FOR
SELECT RTRIM(a.cuenta_no),RTRIM(a.descripcion)+'('+RTRIM(a.cuenta_no)+')'
FROM cgtb00001 a
WHERE a.nivel > 2 AND a.cuenta_no LIKE '7%' AND a.status_t IS NULL
ORDER BY a.descripcion
CALL cuentas.clear()
FOREACH busca_cuenta INTO kcuenta,kdescripcion
CALL cuentas.additem(kcuenta,kdescripcion)
END FOREACH
END FUNCTION
+38
View File
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm fileVersion="31400" gstVersion="3140a" name="managedform" uid="{4e91ac7b-8ee9-47ca-94fc-0f0dcdf59e19}">
<AGSettings>
<DynamicProperties version="2"/>
</AGSettings>
<Record name="s_existencia" uid="{f2ea8bb1-febf-40ef-8edc-a834a1a6dc9d}">
<RecordField fieldIdRef="1" name="almacen" uid="{7c966db1-ab91-4323-9bc2-49f632042c0b}"/>
<RecordField fieldIdRef="2" name="fisico" uid="{1f2df6fe-ce62-4cb5-9169-9ea4d0def99b}"/>
</Record>
<Record name="record2" uid="{1f6c696f-6d99-44a6-93ba-f18041035d3d}">
<RecordField fieldIdRef="3" name="producto" uid="{6b3c28df-e79d-40d2-ba7b-5acabd648978}"/>
<RecordField fieldIdRef="4" name="disponible" uid="{51910a5f-9130-4e5f-b175-10b1d2426f1b}"/>
<RecordField fieldIdRef="5" name="pcantidad_ordenes" uid="{3d9bfa9a-5cdf-4f55-82e9-af263960d69f}"/>
<RecordField fieldIdRef="6" name="pcantidadConduce" uid="{22e756b2-846e-4606-971a-46c943cd739b}"/>
<RecordField fieldIdRef="7" name="pexistencia" uid="{3a113657-065d-46ff-8181-a8870c953696}"/>
</Record>
<Form gridHeight="25" gridWidth="80" name="form" text="ORDENES - EXISTENCIAS ALMACENES">
<Grid gridHeight="12" gridWidth="63" name="grid1" posX="3" posY="1">
<Label gridHeight="1" gridWidth="38" justify="center" name="label1" posX="2" posY="1" text="EXISTENCIAS ALMACENES"/>
<Edit fieldId="3" gridHeight="1" gridWidth="38" name="producto" posX="2" posY="2" scroll="true" tabIndex="-1" title="edit1" widget="Edit"/>
<Label gridHeight="1" gridWidth="7" name="label2" posX="2" posY="3" text="Disponible"/>
<Edit fieldId="4" gridHeight="1" gridWidth="10" name="disponible" posX="10" posY="3" tabIndex="-1" title="edit1" widget="Edit"/>
<Label gridHeight="1" gridWidth="7" name="label5" posX="22" posY="3" text="Existencia"/>
<Edit fieldId="7" gridHeight="1" gridWidth="10" name="pexistencia" posX="30" posY="3" tabIndex="-1" title="edit2" widget="Edit"/>
<Label gridHeight="1" gridWidth="7" name="label3" posX="2" posY="4" text="Orden"/>
<Edit fieldId="5" gridHeight="1" gridWidth="10" name="pcantidad_ordenes" posX="10" posY="4" tabIndex="-1" title="edit1" widget="Edit"/>
<Label gridHeight="1" gridWidth="7" name="label4" posX="22" posY="4" text="Conduce"/>
<Edit fieldId="6" gridHeight="1" gridWidth="10" name="pcantidadConduce" posX="30" posY="4" tabIndex="-1" title="edit1" widget="Edit"/>
<Table gridHeight="7" gridWidth="27" name="table1" posX="3" posY="5" totalRows="5">
<Edit fieldId="1" gridHeight="1" gridWidth="8" name="almacen" posX="0" posY="0" scroll="true" tabIndex="-1" title="Almacenes" widget="Edit"/>
<Edit aggregate="true" aggregateName="aggregate1" aggregateSqlType="DECIMAL" aggregateText="Existencia Total" fieldId="2" gridHeight="1" gridWidth="8" name="fisico" posX="8" posY="0" scroll="true" tabIndex="-1" title="Existencia Fisica" unsortable="true" widget="Edit"/>
</Table>
</Grid>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewBmADIAZQBhADgAYgBiADEALQBmAGUAYgBmAC0ANAAwAGUAZgAtADgAZQBkAGMALQBhADgAMwA0AGEAMQBhADYAZABjADkAZAB9AAAAAAAAAAAAAAAAAAAAAD9ok3S8an76AQAAAEwAewAxAGYANgBjADYAOQA2AGYALQA2AGQAOQA5AC0ANAA0AGEANgAtADkAMwBiAGEALQBmADEAOAAwADQAMQAwADMANQBkADMAZAB9QH+mZnZZmZzAQAAABwAAAT9QYk3S8an8AQ==]]>
</DiagramLayout>
</ManagedForm>
+54
View File
@@ -0,0 +1,54 @@
FUNCTION busca_departamento()
DEFINE pdepartamento ui.combobox,
kdepartamento SMALLINT,kdescripcion CHAR(30)
LET pdepartamento = ui.combobox.forname("formonly.departamento")
CALL pdepartamento.clear()
DECLARE pagar CURSOR FOR
SELECT departamento, nom_dpto FROM adtb00001
WHERE status_t is null
ORDER BY nom_dpto
FOREACH pagar INTO kdepartamento,kdescripcion
CALL pdepartamento.additem(kdepartamento,kdescripcion)
END FOREACH
END FUNCTION
{
FUNCTION departamento_user()
DEFINE departamentos_user DYNAMIC ARRAY OF RECORD
departamento INT,
titulo VARCHAR(100)
END RECORD
DECLARE busca_dep CURSOR FOR
SELECT '0',a.departamento,a.nom_dpto,a.tipo_departamento
FROM adtb00001 a WHERE a.status_t IS NULL
ORDER BY a.nom_dpto
LET idx = 1
FOREACH busca_dep INTO arr_departamentos[idx].*
LET idx = idx + 1
END FOREACH
END FUNCTION
}
FUNCTION departamento_user(xuser)
DEFINE pdepartamento ui.combobox,
kdepartamento SMALLINT,kdescripcion CHAR(30),
xuser STRING
LET pdepartamento = ui.combobox.forname("formonly.departamento")
CALL pdepartamento.clear()
DECLARE depto CURSOR FOR
SELECT a.departamento, a.nom_dpto FROM adtb00001 a,adtb00056 b
WHERE a.departamento = b.departamento_visualiza AND
b.usuario = xuser AND
a.status_t is null
ORDER BY nom_dpto
FOREACH depto INTO kdepartamento,kdescripcion
CALL pdepartamento.additem(kdepartamento,kdescripcion)
END FOREACH
END FUNCTION
+42
View File
@@ -0,0 +1,42 @@
FUNCTION maquinas(xdepartamento)
DEFINE
kmaquina VARCHAR(14),
kdescripcion CHAR(75),
maquinas ui.ComboBox,
xdepartamento INT
LET maquinas = ui.combobox.forname("formonly.codigo")
IF xdepartamento = -1 THEN
DECLARE busca_maquinas1 CURSOR FOR
SELECT a.codigo,
RTRIM(a.nombre) + '(' + ISNULL(RTRIM(a.codigo_externo), ' ')
+ ')'
FROM irtb00009 a
WHERE a.status_t IS NULL AND a.codigo_externo IS NOT NULL
ORDER BY a.nombre
CALL maquinas.clear()
FOREACH busca_maquinas1 INTO kmaquina, kdescripcion
CALL maquinas.additem(kmaquina, kdescripcion)
END FOREACH
ELSE
DECLARE busca_maquinas2 CURSOR FOR
SELECT a.codigo,
RTRIM(a.nombre) + '(' + ISNULL(RTRIM(a.codigo_externo), ' ')
+ ')'
FROM irtb00009 a
WHERE a.status_t IS NULL AND a.departamento = xdepartamento
AND a.codigo_externo IS NOT NULL
ORDER BY a.nombre
CALL maquinas.clear()
FOREACH busca_maquinas2 INTO kmaquina, kdescripcion
CALL maquinas.additem(kmaquina, kdescripcion)
END FOREACH
END IF
END FUNCTION
+42
View File
@@ -0,0 +1,42 @@
{
FUNCION : msgmodal
OBJETIVO : Mostrar un mensaje de msgtable en una ventana MODAL.
Complementa a msg(), que lo despliega en la linea de ERROR.
DESARROLLADO : Equipo Tecnologia (Juan Soto)
FECHA : 21 Septiembre 2026
CUANDO USAR CUAL
----------------
msg(n) -> Errores de VALIDACION durante la captura. El usuario esta
parado en el campo, lee el aviso en la linea de ERROR,
corrige y sigue. No interrumpe el flujo.
msgmodal(n) -> Hechos que el usuario NO PUEDE pasar por alto, tipicamente
cuando se ABORTO la transaccion y el documento NO se guardo.
Si eso solo parpadeara en la linea de ERROR mientras la
pantalla se limpia, el usuario se iria creyendo que guardo.
El texto vive en msgtable igual que el de msg(), de modo que se puede
corregir sin recompilar los programas.
}
FUNCTION msgmodal(numero_msg)
DEFINE
numero_msg SMALLINT,
descripcion CHAR(120)
LET descripcion = NULL
SELECT desc_msg
INTO descripcion
FROM msgtable
WHERE cod_msg = numero_msg
IF status = NOTFOUND OR descripcion IS NULL THEN
LET descripcion = "MENSAJE NO DEFINIDO EN MSGTABLE: ",
numero_msg USING "<<<<"
END IF
CALL fgl_winmessage("AVISO", descripcion CLIPPED, "stop")
END FUNCTION
+45
View File
@@ -0,0 +1,45 @@
FUNCTION productos_incluye(tabla1,tabla2,tabla3,tabla4,tabla5,xcriterio,xbodega,xfecha,xseccion,xtramo)
DEFINE tabla1,tabla2,tabla3,tabla4,tabla5,selec,xcriterio STRING,
xbodega,xseccion,xtramo SMALLINT,
xfecha DATE,
xid INT,
xfech_crea DATETIME YEAR TO MINUTE
DEFINE xitems RECORD
cod_n SMALLINT,
cod_grupo SMALLINT,
cod_tipo SMALLINT,
cod_sec SMALLINT
END RECORD
LET xfech_crea = CURRENT
LET selec = "SELECT DISTINCT a.cod_n,a.cod_Grupo,a.cod_tipo,a.cod_sec FROM ",tabla1 CLIPPED," AS a ",
" INNER JOIN ",tabla5 CLIPPED ," AS b ON a.cod_n = b.cod_n AND a.cod_grupo = b.cod_grupo AND ",
" a.cod_tipo = b.cod_tipo AND ",
" a.cod_sec = b.cod_sec AND a.status_t IS NULL AND b.status_t is NULL AND a.control_existencia = 'SI' ",
" WHERE b.bodega = ",xbodega USING "<<<", " and ",xcriterio CLIPPED
PREPARE comando FROM selec
DECLARE busca_item CURSOR FOR comando
LET selec = "SELECT DISTINCT a.cod_n FROM ",tabla3 CLIPPED,
" AS a WHERE a.cod_n = ? AND a.cod_grupo = ? AND a.cod_tipo = ? AND a.cod_sec = ? AND a.fecha = ? AND a.bodega = ?"
PREPARE comando1 FROM selec
LET selec = "INSERT INTO ",tabla3 CLIPPED," (idtrx,fecha,bodega,cod_Seccion,cod_tramo,cod_n,cod_grupo,cod_tipo,cod_Sec,cantidad,us_crea,fech_crea) ",
" VALUES (?,?,?,?,?,?,?,?,?,?,?,?)"
PREPARE inserta FROM selec
LET selec = "SELECT MAX(a.idtrx) FROM ",tabla3 CLIPPED, " AS a WHERE a.fecha =? AND a.bodega =? "
PREPARE busca_max FROM selec
EXECUTE busca_max INTO xid USING xfecha,xbodega
FOREACH busca_item INTO xitems.*
EXECUTE comando1 USING xitems.cod_n,xitems.cod_grupo,xitems.cod_tipo,xitems.cod_sec,xfecha,xbodega
IF STATUS = NOTFOUND THEN
EXECUTE inserta USING xid,xfecha,xbodega,xseccion,xtramo,xitems.cod_n,xitems.cod_grupo,xitems.cod_tipo,
xitems.cod_sec,"0","INCLUYE",xfech_crea
LET xid = xid + 1
END IF
END FOREACH
END FUNCTION
+17
View File
@@ -0,0 +1,17 @@
FUNCTION cseccion(almacen)
DEFINE kcod_seccion,almacen SMALLINT,
kdescripcion CHAR(30),
pseccion ui.ComboBox
LET pseccion = ui.combobox.forname("formonly.seccion")
DECLARE busca_sec CURSOR FOR
SELECT a.cod_seccion,a.descripcion FROM Intb00010 a
WHERE a.cod_bodega = almacen
CALL pseccion.clear()
FOREACH busca_sec INTO kcod_seccion,kdescripcion
CALL pseccion.additem(kcod_seccion,kdescripcion)
END FOREACH
CALL pseccion.additem(99,"TODAS")
END FUNCTION
+18
View File
@@ -0,0 +1,18 @@
FUNCTION ctramo(almacen,seccion)
DEFINE kcod_tramo,almacen,seccion SMALLINT,kdescripcion CHAR(30),
ptramo ui.ComboBox
LET ptramo = ui.combobox.forname("formonly.tramo")
DECLARE busca_tramo CURSOR FOR
SELECT a.cod_tramo,a.descripcion FROM Intb00043 a
WHERE a.cod_bodega = almacen and a.cod_Seccion = seccion
CALL ptramo.clear()
FOREACH busca_tramo INTO kcod_tramo,kdescripcion
DISPLAY "tramos ",kcod_tramo,kdescripcion," ",almacen," ",seccion
CALL ptramo.additem(kcod_tramo,kdescripcion)
END FOREACH
CALL ptramo.additem(99,"TODOS")
END FUNCTION
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
<StyleList>
<Style name="Window.basic">
<StyleAttribute name="actionPanelPosition" value="none" />
<StyleAttribute name="ringMenuPosition" value="none" />
</Style>
<Style name="encabezado">
<StyleAttribute name="backgroundColor" value="white" />
<StyleAttribute name="fontWeight" value="bold" />
<StyleAttribute name="fontSize" value="large" />
</Style>
</StyleList>
@@ -0,0 +1,213 @@
IMPORT util
IMPORT os
FUNCTION productosconteo(pdata)
DEFINE xfecha_conteo DATE
DEFINE pdata STRING
DEFINE producto RECORD
codid INT,
cod_n SMALLINT,
cod_grupo SMALLINT,
cod_tipo SMALLINT,
cod_sec SMALLINT,
descripcion VARCHAR(100),
unidad_med VARCHAR(4),
factor_conv FLOAT,
despiece STRING,
existencia DEC(12,5),
consumo DEC(12,5),
costo DEC(12,5),
precio DEC(12,2),
ordenes DEC(12,5),
despachado DEC(12,5),
desglose VARCHAR(1),
reservada DEC(12,5),
disponible DEC(12,5),
transito DEC(12,5),
dias SMALLINT,
fecha CHAR(10),
fecha_conteo CHAR(10)
END RECORD
DEFINE existencia RECORD
codid INT,
bodega SMALLINT,
descripcion_bodega VARCHAR(100),
cantidad FLOAT,
cod_seccion INT,cod_tramo INT,cod_fila INT,cod_pos,
fecha DATE
END RECORD
DEFINE p RECORD
credenciales RECORD
usuario,clave,tipo_inventario VARCHAR(50),
codn INT
END RECORD,
productos DYNAMIC ARRAY OF RECORD
codid INT,
cod_n SMALLINT,
cod_grupo SMALLINT,
cod_tipo SMALLINT,
cod_sec SMALLINT,
descripcion VARCHAR(100),
unidad_med VARCHAR(4),
factor_conv FLOAT,
despiece STRING,
existencia DEC(12,5),
consumo DEC(12,5),
costo DEC(12,5),
precio DEC(12,2),
ordenes DEC(12,5),
despachado DEC(12,5),
desglose VARCHAR(1),
reservada DEC(12,5),
disponible DEC(12,5),
transito DEC(12,5),
dias SMALLINT,
fecha CHAR(10),
fecha_conteo CHAR(10)
END RECORD ,
existencia DYNAMIC ARRAY OF RECORD
codid INT,
bodega SMALLINT,
descripcion_bodega VARCHAR(100),
cantidad FLOAT,
cod_seccion INT,cod_tramo INT,cod_fila INT,cod_pos,
fecha DATE
END RECORD,
mensajes RECORD
cod_msg INT,
descripcion STRING
END RECORD
END RECORD,
i int,
selec,s1 STRING,
fecha,fecha_ini DATE
CALL util.JSON.parse(pdata,p)
IF STATUS < 0 THEN
LET p.mensajes.cod_msg=STATUS
LET p.mensajes.descripcion = 'ERROR EN CONEXION ',SQLCA.sqlerrm
RETURN util.JSON.stringify(p)
END IF
# DISPLAY "productos ",p.credenciales.usuario," ",p.credenciales.clave," ",p.credenciales.tipo_inventario
CONNECT TO "smarmotech" USER p.credenciales.usuario USING p.credenciales.clave
IF STATUS < 0 THEN
LET p.mensajes.cod_msg=STATUS
LET p.mensajes.descripcion = 'ERROR EN CONEXION ',SQLCA.sqlerrm
DISCONNECT CURRENT
RETURN util.JSON.stringify(p)
END IF
LET fecha = TODAY
LET fecha_ini = fecha - 90
IF p.credenciales.tipo_inventario = "productos" THEN
SELECT a.fecha_conteo INTO xfecha_conteo FROM intb00044 a
WHERE a.tipo_inventario = tipo_inventario AND a.disponible = "SI"
DISPLAY "ESTOY PRODUCTOS",p.credenciales.codn
LET selec =
"SELECT a.codid,a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_Sec,a.descrip_esp,a.unidad_med,ISNULL(d.factor_conv,1),b.cod_n,
'0','0', '0','0','0','0',a.desglose ",
" FROM iptb00002 a,iptb00001 d INNER JOIN intb00015 e ON e.cod_n = d.cod_n and
e.cod_grupo = d.cod_grupo and e.cod_tipo = d.cod_tipo and e.cod_sec = d.cod_sec and
e.estado = 'Pendiente'
LEFT OUTER JOIN iptb00027 b ON d.cod_n = b.cod_n and
d.cod_grupo = b.cod_grupo and d.cod_tipo = b.cod_tipo and d.cod_sec = b.cod_sec
where ",
" (a.cod_n = d.cod_n and a.cod_grupo = d.cod_grupo and a.cod_tipo = d.cod_tipo and ",
" a.cod_sec = d.cod_sec) AND a.status_t IS NULL AND ",
"a.control_existencia='SI' AND e.semana_del = (SELECT MIN (a.semana_del) FROM intb00015 a WHERE semana_del >= GETDATE())",
" ORDER BY a.codid "
LET s1 =
"SELECT a.codid,b.bodega,c.descripcion,0"{ISNULL(SUM(b.cantidad_2),0)},",d.cod_seccion,d.cod_tramo,d.cod_fila,d.cod_pos
FROM iptb00006 b,iptb00002 a INNER JOIN intb00015 e ON e.cod_n = a.cod_n and
e.cod_grupo = a.cod_grupo and e.cod_tipo = a.cod_tipo and e.cod_sec = a.cod_sec and
e.estado='Pendiente' ,intb00009 c,iptb00062 d
WHERE (a.cod_n = b.cod_n and ",
" a.cod_grupo = b.cod_grupo and a.cod_tipo = b.cod_tipo and a.cod_sec = b.cod_sec) and b.status_t is null ",
" and (d.cod_n = a.cod_n and d.cod_grupo = a.cod_grupo and d.cod_tipo = a.cod_tipo and d.cod_Sec = a.cod_sec) ",
" and ",
"a.control_existencia='SI' AND a.dispositivo_movil='SI' and b.bodega = c.cod_bodega ",
" group by a.codid,b.bodega,c.descripcion,d.cod_seccion,d.cod_tramo,d.cod_fila,d.cod_pos ",
" having SUM(b.cantidad_2) > 0 "
END IF
PREPARE comando FROM selec
DECLARE c2 CURSOR FOR comando
LET i = 1
FOREACH c2 INTO producto.*
IF producto.cod_n IS NOT null THEN
IF p.credenciales.tipo_inventario = 'productos' THEN
LET producto.costo=0
# CALL disponibles(producto.cod_n,producto.cod_grupo,producto.cod_tipo,producto.cod_sec,TODAY)
# RETURNING producto.ordenes,producto.despachado,producto.transito,producto.existencia,
# producto.reservada
LET producto.disponible = producto.existencia - (producto.ordenes+producto.despachado+producto.reservada)
IF producto.disponible IS NULL THEN
LET producto.disponible=0
END IF
# DESPIECE
IF producto.despiece IS NULL THEN
LET producto.despiece = 'NO'
ELSE
LET producto.despiece = 'SI'
END IF
END IF
IF producto.consumo < 0 THEN
LET producto.consumo = producto.consumo * -1
END IF
IF producto.consumo > 0 THEN
LET producto.dias =(producto.disponible/ producto.consumo) * 90
ELSE
LET producto.dias=0
END IF
IF producto.descripcion IS NULL THEN
LET producto.descripcion = "NO TIENE"
END IF
IF producto.unidad_med IS NULL THEN
LET producto.unidad_med='UD'
END IF
LET producto.fecha=TODAY USING "dd/mm/yyyy"
LET producto.fecha_conteo = xfecha_conteo
LET p.productos[i].* = producto.*
LET i = i + 1
END IF
END FOREACH
DISPLAY "NUMERO DE PRODUCTOS ",i
LET i = 1
PREPARE comando2 FROM s1
DECLARE c3 CURSOR FOR comando2
FOREACH c3 INTO existencia.*
IF existencia.cantidad IS NOT NULL THEN
IF existencia.codid > 0 THEN
LET existencia.fecha = today
LET p.existencia[i].* = existencia.*
IF p.existencia[i].cantidad IS NULL THEN
LET p.existencia[i].cantidad=0
END IF
LET i = i+1
END IF
END IF
END FOREACH
DISPLAY "NUMERO DE PRODUCTOS EXISTENCIA ",i
DISCONNECT CURRENT
RETURN util.JSON.stringify(p)
END FUNCTION