mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +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
|
def registrar_params
|
||||||
params.require(:registrar).permit(
|
params.require(:registrar).permit(
|
||||||
:name, :reg_no, :vat_no, :street, :city, :state, :zip, :billing_address,
|
: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
|
||||||
end
|
end
|
||||||
|
|
|
@ -75,7 +75,7 @@ class Directo < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
directo_next = last_directo
|
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
|
unless registrar.cash_account
|
||||||
Rails.logger.info("[DIRECTO] Monthly invoice for registrar #{registrar.id} has been skipped as it doesn't has cash_account")
|
Rails.logger.info("[DIRECTO] Monthly invoice for registrar #{registrar.id} has been skipped as it doesn't has cash_account")
|
||||||
next
|
next
|
||||||
|
|
|
@ -84,9 +84,9 @@
|
||||||
= f.text_field(:code, class: 'form-control', disabled: !f.object.new_record?)
|
= f.text_field(:code, class: 'form-control', disabled: !f.object.new_record?)
|
||||||
.form-group
|
.form-group
|
||||||
.col-md-4.control-label
|
.col-md-4.control-label
|
||||||
= f.label :exclude_in_monthly_directo
|
= f.label :test_registrar
|
||||||
.col-md-7
|
.col-md-7
|
||||||
= f.check_box :exclude_in_monthly_directo, class: 'form-control'
|
= f.check_box :test_registrar, class: 'form-control'
|
||||||
|
|
||||||
%hr
|
%hr
|
||||||
.row
|
.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