Issue e-invoice along with invoice

Closes #1222
This commit is contained in:
Artur Beljajev 2019-06-25 19:52:15 +03:00
parent 25638da546
commit 86a69c09bf
5 changed files with 17 additions and 6 deletions

View file

@ -17,10 +17,7 @@ namespace :registrars do
next if reload_pending || !threshold_reached
Registrar.transaction do
invoice = registrar.issue_prepayment_invoice(reload_amount)
e_invoice = invoice.to_e_invoice
e_invoice.deliver
registrar.issue_prepayment_invoice(reload_amount)
registrar.settings['balance_auto_reload']['pending'] = true
registrar.save!
end