fix(admin-ui, medusa): Allocations and fulfillments for variants without inventory items (#3660)

* fix fulfillment for order lines without inventory items

* fix summary card on order for variants without inventory items

* add changeset

* minor fixes

* remove variants without inventory items from allocate modal

* naming

* Update .changeset/kind-rings-wave.md

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* remove line item indicator

* cleanup

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
Philip KorsholmandOliver Windall Juhl authored and GitHub committed 2023-03-31 15:53:56 +02:00
1 parent ca3b32d53c
commit eed784d7d0
6 files changed
+111 -15

No files matched your search

@@ -514,11 +514,15 @@ class ProductVariantInventoryService extends TransactionBaseService {
return
}
const itemsToValidate = items.filter((item) => item.variant_id)
const itemsToValidate = items.filter((item) => !!item.variant_id)
for (const item of itemsToValidate) {
const pvInventoryItems = await this.listByVariant(item.variant_id!)
if (!pvInventoryItems.length) {
continue
}
const [inventoryLevels, inventoryLevelCount] =
await this.inventoryService_.listInventoryLevels({
inventory_item_id: pvInventoryItems.map((i) => i.inventory_item_id),