dev/event#62 expose all price fields to backend form
authorBrian Shaughnessy <brian@lcdservices.biz>
Thu, 29 Jul 2021 14:56:41 +0000 (10:56 -0400)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 5 Aug 2021 06:14:28 +0000 (18:14 +1200)
CRM/Event/Form/Participant.php
CRM/Price/BAO/PriceSet.php

index 18fa581f869ed20147b5758c827aff216522e0ca..9b2646dc9a96f38ec366c2efdf4b983b726e7029 100644 (file)
@@ -1658,7 +1658,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
 
       //retrieve custom information
       $form->_values = [];
-      CRM_Event_Form_Registration::initEventFee($form, $event['id']);
+      CRM_Event_Form_Registration::initEventFee($form, $event['id'], FALSE);
       CRM_Event_Form_Registration_Register::buildAmount($form, TRUE, $form->_discountId);
       $lineItem = [];
       $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
index fd6644215c17202e0e25d6ece45bd98f432f04a0..d8bed037184ce0762ddfad1f0f25401cdc71297b 100644 (file)
@@ -456,11 +456,11 @@ WHERE     cpf.price_set_id = %1";
     $where = "
 WHERE price_set_id = %1
 AND is_active = 1
-AND ( active_on IS NULL OR active_on <= {$currentTime} )
 ";
     $dateSelect = '';
     if ($doNotIncludeExpiredFields) {
       $dateSelect = "
+AND ( active_on IS NULL OR active_on <= {$currentTime} )
 AND ( expire_on IS NULL OR expire_on >= {$currentTime} )
 ";
     }