CRM-15935 Fixed issue of Lybunt report includes people who made no contributions
authorpratikshad <pratiksha.dubey@webaccess.co.in>
Thu, 12 Feb 2015 09:02:37 +0000 (19:02 +1000)
committerpratikshad <pratiksha.dubey@webaccess.co.in>
Mon, 16 Feb 2015 00:09:54 +0000 (10:09 +1000)
----------------------------------------
* CRM-15935: Lybunt report includes people who made no contributions
  https://issues.civicrm.org/jira/browse/CRM-15935

CRM/Report/Form/Contribute/Lybunt.php

index 0fd0009b6a3591a52200bf228cf1503befc58cd5..518db5bc97a5f7e5bf2d395a39fa5ff4517f3c70 100644 (file)
@@ -267,12 +267,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
         foreach ($table['filters'] as $fieldName => $field) {
           $clause = NULL;
           if ($fieldName == 'yid') {
-            $clause = "contribution_civireport.contact_id NOT IN
-(SELECT distinct contri.contact_id FROM civicrm_contribution contri
- WHERE contri.is_test = 0 AND " .
-              self::fiscalYearOffset('contri.receive_date') . " = $current_year) AND contribution_civireport.contact_id IN (SELECT distinct contri.contact_id FROM civicrm_contribution contri
- WHERE " . self::fiscalYearOffset('contri.receive_date') .
-              " = $previous_year AND contri.is_test = 0)";
+            $clause = self::fiscalYearOffset('contribution_civireport.receive_date') ." = $previous_year";
           }
           elseif (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE
           ) {