From a18fb275b6ba952d3780c18147354d7f49c4e166 Mon Sep 17 00:00:00 2001 From: Sudha Bisht Date: Thu, 30 Apr 2015 15:39:46 +0530 Subject: [PATCH] Changes in Report shows incorrect date for Overdue payments --- CRM/Report/Form/Pledge/Detail.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Report/Form/Pledge/Detail.php b/CRM/Report/Form/Pledge/Detail.php index 73e8130945..8beccf1547 100644 --- a/CRM/Report/Form/Pledge/Detail.php +++ b/CRM/Report/Form/Pledge/Detail.php @@ -449,6 +449,8 @@ class CRM_Report_Form_Pledge_Detail extends CRM_Report_Form { // To Display Payment Details of pledged amount // for pledge payments In Progress if (!empty($display)) { + $statusId = array_keys(CRM_Core_PseudoConstant::accountOptionValues("contribution_status", NULL, " AND v.name IN ('Pending', 'Overdue')")); + $statusId = implode(',', $statusId); $sqlPayment = " SELECT min(payment.scheduled_date) as scheduled_date, payment.pledge_id, @@ -459,7 +461,7 @@ class CRM_Report_Form_Pledge_Detail extends CRM_Report_Form { LEFT JOIN civicrm_pledge pledge ON pledge.id = payment.pledge_id - WHERE payment.status_id = 2 + WHERE payment.status_id IN ({$statusId}) GROUP BY payment.pledge_id"; -- 2.25.1