<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>QUOTATION</title>
    <link rel="stylesheet" href="{{ asset('invoice/css/style.css') }}" type="text/css" />
    <link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/droid-arabic-kufi" type="text/css" />
</head>

<body>
    <page size="A4">

        <header>
            <img src="{{ asset('invoice/img/logo.png') }}" width="790" height="130" alt="mahmoud" />
        </header>
        <div class="titel">
            <h1 id="title">
                QUOTATION
            </h1>
        </div>
        <!---------------------------------->
        <h4 id="no"> No: {{ str_replace('INVOICE', 'B', $quo->invoice) }} </h4>


        <div id="name-d">
            <p> Date : <?php echo $quo->dated; ?></p>
            customer name
            <input type="text " style="background-color: azure" value="{{ $quo->customer->customer_name }}">
            number phone
            <input type="text" style="background-color:floralwhite" value="{{ $quo->customer->customer_contact }}">

        </div>

        <div class="main-body">
            <table border="1">
                <tbody>
                    <tr style="background-color: #F49170">
                        <td>s</td>
                        <td> description</td>
                        <td> unit price </td>
                        <td> Quantity </td>
                        <td> Total</td>
                        <td> Notes </td>
                    </tr>
                    @php
                        $totals_itm = 0;
                    @endphp
                    @foreach ($quo->quotationDetails as $qd)
                        <tr>
                            <td>{{ $loop->iteration }}</td>
                            <td>{{ $qd->item_name }}</td>
                            <td>{{ formatAmount($qd->item_price) }}</td>
                            <td>{{ formatAmount($qd->item_qty) }}</td>
                            <td>{{ formatAmount($qd->item_total) }}</td>
                            <td>&nbsp;</td>
                        </tr>
                        @php
                            $totals_itm += $qd->item_total;
                        @endphp
                    @endforeach
                        <tr>
                            <td colspan="4" style="text-align:center;">TOTAL</td>
                            <td>{{ formatAmount($totals_itm)}}</td>
                            <td>&nbsp;</td>
                        </tr>
                </tbody>
            </table>

        </div>

        <br>

        <div class="fff">
            <table border="1">
                <tbody>
                    <tr>
                        <td style="background-color: beige">subtotal</td>
                        <td>{{ formatAmount($quo->sub_total)}}</td>
                    </tr>
                    <tr>
                        <td style="background-color: burlywood">Discount</td>
                        <td>{{ formatAmount($quo->discount)}}</td>
                    </tr>
                    <tr>
                        <td style="background-color: cornsilk">Grand Total</td>
                        <td>{{ formatAmount($quo->grand_total)}}</td>
                    </tr>
                    <tr>
                        <td style="background-color: darkgrey">Advance</td>
                        <td>{{ formatAmount($quo->advance)}}</td>
                    </tr>
                </tbody>
            </table>
            <br>

            Signature :
            <input type="text" style="width: 319px; height: 21px; border-radius: 5px; background-color:aliceblue">


        </div>


        <!------------------------------------------------------------------------>
        <br>

        <div class="supfooter">
            <h3> Terms and Conditions :</h3>
            <?php //echo str_replace("\n", '</p>', $notes); ?>
        </div>

    </page>
</body>

</html>
