หาสถานะรอบที่active

This commit is contained in:
Kittapath 2024-03-26 10:30:02 +07:00
parent 426583bcdb
commit 43ae1b5b07

View file

@ -1434,6 +1434,7 @@ export class SalaryPeriodController extends Controller {
const [salaryPeriod, total] = await AppDataSource.getRepository(SalaryPeriod)
.createQueryBuilder("salaryPeriod")
.andWhere(year != 0 ? "salaryPeriod.year LIKE :year" : "1=1", { year: `${year}` })
.andWhere({ isActive: true })
.select([
"salaryPeriod.id",
"salaryPeriod.period",