Suppressed all the debug print statements from transaction insertion.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@398 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -101,8 +101,8 @@ class Transaction extends AppModel {
|
||||
* (not in a pre-existing transaction)
|
||||
*/
|
||||
function verifyTransaction($transaction, $entries) {
|
||||
pr(array("Transaction::verifyTransaction()"
|
||||
=> compact('transaction', 'entries', 'customer_id', 'lease_id')));
|
||||
/* pr(array("Transaction::verifyTransaction()" */
|
||||
/* => compact('transaction', 'entries', 'customer_id', 'lease_id'))); */
|
||||
|
||||
// Verify required Transaction data is present
|
||||
if (empty($transaction['type']) ||
|
||||
@@ -113,8 +113,8 @@ class Transaction extends AppModel {
|
||||
(in_array($transaction['type'], array('INVOICE'))
|
||||
&& empty($transaction['lease_id']))
|
||||
) {
|
||||
pr(array("Transaction::verifyTransaction()"
|
||||
=> "Transaction verification failed"));
|
||||
/* pr(array("Transaction::verifyTransaction()" */
|
||||
/* => "Transaction verification failed")); */
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -122,13 +122,13 @@ class Transaction extends AppModel {
|
||||
foreach ($entries AS $entry) {
|
||||
extract($entry);
|
||||
if (!$this->LedgerEntry->DoubleEntry->verifyDoubleEntry($le1, $le2, $le1_tender)) {
|
||||
pr(array("Transaction::verifyTransaction()"
|
||||
=> "Double Entry verification failed"));
|
||||
/* pr(array("Transaction::verifyTransaction()" */
|
||||
/* => "Double Entry verification failed")); */
|
||||
return false;
|
||||
}
|
||||
if (!$this->StatementEntry->verifyStatementEntry($se)) {
|
||||
pr(array("Transaction::verifyTransaction()"
|
||||
=> "Statement Entry verification failed"));
|
||||
/* pr(array("Transaction::verifyTransaction()" */
|
||||
/* => "Statement Entry verification failed")); */
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -196,8 +196,8 @@ class Transaction extends AppModel {
|
||||
*/
|
||||
|
||||
function addTransaction($data, $customer_id, $lease_id = null) {
|
||||
pr(array("Transaction::addTransaction()"
|
||||
=> compact('data', 'customer_id', 'lease_id')));
|
||||
/* pr(array("Transaction::addTransaction()" */
|
||||
/* => compact('data', 'customer_id', 'lease_id'))); */
|
||||
|
||||
if (!isset($data['Transaction']) || !isset($data['Entry']))
|
||||
return array('error' => true);
|
||||
@@ -278,9 +278,9 @@ class Transaction extends AppModel {
|
||||
if (!$this->verifyTransaction($transaction, $data['Entry'], $customer_id, $lease_id))
|
||||
return array('error' => true) + $ret;
|
||||
|
||||
pr(array('Transaction::addTransaction' =>
|
||||
array('checkpoint' => 'Pre Transaction Save')
|
||||
+ compact('transaction')));
|
||||
/* pr(array('Transaction::addTransaction' => */
|
||||
/* array('checkpoint' => 'Pre Transaction Save') */
|
||||
/* + compact('transaction'))); */
|
||||
|
||||
// Save transaction to the database
|
||||
$this->create();
|
||||
@@ -338,8 +338,8 @@ class Transaction extends AppModel {
|
||||
$ret['error'] = true;
|
||||
}
|
||||
|
||||
pr(array('Transaction::addTransaction' =>
|
||||
array('return' => $ret)));
|
||||
/* pr(array('Transaction::addTransaction' => */
|
||||
/* array('return' => $ret))); */
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user