Skip to content
Snippets Groups Projects
Commit eeca4aa5 authored by gitsync's avatar gitsync
Browse files

CRM-13078, added a check to validate the contact id if value is set for that particular row

----------------------------------------
* CRM-13078:
  http://issues.civicrm.org/jira/browse/CRM-13078
parent 620c386a
Branches
Tags
No related merge requests found
......@@ -242,6 +242,16 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
}
}
// if contact name is set for a row using autocomplete widget then make sure contact id exists, CRM-13078
// I was not able to replicate this on my local but adding this check and hopefully it will fix the issue.
if (!empty($params['primary_contact'])) {
foreach($params['primary_contact'] as $rowIndex => $contactName) {
if (empty($params['primary_contact_select_id'][$rowIndex])) {
$errors['primary_contact['.$rowIndex.']'] = ts('Please select a valid contact.');
}
}
}
if ($batchTotal != $self->_batchInfo['total']) {
$self->assign('batchAmountMismatch', TRUE);
$errors['_qf_defaults'] = ts('Total for amounts entered below does not match the expected batch total.');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment