mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 21:25:39 +02:00
Fix Rubocop styling issues
This commit is contained in:
parent
86889b6432
commit
5816ae1663
3 changed files with 6 additions and 5 deletions
|
@ -13,7 +13,7 @@ module BookKeeping
|
||||||
'customer_code': accounting_customer_code,
|
'customer_code': accounting_customer_code,
|
||||||
'language': language,
|
'language': language,
|
||||||
'currency': activities.first.currency,
|
'currency': activities.first.currency,
|
||||||
'date': month.end_of_month.strftime('%Y-%m-%d')
|
'date': month.end_of_month.strftime('%Y-%m-%d'),
|
||||||
}.as_json
|
}.as_json
|
||||||
|
|
||||||
lines = []
|
lines = []
|
||||||
|
@ -65,7 +65,7 @@ module BookKeeping
|
||||||
'product_id': DOMAIN_TO_PRODUCT[price.zone_name.to_sym],
|
'product_id': DOMAIN_TO_PRODUCT[price.zone_name.to_sym],
|
||||||
'quantity': 1,
|
'quantity': 1,
|
||||||
'price': yearly ? (price.price.amount / price.duration.to_i) : price.price.amount,
|
'price': yearly ? (price.price.amount / price.duration.to_i) : price.price.amount,
|
||||||
'unit': language == 'en' ? 'pc' : 'tk'
|
'unit': language == 'en' ? 'pc' : 'tk',
|
||||||
}
|
}
|
||||||
|
|
||||||
line['description'] = description_in_language(price: price, yearly: yearly)
|
line['description'] = description_in_language(price: price, yearly: yearly)
|
||||||
|
@ -106,7 +106,7 @@ module BookKeeping
|
||||||
'description': language == 'en' ? 'Domains prepayment' : 'Domeenide ettemaks',
|
'description': language == 'en' ? 'Domains prepayment' : 'Domeenide ettemaks',
|
||||||
'quantity': -1,
|
'quantity': -1,
|
||||||
'price': total,
|
'price': total,
|
||||||
'unit': language == 'en' ? 'pc' : 'tk'
|
'unit': language == 'en' ? 'pc' : 'tk',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class DirectoInvoiceForwardJob < Que::Job
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_monthly_invoices
|
def send_monthly_invoices
|
||||||
month = Time.now
|
month = Time.zone.now - 1.month
|
||||||
|
|
||||||
Registrar.where.not(test_registrar: true).find_each do |registrar|
|
Registrar.where.not(test_registrar: true).find_each do |registrar|
|
||||||
next unless registrar.cash_account
|
next unless registrar.cash_account
|
||||||
|
|
|
@ -112,7 +112,8 @@ class Invoice < ApplicationRecord
|
||||||
'product_id': Setting.directo_receipt_product_name,
|
'product_id': Setting.directo_receipt_product_name,
|
||||||
'description': order,
|
'description': order,
|
||||||
'quantity': 1,
|
'quantity': 1,
|
||||||
'price': ActionController::Base.helpers.number_with_precision(subtotal, precision: 2, separator: ".")
|
'price': ActionController::Base.helpers
|
||||||
|
.number_with_precision(subtotal, precision: 2, separator: '.'),
|
||||||
}].as_json
|
}].as_json
|
||||||
|
|
||||||
inv
|
inv
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue