X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FPriceRuleItem.pm;h=3fc39dfb8ce541224f3cb2918c02cfc1505a349c;hb=cff0e9be7e6925c22dab7cb0b52ab9e23af0d56a;hp=35620554c1152bb9ba96fccf99dc58b2be717101;hpb=3f5c7866bc6ee20f028afa3862de2e14745bf795;p=kivitendo-erp.git diff --git a/SL/DB/PriceRuleItem.pm b/SL/DB/PriceRuleItem.pm index 35620554c..3fc39dfb8 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; } } @@ -111,11 +111,13 @@ sub full_description { : $type eq 'business' ? t8('Type of Business') . ' ' . $self->business->displayable_name : $type eq 'partsgroup' ? t8('Group') . ' ' . $self->partsgroup->displayable_name : $type eq 'pricegroup' ? t8('Pricegroup') . ' ' . $self->pricegroup->displayable_name - : $type eq 'part' ? t8('Part') . ' ' . $self->part->long_description + : $type eq 'part' ? t8('Part') . ' ' . $self->part->displayable_name : $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)