BankTransaction: vergessene Textübersetzung bei Buchung erstellen
[kivitendo-erp.git] / SL / DB / Department.pm
1 package SL::DB::Department;
2
3 use strict;
4
5 use SL::DB::MetaSetup::Department;
6 use SL::DB::Manager::Department;
7
8 __PACKAGE__->meta->initialize;
9
10 sub validate {
11   my ($self) = @_;
12
13   my @errors;
14   push @errors, $::locale->text('The description is missing.') if !$self->description;
15
16   return @errors;
17 }
18
19 sub is_used {
20   my ($self) = @_;
21
22   # Since the removal of table dpt_trans no check is required here anymore.
23   return undef if !$self->id;
24   return 0;
25 }
26
27 1;