This commit is contained in:
邹宗楠
2022-07-18 09:41:26 +08:00
parent 98d22a905f
commit f80e16c266
2 changed files with 20 additions and 13 deletions

View File

@@ -501,21 +501,21 @@ func ResetCreateWaybillFee(db *dao.DaoDB, order *model.GoodsOrder) (err error) {
globals.SugarLogger.Debug("Refund Money Fail:", "同一订单无法重复退款")
return errors.New("无法重复退款")
}
if v.BillType == model.BrandBillTypeExpend {
// 将支出记录修改为退款记录,支付类型为收入,且类型为三方配送时:退费
newBill := &model.BrandBill{
BrandID: store.BrandID,
Price: v.Price,
BillType: model.BrandBillTypeIncome,
FeeType: model.BrandBillFeeTypeDelivery,
VendorOrderID: v.VendorOrderID,
OrderID: v.OrderID,
}
dao.WrapAddIDCULEntity(newBill, "系统退费")
err = dao.CreateEntity(db, newBill)
}
}
// 将支出记录修改为退款记录,支付类型为收入,且类型为三方配送时:退费
newBill := &model.BrandBill{
BrandID: store.BrandID,
Price: orderBill[0].Price,
BillType: model.BrandBillTypeIncome,
FeeType: model.BrandBillFeeTypeDelivery,
VendorOrderID: orderBill[0].VendorOrderID,
OrderID: orderBill[0].OrderID,
}
dao.WrapAddIDCULEntity(newBill, "系统退费")
err = dao.CreateEntity(db, newBill)
}
return err
}

View File

@@ -1,6 +1,7 @@
package yilianyun
import (
"fmt"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/partner"
"testing"
@@ -46,3 +47,9 @@ func TestRegisterPrinter(t *testing.T) {
t.Fatal(err)
}
}
func TestStatusPrinter(t *testing.T) {
data, err := CurPrinterHandler.GetPrinterStatus(jxcontext.AdminCtx, "4004802883", "441719962922")
fmt.Println("data", data)
fmt.Println("err", err)
}