>PARAMETERS nColIndex > >if lastkey() = 13 or lastkey() = 9 >nodefault > if empty(descriptio) > select master_lst && Select > set order to 1 && Index on item Number > > select as400mas && Material List > set order to 1 && Index by item > > if seek(master_lst.item) && Is that ticket on file > replace; > master_lst.descriptio with as400mas.descript; > master_lst.qty with 1; > master_lst.item_cost with as400mas.lst; > master_lst.list with as400mas.lst; > master_lst.total_cost with master_lst.qty * master_lst.item_cost > endif > > select master_lst > > if lastline and !empty(master_lst.item) > nothing = add_one() && Add a line > endif > > thisform.main_tabs.transaction.grid2.refresh() > thisform.refresh() > > nothing = update_() && Re calculate totals > thisform.main_tabs.transaction.grid2.activatecell(thisform.main_tabs.transaction.grid2.ActiveRow,4) > else > thisform.main_tabs.transaction.grid2.activatecell(thisform.main_tabs.transaction.grid2.ActiveRow,1) > keyboard '{dnarrow}' > endif > >endif > >thisform.main_tabs.transaction.grid2.refresh() >thisform.refresh()