Added support for account name and number on the deposit slips

git-svn-id: file:///svn-source/pmgr/branches/v0.3_work@1014 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2012-08-06 17:33:21 +00:00
parent b6ed57c02c
commit 2519f4c8a7
2 changed files with 10 additions and 3 deletions

View File

@@ -468,7 +468,7 @@ class TransactionsController extends AppController {
function deposit_slip($id) { function deposit_slip($id) {
// Find the deposit transaction // Find the deposit transaction
$this->Transaction->id = $id; $this->Transaction->id = $id;
$deposit = $this->Transaction->find('first', array('contain' => false)); $deposit = $this->Transaction->find('first', array('contain' => array('Account')));
// Get a summary of all forms of tender in the deposit // Get a summary of all forms of tender in the deposit
$tenders = $this->Transaction->find $tenders = $this->Transaction->find

View File

@@ -2,11 +2,18 @@
//style="display:inline; //style="display:inline;
echo('<H2 style="display:inline;">Deposit Slip: ' . echo('<H2 style="display:inline;">Deposit Slip: ' .
FormatHelper::datetime($deposit['Transaction']['stamp']) FormatHelper::date($deposit['Transaction']['stamp'])
. '</H2>' . "\n"); . '</H2><br>' . "\n");
/* echo('(' . */ /* echo('(' . */
/* FormatHelper::age($deposit['Transaction']['stamp'], 60) */ /* FormatHelper::age($deposit['Transaction']['stamp'], 60) */
/* . ')<BR>' . "\n"); */ /* . ')<BR>' . "\n"); */
if ($deposit['Account']['external_name'] || $deposit['Account']['external_account']) {
echo('<H2 style="display:inline;">' .
($deposit['Account']['external_name'] ? $deposit['Account']['external_name'] : '') .
($deposit['Account']['external_name'] && $deposit['Account']['external_account'] ? ': ' : '') .
($deposit['Account']['external_account'] ? 'Account #' . $deposit['Account']['external_account'] : '') .
'</H2><br>' . "\n");
}
//pr(compact('deposit')); //pr(compact('deposit'));