+ $list = array(); $allocs = 0;
+ if (count($_SESSION['Items']->prepayments))
+ {
+ foreach($_SESSION['Items']->prepayments 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']));
+ $allocs += $pmt['amt'];
+ }
+ }
+ label_row(_("Payments received:"), implode(',', $list));
+ label_row(_("Invoiced here:"), price_format($_SESSION['Items']->prep_amount), 'class=label');
+ label_row($_SESSION['Items']->payment_terms['days_before_due'] == -1 ? _("Left to be invoiced:") : _("Invoiced so far:"),
+ price_format($_SESSION['Items']->get_trans_total()-max($_SESSION['Items']->prep_amount, $allocs)), 'class=label');
+}
+
+textarea_row(_("Memo:"), 'Comments', null, 50, 4);