From: Moritz Bunkus Date: Fri, 30 Aug 2019 13:01:26 +0000 (+0200) Subject: WH: Warnungen wegen nicht initialisierten Werten vermeiden X-Git-Tag: release-3.5.6.1~499 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0c5a00661ce55499257c2f99d40e576d1427d2b1;p=kivitendo-erp.git WH: Warnungen wegen nicht initialisierten Werten vermeiden Durch Tests getriggert, konkret: durch t/wh/transfer.t --- diff --git a/SL/WH.pm b/SL/WH.pm index dacddcca2..f05ba4fd5 100644 --- 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", );