台桌 金额

This commit is contained in:
2026-03-30 10:50:45 +08:00
parent 578b829064
commit 3b6137c5d2
2 changed files with 3 additions and 2 deletions

View File

@@ -10,7 +10,7 @@
MAX(b.id) as orderId,
MAX(b.user_id) as user_id,
-- 核心:真实金额 = 支付总额 - 退款总额
IFNULL(SUM(d.pay_amount), 0) - IFNULL(SUM(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.create_time) as orderCreateTime,
MAX(ar.name) as areaName