test: preserve PDA producer identity for fixture handoff

This commit is contained in:
2026-09-24 05:42:16 +08:00
parent 8f1fafe572
commit c346c6b1ba
@@ -862,9 +862,12 @@ async function runReceiving(context, token, secondaryToken, merchantToken, prefe
const warehouseFacts = await verifyWarehouseQueries(context, token, inbound.inboundCode,
pallets.get(inbound.inboundCode), inbound.destinationType)
if (warehouseFacts && context.context?.phase4OverseasPdaOperations) {
const producerFixture = (context.createdResources?.phase4InboundProducerFixtures?.containers || [])
.find((item) => id(item?.inboundCode) === id(inbound.inboundCode))
const fixture = {
containerNo, order, destinationType: inbound.destinationType,
fbaWarehouseCode: inbound.destinationType === 'FBA' ? inbound.fbaWarehouseCode : null,
resourceKey: producerFixture?.resourceKey || null,
auxiliaryPallets: generatedContainerPallets.filter((candidate) =>
id(candidate?.palletId) !== id(warehouseFacts.pallet?.palletId)),
...warehouseFacts,