Fix calculation of OrderArticle.total_price and .total_gross_price
This commit is contained in:
parent
2ec3d38238
commit
0af8a065a1
1 changed files with 2 additions and 2 deletions
|
@ -89,12 +89,12 @@ class OrderArticle < ActiveRecord::Base
|
|||
|
||||
# Calculate price for ordered quantity.
|
||||
def total_price
|
||||
units_to_order * price.unit_quantity * price.price
|
||||
units * price.unit_quantity * price.price
|
||||
end
|
||||
|
||||
# Calculate gross price for ordered qunatity.
|
||||
def total_gross_price
|
||||
units_to_order * price.unit_quantity * price.gross_price
|
||||
units * price.unit_quantity * price.gross_price
|
||||
end
|
||||
|
||||
def ordered_quantities_different_from_group_orders?(ordered_mark="!", billed_mark="?", received_mark="?")
|
||||
|
|
Loading…
Reference in a new issue