From 9f1bc5dc46461309a171b93835f1b3b9238ad75f Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 6 Jul 2015 02:07:55 +1200 Subject: [PATCH] Rationalise if statement --- CRM/Member/Form/Membership.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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)) { -- 2.25.1