Allow input of decimal numbers for GroupOrderArticle-result.
This commit is contained in:
parent
40886b71f9
commit
36f9bffdb8
3 changed files with 48 additions and 30 deletions
|
|
@ -31,6 +31,11 @@ class GroupOrderArticle < ActiveRecord::Base
|
|||
attr_accessor :ordergroup_id # To create an new GroupOrder if neccessary
|
||||
|
||||
named_scope :ordered, :conditions => 'result > 0'
|
||||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def result=(result)
|
||||
self[:result] = String.delocalized_decimal(result)
|
||||
end
|
||||
|
||||
# Updates the quantity/tolerance for this GroupOrderArticle by updating both GroupOrderArticle properties
|
||||
# and the associated GroupOrderArticleQuantities chronologically.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue