From: Sven Schöling Date: Thu, 20 Jun 2013 16:54:07 +0000 (+0200) Subject: In Helper kein use SL::DB::Object X-Git-Tag: release-3.1.0beta1~284 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=73d810a4ac3395dc6d8012a52b6c787dedf932b1;p=kivitendo-erp.git In Helper kein use SL::DB::Object --- diff --git a/SL/DB/Helper/TransNumberGenerator.pm b/SL/DB/Helper/TransNumberGenerator.pm index d790b3484..aa0265411 100644 --- a/SL/DB/Helper/TransNumberGenerator.pm +++ b/SL/DB/Helper/TransNumberGenerator.pm @@ -8,7 +8,6 @@ our @EXPORT = qw(get_next_trans_number create_trans_number); use Carp; use List::Util qw(max); -use SL::DB::Default; use SL::PrefixedNumber; sub oe_scoping { @@ -55,6 +54,7 @@ sub get_next_trans_number { my @numbers = map { $_->$number_column } @{ $self->_get_manager_class->get_all(%conditions) }; my %numbers_in_use = map { ( $_ => 1 ) } @numbers; + require SL::DB::Default; my $defaults = SL::DB::Default->get; $number_range_column = 'articlenumber' if $number_range_column eq 'assemblynumber' and length($defaults->$number_range_column) < 1; my $sequence = SL::PrefixedNumber->new(number => $defaults->$number_range_column);