JSOTO Alta y compilacion G6 de programas CG, Cheques, Activos, Tesoreria, Repuestos e Informatica
Merge de main (ipprrp013/014/046/053) con conflictos resueltos: - mbsERP.4pw: ipprrp014 conserva ambos 4rp y su 4fd. - bin/ipprrp014.4rp: columnas MARGEN/CLASIF. + titulo IPPRRP014. Programas agregados a mbsERP.4pw (53 compilan y enlazan con fgl602): - CONTABILIDAD GENERAL, ACTIVOS FIJOS, REPUESTOS; grupos nuevos TESORERIA, CHEQUES e INFORMATICA (segprmt001 = seguridad2.0/segprmt0001.4gl). - irdir copiado de 3.20 PROYECTOS/irdir a PROYECTO/irdir; helpers de PROYECTOS/otrodir en FUNCIONES_IR (departamento -> irdepartamento.4gl). - Fuentes mas nuevos de 3.20: edprrp118, edprrp080, acprrp010, cgprmt022. - FUNCIONES: GeneraEntradaDiario.4gl a la version 3.20 + costoLiquidacion.4gl. - Ajustes G6: existe duplicado en irprgb000, fakeData de 22 campos y answer2 en irprmt036/020 (ApiMaintainC), selectOutputSimple en irprcs008, schemas de forms a smarmotech, referencia declarada en cgprmt005. - cgprmt005 sigue sin enlazar: requiere funciones de EXTERIOR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,14 +35,16 @@
|
||||
<RecordField colName="" fieldIdRef="26" name="xnum_emp" sqlTabName="" table_alias_name="" uid="{cbe6a079-16f8-4d94-8834-508b8802f0eb}"/>
|
||||
<RecordField colName="" fieldIdRef="27" name="nombre_empleado" sqlTabName="" table_alias_name="" uid="{025a8c47-52a6-46a7-809d-068fce546410}"/>
|
||||
<RecordField colName="" fieldIdRef="28" name="bloque" sqlTabName="" table_alias_name="" uid="{1fdfddbb-c15b-430b-900a-277fe124636e}"/>
|
||||
<RecordField colName="" fieldIdRef="29" name="xnum_ocp" sqlTabName="" table_alias_name="" uid="{3b6f1c2e-8d4a-4f7b-9e21-6a5c0d9e7f11}"/>
|
||||
<RecordField colName="" fieldIdRef="30" name="proveedor" sqlTabName="" table_alias_name="" uid="{9c2e7a41-5b3d-4e8f-a1c6-2d7f8e0b4a22}"/>
|
||||
</Record>
|
||||
<Form gridHeight="31" gridWidth="163" name="acfmrp010" style="basic" text="ETIQUETAS">
|
||||
<Form gridHeight="33" gridWidth="163" name="acfmrp010" style="basic" text="ETIQUETAS">
|
||||
<ActionDefaultList name="ActionDefaultList1">
|
||||
<ActionDefault image="cancel" name="cancel" text="Cancela operacion"/>
|
||||
<ActionDefault image="find" name="busca" text="Busca informacion"/>
|
||||
<ActionDefault image="printer" name="imprime" text="Imprimir"/>
|
||||
</ActionDefaultList>
|
||||
<Grid gridHeight="28" gridWidth="163" name="Grid1" posX="0" posY="1">
|
||||
<Grid gridHeight="30" gridWidth="163" name="Grid1" posX="0" posY="1">
|
||||
<Group gridHeight="10" gridWidth="138" name="Group1" posX="1" posY="1" text="INFORMACIONES SOBRE EL TAMANO DE LA ETIQUETA E INVENTARIO">
|
||||
<Label posX="1" posY="1" text="INVENTARIO"/>
|
||||
<ComboBox aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="inventario" defaultValue="PRODUCTOS TERMINADOS" fieldId="9" gridHeight="1" gridWidth="43" include="ACTIVOS FIJOS|PRODUCTOS TERMINADOS|MATERIA PRIMA|REPUESTOS" items="ACTIVOS FIJOS, PRODUCTOS TERMINADOS, MATERIA PRIMA, REPUESTOS" name="inventario" posX="20" posY="1" sqlTabName="formonly" tabIndex="1" table_alias_name="" widget="ComboBox">
|
||||
@@ -99,7 +101,7 @@
|
||||
<Label posX="2" posY="4" text="DEPARTAMENTO"/>
|
||||
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="codigo_dp" fieldId="13" gridHeight="1" gridWidth="7" name="codigo_dp" posX="21" posY="4" sqlTabName="formonly" tabIndex="13" table_alias_name="" widget="Edit"/>
|
||||
</Group>
|
||||
<Group gridHeight="6" gridWidth="70" name="Group4" posX="70" posY="11" text="Informacion Orden">
|
||||
<Group gridHeight="8" gridWidth="70" name="Group4" posX="70" posY="11" text="Informacion Orden">
|
||||
<Label gridHeight="1" gridWidth="10" name="Label2" posX="3" posY="1" text="Orden"/>
|
||||
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="23" gridHeight="1" gridWidth="10" name="xnum_oc" posX="17" posY="1" sqlTabName="" tabIndex="25" table_alias_name="" title="Edit1" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="10" name="Label3" posX="3" posY="2" text="Cliente"/>
|
||||
@@ -109,8 +111,12 @@
|
||||
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="27" gridHeight="1" gridWidth="40" name="nombre_empleado" posX="28" posY="3" sqlTabName="" tabIndex="28" table_alias_name="" title="Edit3" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="10" name="Label5" posX="3" posY="4" text="Bloque"/>
|
||||
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" case="upper" colName="" fieldId="28" gridHeight="1" gridWidth="27" name="bloque" posX="17" posY="4" scroll="true" sqlTabName="" tabIndex="29" table_alias_name="" title="Edit1" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="12" name="Label6" posX="3" posY="5" text="Orden Compra"/>
|
||||
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" comment="Orden de compra (cotb00014)" fieldId="29" gridHeight="1" gridWidth="10" name="xnum_ocp" posX="17" posY="5" sqlTabName="" tabIndex="30" table_alias_name="" title="Edit4" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="10" name="Label7" posX="3" posY="6" text="Proveedor"/>
|
||||
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="" fieldId="30" gridHeight="1" gridWidth="51" name="proveedor" posX="17" posY="6" sqlTabName="" tabIndex="31" table_alias_name="" title="Edit5" widget="Edit"/>
|
||||
</Group>
|
||||
<Group gridHeight="9" gridWidth="161" name="Group3" posX="1" posY="17" text="MEDIDAS, SOLO PARA MATERIA PRIMA O PRODUCTOS TERMINADOS">
|
||||
<Group gridHeight="9" gridWidth="161" name="Group3" posX="1" posY="19" text="MEDIDAS, SOLO PARA MATERIA PRIMA O PRODUCTOS TERMINADOS">
|
||||
<Table gridHeight="5" gridWidth="157" name="Table1" posX="2" posY="2" totalRows="4" unitWidth="characters" width="157">
|
||||
<CheckBox aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="imp" defaultValue="NO" fieldId="14" gridHeight="1" gridWidth="3" name="imp" notNull="true" posX="0" posY="0" required="true" sqlTabName="formonly" tabIndex="14" table_alias_name="" title="IMPRIME" valueChecked="SI" valueUnchecked="NO" widget="CheckBox"/>
|
||||
<Edit aggregateColName="" aggregateName="" aggregateTableAliasName="" aggregateTableName="" colName="pcodid" fieldId="0" gridHeight="1" gridWidth="10" name="pcodid" posX="3" posY="0" scroll="true" sqlTabName="formonly" tabIndex="15" table_alias_name="" widget="Edit"/>
|
||||
|
||||
@@ -14,7 +14,9 @@ GLOBALS
|
||||
kcantidad DEC(12,4),
|
||||
codlista,cia_logo SMALLINT,
|
||||
xnum_emp,xnum_oc INT,
|
||||
cliente,nombre_empleado,nom1,nom2,apell1,apell2 VARCHAR(100)
|
||||
xnum_ocp INT, -- orden de compra (cotb00014)
|
||||
cliente,nombre_empleado,nom1,nom2,apell1,apell2 VARCHAR(100),
|
||||
proveedor VARCHAR(100) -- proveedor de la orden de compra (cotb00001)
|
||||
MAIN
|
||||
DEFER INTERRUPT
|
||||
CALL ARG_VAL(1) RETURNING usuarios
|
||||
@@ -81,7 +83,16 @@ ON ACTION cancel
|
||||
FROM codigo_act,descripcion_act,codigo_dp
|
||||
END IF
|
||||
IF inventario = "PRODUCTOS TERMINADOS" THEN
|
||||
INPUT BY NAME xnum_oc,xnum_emp,bloque
|
||||
INPUT BY NAME xnum_oc,xnum_ocp,xnum_emp,bloque
|
||||
AFTER FIELD xnum_ocp
|
||||
IF xnum_ocp IS NULL THEN
|
||||
LET proveedor = NULL
|
||||
DISPLAY BY NAME proveedor
|
||||
ELSE
|
||||
IF NOT busca_proveedor_oc() THEN
|
||||
NEXT FIELD xnum_ocp
|
||||
END IF
|
||||
END IF
|
||||
ON ACTION busca_emp
|
||||
CALL busca_empleado1() RETURNING Xnum_emp,nom1,nom2,apell1,apell2
|
||||
LET nombre_empleado = xnum_emp USING "<<<<<","-",nom1 CLIPPED,apell1 CLIPPED
|
||||
@@ -127,7 +138,15 @@ ON ACTION cancel
|
||||
CALL fgl_Winmessage("INFO","EMPLEADO NO EXISTE","INFO")
|
||||
NEXT FIELD xnum_emp
|
||||
END IF
|
||||
DISPLAY BY NAME nombre_empleado
|
||||
DISPLAY BY NAME nombre_empleado
|
||||
END IF
|
||||
IF xnum_ocp IS NOT NULL THEN
|
||||
IF NOT busca_proveedor_oc() THEN
|
||||
NEXT FIELD xnum_ocp
|
||||
END IF
|
||||
ELSE
|
||||
LET proveedor = NULL
|
||||
DISPLAY BY NAME proveedor
|
||||
END IF
|
||||
EXIT INPUT
|
||||
END INPUT
|
||||
@@ -243,25 +262,25 @@ CALL set_count(idx-1)
|
||||
INPUT ARRAY despiece WITHOUT DEFAULTS FROM smedida.*
|
||||
AFTER FIELD lado3
|
||||
LET idx = arr_curr()
|
||||
IF despiece[idx].unidad= "M2" THEN
|
||||
LET despiece[idx].medida =
|
||||
despiece[idx].cantidad * (despiece[idx].lado1 * despiece[idx].lado2)
|
||||
END IF
|
||||
|
||||
IF despiece[idx].unidad= "M3" THEN
|
||||
LET despiece[idx].medida =
|
||||
despiece[idx].cantidad * (despiece[idx].lado1 * despiece[idx].lado2 * despiece[idx].lado3)
|
||||
END IF
|
||||
|
||||
IF despiece[idx].unidad= "ML" THEN
|
||||
LET despiece[idx].medida =
|
||||
despiece[idx].cantidad * despiece[idx].lado1
|
||||
LET despiece[idx].lado2 = 0
|
||||
END IF
|
||||
|
||||
IF despiece[idx].unidad= "UD" OR despiece[idx].unidad= "GL" THEN
|
||||
LET despiece[idx].medida = despiece[idx].cantidad
|
||||
END IF
|
||||
IF despiece[idx].unidad= "M2" THEN
|
||||
LET despiece[idx].medida =
|
||||
despiece[idx].cantidad * (despiece[idx].lado1 * despiece[idx].lado2)
|
||||
END IF
|
||||
|
||||
IF despiece[idx].unidad= "M3" THEN
|
||||
LET despiece[idx].medida =
|
||||
despiece[idx].cantidad * (despiece[idx].lado1 * despiece[idx].lado2 * despiece[idx].lado3)
|
||||
END IF
|
||||
|
||||
IF despiece[idx].unidad= "ML" THEN
|
||||
LET despiece[idx].medida =
|
||||
despiece[idx].cantidad * despiece[idx].lado1
|
||||
LET despiece[idx].lado2 = 0
|
||||
END IF
|
||||
|
||||
IF despiece[idx].unidad= "UD" OR despiece[idx].unidad= "GL" THEN
|
||||
LET despiece[idx].medida = despiece[idx].cantidad
|
||||
END IF
|
||||
|
||||
AFTER FIELD cantidad
|
||||
LET idx = arr_curr()
|
||||
@@ -376,9 +395,29 @@ REPORT activos(x,descripcion,xfecha_compra,xprecio,xsimbolo,xcodigo,xunidadmed,
|
||||
END IF
|
||||
PRINTX x,codigo_dp,descripcion,descripcion_dp,fecha,barcodigo_act,
|
||||
Xfecha_compra,xprecio,xsimbolo,xcodigo,xvalor_medida,xcantidad,
|
||||
xlado1,xlado2,xlado3,xunidadmed,cia_logo,xnum_emp,xnum_oc,cliente,nombre_empleado,bloque
|
||||
xlado1,xlado2,xlado3,xunidadmed,cia_logo,xnum_emp,xnum_oc,cliente,nombre_empleado,bloque,
|
||||
xnum_ocp,proveedor
|
||||
END REPORT
|
||||
|
||||
# Valida la orden de compra (cotb00014, no anulada) y trae su proveedor (cotb00001)
|
||||
FUNCTION busca_proveedor_oc()
|
||||
LET proveedor = NULL
|
||||
SELECT CAST(b.cod_sp AS VARCHAR(4))+'-'+
|
||||
CAST(b.cod_sp_sec AS VARCHAR(4))+' '+RTRIM(b.nom_sp)
|
||||
INTO proveedor
|
||||
FROM cotb00014 a,cotb00001 b
|
||||
WHERE a.num_oc = xnum_ocp AND a.status_t IS NULL AND
|
||||
a.cod_sp = b.cod_sp AND a.cod_sp_sec = b.cod_sp_sec
|
||||
IF STATUS = NOTFOUND THEN
|
||||
LET proveedor = NULL
|
||||
DISPLAY BY NAME proveedor
|
||||
CALL fgl_winmessage("INFO","ORDEN DE COMPRA NO EXISTE O ESTA ANULADA","INFO")
|
||||
RETURN FALSE
|
||||
END IF
|
||||
DISPLAY BY NAME proveedor
|
||||
RETURN TRUE
|
||||
END FUNCTION
|
||||
|
||||
|
||||
FUNCTION codigo_128(cod_val,pcantidad)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user