zwxi hace 1 año
padre
commit
93fc15e92f
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      controller/census/invoice_payment.go

+ 2 - 2
controller/census/invoice_payment.go

@@ -1182,8 +1182,8 @@ func getCensusIncomeListV2(ch chan models.CensusIncomeChartResp, req fms.IncomeL
 			endDateTime = reqStartDate.AddDate(0, i+1, -1)
 			prevEndDateTime = reqStartDate.AddDate(-1, i+1, -1)
 			if reqEndDate.After(latestTime) {
-				endDateTime = latestTime.AddDate(0, i+1, -1)
-				prevEndDateTime = latestTime.AddDate(-1, i+1, -1)
+				endDateTime = latestTime.AddDate(0, i-numMonth+1, -1)
+				prevEndDateTime = latestTime.AddDate(-1, i-numMonth+1, -1)
 			}
 		} else {
 			endDateTime = latestTime.AddDate(0, i-numMonth+1, -1)