<?php /* Smarty version Smarty-3.1.11, created on 2026-01-14 15:22:24
         compiled from "..\views\default\supplierview\show.html" */ ?>
<?php /*%%SmartyHeaderCode:159216967989093f126-67943046%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '986412354b818477954e7f7b00acbedf4859ef3e' => 
    array (
      0 => '..\\views\\default\\supplierview\\show.html',
      1 => 1752437506,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '159216967989093f126-67943046',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'message' => 0,
    'youtubes' => 0,
    'outputString' => 0,
    'alldata' => 0,
    'data' => 0,
    'usergroupname' => 0,
    'Programsettingdata' => 0,
    'sum' => 0,
    'shownData' => 0,
    'i' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_69679890addd25_13438214',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_69679890addd25_13438214')) {function content_69679890addd25_13438214($_smarty_tpl) {?><div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">خصائص عامة</a></li>
            <li><a href="#">الموردين</a></li>
            <li><a href="#">إدارة الموردين</a></li>
            <li class="active">عرض الموردين</li>
        </ol>



        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->

            <div class="panel-heading" style="padding:5px 15px 15px">
                <h3 class="panel-title" style="display: inline-block;">عرض الموردين <br />
                    <?php if ($_smarty_tpl->tpl_vars['message']->value!=''){?>
                    <?php echo $_smarty_tpl->tpl_vars['message']->value;?>

                    <?php }?></h3>
                <a href="<?php echo $_smarty_tpl->tpl_vars['youtubes']->value[10]->url;?>
" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
                <a href="supplierController.php" class="hidden-print"><input type="button"  id="submit" style="margin-left: 12px" class="btn btn-primary pull-left " value="إضافة جديد"/></a>
            </div>

            <div class="panel-body">

                <!---------- start outputString alert ----------->
                <div id="outputString" class="alert alert-block alert-success fade in  hidden-print" style="display:none">
                    <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">&times;</button>
                    <p id="outputStringValue"><?php echo $_smarty_tpl->tpl_vars['outputString']->value;?>
</p>
                    <div class="clearfix"></div>
                </div>
                <!---------  end outputString alert ------------>

                <form class="form-inline hidden-print" action="supplierController.php?do=show"  method="post">
                    <div class="form-group">
                        <label class="sr-only">اسم المورد</label>
                        <select data-placeholder="اختر اسم المورد:"  class="select2 wdt100" name="supplierid" id="supplierid">
                            <option value="-1"></option>










                            <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['alldata']->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->supplierid;?>
"><?php echo $_smarty_tpl->tpl_vars['data']->value->suppliername;?>
</option>










                            <?php } ?>










                        </select>
                    </div>
                    <input type="hidden" name="usergroupname" id="usergroupname" value="<?php echo $_smarty_tpl->tpl_vars['usergroupname']->value;?>
"/>
                    <input type="checkbox" name="showdelete" value="1"/>عرض المحذوف
                    <button type="submit" class="btn btn-primary">بحث</button>
                </form>

                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->showCurrency;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==1){?>
                <div class="col-lg-offset-8 col-lg-4" style="margin-bottom: 5px;">
                    <a type="button" class="btn btn-success pull-left" href="supplierController.php?do=updateDebtsInTermsOfCurrency">تحديث قيم المديونيات حسب سعر الصرف</a>
                </div>
                <?php }?>
                <div class="col-lg-offset-8 col-lg-4">
                    <div class="well well-sm">
                        <h4 class="text-center">إجمالي مديونية الموردين الغير محذوفين:  <?php echo $_smarty_tpl->tpl_vars['sum']->value;?>
</h4>
                    </div>
                </div>
                <div class="clearfix"></div>
                <hr/>
                
                <form id="form1" name="form1" method="post" action="supplierController.php?do=executeOperation" onsubmit="if (Spry.Widget.Form.validate(this)) {
                            return countChoosenProducts('supplierController');
                        } else {
                            return false;
                        }">
                    
                    <!-- Table -->
                    <table class="table table-black" id="supplier">
                        <thead>
                            <tr>
                                <th  class="hidden-print">
                                    <label>
                                        <input type="checkbox" name="checkAll" id="checkAll"/>
                                    </label>
                                </th>
                                <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->clientserial==1){?><th>الرقم التسلسلي</th><?php }?>
                                <th>اسم المورد</th>
                                <!-- <th>المديونية</th> -->
                                <th>ليه</th>
                                <th>عليه</th>
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->showCurrency;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==1){?>
                                <th>دين المورد بعملته</th>
                                <?php }?>
                                <th class="hidden-print">إخفاء / إظهار</th>
                                <th class="hidden-print">التعديل</th>
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->allowfinsldelete;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==0){?>
                                <th class="hidden-print">حذف </th>
                                <?php }?>
                                <th class="hidden-print">قيد اليومية</th>
                            </tr>
                        </thead>
                        <tbody>

                            <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['shownData']->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;
?>
                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->conditions;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4==1){?>
                            <tr class="danger"> <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->conditions;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==0){?>
                            <tr> <?php }}?>
                                <td class="hidden-print">
                                    <label>
                                        <input type="checkbox" name="choosedItem[]" id="checked<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" class="choosenItem" value="<?php echo $_smarty_tpl->tpl_vars['data']->value->supplierid;?>
" />
                                    </label>
                                </td>
                                <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->clientserial==1){?><td><?php echo $_smarty_tpl->tpl_vars['data']->value->supplierid;?>
</td><?php }?>
                                <td><?php echo $_smarty_tpl->tpl_vars['data']->value->suppliername;?>
</td>
                                <?php if ($_smarty_tpl->tpl_vars['data']->value->suppliercurrentDebt<0){?>
                                <td>0</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['data']->value->suppliercurrentDebt;?>
</td>
                                <?php }else{ ?>

                                <td><?php echo $_smarty_tpl->tpl_vars['data']->value->suppliercurrentDebt;?>
</td>
                                <td>0</td>
                                <?php }?>
                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->showCurrency;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==1){?>
                                <td><?php echo $_smarty_tpl->tpl_vars['data']->value->suppliercurrentDebtInCurrency;?>
 <?php echo $_smarty_tpl->tpl_vars['data']->value->currencyName;?>
</td>
                                <?php }?>
                                <td  class="hidden-print"> <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->conditions;?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7==0){?> <a href="supplierController.php?do=tempdelete&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->supplierid;?>
" type="button" class="btn btn-default btn-lg removeicon"> </a> <?php }else{?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->conditions;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8==1){?> <a  href="supplierController.php?do=returndelete&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->supplierid;?>
" type="button" class="btn btn-default btn-lg correcticon"> </a></td>
                                <?php }}?>
                                <td  class="hidden-print"><a href="supplierController.php?do=edit&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->supplierid;?>
" type="button" class="btn btn-default btn-lg editicon"></a></td>

                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->allowfinsldelete;?>
<?php $_tmp9=ob_get_clean();?><?php if ($_tmp9==0){?>
                                <td class="hidden-print">
                                    <?php if ($_smarty_tpl->tpl_vars['data']->value->supplierid!=1){?>
                                    <a href="#" name="dd" type="button" class="btn btn-default btn-lg deleteicon conformdel1" data-position="supplierController.php?do=deleteFinaly&id=<?php echo $_smarty_tpl->tpl_vars['data']->value->supplierid;?>
&action=<?php echo $_smarty_tpl->tpl_vars['data']->value->dailyentryid;?>
" ></a>
                                    <?php }?>
                                </td>
                                <?php }?>
                                <td class="hidden-print"><a href="dailyentry.php?id=<?php echo $_smarty_tpl->tpl_vars['data']->value->dailyentryid;?>
" target="_blank" type="button" class="btn btn-default btn-lg editicon"> </a></td>
                            </tr>
                            <?php } ?>
                        </tbody>

                    </table>
                    <div class="col-lg-offset-8 col-lg-4">
                        <div class="well well-sm">
                            <h4 class="text-center">إجمالي مديونية الموردين الغير محذوفين:  <?php echo $_smarty_tpl->tpl_vars['sum']->value;?>
</h4>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                    <hr />
                    <div  class="hidden-print">
                        <div class="col-lg-12">
                            <div class="well well-sm">
                                <div class="form-group">
                                    <div class="col-lg-4">
                                        <label for="operation"></label>
                                        <span id="spryselect2">
                                            <select name="operation" id="operation"  data-placeholder="اختر العملية" class="select2 wdt100">
                                                <option value="-1"></option>
                                                <option value="1">إخفاء</option>
                                                <option value="2">إظهار</option>
                                            </select>
                                            <span class="selectInvalidMsg">اختر العملية</span></span></div>
                                </div>
                                <div class="form-group">
                                    <div class="col-lg-4">
                                        <input name=""  class="hidden-print btn btn-primary" type="submit" value="تنفيذ"/>
                                    </div>
                                </div>

                                <!-----------  start noElementsError alert ------------->
                                <div class="clearfix"></div>
                                <div id="noElementsError" class="alert alert-danger fade in" style="display:none;">
                                    <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">×</button>
                                    <p>يجب اختيار العناصر أولاً</p>
                                    <div class="clearfix"></div>
                                </div>
                                <!----------  end noElementsError alert -------------->

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

                <div class="hidden-print">
                    <input type="button" onclick="print_Custom('mycustomheader');" class="hidden-print pull-right btn btn-success" value="طباعة" />
                </div>
                <div class="clearfix"></div>

                <!-- Modal -->
                <div class="hidden-print">
                    <div class="modal fade " id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close pull-left" data-dismiss="modal" aria-hidden="true">&times;</button>
                                    <h4 class="modal-title">تأكيد حذف مورد</h4>
                                </div>
                                <div class="modal-body"> هل تريد حذف هذا المورد ؟ </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">لا</button>
                                    <button type="button" class="btn btn-primary savemodel1">نعم</button>
                                </div>
                            </div>
                            <!-- /.modal-content -->
                        </div>
                        <!-- /.modal-dialog -->
                    </div>
                </div>
                <!-- /.modal -->
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {invalidValue: "-1", isRequired: false});
    $(document).ready(function () {
        $('#supplier').DataTable({
            dom: 'Bfrtip',
            buttons: [
            {
                    extend: "excel",
                    className: "btn yellow btn-outline ",
                    text: "اكسل",
                    exportOptions: {
                        //columns: '.show-print'
                        columns: ':visible'
                    }
                },
                    {
                        extend: 'pdfHtml5',
                        className: "btn yellow btn-outline ",
                        exportOptions: {
                            columns: [0, 1, 2, 3, 4, 5, 6, 7]
                        }
                    }, {
                    extend: "colvis",
                    className: "btn dark btn-outline",
                    text: "المكونات"
                }
            ],
            "lengthMenu"
                    : [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
        });
    });
</script>

<?php }} ?>