mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 15:31:12 +00:00
Round totals (#1561).
git-svn-id: http://svn.redmine.org/redmine/trunk@14644 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
0c0b6fea73
commit
e35d036bda
@ -314,12 +314,12 @@ class IssueQuery < Query
|
||||
|
||||
# Returns sum of all the issue's estimated_hours
|
||||
def total_for_estimated_hours
|
||||
base_scope.sum(:estimated_hours)
|
||||
base_scope.sum(:estimated_hours).to_f.round(2)
|
||||
end
|
||||
|
||||
# Returns sum of all the issue's time entries hours
|
||||
def total_for_spent_hours
|
||||
base_scope.joins(:time_entries).sum("#{TimeEntry.table_name}.hours")
|
||||
base_scope.joins(:time_entries).sum("#{TimeEntry.table_name}.hours").to_f.round(2)
|
||||
end
|
||||
|
||||
def total_for_custom_field(custom_field)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user