jenkins-bot has submitted this change and it was merged.

Change subject: Restrict financial_txn rows
......................................................................


Restrict financial_txn rows

Bug: T152238
Change-Id: Ie763b24e39b996b6f59083478e927e4599d1f2b3
---
M 
sites/all/modules/wmf_reports/CRM/Report/Form/Contribute/GatewayReconciliation.php
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Ejegg: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/sites/all/modules/wmf_reports/CRM/Report/Form/Contribute/GatewayReconciliation.php
 
b/sites/all/modules/wmf_reports/CRM/Report/Form/Contribute/GatewayReconciliation.php
index 2d0d513..98511e5 100644
--- 
a/sites/all/modules/wmf_reports/CRM/Report/Form/Contribute/GatewayReconciliation.php
+++ 
b/sites/all/modules/wmf_reports/CRM/Report/Form/Contribute/GatewayReconciliation.php
@@ -205,6 +205,11 @@
 
     function from( ) {
 
+        $depositFinancialAccountID = civicrm_api3('FinancialAccount', 
'getvalue', array(
+          'return' => 'id',
+          'name' => 'Deposit Bank Account',
+        ));
+
         $this->_from = <<<EOS
 FROM civicrm_contribution {$this->_aliases['civicrm_contribution']}
 LEFT JOIN wmf_contribution_extra {$this->_aliases['wmf_contribution_extra']}
@@ -216,6 +221,7 @@
 
   LEFT JOIN civicrm_financial_trxn {$this->_aliases['civicrm_financial_trxn']}
                     ON {$this->_aliases['civicrm_financial_trxn']}.id = 
entity_financial_trxn_civireport.financial_trxn_id
+                    AND 
{$this->_aliases['civicrm_financial_trxn']}.to_financial_account_id = 
{$depositFinancialAccountID}
 EOS;
         if ( $this->isTableSelected( 'civicrm_country' ) ) {
             $this->_from .= <<<EOS

-- 
To view, visit https://gerrit.wikimedia.org/r/325085
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie763b24e39b996b6f59083478e927e4599d1f2b3
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Cdentinger <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to