+function unallocated_prepayments($row)
+{
+
+ if ($row['ord_payments'] > 0) {
+ $pmts = get_payments_for($row['order_no'], $row['trans_type'], $row['debtor_no']);
+
+ foreach($pmts as $pmt)
+ {
+ $list[] = get_trans_view_str($pmt['trans_type_from'], $pmt['trans_no_from'], get_reference($pmt['trans_type_from'], $pmt['trans_no_from']));
+ }
+ return implode(',', $list);
+ } else
+ return '';
+}
+