[#4420] Remove Deliverable#frequency, assumed to be monthly.
This commit is contained in:
1 parent
6a0c6348ed
commit
df53f27114
7 files changed
+10
-20
No files matched your search
@@ -1,15 +1,13 @@
|
||||
# A RetainerDeliverable is an HourlyDeliverable that is renewed at
|
||||
# regular calendar periods. The Company bills a regular number of
|
||||
# hours for a hourly rate whereby the budgets are reset over a
|
||||
# regular cyclical period (often monthly).
|
||||
# regular cyclical period (monthly).
|
||||
class RetainerDeliverable < HourlyDeliverable
|
||||
unloadable
|
||||
|
||||
# Associations
|
||||
|
||||
# Validations
|
||||
ValidFrequencies = ["monthly", "quarterly"]
|
||||
validates_inclusion_of :frequency, :in => ValidFrequencies, :allow_nil => true, :allow_blank => true
|
||||
|
||||
# Accessors
|
||||
|
||||
@@ -106,10 +104,6 @@ class RetainerDeliverable < HourlyDeliverable
|
||||
end
|
||||
end
|
||||
|
||||
def self.frequencies_to_select
|
||||
ValidFrequencies.collect {|f| [l("text_#{f}"), f]}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def shrink_budgets_to_new_period
|
||||
|
||||
@@ -130,7 +130,6 @@
|
||||
<% end %>
|
||||
|
||||
<table>
|
||||
<%= show_field(deliverable, :frequency, :html_options => {:class => 'deliverable-frequency'}) if deliverable.retainer? %>
|
||||
<%= show_field(deliverable, :current_period, :html_options => {:class => 'deliverable-current-period'}) if deliverable.retainer? %>
|
||||
<%= show_field(deliverable, :start_date, :format => :format_date, :html_options => {:class => 'deliverable-start-date'}) %>
|
||||
<%= show_field(deliverable, :end_date, :format => :format_date, :html_options => {:class => 'deliverable-end-date'}) %>
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
<li class="select required" id="deliverable_type_input">
|
||||
<%= form.label(:type, l(:field_type)) %>
|
||||
<%= form.select(:type, Deliverable.valid_types_to_select, {:include_blank => false}, {:class => 'type'}) %>
|
||||
|
||||
<%= form.select(:frequency, RetainerDeliverable.frequencies_to_select, :include_blank => false) %>
|
||||
</li>
|
||||
<% else %>
|
||||
<%= form.input :type, :as => :hidden, :class => 'type' %>
|
||||
|
||||
Reference in new issue
Block a user