X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/78df36d13721e785efbfcc6c17e400bb87cdc6e7..247ff32761c458cf04d46a40fbf3161b2c5d57e5:/SL/DB/PriceRule.pm diff --git a/SL/DB/PriceRule.pm b/SL/DB/PriceRule.pm index 23e314ab9..7dfd19703 100644 --- a/SL/DB/PriceRule.pm +++ b/SL/DB/PriceRule.pm @@ -75,8 +75,9 @@ sub validate { my ($self) = @_; my @errors; - push @errors, $::locale->text('The name must not be empty.') if !$self->name; - push @errors, $::locale->text('Price or discount must not be zero.') if !$self->price && !$self->discount; + push @errors, $::locale->text('The name must not be empty.') if !$self->name; + push @errors, $::locale->text('Price or discount must not be zero.') if !$self->price && !$self->discount; + push @errors, $::locale->text('Pirce rules must have at least one rule.') if !@{[ $self->items ]}; return @errors; }