Revision 247ff327
Von Sven Schöling vor mehr als 9 Jahren hinzugefügt
SL/DB/PriceRule.pm | ||
---|---|---|
75 | 75 |
my ($self) = @_; |
76 | 76 |
|
77 | 77 |
my @errors; |
78 |
push @errors, $::locale->text('The name must not be empty.') if !$self->name; |
|
79 |
push @errors, $::locale->text('Price or discount must not be zero.') if !$self->price && !$self->discount; |
|
78 |
push @errors, $::locale->text('The name must not be empty.') if !$self->name; |
|
79 |
push @errors, $::locale->text('Price or discount must not be zero.') if !$self->price && !$self->discount; |
|
80 |
push @errors, $::locale->text('Pirce rules must have at least one rule.') if !@{[ $self->items ]}; |
|
80 | 81 |
|
81 | 82 |
return @errors; |
82 | 83 |
} |
Auch abrufbar als: Unified diff
PriceRule: bessere Validierung und Lokalisierung