From 21ca8cb76721b756440cfe75fd8710bfe1caf31b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 4 May 2009 11:29:18 +0000 Subject: [PATCH] Erste Aenderung fuer die Umsetzung der Bugzilla Erweiterung 856 Warenbewegung im Lager per EAN suchbar machen - Anpassung fuer die Umlagermaske - Im anschliessenden Bericht wird die EAN nicht angezeigt --- SL/WH.pm | 6 ++++++ bin/mozilla/wh.pl | 3 ++- templates/webpages/wh/warehouse_selection_de.html | 4 ++++ templates/webpages/wh/warehouse_selection_master.html | 4 ++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/SL/WH.pm b/SL/WH.pm index b93eebdd6..70bf7db1f 100644 --- 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", diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index 8298a3cea..178de9f13 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -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)); diff --git a/templates/webpages/wh/warehouse_selection_de.html b/templates/webpages/wh/warehouse_selection_de.html index 9d1e414ee..d074742c3 100644 --- a/templates/webpages/wh/warehouse_selection_de.html +++ b/templates/webpages/wh/warehouse_selection_de.html @@ -115,6 +115,10 @@ Chargennummer + + EAN + +

diff --git a/templates/webpages/wh/warehouse_selection_master.html b/templates/webpages/wh/warehouse_selection_master.html index 465d80624..2f71a8c51 100644 --- a/templates/webpages/wh/warehouse_selection_master.html +++ b/templates/webpages/wh/warehouse_selection_master.html @@ -118,6 +118,10 @@ Charge number + + EAN + +

-- 2.20.1