X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/89b2668811eac6023ad58322e2f9970ddb6a27c9..2ecfde54bd40a15f430010faa28ec81383e4eec6:/SL/PriceSource/Makemodel.pm diff --git a/SL/PriceSource/Makemodel.pm b/SL/PriceSource/Makemodel.pm index e1146a394..bda7b81ef 100644 --- a/SL/PriceSource/Makemodel.pm +++ b/SL/PriceSource/Makemodel.pm @@ -30,11 +30,17 @@ sub price_from_source { my $makemodel = SL::DB::Manager::MakeModel->find_by(id => $spec); - # TODO: if someone deletes the prices entry, this fails. add a fallback + return SL::PriceSource::Price->new( + price_source => $self, + missing => t8('This makemodel price does not exist anymore'), + ) if !$makemodel; + return $self->make_price_from_makemodel($makemodel); } +sub discount_from_source { } + sub best_price { my ($self, %params) = @_; @@ -57,5 +63,4 @@ sub make_price_from_makemodel { ); } - 1;