Added mechanism to lookup the NSF tender from the bounce transaction.

git-svn-id: file:///svn-source/pmgr/branches/surplus_account_20090815@584 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-16 19:00:45 +00:00
parent 754cdb8522
commit 1429fe720b
2 changed files with 13 additions and 10 deletions

View File

@@ -388,15 +388,9 @@ class TransactionsController extends AppController {
('first',
array('contain' =>
array(// Models
'Account' =>
array('fields' => array('Account.id',
'Account.name'),
),
'Ledger' =>
array('fields' => array('Ledger.id',
'Ledger.name'),
),
'Account(id,name)',
'Ledger(id,name)',
'NsfTender(id,name)',
),
'conditions' => array(array('Transaction.id' => $id),
// REVISIT <AP>: 20090811
@@ -407,6 +401,10 @@ class TransactionsController extends AppController {
),
));
// REVISIT <AP>: 20090815
// for debug purposes only (pr output)
$this->Transaction->stats($id);
if (empty($transaction)) {
$this->Session->setFlash(__('Invalid Item.', true));
$this->redirect(array('action'=>'index'));