<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>خسارات وارده به ابنیه فنی</title>
</head>
<body>
<table>
    <thead>
    <tr>
        <th colspan="16" style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;text-align:center;">
            تاریخ دریافت گزارش: {{verta()->now()->format('Y/m/d H:i')}}
        </th>
    </tr>
    <tr>
        <th colspan="16" style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;"></th>
    </tr>
    <tr>
        <th colspan="16" style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">گزارش کلی خسارات وارده</th>
    </tr>

    <tr>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">کد یکتا</th>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">استان</th>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">شهرستان</th>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">نام محور</th>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">نام راننده</th>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">کد ملی راننده</th>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">شماره موبایل راننده</th>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">پلاک</th>
        <th style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">نوع تصادف</th>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">تاریخ تصادف</th>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">مبلغ کل خسارت</th>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">مبلغ فیش</th>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">مبلغ بیمه</th>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">مبلغ داغی</th>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">تاریخ ثبت</th>
        <th  style="border: 1px solid black;text-align: center;background-color: #EBF1DE;">وضعیت</th>
    </tr>
    </thead>

    <tbody>
    @foreach ($data as $item)
        <tr>
            <td style="border: 1px solid black;text-align: center;">{{$item->id}}</td>
            <td style="border: 1px solid black;text-align: center;">{{$item->province_fa}}</td>
            <td style="border: 1px solid black;text-align: center;">{{$item->city_fa}}</td>
            <td style="border: 1px solid black;text-align: center;">{{$item->axis_name}}</td>
            <td style="border: 1px solid black;text-align: center;">{{$item->driver_name}}</td>
            <td style="border: 1px solid black;text-align: center;">{{$item->driver_national_code}}</td>
            <td style="border: 1px solid black;text-align: center;">{{$item->driver_phone_number}}</td>
            <td style="border: 1px solid black;text-align: center;">{{$item->plaque}}</td>
            <td style="border: 1px solid black;text-align: center;">{{$item->accident_type_fa}}</td>
            <td style="border: 1px solid black;text-align: center;">{{Hekmatinasser\Verta\Verta::instance($item->accident_date)->format('Y/n/j')}} {{$item->accident_time}}</td>
            <td style="border: 1px solid black;text-align: center;">{{$item->sum ?? 0}}</td>
            <td style="border: 1px solid black;text-align: center;">{{$item->final_amount ?? 0}}</td>
            <td style="border: 1px solid black;text-align: center;">{{$item->deposit_insurance_amount ?? 0}}</td>
            <td style="border: 1px solid black;text-align: center;">{{$item->deposit_daghi_amount ?? 0}}</td>
            <td style="border: 1px solid black;text-align: center;">{{Hekmatinasser\Verta\Verta::instance($item->created_at)->format('Y/n/j')}}</td>
            <td style="border: 1px solid black;text-align: center;">{{$item->status_fa}}</td>
        </tr>
    @endforeach
    </tbody>
</table>
</body>
</html>
