From defc4fe60bea14a5cc5fb2f3f5bc8b7f1dfd2657 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 7 Oct 2014 14:04:36 +0200 Subject: [PATCH] PriceRule: Anzeige von Menge ge/le ops korrigiert --- SL/DB/PriceRuleItem.pm | 12 +++++++----- locale/de/all | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/SL/DB/PriceRuleItem.pm b/SL/DB/PriceRuleItem.pm index 35620554c..131d46ae9 100644 --- a/SL/DB/PriceRuleItem.pm +++ b/SL/DB/PriceRuleItem.pm @@ -43,9 +43,9 @@ sub match_part { sub match_qty { if ($_[0]->op eq 'eq') { return $_[0]->value_num == $_[1]{record_item}->qty - } elsif ($_[0]->op eq 'lt') { + } elsif ($_[0]->op eq 'le') { return $_[0]->value_num < $_[1]{record_item}->qty; - } elsif ($_[0]->op eq 'gt') { + } elsif ($_[0]->op eq 'ge') { return $_[0]->value_num > $_[1]{record_item}->qty; } } @@ -113,9 +113,11 @@ sub full_description { : $type eq 'pricegroup' ? t8('Pricegroup') . ' ' . $self->pricegroup->displayable_name : $type eq 'part' ? t8('Part') . ' ' . $self->part->long_description : $type eq 'qty' ? ( - $op eq 'eq' ? t8('Qty equals #1', $self->value_num_as_number) - : $op eq 'lt' ? t8('Qty less than #1', $self->value_num_as_number) - : $op eq 'gt' ? t8('Qty more than #1', $self->value_num_as_number) + $op eq 'eq' ? t8('Qty equals #1', $self->value_num_as_number) + : $op eq 'lt' ? t8('Qty less than #1', $self->value_num_as_number) + : $op eq 'gt' ? t8('Qty more than #1', $self->value_num_as_number) + : $op eq 'le' ? t8('Qty equal or less than #1', $self->value_num_as_number) + : $op eq 'ge' ? t8('Qty equal or more than #1', $self->value_num_as_number) : do { die "unknown op $op for type $type" } ) : $type eq 'reqdate' ? ( $op eq 'eq' ? t8('Reqdate is #1', $self->value_date_as_date) diff --git a/locale/de/all b/locale/de/all index 2b937a0eb..dea431383 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1942,6 +1942,8 @@ $self->{texts} = { 'Purpose' => 'Verwendungszweck', 'Qty' => 'Menge', 'Qty according to delivery order' => 'Menge laut Lieferschein', + 'Qty equal or less than #1' => 'Menge gleich oder kleiner als #1', + 'Qty equal or more than #1' => 'Menge gleich oder größer als #1', 'Qty equals #1' => 'Menge ist #1', 'Qty in Selected Records' => 'Menge in gewählten Belegen', 'Qty in stock' => 'Lagerbestand', -- 2.20.1