|
@@ -8,8 +8,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</header>
|
|
</header>
|
|
|
- <section id="subheader" class="">
|
|
|
|
|
- <div class="row g-3">
|
|
|
|
|
|
|
+ <section id="subheader" class="" wire:ignore>
|
|
|
|
|
+ <div class="row g-3">
|
|
|
<div class="col-md-3">
|
|
<div class="col-md-3">
|
|
|
Utente
|
|
Utente
|
|
|
<select name="search_member_id" class="form-select filterMember" wire:model.delay="filterMember">
|
|
<select name="search_member_id" class="form-select filterMember" wire:model.delay="filterMember">
|
|
@@ -384,26 +384,30 @@
|
|
|
</thead>
|
|
</thead>
|
|
|
<tbody id="checkall-target">
|
|
<tbody id="checkall-target">
|
|
|
@php $count = 0; @endphp
|
|
@php $count = 0; @endphp
|
|
|
- @foreach($records as $record)
|
|
|
|
|
- @if($record->date != '')
|
|
|
|
|
- @php
|
|
|
|
|
- $bg = $count % 2 == 0 ? 'white' : '#f2f4f7';
|
|
|
|
|
- @endphp
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td style="background-color: {{$bg}}">{{ date("d/m/Y", strtotime($record->date)) }}</td>
|
|
|
|
|
- <td style="background-color: {{$bg}}">{{in_array($record->type, ['MOVE_IN','MOVE_OUT']) ? '' : ($record->commercial ? 'Commerciale' : 'Non commerciale') }}</td>
|
|
|
|
|
- <td style="background-color: {{$bg}}; width: 22%; white-space: pre-line;">{{ $record->causal_name }}</td>
|
|
|
|
|
- <td style="background-color: {{$bg}}; width: 22%">@if($record->type === 'IN'){{ $record->member->first_name }} {{ $record->member->last_name }}@elseif($record->type === 'OUT'){{ @$record->supplier->name }}@endif</td>
|
|
|
|
|
- <td style="background-color: {{$bg}}">{{$record->deleted ? 'Annullata' : '' }}</td>
|
|
|
|
|
- <td style="background-color: {{$bg}}; text-align: right; color: green">{{ in_array($record->type, ['IN','MOVE_IN']) ? formatPrice($record->amount) : '' }}</td>
|
|
|
|
|
- <td style="background-color: {{$bg}}; text-align: right; color: red">{{ in_array($record->type, ['OUT','MOVE_OUT']) ? formatPrice($record->amount) : '' }}</td>
|
|
|
|
|
- <td style="background-color: {{$bg}}; padding-left:20px;">{{ in_array($record->type, ['OUT','MOVE_OUT']) ? $record->origin : '' }}</td>
|
|
|
|
|
- <td style="background-color: {{$bg}}">{{in_array($record->type, ['IN','MOVE_IN']) ? $record->destination : '' }}</td>
|
|
|
|
|
- <td style="background-color: {{$bg}}">{{in_array($record->type, ['MOVE_IN','MOVE_OUT']) ? '' : $record->payment_method->name }}</td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- @php $count++; @endphp
|
|
|
|
|
- @endif
|
|
|
|
|
- @endforeach
|
|
|
|
|
|
|
+ @if (!empty($records))
|
|
|
|
|
+ @foreach($records as $record)
|
|
|
|
|
+ @if($record->date != '')
|
|
|
|
|
+ @php
|
|
|
|
|
+ $bg = $count % 2 == 0 ? 'white' : '#f2f4f7';
|
|
|
|
|
+ @endphp
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td style="background-color: {{$bg}}">{{ date("d/m/Y", strtotime($record->date)) }}</td>
|
|
|
|
|
+ <td style="background-color: {{$bg}}">{{in_array($record->type, ['MOVE_IN','MOVE_OUT']) ? '' : ($record->commercial ? 'Commerciale' : 'Non commerciale') }}</td>
|
|
|
|
|
+ <td style="background-color: {{$bg}}; width: 22%; white-space: pre-line;">{{ $record->causal_name }}</td>
|
|
|
|
|
+ <td style="background-color: {{$bg}}; width: 22%">@if($record->type === 'IN'){{ $record->member->first_name }} {{ $record->member->last_name }}@elseif($record->type === 'OUT'){{ @$record->supplier->name }}@endif</td>
|
|
|
|
|
+ <td style="background-color: {{$bg}}">{{$record->deleted ? 'Annullata' : '' }}</td>
|
|
|
|
|
+ <td style="background-color: {{$bg}}; text-align: right; color: green">{{ in_array($record->type, ['IN','MOVE_IN']) ? formatPrice($record->amount) : '' }}</td>
|
|
|
|
|
+ <td style="background-color: {{$bg}}; text-align: right; color: red">{{ in_array($record->type, ['OUT','MOVE_OUT']) ? formatPrice($record->amount) : '' }}</td>
|
|
|
|
|
+ <td style="background-color: {{$bg}}; padding-left:20px;">{{ in_array($record->type, ['OUT','MOVE_OUT']) ? $record->origin : '' }}</td>
|
|
|
|
|
+ <td style="background-color: {{$bg}}">{{in_array($record->type, ['IN','MOVE_IN']) ? $record->destination : '' }}</td>
|
|
|
|
|
+ <td style="background-color: {{$bg}}">{{in_array($record->type, ['MOVE_IN','MOVE_OUT']) ? '' : $record->payment_method->name }}</td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ @php $count++; @endphp
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ @else
|
|
|
|
|
+ <tr><td colspan="10" class="text-center">Nessun dato presente</td></tr>
|
|
|
|
|
+ @endif
|
|
|
</tbody>
|
|
</tbody>
|
|
|
@if($total_in > 0 || $total_out > 0)
|
|
@if($total_in > 0 || $total_out > 0)
|
|
|
<tfoot>
|
|
<tfoot>
|