Skip to content

Commit

Permalink
Update unpaid.html.haml: use format_currency_difference()
Browse files Browse the repository at this point in the history
  • Loading branch information
mjavurek authored Nov 21, 2024
1 parent 44d6b24 commit 268d1bb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/views/finance/invoices/unpaid.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@
= format_date invoice.date
= ' ' + invoice.number
= ' ' + number_to_currency(invoice.amount)
%span{style: "color:#{invoice_amount_diff < 0 ? 'red' : 'green'}"}
- # = invoice_amount_diff > 0 ? '+' : '-'
= number_to_currency(invoice_amount_diff) #.abs)
= format_currency_difference(invoice_amount_diff)
- if invoice_profit > invoice_amount_diff
= ' / '
%span{style: "color:#{invoice_profit < 0 ? 'red' : 'green'}"}
= number_to_currency(invoice_profit)
= ' / ' + format_currency_difference(invoice_profit)
- if invoice.attachments.attached?
- for attachment in invoice.attachments
= link_to attachment.filename, url_for(attachment)
Expand Down

0 comments on commit 268d1bb

Please sign in to comment.