Revision 34d2f9da
Von Werner Hahn vor fast 3 Jahren hinzugefügt
SL/Controller/MassInvoiceCreatePrint.pm | ||
---|---|---|
83 | 83 |
$::form->error($db->error); |
84 | 84 |
} |
85 | 85 |
|
86 |
foreach my $invoice( @invoices ) { |
|
87 |
# update shop status |
|
88 |
my @linked_shop_orders = $invoice->linked_records( |
|
89 |
from => 'ShopOrder', |
|
90 |
via => [ 'DeliveryOrder', 'Order' ], |
|
91 |
); |
|
92 |
#if (scalar @linked_shop_orders[0][0] >= 1){ |
|
93 |
#do update |
|
94 |
my $shop_order = $linked_shop_orders[0][0]; |
|
95 |
if ($shop_order){ |
|
96 |
require SL::Shop; |
|
97 |
my $shop_config = SL::DB::Manager::Shop->get_first( query => [ id => $shop_order->shop_id ] ); |
|
98 |
my $shop = SL::Shop->new( config => $shop_config ); |
|
99 |
$shop->connector->set_orderstatus($shop_order->shop_trans_id, "completed"); |
|
100 |
} |
|
101 |
} |
|
102 |
|
|
86 | 103 |
my $key = sprintf('%d-%d', Time::HiRes::gettimeofday()); |
87 | 104 |
$::auth->set_session_value("MassInvoiceCreatePrint::ids-${key}" => [ map { $_->id } @invoices ]); |
88 | 105 |
|
Auch abrufbar als: Unified diff
MassRecordCreationAndPrinting: Shopstatus setzen