\documentclass[a4paper]{article}
\usepackage[margin=1.5cm,top=1.2cm]{geometry} % géométrie de la page.
\usepackage[T1]{fontenc} % permet juste d’utiliser une nouvelle norme LATEX concernant le codage des caractères.
\usepackage[utf8]{inputenc} % permet de taper directement à l’écran, dans le fichier *.tex, les caractères accentués.
\usepackage{amsfonts,amsmath,amssymb,amsthm} % permettent d’obtenir des caractère mathématiques (de toute beauté!).
\usepackage[frenchb, english]{babel} % permet de spécifier au compilateur que l’on désire taper son document en français.
\usepackage{pstricks}
\usepackage{diagbox}
%\usepackage[tikz,pst]{pas-stat}
%\usepackage{caption}
%\usepackage[table]{xcolor}
\usepackage{multirow}
\usepackage{mathptmx}
\begin{document}
{\centering
{\huge\underline{\textbf{Ets Dramé Electronique}}}
\begin{center}
Vente en Gros et Détail Appareils Electroniques - Informatiques - Téléphones Portables-Ordinateurs\\
Accessoires - Multimedia - GSM - PDA - Console de jeu-Logiciels - Maintenance Informatique - Décodage\\
Place de l'indépendance $ \times $ Rue Amadou A. Ndoye - Centre Commercial la Rotonde \vspace{5pt}\\
Tél: $ +221 \ 33 \ 123 \ 45 \ 67 $ - \ Mob: $ +221\ 77\ 123 \ 45\ 67 $ \ - $ +221\ 33\ 123\ 45\ 67 $ \\
Email: email@gmail.com - www.etsdrameelectronique.com \\
\vspace{1cm}
\textbf{FACTURE N $ \degres \ 0001 $ }
\end{center}
}
\vspace{.3cm}
\hspace{9cm} Dakar, le \dotfill
Client: \dotfill \dots \, Tél: \dotfill
\vspace{.7cm}
\centering
\begin{tabular}{|p{2cm}|p{7cm}|p{3cm}|p{3cm}|}
\hline
QUANTITE & DESIGNATION & P.UNITAIRE & P.TOTAL \\ \hline
& & & \\ \hline
& & & \\ \hline
& & & \\ \hline
& & & \\ \hline
TOTAL GENERAL & & & \\ \hline
\end{tabular}
\vspace{.2cm}\\
\begin{centering}
\hspace{2pt} Arrêtée la présente note de prix à la somme de: \dotfill \\
\dotfill
\end{centering}
\vspace*{1cm}
\hrule
\vspace*{1cm}
{\centering
{\huge\underline{\textbf{Ets Dramé Electronique}}}
\begin{center}
Vente en Gros et Détail Appareils Electroniques - Informatiques - Téléphones Portables-Ordinateurs\\
Accessoires - Multimedia - GSM - PDA - Console de jeu-Logiciels - Maintenance Informatique - Décodage\\
Place de l'indépendance $ \times $ Rue Amadou A. Ndoye - Centre Commercial la Rotonde \vspace{5pt}\\
Tél: $ +221 \ 33 \ 123 \ 45 \ 67 $ - \ Mob: $ +221\ 77\ 123 \ 45\ 67 $ \ - $ +221\ 33\ 123\ 45\ 67 $ \\
Email: email@gmail.com - www.etsdrameelectronique.com \\
\vspace{1cm}
\textbf{FACTURE N $ \degres \ 0002 $ }
\end{center}
}
\vspace{.3cm}
\hspace{9cm} Dakar, le \dotfill
Client: \dotfill \dots \, Tél: \dotfill
\vspace{.7cm}
\centering
\begin{tabular}{|p{2cm}|p{7cm}|p{3cm}|p{3cm}|}
\hline
QUANTITE & DESIGNATION & P.UNITAIRE & P.TOTAL \\ \hline
& & & \\ \hline
& & & \\ \hline
& & & \\ \hline
& & & \\ \hline
TOTAL GENERAL & & & \\ \hline
\end{tabular}
\vspace{.2cm}\\
\begin{centering}
\hspace{2pt} Arrêtée la présente note de prix à la somme de: \dotfill \\
\dotfill
\end{centering}
\end{document}
Asked
Active
Viewed 161 times
2
Ousseynou Diagne
- 389
1 Answers
2
Using counters is the way to go here. I've simplified your code as well, making the invoice setting part of a macro.
\documentclass{article}
\usepackage[margin=1.5cm,top=1.2cm,paper=a4paper]{geometry}
\usepackage[utf8]{inputenc} % permet de taper directement à l’écran, dans le fichier *.tex, les caractères accentués.
\usepackage{mathptmx,eqparbox}
\setlength{\parindent}{0pt}
\newcounter{facture}
\renewcommand{\thefacture}{% https://tex.stackexchange.com/q/30930/5764
\ifnum\value{facture}<10 000%
\else\ifnum\value{facture}<100 00%
\else\ifnum\value{facture}<1000 000\fi\fi\fi
\arabic{facture}}
\newcommand{\insertfacture}{%
\stepcounter{facture}% New facture
\begin{center}
{\huge\bfseries\underline{Ets Dramé Electronique}}
\vspace{\baselineskip}
Vente en Gros et Détail Appareils Electroniques - Informatiques - Téléphones Portables-Ordinateurs \\
Accessoires - Multimedia - GSM - PDA - Console de jeu-Logiciels - Maintenance Informatique - Décodage \\
Place de l'indépendance $ \times $ Rue Amadou A. Ndoye - Centre Commercial la Rotonde \\[.5\baselineskip]
Tél: $ +221 \ 33 \ 123 \ 45 \ 67 $ - \ Mob: $ +221\ 77\ 123 \ 45\ 67 $ \ - $ +221\ 33\ 123\ 45\ 67 $ \\
Email: email@gmail.com - www.etsdrameelectronique.com \\[1cm]
\textbf{FACTURE No \thefacture}
\end{center}
\vspace{\baselineskip}
\hspace*{.5\textwidth}\eqmakebox[rtag][r]{Dakar, le} \dotfill
\vspace{.5\baselineskip}
\makebox[.5\textwidth][l]{Client: \dotfill}\eqmakebox[rtag][r]{Tél:} \dotfill
\vspace{.7cm}
\begin{center}
\begin{tabular}{|p{2cm}|p{7cm}|p{3cm}|p{3cm}|}
\hline
QUANTITE & DESIGNATION & P.UNITAIRE & P.TOTAL \\ \hline
& & & \\ \hline
& & & \\ \hline
& & & \\ \hline
& & & \\ \hline
TOTAL GENERAL & & & \\ \hline
\end{tabular}
\end{center}
Arrêtée la présente note de prix à la somme de: \dotfill
\vspace{.5\baselineskip}
\dotfill
}
\newcommand{\insertrule}{\par
\vspace*{1cm}
\hrule\par
\vspace*{1cm}}
\begin{document}
\insertfacture
\insertrule
\insertfacture
\clearpage
\insertfacture
\insertrule
\insertfacture
\end{document}
Werner
- 603,163
-
-
@OusseynouDiagne: A design change falls outside the scope of this question. You'll have to ask a follow-up question and include details of what you've tried. – Werner Jun 05 '17 at 18:55
-



facture(french documentation and xelatex) andinvoice(pdflatex) – Ignasi Jun 05 '17 at 15:17\usepackage[frenchb, english]{babel}, you should putfrenchblast as the main language is French. – Jun 05 '17 at 17:30