From 83d19e0c0e708b942771d6a10a301af0770c4d1a Mon Sep 17 00:00:00 2001 From: hjust Date: Mon, 21 Dec 2009 12:09:58 +0000 Subject: [PATCH] Now check for the correct permission. git-svn-id: https://dev.finn.de/svn/cockpit/trunk@430 7926756e-e54e-46e6-9721-ed318f58905e --- app/models/variable_cost_object.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/variable_cost_object.rb b/app/models/variable_cost_object.rb index 5cce9f31df..8843433317 100644 --- a/app/models/variable_cost_object.rb +++ b/app/models/variable_cost_object.rb @@ -33,7 +33,7 @@ class VariableCostObject < CostObject end def spent_material - @spent_material ||= cost_entries.visible(User.current, self.project).sum("CASE + @spent_material ||= cost_entries.visible_costs(User.current, self.project).sum("CASE WHEN #{CostEntry.table_name}.overridden_costs IS NULL THEN #{CostEntry.table_name}.costs ELSE @@ -41,7 +41,7 @@ class VariableCostObject < CostObject end def spent_labor - @spent_labor ||= time_entries.visible(User.current, self.project).sum("CASE + @spent_labor ||= time_entries.visible_costs(User.current, self.project).sum("CASE WHEN #{TimeEntry.table_name}.overridden_costs IS NULL THEN #{TimeEntry.table_name}.costs ELSE