mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 13:44:47 +02:00
Merge branch 'master' into registry-623
# Conflicts: # app/controllers/admin/registrars_controller.rb # app/models/registrar.rb # app/views/admin/registrars/_billing.html.erb # app/views/admin/registrars/show.html.erb # config/locales/admin/registrars.en.yml # config/locales/en.yml # db/migrate/20180309053424_add_registrars_unique_constraints.rb # db/structure.sql # test/fixtures/registrars.yml # test/integration/admin/registrars/delete_test.rb # test/integration/admin/registrars/new_test.rb # test/models/registrar_test.rb
This commit is contained in:
commit
837f326ef6
37 changed files with 232 additions and 245 deletions
|
@ -14,9 +14,10 @@ class Registrar < ActiveRecord::Base
|
|||
delegate :balance, to: :cash_account, allow_nil: true
|
||||
|
||||
validates :name, :reg_no, :country_code, :email, :code, presence: true
|
||||
validates :name, :reg_no, :reference_no, :code, uniqueness: true
|
||||
validates :name, :reference_no, :code, uniqueness: true
|
||||
validates :accounting_customer_code, presence: true
|
||||
validates :language, presence: true
|
||||
validate :forbid_special_code
|
||||
|
||||
validates :vat_rate, presence: true, if: 'foreign_vat_payer? && vat_no.blank?'
|
||||
validates :vat_rate, absence: true, if: :home_vat_payer?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue