def migrate(company)
company.update_attribute(:suspended, true)
ActiveRecord::Base.transaction do
migrate_approval_modules(company)
payroll(company)
document(company)
broadcast(company)
report(company)
petty_cash(company)
cash_advance(company)
post_populate_data(company)
end
company.update_attribute(:suspended, false) if @errors.present?
end
def migrate_approval_modules(company)
approval_template(company)
time_off_policy(company)
time_off(company)
overtime(company)
claim(company)
cash_advance(company)
migrate_approval_pipeline(company)
end