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:
@@ -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'));
|
||||
|
||||
@@ -11,6 +11,7 @@ echo '<div class="transaction view">' . "\n";
|
||||
|
||||
$account = $transaction['Account'];
|
||||
$ledger = $transaction['Ledger'];
|
||||
$nsf_tender = $transaction['NsfTender'];
|
||||
|
||||
if (isset($transaction['Transaction']))
|
||||
$transaction = $transaction['Transaction'];
|
||||
@@ -28,7 +29,11 @@ $rows[] = array('Ledger', $html->link($ledger['name'],
|
||||
array('controller' => 'ledgers',
|
||||
'action' => 'view',
|
||||
$ledger['id'])));
|
||||
$rows[] = array('Comment', $transaction['comment']);
|
||||
if (!empty($nsf_tender['id']))
|
||||
$rows[] = array('NSF Tender', $html->link($nsf_tender['name'],
|
||||
array('controller' => 'tenders',
|
||||
'action' => 'view',
|
||||
$nsf_tender['id'])));
|
||||
|
||||
echo $this->element('table',
|
||||
array('class' => 'item transaction detail',
|
||||
|
||||
Reference in New Issue
Block a user