This commit is contained in:
jhartworks
2025-01-31 14:17:46 +01:00
parent b8b48d7834
commit 2926baf133
2 changed files with 32 additions and 31 deletions
+31 -30
View File
@@ -39,41 +39,42 @@ class CounterTable extends IPSModule {
$dataoutput = "";
/// print_r($arr);
foreach($arr as $cnt){
if($arr != NULL){
foreach($arr as $cnt){
$cost = 0.0;
$cost = $cnt->Monthly * $price;
$dataoutput .= '
<tr style="background-color:white;">
<td style="text-align:left;">
'.$cnt->Name.'
</td>
$cost = 0.0;
$cost = $cnt->Monthly * $price;
$dataoutput .= '
<tr style="background-color:white;">
<td>
'.$cnt->Total.' kWh
</td>
<td>
'.$cnt->Monthly.' kWh
</td>
<td>
'.$cnt->Weekly.' kWh
</td>
<td>
'.$cnt->Daily.' kWh
</td>
<td>
'.$cost.'€
</td>
<td style="text-align:left;">
'.$cnt->Name.'
</td>
<td>
'.$cnt->Total.' kWh
</td>
<td>
'.$cnt->Monthly.' kWh
</td>
<td>
'.$cnt->Weekly.' kWh
</td>
<td>
'.$cnt->Daily.' kWh
</td>
<td>
'.$cost.'€
</td>
</tr>';
</tr>';
}
}
$this->createTable($dataoutput);
/*
+1 -1
View File
@@ -8,6 +8,6 @@
"date": 1491343200
},
"version": "1.0",
"build": 7,
"build": 8,
"date": 0
}