Readonly receive input if GroupOrderArticle result has manually been changed
Conflicts: app/helpers/orders_helper.rb app/views/orders/_edit_amount.html.haml
This commit is contained in:
parent
7aae7f4d55
commit
98f59a3de3
7 changed files with 43 additions and 9 deletions
|
|
@ -195,6 +195,11 @@ class OrderArticle < ActiveRecord::Base
|
|||
units = 0 if units < 0
|
||||
units
|
||||
end
|
||||
|
||||
# Check if the result of any associated GroupOrderArticle was overridden manually
|
||||
def result_manually_changed?
|
||||
group_order_articles.any? {|goa| goa.result_manually_changed?}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue