<?php /* Smarty version Smarty-3.1.11, created on 2023-10-30 20:02:33
         compiled from "../views/default/returnsellbillview/showdetail.html" */ ?>
<?php /*%%SmartyHeaderCode:1684001423653fefb96d0f29-73261155%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'e55a85bdc45459f2c57990d17706e8e800b55a84' => 
    array (
      0 => '../views/default/returnsellbillview/showdetail.html',
      1 => 1696798004,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1684001423653fefb96d0f29-73261155',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'billnameAddData' => 0,
    'billsettingsData' => 0,
    'returnsellbillData' => 0,
    'Programsettingdata' => 0,
    'billId' => 0,
    'allCostcenter' => 0,
    'myallCostcenter' => 0,
    'myclientdata' => 0,
    'Usergroupdata' => 0,
    'returnsellbilldetailData' => 0,
    'billnameid' => 0,
    'x' => 0,
    'returnsellbilldetail' => 0,
    'quantity' => 0,
    'taxvalue' => 0,
    'bankAccount' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_653fefb9945286_32631294',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_653fefb9945286_32631294')) {function content_653fefb9945286_32631294($_smarty_tpl) {?><style>
    .myresult
    {
        -webkit-print-color-adjust: exact;
    }
    @media print{

        tr > .myblack {
            border: 1px solid black !important;
        }
        /*        .mymargin{
                    margin-bottom: -80px !important;
                                padding-bottom: -80px !important;
        margin-top: -10px!important;
                }*/
        .margintop{
            margin-top: 50px  !important;
        }
        .myleft{
            padding-top: 20px !important;

        }
        .myright{

            margin-top: 50px !important;
            float: right !important;
            margin-bottom: 10px !important;
        }


    }
</style>


<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">ادارة الفواتير</a></li>
            <li><a href="#">فواتير مردودات المبيعات</a></li>
            <li class="active">تفاصيل فاتورة  مردودات المبيعات</li>
        </ol>
        <h3><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->name;?>
</h3>
        <hr/>

        <form class="form-horizontal " role="form" action="returnsellbillController.php?do=show" method="post">

            <div class="row">
                <div class="col-lg-8">
                    <div class="form-group " <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[61]->billsettingsvalue;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==0){?>  <?php }else{ ?> style="display:none" <?php }?>>
                        <label class="col-lg-2 control-label myleft ">رقم الفاتورة</label>
                        <div class="col-lg-10">
                            <p class="form-control-static">
                                <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbillserial;?>


                            </p>
                        </div>
                    </div><!-- end of form-group-->
                    <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->clientserial==1){?>
                    <div class="form-group mymargin">
                        <label class="col-lg-2 control-label myleft"> رقم تسلسل الفاتورة</label>
                        <div class="col-lg-9">
                            <p class="form-control-static">
                                <?php echo $_smarty_tpl->tpl_vars['billId']->value;?>

                            </p>
                        </div>
                    </div><!-- end of form-group-->
                    <?php }?>

                    <div class="form-group mg-bt5 mymargin" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[45]->billsettingsvalue;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==0){?>  <?php }else{ ?> style="display:none" <?php }?>>
                        <label class="col-lg-2 control-label myleft">مركز التكلفة </label>
                        <div class="col-lg-4">

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

                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->costcenterid;?>
