<?php /* Smarty version Smarty-3.1.11, created on 2023-10-17 19:35:54
         compiled from "../views/default/returnsellbillview/editprint2.html" */ ?>
<?php /*%%SmartyHeaderCode:1836696744652eb7eac6ada7-92347882%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '9bf1893340b98119c9569278d1265a71dd35d5ab' => 
    array (
      0 => '../views/default/returnsellbillview/editprint2.html',
      1 => 1693253994,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1836696744652eb7eac6ada7-92347882',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'billsettingsData' => 0,
    'sellbillData' => 0,
    'userData' => 0,
    'Programsettingdata' => 0,
    'branchData' => 0,
    'billnameAddData' => 0,
    'returnsellbillData' => 0,
    'billUserData' => 0,
    'Usergroupdata' => 0,
    'returnsellbilldetailData' => 0,
    'myreturnsellbilldetailData' => 0,
    'quantity' => 0,
    'taxvalue' => 0,
    'discountvalue' => 0,
    'currency' => 0,
    'clientdata' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_652eb7eb122536_76888220',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_652eb7eb122536_76888220')) {function content_652eb7eb122536_76888220($_smarty_tpl) {?>
<html>
    <head>

        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>GT4</title>
        <style>
            @media print {
                @page {
                    size: 100mm 200mm landscape; /* landscape */
                    /* you can also specify margins here: */
                    margin: 0mm;
                    margin-right:0mm; /* for compatibility with both A4 and Letter */
                    /* size: 139mm 215mm;
  height: 215mm;
  width: 139mm; */
                }
                #printdiv{
                    margin-top:<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[82]->billsettingsvalue;?>
mm; /* user margin */
                }
            }
            table.info tr{
                width:100%;
            }



            .body{
                direction: rtl;
            }
            td{
                margin: 0
            }

            .table-black1 tbody>tr>td {
                padding: 3px;
                vertical-align: middle;
                text-align: center;
                border: 1px solid #656565;
            }

            .result,.result tr,.result tr td{
                border:1px solid #656565
            }
            .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: 17px;
                border-right-color: #999;
            }
            .NEE
            {
                font-size: 14px;
            }
            .newdesign
            {
                font-size: 14px;
            }
            .copywrites
            {
                font-size: 15px;
            }
            td{
                margin: 0!important
            }
            .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{font-size:15px;
           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: 17px;
            border-right-color: #999;
        }
        .NEE
        {
            font-size: 14px;
        }
        .newdesign
        {
            font-size: 14px;
        }
        .copywrites
        {
            font-size: 14px;
        }
    </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: 18px;
            border-right-color: #999;
        }
        .NEE
        {
            font-size: 14px;
        }
        .newdesign
        {
            font-size: 14px;
        }
        .copywrites
        {
            font-size: 15px;
        }
        .style2 {
            font-family: tahoma
        }
        .style4 {font-family: tahoma; font-size: 14px; 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: 15px
        }
        .style-num {
            font-size: 12px
        }
        table.data td{border:1px solid #000;text-align: center}
        tfoot td {
            border: 1px solid #636161;
            background-color: #f5f5f5;
            text-align: center;
            font-weight: bold
        }
    </style>
    
    <body onLoad="printDiv()">
        <div id="printdiv"  >
            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[25]->billsettingsvalue;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==0){?>

            <table width="100%" 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['sellbillData']->value->sellbillid;?>
</div></td-->
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</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>
            </table>
            <div style="clear:both"></div>

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

            <table width="60%"  align="right" cellpadding="0" cellspacing="0" class="table-black" style="margin-bottom: 10px;font-size:10px;direction: rtl" >

                <tr >
                    <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->clientserial==1){?>
                    <td    style="padding: 2px" align="right"><span class="">
                            <span> رقم  تسلسل الفاتورة   :</span>
                            <span> <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbillid;?>
</span>
                        </span></td>
                    <?php }?>

                </tr>
                <tr >
                    <td   style="padding: 2px" align="right"  nowrap width="" >
                        <span class="">التاريخ :</span>
                        <span class=""> <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilldate;?>
