Explorar o código

Merge branch 'feature/eta_2.6.9' into debug

hsun hai 6 días
pai
achega
4161264d4e
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      services/smart_report.go

+ 2 - 2
services/smart_report.go

@@ -664,10 +664,10 @@ func calculateReportPdfHeight(width int, freeRatio string) (height int, err erro
 		err = fmt.Errorf("布局比例有误, %s", freeRatio)
 		return
 	}
-	if n <= 0 {
+	if m <= 0 {
 		err = fmt.Errorf("布局比例有误, %s", freeRatio)
 		return
 	}
-	height = int(math.Round(float64(width) * m / n))
+	height = int(math.Round(float64(width) * n / m))
 	return
 }