Commit f612e419 authored by Hugo LEVY-FALK's avatar Hugo LEVY-FALK Committed by chirac

Add remark to custom invoices

parent fd57a9b9
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2018-12-29 14:22
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cotisations', '0035_notepayment'),
]
operations = [
migrations.AddField(
model_name='custominvoice',
name='remark',
field=models.TextField(blank=True, null=True, verbose_name='Remark'),
),
]
......@@ -286,6 +286,11 @@ class CustomInvoice(BaseInvoice):
paid = models.BooleanField(
verbose_name=_("Paid")
)
remark = models.TextField(
verbose_name=_("Remark"),
blank=True,
null=True
)
# TODO : change Vente to Purchase
......
......@@ -111,10 +111,14 @@
\end{tabular}
\vspace{1cm}
\begin{tabularx}{\textwidth}{c X}
\begin{tabularx}{\textwidth}{r X}
\hline
\textbf{Moyen de paiement} & {{payment_method|default:"Non spécifié"}} \\
\hline
{% if remark %}
\textbf{Remarque} & {{remark|safe}} \\
\hline
{% endif %}
\end{tabularx}
......
......@@ -408,6 +408,7 @@ def custom_invoice_pdf(request, invoice, **_kwargs):
'phone': AssoOption.get_cached_value('telephone'),
'tpl_path': os.path.join(settings.BASE_DIR, LOGO_PATH),
'payment_method': invoice.payment,
'remark': invoice.remark,
})
......
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