mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 00:12:03 +02:00
Refactored code
This commit is contained in:
parent
d589aa1681
commit
72022aab8d
4 changed files with 78 additions and 69 deletions
|
@ -4,6 +4,15 @@ module Registrar::BookKeeping
|
|||
DOMAIN_TO_PRODUCT = { 'ee': '01EE', 'com.ee': '02COM', 'pri.ee': '03PRI',
|
||||
'fie.ee': '04FIE', 'med.ee': '05MED' }.freeze
|
||||
|
||||
included do
|
||||
scope :with_cash_accounts, (lambda do
|
||||
joins(:accounts)
|
||||
.where('accounts.account_type = ? AND test_registrar != ?',
|
||||
Account::CASH,
|
||||
true)
|
||||
end)
|
||||
end
|
||||
|
||||
def monthly_summary(month:)
|
||||
activities = monthly_activites(month)
|
||||
return unless activities.any?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue