From e53374a713ab66a7a4800965875b934474191510 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Fri, 2 Dec 2011 22:17:27 +0100 Subject: [PATCH] Changed Invoice#summary to use the task as the key, not just its name --- stoptime.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/stoptime.rb b/stoptime.rb index ad4d327..755baff 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -249,15 +249,16 @@ module StopTime::Models has_many :time_entries, :through => :tasks belongs_to :customer - # Returns a a time and cost summary of the contained tasks. - # See also Task#summary. + # Returns a time and cost summary of the contained tasks (Hash of + # Task to Array). + # See also Task#summary for the specification of the array. def summary summ = {} - tasks.each { |task| summ[task.name] = task.summary } + tasks.each { |task| summ[task] = task.summary } return summ 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. def period # FIXME: maybe should be updated_at?