]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/PriceRule.pm
PriceRule: Regeldetails anzeigen
[mfinanz.git] / SL / DB / PriceRule.pm
index 7dfd197037f7d38688c8177f52c75cd0f0d7ec06..0a9f09d850123840602c1790d7893ad59b424875 100644 (file)
@@ -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;