CRM-17120 - Use CRM_Core_Pseudoconstant to lookup option labels
authorColeman Watts <coleman@civicrm.org>
Tue, 1 Sep 2015 23:58:04 +0000 (16:58 -0700)
committerColeman Watts <coleman@civicrm.org>
Wed, 2 Sep 2015 04:53:39 +0000 (21:53 -0700)
CRM/Financial/Page/AJAX.php

index 5873a2951924f558a0ff947e4d7ff560c7eed59b..2ed6edd9f23dd457fbf314c6eae5ff38db3a50c6 100644 (file)
@@ -207,7 +207,7 @@ class CRM_Financial_Page_AJAX {
           case 'remove':
             $recordPID = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialTrxn', $recordID, 'payment_instrument_id');
             $batchPID = CRM_Core_DAO::getFieldValue('CRM_Batch_DAO_Batch', $entityID, 'payment_instrument_id');
-            $paymentInstrument = CRM_Core_OptionGroup::getLabel('payment_instrument', $batchPID);
+            $paymentInstrument = CRM_Core_PseudoConstant::getLabel('CRM_Batch_BAO_Batch', 'payment_instrument_id', $batchPID);
             if ($op == 'remove' || ($recordPID == $batchPID && $op == 'assign') || !isset($batchPID)) {
               $params = array(
                 'entity_id' => $recordID,