From: Sudha Bisht Date: Thu, 30 Apr 2015 10:09:46 +0000 (+0530) Subject: Changes in Report shows incorrect date for Overdue payments X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a18fb275b6ba952d3780c18147354d7f49c4e166;p=civicrm-core.git Changes in Report shows incorrect date for Overdue payments --- 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";