Files
pmgr/site/views/ledgers/view.ctp
abijah 23f4a29fc7 Updated all the view.ctp files to use the new style infobox. I should probably create an element for it, but I'll hold off for now.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@135 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-15 21:01:22 +00:00

76 lines
2.4 KiB
PHP

<?php /* -*- mode:PHP -*- */
echo '<div class="ledger view">' . "\n";
/**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
* Ledger Detail Main Section
*/
$account = $ledger['Account'];
if (isset($ledger['Ledger']))
$ledger = $ledger['Ledger'];
$rows = array(array('ID', $ledger['id']),
array('Name', $ledger['name']),
array('Account', $html->link($account['name'],
array('controller' => 'accounts',
'action' => 'view',
$account['id']))),
array('Status', $ledger['closed'] ? 'Closed' : 'Open'),
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
*/
echo $this->element('ledger_entries',
array('caption' => $ledger['name'],
'ledger_id' => $ledger['id'],
'account_type' => $account['type'],
));
/* End "detail supporting" div */
echo '</div>' . "\n";
/* End page div */
echo '</div>' . "\n";