A couple bugfixes and some more tweaks to how reversals are handled.

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@566 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-15 16:47:55 +00:00
parent 4f85dc243e
commit 6e63365604
2 changed files with 15 additions and 105 deletions

View File

@@ -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'),