mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 20:27:30 +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,
|
||||
'language': language,
|
||||
'currency': activities.first.currency,
|
||||
'date': month.end_of_month.strftime('%Y-%m-%d')
|
||||
'date': month.end_of_month.strftime('%Y-%m-%d'),
|
||||
}.as_json
|
||||
|
||||
lines = []
|
||||
|
@ -65,7 +65,7 @@ module BookKeeping
|
|||
'product_id': DOMAIN_TO_PRODUCT[price.zone_name.to_sym],
|
||||
'quantity': 1,
|
||||
'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)
|
||||
|
@ -106,7 +106,7 @@ module BookKeeping
|
|||
'description': language == 'en' ? 'Domains prepayment' : 'Domeenide ettemaks',
|
||||
'quantity': -1,
|
||||
'price': total,
|
||||
'unit': language == 'en' ? 'pc' : 'tk'
|
||||
'unit': language == 'en' ? 'pc' : 'tk',
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class DirectoInvoiceForwardJob < Que::Job
|
|||
end
|
||||
|
||||
def send_monthly_invoices
|
||||
month = Time.now
|
||||
month = Time.zone.now - 1.month
|
||||
|
||||
Registrar.where.not(test_registrar: true).find_each do |registrar|
|
||||
next unless registrar.cash_account
|
||||
|
|
|
@ -112,7 +112,8 @@ class Invoice < ApplicationRecord
|
|||
'product_id': Setting.directo_receipt_product_name,
|
||||
'description': order,
|
||||
'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
|
||||
|
||||
inv
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue