git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@441 97e9348a-65ac-dc4b-aefc-98561f571b83
114 lines
3.7 KiB
PHP
114 lines
3.7 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
echo '<div class="account view">' . "\n";
|
|
|
|
/**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
**********************************************************************
|
|
* Account Detail Main Section
|
|
*/
|
|
|
|
$ledger = $account['Ledger'];
|
|
$current_ledger = $account['CurrentLedger'];
|
|
|
|
if (isset($account['Account']))
|
|
$account = $account['Account'];
|
|
|
|
$rows = array();
|
|
$rows[] = array('ID', $account['id']);
|
|
$rows[] = array('Name', $account['name']);
|
|
$rows[] = array('Type', $account['type']);
|
|
$rows[] = array('External Name', $account['external_name']);
|
|
$rows[] = array('External Account', $account['external_account']);
|
|
$rows[] = array('Comment', $account['comment']);
|
|
|
|
echo $this->element('table',
|
|
array('class' => 'item account detail',
|
|
'caption' => 'Account Detail',
|
|
'rows' => $rows,
|
|
'column_class' => array('field', 'value')));
|
|
|
|
|
|
/**********************************************************************
|
|
* Account 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('Account 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";
|
|
|
|
|
|
/**********************************************************************
|
|
* Ledgers
|
|
*/
|
|
|
|
echo $this->element('ledgers', array
|
|
(// Grid configuration
|
|
'config' => array
|
|
('caption' => $account['name'] . " Ledgers",
|
|
'filter' => array('Account.id' => $account['id']),
|
|
)));
|
|
|
|
|
|
/**********************************************************************
|
|
* Current Ledger
|
|
*/
|
|
|
|
echo $this->element('ledger_entries', array
|
|
(// Grid configuration
|
|
'config' => array
|
|
('grid_div_id' => 'ledger-ledger-entry-list',
|
|
'caption' => ("Current Ledger: " .
|
|
"(". $current_ledger['name'] .")"),
|
|
'filter' => array('Ledger.id' => $current_ledger['id']),
|
|
'exclude' => array('Account', 'Amount', 'Cr/Dr', 'Balance',
|
|
empty($account['payments']) ? 'Tender' : null),
|
|
'include' => array('Debit', 'Credit', 'Sub-Total'),
|
|
)));
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
* Entire Account
|
|
*/
|
|
|
|
echo $this->element('ledger_entries', array
|
|
(// Grid configuration
|
|
'config' => array
|
|
('grid_div_id' => 'account-ledger-entry-list',
|
|
'grid_setup' => array('hiddengrid' => true),
|
|
'caption' => "Entire Ledger",
|
|
'filter' => array('Account.id' => $account['id']),
|
|
'exclude' => array('Account', 'Amount', 'Cr/Dr', 'Balance',
|
|
empty($account['payments']) ? 'Tender' : null),
|
|
'include' => array('Debit', 'Credit', 'Sub-Total'),
|
|
)));
|
|
|
|
|
|
|
|
/* End "detail supporting" div */
|
|
echo '</div>' . "\n";
|
|
|
|
/* End page div */
|
|
echo '</div>' . "\n";
|