Commit inicial: fuentes MBS ERP (Genero 6) + .gitignore + docs/SETUP_PC_MBS.md
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user