//retrieve custom information
$form->_values = [];
CRM_Event_Form_Registration::initEventFee($form, $event['id'], FALSE, $form->getDiscountID());
- CRM_Event_Form_Registration_Register::buildAmount($form, TRUE, $form->getDiscountID());
+ //if payment done, no need to build the fee block.
+ if (!empty($form->_paymentId)) {
+ //fix to display line item in update mode.
+ $form->assign('priceSet', $form->_priceSet ?? NULL);
+ }
+ else {
+ CRM_Event_Form_Registration_Register::buildAmount($form, TRUE, $form->getDiscountID());
+ }
$lineItem = [];
$totalTaxAmount = 0;
if (!CRM_Utils_System::isNull($form->_values['line_items'] ?? NULL)) {
* @throws \CRM_Core_Exception
*/
public static function buildAmount(&$form, $required = TRUE, $discountId = NULL) {
- //if payment done, no need to build the fee block.
- if (!empty($form->_paymentId)) {
- //fix to display line item in update mode.
- $form->assign('priceSet', $form->_priceSet ?? NULL);
- return;
- }
-
$feeFields = $form->_values['fee'] ?? NULL;
if (is_array($feeFields)) {