mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Make the check against billing email set from form
This commit is contained in:
parent
3f1ef213eb
commit
03b3f9a276
1 changed files with 3 additions and 1 deletions
|
@ -4,8 +4,10 @@ class InvoiceMailer < ApplicationMailer
|
|||
def invoice_email(invoice_id, html, billing_email)
|
||||
@invoice = Invoice.find_by(id: invoice_id)
|
||||
billing_email ||= @invoice.billing_email
|
||||
logger.info "Billing email from form: #{billing_email}"
|
||||
logger.info "Billing email from invoice database: #{@invoice.billing_email || nil}"
|
||||
return unless @invoice
|
||||
return if whitelist_blocked?(@invoice.billing_email)
|
||||
return if whitelist_blocked?(billing_email)
|
||||
|
||||
kit = PDFKit.new(html)
|
||||
pdf = kit.to_pdf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue