<?php /* Smarty version Smarty-3.1.11, created on 2023-10-18 03:00:12
         compiled from "../views/default/buyBillview/editprint2.html" */ ?>
<?php /*%%SmartyHeaderCode:1480309918652f200cbd0ca1-82800354%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '8adef1039067c589e175710dc07d82cc24e6ccac' => 
    array (
      0 => '../views/default/buyBillview/editprint2.html',
      1 => 1693253992,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1480309918652f200cbd0ca1-82800354',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'billsettingsData' => 0,
    'billnameAddData' => 0,
    'buyBillData' => 0,
    'userData' => 0,
    'Programsettingdata' => 0,
    'branchData' => 0,
    'Usergroupdata' => 0,
    'buyBillDetails' => 0,
    'detail' => 0,
    'taxvalue' => 0,
    'currency' => 0,
    'countBillDetails' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_652f200d570255_47027429',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_652f200d570255_47027429')) {function content_652f200d570255_47027429($_smarty_tpl) {?><html dir='rtl'>
    <head>

        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>GT4</title>
        <style type="text/css">
            .serial {
                background-color: #C8C8C8;
                height: 20px;
                width: 150px;
                padding: 5px;
                margin: 5px;
                border: medium double #000000;
                text-align: center;
            }
            .style1 {
                font-size: 12px
            }
            .hidden{
                display: none;
            }
        </style>
    </head>
    <script src="../views/default/assets/js/jquery.js"></script>


    
    <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 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; }

    </style>
    
    <body onLoad="printDiv()">
        <div id="printdiv"  >

            <!--start title -->
            <!-- <div <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[69]->billsettingsvalue==0){?><?php }else{ ?>  style="display:none"<?php }?>>
                <h2  style="  text-align:center"><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->name;?>
</h2>
            </div> -->
            <!-- end title -->
            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[25]->billsettingsvalue;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==0){?>

            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="table-black">
                <tr>
                    <td colspan="2"><div <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[15]->billsettingsvalue;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> class="serial"><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillid;?>
</div></td>

                    <td colspan="2" align="right" class="style1" <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==2){?>style="display:none;"<?php }?>>
                        <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==0||$_smarty_tpl->tpl_vars['userData']->value->branchId==0||$_smarty_tpl->tpl_vars['userData']->value->branchId==-1){?>
                        <img src="../views/default/images/upload/<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->logo;?>
" alt="" width="134" height="49"><br>
                        <?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->phone;?>

                        <?php }else{ ?>
                        <img src="../views/default/images/branch_image/<?php echo $_smarty_tpl->tpl_vars['branchData']->value->logo;?>
" alt="" width="134" height="49"><br>
                        <?php echo $_smarty_tpl->tpl_vars['branchData']->value->mobile;?>

                        <?php }?>
                    </td>
                </tr>

                <tr <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[69]->billsettingsvalue==0){?><?php }else{ ?>  style="display:none"<?php }?>>

                    <td></td>
                    <td></td>
                    <td colspan="2" align="center" class="style1">
                        <h1  style="float:right; text-align:center"><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->name;?>
</h1>
                    </td>
                </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"><span class="style1 style2"><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilldate;?>
</span></td>
                    <td width="8%" align="right"><span class="style1 style2">التاريخ</span></td>
                </tr>
                <tr>
                    <td align="right">&nbsp;</td>
                    <td align="right">

                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[27]->billsettingsvalue;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==0){?>
                        <span class="style1 style2">
                            <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->storeName;?>
 </span>
                        <?php }?>    </td>
                    <td align="right">&nbsp;</td>
                    <td align="right"><span class="style1 style2 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>"><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[18]->billsettingsvalue;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4==0){?> دين قبل :<?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilltotaldeptbefor;?>
 <?php }?></span></td>
                    <td colspan="2" align="right" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[16]->billsettingsvalue;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> ><span class="style1 style2"><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->suppliername;?>
</span> </td>
                </tr>
                <tr>
                    <td colspan="6"><table width="100%" border="0" cellpadding="2" cellspacing="7">
                            <tr>
                                <td align="center" bgcolor="#B4B4B4" class="style4 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">الاجمالي</td>
                                <td align="center" bgcolor="#B4B4B4" class="style4 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[23]->billsettingsvalue;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>الخصم</td>
                                <td align="center" bgcolor="#B4B4B4" class="style4 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">السعر</td>
                                <td align="center" bgcolor="#B4B4B4" class="style4" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7=='0'){?>  hidden <?php }?>" ><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
</td>

                                <td align="center" bgcolor="#B4B4B4" class="style4">الكمية</td>

                                <td align="center" bgcolor="#B4B4B4" class="style4"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>الوحدة</td>
                                <td align="center" bgcolor="#B4B4B4" class="style4"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
<?php $_tmp9=ob_get_clean();?><?php if ($_tmp9==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>الملاحظة</td>
                                <td align="center" bgcolor="#B4B4B4" class="style4" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[20]->billsettingsvalue;?>
<?php $_tmp10=ob_get_clean();?><?php if ($_tmp10==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>الباركود</td>
                                <td width="50%" align="center" bgcolor="#B4B4B4" class="style4">اسم المنتج</td>
                                <td align="right" bgcolor="#B4B4B4" class="style4">م </td>
                            </tr>
                            <?php  $_smarty_tpl->tpl_vars['detail'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['detail']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['buyBillDetails']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['detail']->index=-1;
foreach ($_from as $_smarty_tpl->tpl_vars['detail']->key => $_smarty_tpl->tpl_vars['detail']->value){
$_smarty_tpl->tpl_vars['detail']->_loop = true;
 $_smarty_tpl->tpl_vars['detail']->index++;
?>
                            <tr>
                                <td align="center" class="style2 style1 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>"><?php echo $_smarty_tpl->tpl_vars['detail']->value->buybilldetailtotalprice;?>
</td>
                                <td align="center" class="style2 style1 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[23]->billsettingsvalue;?>
<?php $_tmp11=ob_get_clean();?><?php if ($_tmp11==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>><?php echo $_smarty_tpl->tpl_vars['detail']->value->discountvalue;?>
 </td>
                                <td align="center" class="style2 style1 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>"><?php echo $_smarty_tpl->tpl_vars['detail']->value->buybilldetailprice;?>
</td>
                                <td  align="center" class="style2 style1" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp12=ob_get_clean();?><?php if ($_tmp12=='0'){?>  hidden <?php }?>">
                                    <?php echo $_smarty_tpl->tpl_vars['detail']->value->otherdetailquantity;?>

                                </td>
                                <td align="center" class="style2 style1"> <?php echo $_smarty_tpl->tpl_vars['detail']->value->buybilldetailquantity;?>
 </td>

                                <td align="center" class="style2 style1"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp13=ob_get_clean();?><?php if ($_tmp13==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>><?php echo $_smarty_tpl->tpl_vars['detail']->value->unitName;?>
</td>
                                <td align="center" class="style2 style1"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
<?php $_tmp14=ob_get_clean();?><?php if ($_tmp14==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>><?php echo $_smarty_tpl->tpl_vars['detail']->value->note;?>
</td>
                                <td align="center" class="style2 style1"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[20]->billsettingsvalue;?>
<?php $_tmp15=ob_get_clean();?><?php if ($_tmp15==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>><?php echo $_smarty_tpl->tpl_vars['detail']->value->parcode;?>
</td>
                                <td align="right" class="style2 style1"><?php echo $_smarty_tpl->tpl_vars['detail']->value->productName;?>
/<?php echo $_smarty_tpl->tpl_vars['detail']->value->productCatName;?>

                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[79]->billsettingsvalue;?>
<?php $_tmp16=ob_get_clean();?><?php if ($_tmp16==0){?>
                                    <?php if (isset($_smarty_tpl->tpl_vars['detail']->value->sizeName)&&$_smarty_tpl->tpl_vars['detail']->value->sizeName!=''){?>/<?php echo $_smarty_tpl->tpl_vars['detail']->value->sizeName;?>
<?php }?>
                                    <?php if (isset($_smarty_tpl->tpl_vars['detail']->value->colorName)&&$_smarty_tpl->tpl_vars['detail']->value->colorName!=''){?>/<?php echo $_smarty_tpl->tpl_vars['detail']->value->colorName;?>
<?php }?>
                                    <?php }?>
                                </td>
                                <td align="center" class="style2"><?php echo $_smarty_tpl->tpl_vars['detail']->index+1;?>
</td>
                            </tr>
                            <?php } ?>
                        </table></td>
                </tr>
                <tr>
                    <td colspan="6"><hr /></td>
                </tr>
                <tr>
                    <td colspan="2"><table width="100%" border="0" cellpadding="2" cellspacing="7" class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">
                            <tr>
                                <td width="10%" align="center" bgcolor="#B4B4B4" class="style1">الاجمالي</td>
                                <td width="30%" align="center">&nbsp;</td>

                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[19]->billsettingsvalue;?>
<?php $_tmp17=ob_get_clean();?><?php if ($_tmp17==0){?>
                                <td width="14%" align="center" bgcolor="#B4B4B4"   >الدين بعد</td>
                                <?php }?>

                                <!-----------الباقى ------------------->
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[30]->billsettingsvalue;?>
<?php $_tmp18=ob_get_clean();?><?php if ($_tmp18==0){?>
                                <td width="10%" align="center" bgcolor="#B4B4B4">الباقي</td>
                                <?php }?>

                                <!-----------المدفوع ------------------->
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[29]->billsettingsvalue;?>
<?php $_tmp19=ob_get_clean();?><?php if ($_tmp19==0){?>
                                <td width="8%" align="center" bgcolor="#B4B4B4">المدفوع</td>
                                <?php }?>

                                <!---------------------الصافي----------------->
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[28]->billsettingsvalue;?>
<?php $_tmp20=ob_get_clean();?><?php if ($_tmp20==0){?>
                                <td width="9%" align="center" bgcolor="#B4B4B4">الصافي</td>
                                <?php }?>


                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[36]->billsettingsvalue;?>
<?php $_tmp21=ob_get_clean();?><?php if ($_tmp21=="0"){?>
                                <td width="8%" align="center" bgcolor="#B4B4B4">ضريبه القيمة المضافة</td>
                                <?php }?>

                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilldiscount;?>
<?php $_tmp22=ob_get_clean();?><?php if ($_tmp22>0){?>
                                <td width="8%" align="center" bgcolor="#B4B4B4">قيمة الخصم</td>
                                <td width="8%" align="center" bgcolor="#B4B4B4">نوع الخصم</td>
                                <?php }?>





                                <td width="9%" align="center" bgcolor="#B4B4B4" class="style1">عدد الوحدات</td>
                            </tr>
                            <tr>
                                <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilltotalbill;?>
</td>
                                <td align="center" class="style1">&nbsp;</td>
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[19]->billsettingsvalue;?>
<?php $_tmp23=ob_get_clean();?><?php if ($_tmp23==0){?>
                                <td align="center" class="style1"  ><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilltotaldeptafter;?>
</td>
                                <?php }?>
                                <!-----------الباقى ------------------->
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[30]->billsettingsvalue;?>
<?php $_tmp24=ob_get_clean();?><?php if ($_tmp24==0){?>
                                <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillfinalbill;?>
</td>
                                <?php }?>
                                <!-----------المدفوع ------------------->
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[29]->billsettingsvalue;?>
<?php $_tmp25=ob_get_clean();?><?php if ($_tmp25==0){?>
                                <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilltotalpayed;?>
</td>
                                <?php }?>

                                <!---------------------الصافي-->
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[28]->billsettingsvalue;?>
<?php $_tmp26=ob_get_clean();?><?php if ($_tmp26==0){?>
                                <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillaftertotalbill;?>
</td>
                                <?php }?>


                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[36]->billsettingsvalue;?>
<?php $_tmp27=ob_get_clean();?><?php if ($_tmp27=="0"){?>
                                <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['taxvalue']->value;?>
<?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
 (<?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->payedtax;?>
%) </td>
                                <?php }?>
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilldiscount;?>
<?php $_tmp28=ob_get_clean();?><?php if ($_tmp28>0){?>
                                <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilldiscount;?>
 </td>
                                <td align="center" class="style1">
                                    <?php if ($_smarty_tpl->tpl_vars['buyBillData']->value->buybilldiscountrype==0){?>
                                    مباشر
                                    <?php }else{ ?>
                                    بنسبة
                                    <?php }?>
                                </td>
                                <?php }?>


                                <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['countBillDetails']->value;?>
</td>
                            </tr>
                        </table></td>
                </tr>
                <tr <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==2){?>style="display:none;"<?php }?>>
                    <td height="130" colspan="6" align="right" valign="bottom"><span class="style1" style="direction:rtl"><strong>
                                <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==0||$_smarty_tpl->tpl_vars['userData']->value->branchId==0||$_smarty_tpl->tpl_vars['userData']->value->branchId==-1){?>
                                <?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->address;?>

                                <?php }else{ ?>
                                <?php echo $_smarty_tpl->tpl_vars['branchData']->value->branchAddress;?>

                                <?php }?>
                            </strong></span></td>
                </tr>
                <tr>
                    <td colspan="6"><p><span class="copywrites"><span class="copywrites">تصميم شركة جي تي فور 01110070882</span></span></p></td>
                </tr>
            </table>

            <?php }else{ ?>

            <table  width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table-black">
                <tr>
                    <td width="142" colspan="2" align="right" valign="top" <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==2){?>style="display:none;"<?php }?>><p><strong>
                                <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==0||$_smarty_tpl->tpl_vars['userData']->value->branchId==0||$_smarty_tpl->tpl_vars['userData']->value->branchId==-1){?>
                                <img src="../views/default/images/upload/<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->logo;?>
" alt="" width="122" height="75"><br>
                                <?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->phone;?>
<br>
                                <?php }else{ ?>
                                <img src="../views/default/images/branch_image/<?php echo $_smarty_tpl->tpl_vars['branchData']->value->logo;?>
" alt="" width="122" height="75"><br>
                                <?php echo $_smarty_tpl->tpl_vars['branchData']->value->mobile;?>
<br>
                                <?php }?>
                                </td>
                                </tr>

                                </table>

                                <div <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[69]->billsettingsvalue==0){?><?php }else{ ?>  style="display:none"<?php }?>>
                                    <div class="style1" >
                                        <h1  style=" text-align:center"><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->name;?>
</h1>    </div>
                                </div>
                                <div style="clear:both"></div>

                                <table align="right" width="60%">


                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[15]->billsettingsvalue;?>
<?php $_tmp29=ob_get_clean();?><?php if ($_tmp29==0){?>
                                    <tr >
                                        <td align="right">
                                            <span>اسم المورد :</span>
                                            <span> <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->suppliername;?>
</span>
                                        </td>
                                    </tr>
                                    <?php }?>

                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[18]->billsettingsvalue;?>
<?php $_tmp30=ob_get_clean();?><?php if ($_tmp30==0){?>
                                    <tr class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">
                                        <td align="right"> <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilltotaldeptbefor;?>
:  </td>
                                    </tr>
                                    <?php }?>
                                    <tr   <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[15]->billsettingsvalue;?>
<?php $_tmp31=ob_get_clean();?><?php if ($_tmp31==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>
                                        <td align="right">
                                            <span>  رقم الفاتورة :</span>
                                            <span><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillid;?>
</span></td>
                                    </tr>
                                    <tr>
                                        <td align="right" >
                                            <span>  التاريخ:</span>
                                            <span><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilldate;?>
</span>
                                        </td>
                                    </tr>
                                </table>
                                <table align="right" width="40%">

                                    <tr  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[15]->billsettingsvalue;?>
<?php $_tmp32=ob_get_clean();?><?php if ($_tmp32==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>
                                        <td align="right">
                                            <span> رقم عملية السداد :</span>
                                            <span><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillSerial;?>
</span> </td>
                                    </tr>

                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[27]->billsettingsvalue;?>
<?php $_tmp33=ob_get_clean();?><?php if ($_tmp33==0){?>
                                    <tr>
                                        <td  align="right">
                                            <span>اسم المخزن:</span>
                                            <span> <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->storeName;?>
</span> </td>
                                    </tr>
                                    <?php }?>
                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[22]->billsettingsvalue;?>
<?php $_tmp34=ob_get_clean();?><?php if ($_tmp34==0){?>
                                    <tr>
                                        <td  align="right">
                                            <span>التعليق:</span>
                                            <span> <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->comment;?>
</span> </td>
                                    </tr>
                                    <?php }?>
                                </table>

                                <table width="100%" border="1" cellpadding="0" cellspacing="0" dir="rtl" class="table-black" style="text-align: center">

                                    <tr>
                                        <td align="center"> م</td>
                                        <td align="center" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[20]->billsettingsvalue;?>
<?php $_tmp35=ob_get_clean();?><?php if ($_tmp35==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> class="wdt120">الباركود</td>


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

                                        <td  align="center"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
<?php $_tmp36=ob_get_clean();?><?php if ($_tmp36==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> >ملاحظات</td>

                                        <td align="center" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp37=ob_get_clean();?><?php if ($_tmp37==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> >الوحدة</td>


                                        <td align="center">العدد</td>
                                        <td align="center"  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp38=ob_get_clean();?><?php if ($_tmp38=='0'){?>  hidden <?php }?>" ><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
</td>

                                        <td align="center" class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">السعر</td>
                                        <td align="center" class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[23]->billsettingsvalue;?>
<?php $_tmp39=ob_get_clean();?><?php if ($_tmp39==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> >الخصم</td>
                                        <td align="center" class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>"> الاجمالى</td>
                                    </tr>



                                    <?php  $_smarty_tpl->tpl_vars['detail'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['detail']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['buyBillDetails']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['detail']->index=-1;
foreach ($_from as $_smarty_tpl->tpl_vars['detail']->key => $_smarty_tpl->tpl_vars['detail']->value){
$_smarty_tpl->tpl_vars['detail']->_loop = true;
 $_smarty_tpl->tpl_vars['detail']->index++;
?>
                                    <tr>
                                        <td align="center"><?php echo $_smarty_tpl->tpl_vars['detail']->index+1;?>
</td>
                                        <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[20]->billsettingsvalue;?>
<?php $_tmp40=ob_get_clean();?><?php if ($_tmp40==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>

                                            <?php echo $_smarty_tpl->tpl_vars['detail']->value->parcode;?>
                  </td>

                                        <td > <?php echo $_smarty_tpl->tpl_vars['detail']->value->productName;?>
/<?php echo $_smarty_tpl->tpl_vars['detail']->value->productCatName;?>

                                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[79]->billsettingsvalue;?>
<?php $_tmp41=ob_get_clean();?><?php if ($_tmp41==0){?>
                                            <?php if (isset($_smarty_tpl->tpl_vars['detail']->value->sizeName)&&$_smarty_tpl->tpl_vars['detail']->value->sizeName!=''){?>/<?php echo $_smarty_tpl->tpl_vars['detail']->value->sizeName;?>
<?php }?>
                                            <?php if (isset($_smarty_tpl->tpl_vars['detail']->value->colorName)&&$_smarty_tpl->tpl_vars['detail']->value->colorName!=''){?>/<?php echo $_smarty_tpl->tpl_vars['detail']->value->colorName;?>
<?php }?>
                                            <?php }?>
                                        </td>
                                        <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
<?php $_tmp42=ob_get_clean();?><?php if ($_tmp42==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>

                                            <?php echo $_smarty_tpl->tpl_vars['detail']->value->note;?>
 </td>

                                        <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp43=ob_get_clean();?><?php if ($_tmp43==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>

                                            <?php echo $_smarty_tpl->tpl_vars['detail']->value->unitName;?>
 </td>
                                        <td > <?php echo $_smarty_tpl->tpl_vars['detail']->value->buybilldetailquantity;?>
 </td>


                                        <td  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp44=ob_get_clean();?><?php if ($_tmp44=='0'){?>  hidden <?php }?>">
                                            <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['detail']->value->otherdetailquantity;?>
</p>
                                        </td>
                                        <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>"> <?php echo $_smarty_tpl->tpl_vars['detail']->value->buybilldetailprice;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
 </td>
                                        <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[23]->billsettingsvalue;?>
<?php $_tmp45=ob_get_clean();?><?php if ($_tmp45==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> >

                                            <?php echo $_smarty_tpl->tpl_vars['detail']->value->discountvalue;?>
 </td>
                                        <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>"> <?php echo $_smarty_tpl->tpl_vars['detail']->value->buybilldetailtotalprice;?>
 </td>

                                    </tr>

                                    <?php } ?>
                                    <tfoot class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">
                                        <tr>
                                            <td colspan="2">الاجمالى</td>
                                            <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[20]->billsettingsvalue;?>
<?php $_tmp46=ob_get_clean();?><?php if ($_tmp46==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>></td>
                                            <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
<?php $_tmp47=ob_get_clean();?><?php if ($_tmp47==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>></td>
                                            <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp48=ob_get_clean();?><?php if ($_tmp48==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>></td>

                                            <td></td>
                                            <td  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp49=ob_get_clean();?><?php if ($_tmp49=='0'){?>  hidden <?php }?>></td>

                                            <td></td>
                                            <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[23]->billsettingsvalue;?>
<?php $_tmp50=ob_get_clean();?><?php if ($_tmp50==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>></td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilltotalbill;?>
</td>
                                        </tr>
                                    </tfoot>
                                </table>
                                <table style="margin-top: 5px;text-align: center" width="40%" border="1" align="left" cellpadding="0" cellspacing="0"  dir="rtl" class="td <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">

                                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[46]->billsettingsvalue;?>
<?php $_tmp51=ob_get_clean();?><?php if ($_tmp51==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>
                                        <td>نوع الخصم</td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['countBillDetails']->value;?>
</td>
                                    </tr>

                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilldiscount;?>
<?php $_tmp52=ob_get_clean();?><?php if ($_tmp52>0){?>
                                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[47]->billsettingsvalue;?>
<?php $_tmp53=ob_get_clean();?><?php if ($_tmp53==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>
                                        <td>نوع الخصم</td>
                                        <td>
                                            <?php if ($_smarty_tpl->tpl_vars['buyBillData']->value->buybilldiscountrype==0){?>
                                            مباشر
                                            <?php }else{ ?>
                                            غير مباشر
                                            <?php }?>
                                        </td>
                                    </tr>

                                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[47]->billsettingsvalue;?>
<?php $_tmp54=ob_get_clean();?><?php if ($_tmp54==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>
                                        <td>قيمة الخصم</td>
                                        <td>  <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilldiscount;?>
 </td>
                                    </tr>

                                    <?php }?>
                                    <!---------------------???????-->
                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[36]->billsettingsvalue;?>
<?php $_tmp55=ob_get_clean();?><?php if ($_tmp55=="0"){?>
                                    <tr>
                                        <td> ضريبه القيمة المضافة</td>
                                        <td> <?php echo $_smarty_tpl->tpl_vars['taxvalue']->value;?>
<?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
 (<?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->payedtax;?>
%)</td>
                                    </tr>
                                    <?php }?>
                                    <tr>
                                        <td>المبلغ بعد الخصم</td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillaftertotalbill;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                                    </tr>





                                    <!---------------------???????-->
                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[29]->billsettingsvalue;?>
<?php $_tmp56=ob_get_clean();?><?php if ($_tmp56==0){?>
                                    <tr>
                                        <td>المدفوع</td>
                                        <td> <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilltotalpayed;?>
<?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                                    </tr>
                                    <?php }?>
                                    <!-----------?????? -->
                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[28]->billsettingsvalue;?>
<?php $_tmp57=ob_get_clean();?><?php if ($_tmp57==0){?>
                                    <tr>
                                        <td>الصافى</td>
                                        <td> <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillaftertotalbill;?>
<?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                                    </tr>
                                    <?php }?>

                                    <!-- -->
                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[30]->billsettingsvalue;?>
<?php $_tmp58=ob_get_clean();?><?php if ($_tmp58==0){?>
                                    <tr>
                                        <td>المتبقى</td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillfinalbill;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                                    </tr>
                                    <?php }?>
                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[19]->billsettingsvalue;?>
<?php $_tmp59=ob_get_clean();?><?php if ($_tmp59==0){?>
                                    <tr >
                                        <td>المتبقى</td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilltotaldeptafter;?>
<?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                                    </tr>
                                    <?php }?>
                                    <tr>
                                    </tr>

                                </table>
                                <div style="clear:both"></div>

                                <div style="text-align: center" <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==2){?>style="display:none;"<?php }?>>
                                    <p class="NEE"><strong>
                                            <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==0||$_smarty_tpl->tpl_vars['userData']->value->branchId==0||$_smarty_tpl->tpl_vars['userData']->value->branchId==-1){?>
                                            <?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->address;?>

                                            <?php }else{ ?>
                                            <?php echo $_smarty_tpl->tpl_vars['branchData']->value->branchAddress;?>

                                            <?php }?>
                                        </strong></p>
                                </div>

                                <p style="text-align: center"><span class="copywrites"><span class="copywrites"> 01110070882 تصميم بواسطه شركه GT4</span></span></p></td>


                    <?php }?>
                    </div>
                    </body><?php }} ?>