This commit is contained in:
苏尹岚
2021-03-19 15:53:21 +08:00
parent 7e7cdce60e
commit 6dd3b55876

View File

@@ -85,7 +85,7 @@ func GetStatisticsReportForOrders(db *DaoDB, storeIDs, vendorIDs []int, fromDate
JOIN
(
SELECT ss.*,
ss.earning_price - ss.afs_price earning_price
ss.earning_price1 - ss.afs_price earning_price
FROM (
SELECT
IF(a.jx_store_id <> 0,a.jx_store_id,a.store_id) store_id,
@@ -99,7 +99,7 @@ func GetStatisticsReportForOrders(db *DaoDB, storeIDs, vendorIDs []int, fromDate
SUM(IF(a.vendor_id = a.waybill_vendor_id,a.waybill_tip_money,0)) waybill_tip_money,
SUM(a.total_shop_money) total_shop_money,
SUM(a.pm_subsidy_money) pm_subsidy_money,
SUM(IF(a.earning_type = 1, a.earning_price, a.new_earning_price)) earning_price,
SUM(IF(a.earning_type = 1, a.earning_price, a.new_earning_price)) earning_price1,
SUM(IF(a.order_type = 0,a.total_shop_money-IF(a.earning_type = 1, a.earning_price, a.new_earning_price)-b.desired_fee-a.distance_freight_money-a.waybill_tip_money, 80)) total_gross_profit,
SUM(d.shop_price) afs_price
FROM goods_order a