[#6574] Associate LaborBudgets with TimeEntryActivities

This commit is contained in:
Eric Davis
2011-09-14 18:39:49 -07:00
parent 38c22e2f92
commit df61a1fe9e
10 changed files with 34 additions and 2 deletions
+2
View File
@@ -3,8 +3,10 @@ class LaborBudget < ActiveRecord::Base
# Associations
belongs_to :deliverable
belongs_to :time_entry_activity
# Validations
validates_presence_of :time_entry_activity_id
# Accessors
include DollarizedAttribute
@@ -13,7 +13,8 @@
<%= labor_budget.hidden_field(:month) %>
<tr>
<td>
<%= release(3, "Select field for the Time Entry Activity in a td") %>
<%= labor_budget.label(:time_entry_activity_id, :class => "hidden") %>
<%= labor_budget.select(:time_entry_activity_id, options_from_collection_for_select(@project.billable_activities, :id, :name, labor_budget.object.time_entry_activity_id), {:include_blank => false}, {:class => 'financial'}) %>
</td>
<td>
<p class="inline-hints"><%= labor_budget.label(:hours, l(:text_short_hours)) %></p>