mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Removed redundant self
This commit is contained in:
committed by
Maikel Linke
parent
28009afbea
commit
14ea591c7d
@@ -13,13 +13,13 @@ module Spree
|
||||
end
|
||||
|
||||
def compute(object)
|
||||
min = self.preferred_minimal_amount.to_i
|
||||
min = preferred_minimal_amount.to_i
|
||||
order_amount = line_items_for(object).map { |x| x.price * x.quantity }.sum
|
||||
|
||||
if order_amount < min
|
||||
cost = preferred_normal_amount
|
||||
cost = preferred_normal_amount.to_i
|
||||
elsif order_amount >= min
|
||||
cost = preferred_discount_amount
|
||||
cost = preferred_discount_amount.to_i
|
||||
end
|
||||
|
||||
cost
|
||||
|
||||
Reference in New Issue
Block a user