Implemented mechanism for automatic assessment of monthly rent

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@505 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-08 15:44:52 +00:00
parent e6b0313523
commit 868e23b982
3 changed files with 89 additions and 3 deletions

View File

@@ -461,9 +461,8 @@ class Transaction extends AppModel {
// Automatically figure out the customer if we have the lease
if (!empty($transaction['lease_id']) && empty($transaction['customer_id'])) {
$L = new Lease();
$L->recursive = -1;
$lease = $L->read(null, $transaction['lease_id']);
$transaction['customer_id'] = $lease['Lease']['customer_id'];
$L->id = $transaction['lease_id'];
$transaction['customer_id'] = $L->field('customer_id');
}
// Break each entry out of the combined statement/ledger entry