Class: Spree::ShippingRate

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/spree/shipping_rate.rb

Instance Method Summary collapse

Instance Method Details

#display_priceObject Also known as: display_cost


20
21
22
23
24
25
26
27
28
# File 'app/models/spree/shipping_rate.rb', line 20

def display_price
  if Spree::Config[:shipment_inc_vat]
    price = (1 + Spree::TaxRate.default) * cost
  else
    price = cost
  end

  Spree::Money.new(price, { currency: currency })
end