diff --git a/app/models/spree/line_item.rb b/app/models/spree/line_item.rb index f71477cd06c..61aa00eb065 100644 --- a/app/models/spree/line_item.rb +++ b/app/models/spree/line_item.rb @@ -121,12 +121,12 @@ def amount alias total amount def single_money - Spree::Money.new(price, { currency: currency }) + Spree::Money.new(price, currency: currency) end alias single_display_amount single_money def money - Spree::Money.new(amount, { currency: currency }) + Spree::Money.new(amount, currency: currency) end alias display_total money alias display_amount money diff --git a/app/models/spree/order.rb b/app/models/spree/order.rb index 284d4a33b3d..047b50b82e5 100644 --- a/app/models/spree/order.rb +++ b/app/models/spree/order.rb @@ -180,27 +180,27 @@ def currency end def display_outstanding_balance - Spree::Money.new(outstanding_balance, { currency: currency }) + Spree::Money.new(outstanding_balance, currency: currency) end def display_item_total - Spree::Money.new(item_total, { currency: currency }) + Spree::Money.new(item_total, currency: currency) end def display_adjustment_total - Spree::Money.new(adjustment_total, { currency: currency }) + Spree::Money.new(adjustment_total, currency: currency) end def display_tax_total - Spree::Money.new(tax_total, { currency: currency }) + Spree::Money.new(tax_total, currency: currency) end def display_ship_total - Spree::Money.new(ship_total, { currency: currency }) + Spree::Money.new(ship_total, currency: currency) end def display_total - Spree::Money.new(total, { currency: currency }) + Spree::Money.new(total, currency: currency) end def to_param @@ -266,7 +266,7 @@ def tax_address def line_item_adjustment_totals Hash[line_item_adjustments.eligible.group_by(&:label).map do |label, adjustments| total = adjustments.sum(&:amount) - [label, Spree::Money.new(total, { currency: currency })] + [label, Spree::Money.new(total, currency: currency)] end] end diff --git a/app/models/spree/order_inventory.rb b/app/models/spree/order_inventory.rb index 2a0554a29fa..8416bb47553 100644 --- a/app/models/spree/order_inventory.rb +++ b/app/models/spree/order_inventory.rb @@ -46,10 +46,10 @@ def remove(line_item, variant_units, shipment = nil) if shipment.present? remove_from_shipment(shipment, line_item.variant, quantity) else - order.shipments.each do |shipment| + order.shipments.each do |each_shipment| break if quantity == 0 - quantity -= remove_from_shipment(shipment, line_item.variant, quantity) + quantity -= remove_from_shipment(each_shipment, line_item.variant, quantity) end end end diff --git a/app/models/spree/return_authorization.rb b/app/models/spree/return_authorization.rb index 6419d7dde18..41c17cb10f6 100644 --- a/app/models/spree/return_authorization.rb +++ b/app/models/spree/return_authorization.rb @@ -29,7 +29,7 @@ def currency end def display_amount - Spree::Money.new(amount, { currency: currency }) + Spree::Money.new(amount, currency: currency) end def add_variant(variant_id, quantity)