X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/247ff32761c458cf04d46a40fbf3161b2c5d57e5..5aa485a7c9e050dd112b3c53070a806fe72d2a0b:/SL/DB/PriceRule.pm diff --git a/SL/DB/PriceRule.pm b/SL/DB/PriceRule.pm index 7dfd19703..0a9f09d85 100644 --- a/SL/DB/PriceRule.pm +++ b/SL/DB/PriceRule.pm @@ -95,7 +95,7 @@ sub clone_and_reset_deep { sub full_description { my ($self) = @_; - my $items = join ', ', map { $_->full_description } $self->items; + my $items = $self->item_summary; my $price = $self->price_or_discount ? t8('Discount #1%', $self->discount_as_number) : t8('Price #1', $self->price_as_number); @@ -103,6 +103,10 @@ sub full_description { sprintf "%s: %s (%s)", $self->name, $price, $items; } +sub item_summary { + join ', ', map { $_->full_description } $_[0]->items; +} + sub in_use { my ($self) = @_; @@ -119,5 +123,12 @@ sub in_use { || SL::DB::Manager::InvoiceItem->get_all_count(query => [ active_price_source => $price_source_spec ]); } +sub priority_as_text { + my ($self) = @_; + + return t8('Override') if $self->priority == 4; + t8('Normal'); +} + 1;