diff --git a/SolarPower/Views/StationReport/Index.cshtml b/SolarPower/Views/StationReport/Index.cshtml
index 9ea1e96..6159fb9 100644
--- a/SolarPower/Views/StationReport/Index.cshtml
+++ b/SolarPower/Views/StationReport/Index.cshtml
@@ -1024,12 +1024,12 @@
sta += "
" + toThousands(Number(inverter[i]).toFixed(2)) + " | ";
}
});
- sta += "" + toThousands(Number(inverter.hourKWH).toFixed(2)) + " | ";
- sta += "" + toThousands(Number(inverter.hourKWHp).toFixed(2)) + " | ";
- sta += "" + toThousands(Number(inverter.irrDayHour).toFixed(2)) + " | "; // body 小時平均日照度 irradiance
- sta += "" + toThousands(Number(inverter.temperature).toFixed(2)) + " | "; //body 小時平均模組溫度
+ sta += "" + ((inverter.hourKWH == null) ? 0 : toThousands(Number(inverter.hourKWH).toFixed(2))) + " | ";
+ sta += "" + ((inverter.hourKWHp == null) ? 0 : toThousands(Number(inverter.hourKWHp).toFixed(2))) + " | ";
+ sta += "" + ((inverter.irrDayHour == null) ? 0 : toThousands(Number(inverter.irrDayHour).toFixed(2))) + " | "; // body 小時平均日照度 irradiance
+ sta += "" + ((inverter.temperature == null) ? 0 : toThousands(Number(inverter.temperature).toFixed(2))) + " | ";//body 小時平均模組溫度
if (showmoney == 1) {
- sta += "" + toThousands((Number(inverter.hourmoney).toFixed(2))) + " | ";
+ sta += "" + ((inverter.hourmoney == null) ? 0 : toThousands(Number(inverter.hourmoney).toFixed(2))) + " | ";
}
sta += "";
if (index < rel.data.length - 1) {
@@ -1100,15 +1100,15 @@
sta += "" + toThousands(inverter[i].toFixed(2)) + " | ";
}
});
- sta += "" + toThousands(inverter.dayKWH.toFixed(2)) + " | ";
+ sta += "" + ((inverter.dayKWH == null) ? 0 : toThousands(inverter.dayKWH.toFixed(2))) + " | ";
sta += "" + ((inverter.dayKWHp == null) ? 0 : toThousands(inverter.dayKWHp.toFixed(2))) + " | ";
- sta += "" + inverter.tothour.toFixed(2) + " | ";
- sta += "" + toThousands(inverter.KWHKWP.toFixed(2)) + " | ";
+ sta += "" + ((inverter.tothour == null) ? 0 : toThousands(inverter.tothour.toFixed(2))) + " | ";
+ sta += "" + ((inverter.KWHKWP == null) ? 0 : toThousands(inverter.KWHKWP.toFixed(2))) + " | ";
sta += "" + ((inverter.PR == null) ? 0 : toThousands(inverter.PR.toFixed(2))) + " | ";
sta += "" + ((inverter.IrrDay == null) ? 0 : toThousands(inverter.IrrDay.toFixed(2))) + " | ";
- sta += "" + inverter.temperature.toFixed(2) + " | ";
+ sta += "" + ((inverter.temperature == null) ? 0 : toThousands(inverter.temperature.toFixed(2))) + " | ";
if (showmoney == 1) {
- sta += "" + toThousands(inverter.soldmoney.toFixed(2)) + " | ";
+ sta += "" + ((inverter.soldmoney == null) ? 0 : toThousands(inverter.soldmoney.toFixed(2))) + " | ";
}
sta += "";
if (index < rel.data.length - 1) {
@@ -1236,15 +1236,15 @@
sta += "" + toThousands(inverter[i].toFixed(2)) + " | ";
}
});
- sta += "" + toThousands(inverter.dayKWH.toFixed(2)) + " | ";
- sta += "" + toThousands(inverter.dayKWHp.toFixed(2)) + " | ";
- sta += "" + toThousands(inverter.tothour.toFixed(2)) + " | ";
- sta += "" + toThousands(inverter.KWHKWP.toFixed(2)) + " | ";
- sta += "" + toThousands(inverter.PR.toFixed(2)) + " | ";
- sta += "" + toThousands(inverter.irradiance.toFixed(2)) + " | ";
- sta += "" + toThousands(inverter.temperature.toFixed(2)) + " | ";
+ sta += "" + ((inverter.dayKWH == null) ? 0 : toThousands(inverter.dayKWH.toFixed(2))) + " | ";
+ sta += "" + ((inverter.dayKWHp == null) ? 0 : toThousands(inverter.dayKWHp.toFixed(2))) + " | ";
+ sta += "" + ((inverter.tothour == null) ? 0 : toThousands(inverter.tothour.toFixed(2))) + " | ";
+ sta += "" + ((inverter.KWHKWP == null) ? 0 : toThousands(inverter.KWHKWP.toFixed(2))) + " | ";
+ sta += "" + ((inverter.PR == null) ? 0 : toThousands(inverter.PR.toFixed(2))) + " | ";
+ sta += "" + ((inverter.irradiance == null) ? 0 : toThousands(inverter.irradiance.toFixed(2))) + " | ";
+ sta += "" + ((inverter.temperature == null) ? 0 : toThousands(inverter.temperature.toFixed(2))) + " | ";
if (showmoney == 1) {
- sta += "" + toThousands(inverter.soldmoney.toFixed(2)) + " | ";
+ sta += "" + ((inverter.soldmoney == null) ? 0 : toThousands(inverter.soldmoney.toFixed(2))) + " | ";
}
sta += "";
avghour += inverter.tothour ? inverter.tothour : 0;
@@ -1370,15 +1370,15 @@
sta += "" + toThousands(inverter[i].toFixed(2)) + " | ";
}
});
- sta += "" + toThousands(inverter.dayKWH.toFixed(2)) + " | ";
+ sta += "" + ((inverter.dayKWH == null) ? 0 : toThousands(inverter.dayKWH.toFixed(2))) + " | ";
sta += "" + ((inverter.dayKWHp == null) ? 0 : toThousands(inverter.dayKWHp.toFixed(2))) + " | ";
- sta += "" + toThousands(inverter.tothour.toFixed(2)) + " | ";
- sta += "" + toThousands(inverter.KWHKWP.toFixed(2)) + " | ";
+ sta += "" + ((inverter.tothour == null) ? 0 : toThousands(inverter.tothour.toFixed(2))) + " | ";
+ sta += "" + ((inverter.KWHKWP == null) ? 0 : toThousands(inverter.KWHKWP.toFixed(2))) + " | ";
sta += "" + ((inverter.PR == null) ? 0 : toThousands(inverter.PR.toFixed(2))) + " | ";
sta += "" + ((inverter.IrrDay == null) ? 0 : toThousands(inverter.IrrDay.toFixed(2))) + " | ";
- sta += "" + toThousands(inverter.temperature.toFixed(2)) + " | ";
+ sta += "" + ((inverter.temperature == null) ? 0 : toThousands(inverter.temperature.toFixed(2))) + " | ";
if (showmoney == 1) {
- sta += "" + toThousands(inverter.soldmoney.toFixed(2)) + " | ";
+ sta += "" + ((inverter.soldmoney == null) ? 0 : toThousands(inverter.soldmoney.toFixed(2))) + " | ";
}
sta += "";
avghour += inverter.tothour ? inverter.tothour : 0;