check tax profile for move

This commit is contained in:
phyusin
2018-07-23 11:16:45 +06:30
parent 1895936f38
commit 51664da169
2 changed files with 10 additions and 6 deletions

View File

@@ -36,8 +36,10 @@ class Origami::MovetableController < BaseOrigamiController
accounts = @customer.tax_profiles
@account_arr =[]
accounts.each do |acc|
account = TaxProfile.find(acc)
@account_arr.push(account)
account = TaxProfile.find_by_id(acc)
if !account.nil?
@account_arr.push(account)
end
end
end
end
@@ -57,7 +59,7 @@ class Origami::MovetableController < BaseOrigamiController
# accounts = @customer.tax_profiles
# @account_arr =[]
# accounts.each do |acc|
# account = TaxProfile.find(acc)
# account = TaxProfile.find_by_id(acc)
# @account_arr.push(account)
# end
# end