This commit is contained in:
苏尹岚
2021-03-19 18:35:10 +08:00
parent 2d3cecd1da
commit 51837e2f15
2 changed files with 47 additions and 46 deletions

View File

@@ -87,7 +87,7 @@ func GetStatisticsReportForOrders(db *DaoDB, storeIDs, vendorIDs []int, fromDate
SELECT ss.*,
ss.earning_price1 - IFNULL(ss.afs_shop_price,0) earning_price,
ss.total_shop_money1 - IFNULL(ss.afs_total_money,0) total_shop_money,
ss.total_gross_profit1 + IFNULL(ss.afs_shop_price,0) - IFNULL(ss.afs_total_money,0)-ss.order_counts*0.8*100 total_gross_profit
ss.total_gross_profit1 + IFNULL(ss.afs_shop_price,0) - IFNULL(ss.afs_total_money,0) - ss.order_counts*0.8*100 total_gross_profit
FROM (
SELECT
IF(a.jx_store_id <> 0,a.jx_store_id,a.store_id) store_id,