CRM-18488: minor change
authordeb.monish <monish.deb@webaccessglobal.com>
Fri, 13 May 2016 10:14:30 +0000 (15:44 +0530)
committerdeb.monish <monish.deb@webaccessglobal.com>
Fri, 13 May 2016 10:14:30 +0000 (15:44 +0530)
CRM/Report/Form/Pledge/Pbnp.php

index e98b87b47806b43e96a5c681ce00b2123c87a09e..e90e03b00d062f19da950d8e318778a22da9231a 100644 (file)
@@ -273,12 +273,11 @@ class CRM_Report_Form_Pledge_Pbnp extends CRM_Report_Form {
              INNER JOIN civicrm_pledge  {$this->_aliases['civicrm_pledge']}
                         ON ({$this->_aliases['civicrm_pledge']}.contact_id =
                             {$this->_aliases['civicrm_contact']}.id)  AND
-                            {$this->_aliases['civicrm_pledge']}.status_id IN ( {$statusIds} )
-             LEFT  JOIN ";
+                            {$this->_aliases['civicrm_pledge']}.status_id IN ( {$statusIds} )\n";
 
     // Note that the derived query protects us from providing inaccurate data in the edge case where pledge
     // payments have been edited such that they are not in id order. This might be better as a temp table.
-    $this->_from .= "(SELECT * FROM civicrm_pledge_payment ORDER BY scheduled_date) as {$this->_aliases['civicrm_pledge_payment']}
+    $this->_from .= "LEFT JOIN (SELECT * FROM civicrm_pledge_payment ORDER BY scheduled_date) as {$this->_aliases['civicrm_pledge_payment']}
                         ON ({$this->_aliases['civicrm_pledge']}.id =
                             {$this->_aliases['civicrm_pledge_payment']}.pledge_id AND  {$this->_aliases['civicrm_pledge_payment']}.status_id = {$pendingStatus} ) ";