From: Moritz Bunkus Date: Thu, 6 Feb 2014 13:24:16 +0000 (+0100) Subject: SL::DB::DeliveryOrder: angepasste Lieferadressen richtig behandeln X-Git-Tag: release-3.2.0beta~491^2~21 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c6bdeb99569c8d9e27bb5fe2387c15c8949c4c71;p=kivitendo-erp.git SL::DB::DeliveryOrder: angepasste Lieferadressen richtig behandeln --- diff --git a/SL/DB/DeliveryOrder.pm b/SL/DB/DeliveryOrder.pm index 8409c2b91..cc4d930ee 100644 --- a/SL/DB/DeliveryOrder.pm +++ b/SL/DB/DeliveryOrder.pm @@ -106,9 +106,7 @@ sub new_from { # save it, too. my $custom_shipto; if (!$source->shipto_id && $source->id) { - require SL::DB::Shipto; - - my $old = SL::DB::Manager::Shipto->find_by(trans_id => $source->id); + my $old = $source->custom_shipto; if ($old) { $custom_shipto = SL::DB::Shipto->new( map { +($_ => $old->$_) } @@ -116,6 +114,7 @@ sub new_from { map { $_->name } @{ $old->meta->columns } ); + $custom_shipto->module('DO'); } } else {