<html>
<head>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-8 col-xs-offset-0 col-sm-offset-0 col-md-offset-2">
            <div class="row">
                <div class="col-xs-6 col-sm-6 col-md-6">
                    <address>
                        <img style="width: 100px; height: 100px" src="{{asset('global/portraits/17.png')}}"/>
                        <br>
                        finance{{htmlentities('@')}}mtn.deywuro.con<br />
                    </address>
                </div>
                <div class="col-xs-6 col-sm-6 col-md-6 text-right">
                    <p style="">
                        <h1>INVOICE</h1>
                    </p><br />
                    <p>
                        <em><u>Date</u></em>: <strong>{{\Carbon\Carbon::today()->format('d/m/Y')}}</strong> <br />
                        <em><u>Invoice</u></em>  <strong>#{{str_pad($record['receiptNo'], 8, '0', STR_PAD_LEFT)}}</strong>
                    </p>
                </div>
            </div>


            <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-12 text-left">
                    <b><u>Bill To</u>:</b><br />
                    <em>Name</em>: &nbsp;  &nbsp;  &nbsp;&nbsp;  &nbsp; &nbsp;  &nbsp;  &nbsp;  &nbsp;<strong>{{$record['name']}}</strong> <br />
                    <em>Company</em>  &nbsp;  &nbsp; &nbsp;  &nbsp; &nbsp;  &nbsp;  &nbsp;  <strong>{{$record['company']}}</strong> <br />
                    <em>Address</em>  &nbsp;  &nbsp; &nbsp;  &nbsp; &nbsp;  &nbsp;  &nbsp;  &nbsp;   <strong>{{$record['address']}}</strong> <br />
                    <em>City, State ZIP</em>  &nbsp; &nbsp;  &nbsp; <strong>{{$record['city']}}</strong> <br />
                    <br />
                    <b>Comments or Special Instructions</b>: {{$record['comment']}}
                </div>
            </div><br />

            <div class="row">
                <table class="table table-responsive table-bordered table-condensed">
                    <thead>
                        <tr style="font-weight: bold">
                            <td>QUANTITY</td><td>DESCRIPTION</td><td>UNIT PRICE</td><td>AMOUNT</td>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach($record['data'] as $data)
                            <tr>
                                <td>{{$data['quantity']}}</td>
                                <td>{{$data['description']}}</td>
                                <td>{{$data['unit_price']}}</td>
                                <td>{{$data['amount']}}</td>
                            </tr>
                        @endforeach
                        <tr><td colspan="4">&nbsp;</td></tr>
                        <tr>
                            <td colspan="3" style="font-weight: bold" class="text-right">SUBTOTAL &nbsp; </td>
                            <td>{{$record['sub_total']}}</td>
                        </tr>
                        <tr>
                            <td colspan="3" style="font-weight: bold" class="text-right">CST &nbsp; </td>
                            <td>{{$record['cst']}}</td>
                        </tr>
                        <tr>
                            <td colspan="3" style="font-weight: bold" class="text-right">VAT & NHIL &nbsp; </td>
                            <td>{{$record['vat']}}</td>
                        </tr>
                        <tr>
                            <td colspan="3" style="font-weight: bold" class="text-right">SALES TAX &nbsp; </td>
                            <td>{{$record['tax']}}</td>
                        </tr>
                        <tr>
                            <td colspan="3" style="font-weight: bold" class="text-right">SHIPPING & HANDLING &nbsp; </td>
                            <td>{{$record['shipping']}}</td>
                        </tr>
                        <tr>
                            <td colspan="3" style="font-weight: bolder" class="text-right"><u>TOTAL</u> &nbsp; </td>
                            <td><b>{{$record['total']}}</b></td>
                        </tr>

                    </tbody>
                </table>
            </div><br />

            <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-12 text-left" >
                    Make all Cheques payable to <b>Npontu UMB, Osu Branch A/C 0211333726034</b><br />
                    <b>Bank code: 100101 Swift code: MBGHGHAC</b><br />
                    For any questions concerning this invoice, contact Deborah Asmah, +233243375520, dasmah@npontu.com
                </div>
            </div>

            <div>
                <h3 style="text-align:center;">
                    THANK YOU FOR YOUR BUSINESS!
                </h3>
            </div>
        </div>
    </div>
</div>
</body>
</html>
