完善财务全量验收链路
This commit is contained in:
@@ -64,6 +64,7 @@ function hookSet({ missing = false } = {}) {
|
||||
loadFeeItem: async (context, direction) => ({ id: direction === 'PAYABLE' ? '902' : '901', status: 'ACTIVE' }),
|
||||
loadSupplier: async () => missing ? null : ({ id: 'PARTNER-1', partnerName: '往来单位一', status: 'ACTIVE' }),
|
||||
uploadVoucher: async () => missing ? null : 'VOUCHER-1',
|
||||
verifyContainerCostSnapshotInput: async () => ({ valid: true, items: [{ accountId: '701', orderId: 'O-AUTO1', volumeCbm: 0.072 }] }),
|
||||
calculateAutomaticFee: async (context, resource) => {
|
||||
automaticIndex += 1
|
||||
const weight = automaticIndex % 2 === 1
|
||||
@@ -149,3 +150,14 @@ test('fixture creates four real receivable manual sources before payable source'
|
||||
assert.match(source, /'MANUAL_RECEIVABLE'/)
|
||||
assert.match(source, /dateOffset\(-1 - \(index % 2\)\)/)
|
||||
})
|
||||
|
||||
test('container cost uses loading plan identity and verifies snapshot fields before Finance', () => {
|
||||
assert.match(source, /containerId: Number\(container\.loadingPlanId\)/)
|
||||
assert.match(source, /smart-loading\/plans\/\$\{encodeURIComponent\(container\.loadingPlanId\)\}/)
|
||||
assert.match(source, /id\(item\?\.accountId\) === id\(customerId\)/)
|
||||
assert.match(source, /Number\(item\?\.orderId\) > 0/)
|
||||
assert.match(source, /Number\(item\?\.volumeCbm\) > 0/)
|
||||
assert.match(source, /snapshotInput\.valid \? await createContainerCost\(context, customerId, container, voucherFileId, snapshotInput\)/)
|
||||
assert.match(source, /publicSnapshotValid=\$\{snapshotInput\?\.valid === true\}/)
|
||||
assert.match(source, /Finance -> Firstleg 内部快照服务部署\/契约/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user