From 4ed180439c8b16ea44a02fd13b25668094778456 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 7 Sep 2015 15:13:09 +0200 Subject: [PATCH] Auftrags-Controller: customer/vendor als Methode in einer Variablen ablegen --- SL/Controller/Order.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index 637df37b8..4dac30bda 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -140,7 +140,8 @@ sub action_add_item { $item->assign_attributes(%$form_attr); my $part = SL::DB::Part->new(id => $form_attr->{parts_id})->load; - my $cv_discount = $self->order->customer? $self->order->customer->discount : 0.0; + my $cv_method = $self->cv; + my $cv_discount = $self->order->$cv_method? $self->order->$cv_method->discount : 0.0; my %new_attr; $new_attr{part} = $part; -- 2.20.1