แก้ปีพ้นราชการ

This commit is contained in:
Kittapath 2023-10-05 09:17:21 +07:00
parent 788055d358
commit f4ba77a30d
2 changed files with 9 additions and 3 deletions

View file

@ -310,6 +310,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
{
if (!req.Type.Trim().ToUpper().Contains("EMPLOYEE") && !req.Type.Trim().ToUpper().Contains("OFFICER"))
return Error("ประเภทพ้นราชการไม่ถูกต้อง");
if (req.Year == 0)
{
req.Year = DateTime.Now.Year;
if (req.Year > 2500)
req.Year = req.Year - 543;
}
var round = 1;
var retire = await _context.RetirementPeriods