8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 11:23:10 +00:00

Add remark to custom invoices

This commit is contained in:
Hugo LEVY-FALK 2018-12-29 15:25:52 +01:00 committed by chirac
parent fd57a9b925
commit f612e4192f
4 changed files with 31 additions and 1 deletions

View file

@ -0,0 +1,20 @@
# -*- 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'),
),
]

View file

@ -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

View file

@ -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}

View file

@ -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,
})