Ported FixedDeliverable.spent to use Rate. #1924
This commit is contained in:
1 parent
50a466d7af
commit
4f18c28bba
2 files changed
+4
-5
No files matched your search
@@ -19,8 +19,8 @@ class FixedDeliverable < Deliverable
|
||||
|
||||
# Find each Member for their rate
|
||||
time_logs.each do |time_log|
|
||||
member = Member.find_by_user_id_and_project_id(time_log.user_id, time_log.project_id)
|
||||
total += (member.rate * time_log.hours) unless member.nil? || member.rate.nil?
|
||||
rate = Rate.amount_for(time_log.user, time_log.project, time_log.spent_on)
|
||||
total += (rate * time_log.hours) unless rate.nil?
|
||||
end
|
||||
|
||||
return total
|
||||
|
||||
Reference in new issue
Block a user