Fix bug in Annual summary query (on contact dashboard) whereby a left join gives...
authoreileen <emcnaughton@wikimedia.org>
Wed, 16 Jan 2019 00:50:14 +0000 (13:50 +1300)
committereileen <emcnaughton@wikimedia.org>
Tue, 29 Jan 2019 20:13:29 +0000 (09:13 +1300)
commit536660990a30485ae64de7581b136f9ca528d5f0
treebd829397a8bb59d4740a0665fef92845fa10981e
parent96bc266be7e762e3c52dae7d5b5a1656b5d1d352
Fix bug in Annual summary query (on contact dashboard) whereby a left join gives the wrong results

    As demonstrated in the test the left join does not do any filtering but it DOES join in as many line items as match the
    permitted types - resulting in too many rows & the sum calculated on them being incorrect.

    As this doesn't work it should be removed - I would aniticpate that sites with the financialreportacls extensions
    would get this adequately added through CRM_Financial_BAO_FinancialType::addACLClausesToWhereClauses
    but regardless this should go as it causes a bug without achieving it's intended result and adding a test prevents
    a later fix from re-breaking
CRM/Contribute/BAO/Contribution.php
tests/phpunit/CRM/Contribute/BAO/ContributionTest.php
tests/phpunit/CRMTraits/Financial/PriceSetTrait.php [new file with mode: 0644]