add feild SalaryOrg

This commit is contained in:
AdisakKanthawilang 2024-02-28 16:27:36 +07:00
parent 0f28e9d531
commit 95c4321c5d
2 changed files with 52 additions and 4 deletions

View file

@ -273,9 +273,9 @@ export class SalaryPeriodController extends Controller {
}
/**
* API
* API
*
* @summary SLR_025 - #24
* @summary SLR_025 - #24
*
* @param {string} id profile Id
* @param {string} type NONE-> HAFT-> FULL->1 FULLHAFT->1.5
@ -746,9 +746,9 @@ export class SalaryPeriodController extends Controller {
}
/**
* API
* API snapshot salary
*
* @summary SLR_020 - #20
* @summary snapshot salary
*
*/
@Get("snapshot/{snaphot}/{salaryPeriodId}")

View file

@ -59,6 +59,54 @@ export class SalaryOrg extends EntityBase {
})
group: string;
@Column({
comment: "เลือกไปแล้ว",
default: 0,
})
quantityUsed: number;
@Column({
comment: "คงเหลือโควตา",
default: 0,
})
remainQuota: number;
@Column({
comment: "จำนวนเงินคนครองปัจจุบัน",
type: "double",
default: 0,
})
currentAmount: number;
@Column({
comment: "วงเงิน6%",
type: "double",
default: 0,
})
sixPercentAmount: number;
@Column({
comment: "ยอดเงินที่ใช้ไป",
type: "double",
default: 0,
})
spentAmount: number;
@Column({
comment: "ใช้ไปเท่าไหร่",
type: "double",
default: 0,
})
useAmount: number;
@Column({
comment: "เหลือเท่าไหร่",
type: "double",
default: 0,
})
remainingAmount: number;
@ManyToOne(() => SalaryPeriod, (salaryPeriod) => salaryPeriod.salaryOrgs)
@JoinColumn({ name: "salaryPeriodId" })
salaryPeriod: SalaryPeriod;