mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-21 01:48:21 +02:00
Render billings
This commit is contained in:
186
templates/treasury/billing_sample.tex
Normal file
186
templates/treasury/billing_sample.tex
Normal file
@ -0,0 +1,186 @@
|
||||
\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
|
||||
\def\FactureObjet {{"{"}}{{ obj.subject|safe }} } % Objet du document
|
||||
% 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
|
||||
|
||||
{% for product in obj.products %}
|
||||
\AjouterProduit{ {{product.designation|safe}} } { {{product.quantity|safe}} } { {{product.amount|safe}}} { {{product.total|safe}}}
|
||||
{% 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{
|
||||
\small{\MonNom ~--~ \MonAdresseRue \MonAdresseVille ~--~ Telephone : +33(0)6 89 88 56 50\newline
|
||||
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}
|
Reference in New Issue
Block a user