<?php $_tmp3=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['myallCostcenter']->value->id;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp3==$_tmp4){?>   <?php echo $_smarty_tpl->tpl_vars['myallCostcenter']->value->name;?>
 <?php }?>
                            <?php } ?>


                        </div>
                    </div>


                    <div class="form-group mymargin" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[5]->billsettingsvalue;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==0){?> style="display:block" <?php }else{ ?> style="display:none" <?php }?> >
                        <label class="col-lg-2 control-label myleft">تاريخ الفاتورة</label>
                        <div class="col-lg-4">
                            <p class="form-control-static">
                                <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilldate;?>

                            </p>
                        </div>
                    </div><!-- end of form-group-->



                    <div <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[35]->billsettingsvalue;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==0){?> <?php }else{ ?> style="display:none" <?php }?> >
                        <div class="form-group mymargin" >
                            <label class="col-lg-2 control-label myleft">رقم السيارة</label>
                            <div class="col-lg-4">
                                <p class="form-control-static">
                                    <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->carnumber;?>

                                </p>
                            </div>
                        </div>

                        <div class="form-group mymargin" >
                            <label class="col-lg-2 control-label myleft">نوع السيارة</label>
                            <div class="col-lg-4">
                                <p class="form-control-static">
                                    <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->cartype;?>

                                </p>
                            </div>
                        </div>
                        <div class="form-group mymargin" >
                            <label class="col-lg-2 control-label myleft">شاسية السيارة</label>
                            <div class="col-lg-4">
                                <p class="form-control-static">
                                    <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->carchase;?>

                                </p>
                            </div>
                        </div>
                        <div class="form-group mymargin" >
                            <label class="col-lg-2 control-label myleft">موتور السيارة</label>
                            <div class="col-lg-4">
                                <p class="form-control-static">
                                    <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->carmotor;?>

                                </p>
                            </div>
                        </div>
                    </div>

                    <div   <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[39]->billsettingsvalue;?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7==0){?> <?php }else{ ?> style="display:none" <?php }?> >
                        <div  id="divclientdata">
                            <div class="form-group mymargin" >
                                <label class="col-lg-2 control-label myleft">عنوان العميل  </label>
                                <div class="col-lg-4">
                                    <p class="form-control-static">  <?php echo $_smarty_tpl->tpl_vars['myclientdata']->value->clientaddress;?>
</p>
                                </div>
                            </div>

                            <div class="form-group mymargin" >
                                <label class="col-lg-2 control-label myleft">رقم التليفون</label>
                                <div class="col-lg-4">
                                    <p class="form-control-static">   <?php echo $_smarty_tpl->tpl_vars['myclientdata']->value->clientphone;?>
</p>
                                </div>


                            </div>


                            <div class="form-group" >
                                <label class="col-lg-2 control-label myleft">كود العميل</label>
                                <div class="col-lg-4">
                                    <p class="form-control-static">  <?php echo $_smarty_tpl->tpl_vars['myclientdata']->value->clientcode;?>
</p>
                                </div>


                            </div>

                        </div>

                    </div>
                    <div class="form-group" >

                        <label class="col-lg-2 control-label">اسم العميل المؤقت</label>
                        <div class="col-lg-4">

                            <p class="form-control-static">
                                <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->tempclientName;?>

                            </p>
                        </div>
                    </div><!-- end of form-group-->


                </div><!-- end of bill no-->


                <div class="col-lg-4">
                    <div class="form-group mg-bt5" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[1]->billsettingsvalue;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8==0){?>  <?php }else{ ?> style="display:none" <?php }?>>
                        <label class="col-lg-2 control-label myleft">اسم العميل</label>
                        <div class="col-lg-4">
                            <p class="form-control-static">

                                <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbillclientname;?>


                            </p>
                        </div>
                    </div><!-- end of form-group-->



                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[56]->billsettingsvalue;?>
