Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 247ff327

Von Sven Schöling vor mehr als 9 Jahren hinzugefügt

  • ID 247ff32761c458cf04d46a40fbf3161b2c5d57e5
  • Vorgänger 78df36d1
  • Nachfolger 19586862

PriceRule: bessere Validierung und Lokalisierung

Unterschiede anzeigen:

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