projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
870dd5e
)
Auftrags-Controller: customer/vendor als Methode in einer Variablen ablegen
author
Bernd Bleßmann
<bernd@kivitendo-premium.de>
Mon, 7 Sep 2015 13:13:09 +0000
(15:13 +0200)
committer
G. Richardson
<information@kivitendo-premium.de>
Mon, 16 Nov 2015 15:15:57 +0000
(16:15 +0100)
SL/Controller/Order.pm
patch
|
blob
|
history
diff --git
a/SL/Controller/Order.pm
b/SL/Controller/Order.pm
index
637df37
..
4dac30b
100644
(file)
--- 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;