Always require invoice VAT rate

Closes #1031
This commit is contained in:
Artur Beljajev 2019-03-07 17:42:21 +02:00
parent d85e57d800
commit 7723a30d1b
17 changed files with 240 additions and 200 deletions

View file

@ -1,11 +1,13 @@
class Registry
include Singleton
include ActiveModel::Model
def vat_rate
Setting.registry_vat_prc.to_d * 100
end
attr_accessor :vat_rate
attr_accessor :vat_country
def legal_address_country
Country.new(Setting.registry_country_code)
def self.current
vat_rate = Setting.registry_vat_prc.to_d * 100
vat_country = Country.new(Setting.registry_country_code)
new(vat_rate: vat_rate, vat_country: vat_country)
end
end
end