[#4182] Display the Labor and Overhead spent on the Contract page.

This commit is contained in:
Eric Davis
2010-07-07 13:46:00 -07:00
parent b9e68cd52c
commit 5cc66ddb09
3 changed files with 74 additions and 7 deletions
+3 -4
View File
@@ -6,10 +6,9 @@ module ContractsHelper
end
end
def format_budget_for_deliverable(deliverable, total)
# TODO LATER: calculate amount used
if total > 0
content_tag(:span, "0", :class => 'spent-amount') +
def format_budget_for_deliverable(deliverable, spent, total)
if total > 0 || spent > 0
content_tag(:span, h(number_to_currency(spent, :unit => '')), :class => 'spent-amount') +
" " +
content_tag(:span, h(number_to_currency(total, :unit => '')), :class => 'total-amount')
else