[#4477] Skip blank FixedBudget items in the deliverable details
This commit is contained in:
@@ -37,5 +37,11 @@ class FixedBudget < ActiveRecord::Base
|
||||
def straight_markup?
|
||||
markup && markup.match(/\$/)
|
||||
end
|
||||
|
||||
|
||||
# Is this a blank budget item. Retainers will create blank ones when
|
||||
# they are copied. (RetainerDeliverable#create_budgets_for_periods)
|
||||
def blank_record?
|
||||
return true if new_record?
|
||||
return title.blank? && budget.blank? && markup.blank?
|
||||
end
|
||||
end
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
</tr>
|
||||
|
||||
<% deliverable.fixed_budgets.each do |fixed_budget| %>
|
||||
<% next if fixed_budget.blank_record? %>
|
||||
<tr id="fixed_budget_<%= fixed_budget.id %>">
|
||||
<td class="l fixed_title"><%= h(fixed_budget.title) %></td>
|
||||
<td class="fixed_budget_spent">0</td>
|
||||
|
||||
Reference in New Issue
Block a user