X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/67f06c1e8f18a54acb36e452f00da9cee8223a43..77061a7b4a39fe5fedbc1186bf9f048e78627cde:/SL/PriceSource.pm diff --git a/SL/PriceSource.pm b/SL/PriceSource.pm index ac419a670..89dffba89 100644 --- a/SL/PriceSource.pm +++ b/SL/PriceSource.pm @@ -40,11 +40,11 @@ sub available_discounts { } sub best_price { - min_by { $_->price } grep { $_->price > 0 } grep { $_ } map { $_->best_price } $_[0]->all_price_sources; + min_by { $_->price } max_by { $_->priority } grep { $_->price > 0 } grep { $_ } map { $_->best_price } $_[0]->all_price_sources; } sub best_discount { - max_by { $_->discount } grep { $_->discount } grep { $_ } map { $_->best_discount } $_[0]->all_price_sources; + max_by { $_->discount } max_by { $_->priority } grep { $_->discount } grep { $_ } map { $_->best_discount } $_[0]->all_price_sources; } sub empty_price {