Revision 75770330
Von Bernd Bleßmann vor etwa 2 Jahren hinzugefügt
SL/DB/OrderStatus.pm | ||
---|---|---|
8 | 8 |
use SL::DB::MetaSetup::OrderStatus; |
9 | 9 |
use SL::DB::Manager::OrderStatus; |
10 | 10 |
|
11 |
use SL::DB::Helper::ActsAsList; |
|
12 |
|
|
11 | 13 |
__PACKAGE__->meta->initialize; |
12 | 14 |
|
15 |
sub validate { |
|
16 |
my ($self) = @_; |
|
17 |
|
|
18 |
my @errors; |
|
19 |
push @errors, $::locale->text('The name is missing.') if !$self->name; |
|
20 |
|
|
21 |
my $not_unique_count = SL::DB::Manager::OrderStatus->get_all_count(where => ['!id' => $self->id, |
|
22 |
name => $self->name]); |
|
23 |
push @errors, $::locale->text('The name is not unique.') if $not_unique_count; |
|
24 |
|
|
25 |
return @errors; |
|
26 |
} |
|
27 |
|
|
13 | 28 |
1; |
Auch abrufbar als: Unified diff
Angebot/Auftrag Status: SimpleSystemSettings zum Anlegen und Verwalten