<!DOCTYPE html>
<html lang="en" dir="rtl">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>الحوالات</title>
    <style>
              body {
            font-family: 'XB Riyaz';

            font-size: 17px;
        }
.foot{
    background-color: rgb(158, 249, 249);
    border-radius: 5px ;
}
th{
    padding: 3px;
}
        td ,td{
            font-family: 'XB Riyaz';
            margin: 0;
            text-align: center
        }

        a,
        span,
        td {
            font-family: 'XB Riyaz'
        }

        @page {
            header: page-header;
            footer: page-footer;
        }
h3{
    font-family: 'Cairo', sans-serif;
            color: #555;
}

    </style>
</head>

<body dir="rtl">

    <table table autosize="1" width="100%">

        {{-- <tr class="header"width="100%" style="background: #a31e23;" >

            <th nowrap="nowrap" width="10%" style="padding:10px;">رقم الحوالة</th>
            <th nowrap="nowrap" width="20%" style="padding:5px;">المستلم</th>
            <th nowrap="nowrap" width="20%" style="padding:5px;">المرسل</th>
            <th nowrap="nowrap" width="15%" style="padding:5px;">الكمية</th>
            <th nowrap="nowrap" width="10%" style="padding:5px;">النوع</th>
            <th nowrap="nowrap" width="25%" style="padding:5px;">الحالة</th>
        </tr>
 --}}


        @isset($transfers)

            @foreach ($transfers as $transfer)
                <tr width="100%">
                    <th nowrap="nowrap" width="10%">

                        {{ $transfer->id }}

                        </td>
                    <th nowrap="nowrap" width="20%">


                        {{ $transfer->recipient_name }}

                        </td>
                    <th nowrap="nowrap" width="20%">


                        {{ $transfer->sender->name }}</a>

                        </td>
                    <th nowrap="nowrap" width="15%">


                        {{ $transfer->quantity }} لتر

                        </td>
                    <th nowrap="nowrap" width="10%">


                        @if ($transfer->type == 0)
                            بترول
                        @else
                            ديزيل
                        @endif

                        </td>
                    <td nowrap="nowrap" width="25%" style="text-align: center">

                        @if ($transfer->status == 0)
                            قيد الانتظار
                        @elseif($transfer->status == 1)
                            مستلمة
                        @elseif($transfer->status == 2)
                            ملغية
                        @else
                            معلقة من
                            المدير
                        @endif

                    </td>

                </tr>
            @endforeach
        @endisset



    </table>
    <htmlpageheader name="page-header" style="margin-bottom: 20px">
        {{--  --}}
        <table table autosize="1" width="100%">
            <tr class="header"width="100%" style="background: #a31e23;" >

                <th nowrap="nowrap" width="10%" >رقم الحوالة</th>
                <th nowrap="nowrap" width="20%" >المستلم</th>
                <th nowrap="nowrap" width="20%" >المرسل</th>
                <th nowrap="nowrap" width="15%" >الكمية</th>
                <th nowrap="nowrap" width="10%" >النوع</th>
                <th nowrap="nowrap" width="25%" >الحالة</th>
            </tr>
            </tr>
        </table>
    </htmlpageheader>

    <htmlpagefooter name="page-footer">
        <table class="foot" table autosize="1" width="100%" >
            <tr width="100%">
                <td width="33%" style="margin:10px" style="text-align: center">
                    <span>الجمهورية اليمنية -  صنعاء </span>
                    <span> 777552689 -7775522669   </span>
                </td>
                <td width="36%" style="margin:10px" style="text-align: center">
                    <h4 style="text-align: center" width="100%">
                        <span> محطة حنيش </span>
                        <span> - الحوالات اليومية </span>
                    </h4>

                </td width="30%" style="margin:10px;text-align: center">
                <td>
                    <span style="display: block"> الوقت والتاريخ : 20-07-2022  </span>
                    <span style="display: block">  رقم المرجع : 524897  </span>

                </td>
            </tr>
        </table>
    </htmlpagefooter>
</body>

</html>
