Add financial info to the CompanyInfo and Customer models and database

This commit is contained in:
Paul van Tilburg 2012-01-03 16:49:14 +01:00
parent 80cead274b
commit feb0dc71c1
1 changed files with 20 additions and 0 deletions

View File

@ -139,6 +139,7 @@ module StopTime::Models
# [id] unique identification number (Fixnum)
# [name] official (long) name (String)
# [short_name] abbreviated name (String)
# [financial_contact] name of the financial contact person/department (String)
# [address_street] street part of the address (String)
# [address_postal_code] zip/postal code part of the address (String)
# [address_city] city part of the postal code (String)
@ -363,8 +364,11 @@ module StopTime::Models
# [website] web address (String)
# [chamber] optional chamber of commerce ID number (String)
# [vatno] optional VAT number (String)
# [bank_name] name of the bank (String)
# [bank_bic] bank identification code (aka SWIFT code) (String)
# [accountname] name of the bank account holder (String)
# [accountno] number of the bank account (String)
# [accountiban] international bank account number (String)
# [created_at] time of creation (Time)
# [updated_at] time of last update (Time)
class CompanyInfo < Base
@ -539,6 +543,22 @@ module StopTime::Models
end
end
class FinancialInfoSupport < V 1.92 # :nodoc:
def self.up
add_column(CompanyInfo.table_name, :bank_name, :string)
add_column(CompanyInfo.table_name, :bank_bic, :string)
add_column(CompanyInfo.table_name, :accountiban, :string)
add_column(Customer.table_name, :financial_contact, :string)
end
def self.down
remove_column(CompanyInfo.table_name, :bank_name)
remove_column(CompanyInfo.table_name, :bank_bic)
remove_column(CompanyInfo.table_name, :accountiban)
remove_column(Customer.table_name, :financial_contact)
end
end
end # StopTime::Models
# = The Stop… Camping Time! controllers