Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/app/models/spree/line_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def adjust_quantity
end

def sufficient_stock?
return true if Spree::Config[:allow_backorders]
return true if Spree::Config[:allow_backorders] or (quantity == 0 and variant.on_hand < 0)
if new_record? || !order.completed?
variant.on_hand >= quantity
else
Expand Down