2020-08-06 12:19:51 +00:00
|
|
|
{% load escape_tex %}
|
2020-08-06 19:45:50 +00:00
|
|
|
{% load l10n %}
|
2020-08-06 12:19:51 +00:00
|
|
|
|
2020-03-21 08:22:38 +00:00
|
|
|
\nonstopmode
|
|
|
|
\documentclass[11pt]{article}
|
|
|
|
|
|
|
|
\usepackage[french]{babel}
|
|
|
|
\usepackage[T1]{fontenc}
|
|
|
|
\usepackage[utf8]{inputenc}
|
|
|
|
\usepackage[a4paper]{geometry}
|
|
|
|
\usepackage{units}
|
|
|
|
\usepackage{bera}
|
|
|
|
\usepackage{graphicx}
|
|
|
|
\usepackage{fancyhdr}
|
|
|
|
\usepackage{fp}
|
|
|
|
\usepackage{transparent}
|
|
|
|
\usepackage{eso-pic}
|
|
|
|
|
|
|
|
\def\TVA{0} % Taux de la TVA
|
|
|
|
|
|
|
|
\def\TotalHT{0}
|
|
|
|
\def\TotalTVA{0}
|
|
|
|
|
|
|
|
\newcommand{\AjouterProduit}[4]{% Arguments : Désignation, quantité, prix unitaire HT, prix total HT
|
|
|
|
\FPround{\prix}{#3}{2}
|
|
|
|
\FPround{\montant}{#4}{2}
|
|
|
|
\FPadd{\TotalHT}{\TotalHT}{\montant}
|
|
|
|
}
|
|
|
|
|
|
|
|
\newcommand{\AfficheResultat}{%
|
|
|
|
\ListeProduits
|
|
|
|
|
2020-08-06 13:08:35 +00:00
|
|
|
\FPmul{\TotalTVA}{\TotalHT}{\TVA}
|
|
|
|
\FPdiv{\TotalTVA}{\TotalTVA}{100}
|
2020-03-21 08:22:38 +00:00
|
|
|
\FPadd{\TotalTTC}{\TotalHT}{\TotalTVA}
|
|
|
|
\FPround{\TotalHT}{\TotalHT}{2}
|
|
|
|
\FPround{\TotalTVA}{\TotalTVA}{2}
|
|
|
|
\FPround{\TotalTTC}{\TotalTTC}{2}
|
|
|
|
\global\let\TotalHT\TotalHT
|
|
|
|
\global\let\TotalTVA\TotalTVA
|
|
|
|
\global\let\TotalTTC\TotalTTC
|
|
|
|
|
|
|
|
\cr \hline
|
|
|
|
Total HT & & & \TotalHT \cr
|
|
|
|
TVA \TVA~\% & & & \TotalTVA \cr
|
|
|
|
\hline \hline
|
|
|
|
\textbf{Total TTC} & & & \TotalTTC
|
|
|
|
}
|
|
|
|
|
2020-08-06 17:39:40 +00:00
|
|
|
\newcommand {\ListeProduits}{
|
2020-08-06 19:45:50 +00:00
|
|
|
{% localize off %}
|
|
|
|
{% for product in products %}
|
|
|
|
{{ product.designation|safe|escape_tex }} & {{ product.amount_euros|safe|escape_tex|floatformat:2 }} & {{ product.quantity|safe|escape_tex|floatformat:2 }} & {{ product.total_euros|safe|escape_tex|floatformat:2 }} \cr
|
|
|
|
{% endfor %}
|
|
|
|
{% endlocalize %}
|
2020-03-21 08:22:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
% Logo du BDE
|
|
|
|
\AddToShipoutPicture*{
|
|
|
|
\put(0,0){
|
|
|
|
\parbox[b][\paperheight]{\paperwidth}{%
|
|
|
|
\vfill
|
|
|
|
\centering
|
|
|
|
{\transparent{0.1}\includegraphics[width=\textwidth]{../../static/img/{{ obj.bde }}}}%
|
|
|
|
\vfill
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%% A MODIFIER DANS LA FACTURE %%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% Infos Association
|
|
|
|
\def\MonNom{{"{"}}{{ obj.my_name }}} % Nom de l'association
|
|
|
|
\def\MonAdresseRue{{"{"}}{{ obj.my_address_street }}} % Adresse de l'association
|
|
|
|
\def\MonAdresseVille{{"{"}}{{ obj.my_city }}}
|
|
|
|
|
|
|
|
% Informations bancaires de l'association
|
|
|
|
\def\CodeBanque{{"{"}}{{ obj.bank_code|stringformat:".05d" }}}
|
|
|
|
\def\CodeGuichet{{"{"}}{{ obj.desk_code|stringformat:".05d" }}}
|
|
|
|
\def\NCompte{{"{"}}{{ obj.account_number|stringformat:".011d" }}}
|
|
|
|
\def\CleRib{{"{"}}{{ obj.rib_key|stringformat:".02d" }}}
|
2020-08-06 19:45:50 +00:00
|
|
|
\def\IBAN{FR76\CodeBanque\CodeGuichet\NCompte\CleRib}
|
2020-03-21 08:22:38 +00:00
|
|
|
\def\CodeBic{{"{"}}{{ obj.bic }}}
|
|
|
|
|
2020-08-06 12:19:51 +00:00
|
|
|
\def\FactureNum {{"{"}}{{ obj.id }}} % Numéro de facture
|
2020-03-21 08:22:38 +00:00
|
|
|
\def\FactureAcquittee {% if obj.acquitted %} {oui} {% else %} {non} {% endif %} % Facture acquittée : oui/non
|
2020-08-06 12:19:51 +00:00
|
|
|
\def\FactureLieu {{"{"}}{{ obj.place|safe|escape_tex }}} % Lieu de l'édition de la facture
|
2020-03-21 08:22:38 +00:00
|
|
|
\def\FactureDate {{"{"}}{{ obj.date }}} % Date de l'édition de la facture
|
2020-08-06 12:19:51 +00:00
|
|
|
\def\FactureObjet {{"{"}}{{ obj.object|safe|escape_tex }} } % Objet du document
|
2020-03-21 08:22:38 +00:00
|
|
|
% Description de la facture
|
2020-08-06 12:19:51 +00:00
|
|
|
\def\FactureDescr {{"{"}}{{ obj.description|safe|escape_tex }}}
|
2020-03-21 08:22:38 +00:00
|
|
|
|
|
|
|
% Infos Client
|
2020-08-06 12:19:51 +00:00
|
|
|
\def\ClientNom{{"{"}}{{ obj.name|safe|escape_tex }}} % Nom du client
|
|
|
|
\def\ClientAdresse{{"{"}}{{ obj.address|safe|escape_tex }}} % Adresse du client
|
2020-03-21 08:22:38 +00:00
|
|
|
|
|
|
|
% Liste des produits facturés : Désignation, quantité, prix unitaire HT
|
|
|
|
|
2020-03-21 15:49:18 +00:00
|
|
|
{% for product in products %}
|
2020-08-06 13:08:35 +00:00
|
|
|
\AjouterProduit{{"{"}}{{ product.designation|safe|escape_tex }}} {{"{"}}{{ product.quantity|safe|escape_tex }}} {{"{"}}{{ product.amount_euros|safe|escape_tex }}} {{"{"}}{{ product.total_euros|safe|escape_tex }}}
|
2020-03-21 08:22:38 +00:00
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
|
|
|
|
\geometry{verbose,tmargin=4em,bmargin=8em,lmargin=6em,rmargin=6em}
|
|
|
|
\setlength{\parindent}{1pt}
|
|
|
|
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
|
|
|
|
|
|
|
|
\thispagestyle{fancy}
|
|
|
|
\pagestyle{fancy}
|
|
|
|
\setlength{\parindent}{0pt}
|
|
|
|
|
|
|
|
\renewcommand{\headrulewidth}{0pt}
|
|
|
|
\cfoot{
|
2020-03-21 15:49:18 +00:00
|
|
|
\small{\MonNom ~--~ \MonAdresseRue ~ \MonAdresseVille ~--~ Téléphone : +33(0)6 89 88 56 50\newline
|
2020-03-21 08:22:38 +00:00
|
|
|
Site web : bde.ens-cachan.fr ~--~ E-mail : tresorerie.bde@lists.crans.org \newline Numéro SIRET : 399 485 838 00011
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
\begin{document}
|
|
|
|
|
|
|
|
% Logo de la société
|
|
|
|
% \includegraphics{logo.jpg}
|
|
|
|
|
|
|
|
% Nom et adresse de la société
|
|
|
|
\MonNom \\
|
|
|
|
\MonAdresseRue \\
|
|
|
|
\MonAdresseVille
|
|
|
|
|
|
|
|
Facture n°\FactureNum
|
|
|
|
|
|
|
|
|
|
|
|
{\addtolength{\leftskip}{10.5cm} %in ERT
|
|
|
|
\ClientNom \\
|
|
|
|
\ClientAdresse \\
|
|
|
|
|
|
|
|
} %in ERT
|
|
|
|
|
|
|
|
|
|
|
|
\hspace*{10.5cm}
|
|
|
|
\FactureLieu, le \FactureDate
|
|
|
|
|
|
|
|
~\\~\\
|
|
|
|
|
|
|
|
\textbf{Objet : \FactureObjet \\}
|
|
|
|
|
|
|
|
\textnormal{\FactureDescr}
|
|
|
|
|
|
|
|
~\\
|
|
|
|
|
|
|
|
\begin{center}
|
|
|
|
\begin{tabular}{lrrr}
|
|
|
|
\textbf{Désignation ~~~~~~} & \textbf{Prix unitaire} & \textbf{Quantité} & \textbf{Montant (EUR)} \\
|
|
|
|
\hline
|
|
|
|
\AfficheResultat{}
|
|
|
|
\end{tabular}
|
|
|
|
\end{center}
|
|
|
|
|
|
|
|
~\\
|
|
|
|
|
|
|
|
\ifthenelse{\equal{\FactureAcquittee}{oui}}{
|
|
|
|
Facture acquittée.
|
|
|
|
}{
|
|
|
|
|
|
|
|
À régler par chèque ou par virement bancaire :
|
|
|
|
|
|
|
|
\begin{center}
|
|
|
|
\begin{tabular}{|c c c c|}
|
|
|
|
\hline
|
|
|
|
\textbf{Code banque} & \textbf{Code guichet} & \textbf{N° de Compte} & \textbf{Clé RIB}\\
|
|
|
|
\CodeBanque & \CodeGuichet & \NCompte & \CleRib \\
|
|
|
|
\hline
|
|
|
|
\textbf{IBAN N°} & \multicolumn{3}{|l|} \IBAN \\
|
|
|
|
\hline
|
|
|
|
\textbf{Code BIC} & \multicolumn{3}{|l|}\CodeBic \\
|
|
|
|
\hline
|
|
|
|
\end{tabular}
|
|
|
|
\end{center}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
\begin{center}
|
|
|
|
TVA non applicable, article 293 B du CGI.
|
|
|
|
\end{center}
|
|
|
|
|
|
|
|
\end{document}
|