From 977429157339de82f2530d615f828d60eea58944 Mon Sep 17 00:00:00 2001 From: Suphonchai Phoonsawat Date: Thu, 23 Jan 2025 14:58:04 +0700 Subject: [PATCH] =?UTF-8?q?fix=20-=20SIT=20=E0=B8=A3=E0=B8=B0=E0=B8=9A?= =?UTF-8?q?=E0=B8=9A=E0=B8=9A=E0=B8=B1=E0=B8=99=E0=B8=97=E0=B8=B6=E0=B8=81?= =?UTF-8?q?=E0=B9=80=E0=B8=A7=E0=B8=A5=E0=B8=B2=E0=B8=9B=E0=B8=8F=E0=B8=B4?= =?UTF-8?q?=E0=B8=9A=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B8=87=E0=B8=B2=E0=B8=99?= =?UTF-8?q?>>=E0=B8=A5=E0=B8=87=E0=B9=80=E0=B8=A7=E0=B8=A5=E0=B8=B2?= =?UTF-8?q?=E0=B9=80=E0=B8=82=E0=B9=89=E0=B8=B2-=E0=B8=AD=E0=B8=AD?= =?UTF-8?q?=E0=B8=81=E0=B8=87=E0=B8=B2=E0=B8=99=20(=E0=B8=81=E0=B8=A3?= =?UTF-8?q?=E0=B8=93=E0=B8=B5=E0=B8=A5=E0=B8=87=E0=B9=80=E0=B8=A7=E0=B8=A5?= =?UTF-8?q?=E0=B8=B2=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=AD=E0=B8=B5=E0=B8=81?= =?UTF-8?q?=E0=B8=A7=E0=B8=B1=E0=B8=99)=20#921=20-=20=E0=B8=A3=E0=B8=B0?= =?UTF-8?q?=E0=B8=9A=E0=B8=9A=E0=B8=A5=E0=B8=B2=20(=E0=B8=82=E0=B8=A3?= =?UTF-8?q?=E0=B8=81.)=20>>=20=E0=B8=A5=E0=B8=B2=E0=B8=9E=E0=B8=B1?= =?UTF-8?q?=E0=B8=81=E0=B8=9C=E0=B9=88=E0=B8=AD=E0=B8=99=20(=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B9=81=E0=B8=88=E0=B9=89=E0=B8=87=E0=B9=80?= =?UTF-8?q?=E0=B8=95=E0=B8=B7=E0=B8=AD=E0=B8=99=E0=B8=81=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=E0=B9=80=E0=B8=A5=E0=B8=B7=E0=B8=AD=E0=B8=81=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=99=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=8B=E0=B9=89=E0=B8=B3?= =?UTF-8?q?)=20#837?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BMA.EHR.Leave/Controllers/LeaveController.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BMA.EHR.Leave/Controllers/LeaveController.cs b/BMA.EHR.Leave/Controllers/LeaveController.cs index b4cd6cb6..a742dcc2 100644 --- a/BMA.EHR.Leave/Controllers/LeaveController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveController.cs @@ -427,8 +427,10 @@ namespace BMA.EHR.Leave.Service.Controllers { if (data.CheckOut != null) { + // fix issue SIT ระบบบันทึกเวลาปฏิบัติงาน>>ลงเวลาเข้า-ออกงาน (กรณีลงเวลาออกอีกวัน) #921 + var cur_date = DateTime.Now.Date; // ถ้า check-in + check-out ไปแล้ว - if (data.CheckOut.Value.Date == DateTime.Now.Date) + if (data.CheckIn.Date == cur_date && data.CheckOut.Value.Date == cur_date) { return Error("คุณได้ทำการลงเวลาเข้าและออกเรียบร้อยแล้ว คุณจะสามารถลงเวลาได้อีกครั้งในวันถัดไป"); } @@ -1609,6 +1611,7 @@ namespace BMA.EHR.Leave.Service.Controllers }; await _additionalCheckRequestRepository.AddAsync(request); + return Success(); }