diff --git a/app/Views/report/billing_operations_report_table.php b/app/Views/report/billing_operations_report_table.php
index 157b45d..badf644 100644
--- a/app/Views/report/billing_operations_report_table.php
+++ b/app/Views/report/billing_operations_report_table.php
@@ -4,9 +4,26 @@ $invoiceSummary = $invoice_summary ?? [];
$invoiceRows = $invoice_rows ?? [];
$ipdSummary = $ipd_summary ?? [];
$ipdPaymentRows = $ipd_payment_rows ?? [];
+
+$formatIndianDateTime = static function ($value): string {
+ $value = trim((string) $value);
+ if ($value === '') {
+ return '';
+ }
+
+ $timestamp = strtotime($value);
+ if ($timestamp === false) {
+ return $value;
+ }
+
+ return date('d-m-Y H:i:s', $timestamp);
+};
+
+$minRangeDisplay = $formatIndianDateTime($min_range ?? '');
+$maxRangeDisplay = $formatIndianDateTime($max_range ?? '');
?>
- Date:
= esc((string) ($min_range ?? '')) ?> to
= esc((string) ($max_range ?? '')) ?>
+ Date:
= esc($minRangeDisplay) ?> to
= esc($maxRangeDisplay) ?>
| Doctor:
= esc((string) $doctor_filter) ?>
@@ -110,7 +127,7 @@ $ipdPaymentRows = $ipd_payment_rows ?? [];
| = $sr++ ?> |
= esc((string) ($row->inv_name ?? ('INV#' . ($row->id ?? '')))) ?> |
- = esc((string) ($row->inv_date ?? '')) ?> |
+ = esc($formatIndianDateTime((string) ($row->inv_date ?? ''))) ?> |
= (int) ($row->test_count ?? 0) ?> |
= number_format((float) ($row->test_amount ?? 0), 2) ?> |
= number_format((float) ($row->invoice_amount ?? 0), 2) ?> |
diff --git a/app/Views/report/collection_report_table.php b/app/Views/report/collection_report_table.php
index 6b58758..b230dff 100644
--- a/app/Views/report/collection_report_table.php
+++ b/app/Views/report/collection_report_table.php
@@ -5,9 +5,26 @@ $maxRange = $max_range ?? '';
$totalCr = (float) ($total_cr ?? 0);
$totalDr = (float) ($total_dr ?? 0);
$netTotal = (float) ($net_total ?? 0);
+
+$formatIndianDateTime = static function ($value): string {
+ $value = trim((string) $value);
+ if ($value === '') {
+ return '';
+ }
+
+ $timestamp = strtotime($value);
+ if ($timestamp === false) {
+ return $value;
+ }
+
+ return date('d-m-Y H:i:s', $timestamp);
+};
+
+$minRangeDisplay = $formatIndianDateTime($minRange);
+$maxRangeDisplay = $formatIndianDateTime($maxRange);
?>
-Date(YYYY-MM-DD h:m) between = esc($minRange) ?> and = esc($maxRange) ?>
+Date Range: = esc($minRangeDisplay) ?> to = esc($maxRangeDisplay) ?>
No records found for the selected filters.
diff --git a/app/Views/report/collection_report_total_table.php b/app/Views/report/collection_report_total_table.php
index d405700..a56c6ee 100644
--- a/app/Views/report/collection_report_total_table.php
+++ b/app/Views/report/collection_report_total_table.php
@@ -10,9 +10,26 @@ $totals = $totals ?? [
];
$minRange = $min_range ?? '';
$maxRange = $max_range ?? '';
+
+$formatIndianDateTime = static function ($value): string {
+ $value = trim((string) $value);
+ if ($value === '') {
+ return '';
+ }
+
+ $timestamp = strtotime($value);
+ if ($timestamp === false) {
+ return $value;
+ }
+
+ return date('d-m-Y H:i:s', $timestamp);
+};
+
+$minRangeDisplay = $formatIndianDateTime($minRange);
+$maxRangeDisplay = $formatIndianDateTime($maxRange);
?>
-Date Range: = esc($minRange) ?> to = esc($maxRange) ?>
+Date Range: = esc($minRangeDisplay) ?> to = esc($maxRangeDisplay) ?>
No records found for the selected filters.
diff --git a/app/Views/report/document_list_table.php b/app/Views/report/document_list_table.php
index aed15bb..6421ee9 100644
--- a/app/Views/report/document_list_table.php
+++ b/app/Views/report/document_list_table.php
@@ -3,10 +3,27 @@ $rows = $rows ?? [];
$minRange = $min_range ?? '';
$maxRange = $max_range ?? '';
$uhidFilter = trim((string) ($uhid_filter ?? ''));
+
+$formatIndianDateTime = static function ($value): string {
+ $value = trim((string) $value);
+ if ($value === '') {
+ return '';
+ }
+
+ $timestamp = strtotime($value);
+ if ($timestamp === false) {
+ return $value;
+ }
+
+ return date('d-m-Y H:i:s', $timestamp);
+};
+
+$minRangeDisplay = $formatIndianDateTime($minRange);
+$maxRangeDisplay = $formatIndianDateTime($maxRange);
?>
-
Date Range: = esc($minRange) ?> to = esc($maxRange) ?>
+
Date Range: = esc($minRangeDisplay) ?> to = esc($maxRangeDisplay) ?>
UHID Filter: = esc($uhidFilter) ?>