107279984-balance_fix

This commit is contained in:
Stas 2016-01-05 17:57:56 +02:00
parent 6909f3d0ef
commit cbe0193cbf
2 changed files with 9 additions and 3 deletions

View file

@ -62,7 +62,7 @@
%th{class: 'col-xs-2'}
= sort_link(@q, 'sum')
%tbody
-total = 0
-total = @b.sum('sum').to_f
- @account_activities.each do |x|
%tr
%td= link_to(x.account.registrar.try(:code), admin_registrar_path(x.account.registrar))
@ -79,7 +79,7 @@
%td
%td
%td{class: 'text-right'}= t(:total)
%td{class: 'text-success'}= total > 0 ? "+#{total} EUR" : "#{total} EUR"
%td{class: total > 0 ? 'text-success' : 'text-danger'}= total > 0 ? "+#{total} EUR" : "#{total} EUR"
.row
.col-md-12
= paginate @account_activities