Changed Invoice#summary to use the task as the key, not just its name
This commit is contained in:
parent
e4202b8048
commit
e53374a713
|
@ -249,15 +249,16 @@ module StopTime::Models
|
||||||
has_many :time_entries, :through => :tasks
|
has_many :time_entries, :through => :tasks
|
||||||
belongs_to :customer
|
belongs_to :customer
|
||||||
|
|
||||||
# Returns a a time and cost summary of the contained tasks.
|
# Returns a time and cost summary of the contained tasks (Hash of
|
||||||
# See also Task#summary.
|
# Task to Array).
|
||||||
|
# See also Task#summary for the specification of the array.
|
||||||
def summary
|
def summary
|
||||||
summ = {}
|
summ = {}
|
||||||
tasks.each { |task| summ[task.name] = task.summary }
|
tasks.each { |task| summ[task] = task.summary }
|
||||||
return summ
|
return summ
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns the invoice period based on the contained tasks.
|
# Returns the invoice period based on the contained tasks (Array of Time).
|
||||||
# See also Task#bill_period.
|
# See also Task#bill_period.
|
||||||
def period
|
def period
|
||||||
# FIXME: maybe should be updated_at?
|
# FIXME: maybe should be updated_at?
|
||||||
|
|
Loading…
Reference in New Issue