mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Change Result of PriceSack Calculation from Integers to Floats
This commit is contained in:
committed by
Luis Ramos
parent
4658a53aeb
commit
427dc54945
@@ -17,9 +17,9 @@ module Spree
|
||||
order_amount = line_items_for(object).map { |x| x.price * x.quantity }.sum
|
||||
|
||||
if order_amount < min
|
||||
cost = preferred_normal_amount.to_i
|
||||
cost = preferred_normal_amount.to_f
|
||||
elsif order_amount >= min
|
||||
cost = preferred_discount_amount.to_i
|
||||
cost = preferred_discount_amount.to_f
|
||||
end
|
||||
|
||||
cost
|
||||
|
||||
Reference in New Issue
Block a user