Also show total of hours for fixed cost tasks
This commit is contained in:
parent
347da9e0e3
commit
f9a0ee323e
|
@ -174,7 +174,8 @@ module StopTime::Models
|
|||
def summary
|
||||
case type
|
||||
when "fixed_cost"
|
||||
[nil, nil, fixed_cost]
|
||||
total = time_entries.inject(0.0) { |summ, te| summ + te.hours_total }
|
||||
[total, nil, fixed_cost]
|
||||
when "hourly_rate"
|
||||
time_entries.inject([0.0, hourly_rate, 0.0]) do |summ, te|
|
||||
summ[0] += te.hours_total
|
||||
|
@ -1193,11 +1194,6 @@ module StopTime::Views
|
|||
:href => R(CustomersNTasksN, customer.id, task.id)
|
||||
end
|
||||
summary = task.summary
|
||||
case task.type
|
||||
when "fixed_rate"
|
||||
td ""
|
||||
td.right { "€ %.2f" % summary[2] }
|
||||
when "hourly_rate"
|
||||
td.right { "%.2fh" % summary[0] }
|
||||
td.right { "€ %.2f" % summary[2] }
|
||||
end
|
||||
|
@ -1207,7 +1203,6 @@ module StopTime::Views
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# The main overview showing the timeline of registered time.
|
||||
def time_entries
|
||||
|
|
Loading…
Reference in New Issue