CRM-17155 improve links & options from all reports page
[civicrm-core.git] / CRM / Report / Utils / Report.php
index 2337edb9599ede3cf14db39b21c1963ca3fb1c42..8aa59cd6a53651b4d63e19323f2ba301423f9d68 100644 (file)
@@ -285,7 +285,9 @@ WHERE  inst.report_id = %1";
               $value = CRM_Utils_Date::customFormat($value, '%Y-%m-%d');
             }
           }
-          elseif (CRM_Utils_Array::value('type', $form->_columnHeaders[$v]) == 1024) {
+          // Note the reference to a specific field does not belong in this generic class & does not work on all reports.
+          // @todo - fix this properly rather than just supressing the en-otice. Repeat transaction report is a good example.
+          elseif (CRM_Utils_Array::value('type', $form->_columnHeaders[$v]) == 1024 && !empty($row['civicrm_contribution_currency'])) {
             $value = CRM_Utils_Money::format($value, $row['civicrm_contribution_currency']);
           }
           $displayRows[$v] = '"' . $value . '"';