mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
(bug) fix cart total error if add a item that have be offered by admin
This commit is contained in:
parent
4f231c0647
commit
ccd15d45b2
@ -17,7 +17,7 @@ class Cart::AddItemService
|
||||
end
|
||||
raise Cart::OutStockError if item.quantity > orderable.stock['external']
|
||||
|
||||
order.total += (item.amount * quantity.to_i)
|
||||
order.total += (item.amount * item.quantity.to_i) unless item.is_offered
|
||||
ActiveRecord::Base.transaction do
|
||||
item.save
|
||||
order.save
|
||||
|
Loading…
x
Reference in New Issue
Block a user