Files
pmgr/site/views/accounts/view.ctp
abijah b6ed57c02c Checking in changes from some time ago, changing the reports screen to give direct Quickbooks invoice and credits info.
git-svn-id: file:///svn-source/pmgr/branches/v0.3_work@1013 97e9348a-65ac-dc4b-aefc-98561f571b83
2012-06-14 01:32:44 +00:00

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('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['sequence']}",
'filter' => array('Ledger.id' => $current_ledger['id']),
'exclude' => array('Account', 'Amount', 'Cr/Dr', 'Balance',
empty($account['receipts']) ? 'Tender' : null),
'include' => array('Debit', 'Credit', 'Sub-Total'),
'limit' => 50,
)));
/**********************************************************************
* 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['receipts']) ? 'Tender' : null),
'include' => array('Transaction', 'Debit', 'Credit', 'Sub-Total'),
'limit' => 50,
)));
/* End "detail supporting" div */
echo '</div>' . "\n";
/* End page div */
echo '</div>' . "\n";