Add format helper for currency

This commit is contained in:
Patrick Gansterer 2018-09-16 12:05:39 +02:00
parent 5408c08b58
commit 6cc02cb563
7 changed files with 21 additions and 9 deletions

View file

@ -80,11 +80,10 @@
- if FinancialTransactionType.has_multiple_types
%td= h(ft.financial_transaction_type.name)
%td= h(ft.note)
- color = ft.amount < 0 ? 'red' : 'black'
- FinancialTransactionClass.sorted.each do |fc|
%td{:style => "color:#{color}; width:5em", :class => "currency"}
%td.numeric{style: 'width:5em'}
- if ft.financial_transaction_type.financial_transaction_class == fc
= number_to_currency(ft.amount)
= format_currency ft.amount
-# placeholder deface to add content using erb[silent]:contains()
- '<dashboard_bottom_mark>'