fix total

This commit is contained in:
AdisakKanthawilang 2024-02-27 10:09:51 +07:00
parent bf12751bfa
commit 906edd7050
3 changed files with 9 additions and 22 deletions

View file

@ -43,12 +43,8 @@ export class SalaryPeriodController extends Controller {
@Body() requestBody: CreateSalaryPeriod,
@Request() request: { user: Record<string, any> },
) {
//ssss ไม่ต้องเช็ค?
const salaryPeriod = Object.assign(new SalaryPeriod(), requestBody);
if (!salaryPeriod) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล");
}
const chk_toUpper = ["SPECIAL", "APR", "OCT"];
if (!chk_toUpper.includes(salaryPeriod.period.toUpperCase())) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ประเภทผัง ไม่ถูกต้อง");