This commit is contained in:
2026-08-15 12:12:34 +08:00
parent 08187363a1
commit 3a9558bd1c
9 changed files with 159 additions and 11 deletions
@@ -7,6 +7,12 @@ import { run } from './finance-reconciliation-full.mjs'
const here = path.dirname(fileURLToPath(import.meta.url))
const source = fs.readFileSync(path.join(here, 'finance-reconciliation-full.mjs'), 'utf8')
test('Finance pool keeps formal MANUAL_COST and maps container cost by stable container identity', () => {
assert.doesNotMatch(source, /sourceType \?\? ''\) !== 'MANUAL_COST'/)
assert.match(source, /\[raw\.containerBookingId, raw\.loadingPlanId\]\.map\(id\)\.includes\(id\(item\?\.containerId\)\)/)
assert.match(source, /!isUnboundContainerCost\(source\.raw\) \|\| hasContainerAllocations/)
})
const financePermissions = [
'platform:finance:customer-account:list', 'platform:finance:customer-statement:list',
'platform:finance:reconciliation:create', 'platform:finance:reconciliation:review',