commit 8cd9ac14ce51d5df52538f34032a4b90dbd60427
Author: Werner Hahn <wh@futureworldsearch.net>
Date:   Wed Mar 22 16:49:08 2023 +0100

    Fix #580 Umlagern

diff --git a/SL/WH.pm b/SL/WH.pm
index 5d79c1d31..01c7e8b2d 100644
--- a/SL/WH.pm
+++ b/SL/WH.pm
@@ -269,7 +269,7 @@ sub get_warehouse_journal {
 
   # if of a property number or description is requested,
   # automatically check the matching id too.
-  map { $form->{"l_${_}id"} = "Y" if ($form->{"l_${_}description"} || $form->{"l_${_}number"}); } qw(warehouse bin);
+  map { $form->{"l_${_}id"} = "Y" if ($form->{"l_${_}"} || $form->{"l_${_}number"}); } qw(warehouse bin);
 
   # customize shown entry for not available fields.
   $filter{na} = '-' unless $filter{na};
@@ -319,32 +319,32 @@ sub get_warehouse_journal {
   }
 
   $select_tokens{'trans'} = {
-     "parts_id"             => "i1.parts_id",
-     "qty"                  => "ABS(SUM(i1.qty))",
-     "partnumber"           => "p.partnumber",
-     "partdescription"      => "p.description",
-     "classification_id"    => "p.classification_id",
-     "part_type"            => "p.part_type",
-     "bindescription"       => "b.description",
-     "chargenumber"         => "i1.chargenumber",
-     "bestbefore"           => "i1.bestbefore",
-     "warehousedescription" => "w.description",
-     "partunit"             => "p.unit",
-     "bin_from"             => "b1.description",
-     "bin_to"               => "b2.description",
-     "warehouse_from"       => "w1.description",
-     "warehouse_to"         => "w2.description",
-     "comment"              => "i1.comment",
-     "trans_type"           => "tt.description",
-     "trans_id"             => "i1.trans_id",
-     "id"                   => "i1.id",
-     "oe_id"                => "COALESCE(i1.oe_id, i2.oe_id)",
-     "invoice_id"           => "COALESCE(i1.invoice_id, i2.invoice_id)",
-     "date"                 => "i1.shippingdate",
-     "itime"                => "i1.itime",
-     "shippingdate"         => "i1.shippingdate",
-     "employee"             => "e.name",
-     "projectnumber"        => "COALESCE(pr.projectnumber, '$filter{na}')",
+     "parts_id"          => "i1.parts_id",
+     "qty"               => "ABS(SUM(i1.qty))",
+     "partnumber"        => "p.partnumber",
+     "partdescription"   => "p.description",
+     "classification_id" => "p.classification_id",
+     "part_type"         => "p.part_type",
+     "bin"               => "b.description",
+     "chargenumber"      => "i1.chargenumber",
+     "bestbefore"        => "i1.bestbefore",
+     "warehouse"         => "w.description",
+     "partunit"          => "p.unit",
+     "bin_from"          => "b1.description",
+     "bin_to"            => "b2.description",
+     "warehouse_from"    => "w1.description",
+     "warehouse_to"      => "w2.description",
+     "comment"           => "i1.comment",
+     "trans_type"        => "tt.description",
+     "trans_id"          => "i1.trans_id",
+     "id"                => "i1.id",
+     "oe_id"             => "COALESCE(i1.oe_id, i2.oe_id)",
+     "invoice_id"        => "COALESCE(i1.invoice_id, i2.invoice_id)",
+     "date"              => "i1.shippingdate",
+     "itime"             => "i1.itime",
+     "shippingdate"      => "i1.shippingdate",
+     "employee"          => "e.name",
+     "projectnumber"     => "COALESCE(pr.projectnumber, '$filter{na}')",
      };
 
   $select_tokens{'out'} = {
@@ -597,7 +597,7 @@ sub get_warehouse_report {
 
   # if of a property number or description is requested,
   # automatically check the matching id too.
-  map { $form->{"l_${_}id"} = "Y" if ($form->{"l_${_}description"} || $form->{"l_${_}number"}); } qw(warehouse bin);
+  map { $form->{"l_${_}id"} = "Y" if ($form->{"l_${_}"} || $form->{"l_${_}number"}); } qw(warehouse bin);
 
   # make order, search in $filter and $form
   my $sort_col    =  $form->{sort};
diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl
index 79e879f7f..7feecd61e 100644
--- a/bin/mozilla/wh.pl
+++ b/bin/mozilla/wh.pl
@@ -239,7 +239,7 @@ sub transfer_parts {
 
   $form->show_generic_error($locale->text("The source warehouse does not contain any bins.")) if (0 == scalar @{ $warehouse->{BINS} });
 
-  map { $form->{"l_$_"} = 'Y' } qw(parts_id qty warehouseid binid partnumber partdescription bindescription chargenumber bestbefore partunit);
+  map { $form->{"l_$_"} = 'Y' } qw(parts_id qty warehouseid binid partnumber partdescription bin chargenumber bestbefore partunit);
 
   $form->{sort} = 'bindescription';
   my @contents  = WH->get_warehouse_report("warehouse_id" => $form->{warehouse_id});
diff --git a/templates/design40_webpages/wh/transfer_parts_selection.html b/templates/design40_webpages/wh/transfer_parts_selection.html
index 4cb4e1eb8..7fa4e7810 100644
--- a/templates/design40_webpages/wh/transfer_parts_selection.html
+++ b/templates/design40_webpages/wh/transfer_parts_selection.html
@@ -95,7 +95,7 @@
             <input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]">
           [% END %]
           <input type="hidden" name="ean_[% loop.count %]" value="[% HTML.escape(row.ean) %]">
-          [% HTML.escape(row.bindescription) %]
+          [% HTML.escape(row.bin) %]
         </td>
         <td>[% HTML.escape(row.partnumber) %]</td>
         <td>[% HTML.escape(row.partdescription) %]</td>
diff --git a/templates/webpages/wh/transfer_parts_selection.html b/templates/webpages/wh/transfer_parts_selection.html
index 245da8b05..0e286f74c 100644
--- a/templates/webpages/wh/transfer_parts_selection.html
+++ b/templates/webpages/wh/transfer_parts_selection.html
@@ -89,7 +89,7 @@
      <input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]">
      [% END %]
      <input type="hidden" name="ean_[% loop.count %]" value="[% HTML.escape(row.ean) %]">
-     <td>[% HTML.escape(row.bindescription) %]</td>
+     <td>[% HTML.escape(row.bin) %]</td>
      <td>[% HTML.escape(row.partnumber) %]</td>
      <td>[% HTML.escape(row.partdescription) %]</td>
      <td>[% HTML.escape(row.chargenumber) %]</td>
