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 = ""; $dataoutput = "";
/// print_r($arr); /// print_r($arr);
foreach($arr as $cnt){ if($arr != NULL){
foreach($arr as $cnt){
$cost = 0.0; $cost = 0.0;
$cost = $cnt->Monthly * $price; $cost = $cnt->Monthly * $price;
$dataoutput .= ' $dataoutput .= '
<tr style="background-color:white;"> <tr style="background-color:white;">
<td style="text-align:left;">
'.$cnt->Name.'
</td>
<td> <td style="text-align:left;">
'.$cnt->Total.' kWh '.$cnt->Name.'
</td> </td>
<td> <td>
'.$cnt->Monthly.' kWh '.$cnt->Total.' kWh
</td> </td>
<td> <td>
'.$cnt->Weekly.' kWh '.$cnt->Monthly.' kWh
</td> </td>
<td> <td>
'.$cnt->Daily.' kWh '.$cnt->Weekly.' kWh
</td> </td>
<td> <td>
'.$cost.'€ '.$cnt->Daily.' kWh
</td> </td>
<td>
'.$cost.'€
</td>
</tr>'; </tr>';
}
} }
$this->createTable($dataoutput); $this->createTable($dataoutput);
/* /*
+1 -1
View File
@@ -8,6 +8,6 @@
"date": 1491343200 "date": 1491343200
}, },
"version": "1.0", "version": "1.0",
"build": 7, "build": 8,
"date": 0 "date": 0
} }