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; |
SL/DB/DptTrans.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 |
package SL::DB::DptTrans; |
|
5 |
|
|
6 |
use strict; |
|
7 |
|
|
8 |
use SL::DB::MetaSetup::DptTrans; |
|
9 |
|
|
10 |
__PACKAGE__->meta->initialize; |
|
11 |
|
|
12 |
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. |
|
13 |
__PACKAGE__->meta->make_manager_class; |
|
14 |
|
|
15 |
1; |
SL/DB/Helper/ALL.pm | ||
---|---|---|
36 | 36 |
use SL::DB::DeliveryOrderItem; |
37 | 37 |
use SL::DB::DeliveryOrderItemsStock; |
38 | 38 |
use SL::DB::Department; |
39 |
use SL::DB::DptTrans; |
|
40 | 39 |
use SL::DB::Draft; |
41 | 40 |
use SL::DB::Dunning; |
42 | 41 |
use SL::DB::DunningConfig; |
... | ... | |
82 | 81 |
use SL::DB::TodoUserConfig; |
83 | 82 |
use SL::DB::TransferType; |
84 | 83 |
use SL::DB::Translation; |
85 |
use SL::DB::TranslationPaymentTerm; |
|
86 | 84 |
use SL::DB::Unit; |
87 | 85 |
use SL::DB::UnitsLanguage; |
88 | 86 |
use SL::DB::VC; |
SL/DB/TranslationPaymentTerm.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 |
package SL::DB::TranslationPaymentTerm; |
|
5 |
|
|
6 |
use strict; |
|
7 |
|
|
8 |
use SL::DB::MetaSetup::TranslationPaymentTerm; |
|
9 |
|
|
10 |
__PACKAGE__->meta->initialize; |
|
11 |
|
|
12 |
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. |
|
13 |
__PACKAGE__->meta->make_manager_class; |
|
14 |
|
|
15 |
1; |
Auch abrufbar als: Unified diff
Nicht mehr benötigte Rose-Models löschen: DptTrans, TranslationPaymentTerm