X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FBatch%2FForm%2FEntry.php;h=73f5610b807a7a445740354d51d30be4670105db;hb=ce064e4f6bd0c1df0122a8d9b3793dfb587f9658;hp=9baf89a4fd65cfbf1fbbb738fb050d2782c01507;hpb=b9331a134ecb82fb7a084ec3326896cca41f0758;p=civicrm-core.git diff --git a/CRM/Batch/Form/Entry.php b/CRM/Batch/Form/Entry.php index 9baf89a4fd..73f5610b80 100755 --- a/CRM/Batch/Form/Entry.php +++ b/CRM/Batch/Form/Entry.php @@ -1,7 +1,7 @@ _batchId = CRM_Utils_Request::retrieve('id', 'Positive', $this, TRUE); @@ -114,9 +110,6 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { /** * Build the form object. - * - * - * @return void */ public function buildQuickForm() { if (!$this->_profileId) { @@ -280,9 +273,9 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { $errors = array(); $batchTypes = CRM_Core_Pseudoconstant::get('CRM_Batch_DAO_Batch', 'type_id', array('flip' => 1), 'validate'); $fields = array( - 'total_amount' => 'Amount', - 'financial_type' => 'Financial Type', - 'payment_instrument' => 'Paid By', + 'total_amount' => ts('Amount'), + 'financial_type' => ts('Financial Type'), + 'payment_instrument' => ts('Payment Method'), ); //CRM-16480 if contact is selected, validate financial type and amount field. @@ -356,9 +349,6 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { /** * Set default values for the form. - * - * - * @return void */ public function setDefaultValues() { if (empty($this->_fields)) { @@ -397,9 +387,6 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { /** * Process the form after the input has been submitted and validated. - * - * - * @return void */ public function postProcess() { $params = $this->controller->exportValues($this->_name); @@ -436,8 +423,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { * @param array $params * Associated array of submitted values. * - * - * @return void + * @return bool */ private function processContribution(&$params) { $dates = array( @@ -622,7 +608,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { 'reminder_date', ); - // get the price set associated with offline memebership + // get the price set associated with offline membership $priceSetId = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', 'default_membership_type_amount', 'id', 'name'); $this->_priceSet = $priceSets = current(CRM_Price_BAO_PriceSet::getSetDetail($priceSetId)); @@ -807,6 +793,8 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { // make contribution entry $contrbutionParams = array_merge($value, array('membership_id' => $membership->id)); + // @todo - calling this from here is pretty hacky since it is called from membership.create anyway + // This form should set the correct params & not call this fn directly. CRM_Member_BAO_Membership::recordMembershipContribution($contrbutionParams); } else { @@ -857,9 +845,6 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { * * @param array $value * Associated array of submitted values. - * - * - * @return void */ private function updateContactInfo(&$value) { $value['preserveDBName'] = $this->_preserveDefault; @@ -873,9 +858,10 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { } /** - * Function exists purely for unit testing purposes. If you feel tempted to use this in live code - * then it probably means there is some functionality that needs to be moved - * out of the form layer + * Function exists purely for unit testing purposes. + * + * If you feel tempted to use this in live code then it probably means there is some functionality + * that needs to be moved out of the form layer * * @param array $params * @@ -886,9 +872,10 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { } /** - * Function exists purely for unit testing purposes. If you feel tempted to use this in live code - * then it probably means there is some functionality that needs to be moved - * out of the form layer + * Function exists purely for unit testing purposes. + * + * If you feel tempted to use this in live code then it probably means there is some functionality + * that needs to be moved out of the form layer. * * @param array $params *