From: Moritz Bunkus Date: Wed, 6 Apr 2016 11:53:25 +0000 (+0200) Subject: Revert "Bugfix zu manuelle Lieferadresse im Auftrag wird nicht in wiederkehrende... X-Git-Tag: release-3.4.1~248 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2a51537014d67c1f97a37b18548506f3e15549b5;p=kivitendo-erp.git Revert "Bugfix zu manuelle Lieferadresse im Auftrag wird nicht in wiederkehrende Rechung übernommen" This reverts commit f46afb13bacfe1d838cb4a7a5b5b58e8145ff4b1. Wird durch einen folgenden Commit besser implementiert, nämlich direkt in der Umwandlungsroutine von Auftragsobjekten zu Rechnungsobjekten. --- diff --git a/SL/BackgroundJob/CreatePeriodicInvoices.pm b/SL/BackgroundJob/CreatePeriodicInvoices.pm index 2df2a30ac..431225f9c 100644 --- a/SL/BackgroundJob/CreatePeriodicInvoices.pm +++ b/SL/BackgroundJob/CreatePeriodicInvoices.pm @@ -213,18 +213,6 @@ sub _create_periodic_invoice { $invoice->post(ar_id => $config->ar_chart_id) || die; - # like $form->add_shipto, but we don't need to check for a manual exception, - # because we can already assume this (otherwise no shipto_id from order) - if ($order->shipto_id) { - - my $shipto_oe = SL::DB::Manager::Shipto->find_by(shipto_id => $order->shipto_id); - my $shipto_ar = $shipto_oe->clone_and_reset; - - $shipto_ar->module('AR'); # alter module OE -> AR - $shipto_ar->trans_id($invoice->id); # alter trans_id -> new id from invoice - $shipto_ar->save; - } - $order->link_to_record($invoice); foreach my $item (@{ $invoice->items }) { diff --git a/SL/DB/Shipto.pm b/SL/DB/Shipto.pm index c83fceca9..3da07fb3b 100644 --- a/SL/DB/Shipto.pm +++ b/SL/DB/Shipto.pm @@ -4,7 +4,6 @@ use strict; use SL::DB::MetaSetup::Shipto; use SL::DB::Manager::Shipto; -use Rose::DB::Object::Helpers qw(clone_and_reset clone); our @SHIPTO_VARIABLES = qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptogln shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2);