Moved the INTERNAL_ERROR calls to use the class function instead of the global one.

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@561 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-14 21:21:21 +00:00
parent fe1b0626c2
commit 83e552211f
4 changed files with 14 additions and 14 deletions

View File

@@ -156,7 +156,7 @@ class StatementEntry extends AppModel {
$charge = $charge['StatementEntry'];
if ($charge['type'] !== 'CHARGE')
INTERNAL_ERROR("Waiver item is not CHARGE.");
$this->INTERNAL_ERROR("Waiver item is not CHARGE.");
// Query the stats to get the remaining balance
$stats = $this->stats($id);
@@ -197,7 +197,7 @@ class StatementEntry extends AppModel {
$charge = $charge['StatementEntry'];
if ($charge['type'] !== 'CHARGE')
INTERNAL_ERROR("Reversal item is not CHARGE.");
$this->INTERNAL_ERROR("Reversal item is not CHARGE.");
$voided_entry_transactions = array();
$reconciled = $this->reconciledEntries($id);
@@ -206,7 +206,7 @@ class StatementEntry extends AppModel {
if ($reconciled && !$balance) {
foreach ($reconciled['entries'] AS $entry) {
if ($entry['DisbursementEntry']['type'] === 'REVERSAL')
INTERNAL_ERROR("Charge has already been reversed");
$this->INTERNAL_ERROR("Charge has already been reversed");
$voided_entry_transactions[$entry['DisbursementEntry']['transaction_id']]
= array_intersect_key($entry['DisbursementEntry'],
@@ -400,7 +400,7 @@ class StatementEntry extends AppModel {
if (empty($receipt_id)) {
if (!empty($charge_ids))
INTERNAL_ERROR("Charge IDs, yet no corresponding receipt");
$this->INTERNAL_ERROR("Charge IDs, yet no corresponding receipt");
$lquery = $query;
$lquery['conditions'][] = array('StatementEntry.type' => 'SURPLUS');
@@ -441,7 +441,7 @@ class StatementEntry extends AppModel {
);
$receipt_credit = $this->Transaction->find('first', $lquery);
if (!$receipt_credit)
INTERNAL_ERROR("Unable to locate receipt.");
$this->INTERNAL_ERROR("Unable to locate receipt.");
$stats = $this->Transaction->stats($receipt_id);
$receipt_credit['balance'] =
@@ -484,7 +484,7 @@ class StatementEntry extends AppModel {
if (empty($charge['balance']))
break;
if ($charge['balance'] < 0)
INTERNAL_ERROR("Negative Charge Balance");
$this->INTERNAL_ERROR("Negative Charge Balance");
if (empty($credit['receipt'])) {
// Explicit Credit
@@ -505,7 +505,7 @@ class StatementEntry extends AppModel {
if (empty($credit['balance']))
continue;
if ($credit['balance'] < 0)
INTERNAL_ERROR("Negative Credit Balance");
$this->INTERNAL_ERROR("Negative Credit Balance");
$this->pr(20, compact('charge'),
'Attempt Charge Reconciliation');