Module: StripeInvoice::TaxReportHelper

Defined in:
app/helpers/stripe_invoice/tax_report_helper.rb

Instance Method Summary collapse

Instance Method Details

#format_stripe_currency(obj, attr_sym = :amount) ⇒ Object

takes a Stripe JSON hash and an attribute name and returns a nicely formatted string for that currency



6
7
8
# File 'app/helpers/stripe_invoice/tax_report_helper.rb', line 6

def format_stripe_currency(obj, attr_sym = :amount)
  number_to_currency(obj[attr_sym].to_f / 100, unit: "#{obj[:currency].upcase} ")
end