160 lines
3.6 KiB
TypeScript
160 lines
3.6 KiB
TypeScript
// LFA Payment (HRM.BO/LFA)
|
|
|
|
/** One uploaded row: what the user gives. Every amount is worked out by the server. */
|
|
export class LFAPaymentInput {
|
|
rowNo: number;
|
|
employeeNo: string;
|
|
}
|
|
|
|
/** One calculated row of the New LFA Payment grid. */
|
|
export class LFAPaymentRow extends LFAPaymentInput {
|
|
employeeID: number;
|
|
name: string;
|
|
gradeName: string;
|
|
designationName: string;
|
|
divisionName: string;
|
|
departmentName: string;
|
|
joiningDate: Date;
|
|
confirmationDate: Date;
|
|
serviceLength: string; // Joining Date to Payment Date
|
|
joiningBasic: number;
|
|
lastDecBasic: number;
|
|
basicSalary: number;
|
|
amount: number;
|
|
paymentDate: Date;
|
|
}
|
|
|
|
/** Why a row (or, with rowNo 0, the file) cannot be paid. */
|
|
export class LFAPaymentIssue {
|
|
rowNo: number;
|
|
employeeNo: string;
|
|
employeeName: string;
|
|
message: string;
|
|
}
|
|
|
|
export class LFAPaymentReadResult {
|
|
salaryMonth: Date;
|
|
rows: LFAPaymentRow[];
|
|
issues: LFAPaymentIssue[];
|
|
}
|
|
|
|
export class LFAPaymentRequest {
|
|
paymentDate: string; // yyyy-MM-dd
|
|
remarks: string;
|
|
rows: LFAPaymentInput[];
|
|
expectedTotal: number;
|
|
}
|
|
|
|
export class LFAPaymentProcessResult {
|
|
saved: boolean;
|
|
message: string;
|
|
batchNumber: string;
|
|
validation: LFAPaymentReadResult; // set when nothing was saved because the rows no longer pass
|
|
}
|
|
|
|
export class LFAPaymentInfo {
|
|
payrollTypeID: number;
|
|
salaryMonth: Date;
|
|
nextBatchNumber: string;
|
|
}
|
|
|
|
/** One row of the Payment History grid. */
|
|
export class LFAPaymentHistory {
|
|
lfaPaymentDetailID: number;
|
|
batchNumber: string;
|
|
paymentDate: Date;
|
|
employeeNo: string;
|
|
name: string;
|
|
designationName: string;
|
|
departmentName: string;
|
|
joiningDate: Date;
|
|
basicSalary: number;
|
|
amount: number;
|
|
}
|
|
|
|
// ── LFA Payment Undo ──
|
|
|
|
/** One batch of the LFA Payment Undo page. */
|
|
export class LFAPaymentBatch {
|
|
lfaPaymentID: number;
|
|
batchNumber: string;
|
|
salaryMonth: Date;
|
|
lfaYear: Date;
|
|
paymentDate: Date;
|
|
remarks: string;
|
|
wfStatus: number;
|
|
isTaxUpdated: boolean;
|
|
headCount: number;
|
|
totalAmount: number;
|
|
createdByName: string;
|
|
creationDate: Date;
|
|
approvedByName: string;
|
|
approvedDate: Date;
|
|
// approval workflow (WFTYPE 33)
|
|
wfMovementTranID: number;
|
|
uniqueNumber: number;
|
|
isAtInitiator: boolean;
|
|
pendingWith: string;
|
|
statusText: string;
|
|
canUndo: boolean;
|
|
undoBlockedReason: string;
|
|
}
|
|
|
|
/** One employee of a batch. */
|
|
export class LFAPaymentBatchEmployee {
|
|
lfaPaymentDetailID: number;
|
|
employeeID: number;
|
|
employeeNo: string;
|
|
name: string;
|
|
designationName: string;
|
|
departmentName: string;
|
|
joiningDate: Date;
|
|
basicSalary: number;
|
|
amount: number;
|
|
}
|
|
|
|
/** detailIDs empty = the whole batch. */
|
|
export class LFAPaymentUndoRequest {
|
|
lfaPaymentID: number;
|
|
detailIDs: number[];
|
|
}
|
|
|
|
export class LFAPaymentUndoResult {
|
|
undone: boolean;
|
|
message: string;
|
|
removedCount: number;
|
|
batchRemoved: boolean;
|
|
}
|
|
|
|
// ── LFA Payment Approval (as Salary Approve) ──
|
|
|
|
export class LFAApprovalInfo {
|
|
/** Logic lfaapproval/workflow = Yes */
|
|
isWorkflowRequired: boolean;
|
|
hasEmployee: boolean;
|
|
hasWorkflowSetup: boolean;
|
|
}
|
|
|
|
export class LFAApprovalRequest {
|
|
lfaPaymentID: number;
|
|
remarks: string;
|
|
}
|
|
|
|
export class LFAApproverActionRequest {
|
|
wfMovementTranID: number;
|
|
remarks: string;
|
|
}
|
|
|
|
export class LFAApprovalResult {
|
|
done: boolean;
|
|
message: string;
|
|
approved: boolean;
|
|
}
|
|
|
|
export class LFAApproverBatch {
|
|
batch: LFAPaymentBatch;
|
|
employees: LFAPaymentBatchEmployee[];
|
|
canAct: boolean;
|
|
message: string;
|
|
}
|