X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/be8c4415c90cb11cbf45132b63482f420b41070b..ffb7da30ec503c647ae493ba8ffd48cc43fa44e7:/SL/WH.pm 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", );