修改门店发单运费收取,非京西门店先收取门店,门店不够在收取品牌.京西门店直接收取门店

This commit is contained in:
邹宗楠
2022-04-07 18:02:48 +08:00
parent 2c366de072
commit 167f2b357e
6 changed files with 106 additions and 35 deletions

View File

@@ -23,7 +23,7 @@ func init() {
partner.InitStoreAcctManager(FixedStoreAcctManager)
}
func (s *StoreAcctManager) InsertStoreAcctIncome(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string, expendID int) (err error) {
func InsertStoreAcctIncome(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string, expendID int) (err error) {
var (
userID, userName string
goodsVendorOrderID string
@@ -59,7 +59,7 @@ func (s *StoreAcctManager) InsertStoreAcctIncome(ctx *jxcontext.Context, storeID
return err
}
func (s *StoreAcctManager) InsertStoreAcctExpend(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string, expendID int) (err error) {
func InsertStoreAcctExpend(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string, expendID int) (err error) {
var (
userID, userName string
db = dao.GetDB()
@@ -136,10 +136,10 @@ func (s *StoreAcctManager) UpdateStoreAcctBalance(ctx *jxcontext.Context, storeI
return err
}
// 门店到账
// 门店到账(老版本,修改门店的交易记录)
func (s *StoreAcctManager) InsertStoreAcctExpendAndUpdateStoreAcctBalance(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string, expendID int) (err error) {
utils.CallFuncAsync(func() {
if err = s.InsertStoreAcctExpend(ctx, storeID, price, acctType, vendorOrderID, expendID); err == nil {
if err = InsertStoreAcctExpend(ctx, storeID, price, acctType, vendorOrderID, expendID); err == nil {
s.UpdateStoreAcctBalance(ctx, storeID, price, false)
}
})
@@ -148,7 +148,7 @@ func (s *StoreAcctManager) InsertStoreAcctExpendAndUpdateStoreAcctBalance(ctx *j
func (s *StoreAcctManager) InsertStoreAcctIncomeAndUpdateStoreAcctBalance(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string, expendID int) (err error) {
utils.CallFuncAsync(func() {
if err = s.InsertStoreAcctIncome(ctx, storeID, price, acctType, vendorOrderID, expendID); err == nil {
if err = InsertStoreAcctIncome(ctx, storeID, price, acctType, vendorOrderID, expendID); err == nil {
s.UpdateStoreAcctBalance(ctx, storeID, price, true)
}
})