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:
Philip Korsholm
2023-03-20 13:48:25 +01:00
committed by GitHub
parent ea2633bccf
commit 026bdab05d
13 changed files with 149 additions and 33 deletions
@@ -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,