First part of stock-integratino. Orders with supplier_id == 0 become stockorders.
This commit is contained in:
parent
251ced4fa1
commit
1912a3fd80
30 changed files with 112 additions and 95 deletions
|
|
@ -154,8 +154,8 @@ class GroupOrderArticle < ActiveRecord::Base
|
|||
memoize :calculate_result
|
||||
|
||||
# Returns order result,
|
||||
# either calcualted on the fly or fetched from quantity_/tolerance_result
|
||||
# After an order is finished, there is only the result
|
||||
# either calcualted on the fly or fetched from result attribute
|
||||
# Result is set when finishing the order.
|
||||
def result(type = :total)
|
||||
self[:result] || calculate_result[type]
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue