git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@430 97e9348a-65ac-dc4b-aefc-98561f571b83
83 lines
2.7 KiB
PHP
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('ID', $ledger['id']);
|
|
$rows[] = array('Name', $ledger['name']);
|
|
$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'),
|
|
'include' => array('Debit', 'Credit', 'Sub-Total'),
|
|
)));
|
|
|
|
|
|
/* End "detail supporting" div */
|
|
echo '</div>' . "\n";
|
|
|
|
/* End page div */
|
|
echo '</div>' . "\n";
|