fix bug
This commit is contained in:
parent
09bd6bc356
commit
2a117223f7
2 changed files with 8 additions and 10 deletions
|
|
@ -329,7 +329,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
salaryOrg.quantityUsed = amountFullType;
|
salaryOrg.quantityUsed = amountFullType;
|
||||||
const calRemainQuota = salaryOrg.fifteenPercent - amountFullType;
|
const calRemainQuota = salaryOrg.fifteenPercent - amountFullType;
|
||||||
salaryOrg.remainQuota = calRemainQuota;
|
salaryOrg.remainQuota = calRemainQuota;
|
||||||
await this.salaryOrgRepository.save(salaryOrg,{data:req});
|
await this.salaryOrgRepository.save(salaryOrg, { data: req });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (_salaryProfile.salaryOrg.salaryPeriod.period == "OCT") {
|
} else if (_salaryProfile.salaryOrg.salaryPeriod.period == "OCT") {
|
||||||
|
|
@ -383,7 +383,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
? 0
|
? 0
|
||||||
: sumAmountUse.totalAmount;
|
: sumAmountUse.totalAmount;
|
||||||
salaryOrg.remainingAmount = calRemainAmount;
|
salaryOrg.remainingAmount = calRemainAmount;
|
||||||
await this.salaryOrgRepository.save(salaryOrg,{data:req});
|
await this.salaryOrgRepository.save(salaryOrg, { data: req });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -579,7 +579,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
} else {
|
} else {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ประเภทการเลื่อนขึ้นเงินเดือนไม่ถูกต้อง");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ประเภทการเลื่อนขึ้นเงินเดือนไม่ถูกต้อง");
|
||||||
}
|
}
|
||||||
const before = null;
|
const before = structuredClone(salaryProfile);
|
||||||
await this.salaryProfileRepository.save(salaryProfile, { data: request });
|
await this.salaryProfileRepository.save(salaryProfile, { data: request });
|
||||||
setLogDataDiff(request, { before, after: salaryProfile });
|
setLogDataDiff(request, { before, after: salaryProfile });
|
||||||
|
|
||||||
|
|
@ -1026,7 +1026,7 @@ export class SalaryPeriodController extends Controller {
|
||||||
} else {
|
} else {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ประเภทการเลื่อนขึ้นเงินเดือนไม่ถูกต้อง");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ประเภทการเลื่อนขึ้นเงินเดือนไม่ถูกต้อง");
|
||||||
}
|
}
|
||||||
const before = null;
|
const before = structuredClone(salaryProfile);
|
||||||
await this.salaryProfileRepository.save(salaryProfile, { data: req });
|
await this.salaryProfileRepository.save(salaryProfile, { data: req });
|
||||||
setLogDataDiff(req, { before, after: salaryProfile });
|
setLogDataDiff(req, { before, after: salaryProfile });
|
||||||
|
|
||||||
|
|
@ -3098,9 +3098,8 @@ export class SalaryPeriodController extends Controller {
|
||||||
const before = structuredClone(x);
|
const before = structuredClone(x);
|
||||||
x.status = "WAITHEAD2";
|
x.status = "WAITHEAD2";
|
||||||
x.ownerRecommend = body.titleRecommend;
|
x.ownerRecommend = body.titleRecommend;
|
||||||
await this.salaryOrgRepository.save(x,{data:request});
|
await this.salaryOrgRepository.save(x, { data: request });
|
||||||
setLogDataDiff(request, { before, after: x });
|
setLogDataDiff(request, { before, after: x });
|
||||||
|
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
|
|
@ -3138,9 +3137,8 @@ export class SalaryPeriodController extends Controller {
|
||||||
const before = structuredClone(x);
|
const before = structuredClone(x);
|
||||||
x.status = "REPORT";
|
x.status = "REPORT";
|
||||||
x.ownerRecommend = body.titleRecommend;
|
x.ownerRecommend = body.titleRecommend;
|
||||||
await this.salaryOrgRepository.save(x,{data:request});
|
await this.salaryOrgRepository.save(x, { data: request });
|
||||||
setLogDataDiff(request, { before, after: x });
|
setLogDataDiff(request, { before, after: x });
|
||||||
|
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
|
|
|
||||||
|
|
@ -713,7 +713,7 @@ export class SalaryPeriodEmployeeController extends Controller {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ประเภทการเลื่อนขึ้นเงินเดือนไม่ถูกต้อง");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ประเภทการเลื่อนขึ้นเงินเดือนไม่ถูกต้อง");
|
||||||
}
|
}
|
||||||
|
|
||||||
const before = null;
|
const before = structuredClone(salaryProfile);
|
||||||
await this.salaryProfileRepository.save(salaryProfile, { data: req });
|
await this.salaryProfileRepository.save(salaryProfile, { data: req });
|
||||||
setLogDataDiff(req, { before, after: salaryProfile });
|
setLogDataDiff(req, { before, after: salaryProfile });
|
||||||
|
|
||||||
|
|
@ -1334,7 +1334,7 @@ export class SalaryPeriodEmployeeController extends Controller {
|
||||||
} else {
|
} else {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ประเภทการเลื่อนขึ้นเงินเดือนไม่ถูกต้อง");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ประเภทการเลื่อนขึ้นเงินเดือนไม่ถูกต้อง");
|
||||||
}
|
}
|
||||||
const before = null;
|
const before = structuredClone(salaryProfile);
|
||||||
await this.salaryProfileRepository.save(salaryProfile, { data: req });
|
await this.salaryProfileRepository.save(salaryProfile, { data: req });
|
||||||
setLogDataDiff(req, { before, after: salaryProfile });
|
setLogDataDiff(req, { before, after: salaryProfile });
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue