wip move automatic invoices to plugin
This commit is contained in:
parent
42a1773a87
commit
78bf494182
33 changed files with 7197 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
if FoodsoftAutomaticInvoices.enabled?
|
||||
Mailer.class_eval do
|
||||
# Sends automatically generated invoicesfor group orders to ordergroup members
|
||||
def group_order_invoice(group_order_invoice, user)
|
||||
@user = user
|
||||
@group_order_invoice = group_order_invoice
|
||||
@group_order = group_order_invoice.group_order
|
||||
@supplier = @group_order.order.supplier.name
|
||||
@group = @group_order.ordergroup
|
||||
add_group_order_invoice_attachments(group_order_invoice)
|
||||
mail to: user,
|
||||
subject: I18n.t('mailer.group_order_invoice.subject', group: @group.name, supplier: @supplier)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue