mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
(bug) change product stock movement type
This commit is contained in:
parent
010718d53e
commit
6fc0b935d9
@ -9,7 +9,7 @@ class Orders::CancelOrderService
|
||||
ActiveRecord::Base.transaction do
|
||||
activity = order.order_activities.create(activity_type: 'canceled', operator_profile_id: current_user.invoicing_profile.id)
|
||||
order.order_items.each do |item|
|
||||
ProductService.update_stock(item.orderable, 'external', 'cancelled_by_customer', item.quantity, item.id)
|
||||
ProductService.update_stock(item.orderable, 'external', 'cancelled', item.quantity, item.id)
|
||||
end
|
||||
order.save
|
||||
NotificationCenter.call type: 'notify_user_order_is_canceled',
|
||||
|
Loading…
x
Reference in New Issue
Block a user