1
This commit is contained in:
@@ -208,14 +208,18 @@ func (d DeliveryHandler) CancelWaybill(bill *model.Waybill, cancelReasonID int,
|
||||
deductionFee, err := api.SfPsAPI.PreCancelOrder(bill.VendorWaybillID)
|
||||
if deductionFee == 0 || err != nil {
|
||||
money = 0
|
||||
} else {
|
||||
money = utils.Float64TwoInt64(deductionFee)
|
||||
}
|
||||
money = utils.Float64TwoInt64(deductionFee)
|
||||
globals.SugarLogger.Debugf("CancelWaybill money=%d", money)
|
||||
if err = api.SfPsAPI.CancelOrder(bill.VendorWaybillID); err != nil {
|
||||
return err
|
||||
}
|
||||
bill.Status = model.WaybillStatusCanceled
|
||||
bill.Remark = cancelReason
|
||||
bill.DesiredFee = money //取消成功才赋值违约金
|
||||
globals.SugarLogger.Debugf("CancelWaybill bill=%s", utils.Format4Output(bill, false))
|
||||
|
||||
partner.CurOrderManager.OnWaybillStatusChanged(bill)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user