'ST_BALNC - listing of stock held for more than 28 days
'           used as menu program pending update of BOSSMENU

external   sch scw popuplist() bgs fgs
' external   remove() makeidx() progress() PrintReport()

public     ptstr

global     x l1 l2 l3 l4 l5 l6 l7 l8 l9 l10

MAIN
  single-step off
'   quiet off
  screen clear box 1 1 sch scw 0 0 no-border
  repaint off
  l1 = "˙˙˙˙˙Allocations"
  l2 = "˙˙˙˙Check˙Measures"
  l3 = "˙˙˙˙Re-allocations˙"
  l9 = "˙˙˙Stock˙Write-offs"
  l10= "˙˙˙˙Purchase˙Price"
  l8 = "˙˙˙˙˙Roll˙History˙"
  l4 = "˙˙˙˙˙Update˙Stock˙"
  l5 = "˙˙˙˙˙Reservations"
  l6 = "˙˙˙˙˙˙View˙Stock˙"                 ' MUST be HARD spaces - Alt-255
  l7 = "˙Requisitions˙for˙Job˙"                 ' MUST be HARD spaces - Alt-255
  while true
    screen print 7 27 bgs fgs (format("Sundry stock programs","M26"))
    x = popuplist(8,27,19,l7&l5&l2&l8&l9&l10&l4&l3&l1&l6,"˙˙˙˙{Esc} to exit˙˙˙",1,0)
    screen clear box 1 1 sch scw 0 0 no-border
    repaint off
    if x = 0
      if ptstr = l1
        execute "reqallcn.rf3" in-memory
      elseif ptstr = l2
        execute "chckmeas.rf3" in-memory
      elseif ptstr = l3
        execute "reallcns.rf3" in-memory
      elseif ptstr = l4
        execute "stckupdt.rf3" in-memory
'         StockUpdate()
      elseif ptstr = l6
        execute "vu_stock.rf3" in-memory
      elseif ptstr = l7
        execute "job_reqn.rf3" in-memory
'       PrintJobReqns()
      elseif ptstr = l5
        execute "rsvstk_b.rf3" in-memory
      elseif ptstr = l8
        execute "rollhist.rf3" in-memory
      elseif ptstr = l9
        execute "clr_stck.rf3" in-memory
      elseif ptstr = l10
        execute "carpcost.rf3" in-memory
      end if
    elseif x = -1
      exit while
    end if
  end while
  screen clear box 1 1 sch scw 0 0 no-border
  repaint off
  file unload all
  transfer "pm_menu.psl" in-memory
END MAIN


