minor fix
authormonishdeb <monish.deb@webaccessglobal.com>
Mon, 31 Aug 2015 16:18:31 +0000 (21:48 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Mon, 31 Aug 2015 16:18:31 +0000 (21:48 +0530)
CRM/Financial/Form/BatchTransaction.php
CRM/Financial/Page/AJAX.php

index 45c9afce8c1305684b58ed15eac359d785c313ae..7dc2fe55d2aede7b1aac9790bc8f1d6df5b2671c 100644 (file)
@@ -169,7 +169,7 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form {
     }
     if (isset(self::$_entityID)) {
       $paymentInstrumentID = CRM_Core_DAO::getFieldValue('CRM_Batch_BAO_Batch', self::$_entityID, 'payment_instrument_id');
-      $defaults['contribution_payment_instrument_id'] = $paymentInstrumentID;
+      $defaults['payment_instrument_id'] = $paymentInstrumentID;
       $this->assign('paymentInstrumentID', $paymentInstrumentID);
     }
     return $defaults;
index 9b52a3c7193857477dfe1408c724f61cb03f1c78..0d9f7bd527949fc284d7fba560deb988126d07f8 100644 (file)
@@ -373,7 +373,8 @@ class CRM_Financial_Page_AJAX {
         elseif ($columnKey == 'payment_method' && $financialItem->$columnKey) {
           $row[$financialItem->id][$columnKey] = CRM_Core_OptionGroup::getLabel('payment_instrument', $financialItem->$columnKey);
           if ($row[$financialItem->id][$columnKey] == 'Check') {
-            $row[$financialItem->id][$columnKey] = $row[$financialItem->id][$columnKey] . ' (' . $financialItem->check_number . ')';
+            $checkNumber = $financialItem->check_number ? ' (' . $financialItem->check_number . ')' : '';
+            $row[$financialItem->id][$columnKey] = $row[$financialItem->id][$columnKey] . $checkNumber;
           }
         }
         elseif ($columnKey == 'amount' && $financialItem->$columnKey) {