kobe6258 преди 1 месец
родител
ревизия
170a3568e8
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      services/smart_report.go

+ 4 - 2
services/smart_report.go

@@ -338,8 +338,10 @@ func Report2pdfAndJpeg(reportUrl string, reportId, reportType int) {
 
 		width := 1200
 		top, bottom, left, right := 20, 20, 20, 20
-		if report.ReportLayout == 3 {
-			top, bottom, left, right = 0, 0, 0, 0
+		if reportType == 1 {
+			if report != nil && report.ReportLayout == 3 {
+				top, bottom, left, right = 0, 0, 0, 0
+			}
 		}
 		//if reportType == 3 {
 		//	width = 800