diff --git a/scripts/admin-test-env-modules/finance-full-fixtures-contract.test.mjs b/scripts/admin-test-env-modules/finance-full-fixtures-contract.test.mjs index fd00a5d87..7de836e32 100644 --- a/scripts/admin-test-env-modules/finance-full-fixtures-contract.test.mjs +++ b/scripts/admin-test-env-modules/finance-full-fixtures-contract.test.mjs @@ -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', () => { - 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, /id\(item\?\.accountId\) === id\(customerId\)/) assert.match(source, /Number\(item\?\.orderId\) > 0/) diff --git a/scripts/admin-test-env-modules/finance-full-fixtures.mjs b/scripts/admin-test-env-modules/finance-full-fixtures.mjs index a97d00ce0..0b7f86e78 100644 --- a/scripts/admin-test-env-modules/finance-full-fixtures.mjs +++ b/scripts/admin-test-env-modules/finance-full-fixtures.mjs @@ -258,7 +258,7 @@ async function createContainerCost(context, customerId, container, voucherFileId const body = { customerId: Number(customerId), costType: 'CONTAINER_SHARED', orderId: null, // Finance names this field containerId, but its Firstleg cost snapshot contract // 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 } const response = await request(context, 'POST', '/api/platform/finance/v1/cost-entries', body) if (response?.body?.code === 'FIN_400') {