This commit is contained in:
yangduo 2025-04-30 15:28:49 +08:00
parent 0f21a61814
commit 88d426dc6b

View File

@ -281,19 +281,19 @@ class MailController
$item_list = array(); $item_list = array();
if ($act == 2) { if ($act == 2) {
foreach ($all_attachments as $attachment_item) { foreach ($all_attachments as $attachment_item) {
$itemid = $attachment_item['itemid']; $itemid = $attachment_item['item_id'];
$itemexists = false; $itemexists = false;
foreach ($item_list as $key => $item) { foreach ($item_list as $key => $item) {
if ($item['item_id'] == $itemid) { if ($item['item_id'] == $itemid) {
$itemexists = true; $itemexists = true;
$item_list[$key]['item_num'] += $attachment_item['itemnum']; $item_list[$key]['item_num'] += $attachment_item['item_num'];
break; break;
} }
} }
if (!$itemexists) { if (!$itemexists) {
$item_list[] = array( $item_list[] = array(
'item_id' => $attachment_item['itemid'], 'item_id' => $attachment_item['item_id'],
'item_num' => $attachment_item['itemnum'] 'item_num' => $attachment_item['item_num']
); );
} }
} }