downloadmultiple as zip
This commit is contained in:
parent
6058b2f239
commit
1933f21835
7 changed files with 47 additions and 5 deletions
|
|
@ -3,11 +3,15 @@ module Concerns::SendGroupOrderInvoicePdf
|
|||
|
||||
protected
|
||||
|
||||
def send_group_order_invoice_pdf(group_order_invoice)
|
||||
def create_invoice_pdf(group_order_invoice)
|
||||
invoice_data = group_order_invoice.load_data_for_invoice
|
||||
invoice_data[:title] = t('documents.group_order_invoice_pdf.title', supplier: invoice_data[:supplier])
|
||||
invoice_data[:no_footer] = true
|
||||
pdf = GroupOrderInvoicePdf.new invoice_data
|
||||
GroupOrderInvoicePdf.new invoice_data
|
||||
end
|
||||
|
||||
def send_group_order_invoice_pdf(group_order_invoice)
|
||||
pdf = create_invoice_pdf(group_order_invoice)
|
||||
send_data pdf.to_pdf, filename: pdf.filename, type: 'application/pdf'
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue