Revision 3f5c7866
Von Sven Schöling vor etwa 10 Jahren hinzugefügt
SL/DB/PriceRuleItem.pm | ||
---|---|---|
58 | 58 |
return $_[0]->value_date > $_[1]{record}->reqdate; |
59 | 59 |
} |
60 | 60 |
} |
61 |
sub match_transdate { |
|
62 |
if ($_[0]->op eq 'eq') { |
|
63 |
return $_[0]->value_date == $_[1]{record}->transdate; |
|
64 |
} elsif ($_[0]->op eq 'lt') { |
|
65 |
return $_[0]->value_date < $_[1]{record}->transdate; |
|
66 |
} elsif ($_[0]->op eq 'gt') { |
|
67 |
return $_[0]->value_date > $_[1]{record}->transdate; |
|
68 |
} |
|
69 |
} |
|
61 | 70 |
sub match_pricegroup { |
62 | 71 |
$_[0]->value_int == $_[1]{record_item}->customervendor->pricegroup_id; |
63 | 72 |
} |
... | ... | |
113 | 122 |
: $op eq 'lt' ? t8('Reqdate is before #1', $self->value_date_as_date) |
114 | 123 |
: $op eq 'gt' ? t8('Reqdate is after #1', $self->value_date_as_date) |
115 | 124 |
: do { die "unknown op $op for type $type" } ) |
125 |
: $type eq 'transdate' ? ( |
|
126 |
$op eq 'eq' ? t8('Transdate is #1', $self->value_date_as_date) |
|
127 |
: $op eq 'lt' ? t8('Transdate is before #1', $self->value_date_as_date) |
|
128 |
: $op eq 'gt' ? t8('Transdate is after #1', $self->value_date_as_date) |
|
129 |
: do { die "unknown op $op for type $type" } ) |
|
116 | 130 |
: do { die "unknown type $type" } |
117 | 131 |
} |
118 | 132 |
|
Auch abrufbar als: Unified diff
PriceRule: Belegdatum als Kriterium hinzugefügt