Hide sections if there are no data
This commit is contained in:
parent
63a30a1e57
commit
47afdd2f19
|
@ -256,32 +256,36 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body py-1">
|
<div class="card-body py-1">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6" style="border-right:1px solid #6c757d">
|
@if($counters['payments']['lastMonth']->count())
|
||||||
<span style="margin:auto; display:table; font-size: 18px; font-weight:700">{{__('Last month')}}:
|
<div class="col-md-6" style="border-right:1px solid #6c757d">
|
||||||
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
<span style="margin:auto; display:table; font-size: 18px; font-weight:700">{{__('Last month')}}:
|
||||||
data-content="{{ __('Payments in this time window') }}:<br>{{$counters['payments']['lastMonth']->timeStart}} - {{$counters['payments']['lastMonth']->timeEnd}}"
|
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
||||||
class="fas fa-info-circle"></i>
|
data-content="{{ __('Payments in this time window') }}:<br>{{$counters['payments']['lastMonth']->timeStart}} - {{$counters['payments']['lastMonth']->timeEnd}}"
|
||||||
</span>
|
class="fas fa-info-circle"></i>
|
||||||
<table class="table">
|
</span>
|
||||||
<thead>
|
<table class="table">
|
||||||
<tr>
|
<thead>
|
||||||
<th><b>{{__('Currency')}}</b></th>
|
<tr>
|
||||||
<th>{{__('Number of payments')}}</th>
|
<th><b>{{__('Currency')}}</b></th>
|
||||||
<th>{{__('Total amount')}}</th>
|
<th>{{__('Number of payments')}}</th>
|
||||||
</tr>
|
<th>{{__('Total amount')}}</th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody>
|
</thead>
|
||||||
@foreach($counters['payments']['lastMonth'] as $currency => $income)
|
<tbody>
|
||||||
<tr>
|
@foreach($counters['payments']['lastMonth'] as $currency => $income)
|
||||||
<td>{{$currency}}</td>
|
<tr>
|
||||||
<td>{{$income->count}}</td>
|
<td>{{$currency}}</td>
|
||||||
<td>{{$income->total}}</td>
|
<td>{{$income->count}}</td>
|
||||||
</tr>
|
<td>{{$income->total}}</td>
|
||||||
@endforeach
|
</tr>
|
||||||
</tbody>
|
@endforeach
|
||||||
</table>
|
</tbody>
|
||||||
<hr style="width: 100%; height:1px; border-width:0; background-color:#6c757d; margin-top: -16px">
|
</table>
|
||||||
</div><div class="col-md-6">
|
<hr style="width: 100%; height:1px; border-width:0; background-color:#6c757d; margin-top: -16px">
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@if($counters['payments']['lastMonth']->count()) <div class="col-md-6">
|
||||||
|
@else <div class="col-md-12"> @endif
|
||||||
<span style="margin:auto; display:table; font-size: 18px; font-weight:700">{{__('This month')}}:
|
<span style="margin:auto; display:table; font-size: 18px; font-weight:700">{{__('This month')}}:
|
||||||
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
||||||
data-content="{{ __('Payments in this time window') }}:<br>{{$counters['payments']['thisMonth']->timeStart}} - {{$counters['payments']['thisMonth']->timeEnd}}"
|
data-content="{{ __('Payments in this time window') }}:<br>{{$counters['payments']['thisMonth']->timeStart}} - {{$counters['payments']['thisMonth']->timeEnd}}"
|
||||||
|
@ -320,34 +324,36 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body py-1">
|
<div class="card-body py-1">
|
||||||
<span style="margin:auto; display:table; font-size: 18px; font-weight:700">{{__('Last year')}}:
|
@if($counters['taxPayments']['lastYear']->count())
|
||||||
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
<span style="margin:auto; display:table; font-size: 18px; font-weight:700">{{__('Last year')}}:
|
||||||
data-content="{{ __('Payments in this time window') }}:<br>{{$counters['taxPayments']['lastYear']->timeStart}} - {{$counters['taxPayments']['lastYear']->timeEnd}}"
|
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
||||||
class="fas fa-info-circle"></i>
|
data-content="{{ __('Payments in this time window') }}:<br>{{$counters['taxPayments']['lastYear']->timeStart}} - {{$counters['taxPayments']['lastYear']->timeEnd}}"
|
||||||
</span>
|
class="fas fa-info-circle"></i>
|
||||||
<table class="table">
|
</span>
|
||||||
<thead>
|
<table class="table">
|
||||||
<tr>
|
<thead>
|
||||||
<th><b>{{__('Currency')}}</b></th>
|
<tr>
|
||||||
<th>{{__('Number of payments')}}</th>
|
<th><b>{{__('Currency')}}</b></th>
|
||||||
<th><b>{{__('Base amount')}}</b></th>
|
<th>{{__('Number of payments')}}</th>
|
||||||
<th><b>{{__('Total taxes')}}</b></th>
|
<th><b>{{__('Base amount')}}</b></th>
|
||||||
<th>{{__('Total amount')}}</th>
|
<th><b>{{__('Total taxes')}}</b></th>
|
||||||
</tr>
|
<th>{{__('Total amount')}}</th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody>
|
</thead>
|
||||||
@foreach($counters['taxPayments']['lastYear'] as $currency => $income)
|
<tbody>
|
||||||
<tr>
|
@foreach($counters['taxPayments']['lastYear'] as $currency => $income)
|
||||||
<td>{{$currency}}</td>
|
<tr>
|
||||||
<td>{{$income->count}}</td>
|
<td>{{$currency}}</td>
|
||||||
<td>{{$income->price}}</td>
|
<td>{{$income->count}}</td>
|
||||||
<td>{{$income->taxes}}</td>
|
<td>{{$income->price}}</td>
|
||||||
<td>{{$income->total}}</td>
|
<td>{{$income->taxes}}</td>
|
||||||
</tr>
|
<td>{{$income->total}}</td>
|
||||||
@endforeach
|
</tr>
|
||||||
</tbody>
|
@endforeach
|
||||||
</table>
|
</tbody>
|
||||||
<hr style="width: 100%; height:2px; border-width:0; background-color:#6c757d; margin-top: 0px; margin-bottom: 8px">
|
</table>
|
||||||
|
<hr style="width: 100%; height:2px; border-width:0; background-color:#6c757d; margin-top: 0px; margin-bottom: 8px">
|
||||||
|
@endif
|
||||||
<span style="margin:auto; display:table; font-size: 18px; font-weight:700">{{__('This year')}}:
|
<span style="margin:auto; display:table; font-size: 18px; font-weight:700">{{__('This year')}}:
|
||||||
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
<i data-toggle="popover" data-trigger="hover" data-html="true"
|
||||||
data-content="{{ __('Payments in this time window') }}:<br>{{$counters['taxPayments']['thisYear']->timeStart}} - {{$counters['taxPayments']['thisYear']->timeEnd}}"
|
data-content="{{ __('Payments in this time window') }}:<br>{{$counters['taxPayments']['thisYear']->timeStart}} - {{$counters['taxPayments']['thisYear']->timeEnd}}"
|
||||||
|
|
Loading…
Reference in a new issue