Put correct bank account on receipt.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 7 Dec 2011 23:30:47 +0000 (00:30 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 7 Dec 2011 23:30:47 +0000 (00:30 +0100)
reporting/rep112.php

index acfe7394e8d4040dca6642672721681047a05796..c13df00d862f25f6b372d6419d3f716a45ed2758 100644 (file)
@@ -106,8 +106,9 @@ function print_receipts()
                        $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']);