Additional work on generating ledger information. I've been reading up on accounting basics though, and I feel I'm just not going in the right direction. I'm checking this in, since it works somewhat, and will probably try to head in a different direction.

git-svn-id: file:///svn-source/pmgr/branches/initial_20090526@66 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-04 01:54:15 +00:00
parent e586268dee
commit e1671a9fca
4 changed files with 357 additions and 71 deletions

View File

@@ -169,12 +169,15 @@ class UnitsController extends AppController {
array('order' => array('charge_date'),
// Models
'ChargeType',
'Receipt'
'Receipt' => array(// Models
'Payment'
),
)
)
)
);
$unit = $this->Unit->read(null, $id);
//pr($unit);
$outstanding_deposit = 0;
$outstanding_balance = 0;
@@ -183,6 +186,10 @@ class UnitsController extends AppController {
$outstanding_balance += $charge['total'];
foreach ($charge['Receipt'] AS $receipt) {
$outstanding_balance -= $receipt['ChargesReceipt']['amount'];
/* foreach($receipt['Payment'] AS $payment) */
/* $outstanding_balance -= $payment['amount']; */
// REVISIT <AP> 20090530:
// Using hardcoded value for security deposit...
// That can't be good!