
<html>
    <head>

        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>GT4</title>
        <style type="text/css">
        </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();
            //window.close();
        }
    </script>
    <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: 15px;
            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: 15px;
            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: 12px; font-weight: bold; }
        .serial {
            background-color: #C8C8C8;
            height: 20px;
            width: 150px;
            padding: 5px;
            margin: 5px;
            border: medium double #000000;
            text-align: center;
        }
        .style1 {
            font-size: 12px
        }
    </style>
    {/literal}
    <body   onLoad="printDiv()">
        <div id="printdiv" >

            {if {$billsettingsData[25]->billsettingsvalue} eq 0}

            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="table-black">
                <tr>
                    <td colspan="2"><div {if {$billsettingsData[15]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if} class="serial"> {$sellbillandruternData->sellbillid}</div></td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td colspan="2" align="right" class="style1"><img src="../views/default/images/upload/{$Programsettingdata->logo}" alt="" width="134" height="49"><br>
                        {$Programsettingdata->phone}</td>
                </tr>

                <tr>

                    <td></td>
                    <td></td>
                    <td colspan="2" align="center" class="style1">
                        <h1  style="float:right; text-align:center">{$billnameAddData->name}</h1>
                    </td>
                </tr>
                <tr>
                <tr>
                    <td width="5%" height="26" align="right">&nbsp;</td>
                    <td width="4%" align="right">&nbsp;</td>
                    <td width="23%" align="right">&nbsp;</td>
                    <td width="23%" align="right">&nbsp;</td>
                    <td width="37%" align="right">{$sellbillandruternData->sellbillsysdate}</td>
                    <td width="8%" align="right"><span class="style1 style2">التاريخ</span></td>
                </tr>
                <tr>
                    <td align="right">&nbsp;</td>
                    <td align="right">   {if {$billsettingsData[27]->billsettingsvalue} eq 0} {$sellbillandruternData->storeName}{/if} </td>
                    <td align="right">&nbsp;</td>
                    <td align="right"><span class="style1 style2">{if {$billsettingsData[18]->billsettingsvalue} eq 0}  دين قبل :{$sellbillandruternData->sellbilltotaldeptbefor} {/if}</span></td>
                    <td colspan="2" align="right" {if {$billsettingsData[16]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if} >{$sellbillandruternData->tempclientName}</td>
                </tr>
                <tr>
                    <td colspan="6"><table width="100%" border="0" cellpadding="2" cellspacing="7">
                            <tr>



                                <td align="center" bgcolor="#B4B4B4" class="style4" {if {$billsettingsData[53]->billsettingsvalue} eq 0} {else} style="display:none" {/if}>الكمية</td>
                                <td align="center" bgcolor="#B4B4B4" class="style4" {if {$billsettingsData[53]->billsettingsvalue} eq 0} {else} style="display:none" {/if}>الوحدة</td>


                                <td width="50%" align="center" bgcolor="#B4B4B4" class="style4">اسم المخزن</td>
                                <td width="50%" align="center" bgcolor="#B4B4B4" class="style4">اسم المنتج</td>
                                <td align="center" bgcolor="#B4B4B4" class="style4" {if {$billsettingsData[59]->billsettingsvalue} eq 0} {else}  style="display:none"    {/if}>الباركود</td>
                                <td align="right" bgcolor="#B4B4B4" class="style4">م </td>
                            </tr>
                            {foreach $sellbilldetailData as $mysellbilldetailData}
                            <tr>



                                <td align="center" class="style2 style1"> {$mysellbilldetailData->sellbilldetailquantity} </td>
                                <td align="center" class="style2 style1">{$mysellbilldetailData->unitName}</td>


                                <td align="center" class="style2 style1"> {$mysellbilldetailData->storeName} </td>

                                <td align="right" class="style2 style1">{$mysellbilldetailData->productName}/{$mysellbilldetailData->productCatName}</td>
                                <td align="center" class="style2 style1"{if {$billsettingsData[59]->billsettingsvalue} eq 0} {else}  style="display:none"    {/if}>{$mysellbilldetailData->parcode} </td>
                                <td align="center" class="style2">{$mysellbilldetailData@index+1}</td>
                            </tr>
                            {/foreach}
                            <!--tr>
                              <td colspan="9" align="center" bgcolor="#B4B4B4" class="style2 style1"><strong>المرودات</strong></td>
                            </tr-->
                            {foreach $ruternbilldetailData as $myruternbilldetailData}
                            <!--tr>
                              <td align="center" class="style2 style1"> {$myruternbilldetailData->sellbilldetailtotalprice} </td>
                              <td align="center" class="style2 style1"{if {$billsettingsData[23]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if}>

                                  {$myruternbilldetailData->discountvalue} </td>
                              <td align="center" class="style2 style1">{$myruternbilldetailData->sellbilldetailprice}</td>
                              <td align="center" class="style2 style1"> {$myruternbilldetailData->sellbilldetailquantity} </td>
                              <td align="center" class="style2 style1"{if {$billsettingsData[21]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if}>&nbsp;{$myruternbilldetailData->unitName} </td>
                              <td align="center" class="style2 style1"{if {$billsettingsData[22]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if}>&nbsp;{$myruternbilldetailData->note}</td>
                              <td align="center" class="style2 style1"{if {$billsettingsData[20]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if}>

                                  {$myruternbilldetailData->parcode} </td>
                              <td align="right" class="style2 style1"> {$myruternbilldetailData->productName}/{$myruternbilldetailData->productCatName} </td>
                              <td align="center" class="style2">{$myruternbilldetailData@index+1}</td>
                            </tr-->
                            {/foreach}
                        </table></td>
                </tr>
                <tr>
                    <td colspan="6"><hr /></td>
                </tr>
                <tr>
                    <td colspan="3"><table width="100%" border="0" cellpadding="2" cellspacing="7" class="table-black">
                            <tr>




                                <td width="10%" align="center" bgcolor="#B4B4B4" class="style1">عدد البيع</td>

                            </tr>
                            <tr>







                                <td align="center" class="style1"> {if {$sellbillandruternData->sellQuantity} <= 0}
                                    {$sellQuantity}
                                    {else}
                                    {$sellbillandruternData->sellQuantity}
                                    {/if} </td>

                            </tr>
                        </table></td>
                </tr>
                <tr>
                    <td height="130" colspan="6" align="right" valign="bottom"><span class="style1" style="direction:rtl"><strong>{$Programsettingdata->address}</strong></span></td>
                </tr>
                <tr>
                    <td colspan="6"><p><span class="copywrites1">تصميم شركة جي تي فور 01110070882</span></p></td>
                </tr>
            </table>
            {else}
            <table  width="97%" border="0" align="center" cellpadding="0" cellspacing="0" class="table-black">
                <tr>
                    <td width="851" height="115" align="left" valign="middle">&nbsp;</td>
                    <td width="1614" colspan="2" align="right" valign="top"><p><strong><img src="../views/default/images/upload/{$Programsettingdata->logo}" alt="" width="122" height="75"><br>

                                {$Programsettingdata->phone}<br>
                                </td>
                                </tr>


                                <tr><td></td><td>
                                        <table align="right">
                                            <tr>
                                                <td colspan="2"   align="right" class="style1" dir="rtl">
                                                    <h1  style="float:right; text-align:right">{$billnameAddData->name}</h1>    </td>
                                            </tr>

                                            {if {$billsettingsData[27]->billsettingsvalue} eq 0}
                                            <tr  >
                                                <td align="right"> {$sellbillandruternData->storeName} </td>
                                                <td  align="right"> :المخزن </td>
                                            </tr>
                                            {/if}
                                            <tr {if {$billsettingsData[15]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if}>
                                                <td align="right"> {$sellbillandruternData->sellbillid}</td>
                                                <td  align="right"> : رقم عمليه السداد</td>
                                            </tr>

                                            <tr {if {$billsettingsData[16]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if}>
                                                <td align="right">{$sellbillandruternData->tempclientName}</td>
                                                <td  align="right"> : اسم العميل </td>
                                            </tr>

                                            <tr>
                                                <td align="right">{$sellbillandruternData->sellbillsysdate}</td>
                                                <td  align="right" > : تاريخ البيان</td>
                                            </tr>

                                        </table>
                                    </td>
                                </tr>

                                <tr>


                                    <td colspan="3" class="td"align="right">
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0" dir="rtl" class="table-black">

                                            <tr>
                                                <td align="center">م</td>
                                                <td align="center"{if {$billsettingsData[59]->billsettingsvalue} eq 0} {else}  style="display:none"    {/if} class="wdt120">الباركود</td>


                                                <td align="center" c>اسم المنتج</td>

                                                <td align="center" c>اسم المخزن</td>

                                                <td align="center"  >الوحدة</td>


                                                <td align="center">العدد</td>





                                            </tr>



                                            {foreach $sellbilldetailData as $mysellbilldetailData}
                                            <tr>
                                                <td >{$mysellbilldetailData@index+1}</td>
                                                <td {if {$billsettingsData[20]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if}>

                                                    {$mysellbilldetailData->parcode}

                                                </td>


                                                <td>

                                                    {$mysellbilldetailData->productName}/{$mysellbilldetailData->productCatName}

                                                </td>

                                                <td>

                                                    {$mysellbilldetailData->storeName}

                                                </td>


                                                <td >

                                                    {$mysellbilldetailData->unitName}

                                                </td>



                                                <td>

                                                    {$mysellbilldetailData->sellbilldetailquantity}

                                                </td>








                                            </tr>

                                            {/foreach}

                                        </table>
                                    </td>
                                </tr>

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


                                <!--tr >  <td  align="center" colspan="8" style="background:#CCCCCC"> المردودات </td></tr>
                                 <tr>
                                  <td colspan="3" class="td"align="right">
                                  <table width="100%" border="0" cellpadding="0" cellspacing="0" dir="rtl">

                                        <tr >
                                           <td align="center">م</td>
                                          <td align="center"{if {$billsettingsData[4]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if} class="wdt120">الباركود</td>


                                          <td align="center" c>اسم المنتج</td>

                                          <td  align="center"{if {$billsettingsData[7]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if} >ملاحظات</td>

                                          <td align="center" {if {$billsettingsData[10]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if} >الوحدة</td>


                                          <td align="center">العدد</td>
                                            <td align="center">السعر</td>
                                          <td align="center" {if {$billsettingsData[8]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if} >الخصم</td>
                                          <td align="center"> الاجمالى</td>


                                        </tr>



                                      {foreach $ruternbilldetailData as $myruternbilldetailData}
                                        <tr>
                                         <td >{$myruternbilldetailData@index+1}</td>
                                          <td {if {$billsettingsData[4]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if}>

                                           {$myruternbilldetailData->parcode}

                                          </td>


                                          <td>

                                            {$myruternbilldetailData->productName}/{$myruternbilldetailData->productCatName}

                                          </td>


                                          <td {if {$billsettingsData[7]->billsettingsvalue} eq 0}  {else}  style="display:none !important"  {/if}>

                                          {$myruternbilldetailData->note}

                                          </td>


                                          <td {if {$billsettingsData[10]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if}>

                                            {$myruternbilldetailData->unitName}

                                          </td>




                                          <td>

                                           {$myruternbilldetailData->sellbilldetailquantity}

                                          </td>

                                          <td>

                                                 {$myruternbilldetailData->sellbilldetailprice} {$currency}

                                          </td>

                                          <td {if {$billsettingsData[8]->billsettingsvalue} eq 0}  {else} style="display:none !important" {/if}>

                                           {$myruternbilldetailData->discountvalue}

                                          </td>


                                          <td>

                                          {$myruternbilldetailData->sellbilldetailtotalprice}

                                          </td>





                                        </tr>

                                        {/foreach}

                                    </table>
                                    </td>
                                    </tr-->

                                <!--------------------------------------------------------------------------------->
                                <tr>
                                    <td height="54" colspan="3" align="right"><table width="50%" border="0" align="left" cellpadding="0" cellspacing="0"  dir="rtl" class="td">



                                            <tr {if {$billsettingsData[58]->billsettingsvalue} eq 0} {else}  style="display:none"    {/if}>
                                                <td>عدد القطع المباعه</td>
                                                <td>
                                                    {if {$sellbillandruternData->sellQuantity} <= 0}
                                                    {$sellQuantity}
                                                    {else}
                                                    {$sellbillandruternData->sellQuantity}
                                                    {/if}
                                                </td>
                                            </tr>




                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="3" align="right"><p class="NEE"><strong>{$Programsettingdata->address}</strong></p></td>
                                </tr>
                                <tr>
                                    <td colspan="3" align="right"><p>&nbsp;</p>
                                        <p>&nbsp;</p>
                                        <p><span class="copywrites"><span class="copywrites">تصميم شركة جي تي فور 01110070882...</span></span></p></td>
                                </tr>
            </table>
            {/if}
        </div>
    </body>