diff --git a/app/views/deliverables/_form.html.erb b/app/views/deliverables/_form.html.erb index 6fa5448..f30fce7 100644 --- a/app/views/deliverables/_form.html.erb +++ b/app/views/deliverables/_form.html.erb @@ -33,7 +33,10 @@ <%= field_with_budget_observer_and_totals(f, :materials) %> <%= field_with_budget_observer_and_totals(f, :profit) %> -

<%= f.text_field :budget, :size => 7, :disabled => true %>

+ <%= content_tag(:p,"Total Budget:" + content_tag(:span, 0, :id => 'total-budget-calculation', :class => "budget-calculation"), + :class => "total-budget") %> + +

<%= f.hidden_field :budget %>

@@ -106,7 +109,9 @@ Object.extend(BudgetModule.prototype, { Budget.updateAmount($('materials_subtotal'), materials_subtotal); Budget.updateAmount($('profit_subtotal'), profit_subtotal); - $('deliverable_budget').value = variableCost + overhead_subtotal + materials_subtotal + profit_subtotal; + var total = variableCost + overhead_subtotal + materials_subtotal + profit_subtotal; + $('deliverable_budget').value = total; + $('total-budget-calculation').innerHTML = Budget.number_to_currency(total); }, updateAmount: function(element, value) { diff --git a/assets/stylesheets/budget.css b/assets/stylesheets/budget.css index d91adea..a80b0a8 100644 --- a/assets/stylesheets/budget.css +++ b/assets/stylesheets/budget.css @@ -12,4 +12,6 @@ tr.deliverable td.done_ratio table.progress { margin-left:auto; margin-right: au #deliverable-form .splitcontentright p { padding-right: 30px; } #deliverable-form .splitcontentright input { float:left } -span.budget-calculation { color:#999999; font-weight:bold; display:block; text-align:right; width: 100%;} \ No newline at end of file +span.budget-calculation { color:#999999; font-weight:bold; display:block; text-align:right; width: 100%;} +p.total-budget { font-weight: bold; } +p.total-budget #total-budget-calculation { } \ No newline at end of file