mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 23:43:47 +00:00
Add remark to custom invoices
This commit is contained in:
parent
fd57a9b925
commit
f612e4192f
4 changed files with 31 additions and 1 deletions
20
cotisations/migrations/0036_custominvoice_remark.py
Normal file
20
cotisations/migrations/0036_custominvoice_remark.py
Normal 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'),
|
||||
),
|
||||
]
|
|
@ -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,
|
||||
})
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue