Add annual reports for accounts (#28693)
This commit is contained in:
parent
01ce9df880
commit
5b1eb09d54
21 changed files with 480 additions and 1 deletions
11
app/workers/generate_annual_report_worker.rb
Normal file
11
app/workers/generate_annual_report_worker.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class GenerateAnnualReportWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform(account_id, year)
|
||||
AnnualReport.new(Account.find(account_id), year).generate
|
||||
rescue ActiveRecord::RecordNotFound, ActiveRecord::RecordNotUnique
|
||||
true
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue