修复财务整柜成本雪花ID精度
This commit is contained in:
@@ -152,7 +152,8 @@ test('fixture creates four real receivable manual sources before payable source'
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('container cost uses loading plan identity and verifies snapshot fields before Finance', () => {
|
test('container cost uses loading plan identity and verifies snapshot fields before Finance', () => {
|
||||||
assert.match(source, /containerId: Number\(container\.loadingPlanId\)/)
|
assert.match(source, /containerId: String\(container\.loadingPlanId\)/)
|
||||||
|
assert.doesNotMatch(source, /containerId: Number\(container\.loadingPlanId\)/)
|
||||||
assert.match(source, /smart-loading\/plans\/\$\{encodeURIComponent\(container\.loadingPlanId\)\}/)
|
assert.match(source, /smart-loading\/plans\/\$\{encodeURIComponent\(container\.loadingPlanId\)\}/)
|
||||||
assert.match(source, /id\(item\?\.accountId\) === id\(customerId\)/)
|
assert.match(source, /id\(item\?\.accountId\) === id\(customerId\)/)
|
||||||
assert.match(source, /Number\(item\?\.orderId\) > 0/)
|
assert.match(source, /Number\(item\?\.orderId\) > 0/)
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ async function createContainerCost(context, customerId, container, voucherFileId
|
|||||||
const body = { customerId: Number(customerId), costType: 'CONTAINER_SHARED', orderId: null,
|
const body = { customerId: Number(customerId), costType: 'CONTAINER_SHARED', orderId: null,
|
||||||
// Finance names this field containerId, but its Firstleg cost snapshot contract
|
// Finance names this field containerId, but its Firstleg cost snapshot contract
|
||||||
// resolves it as the loading plan ID, not the physical container booking ID.
|
// resolves it as the loading plan ID, not the physical container booking ID.
|
||||||
containerId: Number(container.loadingPlanId), expenseName: `${context.marker}-整柜成本`, amount: 300,
|
containerId: String(container.loadingPlanId), expenseName: `${context.marker}-整柜成本`, amount: 300,
|
||||||
currency: 'CNY', voucherFileIds: [voucherFileId], remark: context.marker }
|
currency: 'CNY', voucherFileIds: [voucherFileId], remark: context.marker }
|
||||||
const response = await request(context, 'POST', '/api/platform/finance/v1/cost-entries', body)
|
const response = await request(context, 'POST', '/api/platform/finance/v1/cost-entries', body)
|
||||||
if (response?.body?.code === 'FIN_400') {
|
if (response?.body?.code === 'FIN_400') {
|
||||||
|
|||||||
Reference in New Issue
Block a user