Added Task#comment_or_name to return the comment if set and the task is billed
This commit is contained in:
parent
c7d32e8611
commit
e4202b8048
10
stoptime.rb
10
stoptime.rb
|
@ -184,6 +184,16 @@ module StopTime::Models
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Returns an invoice comment if the task is billed and if it is
|
||||||
|
# set, otherwise the name.
|
||||||
|
def comment_or_name
|
||||||
|
if billed? and self.invoice_comment.present?
|
||||||
|
self.invoice_comment
|
||||||
|
else
|
||||||
|
self.name
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# == The time entry class
|
# == The time entry class
|
||||||
|
|
Loading…
Reference in New Issue