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); }