From 68be1335e2f0896f2d81939a896ad2e08343abda Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 7 Sep 2015 14:45:25 +0200 Subject: [PATCH] Auftrags-Controller: item-Methoden richtig nutzen, nicht als Hash-Elemente. --- SL/Controller/Order.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index b6cdef475..eff55ca07 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -144,11 +144,11 @@ sub action_add_item { my %new_attr; $new_attr{part} = $part; - $new_attr{description} = $part->description if ! $item->{description}; - $new_attr{qty} = 1.0 if ! $item->{qty}; + $new_attr{description} = $part->description if ! $item->description; + $new_attr{qty} = 1.0 if ! $item->qty; $new_attr{unit} = $part->unit; - $new_attr{sellprice} = $part->sellprice if ! $item->{sellprice}; - $new_attr{discount} = $cv_discount if ! $item->{discount}; + $new_attr{sellprice} = $part->sellprice if ! $item->sellprice; + $new_attr{discount} = $cv_discount if ! $item->discount; $item->assign_attributes(%new_attr); $item->id(join('_', 'new', Time::HiRes::gettimeofday(), int rand 1000000000000)) if !$item->id; -- 2.20.1