Added a more descriptive fieldname for statement entry views. Instead of Transaction, it will be Receipt, Invoice, Deposit, etc.

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@487 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-05 00:06:46 +00:00
parent 670f0894ea
commit 094e15ddf9
2 changed files with 6 additions and 3 deletions

View File

@@ -212,7 +212,7 @@ class StatementEntriesController extends AppController {
$entry = $this->StatementEntry->find $entry = $this->StatementEntry->find
('first', ('first',
array('contain' => array array('contain' => array
('Transaction' => array('fields' => array('id', 'stamp')), ('Transaction' => array('fields' => array('id', 'type', 'stamp')),
'Account' => array('id', 'name', 'type'), 'Account' => array('id', 'name', 'type'),
'Customer' => array('fields' => array('id', 'name')), 'Customer' => array('fields' => array('id', 'name')),
'Lease' => array('fields' => array('id')), 'Lease' => array('fields' => array('id')),

View File

@@ -15,15 +15,18 @@ $customer = $entry['Customer'];
$lease = $entry['Lease']; $lease = $entry['Lease'];
$entry = $entry['StatementEntry']; $entry = $entry['StatementEntry'];
$Ttype = ucfirst(strtolower($transaction['type']));
$rows = array(); $rows = array();
$rows[] = array('ID', $entry['id']); $rows[] = array('ID', $entry['id']);
$rows[] = array('Transaction', $html->link('#'.$transaction['id'], $rows[] = array($Ttype, $html->link('#'.$transaction['id'],
array('controller' => 'transactions', array('controller' => 'transactions',
'action' => 'view', 'action' => 'view',
$transaction['id']))); $transaction['id'])));
$rows[] = array('Timestamp', FormatHelper::datetime($transaction['stamp'])); $rows[] = array('Timestamp', FormatHelper::datetime($transaction['stamp']));
$rows[] = array('Effective', FormatHelper::date($entry['effective_date'])); $rows[] = array('Effective', FormatHelper::date($entry['effective_date']));
$rows[] = array('Through', FormatHelper::date($entry['through_date'])); if (in_array($entry['type'], array('CHARGE', /*REVISIT 'VOUCHER-PAYMENT'*/)))
$rows[] = array('Through', FormatHelper::date($entry['through_date']));
$rows[] = array('Type', $entry['type']); $rows[] = array('Type', $entry['type']);
$rows[] = array('Amount', FormatHelper::currency($entry['amount'])); $rows[] = array('Amount', FormatHelper::currency($entry['amount']));
$rows[] = array('Account', $html->link($account['name'], $rows[] = array('Account', $html->link($account['name'],