Revision 2a515370
Von Moritz Bunkus vor mehr als 8 Jahren hinzugefügt
SL/BackgroundJob/CreatePeriodicInvoices.pm | ||
---|---|---|
213 | 213 |
|
214 | 214 |
$invoice->post(ar_id => $config->ar_chart_id) || die; |
215 | 215 |
|
216 |
# like $form->add_shipto, but we don't need to check for a manual exception, |
|
217 |
# because we can already assume this (otherwise no shipto_id from order) |
|
218 |
if ($order->shipto_id) { |
|
219 |
|
|
220 |
my $shipto_oe = SL::DB::Manager::Shipto->find_by(shipto_id => $order->shipto_id); |
|
221 |
my $shipto_ar = $shipto_oe->clone_and_reset; |
|
222 |
|
|
223 |
$shipto_ar->module('AR'); # alter module OE -> AR |
|
224 |
$shipto_ar->trans_id($invoice->id); # alter trans_id -> new id from invoice |
|
225 |
$shipto_ar->save; |
|
226 |
} |
|
227 |
|
|
228 | 216 |
$order->link_to_record($invoice); |
229 | 217 |
|
230 | 218 |
foreach my $item (@{ $invoice->items }) { |
SL/DB/Shipto.pm | ||
---|---|---|
4 | 4 |
|
5 | 5 |
use SL::DB::MetaSetup::Shipto; |
6 | 6 |
use SL::DB::Manager::Shipto; |
7 |
use Rose::DB::Object::Helpers qw(clone_and_reset clone); |
|
8 | 7 |
|
9 | 8 |
our @SHIPTO_VARIABLES = qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptogln shiptocontact |
10 | 9 |
shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2); |
Auch abrufbar als: Unified diff
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.