<?php /* Smarty version Smarty-3.1.11, created on 2025-08-30 19:15:46
         compiled from "..\views\default\sellbillview\editprint.html" */ ?>
<?php /*%%SmartyHeaderCode:783268b323b24c7120-23318048%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'e686f77b0dda3c1eee0f60ac14c47ee1cc445999' => 
    array (
      0 => '..\\views\\default\\sellbillview\\editprint.html',
      1 => 1712446859,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '783268b323b24c7120-23318048',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'Usergroupdata' => 0,
    'billnameAddData' => 0,
    'billsettingsData' => 0,
    'sellbillData' => 0,
    'Programsettingdata' => 0,
    'allCostcenter' => 0,
    'myallCostcenter' => 0,
    'sellbilldetailData' => 0,
    'myclientdata' => 0,
    'billnameid' => 0,
    'x' => 0,
    'sellbilldetail' => 0,
    'quantity' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_68b323b28f7f64_32959001',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_68b323b28f7f64_32959001')) {function content_68b323b28f7f64_32959001($_smarty_tpl) {?><script>
    $(document).ready(function (e) {
        var printingpapersize = document.getElementById("printingpapersize").value;
        var id = document.getElementById("sellbillid").value;
        window.open("sellbillprintController.php?do=showDetail2&id=" + id);
        // alert(printingpapersize)
        /*if (printingpapersize == 1)
         {

         //alert("sellbillprintController.php?do=showDetail2&id="+id);
         window.open("sellbillprintController.php?do=showDetail2&id=" + id);
         }
         else
         {
         window.open("sellbillprintController.php?do=showDetail3&id=" + id);
         }*/

    });

</script>


