Adapted the invoice view to show the task invoice comment

This commit is contained in:
Paul van Tilburg 2011-12-02 22:20:21 +01:00
parent 194b0033d1
commit f40b429d10
1 changed files with 7 additions and 7 deletions

View File

@ -1211,18 +1211,18 @@ module StopTime::Views
col.hours {}
col.amount {}
tr do
summary = task.summary
td do
a task.name,
a summary[0].present ? summary[0] : task.name,
:href => R(CustomersNTasksN, customer.id, task.id)
end
summary = task.summary
case task.type
when "fixed_rate"
td ""
td.right { "€ %.2f" % summary[2] }
td.right { "€ %.2f" % summary[3] }
when "hourly_rate"
td.right { "%.2fh" % summary[0] }
td.right { "€ %.2f" % summary[2] }
td.right { "%.2fh" % summary[1] }
td.right { "€ %.2f" % summary[3] }
end
end
end
@ -1561,8 +1561,8 @@ module StopTime::Views
subtotal = 0.0
@tasks.each do |task, line|
tr do
td { task }
if line[0].nil? and line[1].nil?
td { task.comment_or_name }
if line[1].nil?
td.right ""
td.right ""
else