projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
spellcheck für substract
[kivitendo-erp.git]
/
SL
/
PriceSource
/
Customer.pm
diff --git
a/SL/PriceSource/Customer.pm
b/SL/PriceSource/Customer.pm
index
52d35ee
..
fe67d91
100644
(file)
--- a/
SL/PriceSource/Customer.pm
+++ b/
SL/PriceSource/Customer.pm
@@
-29,7
+29,9
@@
sub available_discounts {
);
}
);
}
-sub price_from_source {
+sub price_from_source { }
+
+sub discount_from_source {
my ($self, $source, $spec) = @_;
my $customer = SL::DB::Customer->load_cached($spec);
my ($self, $source, $spec) = @_;
my $customer = SL::DB::Customer->load_cached($spec);
@@
-41,7
+43,7
@@
sub price_from_source {
)
}
)
}
- if (!$self->record->customer) {
+ if (!$self->record->c
an('customer') || !$self->record->c
ustomer) {
return SL::PriceSource::Discount->new(
discount => $customer->discount,
spec => $customer->id,
return SL::PriceSource::Discount->new(
discount => $customer->discount,
spec => $customer->id,
@@
-57,7
+59,7
@@
sub price_from_source {
spec => $customer->id,
description => t8('Customer Discount'),
price_source => $self,
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
),
)
}
)
}