fix overview credit erarnings

This commit is contained in:
1day2die 2023-05-17 09:49:51 +02:00 committed by Dennis
parent 9da53bd02f
commit da29ead3cd
2 changed files with 3 additions and 2 deletions

View file

@ -173,7 +173,8 @@ class OverViewController extends Controller
$nodeId = $server['attributes']['node'];
if ($CPServer = Server::query()->where('pterodactyl_id', $server['attributes']['id'])->first()) {
$price = Product::query()->where('id', $CPServer->product_id)->first()->price;
$product = Product::query()->where('id', $CPServer->product_id)->first();
$price = $product->getMonthlyPrice();
if (! $CPServer->suspended) {
$counters['earnings']->active += $price;
$counters['servers']->active++;

View file

@ -240,7 +240,7 @@
<th>{{__('Node')}}</th>
<th>{{__('Server count')}}</th>
<th>{{__('Resource usage')}}</th>
<th>{{ $credits_display_name . ' ' . __('Usage')}}</th>
<th>{{ $credits_display_name . ' ' . __('Usage') ." (".__('per month').")"}}</th>
</tr>
</thead>
<tbody>