]> wagnertech.de Git - mfinanz.git/blobdiff - SL/WH.pm
PTC: Steuer nach Lieferdatum oder Rechnungsdatum
[mfinanz.git] / SL / WH.pm
index 918607284edab0a4af3fe03fc57eff16946010f9..f05ba4fd5345e14fe94b7b9f164b9a8a673a5811 100644 (file)
--- a/SL/WH.pm
+++ b/SL/WH.pm
@@ -807,8 +807,9 @@ sub get_warehouse_report {
      "chargeid"             => "c.id",
      "warehousedescription" => "w.description",
      "partunit"             => "p.unit",
-     "stock_value"          => "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",
   );
   $form->{l_classification_id}  = 'Y';
   $form->{l_part_type}          = 'Y';