Commit a8ae9a61 authored by gwendal's avatar gwendal
Browse files

change mail send to member when invoice is closed (related #180)

parent b7a8f008
......@@ -9,8 +9,15 @@ class MemberMailer < ActionMailer::Base
def invoice_email(member, invoice)
@member = member
@invoice = invoice
attachments[t(:invoice_filename, n: invoice.id)] = invoice.pdf_data
mail(to: @member.invoicing_email, subject: "[#{Settings.organization_name}] #{t(:invoice_email_subject)}")
mail(
to: @member.invoicing_email,
subject: "[#{Settings.organization_name}] #{t(:invoice_email_subject)}"
) do |format|
format.text
format.html
end
end
def subscription_payment(subscription)
......
<p>
<%= t(:invoice_email_content_invoice_1) %> <%= @member.name %> !
</p>
<p>
<%= t(:invoice_email_content_invoice_2) %>
</p>
<%= t('.body',
name: @member.official_name,
organization_name: Settings.organization_name,
invoice: if @invoice.subscription
t('.subscription')
else
t('.invoice')
end
) %>
<%= t(:invoice_email_content_invoice_1) %> <%= @member.name %> !
<%= t(:invoice_email_content_invoice_2) %>
......@@ -78,9 +78,6 @@ fr:
yes_no:
'true': 'Oui'
'false': 'Non'
invoice_email_subject: "Ce courriel contient une facture concernant vos services."
invoice_email_content_invoice_1: "Bonjour"
invoice_email_content_invoice_2: "Vous trouverez ci-joint une facture concernant vos services."
invoice_ca_email_subject: "nouvelle facture envoyé à un membre"
invoice_ca_email_content_invoice_1: "Ci-joint la copie d'une nouvelle facture envoyé au membre"
invoice_filename: "Facture_%{n}.pdf"
......@@ -661,6 +658,20 @@ fr:
# end service_deactived
member_mailer:
invoice_email:
subject: "Votre facture"
body: |
Bonjour %{name}
Vous trouverez ci-joint %{invoice} concernant votre compte %{organization_name}.
À bientôt,
Pour Rézine, Ambre - le système d'information qui ne dort jamais.
subscription: "un recu"
invoice: "une facture"
subscription_deadline:
subject: "Rappel: état de votre cotisation"
member:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment