for ($i = $from; $i <= $to; $i++)
{
- if ($from == $to)
- $types = array($from);
+ if ($fno[0] == $tno[0])
+ $types = array($fno[1]);
else
$types = array(ST_BANKDEPOSIT, ST_CUSTPAYMENT);
foreach ($types as $j)
$myrow = get_receipt($j, $i);
if (!$myrow)
continue;
- $baccount = get_default_bank_account($myrow['curr_code']);
- $params['bankaccount'] = $baccount['id'];
+ $res = get_bank_trans($j, $i);
+ $baccount = db_fetch($res);
+ $params['bankaccount'] = $baccount['bank_act'];
$rep->title = _('RECEIPT');
$contacts = get_branch_contacts($myrow['branch_code'], 'invoice', $myrow['debtor_no']);
$rep->NewPage();
}
+ $memo = get_comments_string($j, $i);
+ if ($memo != "")
+ {
+ $rep->NewLine();
+ $rep->TextColLines(1, 5, $memo, -2);
+ }
+
$rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
$rep->TextCol(3, 6, _("Total Allocated"), -2);