A couple bugfixes and some more tweaks to how reversals are handled.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@566 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -414,7 +414,7 @@ class StatementEntry extends AppModel {
|
||||
|
||||
$stats = $this->Transaction->stats($receipt_id);
|
||||
$receipt_credit['balance'] =
|
||||
$receipt_credit['Transaction']['amount'] - $stats['Disbursement']['total'];
|
||||
$receipt_credit['Transaction']['amount'] - $stats['StatementEntry']['disbursements'];
|
||||
|
||||
$receipt_credit['receipt'] = true;
|
||||
$credits = array($receipt_credit);
|
||||
@@ -529,6 +529,8 @@ class StatementEntry extends AppModel {
|
||||
if ($charge['balance'] <= 0)
|
||||
$this->pr(20, 'Fully Paid Charge');
|
||||
}
|
||||
// Break the $credit reference to avoid future problems
|
||||
unset($credit);
|
||||
}
|
||||
|
||||
$this->pr(18, compact('credits'),
|
||||
|
||||
Reference in New Issue
Block a user