update
This commit is contained in:
@ -1,14 +1,4 @@
|
|||||||
import {
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn, Index } from "typeorm";
|
||||||
Entity,
|
|
||||||
PrimaryGeneratedColumn,
|
|
||||||
Column,
|
|
||||||
CreateDateColumn,
|
|
||||||
UpdateDateColumn,
|
|
||||||
DeleteDateColumn,
|
|
||||||
ManyToOne,
|
|
||||||
JoinColumn,
|
|
||||||
Index,
|
|
||||||
} from "typeorm";
|
|
||||||
import { Status } from "../../types/status";
|
import { Status } from "../../types/status";
|
||||||
import { HrmsEmployee } from "./hrms_employee";
|
import { HrmsEmployee } from "./hrms_employee";
|
||||||
import { HrmsPayroll } from "./hrms_payroll";
|
import { HrmsPayroll } from "./hrms_payroll";
|
||||||
@ -27,70 +17,6 @@ export class HrmsPayrollMonthly {
|
|||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
payroll_setup: HrmsPayroll;
|
payroll_setup: HrmsPayroll;
|
||||||
|
|
||||||
@Column({ type: "int", nullable: false })
|
|
||||||
period_month: number; // 1-12
|
|
||||||
|
|
||||||
@Column({ type: "int", nullable: false })
|
|
||||||
period_year: number; // e.g., 2026
|
|
||||||
|
|
||||||
// Payroll Setup Data (snapshot at the time of generation)
|
|
||||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false })
|
|
||||||
basic_salary: number;
|
|
||||||
|
|
||||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false, default: 0 })
|
|
||||||
subsidy: number;
|
|
||||||
|
|
||||||
// Working Days Calculation
|
|
||||||
@Column({ type: "int", nullable: false })
|
|
||||||
working_days_in_month: number;
|
|
||||||
|
|
||||||
@Column({ type: "int", nullable: false, default: 0 })
|
|
||||||
days_present: number;
|
|
||||||
|
|
||||||
@Column({ type: "int", nullable: false, default: 0 })
|
|
||||||
days_absent: number;
|
|
||||||
|
|
||||||
@Column({ type: "int", nullable: false, default: 0 })
|
|
||||||
unpaid_leave_days: number;
|
|
||||||
|
|
||||||
// Deductions for Absences
|
|
||||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false, default: 0 })
|
|
||||||
deduction_absence: number;
|
|
||||||
|
|
||||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false, default: 0 })
|
|
||||||
deduction_unpaid_leave: number;
|
|
||||||
|
|
||||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false, default: 0 })
|
|
||||||
total_attendance_deduction: number;
|
|
||||||
|
|
||||||
// Recalculated Amounts
|
|
||||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false })
|
|
||||||
adjusted_basic_salary: number;
|
|
||||||
|
|
||||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false })
|
|
||||||
total_gross: number;
|
|
||||||
|
|
||||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false, default: 0 })
|
|
||||||
ss_4_percent: number;
|
|
||||||
|
|
||||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false, default: 0 })
|
|
||||||
ss_6_percent: number;
|
|
||||||
|
|
||||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false, default: 0 })
|
|
||||||
ss_total: number;
|
|
||||||
|
|
||||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false, default: 0 })
|
|
||||||
tax_amount: number;
|
|
||||||
|
|
||||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false, default: 0 })
|
|
||||||
total_deduct: number;
|
|
||||||
|
|
||||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false, default: 0 })
|
|
||||||
total_nett: number;
|
|
||||||
|
|
||||||
@Column({ length: 64 })
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
@Column({ type: "text", nullable: true })
|
||||||
notes: string;
|
notes: string;
|
||||||
|
|
||||||
@ -112,4 +38,3 @@ export class HrmsPayrollMonthly {
|
|||||||
@Column({ nullable: true, length: 256 })
|
@Column({ nullable: true, length: 256 })
|
||||||
deleted_by: string;
|
deleted_by: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user