Improve LaTeX code and add corridor number for all items
authorJoey Schulze <joey@infodrom.org>
Thu, 14 Mar 2013 13:42:51 +0000 (14:42 +0100)
committerJoey Schulze <joey@infodrom.org>
Thu, 14 Mar 2013 13:43:34 +0000 (14:43 +0100)
ordersatz.tex
utils.php

index a07cd48..9790a0b 100644 (file)
@@ -35,8 +35,8 @@
 
 \renewcommand{\headtoname}[0]{Kundenordersatz (\reise)}
 
-\newcommand{\order}[4]{%
-#2 & #3 & #4 & #1\\ \hline
+\newcommand{\order}[5]{%
+#2 & #3 & #5 & #4 & #1\\ \hline
 }
 
 
@@ -67,13 +67,13 @@ Bitte die Waren noch nicht durch die Kasse ziehen.
 
 \tablefirsthead{%
 \hline
-\textbf{ArtNr} & \textbf{Artikelbezeichnung} & \textbf{VPE}  & \textbf{Menge}\\
+\textbf{ArtNr} & \textbf{Artikelbezeichnung} & \textbf{Gang} & \textbf{VPE}  & \textbf{Anz.}\\
 \hline
 }
 
 \tablehead{%
 \hline
-\textbf{ArtNr} & \textbf{Artikelbezeichnung} & \textbf{VPE}  & \textbf{Menge}\\
+\textbf{ArtNr} & \textbf{Artikelbezeichnung} & \textbf{Gang} & \textbf{VPE}  & \textbf{Anz.}\\
 \hline
 }
 
@@ -81,7 +81,7 @@ Bitte die Waren noch nicht durch die Kasse ziehen.
 \hline
 }
 
-\begin{supertabular}{|l|p{11.8cm}|r|r|}
+\begin{supertabular}{|l|p{11.8cm}|c|c|r|}
 \input ordersatz_items
 
 \end{supertabular}
index a56b1db..016f15b 100644 (file)
--- a/utils.php
+++ b/utils.php
@@ -164,12 +164,13 @@ function ordersatz_write($id, $dir, $send)
     if (strlen($row['hinweis']))
       $bez .= sprintf("\\newline\\textbf{%s}", latex_encode($row['hinweis']));
 
-    fwrite($f, sprintf('\order{%d}{%s}{%s %s}{%s}'."\n",
+    fwrite($f, sprintf('\order{%d}{%s}{%s %s}{%s}{%s}'."\n",
                       $row['anzahl'],
                       $row['artnr'] ? (int)$row['artnr'] : '',
                       latex_encode($row['menge']),
                       $bez,
-                      latex_encode($row['vpname'])));
+                      latex_encode($row['vpname']),
+                      latex_encode($row['gang'])));
   }
 
   fclose($f);
@@ -214,4 +215,4 @@ function ordersatz_write($id, $dir, $send)
   return true;
 }
 
-?>
\ No newline at end of file
+?>