From dec025d6bf42a15966877a8d7d260d895ab4a86e Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Tue, 28 Jul 2026 16:57:34 +0530 Subject: [PATCH] ABDM Custom Request: default Expiry Date uses exact +1 year instead of +365 days --- app/Controllers/Patient.php | 2 +- app/Views/billing/Patient_Profile_Opd_V.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Controllers/Patient.php b/app/Controllers/Patient.php index f355287..9294d06 100644 --- a/app/Controllers/Patient.php +++ b/app/Controllers/Patient.php @@ -1422,7 +1422,7 @@ class Patient extends BaseController } try { - $eraseIst = $eraseDateInput !== '' ? new \DateTimeImmutable($eraseDateInput, $istTz) : $nowIst->modify('+365 days'); + $eraseIst = $eraseDateInput !== '' ? new \DateTimeImmutable($eraseDateInput, $istTz) : $nowIst->modify('+1 year'); } catch (\Throwable $e) { return $this->response->setStatusCode(422)->setJSON([ 'ok' => 0, diff --git a/app/Views/billing/Patient_Profile_Opd_V.php b/app/Views/billing/Patient_Profile_Opd_V.php index c7abd6c..04e4f3f 100644 --- a/app/Views/billing/Patient_Profile_Opd_V.php +++ b/app/Views/billing/Patient_Profile_Opd_V.php @@ -1087,7 +1087,7 @@ $(function() { } if (!$('#abdmCustomEraseDate').val()) { var erase = new Date(); - erase.setDate(erase.getDate() + 365); + erase.setFullYear(erase.getFullYear() + 1); $('#abdmCustomEraseDate').val(erase.toISOString().slice(0, 10)); } });