This commit is contained in:
Abel López
2026-08-31 16:43:06 -04:00
7 changed files with 204 additions and 159 deletions
+6 -6
View File
@@ -12,8 +12,8 @@
<RecordField colName="unidad_med" fieldIdRef="5" fieldType="TABLE_COLUMN" name="intb00001.unidad_med" sqlTabName="intb00001" uid="{720c8ace-b521-4ab2-93a4-5aaebd3c052d}"/>
<RecordField colName="fech_in" fieldIdRef="7" name="fech_in" sqlTabName="formonly" sqlType="DATE" uid="{f7cdd239-7791-4788-9c92-1e29d181a356}"/>
<RecordField colName="fech_fi" fieldIdRef="8" name="fech_fi" sqlTabName="formonly" sqlType="DATE" uid="{ef37027a-09ec-4b91-8016-58321fe9523c}"/>
<RecordField fieldIdRef="6" name="bodega" uid="{900b8556-f902-4c08-b7f1-a2de9d054534}"/>
<RecordField fieldIdRef="9" name="mensaje_ini" uid="{5fcab4dd-77dd-4cc5-8641-848be157b658}"/>
<RecordField colName="bodega" fieldIdRef="6" name="bodega" sqlTabName="formonly" uid="{900b8556-f902-4c08-b7f1-a2de9d054534}"/>
<RecordField colName="mensaje_ini" fieldIdRef="9" name="mensaje_ini" sqlTabName="formonly" uid="{5fcab4dd-77dd-4cc5-8641-848be157b658}"/>
</Record>
<Record name="s_csmov" uid="{d4ca2e1f-7d30-4026-84bc-8e7b2b0ae0cb}">
<RecordField fieldIdRef="18" name="num_doc" uid="{15a69691-abe4-4c90-bb06-486540da34b4}"/>
@@ -25,8 +25,8 @@
<RecordField fieldIdRef="13" name="parent_id" uid="{4a028887-b5ed-4b25-9eb1-702752bee614}"/>
<RecordField fieldIdRef="19" name="chield_id" uid="{a972d067-b0bc-478a-add7-995fd25b5c9c}"/>
</Record>
<Form gridHeight="24" gridWidth="80" name="infmcs006">
<Grid gridHeight="24" gridWidth="80" name="grid1" posX="0" posY="0">
<Form gridHeight="24" gridWidth="86" name="infmcs006" text="MOVIMIENTO MATERIA PRIMA">
<Grid gridHeight="24" gridWidth="86" name="grid1" posX="0" posY="0">
<Label gridHeight="1" gridWidth="22" justify="right" name="label1" posX="1" posY="1" text="Codigo Materia Prima :"/>
<Edit autoNext="true" colName="cod_n" fieldId="0" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00001.cod_n" posX="24" posY="1" sqlTabName="intb00001" tabIndex="1" widget="Edit"/>
<Edit autoNext="true" colName="cod_grupo" fieldId="1" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00001.cod_grupo" posX="28" posY="1" sqlTabName="intb00001" tabIndex="2" widget="Edit"/>
@@ -39,8 +39,8 @@
<Label gridHeight="1" gridWidth="14" justify="right" name="label7" posX="9" posY="3" text="Fecha Final:"/>
<DateEdit colName="fech_fi" fieldId="8" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="fech_fi" posX="24" posY="3" sqlTabName="formonly" sqlType="DATE" tabIndex="8" widget="DateEdit"/>
<Label gridHeight="1" gridWidth="7" justify="right" name="label5" posX="16" posY="4" text="Bodega:"/>
<ComboBox fieldId="6" gridHeight="1" gridWidth="48" items="" name="bodega" posX="24" posY="4" tabIndex="-1" title="combobox1" widget="ComboBox"/>
<Edit fieldId="9" gridHeight="1" gridWidth="53" name="mensaje_ini" posX="2" posY="7" scroll="true" style="encabezado name" tabIndex="-1" title="edit1" widget="Edit"/>
<ComboBox colName="bodega" fieldId="6" gridHeight="1" gridWidth="60" items="" name="bodega" posX="24" posY="4" sqlTabName="formonly" tabIndex="9" title="combobox1" widget="ComboBox"/>
<Edit colName="mensaje_ini" fieldId="9" gridHeight="1" gridWidth="53" name="mensaje_ini" posX="2" posY="7" scroll="true" sqlTabName="formonly" style="encabezado name" tabIndex="-1" title="edit1" widget="Edit"/>
<Group gridHeight="9" gridWidth="76" name="group1" posX="2" posY="8">
<Tree gridHeight="6" gridWidth="73" idColumn="chield_id" name="table1" parentIdColumn="parent_id" posX="2" posY="1" style="Table.detalle" totalRows="5">
<Edit fieldId="18" gridHeight="1" gridWidth="8" name="num_doc" posX="0" posY="0" tabIndex="-1" title="Documento" widget="Edit"/>
+4 -2
View File
@@ -1,10 +1,11 @@
database smarmotech
screen size 24 by 80
screen size 24 by 80 TITLE "CONSULTA BALANCES MATERIA PRIMA"
{
Codigo Materia Prima :[a]-[b]-[c ]-[d ] [a1 ] [a2 ]
Bodega: [h ]
Fecha Inicial:[f1 ] Fecha Final:[f2 ]
[g ]
\g---------------------------------------------------------------------------\g
C a n t i d a d
Fecha Documento Entrada Salida Balance
@@ -31,7 +32,7 @@ c = intb00001.cod_tipo,autonext;
d = intb00001.cod_sec,autonext;
a1 = intb00001.descrip_esp,noentry;
a2 = intb00001.unidad_med,noentry;
h = intb00006.bodega,autonext;
COMBOBOX h = formonly.bodega;
f1 = formonly.fech_in type date,format = "dd/mm/yyyy";
f2 = formonly.fech_fi type date,format = "dd/mm/yyyy";
d1 = intb00006.num_doc;
@@ -39,6 +40,7 @@ f2 = formonly.fech_fi type date,format = "dd/mm/yyyy";
d4 = formonly.entrada;
d5 = formonly.salida;
d6 = formonly.balance;
g = formonly.mensaje_ini,noentry;
instructions
screen record s_csmov[8] (num_doc,fecha,entrada,salida,balance)
+23 -26
View File
@@ -1,33 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="3140a" name="ManagedForm" uid="{65e99c2b-637a-44ff-8fe8-a549b250be19}">
<ManagedForm databaseName="smarmotech" fileVersion="40100" gstVersion="60003" name="ManagedForm" uid="{2fae125f-712d-4f29-87a1-51b726921e16}">
<AGSettings>
<DynamicProperties version="2"/>
<DynamicProperties version="4"/>
</AGSettings>
<Record name="record1" uid="{4fb0f919-f3a6-4b1e-aeea-b43f83982b8d}">
<RecordField colName="cod_mov" fieldIdRef="1" fieldType="TABLE_COLUMN" name="intb00006.cod_mov" sqlTabName="intb00006" uid="{6d6beaab-e13f-455b-a61c-41a07f5bb273}"/>
<RecordField colName="descrip_mov" fieldIdRef="0" name="descrip_mov" sqlTabName="formonly" uid="{cf4f43bc-bc24-4688-944e-dca1a58acf72}"/>
<RecordField colName="num_doc" fieldIdRef="2" fieldType="TABLE_COLUMN" name="intb00006.num_doc" sqlTabName="intb00006" uid="{7c5fe677-d27f-45db-a069-79ea3f129654}"/>
<RecordField colName="fecha" fieldIdRef="5" fieldType="TABLE_COLUMN" name="intb00006.fecha" sqlTabName="intb00006" uid="{1e9e7956-1f9c-4dec-9275-727f4c491b23}"/>
<RecordField colName="cod_sp" fieldIdRef="3" name="cod_sp" sqlTabName="formonly" uid="{f394897d-ade5-4aca-8038-701585ee1147}"/>
<RecordField colName="cod_sp_sec" fieldIdRef="4" name="cod_sp_sec" sqlTabName="formonly" uid="{20475402-fe48-4d1b-8183-fa75e7cfe42c}"/>
<RecordField fieldIdRef="6" name="bodega" uid="{b7e97b0b-c303-4171-bd41-37f7be2a872f}"/>
<Record name="record1" uid="{32862f17-82e9-4928-817b-6c11b279ff27}">
<RecordField colName="cod_mov" fieldIdRef="1" fieldType="TABLE_COLUMN" name="intb00006.cod_mov" sqlTabName="intb00006" uid="{50bb55c2-f401-4e27-acc9-fa6cf556b0d9}"/>
<RecordField colName="descrip_mov" fieldIdRef="0" name="descrip_mov" sqlTabName="formonly" uid="{28315cc1-66c8-423e-a86b-af455ec52be9}"/>
<RecordField colName="num_doc" fieldIdRef="2" fieldType="TABLE_COLUMN" name="intb00006.num_doc" sqlTabName="intb00006" uid="{7368fae7-1c4b-437e-9c34-1f1572963b87}"/>
<RecordField colName="fecha" fieldIdRef="5" fieldType="TABLE_COLUMN" name="intb00006.fecha" sqlTabName="intb00006" uid="{0f076029-3b03-4f4f-bde6-3616828a265a}"/>
<RecordField colName="bodega" fieldIdRef="6" name="bodega" sqlTabName="formonly" uid="{3aabc13b-ab73-4e6c-acb9-389250bda868}"/>
<RecordField colName="cod_sp" fieldIdRef="3" name="cod_sp" sqlTabName="formonly" uid="{fb3bd8a4-297a-4ff5-93cc-dafeb2f762c9}"/>
<RecordField colName="cod_sp_sec" fieldIdRef="4" name="cod_sp_sec" sqlTabName="formonly" uid="{3b346e58-ffc8-4572-bc0f-49c1312d3120}"/>
</Record>
<Form gridHeight="9" gridWidth="56" name="infmwd005" text="ANULAR DOCUMENTOS">
<Grid gridHeight="9" gridWidth="56" name="grid1" posX="0" posY="0">
<Label gridHeight="1" gridWidth="10" name="label4" posX="2" posY="1" text="Bodega"/>
<ComboBox fieldId="6" gridHeight="1" gridWidth="34" items="" name="bodega" posX="21" posY="1" tabIndex="-1" title="combobox1" widget="ComboBox"/>
<Label gridHeight="1" gridWidth="18" name="label1" posX="2" posY="2" text="Codigo Movimiento"/>
<Edit colName="cod_mov" fieldId="1" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="2" name="intb00006.cod_mov" posX="21" posY="2" sqlTabName="intb00006" tabIndex="1" widget="Edit"/>
<Edit colName="descrip_mov" fieldId="0" gridHeight="1" gridWidth="30" name="descrip_mov" noEntry="true" posX="25" posY="2" sqlTabName="formonly" tabIndex="2" widget="Edit"/>
<Label gridHeight="1" gridWidth="16" name="label2" posX="2" posY="3" text="Numero Documento"/>
<Edit colName="num_doc" fieldId="2" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="6" name="intb00006.num_doc" posX="21" posY="3" sqlTabName="intb00006" tabIndex="3" widget="Edit"/>
<Label gridHeight="1" gridWidth="5" name="label3" posX="2" posY="4" text="Fecha"/>
<Edit colName="fecha" fieldId="5" fieldType="TABLE_COLUMN" format="dd/mm/yy" gridHeight="1" gridWidth="9" name="intb00006.fecha" noEntry="true" posX="21" posY="4" sqlTabName="intb00006" tabIndex="4" widget="Edit"/>
<Edit colName="cod_sp" fieldId="3" gridHeight="1" gridWidth="2" name="cod_sp" noEntry="true" posX="21" posY="5" sqlTabName="formonly" tabIndex="5" widget="Edit"/>
<Edit colName="cod_sp_sec" fieldId="4" gridHeight="1" gridWidth="4" name="cod_sp_sec" noEntry="true" posX="25" posY="5" sqlTabName="formonly" tabIndex="6" widget="Edit"/>
<Form gridHeight="5" gridWidth="56" name="infmwd005" text="ANULAR DOCUMENTOS">
<Grid gridHeight="5" gridWidth="56" name="grid1" posX="0" posY="0">
<Label gridHeight="1" gridWidth="18" name="label1" posX="2" posY="0" text="Codigo Movimiento"/>
<Edit colName="cod_mov" fieldId="1" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="2" name="intb00006.cod_mov" posX="21" posY="0" sqlTabName="intb00006" tabIndex="1" widget="Edit"/>
<Edit colName="descrip_mov" fieldId="0" gridHeight="1" gridWidth="30" name="descrip_mov" noEntry="true" posX="25" posY="0" sqlTabName="formonly" tabIndex="2" widget="Edit"/>
<Label gridHeight="1" gridWidth="16" name="label2" posX="2" posY="1" text="Numero Documento"/>
<Edit colName="num_doc" fieldId="2" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="6" name="intb00006.num_doc" posX="21" posY="1" sqlTabName="intb00006" tabIndex="3" widget="Edit"/>
<Label gridHeight="1" gridWidth="5" name="label3" posX="2" posY="2" text="Fecha"/>
<Edit colName="fecha" fieldId="5" fieldType="TABLE_COLUMN" format="dd/mm/yy" gridHeight="1" gridWidth="9" name="intb00006.fecha" noEntry="true" posX="21" posY="2" sqlTabName="intb00006" tabIndex="4" widget="Edit"/>
<Label gridHeight="1" gridWidth="6" name="label4" posX="2" posY="3" text="Bodega"/>
<ComboBox colName="bodega" fieldId="6" gridHeight="1" gridWidth="35" items="" name="bodega" posX="21" posY="3" sqlTabName="formonly" tabIndex="5" widget="ComboBox"/>
<Edit colName="cod_sp" fieldId="3" gridHeight="1" gridWidth="2" name="cod_sp" noEntry="true" posX="21" posY="4" sqlTabName="formonly" tabIndex="6" widget="Edit"/>
<Edit colName="cod_sp_sec" fieldId="4" gridHeight="1" gridWidth="4" name="cod_sp_sec" noEntry="true" posX="25" posY="4" sqlTabName="formonly" tabIndex="7" widget="Edit"/>
</Grid>
</Form>
<DiagramLayout>
<![CDATA[AAAAAgAAAEwAewA0AGYAYgAwAGYAOQAxADkALQBmADMAYQA2AC0ANABiADEAZQAtAGEAZQBlAGEALQBiADQAMwBmADgAMwA5ADgAMgBiADgAZAB9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ==]]>
</DiagramLayout>
</ManagedForm>
+2
View File
@@ -16,6 +16,7 @@ LAYOUT (TEXT="ANULAR DOCUMENTOS")
Codigo Movimiento [f0][a ]
Numero Documento [f02 ]
Fecha [f5 ]
Bodega [bod]
[f1][f2 ]
}
end
@@ -28,6 +29,7 @@ f02 = intb00006.num_doc;
f1 = formonly.cod_sp,noentry;
f2 = formonly.cod_sp_sec,noentry;
f5 = intb00006.fecha,noentry,format = "dd/mm/yy";
COMBOBOX bod = formonly.bodega;
instructions
delimiters " "
end
+2 -5
View File
@@ -101,15 +101,13 @@ FUNCTION inprcs006()
END INPUT
CONSTRUCT criterio ON p.bodega FROM bodega
BEFORE CONSTRUCT
CALL bodegas('1')
ON ACTION buscar ATTRIBUTE(TEXT="Ejecuta Busqueda",IMAGE="find")
IF datos_cons.fech_fi IS NULL THEN
CALL msg(16)
NEXT FIELD fecha_in
CONTINUE DIALOG
END IF
LET criterio = "p.bodega = ", datos_cons.bodega
LET query1 =
"SELECT ISNULL(SUM(p.cantidad_2),0) FROM intb00006 p
WHERE ", criterio clipped," and p.cod_n = ? and p.cod_grupo = ? and
@@ -207,7 +205,6 @@ FUNCTION inprcs006()
# FOR idx = 1 TO csmov2.getLength()
# DISPLAY csmov2[idx].num_doc," ",csmov2[idx].fecha_2," ",csmov2[idx].entrada," p ",csmov2[idx].parent_id," c ",csmov2[idx].chield_id
# END FOR
END CONSTRUCT
DISPLAY ARRAY csmov2 TO s_csmov.*
END DISPLAY
+60 -15
View File
@@ -3,7 +3,8 @@ GLOBALS
DEFINE nombre,apellido CHAR(30),
xinserta CHAR(1),
kprograma varchar(20),
xdescrip_mov VARCHAR(50)
xdescrip_mov VARCHAR(50),
xcod_mov_tmp LIKE intb00005.cod_mov
FUNCTION reimprime(xprograma)
DEFINE xprograma CHAR(20),
@@ -41,42 +42,73 @@ FUNCTION reimprime(xprograma)
LET xinserta = 'N'
END IF
LET kprograma = xprograma
PREPARE breimprime FROM selec
DECLARE bdocumento SCROLL CURSOR FOR breimprime
OPEN bdocumento
IF kprograma = 'inprmt046' THEN
FETCH FIRST bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
otros_mov.num_doc,otros_mov.fecha,
datos1.depto_a,pnum_emp,otros_mov.bodega
ELSE
FETCH FIRST bdocumento INTO xcod_mov_tmp,xdescrip_mov,
datos1.num_doc,datos1.fecha,
datos1.depto_a,pnum_emp,datos1.bodega
END IF
IF STATUS = NOTFOUND THEN
CALL msg(3)
RETURN
END IF
LET kprograma = xprograma
CALL busca_info()
MENU "NAVEGACION:"
COMMAND "Siguiente" "Busca el siguiente documento"
IF kprograma = 'inprmt046' THEN
FETCH NEXT bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
otros_mov.num_doc,otros_mov.fecha,
datos1.depto_a,pnum_emp,otros_mov.bodega
ELSE
FETCH NEXT bdocumento INTO xcod_mov_tmp,xdescrip_mov,
datos1.num_doc,datos1.fecha,
datos1.depto_a,pnum_emp,datos1.bodega
END IF
CALL busca_info()
COMMAND "Primero" "Busca el siguiente documento"
IF kprograma = 'inprmt046' THEN
FETCH FIRST bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
otros_mov.num_doc,otros_mov.fecha,
datos1.depto_a,pnum_emp,otros_mov.bodega
ELSE
FETCH FIRST bdocumento INTO xcod_mov_tmp,xdescrip_mov,
datos1.num_doc,datos1.fecha,
datos1.depto_a,pnum_emp,datos1.bodega
END IF
CALL busca_info()
COMMAND "Anterior" "Busca el Registrosiguiente documento"
IF kprograma = 'inprmt046' THEN
FETCH PREVIOUS bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
otros_mov.num_doc,otros_mov.fecha,
datos1.depto_a,pnum_emp,otros_mov.bodega
ELSE
FETCH PREVIOUS bdocumento INTO xcod_mov_tmp,xdescrip_mov,
datos1.num_doc,datos1.fecha,
datos1.depto_a,pnum_emp,datos1.bodega
END IF
CALL busca_info()
COMMAND "Ultimo" "Busca el Ultimo Documento"
IF kprograma = 'inprmt046' THEN
FETCH LAST bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
otros_mov.num_doc,otros_mov.fecha,
datos1.depto_a,pnum_emp,otros_mov.bodega
ELSE
FETCH LAST bdocumento INTO xcod_mov_tmp,xdescrip_mov,
datos1.num_doc,datos1.fecha,
datos1.depto_a,pnum_emp,datos1.bodega
END IF
CALL busca_info()
COMMAND KEY("T") "reTornar" "Salir de busqueda"
EXIT MENU
@@ -84,6 +116,7 @@ FUNCTION reimprime(xprograma)
END FUNCTION
FUNCTION busca_info()
IF kprograma = 'inprmt046' THEN
SELECT UNIQUE nom_dpto INTO nombre_d FROM adtb00001 a
WHERE a.departamento = datos1.depto_a and
a.status_t is NULL
@@ -110,7 +143,6 @@ FUNCTION busca_info()
a.bodega = otros_mov.bodega
LET idx = 1
IF kprograma = 'inprmt046' THEN
FOREACH busca INTO movi2[idx].cod_n,movi2[idx].cod_grupo,
movi2[idx].cod_tipo,movi2[idx].cod_sec,
movi2[idx].cantidad_2, movi2[idx].unidad_med,
@@ -130,9 +162,6 @@ FUNCTION busca_info()
doble_on,doble_off,comp_on,comp_off,
doce,normal,archivo,copia
# CALL configureoutput('PDF') RETURNING handler
# START REPORT formu46 TO XML HANDLER handler
START REPORT formu46 TO archivo
FOR idx = 1 TO movi2.getLength()
@@ -145,14 +174,35 @@ FUNCTION busca_info()
RUN imprime
END DISPLAY
{ ELSE
FOREACH busca INTO movi[idx].cod_n,movi[idx].cod_grupo,
ELSE
SELECT UNIQUE nom_dpto INTO datos1.nom_dpto FROM adtb00001 a
WHERE a.departamento = datos1.depto_a and
a.status_t is NULL
DISPLAY BY NAME datos1.num_doc,datos1.fecha,datos1.depto_a,datos1.bodega
DISPLAY datos1.nom_dpto TO nombre_d
DECLARE busca36 CURSOR FOR
SELECT a.cod_n,a.cod_Grupo,a.cod_tipo,a.cod_Sec,a.cantidad_1,a.cantidad_2,
b.unidad_med, b.descrip_Esp
FROM intb00006 a,intb00001 b
WHERE a.num_Doc = datos1.num_doc AND
a.cod_mov = 36 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.bodega = datos1.bodega
LET idx = 1
FOREACH busca36 INTO movi[idx].cod_n,movi[idx].cod_grupo,
movi[idx].cod_tipo,movi[idx].cod_sec,
movi[idx].descrip_esp,movi[idx].cantidad_2
movi[idx].cantidad_1,movi[idx].cantidad_2,
movi[idx].unidad_med,movi[idx].descrip_esp
LET idx = idx + 1
END FOREACH
CALL set_count(idx-1)
DISPLAY ARRAY movi TO s_movi1.*
ON ACTION rimprimir
@@ -160,9 +210,6 @@ FUNCTION busca_info()
doble_on,doble_off,comp_on,comp_off,
doce,normal,archivo,copia
# CALL configureoutput('PDF') RETURNING HANDLER
# START REPORT formu36 TO XML HANDLER HANDLER
START REPORT formu36 TO archivo
FOR idx = 1 TO movi.getLength()
@@ -171,7 +218,6 @@ FUNCTION busca_info()
LET movi[idx].cantidad_2 = movi[idx].cantidad_2 * -1
OUTPUT TO REPORT formu36(datos1.num_doc,datos1.fecha,
datos1.depto_a,datos1.nom_dpto,
movi[idx].*)
@@ -181,7 +227,6 @@ FUNCTION busca_info()
RUN imprime
END DISPLAY
}
END IF
END FUNCTION
+2
View File
@@ -385,6 +385,8 @@
<File filePath="indir/infmmt013.4fd"/>
<File filePath="indir/infmmt046.4fd"/>
<File filePath="indir/infmmt036.4fd"/>
<File filePath="indir/infmwd005.4fd"/>
<File filePath="indir/infmcs006.4fd"/>
</Library>
<Library binaryName="FUNCIONES_IN" dependencies="-1026233879" id="-801525068" label="FUNCIONES_IN">
<File filePath="indir/inprgb000.4gl"/>