mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Merge pull request #1683 from internetee/fix-einvoice-job
EInvoiceJob: Make payable argument required
This commit is contained in:
commit
e1d379e106
4 changed files with 6 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
class SendEInvoiceJob < Que::Job
|
||||
def run(invoice_id, payable: true)
|
||||
def run(invoice_id, payable = true)
|
||||
invoice = run_condition(Invoice.find_by(id: invoice_id), payable: payable)
|
||||
|
||||
invoice.to_e_invoice(payable: payable).deliver
|
||||
|
|
|
@ -100,7 +100,7 @@ class Invoice < ApplicationRecord
|
|||
end
|
||||
|
||||
def to_e_invoice(payable: true)
|
||||
generator = Invoice::EInvoiceGenerator.new(self, payable: payable)
|
||||
generator = Invoice::EInvoiceGenerator.new(self, payable)
|
||||
generator.generate
|
||||
end
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ class Registrar < ApplicationRecord
|
|||
InvoiceMailer.invoice_email(invoice: invoice, recipient: billing_email).deliver_now
|
||||
end
|
||||
|
||||
SendEInvoiceJob.enqueue(invoice.id, payable: payable)
|
||||
SendEInvoiceJob.enqueue(invoice.id, payable)
|
||||
|
||||
invoice
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue