Select correct activity if more than one in upcoming or recent period
authorjernic <jeremy@senmagazine.co.uk>
Sun, 11 Sep 2016 21:03:06 +0000 (23:03 +0200)
committerGitHub <noreply@github.com>
Sun, 11 Sep 2016 21:03:06 +0000 (23:03 +0200)
commit2b95a25b82177c6c2dacdac22a603c31d1a5245b
tree02557e31145045671f33949336956377e7f226a5
parentf9ee6a5c5a39b2867628e973baf9bf23401ce69f
Select correct activity if more than one in upcoming or recent period

Currently if there are two or more "upcoming" or "recent" activities, the wrong activity is being selected. Changed the SQL query to make sure that the earliest upcoming activity, and the latest recent activity is selected.
CRM/Case/BAO/Case.php