</span></td>
                </tr>
                <tr >
                    <td   style="padding: 2px" align="right"  nowrap width="" >
                        <span class="">المستخدم :</span>
                        <span class=""> <?php echo $_smarty_tpl->tpl_vars['billUserData']->value->employeename;?>
</span></td>
                </tr>
                <tr>
                    <td    style="padding: 2px" align="right" nowrap><span class="" style="direction:rtl; <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==2){?>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){?>
                            <?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->address;?>

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

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

            </table>

            <table width="40%"  align="right" cellpadding="0" cellspacing="0" class="table-black" style="margin-bottom: 10px;direction: rtl">
                <tr >
                    <td  align="right" >
                        <span class="style1 style2" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[3]->billsettingsvalue;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==0){?> style="display:inline-block" <?php }else{ ?> style="display:none" <?php }?>>
                            <span> <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==0){?> بائع <?php }elseif($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==1){?>مندوب <?php }elseif($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==2){?>طبيب <?php }?> <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->employeename;?>
</span>
                    </td>

                </tr>
                <tr>
                    <td align="right"  ><span class="style1 style2"><?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['returnsellbillData']->value->returnsellbilltotaldeptbefor;?>
 (ح/س)<?php }?></span></td>
                </tr>
                <tr>
                    <td align="right">  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[27]->billsettingsvalue;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==0){?>  <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->storeName;?>
<?php }?> </td>
                </tr>
                <tr>
                    <td colspan="2" align="right" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[16]->billsettingsvalue;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> >
                        <span> السيد :</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->tempclientName;?>
</span>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="right" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[101]->billsettingsvalue;?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> >
                        <span> عملية الفاتورة :</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->billoperationName;?>
</span>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="right" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[22]->billsettingsvalue;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> >
                        <span> التعليق :</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->comment;?>
