<?php /* Smarty version Smarty-3.1.11, created on 2024-07-20 14:17:13
         compiled from "..\views\default\buyBillview\details.html" */ ?>
<?php /*%%SmartyHeaderCode:27121669b9cb96bd3e8-85797975%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'c93e091948b8b993b2f84193214f9cc1e31b7b8f' => 
    array (
      0 => '..\\views\\default\\buyBillview\\details.html',
      1 => 1700663728,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '27121669b9cb96bd3e8-85797975',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'billnameAddData' => 0,
    'Programsettingdata' => 0,
    'billnameid' => 0,
    'billsettingsData' => 0,
    'buyBillData' => 0,
    'allCostcenter' => 0,
    'myallCostcenter' => 0,
    'usergroup' => 0,
    'buyBillDetails' => 0,
    'detail' => 0,
    'file' => 0,
    'i' => 0,
    'countBillDetails' => 0,
    'taxvalue' => 0,
    'ordertype' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_669b9cb9ac7284_62644145',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_669b9cb9ac7284_62644145')) {function content_669b9cb9ac7284_62644145($_smarty_tpl) {?><script>
    /* $(document).ready(function(e) {
     var id= document.getElementById("buybillid").value;
     window.open("buyBillprintController.php?do=editprint&id="+id);
     });
     */
</script>
<style>
    @media print {

        tr>.myblack {
            border: 1px solid black !important;
        }


        .myleft {
            padding-top: 20px !important;
        }

        .myright {

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


    }

    .row {
        -webkit-print-color-adjust: exact;
    }
</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="buyBillController.php?do=show" method="post" id="billform">

            <!-- ======================== START BUY BILL SETTINGS ============================= -->
            <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="returnBillSetting" id="returnBillSetting"
                value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[0]->billsettingsvalue;?>
" />
            <input type="hidden" name="storeSetting" id="storeSetting"
                value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[2]->billsettingsvalue;?>
" />
            <input type="hidden" name="parcodeSetting" id="parcodeSetting"
                value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[4]->billsettingsvalue;?>
" />
            <input type="hidden" name="dateSetting" id="dateSetting"
                value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[5]->billsettingsvalue;?>
" />
            <input type="hidden" name="newProductSetting" id="newProductSetting"
                value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[6]->billsettingsvalue;?>
" />
            <input type="hidden" name="noteSetting" id="noteSetting"
                value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
" />
            <input type="hidden" name="productDiscountSetting" id="productDiscountSetting"
                value="<?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[8]->billsettingsvalue;?>
" />
            <!-- ==========================  END BUY BILL SETTINGS ============================ -->

            <!-- =========================== START GENERAL INFO PANEL =====================-->
            <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-4">
                            <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillSerial;?>
 </p>
                        </div>
                    </div>

                    <!----------------=========================================================-------------->
                    <div class="form-group mg-bt5 hidden-print" <?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['buyBillData']->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>
                    <!-------------------------------------=====================================------------------------------->
                    <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->clientserial==1){?>
                    <!-- end of form-group-->
                    <div class="form-group">
                        <label class="col-lg-3 control-label myleft">رقم تسلسل الفاتورة</label>
                        <div class="col-lg-9">
                            <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillid;?>
 </p>
                        </div>
                    </div>
                    <?php }?>
                    <!-- end of form-group-->
                    <div class="form-group" <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[5]->billsettingsvalue==0){?> <?php }else{ ?> style="display:none
                        !important;" <?php }?>>
                        <label class="col-lg-3 control-label myleft">تاريخ الفاتورة</label>
                        <div class="col-lg-9">
                            <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilldate;?>
 </p>
                        </div>
                    </div>
                    <!-- end of form-group-->
                </div>
                <!-- end of bill no-->
                <div class="col-lg-4">
                    <div class="form-group mg-bt5">
                        <label class="col-lg-3 control-label myleft">اسم المورد</label>
                        <div class="col-lg-9">
                            <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->suppliername;?>
</p>
                        </div>
                    </div>
                    <!-- end of form-group-->
                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[56]->billsettingsvalue;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                        <label class="col-lg-3 control-label ">رصيد الدين</label>
                        <div class="col-lg-9">
                            <div id="debt" class="form-control-static"> </div>
                            <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilltotaldeptbefor;?>

                        </div>
                    </div>
                    <!-- end of form-group-->
                    <hr class="mg-bt5 mg-tp5 hidden-print" />
                    <div class="form-group mg-bt5" <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[2]->billsettingsvalue==0){?> <?php }else{ ?>
                        style="display:none !important;" <?php }?>>
                        <label class="col-lg-3 control-label myleft">المخزن</label>
                        <div class="col-lg-9">
                            <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->storeName;?>
 </p>
                        </div>
                    </div>
                    <!-- end of form-group-->
                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['buyBillData']->value->comment==''){?> hidden-print<?php }?>">
                        <label class="col-lg-3 control-label myleft">التعليق</label>
                        <div class="col-lg-9">
                            <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->comment;?>
 </p>
                        </div>
                    </div>
                    <!-- end of form-group-->
                </div>
                <!-- end of client info-->

            </div>
            <!-- =========================== END GENERAL INFO PANEL ====================== -->

            <!-- =========================== START BUY BILL PANEL ======================= -->
            <div class="row">
                <div class="row ">
                    <hr class="hidden-print" />

                    <div class="form-group mg-bt5 ">
                        <label class="  col-lg-2 control-label">
                            <h4>المشتريات</h4>
                        </label>
                    </div>
                </div>
                <!-- end of title row-->
                <div class="table-responsive">
                    <table class="table billtable table-bordered table-black" id="containerpros">
                        <thead>
                            <tr>
                                <th class="wdt120 myblack " <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[4]->billsettingsvalue;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==0){?> <?php }else{ ?>
                                    style="display:none" <?php }?>>الباركود</th>
                                <th class="wdt120 myblack">اسم المنتج</th>
                                <th class="wdt240 myblack" <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue==0){?>
                                    <?php }else{ ?>style="display:none !important;" <?php }?>>ملاحظات</th>
                                <th class="wdt100n myblack" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[53]->billsettingsvalue;?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7==0){?> <?php }else{ ?>
                                    style="display:none !important" <?php }?>>الوحدة</th>
                                <th class="wdt100n myblack" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[64]->billsettingsvalue;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8==0){?> <?php }else{ ?>
                                    style="display:none" <?php }?>>العدد</th>
                                <th
                                    class="wdt100n check_tr_unit  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp9=ob_get_clean();?><?php if ($_tmp9=='0'){?>  hidden <?php }?>">
                                    <?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
