52 lines
1.7 KiB
Plaintext
52 lines
1.7 KiB
Plaintext
FUNCTION bodegas(cb2)
|
|
|
|
DEFINE
|
|
ketiquetas SMALLINT,
|
|
detiquetas CHAR(30),
|
|
cbodegas ui.ComboBox,
|
|
cb2 CHAR(2)
|
|
IF cb2 = '1' THEN
|
|
LET cbodegas = ui.combobox.forname("formonly.bodega")
|
|
DECLARE bbodegas CURSOR FOR
|
|
SELECT a.cod_bodega, a.descripcion
|
|
FROM intb00009 a
|
|
ORDER BY a.descripcion
|
|
CALL cbodegas.clear()
|
|
|
|
FOREACH bbodegas INTO ketiquetas, detiquetas
|
|
CALL cbodegas.additem(ketiquetas, detiquetas)
|
|
END FOREACH
|
|
END IF
|
|
IF cb2 = '4' THEN
|
|
LET cbodegas = ui.combobox.forname("formonly.bodega")
|
|
DECLARE bbodegas_mat CURSOR FOR
|
|
SELECT DISTINCT a.cod_bodega, a.descripcion
|
|
FROM intb00009 a INNER JOIN intb00006 b ON b.bodega = a.cod_bodega
|
|
ORDER BY a.descripcion
|
|
CALL cbodegas.clear()
|
|
|
|
FOREACH bbodegas_mat INTO ketiquetas, detiquetas
|
|
CALL cbodegas.additem(ketiquetas, detiquetas)
|
|
END FOREACH
|
|
END IF
|
|
|
|
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
|
|
ORDER BY a.descripcion
|
|
CALL cbodegas.clear()
|
|
|
|
FOREACH bbodegas2 INTO ketiquetas, detiquetas
|
|
CALL cbodegas.additem(ketiquetas, detiquetas)
|
|
END FOREACH
|
|
|
|
END IF
|
|
IF cb2 = '3' THEN
|
|
LET cbodegas = ui.combobox.forname("formonly.bodega")
|
|
CALL cbodegas.clear()
|
|
CALL cbodegas.addItem(1, 'REPUESTOS')
|
|
END IF
|
|
END FUNCTION
|