From 31d91827c4b2ec91d267b2021b2106a19944d9ca Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 11 Oct 2018 20:50:02 +0000 Subject: facture-belge-simple-sans-tva (11oct18) git-svn-id: svn://tug.org/texlive/trunk@48886 c570f23f-e606-0410-a88d-b1316a301751 --- .../facture-belge-simple-sans-tva.sty | 440 +++++++++++++++++++++ 1 file changed, 440 insertions(+) create mode 100644 Master/texmf-dist/tex/xelatex/facture-belge-simple-sans-tva/facture-belge-simple-sans-tva.sty (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/xelatex/facture-belge-simple-sans-tva/facture-belge-simple-sans-tva.sty b/Master/texmf-dist/tex/xelatex/facture-belge-simple-sans-tva/facture-belge-simple-sans-tva.sty new file mode 100644 index 00000000000..fecc1f0d2cd --- /dev/null +++ b/Master/texmf-dist/tex/xelatex/facture-belge-simple-sans-tva/facture-belge-simple-sans-tva.sty @@ -0,0 +1,440 @@ +% !TeX encoding = UTF-8 +% Ce fichier contient le code de l'extension "Facture belge simple sans TVA" +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\rsvarname} {Facture belge simple sans TVA} % +\newcommand{\rsvarversion} {1.1} % +\newcommand{\rsvardate} {2018/10/11} % +\newcommand{\rsvarauthor} {Robert Sebille} % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% -------------------------------------------------------------------- +% Author : Robert Sebille +% Status : Maintained +% Email : robert@sebille.name +% Package URL: https://www.ctan.org/pkg/facture-belge-simple-sans-tva +% Bug tracker: https://gitlab.adullact.net/zenjo/facture-belge-simple-sans-tva/issues +% Repository : https://gitlab.adullact.net/zenjo/facture-belge-simple-sans-tva/tree/master +% Copyright : (c) Robert Sebille 2018 - +% Licence : Released under the LaTeX Project Public License v1.3c +% or later, see http://www.latex-project.org/lppl.txt +% Files : 1) facture-belge-simple-sans-tva.sty +% 2) article-facture.tex +% 3) article-facture.pdf +% 4) article-note-de-frais.tex +% 5) article-note-de-frais.pdf +% 6) facture-belge-simple-sans-tva-doc.tex +% 7) facture-belge-simple-sans-tva-doc.pdf +% 8) README.md +% 9) LICENCE +% 10) line_bas.png +% 11) line_haut.png +% 12) signature.png +% -------------------------------------------------------------------- +% Depend de fancyhdr, ifthen, eurosym, hyperref, multirow, color, colortbl + +\ProvidesPackage{facture-belge-simple-sans-tva}[\rsvardate\ \rsvarversion\ \rsvarauthor] +\NeedsTeXFormat{LaTeX2e}[1999/01/01] + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Facture & note de frais %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Chargement des extensions %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\RequirePackage{fontspec} + +%\RequirePackage{fontenc} + +\RequirePackage[top=2 cm, bottom=2 cm, left=2.5 cm, right=2.5 cm]{geometry} +\RequirePackage{soul} +\RequirePackage{ulem} +\RequirePackage{eurosym} +\RequirePackage{lmodern} +\RequirePackage{color} +\RequirePackage{colortbl} +\RequirePackage[colorlinks=true, urlcolor=magenta]{hyperref} +\RequirePackage{mathtools} +\RequirePackage{amssymb} +\RequirePackage{mathrsfs} +\RequirePackage{multirow} +\RequirePackage{fancyhdr} +\RequirePackage{array} +\RequirePackage{ifthen} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Facture & note de frais %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Déclaration des options %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\newif\if@latinUn \@latinUnfalse +\DeclareOption{latin1}{\@latinUntrue} + +%% \DeclareOption{option}{...} +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{babel}} +\ProcessOptions + +\RequirePackage{babel} + +\if@latinUn + \RequirePackage{inputenc} + \newcommand{\rsEncodage}{latin1} +\else +% \RequirePackage[utf8]{inputenc} + \newcommand{\rsEncodage}{UTF8} +\fi + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Facture & note de frais %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Définition des commandes %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Toutes les commandes sont obligatoirement sous la forme \rsQuelqueChose %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Facture & note de frais %% +%% Couleurs de mise en évidence +\definecolor{grisfonce}{gray}{0.3} +\definecolor{grisclair}{gray}{0.7} + +%%%%%%%%%%%%%%%%%%%%%%% +%% Facture seulement %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% \rsNoDate Numéro et date de la facture + +\newcommand{\rsNoDate}[2]{ +\begin{center} +\textcolor{grisfonce}{{\Huge Facture \no #1}\\ {\large du #2}} +\end{center} +} + +%%%%%%%%%%%%%%%%%%%%%%% +%% Facture seulement %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% les adresses expédition, facturation et livraison + +%%%%%%%%%%%%%%%%%%%%%%% +%% Facture seulement %% +%% \rsEnteteTableauAdresses ouvre l'entête du tableau des adresses; +%% a n'utiliser qu'une seule fois dans le document principal. +\newcommand{\rsEnteteTableauAdresses}{ +\noindent +\begin{tabular}{p{0.3\textwidth}p{0.3\textwidth}p{0.3\textwidth}} +\hline\\ +\textcolor{grisfonce} {\emph{Expédition}} & \textcolor{grisfonce}{\emph{Facturation}} & \textcolor{grisfonce}{\emph{Livraison}} \\ +} + +%%%%%%%%%%%%%%%%%%%%%%% +%% Facture seulement %% +%% \rsLigneTableauAdresses{}{}{} entrée d'une ligne d'adresse, +%% dans l'ordre expédition, facturation, livraison +\newcommand{\rsLigneTableauAdresses}[3]{#1 & #2 & #3 \\} + +%%%%%%%%%%%%%%%%%%%%%%% +%% Facture seulement %% +%% \rsPiedTableauAdresses ferme le pied du tableau des adresses; +%% à n'utiliser qu'une seule fois dans le document principal. +\newcommand{\rsPiedTableauAdresses}{ +\hline\\ +\end{tabular} +} + +%%%%%%%%%%%%%%%%%%%%%%% +%% Facture seulement %% +%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% le tableau des produits + +%%%%%%%%%%%%%%%%%%%%%%% +%% Facture seulement %% +%% \rsEnteteTableauProduits ouvre l'entête du tableau des produits; +%% a n'utiliser qu'une seule fois dans le document principal. +\newcommand{\rsEnteteTableauProduits}{ +%\setlength{\parindent}{0cm} +\begin{center} +\begin{tabular}{|l|r|r|r|r|} +\hline% +%\rowcolor{grisclair} \textbf{Produit} & \textbf{Quantité} & \textbf{Prix} & \textbf{Remise} & \textbf{Total}\\ +\textbf{Produit} & \textbf{Quantité} & \textbf{Prix} & \textbf{Remise} & \textbf{Total}\\ +\hline% +} + +%%%%%%%%%%%%%%%%%%%%%%% +%% Facture seulement %% +%% Entrée d'une ligne de produit; produit, quantité, prix, remise, total produit +%% Les calculs sont à votre charge !! +%% Ordre des arguments: +%% \rsLigneTableauProduits{produit}{quantité}{prix}{remise}{total produit} + +\newcommand{\rsLigneTableauProduits}[5]{% Ce commentaire bloque un blanc indésirable. +#1 & #2 & #3~\rsuniteMonetaire{} & #4~\rsuniteMonetaire{} & #5~\rsuniteMonetaire{} \\ +\hline +} + +%%%%%%%%%%%%%%%%%%%%%%% +%% Facture seulement %% +%% A terminer obligatoirement par la ligne du total général +%% \rsLigneTotalTableauProduits{total produit} +\newcommand{\rsLigneTotalTableauProduits}[1]{ + \multicolumn{4}{|r|}{\textcolor{grisfonce}{\textbf{Total:} }} & #1~\rsuniteMonetaire{} \\ +\hline +} + +%%%%%%%%%%%%%%%%%%%%%%% +%% Facture seulement %% +%% \piedTableauProduits ferme le pied du tableau des adresses; +%% à n'utiliser qu'une seule fois dans le document principal. +\newcommand{\rsPiedTableauProduits}{ +\end{tabular} +\end{center} +} + + +%%%%%%%%%%%%%%%%%%%%%%% +%% Facture seulement %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% \compteBancaireEtDateLimiteDePaiement: le n° de compte en banque et la date de paiement + +\newcommand{\rsCompteBancaireEtDateLimiteDePaiement}[2]{ +\begin{flushright} +A payer au compte bancaire \emph{#1} avant le #2.\\ +\end{flushright} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais seulement %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% On récolte des informations nécessaires sur le créancier (qui entre la note) %% +%% et le client (qui la paie). Nom, adresse, mois + année note, totaux en chiffres %% +%% et en lettres. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Les calculs arithméthiques sont à la charge du rédacteur de la note %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais: commande -> variable +%% prenom nom societe créancier (qui entre la note de frais) +\newcommand{\rsIdentificationCreancier}[2]{ + \newcommand{\rsprenomNomCreancier}{#1} + \newcommand{\rssocieteCreancier}{#2} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais: commande -> variable +%% prenom nom societe civilite créancier (qui paie la note de frais) +\newcommand{\rsIdentificationClient}[3]{ + \newcommand{\rsprenomNomClient}{#1} + \newcommand{\rssocieteClient}{#2} + \newcommand{\rsciviliteClient}{#3} +} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais: commandes -> variables +%% adresse créancier {rue no}{codpost ville}{pays}{email}{téléphone} +\newcommand{\rsAdresseCreancier}[5]{ + \newcommand{\rsruenoCreancier}{#1} + \newcommand{\rscodpostVilleCreancier}{#2} + \newcommand{\rspaysCreancier}{#3} + \newcommand{\rsemailCreancier}{#4} + \newcommand{\rstelephoneCreancier}{#5} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais: commandes -> variables +%% adresse client {rue no}{codpost ville}{pays} +\newcommand{\rsAdresseClient}[3]{ + \newcommand{\rsruenoClient}{#1} + \newcommand{\rscodpostVilleClient}{#2} + \newcommand{\rspaysClient}{#3} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais: commande -> variable +%% mois annee note de frais +\newcommand{\rsMoisAnneeNote}[1]{\newcommand{\rsmoisAnneeNote}{#1}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais: commande -> variable +%% total en chiffres +\newcommand{\rsTotalEnChiffres}[1]{\newcommand{\rstotalEnChiffres}{#1}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais: commande -> variable +%% total en lettres +\newcommand{\rsTotalEnLettres}[1]{\newcommand{\rstotalEnLettres}{#1}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais: commande -> variable +%% Compte en banque créancier +\newcommand{\rsCompteEnBanqueCreancier}[1]{\newcommand{\rscompteEnBanqueCreancier}{#1}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais seulement %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% prenom nom, societe, adresse, pays, email, téléphone créancier (qui entre la note) +%% Seuls les champs non vides sont pris en considération. +\newcommand{\rsConstruitAdresseCreancier}{ +\begin{flushleft} +\begin{tabular}{l} + +%\hline +%% tester le vide = {\equal{\rsprenomNomClient}{} et PAS {\equal{\rsprenomNomClient{}}{} +\ifthenelse{\equal{\rsprenomNomCreancier}{}}{}{\rsprenomNomCreancier{}\\}% cache un blanc +\ifthenelse{\equal{\rssocieteCreancier}{}}{}{\rssocieteCreancier{}\\}% cache un blanc +\ifthenelse{\equal{\rsruenoCreancier}{}}{}{\rsruenoCreancier{}\\}% cache un blanc +\ifthenelse{\equal{\rscodpostVilleCreancier}{}}{}{\rscodpostVilleCreancier{}\\}% cache un blanc +\ifthenelse{\equal{\rspaysCreancier}{}}{}{\rspaysCreancier{}\\}% cache un blanc +\ifthenelse{\equal{\rsemailCreancier}{}}{}{\rsemailCreancier{}\\}% cache un blanc +\ifthenelse{\equal{\rstelephoneCreancier}{}}{}{\rstelephoneCreancier{}\\}% cache un blanc +%\hline + +\end{tabular} +\end{flushleft} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais seulement %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% civilite, prenom nom, societe, adresse, pays client (qui paie la note) +%% Seuls les champs non vides sont pris en considération. +\newcommand{\rsConstruitAdresseClient}{ +\begin{flushright} +\begin{tabular}{l} + +%\hline% +%% tester le vide = {\equal{\rsprenomNomClient}{} et PAS {\equal{\rsprenomNomClient{}}{} +\ifthenelse{\equal{\rsprenomNomClient}{}}{}{\rsciviliteClient{}\rsprenomNomClient{}\\}% cache un blanc +\ifthenelse{\equal{\rssocieteClient}{}}{}{\rssocieteClient{}\\}% cache un blanc +\ifthenelse{\equal{\rsruenoClient}{}}{}{\rsruenoClient{}\\}% cache un blanc +\ifthenelse{\equal{\rscodpostVilleClient}{}}{}{\rscodpostVilleClient{}\\}% cache un blanc +\ifthenelse{\equal{\rspaysClient}{}}{}{\rspaysClient{}\\}% cache un blanc +%\hline + +\end{tabular} +\end{flushright} +} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais seulement %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% le tableau des items à rembourser DEBUT %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais seulement %% +%% no piece, date, nature, montant ttc, moyen de paiement +%% \rsEnteteTableauItemsARembourser{} ouvre l'entête du tableau des items à rembourser; +%% a n'utiliser qu'une seule fois dans le document principal. +\newcommand{\rsEnteteTableauItemsARembourser}{% +\begin{center}% +\begin{tabular}{|r|c|l|r|l|}% +\hline% +%\rowcolor{grisclair} \textbf{N\up{o} pièce} & \textbf{Date} & \textbf{Nature} & \textbf{Montant TTC} & \textbf{Moyen}\\% +\textbf{N\up{o} pièce} & \textbf{Date} & \textbf{Nature} & \textbf{Montant TTC} & \textbf{Moyen}\\% +\hline% +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais seulement %% +%% Entrée de lignes d'items à rembourser, dans l'ordre +%% no piece, date, nature, montant ttc, moyen de paiement. +%% les calculs sont à votre charge +%% \rsLigneTableauItemsARembourser{numero}{JJ/MM/AAAA}{Nature}{Montant TTC}{Moyen} +\newcommand{\rsLigneTableauItemsARembourser}[5]{% Ce commentaire bloque un blanc indésirable. +#1 & #2 & #3 & #4~\rsuniteMonetaire & #5 \\ +\hline +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais seulement %% +%% A terminer obligatoirement par la ligne du total général des items à rembourser +%% \rsLigneTotalTableauItemsARembourser{total_items_a_rembourser} +%\rsLigneTotalTableauItemsARembourser{2.500,00} +\newcommand{\rsLigneTotalTableauItemsARembourser}[1]{ + \multicolumn{3}{|r|}{\textcolor{grisfonce}{\textbf{Total:} }} & #1~\rsuniteMonetaire{} & \\ +\hline +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais seulement %% +%% On ferme le pied du tableau des items à rembourser; à n'utiliser qu'une seule fois. +%\rsPiedTableauItemsARembourser{} +\newcommand{\rsPiedTableauItemsARembourser}{ +\end{tabular} +\end{center} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais seulement %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% le tableau des items à rembourser FIN %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais seulement %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Construit l'injonction à payer +\newcommand{\rsConstruitInjonctionAPayer}[3]{ +\begin{flushright} +Cette somme de \rstotalEnChiffres{}~\rsuniteMonetaire{} est a rembourser sur le compte \rscompteEnBanqueCreancier{}.\\ +Fait à #1, le #2.\\ +\ifthenelse{\equal{#3}{oui}}{\includegraphics[scale=1]{signature.png}}{}% cache un blanc +\end{flushright} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Note de frais seulement %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Construit le titre Note de service de +\newcommand{\rsConstruitTitreEtDateNote}{ +\begin{center} +\textcolor{grisfonce}{{\Huge Note de frais}\\ {\rsmoisAnneeNote{}}} +\end{center} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Facture & note de frais communs %% +%%%%%%%%%%%%% +%% diverses + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Facture & note de frais communs %% +%% \rsCredit permet d'ajouter les crédits dans le footer. +\pagestyle{fancy} +\fancyhf{} +\renewcommand{\headrulewidth}{0pt} +\newcommand{\rsCredit}{ +\fancyfoot[EOC]{\footnotesize Extension \og \rsvarname \fg, V \rsvarversion, \rsvardate, \copyright\ \rsvarauthor.} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Facture & note de frais communs %% +%% permet de choisir l'unité monétaire +%% \euro (defaut), \pounds (livre anglaise) \$ (dollar américain) \textyen (yen japonais) +%% Decomenter ci-dessous pour voir les unités +%%\$ \pounds \euro \textyen +\newcommand{\rsChoisirUniteMonetaire}[1]{\newcommand{\rsuniteMonetaire}{#1}} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Facture & note de frais communs %% +%% \rsAerationVerticale fixe la longueur de l'espacement vertical, par defaut 1.5 cm +%% et permet d'aérer la page verticalement; le paramètre est une mesure LaTeX +%% TeX comprend six unités de mesure : +%% + pt point = 0,35 mm +%% + mm millimètre +%% + ex correspond à la hauteur d'un x dans la fonte courante +%% + em correspond à la largeur d'un m dans la fonte courante +%% + cm centimètre +%% + in pouce = 2,54 cm +\newlength{\rsespaceVertical} +\newcommand{\rsAerationVerticale}[1]{\setlength{\rsespaceVertical}{#1}} + +%%%%%%%%%%%%%%%%%%%% +%% Fin du package %% +%%%%%%%%%%%%%%%%%%%% +\endinput -- cgit v1.2.3