<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>
            </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">{$message}</p>
                    <div class="clearfix"></div>
                </div>
                <!---------  end outputString alert ------------>

                <!--                <div class="col-lg-offset-8 col-lg-4">
                                    <div class="well well-sm">
                                        <h4 class="text-center">إجمالي مديونية الموردين الغير محذوفين:  {$sum}</h4>
                                    </div>
                                </div>-->
                <form class="form-inline  hidden-print" action="supplierControllerOpen.php?do=supplieropenchange" method="post">

                    <div class="form-group">
                        <label class="sr-only">من التاريخ</label>
                        <input type="text" class="form-control awdatepicker" autocomplete="off" data-date-format="yyyy-mm-dd" name="from" id="datepicker_from">
                    </div>
                    <div class="form-group">
                        <label class="sr-only">إلى التاريخ</label>
                        <input type="text" class="form-control awdatepicker" autocomplete="off" data-date-format="yyyy-mm-dd" name="to" id="datepicker_to">
                    </div>

                    <button type="submit" class="btn btn-primary">بحث</button>
                </form>

                <div class="clearfix"></div>
                <hr/>
                <form id="form1" name="form1" method="post">
                    <!-- Table -->
                    <table class="table billtable table-bordered table-black">
                        <thead>
                            <tr>
                                <th>#</th>
                                <th>التاريخ</th>
                                <th>الاسم</th>
                                <th>الدين قبل</th>
                                <th>القيمة المتغيرة
                                    <table class="table table-black billtable table-bordered">
                                        <tbody><tr>
                                                <td style="color:#000"> اضافة</td><!-- وارد-->
                                                <td style="color:#000"> خصم</td><!-- صادر-->
                                            </tr>
                                        </tbody></table>
                                </th>
                                <th>الدين بعد</th>
                                <th>العملية</th>
                            </tr>
                        </thead>
                        <tbody>
                            {assign var=i value=1}
                            {foreach $shownData as $data}
                            <tr {if $data->supplierdebtchangetype == 0}class="danger"{/if}>
                                <td>{$i}</td>
                                <td>{$data->supplierdebtchangedate}</td>
                                <td>{$data->suppOpenName}</td>
                                <td>{$data->supplierdebtchangebefore}</td>
                                <td>
                                    <div {if {$data->supplierdebtchangetype} eq 1} style="float:left;  margin: 10px 10px 10px 10px;"  {else} style="float:right; margin: 10px 10px 10px 10px;"  {/if}>
                                        {$data->supplierdebtchangeamount}
                                    </div>
                                </td>
                                <td>{$data->supplierdebtchangeafter}</td>
                                <td>{$data->processname}</td>
                            </tr>
                            {assign var=i value=$i+1}
                            {/foreach}
                        </tbody>

                    </table>
                    <!--                    <div class="col-lg-offset-8 col-lg-4">
                                            <div class="well well-sm">
                                                <h4 class="text-center">إجمالي مديونية الموردين الغير محذوفين:  {$sum}</h4>
                                            </div>
                                        </div>-->
                    <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}
