'R_DEMAND - BOSSMENU item only for reports to be produced on demand

external   vkeybox() messbox() sch scw vloadif() vunloadif() dpath Background()
external   fentrybox() progress() userid chkdate() remove() PrintReport()

public     ptstr choice sum_date

' global     x DailyCash() greeting areas
global     x greeting areas

MAIN
single-step off
	Background()
	vloadif("oldpurch.vws")
  	areas = filelookup([author],[areas],userid) 'message areas
  	greeting = filelookup([author],[Greeting],userid) 'message greeting
  	vunloadif("oldpurch.vws")
  	while true
' if vkeybox(8,28,"7Stock˙Disp'd 1Unposted˙rcpts 3Unbanked-NoSuppCode 1Receipts˙expt'd 1Product˙Analysis 7Daily˙Cash˙Received 7Daily˙Invoice˙Listing 2Periodic˙Reports 1Statements 6Paid˙NOT˙inv'd 7Print˙Var'ns 7Stock˙List","Press {Esc} to exit")=0
if vkeybox(8,38,"7Stock˙Disp'd 1Unposted˙rcpts 3Unbanked-NoSuppCode 1Receipts˙due/BACS˙rcvd 1Aged˙Debtors 1Product˙Analysis 7Daily˙Cash˙Received 2Periodic˙Reports 1Statements 6Paid˙NOT˙inv'd 7Print˙Var'ns 7Stock˙List","Press {Esc} to exit")=0
   		if ptstr == "c"
        			repaint off
        			execute "dly_cash.rf3" in-memory
        			continue while
      		elseif ptstr == "b"
        			execute "unbanked.rf3" in-memory
        			continue while
      		elseif ptstr == "r"
        			execute "rcvd.rf3" in-memory
        			continue while
      		elseif ptstr == "s"
        			execute "statemnt.rf3" in-memory
        			continue while
      		elseif ptstr == "e"
        			execute "perdreps.rf3" in-memory
        			continue while
'       		elseif ptstr == "i"
'         			execute "dly_invd.rf3" in-memory
'         			continue while
      		elseif ptstr == "u"
        			execute "daysrcpt.rf3" in-memory
        			continue while
       		elseif ptstr == "a"
         			execute "ageddrsa.rf3" in-memory
         			continue while
      		elseif ptstr == "l"
         			execute "stklist.rf3" in-memory
      		elseif ptstr == "d"
         			execute "carplst4.rf3" in-memory
'         			execute "stklist1.rf3" in-memory
        			continue while
      		elseif ptstr == "n"
        			execute "pdnotinv.rf3" in-memory
        			continue while
      		elseif ptstr == "p"
'         			execute "prodanal.rf3" in-memory
        			execute "carplst3.rf3" in-memory
        			continue while
      		elseif ptstr == "v"
        			execute "printvar.rf3" in-memory
        			continue while
      		elseif ptstr == "t"
        			execute "points.rf3" in-memory
        			continue while
      		end if
    		else
      		exit while
    		end if
  	end while
  	file unload all
  	transfer "pm_menu.psl" in-memory
END MAIN
