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
|
||||
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
|
||||
|
@ -126,7 +126,7 @@ class Directo < ActiveRecord::Base
|
|||
xml.invoices{
|
||||
xml.invoice("Number" =>directo_next,
|
||||
"InvoiceDate" =>invoices_until.strftime(date_format),
|
||||
"PaymentTerm" =>"E",
|
||||
"PaymentTerm" =>Setting.directo_receipt_payment_term,
|
||||
"CustomerCode"=>registrar.directo_handle,
|
||||
"Language" =>"",
|
||||
"Currency" =>registrar_activities.first.currency,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -14,12 +14,15 @@
|
|||
= sort_link(@q, 'reg_no', t(:reg_no))
|
||||
%th{class: 'col-xs-4'}
|
||||
= t(:credit_balance)
|
||||
%th{class: 'col-xs-4'}
|
||||
= t(:test_registrar)
|
||||
%tbody
|
||||
- @registrars.each do |x|
|
||||
%tr
|
||||
%td= link_to(x, [:admin, x])
|
||||
%td= x.reg_no
|
||||
%td= "#{x.balance}"
|
||||
%td= "#{x.test_registrar}"
|
||||
.row
|
||||
.col-md-12
|
||||
= paginate @registrars
|
||||
|
|
|
@ -934,5 +934,6 @@ en:
|
|||
add_blocked_domain: 'Add domain to blocked list'
|
||||
edit_pw: 'Edit Pw'
|
||||
optional: 'Optional'
|
||||
test_registrar: "Test registrar?"
|
||||
next: 'Next'
|
||||
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