From 2a51537014d67c1f97a37b18548506f3e15549b5 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 6 Apr 2016 13:53:25 +0200 Subject: [PATCH] =?utf8?q?Revert=20"Bugfix=20zu=20manuelle=20Lieferadresse?= =?utf8?q?=20im=20Auftrag=20wird=20nicht=20in=20wiederkehrende=20Rechung?= =?utf8?q?=20=C3=BCbernommen"?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This reverts commit f46afb13bacfe1d838cb4a7a5b5b58e8145ff4b1. Wird durch einen folgenden Commit besser implementiert, nämlich direkt in der Umwandlungsroutine von Auftragsobjekten zu Rechnungsobjekten. --- SL/BackgroundJob/CreatePeriodicInvoices.pm | 12 ------------ SL/DB/Shipto.pm | 1 - 2 files changed, 13 deletions(-) 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); -- 2.20.1