<?php $_tmp9=ob_get_clean();?><?php if ($_tmp9==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                        <label class="col-lg-2 control-label myleft">رصيد الدين</label>
                        <div class="col-lg-4">
                            <p class="form-control-static">
                                <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotaldeptbefor;?>

                            </p>
                        </div>
                    </div><!-- end of form-group-->



                    <div class="form-group mg-bt5" ><!--<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[68]->billsettingsvalue;?>
<?php $_tmp10=ob_get_clean();?><?php if ($_tmp10==0){?> <?php }else{ ?>  style="display:none"    <?php }?>-->
                        <label class="col-lg-2 control-label myleft">نوع السعر</label>
                        <div class="col-lg-4">
                            <p class="form-control-static">
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbilldetailData']->value[0]->pricetype;?>
<?php $_tmp11=ob_get_clean();?><?php if ($_tmp11==1){?>
                                تجزئة
                                <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbilldetailData']->value[0]->pricetype;?>
<?php $_tmp12=ob_get_clean();?><?php if ($_tmp12==0){?>
                                جملة
                                <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbilldetailData']->value[0]->pricetype;?>
<?php $_tmp13=ob_get_clean();?><?php if ($_tmp13==2){?>
                                نصف جملة
                                <?php }}}?>
                            </p>
                        </div>
                    </div><!-- end of form-group-->


                    <hr class="mg-bt5 mg-tp5 hidden-print"/>
                    <div class="form-group mg-bt5" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[2]->billsettingsvalue;?>
<?php $_tmp14=ob_get_clean();?><?php if ($_tmp14==0){?>  <?php }else{ ?> style="display:none" <?php }?>>
                        <label class="col-lg-2 control-label myleft">المخزن</label>
                        <div class="col-lg-4">
                            <p class="form-control-static">
                                <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->storeName;?>

                            </p>
                        </div>
                    </div><!-- end of form-group-->


                    <div class="form-group mg-bt5" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[12]->billsettingsvalue;?>
<?php $_tmp15=ob_get_clean();?><?php if ($_tmp15==0){?>  <?php }else{ ?> style="display:none" <?php }?>>
                        <label class="col-lg-2 control-label myleft">التعليق</label>
                        <div class="col-lg-4">
                            <p class="form-control-static">
                                <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->comment;?>

                            </p>
                        </div>
                    </div><!-- end of form-group-->


                    <div class="form-group mg-bt5" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[3]->billsettingsvalue;?>
<?php $_tmp16=ob_get_clean();?><?php if ($_tmp16==0){?> style="display:block" <?php }else{ ?> style="display:none" <?php }?>>
                        <label class="col-lg-2 control-label myleft">اسم <?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 }?></label>
                        <div class="col-lg-4">
                            <p class="form-control-static">
                                <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->employeename;?>

                            </p>
                        </div>
                    </div><!-- end of form-group-->

                    <div class="form-group mg-bt5" >
                        <label class="col-lg-2 control-label myleft">اسم  المستخدم</label>
                        <div class="col-lg-4">
                            <p class="form-control-static">
                                <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->useremployeename;?>

                            </p>
                        </div>
                    </div><!-- end of form-group-->
                </div><!-- end of client info-->

            </div><!-- end of frist row-->
            <!-- hidden ===============================-->
            <input type="hidden" name="billnameid" id="billnameid" value="<?php echo $_smarty_tpl->tpl_vars['billnameid']->value;?>
"/>
            <input type="hidden" name="settingreturn" id="settingreturn" value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[0]->billsettingsvalue;?>
"/>
            <input type="hidden" name="settingclient" id="settingclient" value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[1]->billsettingsvalue;?>
"/>
            <input type="hidden" name="settingstore" id="settingstore" value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[2]->billsettingsvalue;?>
"/>
            <input type="hidden" name="settingseller" id="settingseller" value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[3]->billsettingsvalue;?>
"/>
            <input type="hidden" name="settingparcode" id="settingparcode" value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[4]->billsettingsvalue;?>
"/>
            <input type="hidden" name="settingdate" id="settingdate" value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[5]->billsettingsvalue;?>
"/>
            <input type="hidden" name="settingnewproduct" id="settingnewproduct" value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[6]->billsettingsvalue;?>
"/>
            <input type="hidden" name="settingcomment" id="settingcomment" value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
"/>
            <input type="hidden" name="settingdiscount" id="settingdiscount" value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[8]->billsettingsvalue;?>
"/>
            <input type="hidden" name="settingQuantitiyFocus" id="settingQuantitiyFocus" value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[9]->billsettingsvalue;?>
"/>
            <input type="hidden" name="settingUnit" id="settingUnit" value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[10]->billsettingsvalue;?>
"/>
            <input type="hidden" name="discountrowtype" id="discountrowtype" value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[34]->billsettingsvalue;?>
"/>
            <input type="hidden" name="showdiscountrow" id="showdiscountrow" value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[8]->billsettingsvalue;?>
"/>


            <!-- end of hidden ===============================-->




            <div class="clearfix"></div>

            <div class="margintop"></div>

            <div class="row" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[0]->billsettingsvalue;?>
<?php $_tmp17=ob_get_clean();?><?php if ($_tmp17==0){?>  <?php }else{ ?> style="display:none !important"  <?php }?>>
                <div class="row">
                    <hr class="hidden-print"/>
                    <div class="col-lg-6">
                        <h4>مردودات المبيعات</h4>
                    </div>

                </div><!-- end of title row-->
                <div class="table-responsive">
                    <table class="table billtable table-bordered" id="containerReturn" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[0]->billsettingsvalue;?>
