# - 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
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);
"bindescription" => "b.description",
"binid" => "b.id",
"chargenumber" => "i.chargenumber",
+ "ean" => "p.ean",
"chargeid" => "c.id",
"warehousedescription" => "w.description",
"partunit" => "p.unit",
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));