Merge branch 'main' of https://git.fulldetord.com/jsoto/mbs
This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
<?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="../ipdir/imprequisiciones.rdd" RWFglReportName="requiere"/>
|
||||
<report:Conflicts>
|
||||
<report:Conflict nodeName="despiece" message="Node was in trigger "AfterGroup codigo", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="detalledespiece" message="Node was in trigger "AfterGroup codigo", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="totaldespiece" message="Node was in trigger "AfterGroup codigo", 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="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="expectedAhead"/>
|
||||
<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="expectedWayAhead"/>
|
||||
<WORDBOX name="WordBox4" length="1cm" floatingBehavior="enclosed" text="{{"USUARIO: "+nombreUsuario.trim()}}"/>
|
||||
<rtl:input-variable name="p_iptb57.numero_doc" type="FGLNumeric" expectedLocation="expectedWayAhead"/>
|
||||
<WORDBOX name="WordBox5" fontSize="12" fontBold="true" floatingBehavior="enclosed" text="{{"DOCUMENTO: "+p_iptb57.numero_doc.format("&&&&&&&")}}"/>
|
||||
<rtl:input-variable name="p_iptb57.cod_mov" type="FGLNumeric" expectedLocation="expectedWayAhead"/>
|
||||
<rtl:input-variable name="nombreMov" type="FGLString" expectedLocation="expectedWayAhead"/>
|
||||
<WORDWRAPBOX name="WordWrapBox" width="width("M")*27" alignment="baseline" floatingBehavior="enclosed" text="{{"TIPO DOCUMENTO: "+"("+p_iptb57.cod_mov.format("<<<")+")"+nombreMov.trim()}}"/>
|
||||
<rtl:input-variable name="p_iptb57.fecha" type="FGLString" expectedLocation="expectedWayAhead"/>
|
||||
<WORDBOX name="WordBox6" floatingBehavior="enclosed" text="{{"FECHA: "+p_iptb57.fecha}}"/>
|
||||
<rtl:input-variable name="nombreBodega" type="FGLString" expectedLocation="expectedWayAhead"/>
|
||||
<WORDBOX name="WordBox8" floatingBehavior="enclosed" text="{{"BODEGA: "+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="p_iptb57.bodega_destino" type="FGLNumeric" expectedLocation="expectedWayAhead"/>
|
||||
<rtl:input-variable name="nombreBodegaDestino" type="FGLString" expectedLocation="expectedWayAhead"/>
|
||||
<WORDBOX name="WordBox9" floatingBehavior="enclosed" text="{{"BODEGA DESTINO: "+"("+p_iptb57.bodega_destino+")"+nombreBodegaDestino}}"/>
|
||||
<rtl:input-variable name="p_iptb57.num_oc" type="FGLNumeric" expectedLocation="expectedWayAhead"/>
|
||||
<WORDBOX name="WordBox10" floatingBehavior="enclosed" text="{{"NUMERO ORDEN:"+p_iptb57.num_oc.format("&&&&&&&&")}}"/>
|
||||
<rtl:input-variable name="p_iptb57.cliente" type="FGLString" expectedLocation="expectedWayAhead"/>
|
||||
<WORDWRAPBOX name="WordWrapBox1" width="width("M")*27" floatingBehavior="enclosed" text="{{"CLIENTE: "+p_iptb57.cliente}}"/>
|
||||
<rtl:input-variable name="p_iptb57.observacion" type="FGLString" expectedLocation="expectedWayAhead"/>
|
||||
<WORDWRAPBOX name="WordWrapBox2" width="width("M")*20" floatingBehavior="enclosed" text="{{"OBSERVACION: "+p_iptb57.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 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("M")*30" length="min" alignment="baseline" floatingBehavior="enclosed" text="{{detalle.cod_n.format("&&&&")+"-"+detalle.cod_grupo.format("&&&&")+"-"+detalle.cod_tipo.format("&&&&&&")+"-"+detalle.cod_sec.format("&&&&&&&&")+" "+detalle.descripcion.trim()+" "+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("###,###.#####")}}"/>
|
||||
<rtl:input-variable name="detalle.cantidad" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox18" width="1.5inch" floatingBehavior="enclosed" textAlignment="right" text="{{detalle.cantidad.format("###,###.#####")}}"/>
|
||||
</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("M")*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="---,---,---,--&.&&" 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="---,---,---,--&.&&" 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="---,---,---,--&.&&" 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="---,---,---,--&.&&" 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="---,---,---,--&.&&" 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("##,###.#####")}}"/>
|
||||
<rtl:input-variable name="total_medida" type="FGLNumeric" expectedLocation="expectedBefore"/>
|
||||
<WORDBOX name="WordBox23" width="1inch" floatingBehavior="enclosed" text="{{total_medida.format("##,###.######")}}"/>
|
||||
</LAYOUTNODE>
|
||||
</rtl:match>
|
||||
</MINIPAGE>
|
||||
</rtl:match>
|
||||
</PXML>
|
||||
</rtl:stylesheet>
|
||||
</report:Report>
|
||||
@@ -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="../ipdir/ipautorizareq.rdd" RWFglReportName="requiereAutoriza"/>
|
||||
<report:Conflicts>
|
||||
<report:Conflict nodeName="encabezado" message="Node was in trigger "FirstPageHeader [0; 1]", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="encabezado2" message="Node was in trigger "FirstPageHeader [0; 1]", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="encabezadomaster" message="Node was in trigger "FirstPageHeader [0; 1]", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="encabezadodetalle" message="Node was in trigger "FirstPageHeader [0; 1]", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="despiece" message="Node was in trigger "AfterGroup codigo", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="detalledespiece" message="Node was in trigger "AfterGroup codigo", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="totaldespiece" message="Node was in trigger "AfterGroup codigo", 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">
|
||||
<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="{{"USUARIO: "+nombreusuario.trim()}}"/>
|
||||
<rtl:input-variable name="x.numero_doc" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox5" fontSize="12" fontBold="true" floatingBehavior="enclosed" text="{{"DOCUMENTO: "+x.numero_doc.format("&&&&&&&")}}"/>
|
||||
<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("M")*27" alignment="baseline" floatingBehavior="enclosed" text="{{"TIPO DOCUMENTO: "+"("+x.cod_mov.format("<<<")+")"+nombreMov.trim()}}"/>
|
||||
<rtl:input-variable name="x.fecha" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox6" floatingBehavior="enclosed" text="{{"FECHA: "+x.fecha}}"/>
|
||||
<rtl:input-variable name="nombreBodega" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox8" floatingBehavior="enclosed" text="{{"BODEGA: "+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="{{"BODEGA DESTINO: "+nombreBodegaDestino}}"/>
|
||||
<rtl:input-variable name="x.num_oc" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox10" floatingBehavior="enclosed" text="{{"NUMERO ORDEN:"+x.num_oc.format("&&&&&&&&")}}"/>
|
||||
<rtl:input-variable name="vendedor" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="vendedor Value" class="grwStringValue" width="width("M")*25" alignment="baseline" floatingBehavior="enclosed" text="{{"VENDEDOR: "+vendedor.trim()}}"/>
|
||||
<rtl:input-variable name="x.cliente" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="WordWrapBox1" width="width("M")*27" floatingBehavior="enclosed" text="{{"CLIENTE: "+x.cliente}}"/>
|
||||
<rtl:input-variable name="x.observacion" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="WordWrapBox2" width="width("M")*20" floatingBehavior="enclosed" text="{{"OBSERVACION: "+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("M")*30" length="min" alignment="baseline" floatingBehavior="enclosed" text="{{detalle.cod_n.format("&&&&")+"-"+detalle.cod_grupo.format("&&&&")+"-"+detalle.cod_tipo.format("&&&&&&")+"-"+detalle.cod_sec.format("&&&&&&&&")+" "+detalle.descripcion.trim()+" "+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("###,###.#####")}}"/>
|
||||
<rtl:input-variable name="detalle.cantidad" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox18" width="1.5inch" floatingBehavior="enclosed" textAlignment="right" text="{{detalle.cantidad.format("###,###.#####")}}"/>
|
||||
</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("M")*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="---,---,---,--&.&&" 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="---,---,---,--&.&&" 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="---,---,---,--&.&&" 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="---,---,---,--&.&&" 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="---,---,---,--&.&&" 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("##,###.#####")}}"/>
|
||||
<rtl:input-variable name="total_medida" type="FGLNumeric" expectedLocation="expectedBefore"/>
|
||||
<WORDBOX name="WordBox23" width="1inch" floatingBehavior="enclosed" text="{{total_medida.format("##,###.######")}}"/>
|
||||
</LAYOUTNODE>
|
||||
</rtl:match>
|
||||
</MINIPAGE>
|
||||
</rtl:match>
|
||||
</PXML>
|
||||
</rtl:stylesheet>
|
||||
</report:Report>
|
||||
@@ -4,10 +4,10 @@ FUNCTION buscadoc(numid,codmov)
|
||||
DEFINE numid,codmov INT
|
||||
|
||||
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,b.descripcion,a.observacion
|
||||
a.estado,a.url_destino,b.descripcion,a.observacion,a.us_crea
|
||||
INTO p_iptb57.numero_doc,p_iptb57.cod_mov,p_iptb57.fecha,p_iptb57.num_oc,p_iptb57.tipo_cliente,p_iptb57.sec_cliente,
|
||||
p_iptb57.cliente,p_iptb57.bodega,p_iptb57.bodega_destino,p_iptb57.estado,
|
||||
p_iptb57.url_file,p_iptb57.observacion
|
||||
p_iptb57.url_file,p_iptb57.idstado,p_iptb57.observacion,p_iptb57.us_crea
|
||||
FROM iptb00057 a, iptb00061 b
|
||||
WHERE a.numero_doc = numid AND a.cod_mov = codmov AND
|
||||
a.idestado = b.idestado
|
||||
@@ -15,7 +15,20 @@ FUNCTION buscadoc(numid,codmov)
|
||||
#BODEGA DESTINO
|
||||
IF p_iptb57.bodega_destino IS NOT NULL THEN
|
||||
SELECT a.descripcion INTO nombreBodegaDestino FROM intb00009 a WHERE a.cod_bodega = p_iptb57.bodega_destino
|
||||
END IF
|
||||
END IF
|
||||
#BODEGA ORIGEN
|
||||
IF p_iptb57.bodega IS NOT NULL THEN
|
||||
SELECT a.descripcion INTO nombreBodega FROM intb00009 a WHERE a.cod_bodega = p_iptb57.bodega
|
||||
END IF
|
||||
#TIPO DE MOVIMIENTO
|
||||
IF p_iptb57.cod_mov IS NOT NULL THEN
|
||||
SELECT RTRIM(a.descrip_mov) || '(' || CAST(a.cod_mov AS VARCHAR(6)) || ')' INTO nombreMov
|
||||
FROM iptb00005 a WHERE a.cod_mov = p_iptb57.cod_mov
|
||||
END IF
|
||||
#USUARIO QUE CREO EL DOCUMENTO
|
||||
IF p_iptb57.us_crea IS NOT NULL THEN
|
||||
CALL usuarioSistema(p_iptb57.us_crea) RETURNING nombreUsuario,email
|
||||
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,b.factor_conv,
|
||||
|
||||
@@ -77,7 +77,7 @@ FUNCTION ipautorizadas(xusuario)
|
||||
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)
|
||||
CALL buscadocAutoriza(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
|
||||
@@ -88,7 +88,7 @@ FUNCTION ipautorizadas(xusuario)
|
||||
LET data.bodega_destino = arr_busqueda1[arr_curr()].bodega_destino
|
||||
LET nombreUsuario = arr_busqueda1[arr_curr()].usuario
|
||||
|
||||
CALL impdocumento()
|
||||
CALL impdocumentoAutoriza()
|
||||
END IF
|
||||
ON ACTION procesar ATTRIBUTE(TEXT="Procesa",IMAGE="")
|
||||
IF arr_busqueda1[arr_curr()].numeroid > 0 THEN
|
||||
@@ -172,7 +172,7 @@ FUNCTION buscadataReq(pusuario)
|
||||
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION buscadoc(numid,codmov)
|
||||
FUNCTION buscadocAutoriza(numid,codmov)
|
||||
DEFINE numid,codmov INT
|
||||
|
||||
LET vendedor = null
|
||||
@@ -235,7 +235,7 @@ FUNCTION buscadoc(numid,codmov)
|
||||
LET idx = idx + 1
|
||||
END FOREACH
|
||||
END FUNCTION
|
||||
FUNCTION impdocumento()
|
||||
FUNCTION impdocumentoAutoriza()
|
||||
DEFINE idx_l INT,
|
||||
xcodigo VARCHAR(50)
|
||||
LET r_filename = "ipprmt020_1.4rp"
|
||||
@@ -251,7 +251,7 @@ FUNCTION impdocumento()
|
||||
ELSE
|
||||
RETURN
|
||||
END IF
|
||||
START REPORT requiere TO XML HANDLER HANDLER
|
||||
START REPORT requiereAutoriza TO XML HANDLER HANDLER
|
||||
|
||||
FOR idx = 1 TO arr_iptb58.getLength()
|
||||
|
||||
@@ -261,15 +261,15 @@ FUNCTION impdocumento()
|
||||
arr_iptb58[idx].cod_tipo USING '&&&&&&','-',
|
||||
arr_iptb58[idx].cod_sec USING '&&&&&&&'
|
||||
|
||||
OUTPUT TO REPORT requiere(p_iptb57.*,arr_iptb58[idx].*,despiece1[idx].*, xcodigo)
|
||||
|
||||
OUTPUT TO REPORT requiereAutoriza(p_iptb57.*,arr_iptb58[idx].*,despiece1[idx].*, xcodigo)
|
||||
|
||||
END IF
|
||||
|
||||
|
||||
END FOR
|
||||
FINISH REPORT requiere
|
||||
FINISH REPORT requiereAutoriza
|
||||
END FUNCTION
|
||||
|
||||
REPORT requiere(x,detalle,xdespiece,codigo)
|
||||
REPORT requiereAutoriza(x,detalle,xdespiece,codigo)
|
||||
DEFINE hora STRING,
|
||||
detalle RECORD
|
||||
area INT,
|
||||
@@ -308,7 +308,8 @@ REPORT requiere(x,detalle,xdespiece,codigo)
|
||||
estado VARCHAR(50),
|
||||
ruta_documento ,
|
||||
url_file ,
|
||||
idestado VARCHAR(200)
|
||||
idestado VARCHAR(200),
|
||||
us_crea VARCHAR(50)
|
||||
END RECORD,
|
||||
|
||||
etiqueta VARCHAR(100),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<ManagedForm databaseName="marmotech" fileVersion="31400" gstVersion="31405" name="ManagedForm" uid="{e5b326a6-37c4-4ce8-acc0-8f7a593c8381}">
|
||||
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="31405" name="ManagedForm" uid="{e5b326a6-37c4-4ce8-acc0-8f7a593c8381}">
|
||||
<AGSettings>
|
||||
<DynamicProperties version="2"/>
|
||||
</AGSettings>
|
||||
@@ -27,7 +27,7 @@
|
||||
<RecordField colName="" fieldIdRef="22" name="gastos_usd" sqlTabName="" table_alias_name="" uid="{988ab0db-6fae-498d-bc48-25024dfe1b15}"/>
|
||||
<RecordField colName="" fieldIdRef="23" name="tasa" sqlTabName="" table_alias_name="" uid="{0e2987c7-1210-402d-a84e-45226593a4c2}"/>
|
||||
</Record>
|
||||
<Form gridHeight="24" gridWidth="84" name="ipfmmt013">
|
||||
<Form gridHeight="24" gridWidth="84" name="ipfmmt013" text="COSTOS ESTANDARES PRODUCTO TERMINADO">
|
||||
<Grid gridHeight="24" gridWidth="84" name="Grid1" posX="0" posY="0">
|
||||
<Label gridHeight="1" gridWidth="6" name="Label1" posX="2" posY="8" text="Ventas"/>
|
||||
<ComboBox aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="ventas" comment="1- LOCAL 2- EXPORTACION" defaultValue="1" fieldId="0" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="22" include="1|2" items="VENTAS LOCALES" name="iptb00004.ventas" posX="19" posY="8" reverse="true" sqlTabName="iptb00004" sqlType="CHAR" tabIndex="1" table_alias_name="" widget="ComboBox">
|
||||
|
||||
@@ -76,9 +76,9 @@
|
||||
<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 Pedidos"/>
|
||||
<Edit fieldId="5" gridHeight="1" gridWidth="10" name="num_oc" posX="49" posY="2" tabIndex="-1" title="edit2" widget="Edit"/>
|
||||
<ComboBox fieldId="15" gridHeight="1" gridWidth="40" items="" name="cod_mov" posX="12" posY="2" tabIndex="-1" title="combobox1" widget="ComboBox"/>
|
||||
<Label gridHeight="1" gridWidth="10" name="label4" posX="54" posY="2" text="Orden Pedidos"/>
|
||||
<Edit fieldId="5" gridHeight="1" gridWidth="10" name="num_oc" posX="65" 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="label5" posX="38" posY="3" text="Cliente"/>
|
||||
@@ -91,11 +91,11 @@
|
||||
<Edit fieldId="32" gridHeight="1" gridWidth="46" name="observacion" posX="49" posY="4" scroll="true" tabIndex="-1" title="edit1" 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="label8" posX="38" posY="5" text="Bodega Destino"/>
|
||||
<ComboBox fieldId="16" gridHeight="1" gridWidth="18" items="" name="bodega_destino" posX="49" posY="5" tabIndex="-1" title="combobox1" widget="ComboBox"/>
|
||||
<Edit fieldId="35" gridHeight="1" gridWidth="31" name="url_file" noEntry="true" posX="68" 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"/>
|
||||
<ComboBox fieldId="7" gridHeight="1" gridWidth="28" items="" name="bodega" posX="12" posY="5" tabIndex="-1" title="edit2" widget="ComboBox"/>
|
||||
<Label gridHeight="1" gridWidth="14" name="label8" posX="42" posY="5" text="Bodega Destino"/>
|
||||
<ComboBox fieldId="16" gridHeight="1" gridWidth="28" items="" name="bodega_destino" posX="57" posY="5" tabIndex="-1" title="combobox1" widget="ComboBox"/>
|
||||
<Edit fieldId="35" gridHeight="1" gridWidth="31" name="url_file" noEntry="true" posX="86" posY="5" scroll="true" tabIndex="-1" title="edit1" widget="Edit"/>
|
||||
<Button gridHeight="1" gridWidth="10" image="open2" name="abrirdocumento" posX="119" 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"/>
|
||||
</Group>
|
||||
|
||||
@@ -51,7 +51,8 @@ GLOBALS
|
||||
estado VARCHAR(50),
|
||||
ruta_documento ,
|
||||
url_file STRING,
|
||||
idstado VARCHAR(60)
|
||||
idstado VARCHAR(60),
|
||||
us_crea VARCHAR(50)
|
||||
END RECORD,
|
||||
arr_iptb58 DYNAMIC ARRAY OF RECORD
|
||||
area INT,
|
||||
@@ -545,6 +546,7 @@ DEFINE x RECORD
|
||||
conduce_no LIKE iptb00006.conduce_no,
|
||||
descrip_mov CHAR(40), #LIKE intb00005.descrip_mov,
|
||||
bodega LIKE iptb00006.bodega,
|
||||
bodega_destino SMALLINT,
|
||||
detalle LIKE iptb00006.detalle,
|
||||
cod_sp LIKE iptb00006.cod_sp,
|
||||
cod_sp_sec LIKE iptb00006.cod_sp_sec,
|
||||
@@ -553,10 +555,13 @@ DEFINE x RECORD
|
||||
cod_mov1 SMALLINT,
|
||||
entrada INT,
|
||||
descrip_mov1 CHAR(40),
|
||||
descrip4 CHAR(30)
|
||||
descrip4 CHAR(30),
|
||||
factura INT
|
||||
END RECORD
|
||||
|
||||
DEFINE z RECORD
|
||||
area SMALLINT,
|
||||
descripcion_area VARCHAR(30),
|
||||
cod_n LIKE intb00003.cod_n,
|
||||
cod_grupo LIKE intb00003.cod_grupo,
|
||||
cod_tipo LIKE intb00003.cod_tipo,
|
||||
@@ -564,8 +569,12 @@ DEFINE z RECORD
|
||||
cantidad_1 LIKE iptb00006.cantidad_1,
|
||||
cantidad_2 LIKE iptb00006.cantidad_2,
|
||||
cantidad_p DEC(12,5),
|
||||
unidad_med LIKE iptb00002.unidad_med,
|
||||
descrip_esp CHAR(70)
|
||||
unidad_med LIKE iptb00002.unidad_med,
|
||||
descrip_esp CHAR(70),
|
||||
existencia DEC(12,5),
|
||||
disponible DEC(12,5),
|
||||
codigo_bloque CHAR(15),
|
||||
id_kit INT
|
||||
END RECORD,
|
||||
etiqueta,pcalle,purbanizacion,pcasa_num,ptelefono,pcelular,nombre,apellido CHAR(30),
|
||||
plado1,plado2,plado3,pcantidad,pmedida DEC(12,5),
|
||||
|
||||
@@ -72,8 +72,7 @@ FUNCTION ippcad003()
|
||||
transacc.us_crea,
|
||||
transacc.fech_crea,
|
||||
transacc.us_mod,
|
||||
transacc.fech_mod,
|
||||
transacc.control_ubicacion_almacen
|
||||
transacc.fech_mod
|
||||
## Verifica que el codigo no exista en el catalogo de transacciones. Si existe,
|
||||
## entonces despliega los datos del registro existente.
|
||||
|
||||
@@ -200,8 +199,6 @@ INSERT INTO iptb00005
|
||||
,aplicacion_movil_inv
|
||||
,aplicacion_movil_doc
|
||||
,codigo_mov_transferencia
|
||||
,control_produccion
|
||||
,control_ubicacion_almacen
|
||||
,requisiciones
|
||||
,requiere_autorizacion )
|
||||
VALUES (transacc.cod_mov,
|
||||
@@ -216,7 +213,6 @@ INSERT INTO iptb00005
|
||||
transacc.control_facturacion,
|
||||
transacc.aplicacion_movil_inv,
|
||||
transacc.aplicacion_movil_doc,transacc.codigo_mov_transferencia,
|
||||
transacc.control_produccion,transacc.control_ubicacion_almacen,
|
||||
transacc.requisiciones,transacc.requiere_autorizacion)
|
||||
CALL integridad()
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@ FUNCTION ipprmt020()
|
||||
LET p_iptb57.numero_doc = arr_busqueda[arr_curr()].numeroid
|
||||
LET p_iptb57.cod_mov = arr_busqueda[arr_curr()].cod_mov
|
||||
CALL anular()
|
||||
CALL buscarData()
|
||||
ON ACTION imprimir ATTRIBUTE(TEXT = "Imprimir", IMAGE = "printer")
|
||||
|
||||
CALL buscadoc(
|
||||
@@ -153,6 +154,7 @@ FUNCTION buscardata()
|
||||
AND b.us_crea = usuarios
|
||||
AND b.status_t IS NULL
|
||||
|
||||
CALL arr_busqueda.clear()
|
||||
LET i = 1
|
||||
FOREACH buscardata INTO arr_busqueda[i].*
|
||||
LET p_iptb57.cod_mov = arr_busqueda[i].cod_mov
|
||||
|
||||
@@ -91,7 +91,7 @@ FUNCTION ipprmt021()
|
||||
|
||||
|
||||
UPDATE iptb00057 SET us_mod=usuarios,fech_mod=getdate(),
|
||||
estado_proceso = arr_busqueda[arr_curr()].idestado
|
||||
idestado = arr_busqueda[arr_curr()].idestado
|
||||
WHERE numero_doc = arr_busqueda[arr_curr()].numeroid AND
|
||||
cod_mov = arr_busqueda[arr_curr()].cod_mov
|
||||
|
||||
|
||||
+24
-3
@@ -504,9 +504,28 @@
|
||||
</Application>
|
||||
</Group>
|
||||
<Group id="1667448785" label="PRODUCTOS TERMINADOS">
|
||||
<Library binaryName="FORMULARIOS_IP" id="-1826025351" label="FORMULARIOS_IP"/>
|
||||
<Library binaryName="FUNCIONES_IP" id="1763548104" label="FUNCIONES_IP">
|
||||
<Library binaryName="FORMULARIOS_IP" dependencies="-1026233879" id="-1826025351" label="FORMULARIOS_IP">
|
||||
<File filePath="ipdir/ipfmmt003.4fd"/>
|
||||
<File filePath="ipdir/ipfmmt020.4fd"/>
|
||||
<File filePath="ipdir/ipfmmt021.4fd"/>
|
||||
<File filePath="ipdir/ipfmmt013.4fd"/>
|
||||
<File filePath="ipdir/ipfmmt019.4fd"/>
|
||||
</Library>
|
||||
<Library binaryName="FUNCIONES_IP" dependencies="-1026233879" id="1763548104" label="FUNCIONES_IP">
|
||||
<File filePath="ipdir/ipprgb000.4gl"/>
|
||||
<File filePath="ipdir/buscarequisicion.4gl"/>
|
||||
<File compilerOptions="--build-rdd" filePath="ipdir/imprequisiciones.4gl"/>
|
||||
<File filePath="otrodir/funciones_ip.4gl"/>
|
||||
<File filePath="ipdir/estadosprocesos.4gl"/>
|
||||
<File compilerOptions="--build-rdd" filePath="ipdir/ipautorizareq.4gl"/>
|
||||
<File filePath="otrodir/codigoModificacion.4gl"/>
|
||||
<File filePath="ipdir/piking.4gl"/>
|
||||
<File filePath="ipdir/conduces.4gl"/>
|
||||
<File filePath="ipdir/ubicacionH.4gl"/>
|
||||
<File filePath="otrodir/LlenarUbicaciones.4gl"/>
|
||||
<File filePath="otrodir/categorias.4gl"/>
|
||||
<File filePath="ipdir/ipactualizareqtrx.4gl"/>
|
||||
<File filePath="ipdir/loadDespiece.4gl"/>
|
||||
</Library>
|
||||
<Application binaryName="ipprmt002" dependencies="1763548104,-1026233879,-764824792" externalDependencies="libgre.42x" id="-960000000" label="ipprmt002">
|
||||
<Configuration commandLineArguments="jpeguero Peguero2023" id="-961000000" label="Configuration"/>
|
||||
@@ -519,14 +538,16 @@
|
||||
<Application binaryName="ipprmt020" dependencies="1763548104,-1026233879,-764824792" externalDependencies="libgre.42x" id="-960000002" label="ipprmt020">
|
||||
<Configuration commandLineArguments="jpeguero Peguero2023" id="-961000002" label="Configuration"/>
|
||||
<File compilerOptions="--build-rdd" filePath="ipdir/ipprmt020.4gl"/>
|
||||
<File filePath="bin/ipprmt020.4rp"/>
|
||||
</Application>
|
||||
<Application binaryName="ipprmt021" dependencies="1763548104,-1026233879,-764824792" externalDependencies="libgre.42x" id="-960000003" label="ipprmt021">
|
||||
<Configuration commandLineArguments="jpeguero Peguero2023" id="-961000003" label="Configuration"/>
|
||||
<File compilerOptions="--build-rdd" filePath="ipdir/ipprmt021.4gl"/>
|
||||
</Application>
|
||||
<Application binaryName="ipprmt044" dependencies="1763548104,-1026233879,-764824792" externalDependencies="libgre.42x" id="-960000004" label="ipprmt044">
|
||||
<Application binaryName="ipprmt044" dependencies="1763548104,-1026233879,-764824792,-1423229125,493047263" externalDependencies="libgre.42x" id="-960000004" label="ipprmt044">
|
||||
<Configuration commandLineArguments="jpeguero Peguero2023" id="-961000004" label="Configuration"/>
|
||||
<File compilerOptions="--build-rdd" filePath="ipdir/ipprmt044.4gl"/>
|
||||
<File filePath="bin/ipprmt020_1.4rp"/>
|
||||
</Application>
|
||||
<Application binaryName="ipprmt064" dependencies="1763548104,-1026233879,-764824792" externalDependencies="libgre.42x" id="-960000005" label="ipprmt064">
|
||||
<Configuration commandLineArguments="jpeguero Peguero2023" id="-961000005" label="Configuration"/>
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
FUNCTION init_seccion(bodegaCont INT) --Llenar combobox seccion
|
||||
|
||||
DEFINE i SMALLINT
|
||||
DEFINE cb_seccion ui.ComboBox
|
||||
|
||||
DEFINE seccion DYNAMIC ARRAY OF RECORD
|
||||
cod_seccion INT,
|
||||
descrip STRING
|
||||
END RECORD
|
||||
|
||||
LET cb_seccion = ui.ComboBox.forName("formonly.seccion")
|
||||
|
||||
DECLARE buscar1 CURSOR FOR
|
||||
SELECT cod_seccion, descripcion
|
||||
FROM intb00010
|
||||
WHERE cod_bodega = bodegaCont
|
||||
|
||||
|
||||
LET i = 1
|
||||
CALL cb_seccion.clear()
|
||||
|
||||
FOREACH buscar1 INTO seccion[i].cod_seccion, seccion[i].descrip
|
||||
|
||||
CALL cb_seccion.addItem(seccion[i].cod_seccion, seccion[i].descrip)
|
||||
LET i = i + 1
|
||||
END FOREACH
|
||||
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION init_tramo(bodegaCont INT, seccion INT) --Llenar combobox tramo
|
||||
|
||||
DEFINE i INTEGER
|
||||
DEFINE cb_tramo ui.ComboBox
|
||||
|
||||
DEFINE tramos DYNAMIC ARRAY OF RECORD
|
||||
cod_tramo INTEGER,
|
||||
descrip_tram VARCHAR(50)
|
||||
END RECORD
|
||||
|
||||
LET cb_tramo = ui.ComboBox.forName("formonly.tramo")
|
||||
|
||||
DECLARE buscar2 CURSOR FOR
|
||||
SELECT cod_tramo, descripcion
|
||||
FROM intb00043
|
||||
WHERE cod_bodega = bodegaCont AND cod_seccion = seccion
|
||||
|
||||
CALL cb_tramo.clear()
|
||||
LET i = 1
|
||||
|
||||
FOREACH buscar2 INTO tramos[i].cod_tramo, tramos[i].descrip_tram
|
||||
CALL cb_tramo.addItem(tramos[i].cod_tramo, tramos[i].descrip_tram)
|
||||
LET i = i + 1
|
||||
END FOREACH
|
||||
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION init_fila(
|
||||
bodegaCont INT, seccion INT, tramo INT) --Llenar combobox tramo
|
||||
|
||||
DEFINE i INTEGER
|
||||
DEFINE cb_fila ui.ComboBox
|
||||
|
||||
DEFINE filas DYNAMIC ARRAY OF RECORD
|
||||
cod_fila INTEGER,
|
||||
titulo VARCHAR(50)
|
||||
END RECORD
|
||||
|
||||
LET cb_fila = ui.ComboBox.forName("formonly.fila")
|
||||
|
||||
DECLARE buscar3 CURSOR FOR
|
||||
SELECT cod_fila, titulo
|
||||
FROM intb00045
|
||||
WHERE cod_bodega = bodegaCont
|
||||
AND cod_seccion = seccion
|
||||
AND cod_tramo = tramo
|
||||
|
||||
CALL cb_fila.clear()
|
||||
LET i = 1
|
||||
|
||||
FOREACH buscar3 INTO filas[i].cod_fila, filas[i].titulo
|
||||
CALL cb_fila.addItem(filas[i].cod_fila, filas[i].titulo)
|
||||
LET i = i + 1
|
||||
END FOREACH
|
||||
|
||||
CALL cb_fila.additem(99,"TODAS")
|
||||
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION init_posicion(
|
||||
bodegaCont INT, seccion INT, tramo INT, fila INT) --Llenar combobox tramo
|
||||
|
||||
DEFINE i INTEGER
|
||||
DEFINE cb_posicion ui.ComboBox
|
||||
|
||||
DEFINE posicion DYNAMIC ARRAY OF RECORD
|
||||
cod_pos INTEGER,
|
||||
titulo VARCHAR(50)
|
||||
END RECORD
|
||||
|
||||
LET cb_posicion = ui.ComboBox.forName("formonly.posicion")
|
||||
|
||||
DECLARE buscar4 CURSOR FOR
|
||||
SELECT cod_pos, titulo
|
||||
FROM intb00046
|
||||
WHERE cod_bodega = bodegaCont
|
||||
AND cod_seccion = seccion
|
||||
AND cod_tramo = tramo
|
||||
AND cod_fila = fila
|
||||
CALL cb_posicion.clear()
|
||||
LET i = 1
|
||||
|
||||
FOREACH buscar4 INTO posicion[i].cod_pos, posicion[i].titulo
|
||||
CALL cb_posicion.addItem(posicion[i].cod_pos, posicion[i].titulo)
|
||||
LET i = i + 1
|
||||
END FOREACH
|
||||
|
||||
CALL cb_posicion.additem(99,"TODAS")
|
||||
|
||||
END FUNCTION
|
||||
@@ -0,0 +1,18 @@
|
||||
FUNCTION categorias()
|
||||
|
||||
DEFINE ketiquetas SMALLINT, detiquetas CHAR(30),
|
||||
cbcategoria ui.ComboBox,
|
||||
cb2 CHAR(2)
|
||||
|
||||
LET cbcategoria = ui.combobox.forname("formonly.cod_cat")
|
||||
DECLARE bcategoria CURSOR FOR
|
||||
SELECT a.cod_categoria,a.descripcion FROM iptb00034 a
|
||||
ORDER BY a.descripcion
|
||||
CALL cbcategoria.clear()
|
||||
|
||||
FOREACH bcategoria INTO ketiquetas,detiquetas
|
||||
CALL cbcategoria.additem(ketiquetas,detiquetas)
|
||||
END FOREACH
|
||||
|
||||
END FUNCTION
|
||||
|
||||
@@ -0,0 +1,483 @@
|
||||
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
|
||||
FUNCTION bodegas(cb2)
|
||||
|
||||
DEFINE
|
||||
ketiquetas SMALLINT,
|
||||
detiquetas CHAR(30),
|
||||
cbodegas ui.ComboBox,
|
||||
cb2 CHAR(2)
|
||||
|
||||
LET cbodegas = ui.combobox.forname("formonly.bodega")
|
||||
DECLARE bbodegas CURSOR FOR
|
||||
SELECT a.cod_bodega, a.descripcion
|
||||
FROM intb00009 a
|
||||
WHERE a.status_t IS NULL
|
||||
ORDER BY a.descripcion
|
||||
CALL cbodegas.clear()
|
||||
|
||||
FOREACH bbodegas INTO ketiquetas, detiquetas
|
||||
CALL cbodegas.additem(ketiquetas, detiquetas)
|
||||
END FOREACH
|
||||
|
||||
IF cb2 = '2' THEN
|
||||
LET cbodegas = ui.combobox.forname("formonly.bodega_destino")
|
||||
DECLARE bbodegas2 CURSOR FOR
|
||||
SELECT a.cod_bodega, a.descripcion
|
||||
FROM intb00009 a
|
||||
WHERE a.status_t IS NULL
|
||||
ORDER BY a.descripcion
|
||||
CALL cbodegas.clear()
|
||||
|
||||
FOREACH bbodegas2 INTO ketiquetas, detiquetas
|
||||
CALL cbodegas.additem(ketiquetas, detiquetas)
|
||||
END FOREACH
|
||||
|
||||
END IF
|
||||
|
||||
END FUNCTION
|
||||
{
|
||||
-------------------------------------------------------------------------------
|
||||
FUNCTION disponibles() -- VERSION OPTIMIZADA v2 (drop-in, misma firma)
|
||||
-------------------------------------------------------------------------------
|
||||
CAMBIOS respecto al original:
|
||||
1. SUSTITUTOS (intb00003) incorporados CORRECTAMENTE en existencia, orden y
|
||||
conduce: ahora suman el propio producto MAS sus equivalentes (que no
|
||||
reciben ventas por si mismos). El original hacia un LEFT JOIN a intb00003
|
||||
que no usaba ninguna columna de e, por lo que NO traia el sustituto y solo
|
||||
podia duplicar filas.
|
||||
2. FECHA DE CORTE: se aplica fecha <= pfecha en los movimientos/documentos.
|
||||
En la reserva se usa pfecha como referencia (linea marcada).
|
||||
3. Manejo de NULL consistente. Firma y 6 valores de retorno IDENTICOS.
|
||||
|
||||
RECOMENDACION: pcodn..pcodsec estan declarados SMALLINT, pero en las tablas
|
||||
los codigos son INT. Si algun codigo supera 32767 habra overflow; considerar
|
||||
cambiarlos a INTEGER.
|
||||
|
||||
NOTA: esta version por fila sigue siendo mas lenta que precalcular con
|
||||
sp_llenar_disponibles. Usar esta solo si no se puede cambiar el flujo del
|
||||
reporte; de lo contrario, usar el SP.
|
||||
-------------------------------------------------------------------------------
|
||||
}
|
||||
FUNCTION disponibles(pcodn, pcodgrupo, pcodtipo, pcodsec, pfecha)
|
||||
DEFINE pcodn, pcodgrupo, pcodtipo, pcodsec, dias SMALLINT,
|
||||
pfecha DATE,
|
||||
reservado, existencia, transito, cantidad_orden, pcantidadconduce,
|
||||
cantidad_ordenada, cantidad_recibida DEC(12, 5),
|
||||
selec STRING,
|
||||
valorOrdenes, valorConduces DEC(16, 2)
|
||||
|
||||
SELECT a.dias_vence_reservas INTO dias FROM companias a
|
||||
|
||||
# RESERVADO -- usa pfecha como referencia de corte
|
||||
LET reservado = 0
|
||||
LET selec = "
|
||||
SELECT ISNULL(SUM(a.cantidad_reservada),0)
|
||||
FROM vetb00051 a, vetb00050 b
|
||||
WHERE a.status_t IS NULL AND
|
||||
a.cotizacion_no = b.cotizacion_no AND
|
||||
a.cod_n = ? AND a.cod_grupo = ? AND a.cod_tipo = ? AND a.cod_sec = ? AND
|
||||
a.cantidad_reservada IS NOT NULL AND
|
||||
a.fecha_inicio_reserva <= ? AND
|
||||
a.fecha_vence_reserva >= ? AND
|
||||
DATEDIFF(day, a.fecha_vence_reserva, a.fecha_inicio_reserva) <= ?
|
||||
"
|
||||
PREPARE comando1 FROM selec
|
||||
EXECUTE comando1
|
||||
INTO reservado
|
||||
USING pcodn, pcodgrupo, pcodtipo, pcodsec, pfecha, pfecha, dias
|
||||
IF reservado IS NULL THEN LET reservado = 0 END IF
|
||||
|
||||
# EXISTENCIA -- propio + sustitutos, al corte pfecha
|
||||
LET existencia = 0
|
||||
LET selec = "
|
||||
SELECT ISNULL(SUM(a.cantidad_2),0)
|
||||
FROM iptb00006 a
|
||||
WHERE a.status_t IS NULL AND a.fecha <= ? AND
|
||||
( (a.cod_n=? AND a.cod_grupo=? AND a.cod_tipo=? AND a.cod_sec=?)
|
||||
OR EXISTS ( SELECT 1 FROM intb00003 e
|
||||
WHERE e.status_t IS NULL AND
|
||||
e.cod_n=? AND e.cod_grupo=? AND e.cod_tipo=? AND e.cod_sec=? AND
|
||||
a.cod_n=e.cod_n_s AND a.cod_grupo=e.cod_grupo_s AND
|
||||
a.cod_tipo=e.cod_tipo_s AND a.cod_sec=e.cod_sec_s ) )
|
||||
"
|
||||
PREPARE comando2 FROM selec
|
||||
EXECUTE comando2 INTO existencia
|
||||
USING pfecha, pcodn,pcodgrupo,pcodtipo,pcodsec, pcodn,pcodgrupo,pcodtipo,pcodsec
|
||||
|
||||
# ORDEN DE PRODUCCION -- propio + sustitutos, al corte
|
||||
LET cantidad_orden = 0
|
||||
LET selec = "
|
||||
SELECT ISNULL(SUM(a.cantidad),0), ISNULL(SUM(a.cantidad*a.precio),0)
|
||||
FROM prtb00013 a, prtb00012 b
|
||||
WHERE a.num_oc=b.num_oc AND b.cerrada='N' AND b.status_t IS NULL AND
|
||||
b.fecha_oc <= ? AND
|
||||
( (a.cod_n=? AND a.cod_grupo=? AND a.cod_tipo=? AND a.cod_sec=?)
|
||||
OR EXISTS ( SELECT 1 FROM intb00003 e
|
||||
WHERE e.status_t IS NULL AND
|
||||
e.cod_n=? AND e.cod_grupo=? AND e.cod_tipo=? AND e.cod_sec=? AND
|
||||
a.cod_n=e.cod_n_s AND a.cod_grupo=e.cod_grupo_s AND
|
||||
a.cod_tipo=e.cod_tipo_s AND a.cod_sec=e.cod_sec_s ) )
|
||||
"
|
||||
PREPARE comando3 FROM selec
|
||||
EXECUTE comando3 INTO cantidad_orden, valorOrdenes
|
||||
USING pfecha, pcodn,pcodgrupo,pcodtipo,pcodsec, pcodn,pcodgrupo,pcodtipo,pcodsec
|
||||
|
||||
# CONDUCE / CONSUMO -- propio + sustitutos, al corte
|
||||
LET pcantidadConduce = 0
|
||||
LET selec = "
|
||||
SELECT ISNULL(SUM(c.cantidad_2*-1),0),
|
||||
ISNULL(SUM(c.cantidad_2*(a.precio*b.prima_us)),0)
|
||||
FROM prtb00013 a, prtb00012 b, iptb00006 c, iptb00005 d
|
||||
WHERE a.num_oc=b.num_oc AND b.cerrada='N' AND b.status_t IS NULL AND
|
||||
a.num_oc=c.num_oc AND
|
||||
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
|
||||
c.cod_mov=d.cod_mov AND
|
||||
(d.control_despacho='SI' OR d.control_devolucion='SI') AND
|
||||
c.status_t IS NULL AND c.fecha <= ? AND
|
||||
( (a.cod_n=? AND a.cod_grupo=? AND a.cod_tipo=? AND a.cod_sec=?)
|
||||
OR EXISTS ( SELECT 1 FROM intb00003 e
|
||||
WHERE e.status_t IS NULL AND
|
||||
e.cod_n=? AND e.cod_grupo=? AND e.cod_tipo=? AND e.cod_sec=? AND
|
||||
a.cod_n=e.cod_n_s AND a.cod_grupo=e.cod_grupo_s AND
|
||||
a.cod_tipo=e.cod_tipo_s AND a.cod_sec=e.cod_sec_s ) )
|
||||
"
|
||||
PREPARE comando4 FROM selec
|
||||
EXECUTE comando4 INTO pcantidadConduce, valorConduces
|
||||
USING pfecha, pcodn,pcodgrupo,pcodtipo,pcodsec, pcodn,pcodgrupo,pcodtipo,pcodsec
|
||||
|
||||
LET valorOrdenes = valorOrdenes + valorConduces
|
||||
|
||||
# TRANSITO = ordenado - recibido (sin sustitutos, como el original; al corte)
|
||||
LET cantidad_ordenada = 0
|
||||
SELECT ISNULL(SUM(a.cantidad),0) INTO cantidad_ordenada
|
||||
FROM cotb00015 a, cotb00014 b
|
||||
WHERE a.cod_n=pcodn AND a.cod_grupo=pcodgrupo AND
|
||||
a.cod_tipo=pcodtipo AND a.cod_sec=pcodsec AND
|
||||
a.num_oc=b.num_oc AND b.cierre='N' AND a.status_t IS NULL AND
|
||||
b.fech_oc <= pfecha
|
||||
|
||||
LET cantidad_recibida = 0
|
||||
SELECT ISNULL(SUM(a.cantidad_2),0) INTO cantidad_recibida
|
||||
FROM iptb00006 a, cotb00015 b, cotb00014 c
|
||||
WHERE a.cod_n=pcodn AND a.cod_grupo=pcodgrupo AND
|
||||
a.cod_tipo=pcodtipo AND a.cod_sec=pcodsec AND
|
||||
a.cod_n=b.cod_n AND a.cod_grupo=b.cod_grupo AND a.cod_tipo=b.cod_tipo AND
|
||||
a.orden_compra=b.num_oc AND b.num_oc=c.num_oc AND
|
||||
c.cierre='N' AND a.status_t IS NULL AND a.fecha <= pfecha
|
||||
|
||||
LET transito = cantidad_ordenada - cantidad_recibida
|
||||
|
||||
IF cantidad_orden IS NULL THEN LET cantidad_orden = 0 END IF
|
||||
IF transito IS NULL THEN LET transito = 0 END IF
|
||||
IF pcantidadconduce IS NULL THEN LET pcantidadconduce = 0 END IF
|
||||
|
||||
RETURN cantidad_orden, pcantidadConduce, transito, existencia, reservado,
|
||||
valorOrdenes
|
||||
|
||||
END FUNCTION
|
||||
FUNCTION busca_reservas(pcodn, pcodgrupo, pcodtipo, pcodsec)
|
||||
DEFINE
|
||||
idx, pcodn, pcodgrupo, pcodtipo, pcodsec, dias SMALLINT,
|
||||
arr_reserva DYNAMIC ARRAY OF RECORD
|
||||
cotizacion_no INT,
|
||||
vendedor VARCHAR(100),
|
||||
nombre VARCHAR(100),
|
||||
cantidad DEC(12, 5),
|
||||
fecha CHAR(10)
|
||||
END RECORD,
|
||||
selec STRING,
|
||||
fecha DATE
|
||||
|
||||
SELECT a.dias_vence_reservas INTO dias FROM companias a
|
||||
LET fecha = TODAY
|
||||
LET selec =
|
||||
" SELECT a.cotizacion_no,RTRIM(c.nom1_emp)||' '||RTRIM(c.apell1_emp),b.nombre_cliente,a.cantidad_reservada,CONVERT(CHAR(10),a.fecha_vence_reserva,103)
|
||||
FROM vetb00051 a,vetb00050 b,adtb00003 c
|
||||
WHERE a.status_t IS NULL AND
|
||||
b.sec_vend = c.num_emp AND
|
||||
a.cotizacion_no = b.cotizacion_no AND
|
||||
a.cod_n = ? AND
|
||||
a.cod_grupo=? AND
|
||||
a.cod_tipo=? AND
|
||||
a.cod_sec=? AND a.cantidad_reservada IS NOT NULL AND
|
||||
a.fecha_vence_reserva >= ? AND
|
||||
DATEDIFF(DAY,a.fecha_vence_reserva ,a.fecha_inicio_reserva) <=? "
|
||||
PREPARE comando FROM selec
|
||||
DECLARE busca_reserva CURSOR FOR comando
|
||||
OPEN busca_reserva USING pcodn, pcodgrupo, pcodtipo, pcodsec, fecha, dias
|
||||
|
||||
DISPLAY selec
|
||||
LET idx = 1
|
||||
FOREACH busca_reserva INTO arr_reserva[idx].*
|
||||
LET idx = idx + 1
|
||||
END FOREACH
|
||||
OPEN WINDOW ipfmwd012 WITH FORM "ipfmwd012"
|
||||
DISPLAY ARRAY arr_reserva TO s_reserva.*
|
||||
CLOSE WINDOW ipfmwd012
|
||||
|
||||
END FUNCTION
|
||||
FUNCTION almacenes(pcodn, pcodgrupo, pcodtipo, pcodsec)
|
||||
DEFINE
|
||||
pcodn, pcodgrupo, pcodtipo, pcodsec SMALLINT,
|
||||
arr_existencia DYNAMIC ARRAY OF RECORD
|
||||
almacen VARCHAR(30),
|
||||
existencia DEC(12, 2)
|
||||
END RECORD,
|
||||
idx SMALLINT
|
||||
OPEN WINDOW w1 AT 1, 1 WITH FORM "almacenes"
|
||||
DECLARE busca_a CURSOR FOR
|
||||
SELECT b.descripcion, SUM(c.cantidad_2)
|
||||
FROM intb00009 b, iptb00006 c
|
||||
WHERE b.cod_bodega = c.bodega
|
||||
AND c.cod_n = pcodn
|
||||
AND c.cod_grupo = pcodgrupo
|
||||
AND c.cod_tipo = pcodtipo
|
||||
AND c.cod_sec = pcodsec
|
||||
AND c.status_t IS NULL
|
||||
GROUP BY b.descripcion
|
||||
|
||||
LET idx = 1
|
||||
FOREACH busca_a INTO arr_existencia[idx].*
|
||||
LET idx = idx + 1
|
||||
END FOREACH
|
||||
|
||||
DISPLAY ARRAY arr_existencia TO sexistencia.*
|
||||
CLOSE WINDOW w1
|
||||
|
||||
END FUNCTION
|
||||
{ ESTA FUNCION PARA BUSCAR LAS ORDENES QUE TIENE DISPONIBLES TODAVIA ESTA EN PROCESO DE DESARRLLO
|
||||
FECHA : 27/5/2016}
|
||||
FUNCTION busca_ordenes_reservadas(pcodn, pcodgrupo, pcodtipo, pcodsec)
|
||||
DEFINE
|
||||
pcodn, pcodgrupo, pcodtipo, pcodsec INT,
|
||||
ordenes DYNAMIC ARRAY OF RECORD
|
||||
num_oc INT,
|
||||
fecha DATE,
|
||||
vendedor VARCHAR(100),
|
||||
cantidad DEC(12, 5),
|
||||
cantidad_Desp DEC(12, 5),
|
||||
disponible, pendiente, balance DEC(12, 5),
|
||||
|
||||
codigo VARCHAR(25)
|
||||
END RECORD,
|
||||
i SMALLINT,
|
||||
cantidad_desp1, total_cantidad, total_desp, existencia DEC(12, 5)
|
||||
OPEN WINDOW w2 WITH FORM "ipfmwd017"
|
||||
# BUSCA EXISTENCIA
|
||||
|
||||
SELECT ISNULL(SUM(a.cantidad_2), 0)
|
||||
INTO existencia
|
||||
FROM iptb00006 a
|
||||
WHERE (a.cod_n = pcodn
|
||||
AND a.cod_grupo = pcodgrupo
|
||||
AND a.cod_tipo = pcodtipo
|
||||
AND a.cod_sec = pcodsec)
|
||||
AND a.status_t IS NULL
|
||||
|
||||
DECLARE busca_orden CURSOR FOR
|
||||
SELECT a.num_oc,
|
||||
CONVERT(char(10), b.fecha_oc, 103),
|
||||
c.nom1_emp || ' ' || c.apell1_emp,
|
||||
sum(a.cantidad),
|
||||
'0'
|
||||
FROM prtb00013 a, prtb00012 b, adtb00003 c
|
||||
WHERE a.num_oc = b.num_oc
|
||||
AND b.cerrada = 'N'
|
||||
AND b.sec_vend = c.num_emp
|
||||
AND b.status_t IS NULL
|
||||
AND (a.cod_n = pcodn
|
||||
AND a.cod_grupo = pcodgrupo
|
||||
AND a.cod_tipo = pcodtipo
|
||||
AND a.cod_sec = pcodsec)
|
||||
group by a.num_oc,b.fecha_oc,c.nom1_emp,c.apell1_emp
|
||||
|
||||
UNION SELECT a.num_oc,
|
||||
CONVERT(char(10), b.fecha_oc, 103),
|
||||
c.nom1_emp || ' ' || c.apell1_emp,
|
||||
sum(a.cantidad),
|
||||
'0'
|
||||
FROM prtb00013 a, prtb00012 b, adtb00003 c, intb00003 e
|
||||
WHERE a.num_oc = b.num_oc
|
||||
AND b.cerrada = 'N'
|
||||
AND b.sec_vend = c.num_emp
|
||||
AND b.status_t IS NULL
|
||||
AND (e.cod_n = pcodn
|
||||
AND e.cod_grupo = pcodgrupo
|
||||
AND e.cod_tipo = pcodtipo
|
||||
AND e.cod_sec = pcodsec)
|
||||
AND (a.cod_n = e.cod_n_s
|
||||
AND a.cod_grupo = e.cod_grupo_s
|
||||
AND a.cod_tipo = e.cod_tipo_s
|
||||
AND a.cod_sec = e.cod_sec_s)
|
||||
group by a.num_oc,b.fecha_oc,c.nom1_emp,c.apell1_emp
|
||||
|
||||
|
||||
LET i = 1
|
||||
LET ordenes[i].vendedor = 'EXISTENCIA: '
|
||||
LET ordenes[i].balance = existencia
|
||||
LET i = i + 1
|
||||
LET total_desp = 0
|
||||
LET total_cantidad = 0
|
||||
|
||||
FOREACH busca_orden INTO ordenes[i].*
|
||||
LET ordenes[i].cantidad_Desp = 0
|
||||
SELECT ISNULL(SUM(c.cantidad_2), 0)
|
||||
INTO ordenes[i].cantidad_Desp
|
||||
FROM prtb00012 b, iptb00006 c, iptb00005 d
|
||||
WHERE (b.num_oc = c.num_oc)
|
||||
AND (c.num_oc = ordenes[i].num_oc)
|
||||
AND b.cerrada = 'N'
|
||||
AND b.status_t IS NULL
|
||||
AND (c.cod_n = pcodn
|
||||
AND c.cod_grupo = pcodgrupo
|
||||
AND c.cod_tipo = pcodtipo
|
||||
AND c.cod_sec = pcodsec)
|
||||
AND c.cod_mov = d.cod_mov
|
||||
AND (d.control_despacho = 'SI' OR d.control_devolucion = 'SI')
|
||||
AND c.status_t IS NULL
|
||||
|
||||
LET cantidad_Desp1 = 0
|
||||
SELECT ISNULL(SUM(c.cantidad_2), 0)
|
||||
INTO cantidad_Desp1
|
||||
FROM prtb00012 b, iptb00006 c, iptb00005 d, intb00003 e
|
||||
WHERE (b.num_oc = c.num_oc)
|
||||
AND (c.num_oc = ordenes[i].num_oc)
|
||||
AND b.cerrada = 'N'
|
||||
AND b.status_t IS NULL
|
||||
AND (e.cod_n = pcodn
|
||||
AND e.cod_grupo = pcodgrupo
|
||||
AND e.cod_tipo = pcodtipo
|
||||
AND e.cod_sec = pcodsec)
|
||||
AND (c.cod_n = e.cod_n_s
|
||||
AND c.cod_grupo = e.cod_grupo_s
|
||||
AND c.cod_tipo = e.cod_tipo_s
|
||||
AND c.cod_sec = e.cod_sec_s)
|
||||
AND c.cod_mov = d.cod_mov
|
||||
AND (d.control_despacho = 'SI' OR d.control_devolucion = 'SI')
|
||||
AND c.status_t IS NULL
|
||||
|
||||
LET ordenes[i].cantidad_Desp = ordenes[i].cantidad_Desp + cantidad_desp1
|
||||
|
||||
IF ordenes[i].cantidad > 0 THEN
|
||||
LET total_cantidad = total_cantidad + ordenes[i].cantidad
|
||||
END IF
|
||||
|
||||
LET total_desp = total_desp + ordenes[i].cantidad_Desp
|
||||
|
||||
LET ordenes[i].pendiente =
|
||||
ordenes[i].cantidad + ordenes[i].cantidad_Desp
|
||||
IF ordenes[i - 1].balance IS NOT NULL THEN
|
||||
LET ordenes[i].balance =
|
||||
ordenes[i - 1].balance - ordenes[i].pendiente
|
||||
END IF
|
||||
LET i = i + 1
|
||||
END FOREACH
|
||||
IF i > 1 THEN
|
||||
LET i = i + 1
|
||||
LET ordenes[i].vendedor = "TOTALES=====> "
|
||||
LET ordenes[i].cantidad = total_cantidad
|
||||
LET ordenes[i].cantidad_Desp = total_desp
|
||||
# LET ordenes[i].disponible = total_cantidad + total_desp
|
||||
|
||||
END IF
|
||||
DISPLAY ARRAY ordenes TO sordenes.*
|
||||
|
||||
CLOSE WINDOW w2
|
||||
END FUNCTION
|
||||
@@ -67,3 +67,13 @@ DEFINE numero_msg INT,
|
||||
END IF
|
||||
RETURN
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION usuarioSistema(xuser)
|
||||
DEFINE xuser,nombre,email STRING
|
||||
|
||||
SELECT ISNULL(RTRIM(b.nom1_emp)||' '||RTRIM(b.apell1_emp),' '),a.email INTO nombre,email FROM seg0001 a,adtb00003 b
|
||||
WHERE a.usuario = xuser AND
|
||||
a.num_emp = b.num_emp
|
||||
|
||||
RETURN nombre,email
|
||||
END FUNCTION
|
||||
|
||||
Reference in New Issue
Block a user