diff --git a/site/controllers/leases_controller.php b/site/controllers/leases_controller.php index 2eef49a..de91919 100644 --- a/site/controllers/leases_controller.php +++ b/site/controllers/leases_controller.php @@ -342,7 +342,7 @@ class LeasesController extends AppController { // REVISIT : 20090708 // We should probably seek confirmation first... if (!$this->Lease->closeable($id)) { - INTERNAL_ERROR("This lease is not ready to close"); + $this->INTERNAL_ERROR("This lease is not ready to close"); $this->redirect(array('action'=>'view', $id)); } @@ -503,7 +503,7 @@ class LeasesController extends AppController { // when a charge is reimbursed; a bug that we'll either // need to fix, or we'll have to revisit this assumption. if ($outstanding_balance < 0) - INTERNAL_ERROR("Should not have a customer lease credit."); + $this->INTERNAL_ERROR("Should not have a customer lease credit."); /* if ($outstanding_balance < 0) */ /* $this->sidemenu_links[] = */ diff --git a/site/controllers/transactions_controller.php b/site/controllers/transactions_controller.php index c873815..c340bdc 100644 --- a/site/controllers/transactions_controller.php +++ b/site/controllers/transactions_controller.php @@ -482,7 +482,7 @@ class TransactionsController extends AppController { $deposit_total += $type['total']; if ($deposit['Transaction']['amount'] != $deposit_total) - INTERNAL_ERROR("Deposit items do not add up to deposit slip total"); + $this->INTERNAL_ERROR("Deposit items do not add up to deposit slip total"); $this->sidemenu_links[] = array('name' => 'Operations', 'header' => true); diff --git a/site/models/statement_entry.php b/site/models/statement_entry.php index ae301ee..0ed2d71 100644 --- a/site/models/statement_entry.php +++ b/site/models/statement_entry.php @@ -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'); diff --git a/site/models/transaction.php b/site/models/transaction.php index 630e9ff..a0549b7 100644 --- a/site/models/transaction.php +++ b/site/models/transaction.php @@ -129,7 +129,7 @@ class Transaction extends AppModel { $this->prEnter(compact('data', 'charge_id', 'customer_id', 'lease_id')); if (count($data['Entry']) != 1) - INTERNAL_ERROR("Should be one Entry for addWaiver"); + $this->INTERNAL_ERROR("Should be one Entry for addWaiver"); // Just make sure the disbursement(s) are marked as waivers // and that they go to cover the specific charge. @@ -156,7 +156,7 @@ class Transaction extends AppModel { $this->prEnter(compact('data', 'charge_id', 'customer_id', 'lease_id')); if (count($data['Entry']) != 1) - INTERNAL_ERROR("Should be one Entry for addReversal"); + $this->INTERNAL_ERROR("Should be one Entry for addReversal"); // Just make sure the disbursement(s) are marked as reversals // and that they go to cover the specific charge. @@ -184,7 +184,7 @@ class Transaction extends AppModel { $this->prEnter(compact('data', 'charge_id', 'customer_id', 'lease_id')); if (count($data['Entry']) != 1) - INTERNAL_ERROR("Should be one Entry for addWriteOff"); + $this->INTERNAL_ERROR("Should be one Entry for addWriteOff"); // Just make sure the disbursement(s) are marked as write offs, // and that the write-off account is used. @@ -838,7 +838,7 @@ class Transaction extends AppModel { * - Update any cached or calculated fields */ function update($id) { - INTERNAL_ERROR("Transaction::update not yet implemented"); + $this->INTERNAL_ERROR("Transaction::update not yet implemented"); $result = $this->find ('first',