From: Sven Schöling Date: Tue, 29 Jan 2019 10:14:37 +0000 (+0100) Subject: Order: Auftrag mit Items und Ware laden X-Git-Tag: release-3.5.4~133 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f03134bc436d7969247da0986809afc1567ae21b;p=kivitendo-erp.git Order: Auftrag mit Items und Ware laden Die werden überall gebraucht, also gleich mitladen (cherry picked from commit cb546c6e64e4b3315dcd8b826261939a89baa543) --- diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index 91cdebba6..52577bd1b 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -1208,7 +1208,7 @@ sub make_order { # be retrieved via items until the order is saved. Adding empty items to new # order here solves this problem. my $order; - $order = SL::DB::Manager::Order->find_by(id => $::form->{id}) if $::form->{id}; + $order = SL::DB::Order->new(id => $::form->{id})->load(with => [ 'orderitems', 'orderitems.part' ]) if $::form->{id}; $order ||= SL::DB::Order->new(orderitems => [], quotation => (any { $self->type eq $_ } (sales_quotation_type(), request_quotation_type())));