fixed searching for article packets
This commit is contained in:
@@ -9,7 +9,7 @@ class WarehouseEShopOrderController extends TTCrud {
|
||||
['key' => 'status', 'text' => 'Status', 'required' => true],
|
||||
['key' => 'deliveryMode', 'text' => 'Liefermodus', 'required' => true, 'modal' => ['type' => 'select', 'items' => [
|
||||
['value' => 'singleAddress', 'text' => 'Einzelne Adresse'],
|
||||
// ['value' => 'multipleAddresses', 'text' => 'Mehrere Adressen'],
|
||||
// ['value' => 'multipleAddresses', 'text' => 'Mehrere Adressen'],
|
||||
]]],
|
||||
['key' => 'deliveryAddressName', 'text' => 'Lieferadresse Name', 'required' => true, 'table' => false],
|
||||
['key' => 'deliveryAddressLine', 'text' => 'Lieferadresse', 'required' => true, 'required_length' => 4],
|
||||
@@ -54,12 +54,16 @@ class WarehouseEShopOrderController extends TTCrud {
|
||||
if (!isset($orderItems[$item['orderId']])) {
|
||||
$orderItems[$item['orderId']] = [];
|
||||
}
|
||||
|
||||
$article = array_search($item['articleId'], array_column($articles, 'id'));
|
||||
$articlePacket = array_search($item['articlePacketId'], array_column($articlePackets, 'id'));
|
||||
|
||||
$orderItems[$item['orderId']][] = [
|
||||
'id' => $item['id'],
|
||||
'articleId' => $item['articleId'],
|
||||
'articleTitle' => isset($articles[$item['articleId']]) ? $articles[$item['articleId']]->title : null,
|
||||
'articleTitle' => isset($articles[$article]) ? $articles[$article]->title : null,
|
||||
'articlePacketId' => $item['articlePacketId'],
|
||||
'articlePacketTitle' => isset($articlePackets[$item['articlePacketId']]) ? $articlePackets[$item['articlePacketId']]->title : null,
|
||||
'articlePacketTitle' => isset($articlePackets[$articlePacket]) ? $articlePackets[$articlePacket]->title : null,
|
||||
'quantity' => $item['quantity']
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user