Erste Aenderung fuer die Umsetzung der Bugzilla Erweiterung 856 Warenbewegung im...
authorJan Büren <information@richardson-bueren.de>
Mon, 4 May 2009 11:29:18 +0000 (11:29 +0000)
committerJan Büren <information@richardson-bueren.de>
Mon, 4 May 2009 11:29:18 +0000 (11:29 +0000)
SL/WH.pm
bin/mozilla/wh.pl
templates/webpages/wh/warehouse_selection_de.html
templates/webpages/wh/warehouse_selection_master.html

index b93eebd..70bf7db 100644 (file)
--- a/SL/WH.pm
+++ b/SL/WH.pm
@@ -438,6 +438,7 @@ sub get_warehouse_journal {
 #  - partsid      - will return matches with this parts_id only
 #  - description  - will return only matches where the given string is a substring of the description
 #  - chargenumber - will return only matches where the given string is a substring of the chargenumber
+#  - ean         - will return only matches where the given string is a substring of the ean as stored in the table parts (article)
 #  - charge_ids   - must be an arrayref. will return contents with these ids only
 #  - expires_in   - will only return matches that expire within the given number of days
 #                   will also add a column named 'has_expired' containing if the match has already expired or not
@@ -499,6 +500,10 @@ sub get_warehouse_report {
     push @filter_ary,  "i.chargenumber ILIKE ?";
     push @filter_vars, '%' . $filter{chargenumber} . '%';
   }
+  if ($filter{ean}) {
+    push @filter_ary,  "p.ean ILIKE ?";
+    push @filter_vars, '%' . $filter{ean} . '%';
+  }
 
   # prepare qty comparison for later filtering
   my ($f_qty_op, $f_qty, $f_qty_base_unit);
@@ -534,6 +539,7 @@ sub get_warehouse_report {
      "bindescription"       => "b.description",
      "binid"                => "b.id",
      "chargenumber"         => "i.chargenumber",
+     "ean"                 => "p.ean",
      "chargeid"             => "c.id",
      "warehousedescription" => "w.description",
      "partunit"             => "p.unit",
index 8298a3c..178de9f 100644 (file)
@@ -156,7 +156,8 @@ sub transfer_or_removal_prepare_contents {
   my @contents  = WH->get_warehouse_report("warehouse_id" => $form->{warehouse_id},
                                            "bin_id"       => $form->{bin_id},
                                            "chargenumber" => $form->{chargenumber},
-                                           "partnumber"   => $form->{partnumber},
+                                          "partnumber"   => $form->{partnumber},
+                                          "ean"          => $form->{ean},
                                            "description"  => $form->{description});
 
   $form->show_generic_error($locale->text("The selected warehouse is empty.")) if (0 == scalar(@contents));
index 9d1e414..d074742 100644 (file)
      <th align="right" nowrap>Chargennummer</th>
      <td><input name="chargenumber" size="30"></td>
     </tr>
+    <tr>
+     <th align="right" nowrap>EAN</th>
+     <td><input name="ean" size="30"></td>
+    </tr>
    </table>
   </p>
 
index 465d806..2f71a8c 100644 (file)
      <th align="right" nowrap><translate>Charge number</translate></th>
      <td><input name="chargenumber" size="30"></td>
     </tr>
+    <tr>
+     <th align="right" nowrap><translate>EAN</translate></th>
+     <td><input name="ean" size="30"></td>
+    </tr>
    </table>
   </p>