Primarly a cleanup checkin, although a couple minor bugfixes were included as well.
git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@82 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -52,7 +52,7 @@ foreach ($ledgers as $ledger) {
|
||||
if (isset($ledger['Ledger']))
|
||||
$ledger = $ledger['Ledger'];
|
||||
|
||||
$rows[] = array_merge(array($html->link('#'.$ledger['sequence'],//$ledger['name'],
|
||||
$rows[] = array_merge(array($html->link('#'.$ledger['account_id'].'-'.$ledger['sequence'],
|
||||
array('controller' => 'ledgers',
|
||||
'action' => 'view',
|
||||
$ledger['id']))),
|
||||
|
||||
@@ -29,11 +29,8 @@ echo $this->element('table',
|
||||
|
||||
?>
|
||||
<DIV CLASS="infobox">
|
||||
<DIV CLASS="summary grand debit">
|
||||
Debits: <?php echo FormatHelper::currency($debitAmount); ?>
|
||||
</DIV>
|
||||
<DIV CLASS="summary grand credit">
|
||||
Credits: <?php echo FormatHelper::currency($creditAmount); ?>
|
||||
<DIV CLASS="summary grand total">
|
||||
Total: <?php echo FormatHelper::currency($total); ?>
|
||||
</DIV>
|
||||
</DIV>
|
||||
|
||||
@@ -53,13 +50,27 @@ echo $this->element('table',
|
||||
* Entries
|
||||
*/
|
||||
|
||||
$headers = array('Name', 'Debit', 'Credit', 'Comment', 'Amount', 'Total');
|
||||
$headers = array('Entry', 'Debit', 'Credit', 'Comment', 'Amount', 'Total');
|
||||
$column_class = array();
|
||||
foreach (array_intersect($headers, array('Entry')) AS $k => $v) {
|
||||
$column_class[$k] = 'id';
|
||||
}
|
||||
foreach (array_intersect($headers, array('Amount', 'Total')) AS $k => $v) {
|
||||
$column_class[$k] = 'currency';
|
||||
}
|
||||
foreach (array_intersect($headers, array('Comment')) AS $k => $v) {
|
||||
$column_class[$k] = 'slack';
|
||||
}
|
||||
|
||||
$rows = array();
|
||||
$running_total = 0;
|
||||
foreach($transaction['LedgerEntry'] AS $entry) {
|
||||
$amount = $entry['amount'];
|
||||
$running_total += $amount;
|
||||
$rows[] = array($entry['name'],
|
||||
$rows[] = array($html->link('#'.$entry['id'],
|
||||
array('controller' => 'ledger_entries',
|
||||
'action' => 'view',
|
||||
$entry['id'])),
|
||||
$html->link($entry['DebitLedger']['name'],
|
||||
array('controller' => 'ledgers',
|
||||
'action' => 'view',
|
||||
@@ -79,7 +90,7 @@ echo $this->element('table',
|
||||
'caption' => 'Entries in Transaction',
|
||||
'headers' => $headers,
|
||||
'rows' => $rows,
|
||||
'column_class' => $headers));
|
||||
'column_class' => $column_class));
|
||||
|
||||
|
||||
/* End "detail supporting" DIV */ ?>
|
||||
|
||||
Reference in New Issue
Block a user