<?php /* Smarty version Smarty-3.1.11, created on 2025-12-07 18:56:01
         compiled from "../views/obgy/lab/supplies.html" */ ?>
<?php /*%%SmartyHeaderCode:567668836935b1a18455f8-83792025%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'be04daace6a3d4ce33a918f9dec1fa5d6df87aba' => 
    array (
      0 => '../views/obgy/lab/supplies.html',
      1 => 1702417892,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '567668836935b1a18455f8-83792025',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'today' => 0,
    'programesetting' => 0,
    'showStart' => 0,
    'showAll' => 0,
    'branches' => 0,
    'data' => 0,
    'selectedBranch' => 0,
    'cats' => 0,
    'row' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_6935b1a186f7b9_12887012',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6935b1a186f7b9_12887012')) {function content_6935b1a186f7b9_12887012($_smarty_tpl) {?>
<div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" 
     data-keyboard="false"   id="suppliesModal" style="min-width:1000px;">
    <div class="modal-dialog  modal-lg wds95">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">  </h4>
            </div>
            <div class="modal-body">
                <div class="portlet-body form">
                    <form class="form-horizontal" role="form" action="" method="post" 
                          id="suppForm" enctype="multipart/form-data">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="portlet blue-hoki box">
                                    <div class="portlet-title">
                                        <div class="actions">
                                            <button type="button" class="btn yellow-saffron"  id="newSupply"> New Supply </button>
                                            <button type="button" class="btn btn-danger" id="closeSupply"> Close</button>
                                        </div>

                                        <div class="caption" style=" font-size: 16px; font-weight: 700; width: 280px; ">  Date 
                                            <input type="text" class="form-control datepicker " 
                                                   id="useDate" name="usedate" value="<?php echo $_smarty_tpl->tpl_vars['today']->value;?>
"  readonly="" 
                                                   placeholder="Date" style="display: inline;width: 110px;margin: 0px 10px;"> 
                                        </div>

                                        <div class="caption" style=" font-size: 16px; font-weight: 700; width: 280px; ">  Branch 
                                            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->branches==1){?> 
                                            <select class="form-control select2h" id="branch_idCat" name="branch_idCat"  style="display: inline;width: 200px;
                                                    margin: 0px 10px;">
                                                <?php if ($_smarty_tpl->tpl_vars['showStart']->value==1){?> <option value="-1">choose</option>  <?php }?>
                                                <?php if ($_smarty_tpl->tpl_vars['showAll']->value==1){?> <option value="">All</option> <?php }?>
                                                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['branches']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
?>
                                                <option value="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" <?php if ($_smarty_tpl->tpl_vars['selectedBranch']->value==$_smarty_tpl->tpl_vars['data']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
</option>
                                                <?php } ?>
                                            </select>
                                            <?php }else{ ?>
                                            <input type="hidden"  id="branch_idCat" name="branch_idCat"   value="1"> 
                                            <?php }?>
                                        </div>
                                    </div>


                                    <div class="portlet-body">

                                        <div class="row"  style="padding-left: 9px;padding-top:5px;overflow-y: scroll;">
                                            <table class="table table-striped table-hover table-bordered" id="pre_table" >
                                                <thead>
                                                    <tr>
                                                        <th class="wds35">
                                                            Category
                                                        </th>
                                                        <th>
                                                            Supplies
                                                        </th>
                                                        <th class="wds7">
                                                        </th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr>
                                                        <td>
                                                            <select  class="form-control" name="suppliesCats"   
                                                                     id="suppliesCats" placeholder="اختر  "  >
                                                                <option value=""> choose </option>
                                                                <option value="-1"> All </option>
                                                                <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['cats']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['row']->key => $_smarty_tpl->tpl_vars['row']->value){
$_smarty_tpl->tpl_vars['row']->_loop = true;
?>
                                                                <option value="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" ><?php echo $_smarty_tpl->tpl_vars['row']->value->name;?>
</option>
                                                                <?php } ?>
                                                            </select>
                                                        </td>
                                                        <td id="suuuDiv">

                                                        </td>
                                                        <td>
                                                            <button type="button" class="btn btn-success"  id="addInvestSupply"> Save </button>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>


                                        <div id="suppliesContent"  style="padding: 5px;" ></div>

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

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


<script>
    $('#useDate').trigger('change');
</script>

<?php }} ?>