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}
|
|
|
|
|
|
|
|
\eaddto\ListeProduits{#1 & \prix & #2 & \montant \cr}
|
|
|
|
}
|
|
|
|
|
|
|
|
\newcommand{\AfficheResultat}{%
|
|
|
|
\ListeProduits
|
|
|
|
|
|
|
|
\FPeval{\TotalTVA}{\TotalHT * \TVA / 100}
|
|
|
|
\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
|
|
|
|
}
|
|
|
|
|
|
|
|
\newcommand*\eaddto[2]{% version développée de \addto
|
|
|
|
\edef\tmp{#2}%
|
|
|
|
\expandafter\addto
|
|
|
|
\expandafter#1%
|
|
|
|
\expandafter{\tmp}%
|
|
|
|
}
|
|
|
|
|
|
|
|
\newcommand {\ListeProduits}{}
|
|
|
|
|
|
|
|
% 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" }}}
|
|
|
|
\def\IBAN{FR76\CodeBanque\CodeGuichet\NCompte\CleRib}
|
|
|
|
\def\CodeBic{{"{"}}{{ obj.bic }}}
|
|
|
|
|
|
|
|
\def\FactureNum {{"{"}}{{obj.id}}} % Numéro de facture
|
|
|
|
\def\FactureAcquittee {% if obj.acquitted %} {oui} {% else %} {non} {% endif %} % Facture acquittée : oui/non
|
|
|
|
\def\FactureLieu {{"{"}}{{ obj.place }}} % Lieu de l'édition de la facture
|
|
|
|
\def\FactureDate {{"{"}}{{ obj.date }}} % Date de l'édition de la facture
|
2020-03-22 14:24:54 +00:00
|
|
|
\def\FactureObjet {{"{"}}{{ obj.object|safe }} } % Objet du document
|
2020-03-21 08:22:38 +00:00
|
|
|
% Description de la facture
|
|
|
|
\def\FactureDescr {{"{"}}{{ obj.description|safe }}}
|
|
|
|
|
|
|
|
% Infos Client
|
|
|
|
\def\ClientNom{{"{"}}{{obj.name|safe}}} % Nom du client
|
|
|
|
\def\ClientAdresse{{"{"}}{{ obj.address|safe }}} % Adresse du client
|
|
|
|
|
|
|
|
% Liste des produits facturés : Désignation, quantité, prix unitaire HT
|
|
|
|
|
2020-03-21 15:49:18 +00:00
|
|
|
{% for product in products %}
|
|
|
|
\AjouterProduit{ {{product.designation|safe}}} { {{product.quantity|safe}}} { {{product.amount_euros|safe}}} { {{product.total_euros|safe}}}
|
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}
|