mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +02:00
Created job for sending monthly invoices
This commit is contained in:
parent
a5f803b57a
commit
d589aa1681
18 changed files with 1103 additions and 43 deletions
|
@ -4,6 +4,7 @@ class InvoiceMailer < ApplicationMailer
|
|||
|
||||
subject = default_i18n_subject(invoice_number: invoice.number)
|
||||
subject << I18n.t('invoice.already_paid') if paid
|
||||
subject << I18n.t('invoice.monthly_invoice') if invoice.monthly_invoice
|
||||
attachments["invoice-#{invoice.number}.pdf"] = invoice.as_pdf
|
||||
mail(to: recipient, subject: subject)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue