Added payments under each receipt in the ledger. This isn't something I really want, just something I was testing. Snapshotting before I delete it, since it did work correctly
git-svn-id: file:///svn-source/pmgr/branches/initial_20090526@56 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -172,7 +172,7 @@ class UnitsController extends AppController {
|
||||
// Models
|
||||
'ChargeType',
|
||||
'Receipt'
|
||||
//=> array('Payment'),
|
||||
=> array('Payment'),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -97,11 +97,22 @@ foreach($unit['Lease'] AS $lease) {
|
||||
$running_total += $amount;
|
||||
$rows[] = array(' -- ' . datefmt($receipt['stamp']),
|
||||
'#'.$receipt['id'],
|
||||
'Payment/Receipt',
|
||||
'Receipt',
|
||||
$receipt['comment'],
|
||||
currency($amount),
|
||||
currency($running_total));
|
||||
$row_class[] = array('receipt', ($odd % 2) ? 'oddrow' : 'evnrow');
|
||||
|
||||
foreach ($receipt['Payment'] AS $payment) {
|
||||
$amount = -1 * $payment['amount'];
|
||||
$rows[] = array(' -- ',
|
||||
'#'.$payment['id'],
|
||||
'Payment',
|
||||
$payment['comment'],
|
||||
currency($amount),
|
||||
'');
|
||||
$row_class[] = array('payment', ($odd % 2) ? 'oddrow' : 'evnrow');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ table.list.lease td.comment { width : 99%; }
|
||||
/* Ledger Entries */
|
||||
table.list.ledger td { border-top : 1px dashed #ccc; }
|
||||
table.list.ledger td.date.receipt { padding-left: 1em; }
|
||||
table.list.ledger td.date.payment { padding-left: 2em; }
|
||||
table.list.ledger td.evnrow { background: #f4f4f4; }
|
||||
table.list.ledger td.comment { width : 99%; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user