Bug #199 - Kundenrabatt in Einkaufsrechnungspositionen
authorG. Richardson <information@kivitendo-premium.de>
Fri, 29 Jul 2016 13:14:51 +0000 (15:14 +0200)
committerG. Richardson <information@kivitendo-premium.de>
Fri, 29 Jul 2016 13:16:48 +0000 (15:16 +0200)
Behebt Fehler #199 (Redmine)

SL/PriceSource/Customer.pm

index 34f60a7..fe67d91 100644 (file)
@@ -43,7 +43,7 @@ sub discount_from_source {
     )
   }
 
-  if (!$self->record->customer) {
+  if (!$self->record->can('customer') || !$self->record->customer) {
     return SL::PriceSource::Discount->new(
       discount     => $customer->discount,
       spec         => $customer->id,