Skip to content
Snippets Groups Projects
Commit 61412579 authored by Kurund Jalmi's avatar Kurund Jalmi
Browse files

CRM-13170, fixed the query to respect batch criteria

----------------------------------------
* CRM-13170: Search Contribution by Batch no longer works since change to DB
  http://issues.civicrm.org/jira/browse/CRM-13170
parent 91aff94c
No related branches found
No related tags found
No related merge requests found
...@@ -678,8 +678,16 @@ class CRM_Contribute_BAO_Query { ...@@ -678,8 +678,16 @@ class CRM_Contribute_BAO_Query {
break; break;
case 'contribution_batch': case 'contribution_batch':
$from .= " $side JOIN civicrm_entity_batch ON ( civicrm_entity_batch.entity_table = 'civicrm_contribution' AND $from .= " $side JOIN civicrm_entity_financial_trxn ON (
civicrm_contribution.id = civicrm_entity_batch.entity_id )"; civicrm_entity_financial_trxn.entity_table = 'civicrm_contribution'
AND civicrm_contribution.id = civicrm_entity_financial_trxn.entity_id )";
$from .= " $side JOIN civicrm_financial_trxn ON (
civicrm_entity_financial_trxn.financial_trxn_id = civicrm_financial_trxn.id )";
$from .= " $side JOIN civicrm_entity_batch ON ( civicrm_entity_batch.entity_table = 'civicrm_financial_trxn'
AND civicrm_financial_trxn.id = civicrm_entity_batch.entity_id )";
$from .= " $side JOIN civicrm_batch ON civicrm_entity_batch.batch_id = civicrm_batch.id"; $from .= " $side JOIN civicrm_batch ON civicrm_entity_batch.batch_id = civicrm_batch.id";
break; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment