Hide budget field, added text for budget. #1134

This commit is contained in:
Eric Davis
2008-05-20 23:24:14 -07:00
parent d11e964aba
commit bebb2ff15b
2 changed files with 10 additions and 3 deletions
+7 -2
View File
@@ -33,7 +33,10 @@
<%= field_with_budget_observer_and_totals(f, :materials) %>
<%= field_with_budget_observer_and_totals(f, :profit) %>
<p><%= f.text_field :budget, :size => 7, :disabled => true %></p>
<%= content_tag(:p,"Total Budget:" + content_tag(:span, 0, :id => 'total-budget-calculation', :class => "budget-calculation"),
:class => "total-budget") %>
<p><%= f.hidden_field :budget %></p>
</div>
<div style="clear:both;"> </div>
@@ -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) {