Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 17th, 2012  |  syntax: None  |  size: 0.51 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  def order_price(order, options={})
  2.     options.assert_valid_keys(:format_as_currency, :show_vat_text, :show_price_inc_vat)
  3.     options.reverse_merge! :format_as_currency => true, :show_vat_text => true, :show_vat_text => Spree::Config[:show_price_inc_vat]
  4.     ammount = Currency.convert(order.item_total, Currency.basic, Currency.current.char_code)
  5.     ammount += Calculator::Vat.calculate_tax(order) if Spree::Config[:show_price_inc_vat]
  6.     options.delete(:format_as_currency) ? number_to_currency(amount) : amount
  7.   end