From 617ec2917a040505f8643e1e1824fc94a5507db2 Mon Sep 17 00:00:00 2001 From: Joey Schulze Date: Fri, 23 Mar 2012 21:32:59 +0100 Subject: [PATCH] Add note to articles if available --- artikel.php | 6 ++++++ utils.php | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/artikel.php b/artikel.php index e987852..ae3e870 100644 --- a/artikel.php +++ b/artikel.php @@ -210,6 +210,12 @@ $mask = array( 'size' => 21, 'required' => true, ), + 'hinweis' => array( + 'name' => 'Hinweis', + 'type' => 'text', + 'size' => 21, + 'null' => true, + ), 'hersteller' => array( 'name' => 'Hersteller', 'type' => 'text', diff --git a/utils.php b/utils.php index 3476ccf..694c1ee 100644 --- a/utils.php +++ b/utils.php @@ -126,7 +126,7 @@ function ordersatz_write($id, $dir, $send) fwrite($f, sprintf('\newcommand{\datum}{%d.%d.%d}'."\n", $d[2], $d[1], $d[0])); fclose($f); - $sql = sprintf("SELECT artnr,gang,metro_vpe.short AS vpname,menge,bezeichnung,hersteller,anzahl " . + $sql = sprintf("SELECT artnr,gang,metro_vpe.short AS vpname,menge,bezeichnung,hinweis,hersteller,anzahl " . "FROM metro_ordersatz_pos " . "JOIN metro_artikel ON artikel = metro_artikel.id " . "JOIN metro_abteilung ON abteilung = metro_abteilung.id " . @@ -146,6 +146,8 @@ function ordersatz_write($id, $dir, $send) $bez = $row['bezeichnung']; if (strlen($row['hersteller'])) $bez .= ' (' . $row['hersteller'] . ')'; + if (strlen($row['hinweis'])) + $bez .= sprintf("\\newline\\textbf{%s}", $row['hinweis']); fwrite($f, sprintf('\order{%d}{%s}{%s %s}{%s}'."\n", $row['anzahl'], -- 2.20.1