From: Sven Schöling Date: Fri, 26 Sep 2014 13:38:23 +0000 (+0200) Subject: PriceSource: Nur den Namen des Moduls anzeigen, nicht den vollen Namen X-Git-Tag: release-3.2.0beta~160 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=cf63992efd6843a38de948fc509cdcc3bf51f1b6;p=kivitendo-erp.git PriceSource: Nur den Namen des Moduls anzeigen, nicht den vollen Namen --- diff --git a/SL/PriceSource/Price.pm b/SL/PriceSource/Price.pm index b753e0c6a..1e8f0a299 100644 --- a/SL/PriceSource/Price.pm +++ b/SL/PriceSource/Price.pm @@ -26,6 +26,14 @@ sub full_description { : $self->description } +sub source_description { + my ($self) = @_; + + $self->price_source + ? $self->price_source->description + : $self->description +} + sub to_str { "source: @{[ $_[0]->source ]}, price: @{[ $_[0]->price]}, description: @{[ $_[0]->description ]}" } diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 93d73949e..565b3c5fd 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -326,7 +326,7 @@ sub display_row { if ($form->{"id_${i}"} && !$is_delivery_order) { my $price_source = SL::PriceSource->new(record_item => $record_item, record => $record); my $price = $price_source->price_from_source($::form->{"active_price_source_$i"}); - $column_data{price_source} .= $cgi->button(-value => $price->full_description, -onClick => "kivi.io.price_chooser($i)"); + $column_data{price_source} .= $cgi->button(-value => $price->source_description, -onClick => "kivi.io.price_chooser($i)"); if ($price->source) { $column_data{price_source} .= ' ' . $cgi->img({src => 'image/flag-red.png', alt => $price->invalid, title => $price->invalid }) if $price->invalid; $column_data{price_source} .= ' ' . $cgi->img({src => 'image/flag-red.png', alt => $price->missing, title => $price->missing }) if $price->missing;