<html>
    <head>

        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>GT4</title>
        <style type="text/css">
        </style>
        <style>
            .td td
            {
                border-right-widtd: 1px;
                border-bottom-widtd: 1px;
                border-left-widtd: 0px;
                border-top-style: none;
                border-right-style: dotted;
                border-bottom-style: solid;
                border-left-style: none;
                border-bottom-color: #999;
                font-size: 22px;
                border-right-color: #999;
            }
            .NEE
            {
                font-size: 14px;
            }
            .newdesign
            {
                font-size: 14px;
            }
            .copywrites
            {
                font-size: 11px;
            }
        </style>

    </head>
    <script src="../views/default/assets/js/jquery.js"></script>


    {literal}

    <script language="javascript" type="text/javascript">

        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>
    <style>
        td{font-size:20px;
           font-weight: 200;


        }
        .td td
        {
            border-right-widtd: 1px;
            border-bottom-widtd: 1px;
            border-left-widtd: 0px;
            border-top-style: none;
            border-right-style: dotted;
            border-bottom-style: solid;
            border-left-style: none;
            border-bottom-color: #999;
            font-size: 20px;
            border-right-color: #999;
        }
        .NEE
        {
            font-size: 14px;
        }
        .newdesign
        {
            font-size: 14px;
        }
        .copywrites
        {
            font-size: 11px;
        }
    </style>
    <style>
        .td td
        {
            border-right-widtd: 1px;
            border-bottom-widtd: 1px;
            border-left-widtd: 0px;
            border-top-style: none;
            border-right-style: dotted;
            border-bottom-style: solid;
            border-left-style: none;
            border-bottom-color: #999;
            font-size: 20px;
            border-right-color: #999;
        }
        .NEE
        {
            font-size: 14px;
        }
        .newdesign
        {
            font-size: 14px;
        }
        .copywrites
        {
            font-size: 11px;
        }
        .style2 {
            font-family: tahoma
        }
        .style4 {font-family: tahoma; font-size: 16px; font-weight: bold;
                 border: 1px solid  #999  !important;
        }
        .serial {
            background-color: #C8C8C8;
            height: 20px;
            width: 150px;
            padding: 5px;
            margin: 5px;
            border: medium double #000000;
            text-align: center;
        }
        .style1 {
            font-size: 20px
        }
        .rtl{
            direction: rtl;
        }


    </style>
    {/literal}

    <body onLoad="printDiv()">
        <div align="center" id="printdiv" >
            <b>
                <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="table-black">
                    <tr>
                        <td  colspan="6" style="text-align: center;font-size: 20px;font-weight: 900;"><center>
                        <img style="display: block" src="../views/default/images/upload/{$Programsettingdata->logo}" alt="" width="230" height="122"></center>
                    <span>{$Programsettingdata->companyname}</span>
                    </td>
                    </tr>
                    <tr>
                        <td  colspan="6" style="text-align: center;padding: 11px;"><center>
                        <span style="border: 1px solid;padding: 5px;border-radius: 14px;font-size: 20px;font-weight: 900;">فاتورة  ضريبة  مبسطه </span>
                        </td>
                        </tr>
                        <tr>
                            <td  colspan="6" style="text-align: center;">
                                <span>الرقم الضريبى    {$Programsettingdata->taxcard}</span>
                            </td>
                        </tr>
                        <tr>
                        <table border="1">
                            <tr style="text-align: center;">
                                <td>{$restaurantOrder->sysdate}</td>
                                <td>الوقت   / التاريخ</td>
                            </tr>
                            <tr style="text-align: center;">
                                <td>{$restaurantOrder->daySreial}</td>
                                <td>رقم الفاتوره</td>
                            </tr>
                            <tr style="text-align: center;">
                                <td>{$client->clientid}</td>
                                <td> كود العميل</td>
                            </tr>
                            <tr style="text-align: center;">
                                <td>{$client->clientname}</td>
                                <td>اسم العميل</td>
                            </tr>
                            <tr style="text-align: center;">
                                <td>{$userData->employeename}</td>
                                <td>الكاشير</td>
                            </tr>
                            <tr style="text-align: center;">
                                {if $Programsettingdata->valueadded == 1}
                                <td colspan="2">اسعار المنتجات شامله القيمة المضافه</td>
                                {else}
                                <td colspan="2">اسعار المنتجات غير شامله القيمة المضافه</td>

                                {/if}
                            </tr>
                        </table>
                        </tr>
                        <tr>
                            <td colspan="6">
                                <table width="100%" border="0" cellpadding="2" cellspacing="7" class="table-black1">
                                    <tr>
                                        <td width="7%" align="center" bgcolor="#B4B4B4" class="style4">اجمالى</td>
                                        <td width="7%" align="center" bgcolor="#B4B4B4" class="style4">السعر</td>
                                        <td width="7%" align="center" bgcolor="#B4B4B4" class="style4">الكميه</td>
                                        <td width="79%" align="center" bgcolor="#B4B4B4" class="style4">الصــــــــنف</td>

                                    </tr>
                                    {assign var=i value=1}
                                    {assign var=total value=0}
                                    {foreach $restaurantOrderDetails as $product}
                                    <tr>
                                        {assign var=proTotal value=$product->quantity*$product->price}
                                        <td align="right" class="style2 style1">{$proTotal}</td>{*$product->total*}
                                        <td align="right" class="style2 style1">{$product->price}</td>
                                        <td align="right" class="style2 style1">{$product->quantity}</td>
                                        <td align="right" class="style2 style1">{$product->productName}</td>
                                    </tr>
                                    {assign var=total value=$total+$proTotal}
                                    {assign var=i value=$i+1}
                                    {/foreach}
                                    <tr>
                                        <td colspan="2" width="2%" align="left">items total</td>
                                        <td colspan="1" width="2%" align="center">{$restaurantOrder->totalBill}</td>
                                        <td colspan="1" width="2%" align="right">اجمالى مبيعات الفاتوره </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" width="2%" align="left"> VAT 15 %</td>
                                        <td colspan="1" width="2%" align="center">{$restaurantOrder->tax}</td>
                                        <td colspan="1" width="2%" align="right">%ضريبة القيمة المضافه  15 </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" width="2%" align="left"> Net final</td>
                                        <td colspan="1" width="2%" align="center">{$restaurantOrder->netBill}</td>
                                        <td colspan="1" width="2%" align="right">الاجمالى النهائى شامل الضريبة   </td>
                                    </tr>
                                    <tr >

                                        <td colspan="5"  align="center" style="border: 1px dashed;border-bottom: 0px">{$restaurantOrder->netBill} =  المبلغ المدفوع نقدى   </td>


                                    </tr>
                                    <tr >

                                        <td colspan="5"  align="center" style="border: 1px dashed;border-top: 0px">0 المبلغ المتبقى   </td>

                                    </tr>
                                    <tr >

                                        <td colspan="5"  align="center" style="border-top: 1px  solid;border-bottom: 1px solid;">{$Programsettingdata->address} </td>

                                    </tr>

                                </table>
                            </td>
                        </tr>
                </table>
                <table border="2">
                    <tr>
                        <td  width="50%" align="center">{$Programsettingdata->phone}</td>
                        <td width="30%" align="center" style="font-weight: 900;">هاتف</td>
                    </tr>
                    <tr>
                        <td width="50%" align="center">{$Programsettingdata->email}</td>
                        <td width="30%" align="center"  style="font-weight: 900;">الايميل</td>
                    </tr>
                </table>
                <hr/>
                <div style="text-align: center;">
                    <h2>{$Programsettingdata->printfoot}</h2>
                    <p style="font-size:30px;font-weight: 900;margin: 0px !important;">*************************************************</p>
                </div>

            </b>
        </div>
    </body>
    {if $qrerp > 1}
    <div style="text-align: center;">
        {if $qrerp == 3 ||  $qrerp == 4}
        <img src="data:image/jpeg;base64,{$base64qr}" style="width:250px;height: 250px;"/>
        {/if}
        {if $qrerp == 2 ||  $qrerp == 4}
        <img src="data:image/jpeg;base64,{$base64qrs}" style="width:250px;height: 250px;"/>
        {/if}
    </div>
    {/if}
