mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 19:33:11 +00:00
Get the right mandate when creating voucher.
This commit is contained in:
parent
5c0a4ce748
commit
6171f42b66
2 changed files with 2 additions and 2 deletions
|
@ -99,7 +99,7 @@ def send_mail_invoice(invoice):
|
||||||
|
|
||||||
def send_mail_voucher(invoice):
|
def send_mail_voucher(invoice):
|
||||||
"""Creates a voucher from an invoice and sends it by email to the client"""
|
"""Creates a voucher from an invoice and sends it by email to the client"""
|
||||||
president = Mandate.get_mandate().president
|
president = Mandate.get_mandate(invoice.date).president
|
||||||
ctx = {
|
ctx = {
|
||||||
'asso_name': AssoOption.get_cached_value('name'),
|
'asso_name': AssoOption.get_cached_value('name'),
|
||||||
'pres_name': ' '.join([president.name, president.surname]),
|
'pres_name': ' '.join([president.name, president.surname]),
|
||||||
|
|
|
@ -1068,7 +1068,7 @@ def voucher_pdf(request, invoice, **_kwargs):
|
||||||
_("Could not find a voucher for that invoice.")
|
_("Could not find a voucher for that invoice.")
|
||||||
)
|
)
|
||||||
return redirect(reverse('cotisations:index'))
|
return redirect(reverse('cotisations:index'))
|
||||||
president = Mandate.get_mandate().president
|
president = Mandate.get_mandate(invoice.date).president
|
||||||
return render_voucher(request, {
|
return render_voucher(request, {
|
||||||
'asso_name': AssoOption.get_cached_value('name'),
|
'asso_name': AssoOption.get_cached_value('name'),
|
||||||
'pres_name': ' '.join([president.name, president.surname]),
|
'pres_name': ' '.join([president.name, president.surname]),
|
||||||
|
|
Loading…
Reference in a new issue