dev/event#66: allow duplicate price field labels
authorAllen Shaw <allen@JoineryHQ.com>
Fri, 14 Jan 2022 17:03:03 +0000 (11:03 -0600)
committerAllen Shaw <allen@JoineryHQ.com>
Fri, 14 Jan 2022 17:03:03 +0000 (11:03 -0600)
CRM/Price/Form/Field.php

index 3b1170e833e3693a6c924c193ea322696edc1e41..dc8cf1b519582135f9bb1b4741a217832379fc16 100644 (file)
@@ -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'])
       ) &&