fix(client): preserve tax mode in customs candidates

This commit is contained in:
2026-09-28 16:35:40 +01:00
parent b03cb1dd3d
commit 214fe4ff50
3 changed files with 8 additions and 2 deletions
@@ -107,6 +107,8 @@ test('declares the final C02 row and detail contract in the API adapter', () =>
for (const field of ['pickupMethod', 'requestedPickupAt', 'containerMode', 'destinationType', 'destinationCode', 'skuNos', 'totalQuantity', 'totalNetWeightKg', 'chargeableVolumeCbm', 'inboundCompletedAt', 'shipmentId', 'referenceId']) {
assert.match(unifiedApiSource, new RegExp(`${field}:`))
}
assert.match(unifiedApiSource, /taxMode: ApiTaxMode \| null/)
assert.match(unifiedApiSource, /customsInspection: boolean \| null/)
assert.match(unifiedApiSource, /loadingVersion: number/)
assert.match(unifiedApiSource, /pickingVersion: number/)
assert.match(unifiedApiSource, /summary: MerchantUnifiedOrderRow/)
@@ -142,6 +144,8 @@ test('maps C02 authoritative status, transport, cargo and pickup snapshots', ()
assert.match(storeSource, /id: String\(summary\.orderId\)/)
assert.match(storeSource, /transportMode: unifiedTransport\(summary\.containerMode\)/)
assert.match(storeSource, /status: summary\.mainStatus/)
assert.match(storeSource, /taxMode: summary\.taxMode \?\? 'BUY_DECLARATION'/)
assert.match(storeSource, /customsInspection: summary\.customsInspection \?\? false/)
assert.match(storeSource, /fulfillmentType: summary\.fulfillmentType \?\? 'STANDARD'/)
assert.match(storeSource, /lxCode: summary\.lxCode \?\? ''/)
assert.match(storeSource, /mapped\.fulfillmentType = detail\.summary\.fulfillmentType \?\? mapped\.fulfillmentType/)