<?php $_tmp18=ob_get_clean();?><?php if ($_tmp18==0){?>  <?php }else{ ?> style="display:none !important"  <?php }?>>
                        <thead>
                            <tr>
                                <th class="wdt60 myblack" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[40]->billsettingsvalue;?>
<?php $_tmp19=ob_get_clean();?><?php if ($_tmp19==0){?>  <?php }else{ ?> style="display:none !important;" <?php }?>>رقم</th>
                                <th class="wdt120 myblack" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[59]->billsettingsvalue;?>
<?php $_tmp20=ob_get_clean();?><?php if ($_tmp20==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>الباركود</th>
                                <th class="wdt120 myblack">اسم المنتج</th>

                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[26]->billsettingsvalue;?>
<?php $_tmp21=ob_get_clean();?><?php if ($_tmp21==0){?>
                                <th  class="wdt240 myblack">المخزن</th>
                                <?php }?>
                                <th class="wdt240 myblack hidden-print" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
<?php $_tmp22=ob_get_clean();?><?php if ($_tmp22==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>ملاحظات</th>
                                <th <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[53]->billsettingsvalue;?>
<?php $_tmp23=ob_get_clean();?><?php if ($_tmp23==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>  class="wdt100n">الوحدة</th>


                                <th class="wdt100n myblack" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[64]->billsettingsvalue;?>
<?php $_tmp24=ob_get_clean();?><?php if ($_tmp24==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>العدد</th>
                                <th class="wdt100n   <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp25=ob_get_clean();?><?php if ($_tmp25=='0'){?>  hidden <?php }?>" ><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
</th>

                                <th class="wdt100n myblack <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">السعر</th>
                                <th class="wdt100n myblack <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[57]->billsettingsvalue;?>
<?php $_tmp26=ob_get_clean();?><?php if ($_tmp26==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>الخصم</th>
                                <th class="wdt100n myblack <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">الاجمالى</th>


                            </tr>
                        </thead>
                        <tbody>
                            <?php $_smarty_tpl->tpl_vars['x'] = new Smarty_variable(1, null, 0);?>
                            <?php  $_smarty_tpl->tpl_vars['returnsellbilldetail'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['returnsellbilldetail']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['returnsellbilldetailData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['returnsellbilldetail']->key => $_smarty_tpl->tpl_vars['returnsellbilldetail']->value){
$_smarty_tpl->tpl_vars['returnsellbilldetail']->_loop = true;
?>
                            <tr>
                                <td class=" myblack" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[40]->billsettingsvalue;?>
<?php $_tmp27=ob_get_clean();?><?php if ($_tmp27==0){?>  <?php }else{ ?> style="display:none !important;" <?php }?>><?php echo $_smarty_tpl->tpl_vars['x']->value;?>
</td>
                                <td class=" myblack" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[59]->billsettingsvalue;?>
<?php $_tmp28=ob_get_clean();?><?php if ($_tmp28==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>

                                    <div id="returnproductparcode1">
                                        <p class="form-control-static">
                                            <?php echo $_smarty_tpl->tpl_vars['returnsellbilldetail']->value->parcode;?>

                                        </p>
                                    </div>
                                </td>

                                <td class=" myblack">
                                    <div id="returnproductdiv1">
                                        <p class="form-control-static">
                                            <?php echo $_smarty_tpl->tpl_vars['returnsellbilldetail']->value->productName;?>
/<?php echo $_smarty_tpl->tpl_vars['returnsellbilldetail']->value->productCatName;?>

                                        </p>

                                    </div>
                                </td>



                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[26]->billsettingsvalue;?>
<?php $_tmp29=ob_get_clean();?><?php if ($_tmp29==0){?>
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbilldetail']->value->storeName;?>
<?php $_tmp30=ob_get_clean();?><?php if ($_tmp30!=''){?>
                                <td class=" myblack">
                                    <div id="productparcode1" >
                                        <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['returnsellbilldetail']->value->storeName;?>
 </p>
                                    </div>
                                </td>

                                <?php }else{ ?>

                                <td class=" myblack">
                                    <div id="productparcode1" >
                                        <p class="form-control-static">   <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->storeName;?>
 </p>
                                    </div>
                                </td>
                                <?php }?>
                                <?php }?>

                                <td class=" myblack <?php if ($_smarty_tpl->tpl_vars['returnsellbilldetail']->value->note==''){?> hidden-print<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
<?php $_tmp31=ob_get_clean();?><?php if ($_tmp31==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>
                                    <p class="form-control-static">
                                        <?php echo $_smarty_tpl->tpl_vars['returnsellbilldetail']->value->note;?>

                                    </p>
                                </td>


                                <td class=" myblack" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[53]->billsettingsvalue;?>
<?php $_tmp32=ob_get_clean();?><?php if ($_tmp32==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>
                                    <div id="returnproductunitdiv1">
                                        <p class="form-control-static">
                                            <?php echo $_smarty_tpl->tpl_vars['returnsellbilldetail']->value->unitName;?>

                                        </p>
                                    </div>
                                </td>



                                <td class=" myblack" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[64]->billsettingsvalue;?>
<?php $_tmp33=ob_get_clean();?><?php if ($_tmp33==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                                    <p class="form-control-static">
                                        <?php echo $_smarty_tpl->tpl_vars['returnsellbilldetail']->value->returnsellbilldetailquantity;?>

                                    </p>
                                </td>


                                <td class="check_tr_quantity  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp34=ob_get_clean();?><?php if ($_tmp34=='0'){?>  hidden <?php }?>">
                                    <?php echo $_smarty_tpl->tpl_vars['returnsellbilldetail']->value->otherdetailquantity;?>

                                </td>

                                <td class=" myblack <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">
                                    <div id="returnpropricechange1">
                                        <p class="form-control-static">
                                            <?php echo $_smarty_tpl->tpl_vars['returnsellbilldetail']->value->returnsellbilldetailprice;?>

                                        </p>
                                    </div>
                                </td>


                                <td class=" myblack <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[57]->billsettingsvalue;?>
<?php $_tmp35=ob_get_clean();?><?php if ($_tmp35==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                                    <p class="form-control-static">


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


                                <td class=" myblack <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">
                                    <p class="form-control-static" id="reurnprototal1"> <?php echo $_smarty_tpl->tpl_vars['returnsellbilldetail']->value->returnsellbilldetailtotalprice;?>
</p>

                                </td>



                            </tr>
                            <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'x', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['x']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>

                            <?php } ?>
                        </tbody>
                    </table>
                </div>
                <button type="button" class="btn btn-primary pull-left ft-nor <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[0]->billsettingsvalue;?>
<?php $_tmp37=ob_get_clean();?><?php if ($_tmp37==0){?>  <?php }else{ ?> style="display:none !important"  <?php }?>> اجمالى  مردودات المبيعات<span class="badge wht-clo" id="returnsellbilltotal"><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotalbill;?>
</span>

                </button>
            </div>

            <!-- end of third row-->





            <div class="row">

                <div class="col-lg-5">
                    <hr class="hidden-print"/>


                    <div class="form-group mg-bt5" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[58]->billsettingsvalue;?>
<?php $_tmp38=ob_get_clean();?><?php if ($_tmp38==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>

                        <label class="col-lg-5 control-label">عدد القطع المرتجعة</label>
                        <div class="col-lg-7">

                            <p class="form-control-static" id="returnTotalQty">
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellQuantity;?>
<?php $_tmp39=ob_get_clean();?><?php if ($_tmp39<=0){?>
                                <?php echo $_smarty_tpl->tpl_vars['quantity']->value;?>

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

                                <?php }?></p>

                        </div>
                    </div><!-- end of form-group-->



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

                        <label class="col-lg-5 control-label">الاجمالى العام</label>
                        <div class="col-lg-7">

                            <p class="form-control-static" id="gentotal"><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotalbill;?>
</p>

                        </div>
                    </div><!-- end of form-group-->

                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[90]->billsettingsvalue;?>
<?php $_tmp40=ob_get_clean();?><?php if ($_tmp40==1&&$_smarty_tpl->tpl_vars['billnameAddData']->value->extraDiscountPlace==1){?>
                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>"  >
                        <label class="col-lg-5 control-label">خصم اضافى </label>
                        <div class="col-lg-7">
                            <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->extraDiscountVal;?>
 </p>
                        </div>
                    </div>
                    <?php }?>

                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[57]->billsettingsvalue;?>
<?php $_tmp41=ob_get_clean();?><?php if ($_tmp41==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>

                        <label class="col-lg-5 control-label">نوع الخصم</label>
                        <div class="col-lg-7">

                            <p class="form-control-static">
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilldiscounttype;?>
<?php $_tmp42=ob_get_clean();?><?php if ($_tmp42==1){?>
                                مباشر
                                <?php }else{ ?>
                                بنسبة
                                <?php }?>
                            </p>
                        </div>
                    </div><!-- end of form-group-->

                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[57]->billsettingsvalue;?>
<?php $_tmp43=ob_get_clean();?><?php if ($_tmp43==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>

                        <label class="col-lg-5 control-label">قيمة الخصم</label>
                        <div class="col-lg-7">

                            <p class="form-control-static">
                                <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilldiscount;?>

                            </p>
                        </div>
                    </div><!-- end of form-group-->

                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[90]->billsettingsvalue;?>
<?php $_tmp44=ob_get_clean();?><?php if ($_tmp44==1&&$_smarty_tpl->tpl_vars['billnameAddData']->value->extraDiscountPlace==0){?>
                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>"  >
                        <label class="col-lg-5 control-label">خصم اضافى </label>
                        <div class="col-lg-7">
                            <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->extraDiscountVal;?>
 </p>
                        </div>
                    </div>
                    <?php }?>

                    <!-- end of form-group-->
                    <div class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[31]->billsettingsvalue;?>
<?php $_tmp45=ob_get_clean();?><?php if ($_tmp45==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                        <hr class="mg-tp5 mg-bt5 hidden-print"/>
                        <div class="form-group mg-bt5">

                            <label class="col-lg-5 control-label">ضريبه القيمة المضافة</label>
                            <div class="col-lg-7">


                                <div class="input-group">
                                    <label>
                                        <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->tax;?>
 %
                                    </label>
                                </div>
                                <div class="input-group" style="padding-top: 1px;">
                                    <label><?php echo $_smarty_tpl->tpl_vars['taxvalue']->value;?>

                                        <?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->currancy;?>
</label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- end of form-group-->
                    <div class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[89]->billsettingsvalue;?>
<?php $_tmp46=ob_get_clean();?><?php if ($_tmp46==0){?> style="display:none"    <?php }?>>
                        <hr class="mg-tp5 mg-bt5 hidden-print"/>
                        <div class="form-group mg-bt5">

                            <label class="col-lg-5 control-label"> ضريبه خصم </label>
                            <div class="col-lg-7">

                                <label>
                                    <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->taxOfDiscountVal;?>

                                </label>
                            </div>
                        </div>
                    </div>
                    <hr class="mg-tp5 mg-bt5 hidden-print"/>
                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[51]->billsettingsvalue;?>
<?php $_tmp47=ob_get_clean();?><?php if ($_tmp47==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>

                        <label class="col-lg-5 control-label">الصافى</label>
                        <div class="col-lg-7">

                            <p class="form-control-static" id="gen2total"><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbillaftertotalbill;?>
 </p>

                        </div>
                    </div><!-- end of form-group-->

                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[54]->billsettingsvalue;?>
<?php $_tmp48=ob_get_clean();?><?php if ($_tmp48==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>

                        <label class="col-lg-5 control-label">المدفوع</label>
                        <div class="col-lg-7">
                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[86]->billsettingsvalue;?>
<?php $_tmp49=ob_get_clean();?><?php if ($_tmp49==0){?>
                            <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotalpayed;?>
 </p>
                            <input type="hidden" name="genpayvisa" id="genpayvisa" value="0"/>
                            <input type="hidden" name="visaAccount" id="visaAccount" value="0"/>
                            <input type="hidden" name="isBankAccountTransfer" id="isBankAccountTransfer" value="0"/>
                            <?php }else{ ?>
                            <div class="form-group mg-bt5"  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[54]->billsettingsvalue;?>
<?php $_tmp50=ob_get_clean();?><?php if ($_tmp50==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                                <label class="col-lg-5 control-label">كاش</label>
                                <div class="col-lg-7">
                                    <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotalpayed-$_smarty_tpl->tpl_vars['returnsellbillData']->value->visaPayed;?>
 </p>
                                </div>
                            </div>
                            <div class="form-group mg-bt5"  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[54]->billsettingsvalue;?>
<?php $_tmp51=ob_get_clean();?><?php if ($_tmp51==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                                <label class="col-lg-5 control-label">دفع الكترونى</label>
                                <div class="col-lg-7">
                                    <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->visaPayed;?>
 </p>
                                </div>
                            </div>

                            <div class="form-group mg-bt5"  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[54]->billsettingsvalue;?>
<?php $_tmp52=ob_get_clean();?><?php if ($_tmp52==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                                <label class="col-lg-5 control-label">حساب الدفع</label>
                                <div class="col-lg-7">
                                    <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['bankAccount']->value->accountname;?>
/<?php echo $_smarty_tpl->tpl_vars['bankAccount']->value->bankname;?>
 </p>
                                </div>
                            </div>
                            <div class="form-group mg-bt5"  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->isBankAccountTransfer;?>
<?php $_tmp53=ob_get_clean();?><?php if ($_tmp53==1){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                                <label class="col-lg-5 control-label">تحويل بنكى</label>
                                <div class="col-lg-7">
                                    <p class="form-control-static"><?php if ($_smarty_tpl->tpl_vars['returnsellbillData']->value->isBankAccountTransfer==1){?> نعم <?php }else{ ?> لا<?php }?> </p>
                                </div>
                            </div>
                            <?php }?>
                        </div>
                    </div><!-- end of form-group-->


                    <hr class="mg-tp5 mg-bt5 hidden-print"/>
                    <div class="form-group mg-bt5 bg-yel <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[55]->billsettingsvalue;?>
<?php $_tmp54=ob_get_clean();?><?php if ($_tmp54==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>

                        <label class="col-lg-5 control-label">المتبقى</label>
                        <div class="col-lg-7">

                            <p class="form-control-static" id="gen3total"><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbillfinalbill;?>
 </p>
                        </div>
                    </div><!-- end of form-group-->

                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[1]->billsettingsvalue;?>
<?php $_tmp55=ob_get_clean();?><?php if ($_tmp55==0){?> style="display:block" <?php }else{ ?> style="display:none !important" <?php }?>>

                        <label class="col-lg-5 control-label">باقى الدين</label>
                        <div class="col-lg-7">

                            <p class="form-control-static" id="gen4total"><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbilltotaldeptafter;?>
 </p>

                        </div>
                    </div><!-- end of form-group-->
                </div><!-- end of totals center-->
            </div><!-- end of fourth row-->


            <div class="row hidden-print">
                <!--                <button type="submit"  class="btn btn-primary">رجوع</button>-->

                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->deletedsellid;?>
<?php $_tmp56=ob_get_clean();?><?php if ($_tmp56>0){?>
                <a target="_new" href="<?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->controlname;?>
.php?do=showDetail&returnsellbillid=<?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->deletedsellid;?>
">
                    <button type="button" class="btn btn-primary">الايصال القديم</button></a>
                <?php }?>
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->printingpapersize;?>
<?php $_tmp57=ob_get_clean();?><?php if ($_tmp57==0){?>
                <a target="_new" href="sellbillprintController.php?do=returnshowDetail1&id=<?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbillid;?>
">
                    <button type="button" class="btn btn-info">طباعه فاتوره كبيرة</button></a>
                <?php }?>
                
                <a target="_new" href="sellbillprintController.php?do=returnshowDetail&id=<?php echo $_smarty_tpl->tpl_vars['returnsellbillData']->value->returnsellbillid;?>
">
                    <button type="button" class="btn btn-info">طباعه فاتوره</button></a>
                
            </div><!-- end of fifth row-->



        </form>
    </div><!-- end of container-->
</div><!-- end of main row-->







<?php }} ?>