From 3770e5247d6faf795558833078de9a11d532b298 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 1 May 2002 00:22:13 +0000 Subject: [PATCH] . --- htdocs/user.class.php3 | 7 +- httpd.conf | 2 +- templates/facture/default/body.tex | 15 ++++ templates/facture/default/footer.tex | 74 +++++++++++++++++++ templates/facture/default/header.tex | 105 +++++++++++++++++++++++++++ templates/propal/default/footer.tex | 2 +- 6 files changed, 202 insertions(+), 3 deletions(-) create mode 100644 templates/facture/default/body.tex create mode 100644 templates/facture/default/footer.tex create mode 100644 templates/facture/default/header.tex diff --git a/htdocs/user.class.php3 b/htdocs/user.class.php3 index f5d95d7ae02..77c8132c2ad 100644 --- a/htdocs/user.class.php3 +++ b/htdocs/user.class.php3 @@ -51,7 +51,12 @@ class User { $sql = "SELECT u.rowid, u.name, u.firstname, u.email, u.code, u.module_comm, u.module_compta"; $sql .= " FROM llx_user as u"; - $sql .= " WHERE u.login = '$login'"; + + if ($this->id) { + $sql .= " WHERE u.rowid = $this->id"; + } else { + $sql .= " WHERE u.login = '$login'"; + } $result = $this->db->query($sql); diff --git a/httpd.conf b/httpd.conf index d3be9875e82..d913450feb9 100644 --- a/httpd.conf +++ b/httpd.conf @@ -26,7 +26,7 @@ Auth_MySQL_Password_Field pass Auth_MySQL_Encryption_Types Plaintext Auth_MySQL_Encrypted_Passwords off - AuthName "lolix" + AuthName "Dolibarr" require valid-user satisfy any diff --git a/templates/facture/default/body.tex b/templates/facture/default/body.tex new file mode 100644 index 00000000000..597c1b8a902 --- /dev/null +++ b/templates/facture/default/body.tex @@ -0,0 +1,15 @@ +% +% body +% +% $Id$ +% $Source$ +% +\multicolumn{1}{|c|}{#REF#} & + +#LABEL# +& +\multicolumn{1}{|c|}{#QTY#} & +\multicolumn{1}{|r|}{#PU#} & +\multicolumn{1}{|r|}{#PRICE#} \\ +\hline + diff --git a/templates/facture/default/footer.tex b/templates/facture/default/footer.tex new file mode 100644 index 00000000000..044faf5b40c --- /dev/null +++ b/templates/facture/default/footer.tex @@ -0,0 +1,74 @@ +% +% footer.tex +% $Id$ +% + +\multicolumn{2}{r}{} & \multicolumn{2}{r}{Remise H.T.} & \multicolumn{1}{r}{#REMISEHT#} \\ + +\multicolumn{2}{r}{} & \multicolumn{2}{r}{Total H.T.} & \multicolumn{1}{r}{#TOTALHT#} \\ + + + +\multicolumn{2}{r}{} & \multicolumn{2}{r}{TVA à 19.60\%} & \multicolumn{1}{r}{#TVA#} \\ + +%\cline{3-5} +\hhline{~~===} +\multicolumn{2}{r}{} & \multicolumn{2}{r}{{\large \textbf{Total en euros}}} & \multicolumn{1}{r}{{\large \textbf{#TOTALTTC#}}} \\ +\cline{3-5} +%\cline{3-5} + +\multicolumn{2}{r}{} & \multicolumn{2}{r}{{\large Soit en Francs}} & \multicolumn{1}{r}{{\large #FRANCS#}} \\ + + + +\end{tabular} + +\end{flushright} + + + +\begin{flushleft} +\noindent + +Conditions de r\'eglement : \`a r\'eception de facture + +Cette facture est relative \`a notre proposition commerciale : #NUMPROPALE# + + +\end{flushleft} + + +\begin{flushright} +\begin{tabular}{llll} +\\ +\cline{2-2} + +& Paris, le #DATE# \\ +\\ +\\ +\\ +\\ +\end{tabular} +\end{flushright} + +\begin{flushleft} +\noindent + +Si vous souhaitez payer cette facture par virement, merci de +prendre connaissance de nos coordonn\'ees bancaire : +\end{flushleft} + + +\begin{tabular}{llll} +Banque & Agence & Num\'ero de compte & Cl\'e \\ +\textsf{30003} & \textsf{03590} & \textsf{00020812156} & \textsf{38} \\ +\end{tabular} + +\begin{tabular}{ll} +IBAN :& \textsf{FR76 30003 03590 00020812156 38} \\ +\end{tabular} + +\begin{tabular}{ll} +BIC-ADRESSE SWIFT : & \textsf{SOGEFRPP} \\ +\end{tabular} +\end{document} diff --git a/templates/facture/default/header.tex b/templates/facture/default/header.tex new file mode 100644 index 00000000000..4d8e85ad9f5 --- /dev/null +++ b/templates/facture/default/header.tex @@ -0,0 +1,105 @@ +% +% header.tex +% $Id$ +% $Source$ +% +\documentclass[a4paper]{article} +\usepackage{fancyhdr} +\usepackage{layout, hhline} +% +\usepackage[T1]{fontenc} +\usepackage[french]{babel} +% +\newcommand{\aquatre}{ + \setlength{\oddsidemargin}{0pt} + \setlength{\evensidemargin}{0.5cm} + + \setlength{\textwidth}{480pt} + + \setlength{\topmargin}{0pt} + \setlength{\textheight}{22cm} + + \setlength{\headheight}{80pt} + + \setlength{\headsep}{15pt} + \setlength{\parindent}{1cm} + \setlength{\parskip}{0.2cm} + + \setlength{\marginparwidth}{0pt} + \setlength{\marginparsep}{0pt} +} +% Definitions des commandes +% +\cfoot{} +% +% Debut du document +% +\aquatre + +%\lhead{\begin{tabular}{|p{9cm}p{6cm}}\textsf{{\LARGE Lolix SA}} +%&\\\textsf{8, rue de Valois} & \textsf{T\'el : +33 1 40 15 03 18} +%\\\textsf{75001 Paris} & \textsf{Fax : +33 1 40 15 06 18} +%\\\textsf{SIREN : 432073666} &\\\end{tabular}} + +\lhead{\textsf{{\LARGE Lolix SA}}\\\textsf{8, rue de Valois} \\\textsf{75001 Paris}} +\chead{\textsf{T\'el : +33 1 40 15 03 18} \\ \textsf{Fax : +33 1 40 15 06 18} } + +\lfoot{\textsf{Lolix SA 8, rue de Valois 75001 Paris SIREN : 432 073 666}} + +\renewcommand{\headrulewidth}{1.0pt} +\pagestyle{fancy} +% +% Redefinition des font en type 1 (voir page 218) +% +\renewcommand{\sfdefault}{phv} +\renewcommand{\rmdefault}{ptm} +\renewcommand{\ttdefault}{pcr} +% +% +% +\begin{document} +%\layout +\begin{flushright} +\begin{tabular}{p{220pt}|p{220pt}|} +\hhline{~-} +Lolix SA & \\ +R.C.S. : \textsf{Paris B 432 073 666} & \textsf{\Large #SOCIETE#} \\ +TVA : \textsf{FR19432073666} & {\large #ADDRESS#} \\ + & {\large #VILLE#} \\ +& \\ +\hhline{~-} +\end{tabular} +\end{flushright} + +\begin{center} +\begin{tabular}{c} +\\ +\\ +\textsf{\textbf{\LARGE FACTURE}} +\\ +\\ +\end{tabular} +\end{center} + +\begin{flushleft} + +\begin{tabular}{p{9cm}p{6cm}} +\\ +{\Large Facture num\'ero : \textbf{\textsf{#NUMFACTURE#}}} \\ +\end{tabular} + +\end{flushleft} + +\large{} + +\begin{flushright} + +\begin{tabular}{|p{3cm}|p{9cm}|p{2cm}|p{2cm}|p{2cm}|} +\hline +\multicolumn{1}{|c|}{\textbf{R\'ef}} & +\multicolumn{1}{|c|}{\textbf{D\'esignation}} & +\multicolumn{1}{|c|}{\textbf{Qt\'e}} & +\multicolumn{1}{|r|}{\textbf{P.U.}} & +\multicolumn{1}{|r|}{\textbf{Total}} \\ +\hline + diff --git a/templates/propal/default/footer.tex b/templates/propal/default/footer.tex index 450a153cd0d..19d3c1fa3e8 100644 --- a/templates/propal/default/footer.tex +++ b/templates/propal/default/footer.tex @@ -43,7 +43,7 @@ Cette proposition a une dur\'ee de validit\'e de 15 jours \`a compter de la date \\ \cline{2-2} \cline{4-4} - & Paris, le #DATE# & & Rodolphe Qui\'edeville \\ + & Paris, le #DATE# & & le responsable commercial \\ \end{tabular} \end{flushright} \end{document}