From 965984c5c625c65da67650be00d1a540e3d1b75a Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Mon, 4 Mar 2024 13:37:21 +0700 Subject: [PATCH] fix bug --- src/controllers/SalaryPeriodController.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/controllers/SalaryPeriodController.ts b/src/controllers/SalaryPeriodController.ts index 360621d..5efa7e4 100644 --- a/src/controllers/SalaryPeriodController.ts +++ b/src/controllers/SalaryPeriodController.ts @@ -153,7 +153,7 @@ export class SalaryPeriodController extends Controller { await this.salaryProfileRepository.remove(salaryProfile); // หาจำนวน Quota คงเหลือ - if (salaryProfile.salaryOrg.snapshot == "SNAP1") { + // if (salaryProfile.salaryOrg.snapshot == "SNAP1") { if(salaryProfile.salaryOrg.salaryPeriod.period == "APR"){ const amountFullType = await this.salaryProfileRepository.count({ where: { @@ -179,7 +179,7 @@ export class SalaryPeriodController extends Controller { salaryProfile.salaryOrg.remainingAmount = calRemainAmount; await this.salaryOrgRepository.save(salaryProfile?.salaryOrg); } - } + // } return new HttpSuccess(); } @@ -287,7 +287,7 @@ export class SalaryPeriodController extends Controller { await this.salaryProfileRepository.save(salaryProfile); // หาจำนวน Quota คงเหลือ - if (salaryProfile.salaryOrg.snapshot == "SNAP1") { + // if (salaryProfile.salaryOrg.snapshot == "SNAP1") { if(salaryProfile.salaryOrg.salaryPeriod.period == "APR"){ const amountFullType = await this.salaryProfileRepository.count({ where: { @@ -313,7 +313,7 @@ export class SalaryPeriodController extends Controller { salaryProfile.salaryOrg.remainingAmount = calRemainAmount; await this.salaryOrgRepository.save(salaryProfile?.salaryOrg); } - } + // } return new HttpSuccess(); } @@ -345,7 +345,7 @@ export class SalaryPeriodController extends Controller { await this.salaryProfileRepository.save(salaryProfile); if (salaryOrg) { // หาจำนวน Quota คงเหลือ - if (salaryOrg.snapshot == "SNAP1") { + // if (salaryOrg.snapshot == "SNAP1") { if(salaryOrg.salaryPeriod.period == "APR"){ const amountFullType = await this.salaryProfileRepository.count({ where: { @@ -371,7 +371,7 @@ export class SalaryPeriodController extends Controller { salaryOrg.remainingAmount = calRemainAmount; await this.salaryOrgRepository.save(salaryOrg); } - } + // } } return new HttpSuccess(); } @@ -692,7 +692,7 @@ export class SalaryPeriodController extends Controller { await this.salaryProfileRepository.save(salaryProfile); // หาจำนวน Quota คงเหลือ - if (salaryOrg.snapshot == "SNAP1") { + // if (salaryOrg.snapshot == "SNAP1") { if(salaryOrg.salaryPeriod.period == "APR"){ const amountFullType = await this.salaryProfileRepository.count({ where: { @@ -718,7 +718,7 @@ export class SalaryPeriodController extends Controller { salaryOrg.remainingAmount = calRemainAmount; await this.salaryOrgRepository.save(salaryOrg); } - } + // } return new HttpSuccess(salaryProfile.id); }