From 370d43e2028e8a450055048f1354da48163d3954 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Mon, 8 Aug 2016 12:55:39 +0200 Subject: [PATCH] Order Controller - lastcost von Positionen mit speichern ansonsten ist die Margenberechnung im Verkaufsbericht falsch (lastcost ist immer 0). Siehe Ticket #201 --- SL/Controller/Order.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index f6a731a9f..8023aa2b9 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -783,6 +783,8 @@ sub _make_item { $item->assign_attributes(%$attr); $item->longdescription($item->part->notes) if $is_new && !defined $attr->{longdescription}; + # item fields that currently can't be set in in row but are needed: + $item->lastcost($item->part->lastcost); return $item; } -- 2.20.1