CRM-19060 fix Payment table join in membership Detail report to ensure latest members...
authorSeamus Lee <seamuslee001@gmail.com>
Mon, 8 Aug 2016 10:54:00 +0000 (20:54 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Fri, 22 Sep 2017 20:13:41 +0000 (06:13 +1000)
commit9b213560fe662e0fc7626226ff70266779c8599a
treefb1f83fe81f996c917a7bddf6dd9732488f37401
parente2c2eb3f4678c8f5832266b31788e05e2f95e243
CRM-19060 fix Payment table join in membership Detail report to ensure latest membership payment is picked up

Fix where no membership type is selected, ensure only most recent contribution is found and pass through date filter to the finding latest contribution sql

Turn max_payment join into joining on tempoary table so that we can create an index for the join

Shift to using civicrm_membership_payment table rather than line item
CRM/Report/Form/Member/Detail.php