门店营业数据

This commit is contained in:
苏尹岚
2020-07-28 10:35:00 +08:00
parent 1161b44c4d
commit c4ea35efa0
2 changed files with 9 additions and 1 deletions

View File

@@ -698,6 +698,9 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
}
saleInfoMap[index] = saleInfo
}
if v.EarningType == model.EarningTypeQuote {
saleInfo.RealEarningPrice += v.ShopPrice * int64(v.Count)
}
saleInfo.ShopPrice += v.ShopPrice * int64(v.Count)
saleInfo.VendorPrice += v.VendorPrice * int64(v.Count)
saleInfo.SalePrice += v.SalePrice * int64(v.Count)
@@ -705,10 +708,12 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
if v.VendorOrderID == flagVendorOrderID {
if k == 0 {
saleInfo.EarningPrice = v.NewEarningPrice
saleInfo.RealEarningPrice += v.NewEarningPrice
}
} else {
flagVendorOrderID = v.VendorOrderID
saleInfo.EarningPrice += v.NewEarningPrice
saleInfo.RealEarningPrice += v.NewEarningPrice
}
universalOrderID := jxutils.ComposeUniversalOrderID(v.VendorOrderID, v.VendorID)