Module: C2eCore::Drops::Helpers::OrderConversions

Includes:
ActionView::Helpers::NumberHelper
Included in:
OrderDiscountDrop, OrderExternalFeeDrop, OrderPaymentMethodDrop, OrderPriceDrop, OrderRecipeDrop, OrderRecipeFlatDrop, OrderVatDrop
Defined in:
/build/app/mailers/c2e_core/drops/helpers/order_conversions.rb

Instance Method Summary collapse

Instance Method Details

#converted_price(value) ⇒ Object



10
11
12
# File '/build/app/mailers/c2e_core/drops/helpers/order_conversions.rb', line 10

def converted_price(value)
  @order.currency.convert_and_round(Currency.internal, value, order: @order)
end

#format_price(value) ⇒ Object



14
15
16
# File '/build/app/mailers/c2e_core/drops/helpers/order_conversions.rb', line 14

def format_price(value)
  number_to_currency(value, unit: @order.currency.to_s)
end