From ce70f33050bfed82aca4ea1ed28ad27a7d89a4f2 Mon Sep 17 00:00:00 2001 From: moremanish Date: Fri, 24 Oct 2014 16:35:09 +0530 Subject: [PATCH] spacing issues --- CRM/Batch/Form/Entry.php | 26 +++++++++++++------------- CRM/Pledge/Page/AJAX.php | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CRM/Batch/Form/Entry.php b/CRM/Batch/Form/Entry.php index d32e901a32..c535f53738 100644 --- a/CRM/Batch/Form/Entry.php +++ b/CRM/Batch/Form/Entry.php @@ -207,12 +207,12 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { ); $this->add('select', "member_option[$rowNumber]", '', $options); } - $batchValue=CRM_Core_OptionGroup::values('batch_type',TRUE); + $batchValue = CRM_Core_OptionGroup::values('batch_type',TRUE); if($this->_batchInfo['type_id'] == $batchValue['Pledge']) { $openPledge = array( '' => ts('- select -'), ); - $info=$this->getVar('_batchInfo'); + $info = $this->getVar('_batchInfo'); if(!empty($info['data'])) { $json_value=json_decode($info['data'],true); $primContactId = $json_value['values']['primary_contact_select_id'][$rowNumber] ; @@ -225,8 +225,8 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { ); $openDefaultPledge = civicrm_api('Pledge', 'get', $paramsForPledge); foreach($openDefaultPledge['values'] as $key => $value) { - $keyforopen=$value['id']; - $openPledge[$keyforopen]=$value['pledge_next_pay_date'].' '.$value['pledge_next_pay_amount']; + $keyforopen = $value['id']; + $openPledge[$keyforopen] = $value['pledge_next_pay_date'].' '.$value['pledge_next_pay_amount']; } } } @@ -387,9 +387,9 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { } else { if(!CRM_Utils_Array::value( 'open_pledges', $params )) { - $params['open_pledges']=$this->_submitValues['open_pledges']; + $params['open_pledges'] = $this->_submitValues['open_pledges']; } - $params['type_id']=$this->_batchInfo['type_id']; + $params['type_id'] = $this->_batchInfo['type_id']; $this->processContribution($params); } // update batch to close status @@ -517,22 +517,22 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { $batchValue = CRM_Core_OptionGroup::values('batch_type',TRUE); if($params['type_id'] == $batchValue['Pledge']) { $adjustTotalAmount = FALSE; - if($params['option_type'][$key]==2) { + if($params['option_type'][$key] == 2) { $adjustTotalAmount=TRUE; } - $pledgeId=$params['open_pledges'][$key]; + $pledgeId = $params['open_pledges'][$key]; //$contribution->id; - $result=CRM_Pledge_BAO_PledgePayment::getPledgePayments($pledgeId); - $ppid=0; + $result = CRM_Pledge_BAO_PledgePayment::getPledgePayments($pledgeId); + $pledgePaymentId = 0; foreach($result as $key => $value ) { if($value['status'] != 'Completed') { - $ppid=$value['id']; + $pledgePaymentId = $value['id']; break; } } - CRM_Core_DAO::setFieldValue('CRM_Pledge_DAO_PledgePayment', $ppid, 'contribution_id', $contribution->id); + CRM_Core_DAO::setFieldValue('CRM_Pledge_DAO_PledgePayment', $pledgePaymentId, 'contribution_id', $contribution->id); CRM_Pledge_BAO_PledgePayment::updatePledgePaymentStatus($pledgeId, - array($ppid), + array($pledgePaymentId), $contribution->contribution_status_id, NULL, $contribution->total_amount, diff --git a/CRM/Pledge/Page/AJAX.php b/CRM/Pledge/Page/AJAX.php index 7f0f5256ff..cb8ae8906e 100644 --- a/CRM/Pledge/Page/AJAX.php +++ b/CRM/Pledge/Page/AJAX.php @@ -99,7 +99,7 @@ WHERE {$whereClause} $memType = CRM_Utils_Type::escape($_POST['mtype'], 'Integer'); $query = "SELECT min(id),scheduled_amount FROM civicrm_pledge_payment - WHERE pledge_id = %1 and status_id !=1"; + WHERE pledge_id = %1 and status_id != 1"; $dao = CRM_Core_DAO::executeQuery($query, array(1 => array($memType, 'Positive'))); $properties = array( 'scheduled_amount'); while ($dao->fetch()) { -- 2.25.1