</span>
                    </td>
                </tr>
            </table>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table-black1">
                <thead>
                    <tr>
                        <td align="center"  class="style4 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">اجمالى التصنيفات</td>
                        <td align="center"  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 $_tmp9=ob_get_clean();?><?php if ($_tmp9==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> >الخصم</td>
                        <td align="center" class="style4 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">السعر</td>
                        <td align="center"  class="style4"  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp10=ob_get_clean();?><?php if ($_tmp10=='0'){?>  hidden <?php }?> ><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
</td>
                        <td align="center" class="style4">الكمية</td>
                        <td align="center"  class="style4"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp11=ob_get_clean();?><?php if ($_tmp11==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> >الوحدة</td>
                        <td align="center"  class="style4"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[22]->billsettingsvalue;?>
<?php $_tmp12=ob_get_clean();?><?php if ($_tmp12==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> >ملاحظات</td>
                        <td align="center" class="style4" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[20]->billsettingsvalue;?>
<?php $_tmp13=ob_get_clean();?><?php if ($_tmp13==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>الباركود</td>
                        <td width="50%" align="center"  class="style4">اسم المنتج</td>
                        <td align="right"  class="style4">م </td>
                    </tr>
                </thead>

                <tbody>
                    <?php  $_smarty_tpl->tpl_vars['myreturnsellbilldetailData'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['returnsellbilldetailData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->index=-1;
foreach ($_from as $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->key => $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value){
$_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->_loop = true;
 $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->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['myreturnsellbilldetailData']->value->returnsellbilldetailtotalprice;?>
 </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 $_tmp14=ob_get_clean();?><?php if ($_tmp14==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>

                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[34]->billsettingsvalue;?>
<?php $_tmp15=ob_get_clean();?><?php if ($_tmp15==0){?><?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->discountvalue;?>
 <?php }else{ ?>  <?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->discounttype;?>
 <?php }?>

                        </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['myreturnsellbilldetailData']->value->returnsellbilldetailprice;?>
 </td>
                        <td align="center" class="style2 style1" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp16=ob_get_clean();?><?php if ($_tmp16=='0'){?>  hidden <?php }?>>
                            <?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->otherdetailquantity;?>

                        </td>
                        <td align="center" class="style2 style1"> <?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->returnsellbilldetailquantity;?>
 </td>
                        <td align="center" class="style2 style1"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp17=ob_get_clean();?><?php if ($_tmp17==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>

                            <?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->unitName;?>
 </td>
                        <td align="center" class="style2 style1"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
<?php $_tmp18=ob_get_clean();?><?php if ($_tmp18==0){?>  <?php }else{ ?>  style="display:none !important"  <?php }?>>

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

                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[79]->billsettingsvalue;?>
<?php $_tmp20=ob_get_clean();?><?php if ($_tmp20==0){?>
                            <?php if (isset($_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->sizeName)&&$_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->sizeName!=''){?>/<?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->sizeName;?>
<?php }?>
                            <?php if (isset($_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->colorName)&&$_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->colorName!=''){?>/<?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->colorName;?>
<?php }?>
                            <?php }?>
                        </td>
                        <td align="center" class="style2"><?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->index+1;?>
</td>
                    </tr>
                    <?php } ?>
                <tfoot class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">
                    <tr>
                        <td><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotalbill;?>
</td>
                        <td align="center" class="style2 style1"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[23]->billsettingsvalue;?>
<?php $_tmp21=ob_get_clean();?><?php if ($_tmp21==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 $_tmp22=ob_get_clean();?><?php if ($_tmp22=='0'){?>  hidden <?php }?>></td>

                        <td><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellQuantity;?>
<?php $_tmp23=ob_get_clean();?><?php if ($_tmp23<=0){?>
                            <?php echo $_smarty_tpl->tpl_vars['quantity']->value;?>

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

                            <?php }?> </td>
                        <td align="center" class="style2 style1"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp24=ob_get_clean();?><?php if ($_tmp24==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>> </td>
                        <td align="center" class="style2 style1"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[22]->billsettingsvalue;?>
<?php $_tmp25=ob_get_clean();?><?php if ($_tmp25==0){?>  <?php }else{ ?>  style="display:none !important"  <?php }?>> </td>
                        <td align="center" class="style2 style1"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[20]->billsettingsvalue;?>
<?php $_tmp26=ob_get_clean();?><?php if ($_tmp26==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>> </td>
                        <td colspan="2">الاجمالى العام</td>
                    </tr>
                </tfoot>
                </tbody>

            </table>
            <table class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" width="50%" border="0" cellpadding="0" cellspacing="0" class="result" style="margin-top:5px">
                <tr>



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

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

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

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

                    <?php if ($_smarty_tpl->tpl_vars['billnameAddData']->value->taxOfDiscountPrint==0){?>
                    <td width="9%" align="center">ضريبه الخصم</td>
                    <?php }?>
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[31]->billsettingsvalue;?>
<?php $_tmp31=ob_get_clean();?><?php if ($_tmp31==0){?>
                    <td width="9%" align="center">ضريبه القيمة المضافة</td>
                    <?php }?>



                    <?php if ($_smarty_tpl->tpl_vars['returnsellbillData']->value->extraDiscountVal>0&&$_smarty_tpl->tpl_vars['billsettingsData']->value[90]->billsettingsvalue==1&&$_smarty_tpl->tpl_vars['billnameAddData']->value->extraDiscountPlace==0){?>
                    <td width="9%" align="center">خصم اضافى </td>
                    <?php }?>
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilldiscount;?>
<?php $_tmp32=ob_get_clean();?><?php if ($_tmp32>0){?>
                    <td width="8%" align="center" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[47]->billsettingsvalue;?>
<?php $_tmp33=ob_get_clean();?><?php if ($_tmp33==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>قيمة الخصم</td>
                    <!--<td width="8%" align="center" >نوع الخصم</td>-->
                    <?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['returnsellbillData']->value->extraDiscountVal>0&&$_smarty_tpl->tpl_vars['billsettingsData']->value[90]->billsettingsvalue==1&&$_smarty_tpl->tpl_vars['billnameAddData']->value->extraDiscountPlace==1){?>
                    <td width="9%" align="center">خصم اضافى </td>
                    <?php }?>

                    <!-- <td width="10%" align="center"  class="style1">الاجمالي</td>
                    <td width="9%" align="center" class="style1">عدد الوحدات</td> -->
                </tr>
                <tr>


                    <!-----------الدين بعد ------------------->
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[19]->billsettingsvalue;?>
<?php $_tmp34=ob_get_clean();?><?php if ($_tmp34==0){?>
                    <td align="center" class="style1" ><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotaldeptafter;?>
</td>
                    <?php }?>
                    <!---------------------الباقي----------------->
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[30]->billsettingsvalue;?>
<?php $_tmp35=ob_get_clean();?><?php if ($_tmp35==0){?>
                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbillfinalbill;?>
</td>
                    <?php }?>

                    <!-----------المدفوع ------------------->
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[29]->billsettingsvalue;?>
<?php $_tmp36=ob_get_clean();?><?php if ($_tmp36==0){?>
                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotalpayed;?>
</td>
                    <?php }?>

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

                    <?php if ($_smarty_tpl->tpl_vars['billnameAddData']->value->taxOfDiscountPrint==0){?>
                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->taxOfDiscountVal;?>
</td>
                    <?php }?>
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[31]->billsettingsvalue;?>
<?php $_tmp38=ob_get_clean();?><?php if ($_tmp38==0){?>
                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['taxvalue']->value;?>
 (<?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->tax;?>
%)</td>
                    <?php }?>

                    <?php if ($_smarty_tpl->tpl_vars['returnsellbillData']->value->extraDiscountVal>0&&$_smarty_tpl->tpl_vars['billsettingsData']->value[90]->billsettingsvalue==1&&$_smarty_tpl->tpl_vars['billnameAddData']->value->extraDiscountPlace==0){?>
                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->extraDiscountVal;?>
</td>
                    <?php }?>
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilldiscount;?>
<?php $_tmp39=ob_get_clean();?><?php if ($_tmp39>0){?>
                    <td align="center" class="style1" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[47]->billsettingsvalue;?>
<?php $_tmp40=ob_get_clean();?><?php if ($_tmp40==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>
                        <?php if ($_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilldiscounttype==2){?>(%<?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilldiscount;?>
)<?php }?> <?php echo $_smarty_tpl->tpl_vars['discountvalue']->value;?>

                    </td>
                    <!--                    <td align="center" class="style1"> <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilldiscounttype;?>
<?php $_tmp41=ob_get_clean();?><?php if ($_tmp41==1){?>
                                            مباشر
                                            <?php }else{ ?>
                                            بنسبة
                                            <?php }?> </td>-->
                    <?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['returnsellbillData']->value->extraDiscountVal>0&&$_smarty_tpl->tpl_vars['billsettingsData']->value[90]->billsettingsvalue==1&&$_smarty_tpl->tpl_vars['billnameAddData']->value->extraDiscountPlace==1){?>
                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->extraDiscountVal;?>
</td>
                    <?php }?>
                    <!-- <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotalbill;?>
</td>
                    <td align="center" class="style1"> <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellQuantity;?>
<?php $_tmp42=ob_get_clean();?><?php if ($_tmp42<=0){?>
                        <?php echo $_smarty_tpl->tpl_vars['quantity']->value;?>

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

                        <?php }?> </td> -->
                </tr>
            </table><table width="100%" style="text-align: center;margin-top: 20px">
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[43]->billsettingsvalue;?>
<?php $_tmp43=ob_get_clean();?><?php if ($_tmp43==0){?>

                <tr>

                    <td >توقيع العميل </td> <td >توقيع ال<?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==0){?> بائع <?php }elseif($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==1){?>مندوب <?php }elseif($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==2){?>طبيب <?php }?> </td><td><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->goodsReceiptApproval;?>
</td>
                </tr>

                <?php }?>

                <tr>
                    <td ><!--span class="style1" style="direction:rtl"><strong><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->useremployeename;?>
</strong></span--></td>
                    <!-- <td  nowrap <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==2){?>style="display:none;"<?php }?>><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 <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[81]->billsettingsvalue==1){?>style="display:none"<?php }?>>
                    <td colspan="6"  style="text-align:center !important"><p><span class="copywrites1">تصميم شركة جي تي فور 01110070882</span></p></td>
                </tr>
            </table>
            <?php }else{ ?>
            <table width="97%" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="148"  align="left" valign="middle">&nbsp;</td>
                    <td width="142"  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="50"><br>
                                <span style="font-size:14px"><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->phone;?>
</span>
                                <?php }else{ ?>
                                <img src="../views/default/images/branch_image/<?php echo $_smarty_tpl->tpl_vars['branchData']->value->logo;?>
" alt="" width="122" height="50"><br>
                                <span style="font-size:14px"> <?php echo $_smarty_tpl->tpl_vars['branchData']->value->mobile;?>
</span>
                                <?php }?>
                    </td>
                </tr>
            </table>
            <table  style="width:63%;float:right;margin-top: 7px;direction: rtl">
                <tr <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[69]->billsettingsvalue==0){?><?php }else{ ?>  style="display:none"<?php }?>>
                    <td   colspan="3" align="right" class="style1" dir="rtl">
                        <h1  style="float:right; text-align:right"><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->name;?>
</h1>    </td>
                </tr>

                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[18]->billsettingsvalue;?>
<?php $_tmp44=ob_get_clean();?><?php if ($_tmp44==0){?>
                <tr class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" >
                    <td align="right">
                        <span> الدين قبل:</span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotaldeptbefor;?>
  <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</span>
                    </td>

                </tr>
                <?php }?>
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[16]->billsettingsvalue;?>
<?php $_tmp45=ob_get_clean();?><?php if ($_tmp45==0){?>
                <tr>
                    <td align="right">
                        <span> اسم العميل :</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->tempclientName;?>
</span>
                    </td>
                </tr>
                <?php }?>
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[101]->billsettingsvalue;?>
<?php $_tmp46=ob_get_clean();?><?php if ($_tmp46==0){?>
                <tr>
                    <td align="right">
                        <span> عملية الفاتورة :</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->billoperationName;?>
</span>
                    </td>
                </tr>
                <?php }?>
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[22]->billsettingsvalue;?>
<?php $_tmp47=ob_get_clean();?><?php if ($_tmp47==0){?>
                <tr>
                    <td align="right">
                        <span> التعليق :</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->comment;?>
</span>
                    </td>
                </tr>
                <?php }?>
                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[39]->billsettingsvalue;?>
<?php $_tmp48=ob_get_clean();?><?php if ($_tmp48==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>

                    <td dir="rtl">
                        <span> عنوان العميل:</span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['clientdata']->value->clientaddress;?>
</span>
                    </td>

                </tr>
                <!-- <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[3]->billsettingsvalue;?>
<?php $_tmp49=ob_get_clean();?><?php if ($_tmp49==0){?>  <?php }else{ ?> style="display:none" <?php }?>>
                    <td align="right">  ال<?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==0){?> بائع <?php }elseif($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==1){?>مندوب <?php }elseif($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==2){?>طبيب <?php }?></td>

                </tr> -->
                <tr>
                    <td align="right">
                        <span>تاريخ البيان:</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilldate;?>
</span>
                    </td>
                </tr>
            </table>
            <table style="width:35%;float:left;direction: rtl">

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

                    <td dir="rtl">
                        <span>تليفون العميل:</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['clientdata']->value->clientphone;?>
</span>
                </tr>

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

                    <td dir="rtl">
                        <span> كود العميل :</span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['clientdata']->value->clientcode;?>
</span>
                    </td>

                </tr>

                <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->clientserial==1){?>
                <tr >

                    <td align="right">
                        <span> رقم  تسلسل الفاتورة :</span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbillid;?>
</span>
                    </td>
                    <td>  </td>
                </tr>
                <?php }?>




                

                <!--المخزن -->
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[27]->billsettingsvalue;?>
<?php $_tmp52=ob_get_clean();?><?php if ($_tmp52==0){?>

                <tr>
                    <td align="right" >
                        <span> اسم المخزن: </span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->storeName;?>
</span>
                    </td>
                </tr>
                <?php }?>
                <tr >
                    <td align="right">
                        <span class="">المستخدم :</span>
                        <span class=""> <?php echo $_smarty_tpl->tpl_vars['billUserData']->value->employeename;?>
</span></td>
                </tr>
            </table>
            <div style="clear:both"></div>

            <h4 style="text-align: center;margin: 5px">مردودات مبيعات</h4>

            <table class="data" width="100%"  cellpadding="0" cellspacing="0" dir="rtl">

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

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

                    <td  align="center"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[22]->billsettingsvalue;?>
<?php $_tmp54=ob_get_clean();?><?php if ($_tmp54==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 $_tmp55=ob_get_clean();?><?php if ($_tmp55==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 $_tmp56=ob_get_clean();?><?php if ($_tmp56=='0'){?>  hidden <?php }?> ><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
</th>

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



                <?php  $_smarty_tpl->tpl_vars['myreturnsellbilldetailData'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['returnsellbilldetailData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->index=-1;
foreach ($_from as $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->key => $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value){
$_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->_loop = true;
 $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->index++;
?>

                <tr>
                    <td align="center" class="style2"><?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->index+1;?>
</td>
                    <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[20]->billsettingsvalue;?>
<?php $_tmp58=ob_get_clean();?><?php if ($_tmp58==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>

                        <?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->parcode;?>


                    </td>

                    <td>

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

                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[79]->billsettingsvalue;?>
<?php $_tmp59=ob_get_clean();?><?php if ($_tmp59==0){?>
                        <?php if (isset($_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->sizeName)&&$_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->sizeName!=''){?>/<?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->sizeName;?>
<?php }?>
                        <?php if (isset($_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->colorName)&&$_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->colorName!=''){?>/<?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->colorName;?>
<?php }?>
                        <?php }?>

                    </td>


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

                        <?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->note;?>


                    </td>


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

                        <?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->unitName;?>


                    </td>


                    <td>

                        <?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->returnsellbilldetailquantity;?>


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

                    </td>

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

                        <?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->returnsellbilldetailprice;?>
 <?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 $_tmp63=ob_get_clean();?><?php if ($_tmp63==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>



                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[34]->billsettingsvalue;?>
<?php $_tmp64=ob_get_clean();?><?php if ($_tmp64==0){?><?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->discountvalue;?>
 <?php }else{ ?>  <?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->discounttype;?>
 <?php }?>
                    </td>


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

                        <?php echo $_smarty_tpl->tpl_vars['myreturnsellbilldetailData']->value->returnsellbilldetailtotalprice;?>


                    </td>

                </tr>

                <?php } ?>
                <!--                <tfoot>
                                    <tr>
                                        <td colspan="2">الاجمالى</td>

                <td></td>
                                        <td> <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellQuantity;?>
<?php $_tmp65=ob_get_clean();?><?php if ($_tmp65<=0){?>
                                            <?php echo $_smarty_tpl->tpl_vars['quantity']->value;?>

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

                                            <?php }?></td>
                                        <td></td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotalbill;?>
</td>

                                    </tr>
                                </tfoot>-->

            </table>
            <table class="data <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" width="50%"  align="left" cellpadding="0" cellspacing="0" style="margin-top: 5px" dir="rtl">


                <tr>
                    <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[46]->billsettingsvalue;?>
<?php $_tmp66=ob_get_clean();?><?php if ($_tmp66==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>عدد القطع</td>
                    <td>
                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellQuantity;?>
<?php $_tmp67=ob_get_clean();?><?php if ($_tmp67<=0){?>
                        <?php echo $_smarty_tpl->tpl_vars['quantity']->value;?>

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

                        <?php }?>
                    </td>
                </tr>
                <tr>
                    <td>الاجمالى العام</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotalbill;?>
</td>
                </tr>
                <?php if ($_smarty_tpl->tpl_vars['returnsellbillData']->value->extraDiscountVal>0&&$_smarty_tpl->tpl_vars['billsettingsData']->value[90]->billsettingsvalue==1&&$_smarty_tpl->tpl_vars['billnameAddData']->value->extraDiscountPlace==1){?>
                <tr>
                    <td>خصم اضافى</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->extraDiscountVal;?>
</td>
                </tr>
                <?php }?>
                <!---->
                <!--                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[47]->billsettingsvalue;?>
<?php $_tmp68=ob_get_clean();?><?php if ($_tmp68==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>
                                    <td>نوع الخصم</td>
                                    <td>
                                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilldiscounttype;?>
<?php $_tmp69=ob_get_clean();?><?php if ($_tmp69==1){?>
                                        مباشر
                                        <?php }else{ ?>
                                        بنسبة
                                        <?php }?>
                                    </td>
                                </tr>-->

                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[47]->billsettingsvalue;?>
<?php $_tmp70=ob_get_clean();?><?php if ($_tmp70==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>
                    <td>قيمه الخصم</td>
                    <td> <?php echo $_smarty_tpl->tpl_vars['discountvalue']->value;?>
 <?php if ($_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilldiscounttype==2){?>(%<?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilldiscount;?>
)<?php }?></td>
                </tr>
                <?php if ($_smarty_tpl->tpl_vars['returnsellbillData']->value->extraDiscountVal>0&&$_smarty_tpl->tpl_vars['billsettingsData']->value[90]->billsettingsvalue==1&&$_smarty_tpl->tpl_vars['billnameAddData']->value->extraDiscountPlace==0){?>
                <tr>
                    <td>خصم اضافى</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->extraDiscountVal;?>
</td>
                </tr>
                <?php }?>
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[31]->billsettingsvalue;?>
<?php $_tmp71=ob_get_clean();?><?php if ($_tmp71==0){?>

                <tr>
                    <td>ضريبه القيمة المضافة</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['taxvalue']->value;?>
<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->currancy;?>
 (<?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->tax;?>
%)</td>
                </tr>
                <?php }?>
                <?php if ($_smarty_tpl->tpl_vars['billnameAddData']->value->taxOfDiscountPrint==0){?>
                <tr>
                    <td> ضريبه الخصم </td>
                    <td><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->taxOfDiscountVal;?>
</td>
                </tr>
                <?php }?>
                <tr>
                    <td>المبلغ بعد الخصم</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbillaftertotalbill;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                </tr>
                <!---->

                <!-----------الصافى   ------------------->
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[28]->billsettingsvalue;?>
<?php $_tmp72=ob_get_clean();?><?php if ($_tmp72==0){?>
                <tr>
                    <td>الصافى</td>
                    <td> <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbillaftertotalbill;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                </tr>
                <?php }?>

                <!-----------المدفوع ------------------->
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[29]->billsettingsvalue;?>
<?php $_tmp73=ob_get_clean();?><?php if ($_tmp73==0){?>
                <tr>
                    <td>المدفوع</td>
                    <td> <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotalpayed;?>
 <?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 $_tmp74=ob_get_clean();?><?php if ($_tmp74==0){?>
                <tr>
                    <td>المتبقى</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbillfinalbill;?>
<?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 $_tmp75=ob_get_clean();?><?php if ($_tmp75==0){?>
                <tr >
                    <td>إجمالى المديونيه</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotaldeptafter;?>
  <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                </tr>
                <?php }?>




            </table>
            <div style="clear:both"></div>
            <table width="100%">

                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[43]->billsettingsvalue;?>
<?php $_tmp76=ob_get_clean();?><?php if ($_tmp76==0){?>


                <td >توقيع العميل </td> <td >توقيع ال<?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==0){?> بائع <?php }elseif($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==1){?>مندوب <?php }elseif($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==2){?>طبيب <?php }?> </td><td><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->goodsReceiptApproval;?>
</td>
                </tr>
                <tr>
                    <td colspan="3" align="right">
                        <br/> <br/> <br/>
                    </td>
                </tr>
                <?php }?>

                <tr>
                    <td colspan="3" align="right" nowrap <?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></td>
                </tr>
                <tr <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[81]->billsettingsvalue==1){?>style="display:none"<?php }?>>
                    <td colspan="3" align="right"  style="text-align:center !important">

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