fix total
This commit is contained in:
parent
bf12751bfa
commit
906edd7050
3 changed files with 9 additions and 22 deletions
|
|
@ -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, "ประเภทผัง ไม่ถูกต้อง");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue