fix auto_close_and_send_min_quantity

This commit is contained in:
Patrick Gansterer 2018-06-19 22:12:34 +02:00
parent 4eef0f07d5
commit 4137992032
2 changed files with 9 additions and 1 deletions

View file

@ -278,7 +278,7 @@ class Order < ActiveRecord::Base
send_to_supplier!(created_by)
elsif auto_close_and_send_min_quantity?
finish!(created_by)
send_to_supplier!(created_by) if order.sum >= order.supplier.min_order_quantity
send_to_supplier!(created_by) if sum >= supplier.min_order_quantity.to_r
end
end