mirror of
https://github.com/internetee/registry.git
synced 2025-07-04 18:23:35 +02:00
Merge branch 'story/105855968-directo' into staging
# Conflicts: # config/locales/en.yml
This commit is contained in:
commit
0779657b41
7 changed files with 14 additions and 10 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
|
||||||
|
@ -126,7 +126,7 @@ class Directo < ActiveRecord::Base
|
||||||
xml.invoices{
|
xml.invoices{
|
||||||
xml.invoice("Number" =>directo_next,
|
xml.invoice("Number" =>directo_next,
|
||||||
"InvoiceDate" =>invoices_until.strftime(date_format),
|
"InvoiceDate" =>invoices_until.strftime(date_format),
|
||||||
"PaymentTerm" =>"E",
|
"PaymentTerm" =>Setting.directo_receipt_payment_term,
|
||||||
"CustomerCode"=>registrar.directo_handle,
|
"CustomerCode"=>registrar.directo_handle,
|
||||||
"Language" =>"",
|
"Language" =>"",
|
||||||
"Currency" =>registrar_activities.first.currency,
|
"Currency" =>registrar_activities.first.currency,
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -14,12 +14,15 @@
|
||||||
= sort_link(@q, 'reg_no', t(:reg_no))
|
= sort_link(@q, 'reg_no', t(:reg_no))
|
||||||
%th{class: 'col-xs-4'}
|
%th{class: 'col-xs-4'}
|
||||||
= t(:credit_balance)
|
= t(:credit_balance)
|
||||||
|
%th{class: 'col-xs-4'}
|
||||||
|
= t(:test_registrar)
|
||||||
%tbody
|
%tbody
|
||||||
- @registrars.each do |x|
|
- @registrars.each do |x|
|
||||||
%tr
|
%tr
|
||||||
%td= link_to(x, [:admin, x])
|
%td= link_to(x, [:admin, x])
|
||||||
%td= x.reg_no
|
%td= x.reg_no
|
||||||
%td= "#{x.balance}"
|
%td= "#{x.balance}"
|
||||||
|
%td= "#{x.test_registrar}"
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
= paginate @registrars
|
= paginate @registrars
|
||||||
|
|
|
@ -934,5 +934,6 @@ en:
|
||||||
add_blocked_domain: 'Add domain to blocked list'
|
add_blocked_domain: 'Add domain to blocked list'
|
||||||
edit_pw: 'Edit Pw'
|
edit_pw: 'Edit Pw'
|
||||||
optional: 'Optional'
|
optional: 'Optional'
|
||||||
|
test_registrar: "Test registrar?"
|
||||||
next: 'Next'
|
next: 'Next'
|
||||||
previous: 'Previous'
|
previous: 'Previous'
|
||||||
|
|
|
@ -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