From 0af8a065a1027a55b245443eeb612d1730eea58e Mon Sep 17 00:00:00 2001 From: Julius Date: Thu, 2 Jan 2014 21:36:45 +0100 Subject: [PATCH] Fix calculation of OrderArticle.total_price and .total_gross_price --- app/models/order_article.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/order_article.rb b/app/models/order_article.rb index 440ab896..84612616 100644 --- a/app/models/order_article.rb +++ b/app/models/order_article.rb @@ -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="?")