diff --git a/stoptime.rb b/stoptime.rb index be269c3..c29fc21 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -214,6 +214,7 @@ module StopTime::Models # [name] description (String) # [fixed_cost] fixed cost of the task (Float) # [hourly_rate] hourly rate for the task (Float) + # [vat_rate] VAT rate at time of billing (Float) # [invoice_comment] extra comment for the invoice (String) # [created_at] time of creation (Time) # [updated_at] time of last update (Time) @@ -633,6 +634,21 @@ module StopTime::Models end end + class VATRatePerTaskSupport < V 1.94 # :nodoc: + def self.up + add_column(Task.table_name, :vat_rate, :float) + config = Config.instance + Task.all.each do |t| + t.vat_rate = config['vat_rate'] + t.save + end + end + + def self.down + remove_column(Task.table_name, :vat_rate) + end + end + end # StopTime::Models # = The Stop… Camping Time! controllers