From: Allen Shaw Date: Fri, 14 Jan 2022 17:03:03 +0000 (-0600) Subject: dev/event#66: allow duplicate price field labels X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8fd9a1a915cf503e8a715f4fa7e57e466c02dd97;p=civicrm-core.git dev/event#66: allow duplicate price field labels --- diff --git a/CRM/Price/Form/Field.php b/CRM/Price/Form/Field.php index 3b1170e833..dc8cf1b519 100644 --- a/CRM/Price/Form/Field.php +++ b/CRM/Price/Form/Field.php @@ -427,20 +427,6 @@ class CRM_Price_Form_Field extends CRM_Core_Form { } } - //avoid the same price field label in Within PriceSet - $priceFieldLabel = new CRM_Price_DAO_PriceField(); - $priceFieldLabel->label = $fields['label']; - $priceFieldLabel->price_set_id = $form->_sid; - - $dupeLabel = FALSE; - if ($priceFieldLabel->find(TRUE) && $form->getEntityId() != $priceFieldLabel->id) { - $dupeLabel = TRUE; - } - - if ($dupeLabel) { - $errors['label'] = ts('Name already exists in Database.'); - } - if ((is_numeric(CRM_Utils_Array::value('count', $fields)) && empty($fields['count']) ) &&