[#4477] Skip blank FixedBudget items in the deliverable details
This commit is contained in:
1 parent
55c9f93c6c
commit
67dd75a980
2 files changed
+7
No files matched your search
@@ -38,4 +38,10 @@ class FixedBudget < ActiveRecord::Base
|
|||||||
markup && markup.match(/\$/)
|
markup && markup.match(/\$/)
|
||||||
end
|
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
|
end
|
||||||
@@ -64,6 +64,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<% deliverable.fixed_budgets.each do |fixed_budget| %>
|
<% deliverable.fixed_budgets.each do |fixed_budget| %>
|
||||||
|
<% next if fixed_budget.blank_record? %>
|
||||||
<tr id="fixed_budget_<%= fixed_budget.id %>">
|
<tr id="fixed_budget_<%= fixed_budget.id %>">
|
||||||
<td class="l fixed_title"><%= h(fixed_budget.title) %></td>
|
<td class="l fixed_title"><%= h(fixed_budget.title) %></td>
|
||||||
<td class="fixed_budget_spent">0</td>
|
<td class="fixed_budget_spent">0</td>
|
||||||
|
|||||||
Reference in new issue
Block a user