From dc83feb1ebefe50e443a351a7d158517bc23d526 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Sun, 26 Apr 2015 17:59:11 +0200 Subject: [PATCH] =?utf8?q?Wechsel=20eines=20Kunden-/Lieferanten=20mit=20Ty?= =?utf8?q?p=20zu=20einem=20ohne=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … beim Bestimmen des Rabatts abfangen. --- SL/PriceSource/Business.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SL/PriceSource/Business.pm b/SL/PriceSource/Business.pm index ca66c5dba..fc7b298fc 100644 --- a/SL/PriceSource/Business.pm +++ b/SL/PriceSource/Business.pm @@ -50,13 +50,14 @@ sub price_from_source { ) } - if ($business->id != $self->customer_vendor->business->id) { + if (!$self->customer_vendor->business || + $business->id != $self->customer_vendor->business->id) { return SL::PriceSource::Discount->new( discount => $business->discount, spec => $business->id, description => t8('Business Discount'), price_source => $self, - invalid => t8('This discount is only valid for business #1', $business->full_description), + invalid => t8('This discount is only valid for business #1', $business->displayable_name), ) } -- 2.20.1