From 8ab8920e18da5ed35dd2a0fddb718677c3d47684 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Mon, 2 Nov 2015 19:48:05 -0500 Subject: [PATCH] CRM-17491 update price set field if quantity changes --- CRM/Event/BAO/Participant.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Event/BAO/Participant.php b/CRM/Event/BAO/Participant.php index 6e54464185..ea73cc3850 100644 --- a/CRM/Event/BAO/Participant.php +++ b/CRM/Event/BAO/Participant.php @@ -1871,7 +1871,8 @@ WHERE cpf.price_set_id = %1 AND cpfv.label LIKE %2"; unset($insertLines[$previousLineItem['price_field_value_id']]); // for updating the line items i.e. use-case - once deselect-option selecting again if (($previousLineItem['line_total'] != $submittedLineItems[$previousLineItem['price_field_value_id']]['line_total']) || - ($submittedLineItems[$previousLineItem['price_field_value_id']]['line_total'] == 0 && $submittedLineItems[$previousLineItem['price_field_value_id']]['qty'] == 1) + ($submittedLineItems[$previousLineItem['price_field_value_id']]['line_total'] == 0 && $submittedLineItems[$previousLineItem['price_field_value_id']]['qty'] == 1) || + ($previousLineItem['qty'] != $submittedLineItems[$previousLineItem['price_field_value_id']]['qty']) ) { $updateLines[$previousLineItem['price_field_value_id']] = $submittedLineItems[$previousLineItem['price_field_value_id']]; $updateLines[$previousLineItem['price_field_value_id']]['id'] = $id; -- 2.25.1