use SL::DB::MetaSetup::Department;
use SL::DB::Manager::Department;
-use SL::DB::DptTrans;
-
__PACKAGE__->meta->initialize;
sub validate {
sub is_used {
my ($self) = @_;
+ # Since the removal of table dpt_trans no check is required here anymore.
return undef if !$self->id;
- my $is_used = SL::DB::Manager::DptTrans->find_by(department_id => $self->id);
- return !!$is_used;
+ return 0;
}
1;
+++ /dev/null
-# This file has been auto-generated only because it didn't exist.
-# Feel free to modify it at will; it will not be overwritten automatically.
-
-package SL::DB::DptTrans;
-
-use strict;
-
-use SL::DB::MetaSetup::DptTrans;
-
-__PACKAGE__->meta->initialize;
-
-# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
-__PACKAGE__->meta->make_manager_class;
-
-1;
use SL::DB::DeliveryOrderItem;
use SL::DB::DeliveryOrderItemsStock;
use SL::DB::Department;
-use SL::DB::DptTrans;
use SL::DB::Draft;
use SL::DB::Dunning;
use SL::DB::DunningConfig;
use SL::DB::TodoUserConfig;
use SL::DB::TransferType;
use SL::DB::Translation;
-use SL::DB::TranslationPaymentTerm;
use SL::DB::Unit;
use SL::DB::UnitsLanguage;
use SL::DB::VC;
+++ /dev/null
-# This file has been auto-generated only because it didn't exist.
-# Feel free to modify it at will; it will not be overwritten automatically.
-
-package SL::DB::TranslationPaymentTerm;
-
-use strict;
-
-use SL::DB::MetaSetup::TranslationPaymentTerm;
-
-__PACKAGE__->meta->initialize;
-
-# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
-__PACKAGE__->meta->make_manager_class;
-
-1;