<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="supplierControllerOpen.php?do=exchangeorclosing" 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>التعليق</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}</td>
                                <td>{$data->suppOpenName}</td>
                                <td>{$data->savename}</td>
                                <td>{$data->assetsName}{$data->expensestypename}</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="supplierControllerOpen.php?do=deleteexchangeorclosing&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}
