Revision defc4fe6
Von Sven Schöling vor etwa 10 Jahren hinzugefügt
SL/DB/PriceRuleItem.pm | ||
---|---|---|
43 | 43 |
sub match_qty { |
44 | 44 |
if ($_[0]->op eq 'eq') { |
45 | 45 |
return $_[0]->value_num == $_[1]{record_item}->qty |
46 |
} elsif ($_[0]->op eq 'lt') {
|
|
46 |
} elsif ($_[0]->op eq 'le') {
|
|
47 | 47 |
return $_[0]->value_num < $_[1]{record_item}->qty; |
48 |
} elsif ($_[0]->op eq 'gt') {
|
|
48 |
} elsif ($_[0]->op eq 'ge') {
|
|
49 | 49 |
return $_[0]->value_num > $_[1]{record_item}->qty; |
50 | 50 |
} |
51 | 51 |
} |
... | ... | |
113 | 113 |
: $type eq 'pricegroup' ? t8('Pricegroup') . ' ' . $self->pricegroup->displayable_name |
114 | 114 |
: $type eq 'part' ? t8('Part') . ' ' . $self->part->long_description |
115 | 115 |
: $type eq 'qty' ? ( |
116 |
$op eq 'eq' ? t8('Qty equals #1', $self->value_num_as_number) |
|
117 |
: $op eq 'lt' ? t8('Qty less than #1', $self->value_num_as_number) |
|
118 |
: $op eq 'gt' ? t8('Qty more than #1', $self->value_num_as_number) |
|
116 |
$op eq 'eq' ? t8('Qty equals #1', $self->value_num_as_number) |
|
117 |
: $op eq 'lt' ? t8('Qty less than #1', $self->value_num_as_number) |
|
118 |
: $op eq 'gt' ? t8('Qty more than #1', $self->value_num_as_number) |
|
119 |
: $op eq 'le' ? t8('Qty equal or less than #1', $self->value_num_as_number) |
|
120 |
: $op eq 'ge' ? t8('Qty equal or more than #1', $self->value_num_as_number) |
|
119 | 121 |
: do { die "unknown op $op for type $type" } ) |
120 | 122 |
: $type eq 'reqdate' ? ( |
121 | 123 |
$op eq 'eq' ? t8('Reqdate is #1', $self->value_date_as_date) |
Auch abrufbar als: Unified diff
PriceRule: Anzeige von Menge ge/le ops korrigiert