diff --git a/app/admin/models/erp_order.go b/app/admin/models/erp_order.go index 59d9d0b..663a73b 100644 --- a/app/admin/models/erp_order.go +++ b/app/admin/models/erp_order.go @@ -3040,7 +3040,7 @@ func retailDetailExport(list []ErpOrder, sumData RetailDetailTotalData) (string, return "", errors.New("RetailMarginDataExport, 订单类型异常:" + list[i].RetailType) } - commodityIdMap := make(map[uint32]bool) + orderFlag := false // 先判断商品数量,确定要写几行数据 for rowId := 0; rowId < len(list[i].Commodities); rowId++ { if list[i].RetailType == RetailTypeSale { @@ -3083,8 +3083,8 @@ func retailDetailExport(list []ErpOrder, sumData RetailDetailTotalData) (string, } // 单个订单的汇总数据只记录一次 - if !commodityIdMap[list[i].Commodities[rowId].ErpCommodityId] { - commodityIdMap[list[i].Commodities[rowId].ErpCommodityId] = true + if !orderFlag { + orderFlag = true salesMan := "" nSalesProfitPer := 0.0 nStaffProfitPer := 0.0 @@ -3562,11 +3562,17 @@ func queryRetailDetailByJoin(req *ErpOrderRetailDetailReq, c *gin.Context) (*Erp sumData.TotalAmount = 0 // 订单实收金额 sumData.StorePer = 0 // 门店提成 - sumData.ScanAmount = cashier.ScanAmount - sumData.CashAmount = cashier.CashAmount - sumData.PosAmount = cashier.PosAmount - sumData.StoreVmAmount = cashier.StoreVmAmount - sumData.OtherAmount = cashier.OtherAmount + //sumData.ScanAmount = cashier.ScanAmount + //sumData.CashAmount = cashier.CashAmount + //sumData.PosAmount = cashier.PosAmount + //sumData.StoreVmAmount = cashier.StoreVmAmount + //sumData.OtherAmount = cashier.OtherAmount + + sumData.ScanAmount = 0 + sumData.CashAmount = 0 + sumData.PosAmount = 0 + sumData.StoreVmAmount = 0 + sumData.OtherAmount = 0 var result []RetailDetailByJoin diff --git a/app/admin/models/file.go b/app/admin/models/file.go index 10a8c2e..953775c 100644 --- a/app/admin/models/file.go +++ b/app/admin/models/file.go @@ -531,11 +531,11 @@ func checkStockExcel(sheetCols [][]string) error { // } //} - if i < len(sheetCols[5]) { - if employeeCost, err := strconv.ParseFloat(sheetCols[5][i], 64); err != nil || employeeCost <= 0 { - return errors.New("第" + strconv.Itoa(i+1) + "行员工成本价必须是大于0的数字") - } - } + //if i < len(sheetCols[5]) { + // if employeeCost, err := strconv.ParseFloat(sheetCols[5][i], 64); err != nil || employeeCost <= 0 { + // return errors.New("第" + strconv.Itoa(i+1) + "行员工成本价必须是大于0的数字") + // } + //} // 供应商不能为空 if i < len(sheetCols[6]) { diff --git a/app/admin/models/game_card.go b/app/admin/models/game_card.go index f99433b..b6f5ce3 100644 --- a/app/admin/models/game_card.go +++ b/app/admin/models/game_card.go @@ -1534,6 +1534,7 @@ func MemberExpirationReminderDay(days int64) { } } +// ExpireMemberSMSSend 用户过期如果一直不还卡,最多会收到12条短信,过期超过3个月就不会发送了 func ExpireMemberSMSSend() { nowTime := time.Now() days := []uint32{1, 2, 3, 4, 5, 6, 7, 14, 21, 28, 60, 90}