WH: Warnungen wegen nicht initialisierten Werten vermeiden
[kivitendo-erp.git] / SL / WH.pm
index dacddcc..f05ba4f 100644 (file)
--- a/SL/WH.pm
+++ b/SL/WH.pm
@@ -807,7 +807,7 @@ sub get_warehouse_report {
      "chargeid"             => "c.id",
      "warehousedescription" => "w.description",
      "partunit"             => "p.unit",
-     "stock_value"          => $form->{stock_value_basis} eq 'list_price' ? "p.listprice / COALESCE(pfac.factor, 1)" : "p.lastcost / COALESCE(pfac.factor, 1)",
+     "stock_value"          => ($form->{stock_value_basis} // '') eq 'list_price' ? "p.listprice / COALESCE(pfac.factor, 1)" : "p.lastcost / COALESCE(pfac.factor, 1)",
      "purchase_price"       => "p.lastcost",
      "list_price"           => "p.listprice",
   );