-//_vd($myrow);
- $this->add_item($myrow["type"], $myrow["trans_no"],
- sql2date($myrow["tran_date"]),
- sql2date($myrow["due_date"]),
- $myrow["Total"], // trans total
- $myrow["alloc"], // trans total allocated
- 0,
- $myrow["reference"]); // this allocation
+ if ($this->person_type==PT_SUPPLIER)
+ $trans_items = get_allocatable_to_supp_transactions($this->person_id);
+ else
+ $trans_items = get_allocatable_to_cust_transactions($this->person_id);
+ while ($myrow = db_fetch($trans_items))
+ {
+ $this->add_item($myrow["type"], $myrow["trans_no"],
+ sql2date($myrow["tran_date"]),
+ sql2date($myrow["due_date"]),
+ $myrow["Total"], // trans total
+ $myrow["alloc"], // trans total allocated
+ 0,
+ $myrow["reference"]); // this allocation
+ }