台桌 金额2

This commit is contained in:
2026-03-30 10:55:10 +08:00
parent 3b6137c5d2
commit 66d61dbd5a

View File

@@ -10,7 +10,7 @@
MAX(b.id) as orderId, MAX(b.id) as orderId,
MAX(b.user_id) as user_id, MAX(b.user_id) as user_id,
-- 核心:真实金额 = 支付总额 - 退款总额 -- 核心:真实金额 = 支付总额 - 退款总额
IFNULL(SUM( (d.num - d.return_num) * d.unit_price - d.return_amount ), 0) as orderAmount IFNULL(SUM( (d.num - d.return_num) * d.unit_price - d.return_amount ), 0) as orderAmount,
MAX(b.seat_num) as personNum, MAX(b.seat_num) as personNum,
MAX(b.create_time) as orderCreateTime, MAX(b.create_time) as orderCreateTime,
MAX(ar.name) as areaName MAX(ar.name) as areaName