- $qoh = get_qoh_on_date($item->item_code, $item->location, $_SESSION['supp_trans']->tran_date);
- if ($item->qty_recd > $qoh)
+ $qoh = get_qoh_on_date($item->item_code, null, $_SESSION['supp_trans']->tran_date);
+ if ($item->this_quantity_inv > $qoh)