alert('订单不存在或您没有权限查看');history.back();"; exit; } // 获取订单项信息 $sql = "SELECT oi.*, p.ProductName FROM order_items oi LEFT JOIN products p ON oi.product_id = p.id WHERE oi.order_id = $id"; $itemsResult = mysqli_query($conn, $sql); $orderItems = []; while ($itemRow = mysqli_fetch_assoc($itemsResult)) { $orderItems[] = $itemRow; } } else { echo ""; exit; } ?>
序号 | 产品名称 | 数量 | 单位 | 单价 | 折扣 | 总价 | 备注 |
---|---|---|---|---|---|---|---|
= $index + 1 ?> | = htmlspecialcharsFix($item['ProductName']) ?> | = $item['quantity'] ?> | = htmlspecialcharsFix($item['unit']) ?> | = number_format($item['unit_price'], 2) ?> | 0): ?> = number_format($item['discount_amount'], 2) ?> (= number_format($item['discount_percent'], 2) ?>%) - | = number_format($item['total_price'], 2) ?> | = htmlspecialcharsFix($item['notes']) ?> |
= nl2br(htmlspecialcharsFix($order['notes'])) ?>
= nl2br(htmlspecialcharsFix($order['internal_notes'])) ?>