Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/event#66: allow duplicate price field labels #22508

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions CRM/Price/Form/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,20 +427,6 @@ public static function formRule($fields, $files, $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'])
) &&
Expand Down