Files
pmgr/site/views/ledgers/view.ctp
abijah 24e208bf17 More cleanup to hide ID from the user except where ID is intended to be the externally visible identification method (like transactions and ledger/statement entries).
git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@737 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-08-23 00:38:18 +00:00

83 lines
2.7 KiB
PHP

<?php /* -*- mode:PHP -*- */
echo '<div class="ledger view">' . "\n";
/**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
* Ledger Detail Main Section
*/
$account = $ledger['Account'];
//$close = $ledger['CloseTransaction'];
if (isset($ledger['Ledger']))
$ledger = $ledger['Ledger'];
$rows = array();
$rows[] = array('Account', $html->link($account['name'],
array('controller' => 'accounts',
'action' => 'view',
$account['id'])));
$rows[] = array('Sequence', $ledger['sequence']);
$rows[] = array('Status', $ledger['close_transaction_id'] ? 'Closed' : 'Open');
$rows[] = array('Comment', $ledger['comment']);
echo $this->element('table',
array('class' => 'item ledger detail',
'caption' => 'Ledger Detail',
'rows' => $rows,
'column_class' => array('field', 'value')));
/**********************************************************************
* Ledger Info Box
*/
echo '<div class="infobox">' . "\n";
$rows = array();
$rows[] = array('Debits:', FormatHelper::currency($stats['debits']));
$rows[] = array('Credits:', FormatHelper::currency($stats['credits']));
$rows[] = array('Ledger Balance:', FormatHelper::currency($stats['balance']));
echo $this->element('table',
array('class' => 'summary',
'rows' => $rows,
'column_class' => array('field', 'value'),
'suppress_alternate_rows' => true,
));
echo '</div>' . "\n";
/**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
* Supporting Elements Section
*/
echo '<div CLASS="detail supporting">' . "\n";
/**********************************************************************
* Ledger Entries
*/
echo $this->element('ledger_entries', array
(// Grid configuration
'config' => array
('caption' => "Ledger Entries",
'filter' => array('Ledger.id' => $ledger['id']),
'exclude' => array('Ledger', 'Account',
'Amount', 'Cr/Dr', 'Balance',
empty($account['receipts']) ? 'Tender' : null),
'include' => array('Debit', 'Credit', 'Sub-Total'),
)));
/* End "detail supporting" div */
echo '</div>' . "\n";
/* End page div */
echo '</div>' . "\n";