</th>


                                <th class="wdt100n myblack <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>" <?php if ($_smarty_tpl->tpl_vars['billnameAddData']->value->productAndQuantityOnly==1){?> style="display:none !important;"
                                    <?php }?>>السعر</th>
                                <th class="wdt100n myblack <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[57]->billsettingsvalue;?>
<?php $_tmp10=ob_get_clean();?><?php if ($_tmp10==0){?> <?php }else{ ?> style="display:none"
                                    <?php }?>>الخصم</th>
                                <th class="wdt100n myblack <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[96]->billsettingsvalue;?>
<?php $_tmp11=ob_get_clean();?><?php if ($_tmp11==0){?> <?php }else{ ?> style="display:none"
                                    <?php }?>>ضريبة</th>
                                <th class="wdt100n myblack <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>" <?php if ($_smarty_tpl->tpl_vars['billnameAddData']->value->productAndQuantityOnly==1){?> style="display:none !important;"
                                    <?php }?>>الاجمالى
                                    <input name="hidden_itr" id="hidden_itr" type="hidden" value="0" />
                                </th>
                            </tr>
                        </thead>
                        <tbody>

                            <?php  $_smarty_tpl->tpl_vars['detail'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['detail']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['buyBillDetails']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['detail']->key => $_smarty_tpl->tpl_vars['detail']->value){
$_smarty_tpl->tpl_vars['detail']->_loop = true;
?>
                            <tr class="aw_td" id="newProduct1">
                                <td class=" myblack" <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[4]->billsettingsvalue==0){?> <?php }else{ ?>
                                    style="display:none !important;" <?php }?>>
                                    <div id="parcodeDiv1">
                                        <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['detail']->value->parcode;?>
 </p>
                                    </div>
                                </td>
                                <td class=" myblack">
                                    <div id="productdiv1" class="aw_width aw_mt5">
                                        <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['detail']->value->productName;?>
 /
                                            <?php echo $_smarty_tpl->tpl_vars['detail']->value->productCatName;?>

                                            <?php if (isset($_smarty_tpl->tpl_vars['detail']->value->sizeName)&&$_smarty_tpl->tpl_vars['detail']->value->sizeName!=''){?>/<?php echo $_smarty_tpl->tpl_vars['detail']->value->sizeName;?>
<?php }?>
                                            <?php if (isset($_smarty_tpl->tpl_vars['detail']->value->colorName)&&$_smarty_tpl->tpl_vars['detail']->value->colorName!=''){?>/<?php echo $_smarty_tpl->tpl_vars['detail']->value->colorName;?>
<?php }?>
                                        </p>
                                    </div>
                                </td>
                                <td class=" myblack" <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue==0){?>
                                    <?php }else{ ?>style="display:none !important;" <?php }?>>
                                    <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['detail']->value->note;?>
 </p>
                                </td>
                                <td class=" myblack" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[53]->billsettingsvalue;?>
