From: Sudha Bisht Date: Thu, 14 May 2015 04:54:08 +0000 (+0530) Subject: Fix for expire priceset field X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d4acad97886e53349902d704a66f01c911f61eb8;p=civicrm-core.git Fix for expire priceset field --- diff --git a/CRM/Event/Form/Registration.php b/CRM/Event/Form/Registration.php index 75783bbff1..8538460866 100644 --- a/CRM/Event/Form/Registration.php +++ b/CRM/Event/Form/Registration.php @@ -674,12 +674,20 @@ class CRM_Event_Form_Registration extends CRM_Core_Form { if (property_exists($form, '_discountId') && $form->_discountId) { $discountId = $form->_discountId; } + + //CRM-16456 get all price field including expired one. + $getAllPriceField = TRUE; + $className = CRM_Utils_System::getClassName($form); + if ($className == 'CRM_Event_Form_ParticipantFeeSelection' && $form->_action == CRM_Core_Action::UPDATE) { + $getAllPriceField = FALSE; + } + if ($discountId) { $priceSetId = CRM_Core_DAO::getFieldValue('CRM_Core_BAO_Discount', $discountId, 'price_set_id'); - $price = CRM_Price_BAO_PriceSet::initSet($form, $eventID, 'civicrm_event', TRUE, $priceSetId); + $price = CRM_Price_BAO_PriceSet::initSet($form, $eventID, 'civicrm_event', $getAllPriceField, $priceSetId); } else { - $price = CRM_Price_BAO_PriceSet::initSet($form, $eventID, 'civicrm_event', TRUE); + $price = CRM_Price_BAO_PriceSet::initSet($form, $eventID, 'civicrm_event', $getAllPriceField); } if (property_exists($form, '_context') && ($form->_context == 'standalone'