$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 }) {
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);