Feat/fulfill swaps and claims with locations (#3518)
* re-add if statements * initial implementation * add changeset * address feedback * remove context param from create-fulfillment * fix tests
This commit is contained in:
@@ -474,6 +474,10 @@ export default class InventoryService implements IInventoryService {
|
||||
context
|
||||
)
|
||||
|
||||
if (locationIds.length === 0) {
|
||||
return 0
|
||||
}
|
||||
|
||||
const availableQuantity =
|
||||
await this.inventoryLevelService_.getAvailableQuantity(
|
||||
inventoryItemId,
|
||||
@@ -506,6 +510,10 @@ export default class InventoryService implements IInventoryService {
|
||||
context
|
||||
)
|
||||
|
||||
if (locationIds.length === 0) {
|
||||
return 0
|
||||
}
|
||||
|
||||
const stockedQuantity =
|
||||
await this.inventoryLevelService_.getStockedQuantity(
|
||||
inventoryItemId,
|
||||
@@ -538,6 +546,10 @@ export default class InventoryService implements IInventoryService {
|
||||
context
|
||||
)
|
||||
|
||||
if (locationIds.length === 0) {
|
||||
return 0
|
||||
}
|
||||
|
||||
const reservedQuantity =
|
||||
await this.inventoryLevelService_.getReservedQuantity(
|
||||
inventoryItemId,
|
||||
|
||||
Reference in New Issue
Block a user