+ if ($trans['debtor_no'] != $_SESSION['alloc']->person_id) {
+ display_error(_("Allocated transaction allocated is not related to company selected."));
+ set_focus('amount'.$counter);
+ return false;
+ }
+ } elseif ($_SESSION['alloc']->person_type == PT_SUPPLIER) {
+ if ($_SESSION['alloc']->allocs[$counter]->type == ST_PURCHORDER)
+ $trans = get_po($_SESSION['alloc']->allocs[$counter]->type_no);
+ else
+ $trans = get_supp_trans($_SESSION['alloc']->allocs[$counter]->type_no, $_SESSION['alloc']->allocs[$counter]->type, $_SESSION['alloc']->person_id);
+ if ($trans['supplier_id'] != $_SESSION['alloc']->person_id) {
+ display_error(_("Allocated transaction allocated is not related to company selected."));
+ set_focus('amount'.$counter);
+ return false;
+ }
+ }
+
+ $_SESSION['alloc']->allocs[$counter]->current_allocated = input_num('amount' . $counter);
+
+ $total_allocated += input_num('amount' . $counter);