15 lines
460 B
JavaScript
15 lines
460 B
JavaScript
|
|
export function isArchivedExpenseClaim(claim) {
|
||
|
|
const stage = String(claim?.approval_stage || claim?.approvalStage || '').trim()
|
||
|
|
const status = String(claim?.status || '').trim().toLowerCase()
|
||
|
|
|
||
|
|
if (stage === '归档入账' || stage === 'completed' || stage.includes('归档')) {
|
||
|
|
return true
|
||
|
|
}
|
||
|
|
|
||
|
|
if (!['approved', 'completed', 'paid'].includes(status)) {
|
||
|
|
return false
|
||
|
|
}
|
||
|
|
|
||
|
|
return !stage || stage === '归档入账' || stage === 'completed'
|
||
|
|
}
|