CRM-17090 fix - Accounting batch filters broken
authormonishdeb <monish.deb@webaccessglobal.com>
Sun, 30 Aug 2015 17:56:04 +0000 (23:26 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Sun, 30 Aug 2015 17:56:04 +0000 (23:26 +0530)
https://issues.civicrm.org/jira/browse/CRM-17090

CRM/Batch/BAO/Batch.php

index 5f70b23b5804bb084070579e15c37c1405a88d91..e70f6bbcea0dc9696f071ddb3d80c36c87c04898 100755 (executable)
@@ -676,8 +676,8 @@ LEFT JOIN civicrm_contribution_soft ON civicrm_contribution_soft.contribution_id
       'sort_name',
       'financial_type_id',
       'contribution_page_id',
-      'contribution_payment_instrument_id',
-      'contribution_transaction_id',
+      'payment_instrument_id',
+      'contribution_trxn_id',
       'contribution_source',
       'contribution_currency_type',
       'contribution_pay_later',
@@ -737,6 +737,7 @@ LEFT JOIN civicrm_contribution_soft ON civicrm_contribution_soft.contribution_id
       $where = implode(' AND ', $query->_where[0]) .
         " AND civicrm_entity_batch.batch_id IS NULL
          AND civicrm_entity_financial_trxn.entity_table = 'civicrm_contribution'";
+      $where = str_replace('civicrm_contribution.payment_instrument_id', 'civicrm_financial_trxn.payment_instrument_id', $where);
       $searchValue = TRUE;
     }
     else {