Skip to content

Commit

Permalink
Merge pull request civicrm#10716 from jitendrapurohit/CRM-20933
Browse files Browse the repository at this point in the history
CRM-20933 - Updating Pay later event registration from backend produc…
  • Loading branch information
eileenmcnaughton authored Aug 12, 2017
2 parents 5143b9a + 610d2da commit 45c3cac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CRM/Event/Form/EventFees.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ public static function setDefaultValues(&$form) {

// CRM-4395
if ($contriId = $form->get('onlinePendingContributionId')) {
$defaults[$form->_pId]['record_contribution'] = 1;
$contribution = new CRM_Contribute_DAO_Contribution();
$contribution->id = $contriId;
$contribution->find(TRUE);
Expand Down
4 changes: 3 additions & 1 deletion CRM/Event/Form/Participant.php
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,9 @@ public static function formRule($values, $files, $self) {
if (empty($values['payment_instrument_id'])) {
$errorMsg['payment_instrument_id'] = ts('Payment Method is a required field.');
}
CRM_Price_BAO_PriceField::priceSetValidation($values['priceSetId'], $values, $errorMsg);
if (!empty($values['priceSetId'])) {
CRM_Price_BAO_PriceField::priceSetValidation($values['priceSetId'], $values, $errorMsg);
}
}

// validate contribution status for 'Failed'.
Expand Down

0 comments on commit 45c3cac

Please sign in to comment.