From: Eileen McNaughton Date: Sun, 5 Jul 2015 14:07:55 +0000 (+1200) Subject: Rationalise if statement X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9f1bc5dc46461309a171b93835f1b3b9238ad75f;p=civicrm-core.git Rationalise if statement --- diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index fe5af58040..dca7f04c7f 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -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)) {