From: Bernd Bleßmann Date: Mon, 7 Sep 2015 13:13:09 +0000 (+0200) Subject: Auftrags-Controller: customer/vendor als Methode in einer Variablen ablegen X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4ed180439c8b16ea44a02fd13b25668094778456;p=kivitendo-erp.git Auftrags-Controller: customer/vendor als Methode in einer Variablen ablegen --- 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;