Renamed deliverable.cost to deliverable.budget. #1135
This commit is contained in:
1 parent
b2ecaca21e
commit
02a1a28a53
4 files changed
+15
-3
No files matched your search
@@ -2,7 +2,7 @@
|
|||||||
<%= content_tag(:td, deliverable.id) %>
|
<%= content_tag(:td, deliverable.id) %>
|
||||||
<%= content_tag(:td, deliverable.score) %>
|
<%= content_tag(:td, deliverable.score) %>
|
||||||
<%= content_tag(:td, deliverable.subject) %>
|
<%= content_tag(:td, deliverable.subject) %>
|
||||||
<%= content_tag(:td, number_to_currency(deliverable.cost)) %>
|
<%= content_tag(:td, number_to_currency(deliverable.budget)) %>
|
||||||
<%= content_tag(:td, number_to_currency(deliverable.spent)) %>
|
<%= content_tag(:td, number_to_currency(deliverable.spent)) %>
|
||||||
<%= content_tag(:td, format_date(deliverable.due_date)) %>
|
<%= content_tag(:td, format_date(deliverable.due_date)) %>
|
||||||
<%= content_tag(:td, progress_bar(deliverable.progress, :width => '80px')) %>
|
<%= content_tag(:td, progress_bar(deliverable.progress, :width => '80px')) %>
|
||||||
|
|||||||
@@ -18,13 +18,14 @@
|
|||||||
|
|
||||||
<div class="splitcontentright">
|
<div class="splitcontentright">
|
||||||
<p>TODO: Fixed cost</p>
|
<p>TODO: Fixed cost</p>
|
||||||
<p><%= f.text_field :cost, :size => 7 %></p>
|
<p>TODO: Cost per hour</p>
|
||||||
<p>TODO: Total hours</p>
|
<p>TODO: Total hours</p>
|
||||||
<p><%= f.text_field :overhead, :size => 7 %></p>
|
<p><%= f.text_field :overhead, :size => 7 %></p>
|
||||||
<p><%= f.text_field :materials, :size => 7 %></p>
|
<p><%= f.text_field :materials, :size => 7 %></p>
|
||||||
<p><%= f.text_field :profit, :size => 7 %></p>
|
<p><%= f.text_field :profit, :size => 7 %></p>
|
||||||
<%# TODO %>
|
<%# TODO %>
|
||||||
<p>Total Budget:</p>
|
<p>Total Budget:</p>
|
||||||
|
<p><%= f.text_field :budget, :size => 7 %></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="clear:both;"> </div>
|
<div style="clear:both;"> </div>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<%= sort_header_tag("#{Deliverable.table_name}.id", :caption => '#', :default_order => 'desc') %>
|
<%= sort_header_tag("#{Deliverable.table_name}.id", :caption => '#', :default_order => 'desc') %>
|
||||||
<%= content_tag('th', "Score") %>
|
<%= content_tag('th', "Score") %>
|
||||||
<%= sort_header_tag("#{Deliverable.table_name}.subject", :caption => 'Subject') %>
|
<%= sort_header_tag("#{Deliverable.table_name}.subject", :caption => 'Subject') %>
|
||||||
<%= sort_header_tag("#{Deliverable.table_name}.cost", :caption => 'Budget') %>
|
<%= sort_header_tag("#{Deliverable.table_name}.budget", :caption => 'Budget') %>
|
||||||
<%= content_tag('th', "Spent") %>
|
<%= content_tag('th', "Spent") %>
|
||||||
<%= sort_header_tag("#{Deliverable.table_name}.due_date", :caption => 'Due') %>
|
<%= sort_header_tag("#{Deliverable.table_name}.due_date", :caption => 'Due') %>
|
||||||
<%= content_tag('th', "Progress") %>
|
<%= content_tag('th', "Progress") %>
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
class RenameCostToBudget < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
add_column :deliverables, :budget, :decimal
|
||||||
|
remove_column :deliverables, :cost
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
add_column :deliverables, :cost, :decimal
|
||||||
|
remove_column :deliverables, :budget
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in new issue
Block a user