Revision 8286b91c
Von Sven Schöling vor etwa 1 Jahr hinzugefügt
SL/DB/DeliveryOrder.pm | ||
---|---|---|
4 | 4 |
|
5 | 5 |
use Carp; |
6 | 6 |
|
7 |
use Rose::DB::Object::Helpers ();
|
|
7 |
use Rose::DB::Object::Helpers qw(as_tree strip);
|
|
8 | 8 |
|
9 | 9 |
use SL::DB::MetaSetup::DeliveryOrder; |
10 | 10 |
use SL::DB::Manager::DeliveryOrder; |
... | ... | |
16 | 16 |
use SL::DB::Helper::TransNumberGenerator; |
17 | 17 |
use SL::DB::Helper::RecordLink qw(RECORD_ID RECORD_TYPE_REF); |
18 | 18 |
|
19 |
use SL::DB::Part; |
|
20 |
use SL::DB::Unit; |
|
21 |
|
|
22 | 19 |
use SL::DB::DeliveryOrder::TypeData qw(:types); |
23 | 20 |
use SL::DB::Reclamation::TypeData qw(:types); |
24 | 21 |
|
25 | 22 |
use SL::Helper::Number qw(_format_total _round_total); |
26 | 23 |
|
27 |
use Rose::DB::Object::Helpers qw(as_tree strip); |
|
28 | 24 |
use List::Util qw(first); |
29 | 25 |
use List::MoreUtils qw(any pairwise); |
30 | 26 |
use Math::Round qw(nhimult); |
... | ... | |
267 | 263 |
|
268 | 264 |
sub new_from_time_recordings { |
269 | 265 |
my ($class, $sources, %params) = @_; |
266 |
require SL::DB::Part; |
|
267 |
require SL::DB::Unit; |
|
270 | 268 |
|
271 | 269 |
croak("Unsupported object type in sources") if any { ref($_) ne 'SL::DB::TimeRecording' } @$sources; |
272 | 270 |
croak("Cannot create delivery order from source records of different customers") if any { $_->customer_id != $sources->[0]->customer_id } @$sources; |
Auch abrufbar als: Unified diff
fix: kein use SL::DB in SL::DB