@foreach($invoices as $invoice)
<tr id="{{ $invoice['iid'] }}Row">
    <td class="text-center align-middle">
        <div class="form-check form-check-custom form-check-solid">
            <input class="form-check-input beInvoiceCheckbox" type="checkbox" value="1" data-iid="{{ $invoice['iid'] }}" id="invoiceCheckbox{{ $invoice['iid'] }}">
            <label class="form-check-label" for="invoiceCheckbox{{ $invoice['iid'] }}">
                {{ $invoice['iid'] }}
            </label>
        </div>
    </td>
    <td class="text-center align-middle">
        {{ $invoice['name'].' '.$invoice['surname'] }}
        <a href="{{ beGetRoute('admin.user.show',['uid' => $invoice['uid']]) }}">
            <span class="svg-icon svg-icon-2 text-warning">
                <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <path opacity="0.3" d="M4.7 17.3V7.7C4.7 6.59543 5.59543 5.7 6.7 5.7H9.8C10.2694 5.7 10.65 5.31944 10.65 4.85C10.65 4.38056 10.2694 4 9.8 4H5C3.89543 4 3 4.89543 3 6V19C3 20.1046 3.89543 21 5 21H18C19.1046 21 20 20.1046 20 19V14.2C20 13.7306 19.6194 13.35 19.15 13.35C18.6806 13.35 18.3 13.7306 18.3 14.2V17.3C18.3 18.4046 17.4046 19.3 16.3 19.3H6.7C5.59543 19.3 4.7 18.4046 4.7 17.3Z" fill="currentColor"></path>
                    <rect x="21.9497" y="3.46448" width="13" height="2" rx="1" transform="rotate(135 21.9497 3.46448)" fill="currentColor"></rect>
                    <path d="M19.8284 4.97161L19.8284 9.93937C19.8284 10.5252 20.3033 11 20.8891 11C21.4749 11 21.9497 10.5252 21.9497 9.93937L21.9497 3.05029C21.9497 2.498 21.502 2.05028 20.9497 2.05028L14.0607 2.05027C13.4749 2.05027 13 2.52514 13 3.11094C13 3.69673 13.4749 4.17161 14.0607 4.17161L19.0284 4.17161C19.4702 4.17161 19.8284 4.52978 19.8284 4.97161Z" fill="currentColor"></path>
                </svg>
            </span>
        </a>
    </td>
    <td class="text-center align-middle">{{ $invoice['idescription'] }}</td>
    <td class="text-center align-middle"><span class="badge badge-{{ $status[$invoice['istatus']][1] }}">{{ $status[$invoice['istatus']][0] }}</span></td>
    <td class="text-center align-middle"><span class="badge badge-warning">{{ $types[$invoice['itype']] }}</span></td>
    <td class="text-center align-middle"><span class="badge badge-{{ $bills[$invoice['ibill']][1] }}">{{ $bills[$invoice['ibill']][0] }}</span></td>
    <td class="text-center align-middle">{{ $invoice['iprice'].' '.$currencies[$invoice['cid']]['cicon'] }}</td>
    <td class="text-center align-middle">{{ $invoice['itaxprice'].' '.$currencies[$invoice['cid']]['cicon'] }}</td>
    <td class="text-center align-middle">{{ $invoice['idiscount'].' '.$currencies[$invoice['cid']]['cicon'] }}</td>
    <td class="text-center align-middle">{{ ($invoice['iprice']+$invoice['itaxprice']).' '.$currencies[$invoice['cid']]['cicon'] }}</td>
    <td class="text-center align-middle">{{ ($invoice['ipaymethod'] ? $modules[$invoice['ipaymethod']]['info']['name']:'<span class="text-danger">Bekleniyor</span>').($invoice['ipaydate'] > 0 ? '<br>(Ödenme Tarihi: '.beSpecialTime($invoice['ipaydate'],' H:i').')':'') }}</td>
    <td class="text-center align-middle">{{ beSpecialTime($invoice['iexpiredate'],' H:i') }}</td>
    <td class="text-center align-middle">{{ beSpecialTime($invoice['idateline']) }}</td>
    <td class="text-center align-middle">
        <a data-bs-toggle="tooltip" title="Görüntüle" href="{{ beGetRoute('admin.invoice.show',['iid' => $invoice['iid']]) }}" class="btn btn-warning">
            <span class="svg-icon svg-icon-xl">
                <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
                    <g stroke="none" stroke-width="1" fill="none">
                        <rect x="0" y="0" width="24" height="24"></rect>
                        <path d="M8,17.9148182 L8,5.96685884 C8,5.56391781 8.16211443,5.17792052 8.44982609,4.89581508 L10.965708,2.42895648 C11.5426798,1.86322723 12.4640974,1.85620921 13.0496196,2.41308426 L15.5337377,4.77566479 C15.8314604,5.0588212 16,5.45170806 16,5.86258077 L16,17.9148182 C16,18.7432453 15.3284271,19.4148182 14.5,19.4148182 L9.5,19.4148182 C8.67157288,19.4148182 8,18.7432453 8,17.9148182 Z" fill="#ffff" fill-rule="nonzero" transform="translate(12.000000, 10.707409) rotate(-135.000000) translate(-12.000000, -10.707409) "></path>
                        <rect fill="#ffff" opacity="0.3" x="5" y="20" width="15" height="2" rx="1"></rect>
                    </g>
                </svg>
            </span>
        </a>
        <a data-bs-toggle="tooltip" title="Sil" class="btn btn-danger btnInvoiceDelete" data-iid="{{ $invoice['iid'] }}">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="15" fill="currentColor"><path fill="none" d="M0 0h24v24H0z"/><path d="M7 4V2h10v2h5v2h-2v15a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6H2V4h5zM6 6v14h12V6H6zm3 3h2v8H9V9zm4 0h2v8h-2V9z"/></svg>
        </a>
    </td>
</tr>
@endforeach