zwxi 1 năm trước cách đây
mục cha
commit
ce6fb498a1
1 tập tin đã thay đổi với 2 bổ sung4 xóa
  1. 2 4
      controller/census/seller.go

+ 2 - 4
controller/census/seller.go

@@ -775,9 +775,7 @@ func (this *SellerController) GroupInvoiceListV2(c *gin.Context) {
 		newRate = newRate.Mul(mulNum).Round(2)
 		finalRate, _ := newRate.Float64()
 
-		newAmount := decimal.NewFromFloat(v)
-		newAmount = newAmount.Mul(mulNum).Round(2)
-		finalAmount, _ := newAmount.Float64()
+		amuont,_ := strconv.ParseFloat(fmt.Sprintf("%.2f", v), 64)
 
 		groupName := ""
 		if groupItem ,ok := groupMap[k]; ok {
@@ -786,7 +784,7 @@ func (this *SellerController) GroupInvoiceListV2(c *gin.Context) {
 		list = append(list, &fms.CensusSellerGroupInvoiceItem{
 			GroupId:       k,
 			GroupName:     groupName,
-			InvoiceAmount: finalAmount,
+			InvoiceAmount: amuont,
 			GroupRate:     finalRate,
 		})
 	}