<!DOCTYPE html>
<html >

    <head>
        <meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />

        <!--<title >طباعة الفاتوره</title>-->

        <style>


            html {
                font-size: 10px;
                -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            }

            body {
                font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
                font-size: 10px;
                line-height: 1.42857143;
                color: #333;
                background-color: #fff;
            }



            @media print {

            }

            * { margin: 0; padding: 0; }
            .page-wrap { width:98%; margin: 0 auto; }

            @font-face {
                font-family: 'Expo Arabic Book';
                src: url('fonts/ExpoArabic-Book.eot');
                src: url('fonts/ExpoArabic-Book.eot?#iefix') format('embedded-opentype'),
                    url('fonts/ExpoArabic-Book.woff2') format('woff2'),
                    url('fonts/ExpoArabic-Book.woff') format('woff'),
                    url('fonts/ExpoArabic-Book.ttf') format('truetype'),
                    url('fonts/ExpoArabic-Book.svg#ExpoArabic-Book') format('svg');
                font-weight: normal;
                font-style: normal;
            }

            table { border-collapse: collapse; }
            table td, table th {
                padding: 0px;
                vertical-align: middle;
                text-align: left;
                color:#444;
                -webkit-print-color-adjust: exact;
                -moz-print-color-adjust: exact;
                print-color-adjust: exact;
                font-family:  'Expo Arabic Book'!important;
            }
            h5{
                color:#444;
                font-weight: 100;
                -webkit-print-color-adjust: exact;
                -moz-print-color-adjust: exact;
                print-color-adjust: exact;
                font-family:  'Expo Arabic Book'!important;
            }
            table.data td, table.data td{
                font-size: 10px
            }
            .foot{
                text-align: center
            }
            table{
                width:100%
            }
            .hr{
                margin: 0px 0 ;
            }
            hr{
                border: 1px dotted #444;
                margin: 1px;
                -webkit-print-color-adjust: exact;
                -moz-print-color-adjust: exact;
                print-color-adjust: exact;
            }

            .head{
                font-weight: bold
            }
            .text-right{
                text-align: right!important
            }
            .text-center{
                text-align: center!important
            }
            .lg-size{
                font-size: 12px
            }
            .md-size{
                font-size: 10px
            }
        </style>
        {literal}

        <script language="javascript" type="text/javascript">
            /*$(document).ready(function() {
             //window.print();

             // printDiv();
             });*/
            function printDiv() {

                var divId = document.getElementById('printdiv');
                divId.setAttribute("className", "print_section print");
                divId.setAttribute("class", "print_section print");
                window.print();
                setTimeout(window.close, 0);
                // window.close();
            }
        </script>
        {/literal}
    </head>

    <body  dir='ltr' onLoad="printDiv()">
        <div class="page-wrap" id="printdiv">

            <table>
                <tbody>
                    {if $clientFlag == 1}
                    <tr>
                        <td >Location</td>
                        <td class="md-size">
                            {if $delivery->clientaddress == 1}
                            {$client->clientaddress}
                            {/if}
                            {if $delivery->clientdetails == 1}
                            {$client->clientdetails}
                            {/if}
                        </td>
                    </tr>
                    <tr>
                        <td >Phone</td>
                        <td class="md-size">
                            {if $delivery->clientmobile == 1}
                            {$client->clientmobile}
                            {/if}
                            {if $delivery->clientphone == 1}
                            {if $delivery->clientmobile == 1}
                            <br/>
                            {/if}
                            {$client->clientphone}
                            {/if}
                        </td>
                    </tr>
                    <tr>
                        <td >Name</td>
                        <td class="md-size">
                            {$client->clientname}
                        </td>
                    </tr>
                    {/if}
                    <tr>
                        <td class="head">Order</td>
                        <td>{$restaurantOrder->daySreial}</td>
                    </tr>
                    <tr>
                        <td class="head">Check.#</td>
                        <td class="head md-size">For Review</td>
                    </tr>
                    <tr>
                        <td class="head">Station</td>
                        <td>pos</td>
                        <td >Shift</td>
                        <td>231</td>
                    </tr>
                    <tr>
                        <td class="head">Date</td>
                        <td>{$restaurantOrder->sysdate}</td>
                    </tr>
                    <tr>
                        <td class="head">BTS Name</td>
                        <td>Gehan</td>
                    </tr>
                    <tr>
                        <td class="head">Opneded</td>
                        <td>{$restaurantOrder->opened}</td>
                    </tr>
                    <tr>
                        <td class="head">
                            Table
                        </td>
                        <td>{$restaurantOrder->tableId}</td>
                        <td >Persons</td>
                        <td>2</td>
                    </tr>
                </tbody>
            </table>

            <div class="hr">
                <hr> <hr>
            </div>

            <table id="items" style="margin-bottom:5px" class="data">

                <tbody>
                    {assign var=i value=1}
                    {assign var=total value=0}
                    {foreach $restaurantOrderDetails as $product}
                    <tr class="item-row">
                        <td class="text-center head">{$i}</td>
                        <td class="head">{$product->productName}</td>
                        <td class="text-right head">{$product->quantity}</td>
                        <td class="text-right head">{$product->price}</td>
                        {assign var=proTotal value=$product->quantity*$product->price}
                        <!--<td class="text-right head">{$proTotal}</td>{*$product->total*}-->
                    </tr>
                    {assign var=total value=$total+$proTotal}
                    {assign var=i value=$i+1}
                    {/foreach}
                </tbody>

            </table>

            <div class="hr">
                <hr> <hr>
            </div>

            <table>
                <tbody>
                    {if $restaurantOrder->discount !=0}
                    <tr>
                        <td class="head md-size">Discount</td>
                        <td class="text-right head md-size">{$restaurantOrder->discount}</td>
                    </tr>
                    {/if}
                    {if $restaurantOrder->tax !=0}
                    <tr>
                        <td class="head md-size">VAT</td>
                        <td class="text-right head md-size">{$restaurantOrder->tax}</td>
                    </tr>
                    {/if}
                    <tr>
                        <td class="head lg-size">G.Total</td>
                        <td class="text-right head lg-size">{$total+$restaurantOrder->tax-$restaurantOrder->discount}{*$restaurantOrder->netBill*}</td>
                    </tr>
                </tbody>
            </table>

            <div class="hr">
                <hr> <hr>
            </div>

            <h5 class="foot">Welcome To {$Programsettingdata->companyname}</h5>


        </div>


    </body>

</html>