From 6154e561adbf6b57baed9a53e4df4029be2561ac Mon Sep 17 00:00:00 2001 From: monishdeb Date: Mon, 31 Aug 2015 21:48:31 +0530 Subject: [PATCH] minor fix --- CRM/Financial/Form/BatchTransaction.php | 2 +- CRM/Financial/Page/AJAX.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Financial/Form/BatchTransaction.php b/CRM/Financial/Form/BatchTransaction.php index 45c9afce8c..7dc2fe55d2 100644 --- a/CRM/Financial/Form/BatchTransaction.php +++ b/CRM/Financial/Form/BatchTransaction.php @@ -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; diff --git a/CRM/Financial/Page/AJAX.php b/CRM/Financial/Page/AJAX.php index 9b52a3c719..0d9f7bd527 100644 --- a/CRM/Financial/Page/AJAX.php +++ b/CRM/Financial/Page/AJAX.php @@ -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) { -- 2.25.1