X-Git-Url: http://wagnertech.de/git?p=kivitendo-erp.git;a=blobdiff_plain;f=SL%2FPriceSource%2FCustomer.pm;fp=SL%2FPriceSource%2FCustomer.pm;h=fe67d9128835ec63ac23add5e64f81c0a4d76527;hp=c0cfbc09a86b083373545412b40c0a5f238bd7b1;hb=53593baa211863fbf66540cf1bcc36c8fb37257f;hpb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44 diff --git a/SL/PriceSource/Customer.pm b/SL/PriceSource/Customer.pm index c0cfbc09a..fe67d9128 100644 --- a/SL/PriceSource/Customer.pm +++ b/SL/PriceSource/Customer.pm @@ -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, @@ -59,7 +59,7 @@ sub discount_from_source { spec => $customer->id, description => t8('Customer Discount'), price_source => $self, - invalid => t8('This discount is only valid for customer #1', $customer->full_description), + invalid => t8('This discount is only valid for customer #1', $customer->displayable_name), ) }