CRM-20947, fixed notice error for deprecated function on batch form
authorPradeep Nayak <pradpnayak@gmail.com>
Fri, 28 Jul 2017 16:44:49 +0000 (22:14 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Fri, 28 Jul 2017 16:44:49 +0000 (22:14 +0530)
----------------------------------------
* CRM-20947: Remove Deprecation Notice for Option group
  https://issues.civicrm.org/jira/browse/CRM-20947

CRM/Batch/Form/Batch.php

index 763be3cda1b4b0213b7e374fcc41f7ca749461b7..529bbdae23673bab8fc61b376a61bba113ef7602 100644 (file)
@@ -104,7 +104,7 @@ class CRM_Batch_Form_Batch extends CRM_Admin_Form {
     }
 
     // always create with data entry status
-    $params['status_id'] = CRM_Core_OptionGroup::getValue('batch_status', 'Data Entry', 'name');
+    $params['status_id'] = CRM_Core_PseudoConstant::getKey('CRM_Batch_BAO_Batch', 'status_id', 'Data Entry');
     $batch = CRM_Batch_BAO_Batch::create($params);
 
     // redirect to batch entry page.