Rationalise if statement
authorEileen McNaughton <eileen@fuzion.co.nz>
Sun, 5 Jul 2015 14:07:55 +0000 (02:07 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Sun, 5 Jul 2015 14:10:18 +0000 (02:10 +1200)
CRM/Member/Form/Membership.php

index fe5af580408a1c61b6a05cd0bf05e2c4b5a34945..dca7f04c7f083d9f9c11c83f6e67201457e5d610 100644 (file)
@@ -1208,16 +1208,15 @@ class CRM_Member_Form_Membership extends CRM_Member_Form {
 
     // process price set and get total amount and line items.
     $lineItem = array();
-    if ($priceSetID) {
-      CRM_Member_BAO_Membership::createLineItems($this, $formValues['membership_type_id'], $priceSetID);
-    }
     $isQuickConfig = 0;
-    if ($priceSetID && CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $priceSetID, 'is_quick_config')) {
-      $isQuickConfig = 1;
-    }
-
     $termsByType = array();
     if ($priceSetID) {
+      CRM_Member_BAO_Membership::createLineItems($this, $formValues['membership_type_id'], $priceSetID);
+
+      if (CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $priceSetID, 'is_quick_config')) {
+        $isQuickConfig = 1;
+      }
+
       CRM_Price_BAO_PriceSet::processAmount($this->_priceSet['fields'],
         $this->_params, $lineItem[$priceSetID]);
       if (CRM_Utils_Array::value('tax_amount', $this->_params)) {