First part of stock-integratino. Orders with supplier_id == 0 become stockorders.

This commit is contained in:
Benjamin Meichsner 2009-02-05 16:40:02 +01:00
parent 251ced4fa1
commit 1912a3fd80
30 changed files with 112 additions and 95 deletions

View file

@ -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