mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 09:27:19 +02:00
Story#105855968 - change registrar parameter from exclude_in_monthly_directo to test_registrar be used more widely
This commit is contained in:
parent
a950e9e4a7
commit
c957bce553
5 changed files with 9 additions and 9 deletions
|
@ -57,7 +57,7 @@ class Admin::RegistrarsController < AdminController
|
|||
def registrar_params
|
||||
params.require(:registrar).permit(
|
||||
:name, :reg_no, :vat_no, :street, :city, :state, :zip, :billing_address,
|
||||
:country_code, :email, :phone, :billing_email, :code, :exclude_in_monthly_directo
|
||||
:country_code, :email, :phone, :billing_email, :code, :test_registrar
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -75,7 +75,7 @@ class Directo < ActiveRecord::Base
|
|||
end
|
||||
|
||||
directo_next = last_directo
|
||||
Registrar.where.not(exclude_in_monthly_directo: true).find_each do |registrar|
|
||||
Registrar.where.not(test_registrar: true).find_each do |registrar|
|
||||
unless registrar.cash_account
|
||||
Rails.logger.info("[DIRECTO] Monthly invoice for registrar #{registrar.id} has been skipped as it doesn't has cash_account")
|
||||
next
|
||||
|
|
|
@ -84,9 +84,9 @@
|
|||
= f.text_field(:code, class: 'form-control', disabled: !f.object.new_record?)
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :exclude_in_monthly_directo
|
||||
= f.label :test_registrar
|
||||
.col-md-7
|
||||
= f.check_box :exclude_in_monthly_directo, class: 'form-control'
|
||||
= f.check_box :test_registrar, class: 'form-control'
|
||||
|
||||
%hr
|
||||
.row
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
class AddExcludeMonthlyDirectoToRegistrar < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :registrars, :exclude_in_monthly_directo, :boolean, default: false
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddTestRegistrarToRegistrar < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :registrars, :test_registrar, :boolean, default: false
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue