Add optional boxfill phase to orders

This commit is contained in:
wvengen 2015-09-23 22:38:20 +02:00
parent c1413ff817
commit a03789e048
13 changed files with 201 additions and 50 deletions

View file

@ -116,6 +116,11 @@ class Supplier < ActiveRecord::Base
end
end
# @return [Boolean] Whether there are articles that would use tolerance (unit_quantity > 1)
def has_tolerance?
articles.where('articles.unit_quantity > 1').any?
end
protected
# make sure the shared_sync_method is allowed for the shared supplier