<?php $_tmp12=ob_get_clean();?><?php if ($_tmp12==0){?> <?php }else{ ?>
                                    style="display:none !important" <?php }?>>
                                    <div id="unitDiv1">
                                        <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['detail']->value->unitName;?>
 </p>
                                    </div>
                                </td>
                                <td class=" myblack" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[64]->billsettingsvalue;?>
<?php $_tmp13=ob_get_clean();?><?php if ($_tmp13==0){?> <?php }else{ ?>
                                    style="display:none" <?php }?>>
                                    <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['detail']->value->buybilldetailquantity;?>
</p>
                                </td>


                                <td
                                    class="check_tr_quantity  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp14=ob_get_clean();?><?php if ($_tmp14=='0'){?>  hidden <?php }?>">
                                    <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['detail']->value->otherdetailquantity;?>
</p>
                                </td>
                                <td class=" myblack <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>" <?php if ($_smarty_tpl->tpl_vars['billnameAddData']->value->productAndQuantityOnly==1){?> style="display:none !important;"
                                    <?php }?>>
                                    <div id="propricechange1">
                                        <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['detail']->value->buybilldetailprice;?>
</p>
                                    </div>
                                </td>
                                <td class=" myblack <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[57]->billsettingsvalue;?>
<?php $_tmp15=ob_get_clean();?><?php if ($_tmp15==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                                    <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['detail']->value->discountvalue;?>
</p>
                                </td>
                                <td class=" myblack <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[96]->billsettingsvalue;?>
<?php $_tmp16=ob_get_clean();?><?php if ($_tmp16==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                                    <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['detail']->value->rowtaxper;?>
%</p>
                                </td>
                                <td class="aw_totalprice myblack <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>" <?php if ($_smarty_tpl->tpl_vars['billnameAddData']->value->productAndQuantityOnly==1){?> style="display:none !important;"
                                    <?php }?>>
                                    <div id="prototal1" class="aw_mt">
                                        <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['detail']->value->buybilldetailtotalprice;?>
 </p>
                                    </div>
                                </td>
                            </tr>
                            <?php } ?>

                        </tbody>

                    </table>
                </div>
                <!--        <button type="button" class="btn btn-primary pull-left ft-nor"> إجمالي المشتريات <span class="badge wht-clo"><div id="buyBillTotal">0</div></span></button>
                -->
            </div>
            <!-- end of second row-->
            <!-- =========================== END BUY BILL PANEL ==================== -->
            <div class="clearfix"></div>
            <!-- =========================== START TOTAL VALUES PANEL ======================= -->
            <div class="row">
                <div class="col-lg-9">
                    <div class="form-group mg-bt5">
                        <!--<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[58]->billsettingsvalue;?>
<?php $_tmp17=ob_get_clean();?><?php if ($_tmp17==0){?> <?php }else{ ?>  style="display:none"    <?php }?>-->
                        <label class="col-lg-5 control-label ">المرفقات</label>
                        <div class="col-lg-7">
                            <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                            <?php  $_smarty_tpl->tpl_vars['file'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['file']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['buyBillData']->value->filesArr; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['file']->key => $_smarty_tpl->tpl_vars['file']->value){
$_smarty_tpl->tpl_vars['file']->_loop = true;
?>
                            <?php if ($_smarty_tpl->tpl_vars['file']->value!=''&&$_smarty_tpl->tpl_vars['file']->value!="."&&$_smarty_tpl->tpl_vars['file']->value!="no image"){?>
                            <a href="../upload/buyBillFiles/<?php echo $_smarty_tpl->tpl_vars['file']->value;?>
" target="_blank" style="color: blue;"> (<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
) </a>
                            <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable($_smarty_tpl->tpl_vars['i']->value+1, null, 0);?>
                            <?php }?>
                            <?php } ?>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3">
                    <hr class="hidden-print" />
                    <div class="form-group mg-bt5" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[58]->billsettingsvalue;?>
