exclude primary FBA destination for second producer
This commit is contained in:
@@ -290,6 +290,8 @@ async function loadMasterData(context, merchantToken) {
|
||||
// a producer intended for the second FBA destination can silently reuse ABE4.
|
||||
if (destinationType !== 'PRIVATE') {
|
||||
destinations = [...new Map(destinations.map(value => [String(value.warehouseCode).trim().toUpperCase(), value])).values()]
|
||||
const excluded = new Set((fixedRoute.excludeDestinationCodes || []).map(value => String(value).trim().toUpperCase()).filter(Boolean))
|
||||
if (excluded.size) destinations = destinations.filter(value => !excluded.has(String(value.warehouseCode).trim().toUpperCase()))
|
||||
}
|
||||
|
||||
let pricingResult
|
||||
|
||||
Reference in New Issue
Block a user