git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@262 97e9348a-65ac-dc4b-aefc-98561f571b83
83 lines
2.5 KiB
PHP
83 lines
2.5 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
echo '<div class="ledger view">' . "\n";
|
|
|
|
/**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
* Ledger Detail Main Section
|
|
*/
|
|
|
|
$account = $ledger['Account'];
|
|
//$close = $ledger['Close'];
|
|
|
|
if (isset($ledger['Ledger']))
|
|
$ledger = $ledger['Ledger'];
|
|
|
|
$rows = array(array('ID', $ledger['id']),
|
|
array('Account', $html->link($account['name'],
|
|
array('controller' => 'accounts',
|
|
'action' => 'view',
|
|
$account['id']))),
|
|
array('Sequence', $ledger['sequence']),
|
|
array('Status', $ledger['close_id'] ? '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 Entries
|
|
*/
|
|
|
|
echo $this->element('ledger_entries', array
|
|
(// Element configuration
|
|
'ledger_id' => $ledger['id'],
|
|
'account_type' => $account['type'],
|
|
|
|
// Grid configuration
|
|
'config' => array
|
|
('caption' => "Ledger Entries",
|
|
),
|
|
));
|
|
|
|
|
|
/* End "detail supporting" div */
|
|
echo '</div>' . "\n";
|
|
|
|
/* End page div */
|
|
echo '</div>' . "\n";
|