1
This commit is contained in:
@@ -607,16 +607,28 @@ func orderFeeSettle(db *dao.DaoDB, order *model.GoodsOrder, bill *model.Waybill,
|
||||
globals.SugarLogger.Errorf("GetStoreAcctIncomeTotal 551 err :%v", err)
|
||||
return err
|
||||
}
|
||||
for _, v := range bills {
|
||||
allFee += int(v.DesiredFee)
|
||||
allFee += int(v.TipFee)
|
||||
|
||||
} else {
|
||||
billExpend, err = dao.GetBrandBillOrderExpend(db, store.BrandID, bill.VendorOrderID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// 运单支出费用统计,应该等于 支出费用- 退还费用
|
||||
globals.SugarLogger.Errorf("计算错误:订单支出费用应该=退还费用+运单支出费用,支出费用:%d,已经退还费用:%d,运单计算费用:%d", billExpend, billIncome, allFee)
|
||||
if allFee != billExpend-billIncome {
|
||||
globals.SugarLogger.Errorf("计算错误:订单支出费用应该=退还费用+运单支出费用,支出费用:%d,已经退还费用:%d,剩余退还费用:%d", billExpend, billIncome, billExpend-billIncome)
|
||||
billIncome, err = dao.GetBrandBillOrderIncome(db, store.BrandID, bill.VendorOrderID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
for _, v := range bills {
|
||||
allFee += int(v.DesiredFee)
|
||||
allFee += int(v.TipFee)
|
||||
}
|
||||
// 运单支出费用统计,应该等于 支出费用- 退还费用
|
||||
globals.SugarLogger.Errorf("计算错误:订单支出费用应该=退还费用+运单支出费用,支出费用:%d,已经退还费用:%d,运单计算费用:%d", billExpend, billIncome, allFee)
|
||||
if allFee != billExpend-billIncome {
|
||||
globals.SugarLogger.Errorf("计算错误:订单支出费用应该=退还费用+运单支出费用,支出费用:%d,已经退还费用:%d,剩余退还费用:%d", billExpend, billIncome, billExpend-billIncome)
|
||||
}
|
||||
|
||||
if billExpend-billIncome == allFee {
|
||||
globals.SugarLogger.Debugf("计算正确,运单消耗[%d],账户支出[%d],账户退回[%d]", allFee, billExpend, billIncome)
|
||||
partner.CurOrderManager.OnOrderMsg(order, fmt.Sprintf("计算正确,运单消耗[%d],账户支出[%d],账户退回[%d]", allFee, billExpend, billIncome), "")
|
||||
|
||||
Reference in New Issue
Block a user