<?php $_tmp18=ob_get_clean();?><?php if ($_tmp18==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 echo $_smarty_tpl->tpl_vars['countBillDetails']->value;?>
</p>
                        </div>
                    </div>
                    <!-- end of form-group-->

                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['usergroup']->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['buyBillData']->value->buybilltotalbill;?>
</p>
                        </div>
                    </div>
                    <!-- end of form-group-->
                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[57]->billsettingsvalue;?>
<?php $_tmp19=ob_get_clean();?><?php if ($_tmp19==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 if ($_smarty_tpl->tpl_vars['buyBillData']->value->buybilldiscountrype==0){?>
                                خصم مباشر
                                <?php }else{ ?>
                                خصم بنسبه مئويه
                                <?php }?> </p>
                        </div>
                    </div>
                    <!-- end of form-group-->
                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[57]->billsettingsvalue;?>
<?php $_tmp20=ob_get_clean();?><?php if ($_tmp20==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['buyBillData']->value->buybilldiscount;?>
 </p>
                        </div>
                    </div>
                    <!------------------------------------------------------>
                    <div <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[36]->billsettingsvalue;?>
<?php $_tmp21=ob_get_clean();?><?php if ($_tmp21=="0"){?> <?php }else{ ?> style="display:none" <?php }?>>
                        <hr class="mg-tp5 mg-bt5" />
                        <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>">
                            <label class="col-lg-5 control-label">ضريبه القيمة المضافة</label>
                            <div class="col-lg-7">
                                <div class="input-group">
                                    <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->payedtax;?>
 %
                                </div>
                                <div class="input-group" style="padding-top: 1px;">
                                    <?php echo $_smarty_tpl->tpl_vars['taxvalue']->value;?>

                                    <?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->currancy;?>

                                </div>
                            </div>
                        </div>
                    </div>
                    <!------------------------------------------------------->
                    <!-- end of form-group-->
                    <hr class="mg-tp5 mg-bt5 hidden-print" />
                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>" <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[52]->billsettingsvalue==0){?> <?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="gen2total"><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillaftertotalbill;?>
</p>
                        </div>
                    </div>
                    <!-- end of form-group-->
                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[54]->billsettingsvalue;?>
<?php $_tmp22=ob_get_clean();?><?php if ($_tmp22==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['buyBillData']->value->buybilltotalpayed;?>
 </p>
                        </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['usergroup']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[55]->billsettingsvalue;?>
<?php $_tmp23=ob_get_clean();?><?php if ($_tmp23==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['buyBillData']->value->buybillfinalbill;?>
</p>
                        </div>
                    </div>
                    <!-- end of form-group-->
                    <div class="form-group mg-bt5 <?php if ($_smarty_tpl->tpl_vars['usergroup']->value->hideBillPrices==1){?>hidden<?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['buyBillData']->value->buybilltotaldeptafter;?>
</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['Programsettingdata']->value->printingpapersize;?>
<?php $_tmp24=ob_get_clean();?><?php if ($_tmp24==0){?>
                <a target="_new" href="buyBillprintController.php?do=editprint1&id=<?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillid;?>
">
                    <button type="button" class="btn btn-info">طباعه ايصال كبير</button>
                </a>
                <?php }?>

                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->deletedbuyid;?>
<?php $_tmp25=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->deletedbuyid;?>
<?php $_tmp26=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->deletedbuyid;?>
<?php $_tmp27=ob_get_clean();?><?php if ($_tmp25>0&&$_tmp26!=null&&$_tmp27!=''){?>
                        <a target="_new"
                            href="<?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->controlname;?>
?do=editprint&id=<?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->deletedbuyid;?>
">
                            <button type="button" class="btn btn-primary">الايصال القديم</button></a>
                        <?php }?>
                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->printingpapersize;?>
<?php $_tmp28=ob_get_clean();?><?php if ($_tmp28==1){?> <a target="_new"
                            href="buyBillprintController.php?do=editprint&id=<?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillid;?>
">
                            <button type="button" class="btn btn-info">طباعه ايصال</button>
                        </a> <?php }?>


                        <a href="buyBillController.php?do=addoneserial&id=<?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillid;?>
&type=2"
                            type="button"> <button type="button" class="btn btn-info">تكويد المنتجات</button></a>

                        <a href="buyBillController.php?do=addserial&id=<?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillid;?>
&type=2" type="button">
                            <button type="button" class="btn btn-info">تكويد منتجات متعدد</button></a>



                        </a>

                        <a href="productController.php?do=showbarcodebuybill&buybillid=<?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillid;?>
&type=2"
                            type="button">
                            <button type="button" class="btn btn-info">طباعة بركود الفاتورة</button>
                        </a>
                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->conditions;?>
<?php $_tmp29=ob_get_clean();?><?php if ($_tmp29==0&&$_smarty_tpl->tpl_vars['buyBillData']->value->orderSavedBillId==0&&$_smarty_tpl->tpl_vars['ordertype']->value==1){?>
                        <a href="buyBillController.php?do=saveOfferAsBill&offerId=<?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybillid;?>
"
                            type="button">
                            <button type="button" class="btn btn-info">تنفيذ أمر شراء</button>
                        </a>
                        <?php }?>
            </div>
            <!-- end of fifth row-->

            <!-- =========================== END TOTAL VALUESPANEL ====================== -->
        </form>
    </div>
</div><?php }} ?>