<x-card title="Détail de la {{ $detail_type }}" classBody="p-0">
    <table class="table table-bordered table-hover w-100 ">
        <thead class="thead-light">
            <th>Nom</th>
            <th>Quantité</th>
            <th>PU HT</th>
            <th>Total HT</th>
            <th>TVA</th>
            <th>Montant TVA</th>
            <th>Total TTC</th>
        </thead>
        <tbody>
            @foreach ($order['detail'] as $detail)
                <tr>
                    <td>{{ $detail['name'] }}</td>
                    <td class="text-right">{{ $detail['quantity'] }}</td>
                    <td class="text-right">{{ $detail['price'] }}</td>
                    <td class="text-right">{{ $detail['total'] }}</td>
                    <td class="text-right">{{ $detail['vat'] }}</td>
                    <td class="text-right">{{ $detail['total_tax'] }}</td>
                    <td class="text-right">{{ $detail['total_taxed'] }}</td>
                </tr>
            @endforeach
        </tbody>
        <tfoot>
            <tr>
                <td style="font-size: 1.2em; font-weight: bold;">Total</td>
                <td></td>
                <td></td>
                <td style="font-size: 1.2em; font-weight: bold;" class="text-right">
                    {{ $order['total'] }}
                </td>
                <td></td>
                <td class="text-right">{{ $order['taxes'] }}</td>
                <td style="font-size: 1.2em; font-weight: bold;" class="text-right">
                    {{ $order['total_taxed'] }}
                </td>
            </tr>
            @if ($order['shipping'] ?? false)
                <tr>
                    <td style="font-size: 1.1em; font-weight: 500;">Livraison</td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td style="font-size: 1.1em; font-weight: bold;" class="text-right">
                        {{ $order['shipping'] }}
                    </td>
                </tr>
                <tr>
                    <td style="font-size: 1.4em; font-weight: bold;">Total à payer</td>
                    <td></td>
                    <td></td>
                    <td class="text-right">{{ $order['total'] }}</td>
                    <td></td>
                    <td class="text-right">{{ $order['taxes'] }}</td>
                    <td style="font-size: 1.4em; font-weight: bold;" class="text-right">
                        {{ $order['total_shipped'] }}
                    </td>
                </tr>
            @endif
        </tfoot>
    </table>
</x-card>
