Fixed codeclimate issue

This commit is contained in:
Sergei Tsoganov 2022-11-24 14:10:55 +02:00
parent 591dc58083
commit 9a08091572

View file

@ -38,7 +38,6 @@ module Registrar::BookKeeping # rubocop:disable Metrics/ModuleLength
lines.as_json
end
# rubocop:disable Metrics/CognitiveComplexity
def find_or_init_monthly_invoice(month:, overwrite:)
invoice = invoices.find_by(monthly_invoice: true, issue_date: month.end_of_month.to_date)
return invoice if invoice && !overwrite
@ -51,7 +50,6 @@ module Registrar::BookKeeping # rubocop:disable Metrics/ModuleLength
new_invoice
end
# rubocop:enable Metrics/CognitiveComplexity
def overwrite_invoice(original_invoice, new_invoice)
params_to_scrub = %i[created_at updated_at id number sent_at