From 35ca31c0901ccfde86d6935d63f86ecc309b6807 Mon Sep 17 00:00:00 2001
From: Niclas Zimmermann <niclas@lx-office-hosting.de>
Date: Thu, 18 Oct 2012 12:26:28 +0200
Subject: [PATCH] Bemerkungen im Warenbericht

Im Warenbericht kann man jetzt auch Bemerkungen zu den einzelnen
Waren anzeigen lassen.
---
 SL/IC.pm                          | 4 ++--
 bin/mozilla/ic.pl                 | 3 ++-
 templates/webpages/ic/search.html | 7 +++++++
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/SL/IC.pm b/SL/IC.pm
index 8895bf888..0f4187094 100644
--- a/SL/IC.pm
+++ b/SL/IC.pm
@@ -793,7 +793,7 @@ sub all_parts {
   my @apoe_filters         = qw(transdate);
   my @like_filters         = (@simple_filters, @invoice_oi_filters);
   my @all_columns          = (@simple_filters, @makemodel_filters, @apoe_filters, @project_filters, qw(serialnumber));
-  my @simple_l_switches    = (@all_columns, qw(listprice sellprice lastcost priceupdate weight unit bin rop image));
+  my @simple_l_switches    = (@all_columns, qw(notes listprice sellprice lastcost priceupdate weight unit bin rop image));
   my @oe_flags             = qw(bought sold onorder ordered rfq quoted);
   my @qsooqr_flags         = qw(invnumber ordnumber quonumber trans_id name module qty);
   my @deliverydate_flags   = qw(deliverydate);
@@ -1094,7 +1094,7 @@ sub all_parts {
   if ($form->{searchitems} eq 'assembly' && $form->{bom}) {
     $query =
       qq|SELECT p.id, p.partnumber, p.description, a.qty AS onhand,
-           p.unit, p.bin,
+           p.unit, p.bin, p.notes,
            p.sellprice, p.listprice, p.lastcost,
            p.rop, p.weight, p.priceupdate,
            p.image, p.drawing, p.microfiche,
diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl
index 5edc385c2..2dc3366d6 100644
--- a/bin/mozilla/ic.pl
+++ b/bin/mozilla/ic.pl
@@ -1032,6 +1032,7 @@ sub generate_report {
     'bin'                => { 'text' => $locale->text('Bin'), },
     'deliverydate'       => { 'text' => $locale->text('deliverydate'), },
     'description'        => { 'text' => $locale->text('Part Description'), },
+    'notes'              => { 'text' => $locale->text('Notes'), },
     'drawing'            => { 'text' => $locale->text('Drawing'), },
     'ean'                => { 'text' => $locale->text('EAN'), },
     'image'              => { 'text' => $locale->text('Image'), },
@@ -1214,7 +1215,7 @@ sub generate_report {
   IC->all_parts(\%myconfig, \%$form);
 
   my @columns = qw(
-    partnumber description partsgroup bin onhand rop soldtotal unit listprice
+    partnumber description notes partsgroup bin onhand rop soldtotal unit listprice
     linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost
     priceupdate weight image drawing microfiche invnumber ordnumber quonumber
     transdate name serialnumber deliverydate ean projectnumber projectdescription
diff --git a/templates/webpages/ic/search.html b/templates/webpages/ic/search.html
index be2528c68..c00b22a9f 100644
--- a/templates/webpages/ic/search.html
+++ b/templates/webpages/ic/search.html
@@ -286,6 +286,13 @@
           </td>
          </tr>
 
+         <tr>
+          <td>
+           <input name="l_notes" id="l_notes" class="checkbox" type="checkbox" value="Y">
+           <label for="l_notes">[% 'Notes' | $T8 %]</label>
+          </td>
+         </tr>
+
          [% CUSTOM_VARIABLES_INCLUSION_CODE %]
         </table>
        </td>
-- 
2.20.1