修改门店发单才收钱
This commit is contained in:
@@ -180,21 +180,23 @@ func (c *BaseScheduler) CreateWaybill(platformVendorID int, order *model.GoodsOr
|
||||
return nil, err
|
||||
}
|
||||
var balance int
|
||||
if storeDetail.BrandID == scheduler.JXC4B_SHOP || storeDetail.BrandID == scheduler.JXC4B_RAND_JXGY { // 京西品牌,扣门店
|
||||
balance = storeAcct.AccountBalance
|
||||
} else {
|
||||
if storeAcct.AccountBalance >= model.BrandBalanceLimit {
|
||||
|
||||
if order.CreateDeliveryType == model.YES {
|
||||
if storeDetail.BrandID == scheduler.JXC4B_SHOP || storeDetail.BrandID == scheduler.JXC4B_RAND_JXGY { // 京西品牌,扣门店
|
||||
balance = storeAcct.AccountBalance
|
||||
} else if storeAcct.AccountBalance < model.BrandBalanceLimit && result >= model.BrandBalanceLimit {
|
||||
balance = result
|
||||
} else {
|
||||
balance = 0
|
||||
if storeAcct.AccountBalance >= model.BrandBalanceLimit {
|
||||
balance = storeAcct.AccountBalance
|
||||
} else if storeAcct.AccountBalance < model.BrandBalanceLimit && result >= model.BrandBalanceLimit {
|
||||
balance = result
|
||||
} else {
|
||||
balance = 0
|
||||
}
|
||||
}
|
||||
}else {
|
||||
balance, _ = partner.CurStoreAcctManager.GetBrandBalance(storeDetail.BrandID)
|
||||
}
|
||||
fmt.Println("1111111111111111111111", storeAcct)
|
||||
fmt.Println("1111111111111111111111", result)
|
||||
fmt.Println("1111111111111111111111", balance)
|
||||
//balance, _ = partner.CurStoreAcctManager.GetBrandBalance(storeDetail.BrandID)
|
||||
|
||||
handlerInfo := partner.GetDeliveryPlatformFromVendorID(platformVendorID)
|
||||
if handlerInfo != nil && handlerInfo.Use4CreateWaybill {
|
||||
if model.DeliveryBrandMarkMap[platformVendorID]&storeDetail.BrandIsOpen != 0 && balance >= model.BrandBalanceLimit {
|
||||
|
||||
Reference in New Issue
Block a user