Skip to content

Commit

Permalink
Update show.html.haml
Browse files Browse the repository at this point in the history
missing lines added for total_fc calculation
  • Loading branch information
mjavurek authored Nov 13, 2024
1 parent 02290c8 commit b932440
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/views/finance/invoices/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- title t('.title', number: @invoice.number)

- total = 0
- total_fc = 0

.row-fluid
.span6
Expand All @@ -20,6 +21,7 @@
- @invoice.deliveries.order(:date).each_with_index do |delivery, index|
- sum = delivery.sum
- total += sum
- total_fc += delivery.sum(:fc)
= ', ' if index > 0
= link_to format_date(delivery.date), [delivery.supplier, delivery]
= ' (' + number_to_currency(sum) + ')'
Expand All @@ -32,6 +34,7 @@
- sum = order.sum
- transport = order.transport || 0
- total += sum_og + transport
- total_fc += order.sum(:groups) + transport
= ', ' if index > 0
= link_to format_date(order.ends), new_finance_order_path(order_id: order)
= ' (' + number_to_currency(sum_og)
Expand Down

0 comments on commit b932440

Please sign in to comment.