<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <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 />
                    {if $message != ""}
                    {$message}
                    {/if}</h3>
                <a href="{$youtubes[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="employeedoctorController.php?do=debtandpay" 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">{$outputString}</p>
                    <div class="clearfix"></div>
                </div>

                <div class="clearfix"></div>
                <hr/>
                <form id="form1" name="form1" method="post">
                    <!-- Table -->
                    <table class="table table-black" id="supplier">
                        <thead>
                            <tr>
                                <th>#</th>
                                <th>نوع العملية</th>
                                <th>الاسم</th>
                                <th>الخزنة</th>
                                <th>القيمة</th>
                                <th>التاريخ</th>
                                <th>التعليق</th>
                                <th class="hidden-print">قيد اليومية </th>
                                <th class="hidden-print">حذف </th>
                            </tr>
                        </thead>
                        <tbody>
                            {assign var=i value=1}
                            {foreach $shownData as $data}
                            <tr>
                                <td>{$i}</td>
                                <td>
                                    {if $data->thetype == 0}سلفة
                                    {else if $data->thetype == 1}سداد سلفة

                                    {if $data->paytype == 0}-مباشر{else if $data->paytype == 1}-من الراتب {/if}


                                    {/if}

                                </td>
                                <td>{$data->employeedoctorName}</td>
                                <td>{$data->savename}</td>
                                <td>{$data->val}</td>
                                <td>{$data->sysdate}</td>
                                <td>{$data->note}</td>
                                <td class="hidden-print">
                                    <a href="dailyentry.php?id={$data->dailyentryid}" target="_blank" type="button" class="btn btn-default btn-lg editicon"> </a>
                                </td>
                                <td class="hidden-print">
                                    <a href="employeedoctorController.php?do=deletedebtandpay&id={$data->id}" type="button" class="btn btn-default btn-lg deleteicon" ></a>
                                </td>
                            </tr>
                            {assign var=i value=$i+1}
                            {/foreach}
                        </tbody>

                    </table>

                    <div class="clearfix"></div>
                    <hr />
                </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>
{literal}
<script type="text/javascript">
    var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {invalidValue: "-1", isRequired: false});
    $(document).ready(function () {
        $('#supplier').DataTable({
            "lengthMenu"
                    : [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
        });
    });
</script>
{/literal}
