<?php /* Smarty version Smarty-3.1.11, created on 2023-10-16 23:02:59
         compiled from "../views/default/sellbillview/discountcontrol.html" */ ?>
<?php /*%%SmartyHeaderCode:1867353730652d96f3cf8fd3-06285505%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '63b8a489a243d8f71dc68dbb650a42edf71cd240' => 
    array (
      0 => '../views/default/sellbillview/discountcontrol.html',
      1 => 1693253994,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1867353730652d96f3cf8fd3-06285505',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'youtubes' => 0,
    'allDiscounts' => 0,
    'i' => 0,
    'one' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_652d96f3d7ab61_16327520',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_652d96f3d7ab61_16327520')) {function content_652d96f3d7ab61_16327520($_smarty_tpl) {?><div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">ادارة الفواتير</a></li>
            <li class="active">نسب الخصومات على الفواتير</li>
        </ol>

        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title">نسب الخصومات على الفواتير</h3>
                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[45]->url;?>
" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>

            </div>

            <div class="panel-body" style="padding: 10px;">

                <form action="sellbillController.php?do=discountcontrolsave" method="post" id="discountcontrolForm" class="form-horizontal">
                    <div class="row"  >

                        <div class="row">
                            <div class="col-lg-6">
                                <h4 class="col-lg-4">نسب الخصم للاجمالى </h4>
                            </div>

                            <div class="col-lg-6">
                                <button type="button" id="addrow" class="btn btn-primary pull-left ft-nor"> اضافة جديد</button>
                            </div>

                        </div>
                        <div class="table-responsive bd-gr">
                            <table class="table billtable table-bordered table-black " id="discountsTable">
                                <thead>
                                    <tr>
                                        <th colspan="2">اجمالى الفاتورة</th>
                                        <th rowspan="2">نسبة الخصم</th>
                                        <th rowspan="2">حذف</th>
                                    </tr>
                                    <tr>
                                        <th>من</th>
                                        <th>الى</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                    <?php  $_smarty_tpl->tpl_vars['one'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['one']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allDiscounts']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['one']->key => $_smarty_tpl->tpl_vars['one']->value){
$_smarty_tpl->tpl_vars['one']->_loop = true;
?>
                                    <tr id="row<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
">
                                        <td><input type="text" class="form-control positivefloat totalFrom" name="total_from<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="total_from<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-itr="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" value="<?php echo $_smarty_tpl->tpl_vars['one']->value->totalFrom;?>
"/></td>
                                        <td><input type="text" class="form-control positivefloat totalTo" name="total_to<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="total_to<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-itr="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" value="<?php echo $_smarty_tpl->tpl_vars['one']->value->totalTo;?>
"/></td>
                                        <td><input type="text" class="form-control positivefloat percentage" name="discount<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" id="discount<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-itr="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" value="<?php echo $_smarty_tpl->tpl_vars['one']->value->discount;?>
"/></td>
                                        <td><button type="button" class="close flt-none removeicon removeIt" data-itr="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
">×</button></td>
                                    </tr>
                                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable($_smarty_tpl->tpl_vars['i']->value+1, null, 0);?>
                                    <?php } ?>
                                </tbody>
                            </table>
                            <input type="hidden" name="itr" id="itr" value="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"/>
                        </div>
                    </div>
                    <div class="row" align="center">
                        <button type="button" id="saveIt" class="btn btn-primary">  حفظ</button>
                    </div>

                </form>

            </div> <!-- end of panel-body-->

        </div>  <!-- end of panel panel-default-->

    </div> <!-- end of container-->

</div>  <!-- end of row-->
<?php }} ?>