fix(client): restore destination warehouse from pricing quote
This commit is contained in:
@@ -1273,6 +1273,11 @@ async function autofillWarehouseSelections() {
|
||||
if (form.receivingWarehouseId) {
|
||||
await loadSelectedWarehouse(form.receivingWarehouseId)
|
||||
}
|
||||
if (form.destinationType !== 'PRIVATE' && !form.destinationWarehouseId && form.amazonWarehouseCode) {
|
||||
const destinationCode = form.amazonWarehouseCode.trim().toUpperCase()
|
||||
const matchedDestination = availableDestinationWarehouses.value.find((warehouse) => warehouse.code.trim().toUpperCase() === destinationCode)
|
||||
if (matchedDestination) await selectDestinationWarehouse(matchedDestination.id)
|
||||
}
|
||||
if (form.destinationType !== 'PRIVATE' && !form.destinationWarehouseId && availableDestinationWarehouses.value.length === 1) {
|
||||
await selectDestinationWarehouse(availableDestinationWarehouses.value[0].id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user