Leave artnr field empty in output when it is uknown
authorJoey Schulze <joey@infodrom.org>
Mon, 23 Jan 2012 20:53:57 +0000 (21:53 +0100)
committerJoey Schulze <joey@infodrom.org>
Mon, 23 Jan 2012 20:53:57 +0000 (21:53 +0100)
utils.php

index f7c4729..6728aae 100644 (file)
--- a/utils.php
+++ b/utils.php
@@ -147,9 +147,9 @@ function ordersatz_write($id, $dir, $send)
     if (strlen($row['hersteller']))
       $bez .= ' (' . $row['hersteller'] . ')';
 
-    fwrite($f, sprintf('\order{%d}{%d}{%s %s}{%s}'."\n",
+    fwrite($f, sprintf('\order{%d}{%s}{%s %s}{%s}'."\n",
                       $row['anzahl'],
-                      $row['artnr'],
+                      $row['artnr'] ? (int)$row['artnr'] : '',
                       $row['menge'],
                       latex_encode($bez),
                       latex_encode($row['vpname'])));