Captured some thoughts, some experiments on how to tie statement entry to ledger entry. It's not at all clear we want to go down this (or any other) path at the moment. This checkin will probably go nowhere, as I'm going to see if we can make do with the current implementation.

git-svn-id: file:///svn-source/pmgr/branches/statement_ledger_entry_tie_20090802@468 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-03 02:19:39 +00:00
parent 4ee9c99e30
commit ae09d160bb
10 changed files with 143 additions and 56 deletions

View File

@@ -88,7 +88,7 @@ class Customer extends AppModel {
$query['conditions'][] = array('Customer.id' => $id);
$query['conditions'][] = array('StatementEntry.account_id' =>
$this->StatementEntry->Account->securityDepositAccountID());
$this->StatementEntry->LedgerEntry->Account->securityDepositAccountID());
$set = $this->StatementEntry->reconciledSet('CHARGE', $query, false, true);
return $this->prReturn($set);
@@ -113,7 +113,7 @@ class Customer extends AppModel {
$query['conditions'][] = array('Lease.id' => $id);
$query['conditions'][] = array('StatementEntry.account_id' =>
$this->StatementEntry->Account->securityDepositAccountID());
$this->StatementEntry->LedgerEntry->Account->securityDepositAccountID());
$stats = $this->StatementEntry->stats(null, $query);
$balance = $stats['Charge']['reconciled'] - $stats['Payment']['reconciled'];