<div class="myresult">

    <div class="row">
        <div class="container">
            <ol class="breadcrumb">
                <li><a href="#">ادارة الفواتير</a></li>
                <li><a <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->usergroupid!=6){?>href="sellbillController.php?do=show"<?php }else{ ?>
                        href="#"<?php }?>>فواتير المبيعات</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="sellbillController.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 !important" <?php }?>>
                            <label class="col-lg-2 control-label">رقم الفاتورة</label>
                            <div class="col-lg-4">
                                <p class="form-control-static">
                                    <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillserial;?>

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


                        <div class="form-group mg-bt5" <?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-4 control-label">مركز التكلفة </label>
                            <div class="col-lg-8">

                                <?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['sellbillData']->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" <?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">تاريخ الفاتورة</label>
                            <div class="col-lg-4">
                                <p class="form-control-static">
                                    <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldate;?>

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


                    <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">
                            <label class="col-lg-2 control-label">رقم السيارة</label>
                            <div class="col-lg-4">
                                <p class="form-control-static">
                                    <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->carnumber;?>

                                </p>
                            </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['sellbillData']->value->cartype;?>

                                </p>
                            </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['sellbillData']->value->carchase;?>

                                </p>
                            </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['sellbillData']->value->carmotor;?>

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


                    <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 $_tmp7=ob_get_clean();?><?php if ($_tmp7==0){?> <?php }else{ ?>
                            style="display:none" <?php }?>>
                            <label class="col-lg-4 control-label">اسم العميل</label>
                            <div class="col-lg-8">
                                <p class="form-control-static">
                                    <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->tempclientName;?>

                                </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 $_tmp8=ob_get_clean();?><?php if ($_tmp8==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                            <label class="col-lg-4 control-label">رصيد الدين</label>
                            <div class="col-lg-8">
                                <p class="form-control-static">
                                    <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptbefor;?>

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



                        <div class="form-group mg-bt5">
                            <label class="col-lg-4 control-label">نوع السعر</label>
                            <div class="col-lg-8">
                                <p class="form-control-static">
                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbilldetailData']->value[0]->pricetype;?>
<?php $_tmp9=ob_get_clean();?><?php if ($_tmp9==1){?>
                                    تجزئة
                                    <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbilldetailData']->value[0]->pricetype;?>
<?php $_tmp10=ob_get_clean();?><?php if ($_tmp10==0){?>
                                    جملة
                                    <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbilldetailData']->value[0]->pricetype;?>
<?php $_tmp11=ob_get_clean();?><?php if ($_tmp11==2){?>
                                    نصف جملة
                                    <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbilldetailData']->value[0]->pricetype;?>
<?php $_tmp12=ob_get_clean();?><?php if ($_tmp12==4){?>
                                    سعر4
                                    <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbilldetailData']->value[0]->pricetype;?>
<?php $_tmp13=ob_get_clean();?><?php if ($_tmp13==5){?>
                                    سعر5
                                    <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbilldetailData']->value[0]->pricetype;?>
<?php $_tmp14=ob_get_clean();?><?php if ($_tmp14==6){?>
                                    سعر6
                                    <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbilldetailData']->value[0]->pricetype;?>
<?php $_tmp15=ob_get_clean();?><?php if ($_tmp15==7){?>
                                    سعر7
                                    <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbilldetailData']->value[0]->pricetype;?>
<?php $_tmp16=ob_get_clean();?><?php if ($_tmp16==8){?>
                                    سعر8
                                    <?php }}}}}}}}?>

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


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

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




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

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

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

                    <div <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[39]->billsettingsvalue;?>
<?php $_tmp20=ob_get_clean();?><?php if ($_tmp20==0){?> <?php }else{ ?> style="display:none" <?php }?> >
                        <div id="divclientdata">
                            <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['myclientdata']->value->clientaddress;?>
</p>
                                </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['myclientdata']->value->clientphone;?>
 <?php if ($_smarty_tpl->tpl_vars['myclientdata']->value->clientmobile!=''){?> - <?php echo $_smarty_tpl->tpl_vars['myclientdata']->value->clientmobile;?>
<?php }?></p>
                                </div>


                            </div>


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

                                    </label>
                                </div>


                            </div>

                        </div>

                    </div>

                </div><!-- end of frist row-->
                <!-- hidden ===============================-->
                <input name="printingpapersize" id="printingpapersize" type="hidden"
                    value="<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->printingpapersize;?>
" />
                <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;?>
" />



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


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

                <div class="row">
                    <div class="row">
                        <hr />
                        <div class="col-lg-6">
                            <h4>المبيعات</h4>
                        </div>

                    </div><!-- end of title row-->

                    <div class="table-responsive">
                        <table class="table billtable table-bordered table-black" id="containerpros">
                            <thead>
                                <tr>
                                    <th class="wdt60" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[40]->billsettingsvalue;?>
<?php $_tmp21=ob_get_clean();?><?php if ($_tmp21==0){?> <?php }else{ ?>
                                        style="display:none !important;" <?php }?>>رقم</th>
                                    <th <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[59]->billsettingsvalue;?>
<?php $_tmp22=ob_get_clean();?><?php if ($_tmp22==0){?> <?php }else{ ?> style="display:none"
                                        <?php }?> class="wdt120">الباركود</th>

                                    <th class="wdt120">اسم المنتج</th>
                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[26]->billsettingsvalue;?>
<?php $_tmp23=ob_get_clean();?><?php if ($_tmp23==0){?>

                                    <th class="wdt240">المخزن</th>

                                    <?php }?>

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

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


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

                                    <th class="wdt100n <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">السعر</th>
                                    <th <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[57]->billsettingsvalue;?>
<?php $_tmp28=ob_get_clean();?><?php if ($_tmp28==0){?> <?php }else{ ?> style="display:none
                                        !important" <?php }?> class="wdt100n <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">الخصم</th>
                                    <th class="wdt100n <?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['sellbilldetail'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['sellbilldetail']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['sellbilldetailData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['sellbilldetail']->key => $_smarty_tpl->tpl_vars['sellbilldetail']->value){
$_smarty_tpl->tpl_vars['sellbilldetail']->_loop = true;
?>
                                <tr>
                                    <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[40]->billsettingsvalue;?>
<?php $_tmp29=ob_get_clean();?><?php if ($_tmp29==0){?> <?php }else{ ?> style="display:none
                                        !important;" <?php }?>><?php echo $_smarty_tpl->tpl_vars['x']->value;?>
</td>
                                    <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[59]->billsettingsvalue;?>
<?php $_tmp30=ob_get_clean();?><?php if ($_tmp30==0){?> <?php }else{ ?> style="display:none
                                        !important" <?php }?>>
                                        <div id="productparcode1">
                                            <p class="form-control-static">
                                                <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->parcode;?>

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

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

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

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

                                                    <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->storeName;?>

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


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

                                            </p>
                                        </td>


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

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

                                            </p>
                                        </td>



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

                                        </td>

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

                                                </p>
                                            </div>
                                        </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[57]->billsettingsvalue;?>
<?php $_tmp37=ob_get_clean();?><?php if ($_tmp37==0){?> <?php }else{ ?> style="display:none
                                            !important" <?php }?>>
                                            <p class="form-control-static">

                                                <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->discountvalue;?>

                                            </p>
                                        </td>


                                        <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">
                                            <p class="form-control-static">
                                                <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->sellbilldetailtotalprice;?>

                                            </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 }?>">
                        اجمالى المبيعات <span class="badge wht-clo">
                            <div id="sellbilltotal"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalbill;?>
</div>
                        </span>
                    </button>
                </div>
                <!-- end of second row-->





                <div class="row">

                    <div class="col-lg-7">

                        <div class="form-group" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[80]->billsettingsvalue;?>
<?php $_tmp38=ob_get_clean();?><?php if ($_tmp38==0){?> <?php }else{ ?>
                            style="display:none" <?php }?>>
                            <label class="col-lg-2 control-label"><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->delivery;?>
<?php $_tmp39=ob_get_clean();?><?php if ($_tmp39==0){?>شحن<?php }else{ ?>
                                توصيل <?php }?></label>
                            <div class="col-lg-4">
                                <p name="delivery" id="delivery" /><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->delivery;?>
</p>
                                <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">ادخل
                                    القيمة صحيحة</span>
                            </div>
                        </div>

                        <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[80]->billsettingsvalue;?>
<?php $_tmp40=ob_get_clean();?><?php if ($_tmp40==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                            <label class="col-lg-2 control-label">الاجمالي العام</label>
                            <div class="col-lg-7">
                                <p class="form-control-static mg-tp10" id="valdelivery">
                                    <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->totalafterdelivery;?>
</p>
                                <!--<input type="hidden" name="valdeliveryhidden" id="valdeliveryhidden" value="0"/>-->

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

                    <div class="col-lg-3">
                        <hr />

                        <div class="form-group mg-bt5" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[58]->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" id="totalQty">
                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellQuantity;?>
<?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['sellbillData']->value->sellQuantity;?>

                                        <?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['sellbillData']->value->sellbilltotalbill;?>
</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 ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldiscounttype;?>
<?php $_tmp44=ob_get_clean();?><?php if ($_tmp44==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 $_tmp45=ob_get_clean();?><?php if ($_tmp45==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['sellbillData']->value->sellbilldiscount;?>

                                </p>
                            </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[31]->billsettingsvalue;?>
<?php $_tmp46=ob_get_clean();?><?php if ($_tmp46==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                            <hr class="mg-tp5 mg-bt5" />
                            <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['sellbillData']->value->tax;?>

                                    </label>
                                </div>
                            </div>

                        </div>
                        <hr class="mg-tp5 mg-bt5" />
                        <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[52]->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['sellbillData']->value->sellbillaftertotalbill;?>

                                </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">
                                <p class="form-control-static">
                                    <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalpayed;?>

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


                        <hr class="mg-tp5 mg-bt5" />
                        <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 $_tmp49=ob_get_clean();?><?php if ($_tmp49==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['sellbillData']->value->sellbillfinalbill;?>
 </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 $_tmp50=ob_get_clean();?><?php if ($_tmp50==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['sellbillData']->value->sellbilltotaldeptafter;?>

                                </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['sellbillData']->value->deletedsellid;?>
<?php $_tmp51=ob_get_clean();?><?php if ($_tmp51>0){?>
                    <a target="_new"
                        href="<?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->controlname;?>
.php?do=editprint&id=<?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->deletedsellid;?>
">
                        <button type="button" class="btn btn-primary">الايصال القديم</button></a>
                    <?php }?>
                    <input name="sellbillid" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillid;?>
" id="sellbillid" />
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->printingpapersize;?>
<?php $_tmp52=ob_get_clean();?><?php if ($_tmp52==0){?>
                    <a target="_new" href="sellbillprintController.php?do=showDetail3&id=<?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillid;?>
">
                        <button type="button" class="btn btn-info">طباعه ايصال كبير</button></a>
                    <?php }?>
                    
                    <a target="_new" href="sellbillprintController.php?do=showDetail2&id=<?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillid;?>
">
                        <button type="button" class="btn btn-info">طباعه ايصال</button></a>
                    
                    <a target="_new"
                        href="sellbillprintController.php?do=showpermission&id=<?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillid;?>
">
                        <button type="button" class="btn btn-info">طباعه اذن صرف كامل</button></a>

                    <a target="_new"
                        href="sellbillprintController.php?do=showmorepermission&id=<?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillid;?>
">
                        <button type="button" class="btn btn-info">طباعه اذن صرف منفرد</button></a>
                </div><!-- end of fifth row-->




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

</div>
<!--<meta http-equiv="refresh" content="0;URL=sellbillController.php?do=show" />-->
<!--<meta http-equiv="refresh" content="0;URL=sellbillController.php?do=addsellBill&billnameid=<?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->billnameid;?>
" />--><?php }} ?>