Revision 2656dbf7
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/DB/Department.pm | ||
---|---|---|
5 | 5 |
use SL::DB::MetaSetup::Department; |
6 | 6 |
use SL::DB::Manager::Department; |
7 | 7 |
|
8 |
use SL::DB::DptTrans; |
|
9 |
|
|
10 | 8 |
__PACKAGE__->meta->initialize; |
11 | 9 |
|
12 | 10 |
sub validate { |
... | ... | |
21 | 19 |
sub is_used { |
22 | 20 |
my ($self) = @_; |
23 | 21 |
|
22 |
# Since the removal of table dpt_trans no check is required here anymore. |
|
24 | 23 |
return undef if !$self->id; |
25 |
my $is_used = SL::DB::Manager::DptTrans->find_by(department_id => $self->id); |
|
26 |
return !!$is_used; |
|
24 |
return 0; |
|
27 | 25 |
} |
28 | 26 |
|
29 | 27 |
1; |
Auch abrufbar als: Unified diff
Nicht mehr benötigte Rose-Models löschen: DptTrans, TranslationPaymentTerm