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

Display payment method on invoices

parent e7a7e81a
......@@ -43,7 +43,7 @@
\begin{document}
%----------------------------------------------------------------------------------------
% HEADING SECTION
%----------------------------------------------------------------------------------------
......@@ -70,7 +70,7 @@
{\bf Siret :} {{siret|safe}}
\vspace{2cm}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} l r}
{\bf Pour :} {{recipient_name|safe}} & {\bf Date :} {{DATE}} \\
{\bf Adresse :} {% if address is None %}Aucune adresse renseignée{% else %}{{address}}{% endif %} & \\
......@@ -84,20 +84,20 @@
%----------------------------------------------------------------------------------------
% TABLE OF EXPENSES
%----------------------------------------------------------------------------------------
\begin{tabularx}{\textwidth}{|X|r|r|r|}
\hline
\textbf{Désignation} & \textbf{Prix Unit.} \euro & \textbf{Quantité} & \textbf{Prix total} \euro\\
\doublehline
{% for a in article %}
{{a.name}} & {{a.price}} \euro & {{a.quantity}} & {{a.total_price}} \euro\\
\hline
{% endfor %}
\end{tabularx}
\vspace{1cm}
\hfill
......@@ -109,14 +109,22 @@
\textbf{À PAYER} & {% if not paid %}{{total|floatformat:2}}{% else %} 00,00 {% endif %} \euro\\
\hline
\end{tabular}
\vspace{1cm}
\begin{tabularx}{\textwidth}{c X}
\hline
\textbf{Moyen de paiement} & {{payment_method|default:"Non spécifié"}} \\
\hline
\end{tabularx}
\vfill
%----------------------------------------------------------------------------------------
% FOOTNOTE
%----------------------------------------------------------------------------------------
\hrule
\smallskip
\footnotesize{TVA non applicable, art. 293 B du CGI}
......
......@@ -270,7 +270,8 @@ def facture_pdf(request, facture, **_kwargs):
'siret': AssoOption.get_cached_value('siret'),
'email': AssoOption.get_cached_value('contact'),
'phone': AssoOption.get_cached_value('telephone'),
'tpl_path': os.path.join(settings.BASE_DIR, LOGO_PATH)
'tpl_path': os.path.join(settings.BASE_DIR, LOGO_PATH),
'payment_method': facture.paiement.moyen,
})
......@@ -405,7 +406,8 @@ def custom_invoice_pdf(request, invoice, **_kwargs):
'siret': AssoOption.get_cached_value('siret'),
'email': AssoOption.get_cached_value('contact'),
'phone': AssoOption.get_cached_value('telephone'),
'tpl_path': os.path.join(settings.BASE_DIR, LOGO_PATH)
'tpl_path': os.path.join(settings.BASE_DIR, LOGO_PATH),
'payment_method': invoice.payment,
})
......
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