import { EmployeeType } from './employee.type'; export type CashAdvanceStatus = 'Paid' | 'Waiting Approval' | 'Cancelled' | 'Approved' | 'Rejected'; export interface CashAdvance { _id: string; employeeId: string; employeeName: string; position: string; employeeType: string; employeeDivision: string; totalAdvance: number; salaryInstallment: number; bonusInstallment: number; totalInstallment: number; remainingInstallment: number; remainingAdvance: number; submissionDate: string; completionDate: string; status: 'Approved' | 'Pending' | 'Rejected' | string; estimatedMonth: number; installments: Installments[]; } export interface Installments { payrollId: string; submissionDate: string; value: number; override: boolean; totalInstallment: number; remainingAdvance: number; status: 'dibayar' | 'tunda' | string; note: string; } export interface CashAdvanceDetail { _id: string; employeeId: string; employeeName: string; position: string; employeeType: EmployeeType; employeeDivision: string; submissionDate: string; completionDate: string; totalAdvance: number; salaryInstallment: number; bonusInstallment: number; installments: Installments[]; totalInstallment: number; remainingAdvance: number; remainingInstallment: number; status: CashAdvanceStatus; estimatedMonth: number; } export interface CashAdvanceEmployeeDetail { employeeName: string; position: string; employeeType: EmployeeType; employeeDivision: string; }