From f79104be1471a9f4874816985807ea2244b84d04 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Wed, 18 Dec 2024 17:33:01 +0700 Subject: [PATCH] fix year --- src/controllers/ReportController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index ea1d5c4c..0bdad2d1 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -64,7 +64,7 @@ export class ReportController extends Controller { if (minAge > maxAge) { throw new HttpError(HttpStatus.NOT_FOUND, "ageMin cannot be greater than ageMax"); } - const yearInAD = year?year - 543:null; + const yearInAD = year?year:null; const currentRevision = await this.orgRevisionRepository.findOne({ where:{ orgRevisionIsCurrent: true @@ -175,7 +175,7 @@ export class ReportController extends Controller { if (minAge > maxAge) { throw new HttpError(HttpStatus.NOT_FOUND, "ageMin cannot be greater than ageMax"); } - const yearInAD = year?year - 543:null; + const yearInAD = year?year:null; const currentRevision = await this.orgRevisionRepository.findOne({ where:{ orgRevisionIsCurrent: true