Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Drop a dead quantity calculation from the fulfillment changer

Łukasz Adamczykc6189a794a2b
diff --git a/spree/core/app/models/spree/fulfillment_changer.rb b/spree/core/app/models/spree/fulfillment_changer.rb
index 8d3d0f0158..21b696dd7e 100644
--- a/spree/core/app/models/spree/fulfillment_changer.rb
+++ b/spree/core/app/models/spree/fulfillment_changer.rb
@@ -133,10 +133,6 @@ module Spree
[available_quantity, current_on_hand_quantity].min
end
- def unstock_quantity
- desired_stock_location.backorderable?(variant) ? quantity : new_on_hand_quantity
- end
-
def current_on_hand_quantity
[current_shipment.fulfillment_items.on_hand_or_backordered.sum(:quantity), quantity].min
end