From bd5accebf8f1ae7841b8c7ef1630748c5fcaefaf Mon Sep 17 00:00:00 2001 From: Prasad <prasad@vtiger.com> Date: Mon, 22 Apr 2024 12:20:29 +0530 Subject: [PATCH] Fixes: Date format display in report for special fields --- modules/Reports/ReportUtils.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/Reports/ReportUtils.php b/modules/Reports/ReportUtils.php index 57f1b15f4..31f6b3a55 100644 --- a/modules/Reports/ReportUtils.php +++ b/modules/Reports/ReportUtils.php @@ -219,14 +219,21 @@ function getReportFieldValue ($report, $picklistArray, $dbField, $valueArray, $f } elseif ($fieldType == 'double' && $operation != 'ExcelExport') { if($current_user->truncate_trailing_zeros == true) $fieldvalue = decimalFormat($fieldvalue); - } + } else { + // special fields + if ( ($report->primarymodule == "Emails" && $dbField->name == "Date_Sent") || $dbField->name == "Emails_Date_Sent") { + $fieldvalue = DateTimeField::convertToUserFormat($fieldvalue); + } + } + if($fieldType == 'currency' && $value == "" && $operation != 'ExcelExport'){ $currencyField = new CurrencyField($value); $fieldvalue = $currencyField->getDisplayValue(); return $fieldvalue; } else if($fieldvalue == "" && $operation != 'ExcelExport') { return ""; - } + } + $fieldvalue = str_replace("<", "<", $fieldvalue); $fieldvalue = str_replace(">", ">", $fieldvalue); $fieldvalue = decode_html($fieldvalue); @@ -356,4 +363,4 @@ function getReportSearchCondition($searchParams, $filterId) { return false; } -?> \ No newline at end of file +?> -- GitLab