
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">خصائص عامة</a></li>
            <li><a href="clientPayedDeptController.php?do=show">العملاء</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[265]->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="clientDeficitController.php" class="hidden-print"><input type="button" style="margin-left: 12px" id="submit"  class="btn btn-primary pull-left " value="إضافة جديد"/></a>
            </div>

            <div class="panel-body">
                <form class="form-inline hidden-print" action="clientDeficitController.php?do=show" method="post">

                    <div class="form-group">

                        <label class="sr-only"> اسم العميل </label>
                        <select class="select2 wdt300" name="clientid" id="clientid" >
                            <option value="-1">اختر عميل </option>
                            <option value="-2"> كل العملاء</option>
                            {foreach $clientsData as $data }



                            <option value="{$data->clientid}">{$data->clientname}</option>


                            {/foreach}


                        </select>
                    </div>
                    <br />

                    <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" >
                    </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" >
                    </div>
                    <button type="submit" class="btn  btn-primary">بحث</button>
                </form>
            </div>
            <hr/>
            <table class="table table-black">
                <thead>
                    <tr>
                        <th>اسم العميل</th>
                        <th>نوع العملية</th>
                        <th>التاريخ</th>
                        <th>الدين قبل </th>
                        <th>المبلغ</th>
                        <th>الدين بعد </th>
                        <th>التعليق</th>
                    </tr>
                </thead>
                <tbody>

                    {foreach $shownData as $data}
                    {if {$data->clientdebtchangetype} eq 1}
                    <tr class="danger"> {elseif {$data->clientdebtchangetype} eq 0}

                    <tr> {/if}
                        <td>{$data->clientname}</td>
                        <td>{$data->processname}</td>
                        <td>{$data->clientdebtchangedate}</td>
                        <td>{$data->clientdebtchangebefore}</td>
                        <td>{$data->clientdebtchangeamount}</td>
                        <td>{$data->clientdebtchangeafter}</td>
                        <td>{$data->comment}</td>
                    </tr>
                    {/foreach}

                </tbody>

            </table>
            <div class="clearfix"></div>
            <hr />
            <div  class="hidden-print">
                <div class="col-lg-12">
                    <div class="form-group">
                        <div class="col-lg-4">
                            <button type="button" onclick="print_Custom('mycustomheader');" class="btn btn-success pull-right">طباعة</button>
                        </div>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="clearfix"></div>
        </div>

    </div>
</div>
