修改结算方法

This commit is contained in:
苏尹岚
2020-07-27 14:21:08 +08:00
parent 8b82892376
commit b3b5077b94
3 changed files with 12 additions and 7 deletions

View File

@@ -1177,6 +1177,12 @@ func (s *DefScheduler) updateOrderByBill(order *model.GoodsOrder, bill *model.Wa
} else {
order.WaybillVendorID = bill.WaybillVendorID
order.VendorWaybillID = bill.VendorWaybillID
if bill.Status == model.WaybillStatusDelivered {
stores, _ := dao.GetStoreList(dao.GetDB(), []int{jxutils.GetSaleStoreIDFromOrder(order)}, nil, nil, nil, "")
if len(stores) > 0 {
jxutils.RefreshOrderEarningPrice2(order, stores[0].PayPercentage)
}
}
}
if revertStatus {
order.Status = model.OrderStatusFinishedPickup