<html>
    <head>

        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>GT4</title>
        <style type="text/css">
        </style>
        <style>

            .table-black1   th, td{



            }

            .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">
        /*$(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>
    <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;"><center> <img style="display: block" src="../views/default/images/upload/{$Programsettingdata->logo}" alt=""></center></td><!--height="50px" width="70%"-->
                    </tr>
                    {if $clientFlag == 1}
                    <tr>
                        <td width="5%" align="right">&nbsp;</td>
                        <td colspan="4" style="text-align: center;">

                            {if $delivery->clientmobile == 1}
                            {$client->clientmobile}
                            {/if}
                            {if $delivery->clientphone == 1}
                            {if $delivery->clientmobile == 1}
                            <br/>
                            {/if}
                            {$client->clientphone}
                            {/if}
                            <br/>
                            {$client->clientname}
                        </td>
                        <td width="5%" align="right">&nbsp;</td>
                    </tr>
                    <tr>
                        <td width="5%" align="right">&nbsp;</td>
                        <td class="rtl" colspan="4" nowrap style="text-align: center;">
                            {if $delivery->clientaddress == 1}
                            {$client->clientaddress}
                            {/if}
                            {if $delivery->clientdetails == 1}
                            {$client->clientdetails}
                            {/if}
                        </td>
                        <td width="5%" align="right">&nbsp;</td>
                    </tr>
                    {/if}
                    {if $restaurantOrder->billComment!=""}
                    <tr>
                        <td width="5%" align="right">&nbsp;</td>
                        <td class="rtl" colspan="4" nowrap style="text-align: center;">
                            {$restaurantOrder->billComment}
                        </td>
                        <td width="5%" align="right">&nbsp;</td>
                    </tr>
                    {/if}

                    {if $restaurantOrder->tableId >0}
                    <tr>


                        <td width="5%" align="right">&nbsp;</td>
                        <td  ><span class="style1 style2 rtl"></span></td>
                        <td width="10%" align="right">&nbsp;</td>

                        <td width="10%" align="right"></td>
                        <td class="rtl"   colspan="2" nowrap width="8%" align="right"><span class="style1 style2">طاولة :{$restaurantOrder->tableName}</span></td>
                    </tr>
                    {/if}
                    <tr>


                        <td width="5%" align="right">&nbsp;</td>
                        <td  ><span class="style1 style2 rtl">سيريال :{$restaurantOrder->id}</span></td>
                        <td width="10%" align="right">&nbsp;</td>

                        <td width="10%" align="right"></td>
                        <td class="rtl"   colspan="2" nowrap width="8%" align="right"><span class="style1 style2">رقم الطلب:{$restaurantOrder->daySreial}</span></td>
                    </tr>


                    <!-----------الدين بعد ------------------->

                    <tr>
                        <td width="5%" align="right">&nbsp;</td>
                        <td  ><span class="style1 style2 rtl">{$restaurantOrder->sysdate}</span></td>
                        <td width="10%" align="right">&nbsp;</td>

                        <td width="10%" align="right"></td>
                        <td class="rtl"   colspan="2" nowrap width="8%" align="right"><span class="style1 style2">المستخدم :{$userData->employeename}</span></td>
                    </tr>
                    <!-----------الدين بعد ------------------->
                    <tr>
                        <td colspan="6">
                            <table width="100%" border="0" cellpadding="2" cellspacing="7" class="table-black1">
                                <tr>
                                    <td width="15%" align="center" bgcolor="#B4B4B4" class="style4">اجمالى</td>
                                    <td width="10%" align="center" bgcolor="#B4B4B4" class="style4">السعر</td>
                                    <td width="10%" align="center" bgcolor="#B4B4B4" class="style4">الكميه</td>
                                    <td width="50%" align="center" bgcolor="#B4B4B4" class="style4">الصــــــــنف</td>
                                    <td width="5%" align="right" 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>
                                    <td align="center" class="style2">{$i}</td>
                                </tr>
                                {assign var=total value=$total+$proTotal}
                                {assign var=i value=$i+1}
                                {/foreach}
                            </table></td>
                    </tr>
                    <tr>

                        <td colspan="6"><hr /></td>
                    </tr>
                    <tr>
                        <td colspan="2"><table width="100%" border="0" cellpadding="2" cellspacing="7">
                                <tr>
                                    {if $restaurantOrder->tax !=0||$restaurantOrder->discount !=0}
                                    <td width="8%" align="center" bgcolor="#B4B4B4">الصافى</td>
                                    {/if}
                                    {if $restaurantOrder->tax !=0}
                                    <td width="8%" align="center" bgcolor="#B4B4B4">{if $Programsettingdata->taxNameFlag == 1}خدمة{else}الضريبة{/if}</td>
                                    {/if}
                                    {if $restaurantOrder->discount !=0}
                                    <td width="8%" align="center" bgcolor="#B4B4B4">الخصم</td>
                                    {/if}
                                    <td width="10%" align="center" bgcolor="#B4B4B4" class="style1">الاجمالي</td>
                                </tr>
                                <tr>
                                    {if $restaurantOrder->tax !=0||$restaurantOrder->discount !=0}
                                    <td align="center" class="style1">{$total+$restaurantOrder->tax-$restaurantOrder->discount}{*$restaurantOrder->netBill*}</td>
                                    {/if}
                                    {if $restaurantOrder->tax !=0}
                                    <td align="center" class="style1">{$restaurantOrder->tax}</td>
                                    {/if}
                                    {if $restaurantOrder->discount !=0}
                                    <td align="center" class="style1">{$restaurantOrder->discount}</td>
                                    {/if}
                                    {if $restaurantOrder->discount !=0}

                                    {/if}
                                    <td align="center" class="style1">{$total}{*$restaurantOrder->totalBill*}</td>
                                </tr>
                                <tr {if $restaurantOrder->restaurantplaystationplayid > 0}{else} style="display:none"{/if}>

                                    <td width="10%" align="center" bgcolor="#B4B4B4" class="style1">
                                        حجز بلاى ستيشن رقم {$playstation->id} بمبلغ {$playstation->netPrice}
                                    </td>
                                </tr>
                            </table></td>
                    </tr>
                </table>
                <hr/>
            </b>
        </div>
    </body>