This commit is contained in:
ludo
2023-11-25 20:23:21 +01:00
parent be468304c9
commit fcc564b6d8
7 changed files with 46 additions and 44 deletions

View File

@@ -45,17 +45,13 @@
])
</div>
<div class="col-6">
@include('components.form.select', [
'label' => 'Règlement',
'name' => 'payment_type',
'list' => $payment_types ?? [],
'value' => $invoice['order']['payment_type'],
'class' => 'select2',
'disabled' => false,
])
</div>
</div>
@include('Admin.Shop.Invoices.partials.payments')
<x-card class="bg-darker">
@include('Admin.Shop.Invoices.partials.payments', [
'payments' => $invoice['payments'] ?? false,
])
</x-card>
</div>
</div>
<div class="row mb-3">

View File

@@ -7,8 +7,24 @@
</div>
</div>
@if ($payments ?? false)
@foreach ($payments as $payment)
@endforeach
<table class="table">
<thead>
<th>Date</th>
<th>Type</th>
<th class="text-right">Montant</th>
<th>Ref</th>
</thead>
<tbody>
@foreach ($payments as $payment)
<tr>
<td>{{ $payment['date'] }}</td>
<td>{{ $payment_types[$payment['payment_type']] }}</td>
<td class="text-right font-weight-bold">{{ sprintf('%01.2f', $payment['amount']) }} </td>
<td>{{ $payment['reference'] }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif
@push('js')