1.修复零售明细导出excel汇总数据不准确的缺陷;

2.修改库存导入时员工成本价校验,可以=0;
3.通过名称搜索查询库存明细时订单支付数据默认置为0;
This commit is contained in:
chenlin 2024-07-05 15:39:36 +08:00
parent 14aff507b8
commit bc5a7065b3
3 changed files with 20 additions and 13 deletions

View File

@ -3040,7 +3040,7 @@ func retailDetailExport(list []ErpOrder, sumData RetailDetailTotalData) (string,
return "", errors.New("RetailMarginDataExport, 订单类型异常:" + list[i].RetailType) return "", errors.New("RetailMarginDataExport, 订单类型异常:" + list[i].RetailType)
} }
commodityIdMap := make(map[uint32]bool) orderFlag := false
// 先判断商品数量,确定要写几行数据 // 先判断商品数量,确定要写几行数据
for rowId := 0; rowId < len(list[i].Commodities); rowId++ { for rowId := 0; rowId < len(list[i].Commodities); rowId++ {
if list[i].RetailType == RetailTypeSale { if list[i].RetailType == RetailTypeSale {
@ -3083,8 +3083,8 @@ func retailDetailExport(list []ErpOrder, sumData RetailDetailTotalData) (string,
} }
// 单个订单的汇总数据只记录一次 // 单个订单的汇总数据只记录一次
if !commodityIdMap[list[i].Commodities[rowId].ErpCommodityId] { if !orderFlag {
commodityIdMap[list[i].Commodities[rowId].ErpCommodityId] = true orderFlag = true
salesMan := "" salesMan := ""
nSalesProfitPer := 0.0 nSalesProfitPer := 0.0
nStaffProfitPer := 0.0 nStaffProfitPer := 0.0
@ -3562,11 +3562,17 @@ func queryRetailDetailByJoin(req *ErpOrderRetailDetailReq, c *gin.Context) (*Erp
sumData.TotalAmount = 0 // 订单实收金额 sumData.TotalAmount = 0 // 订单实收金额
sumData.StorePer = 0 // 门店提成 sumData.StorePer = 0 // 门店提成
sumData.ScanAmount = cashier.ScanAmount //sumData.ScanAmount = cashier.ScanAmount
sumData.CashAmount = cashier.CashAmount //sumData.CashAmount = cashier.CashAmount
sumData.PosAmount = cashier.PosAmount //sumData.PosAmount = cashier.PosAmount
sumData.StoreVmAmount = cashier.StoreVmAmount //sumData.StoreVmAmount = cashier.StoreVmAmount
sumData.OtherAmount = cashier.OtherAmount //sumData.OtherAmount = cashier.OtherAmount
sumData.ScanAmount = 0
sumData.CashAmount = 0
sumData.PosAmount = 0
sumData.StoreVmAmount = 0
sumData.OtherAmount = 0
var result []RetailDetailByJoin var result []RetailDetailByJoin

View File

@ -531,11 +531,11 @@ func checkStockExcel(sheetCols [][]string) error {
// } // }
//} //}
if i < len(sheetCols[5]) { //if i < len(sheetCols[5]) {
if employeeCost, err := strconv.ParseFloat(sheetCols[5][i], 64); err != nil || employeeCost <= 0 { // if employeeCost, err := strconv.ParseFloat(sheetCols[5][i], 64); err != nil || employeeCost <= 0 {
return errors.New("第" + strconv.Itoa(i+1) + "行员工成本价必须是大于0的数字") // return errors.New("第" + strconv.Itoa(i+1) + "行员工成本价必须是大于0的数字")
} // }
} //}
// 供应商不能为空 // 供应商不能为空
if i < len(sheetCols[6]) { if i < len(sheetCols[6]) {

View File

@ -1534,6 +1534,7 @@ func MemberExpirationReminderDay(days int64) {
} }
} }
// ExpireMemberSMSSend 用户过期如果一直不还卡最多会收到12条短信过期超过3个月就不会发送了
func ExpireMemberSMSSend() { func ExpireMemberSMSSend() {
nowTime := time.Now() nowTime := time.Now()
days := []uint32{1, 2, 3, 4, 5, 6, 7, 14, 21, 28, 60, 90} days := []uint32{1, 2, 3, 4, 5, 6, 7, 14, 21, 28, 60, 90}