Revision 78df36d1
Von Sven Schöling vor etwa 10 Jahren hinzugefügt
SL/DB/PriceRuleItem.pm | ||
---|---|---|
37 | 37 |
sub match_partsgroup { |
38 | 38 |
$_[0]->value_int == $_[1]{record_item}->parts->partsgroup_id; |
39 | 39 |
} |
40 |
sub match_part { |
|
41 |
$_[0]->value_int == $_[1]{record_item}->parts_id; |
|
42 |
} |
|
40 | 43 |
sub match_qty { |
41 | 44 |
if ($_[0]->op eq 'eq') { |
42 | 45 |
return $_[0]->value_num == $_[1]{record_item}->qty |
... | ... | |
59 | 62 |
$_[0]->value_int == $_[1]{record_item}->customervendor->pricegroup_id; |
60 | 63 |
} |
61 | 64 |
|
65 |
sub part { |
|
66 |
require SL::DB::Part; |
|
67 |
SL::DB::Part->load_cached($_[0]->value_int); |
|
68 |
} |
|
62 | 69 |
sub customer { |
63 | 70 |
require SL::DB::Customer; |
64 | 71 |
SL::DB::Customer->load_cached($_[0]->value_int); |
... | ... | |
95 | 102 |
: $type eq 'business' ? t8('Type of Business') . ' ' . $self->business->displayable_name |
96 | 103 |
: $type eq 'partsgroup' ? t8('Group') . ' ' . $self->partsgroup->displayable_name |
97 | 104 |
: $type eq 'pricegroup' ? t8('Pricegroup') . ' ' . $self->pricegroup->displayable_name |
105 |
: $type eq 'part' ? t8('Part') . ' ' . $self->part->long_description |
|
98 | 106 |
: $type eq 'qty' ? ( |
99 | 107 |
$op eq 'eq' ? t8('Qty equals #1', $self->value_num_as_number) |
100 | 108 |
: $op eq 'lt' ? t8('Qty less than #1', $self->value_num_as_number) |
Auch abrufbar als: Unified diff
PriceRule: Filter nach Ware implementiert