<style>
    .paymentnetworks{
        display:none;
    }

    .bold {
        font-weight:bold;
    }
    .block {
        display:block;
    }

    body {
        background-color: #fff;
        font-family:"Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
        margin: 0px;
        padding: 0px;
        color: #696969;
    }
    /*
    ul.myErrorClass, input.myErrorClass, textarea.myErrorClass, select.myErrorClass {
        border: 1px solid #cc0000 !important;
        background: #f3d8d8 url(http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/blitzer/images/ui-bg_diagonals-thick_75_f3d8d8_40x40.png) 50% 50% repeat !important;
    }
    */
    a.myErrorClass, ul.myErrorClass, input.myErrorClass, textarea.myErrorClass, select.myErrorClass {
        border-width: 1px !important;
        border-style: solid !important;
        border-color: #cc0000 !important;
        background-color: #f3d8d8 !important;
        background-image: url(http://goo.gl/GXVcmC) !important;
        background-position: 50% 50% !important;
        background-repeat: repeat !important;
    }

    label.myErrorClass {
        color: red;
        font-size: 11px;
        /*    font-style: italic;*/
        display: block;
    }

</style>
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#"> العملاء</a></li>
            <li class="active">عرض مرتجعات دفعات على فاتورة مردود بيع للعميل</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading"><span class="hidden-print">عرض مرتجعات دفعات على فاتورة مردود بيع للعميل</span><br />
                {if $message != ""}
                {$message}
                {/if}
                <a href="{$youtubes[281]->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">
                <form class="form-inline  hidden-print" action="clientPayedDeptSellBillsController.php?do=showret" id="search_form" method="post">
                    <div class="form-group">
                        <label class="sr-only">اختر عميل</label>
                        <input  type="hidden" id="client_2" name="client"  class="wdt100"  />
                    </div>
                    <div class="form-group">
                        <label class="sr-only"> رقم الفاتورة</label>
                        <input  type="hidden" id="bill_no_ret" name="bill_no"  class="wdt100"  />
                    </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" 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  hidden-print">بحث</button>
                </form>
            </div>
            <!--            <div class="col-lg-offset-8 col-lg-4">
                            <div class="well well-sm"><h4 class="text-center">الإجمالي:  {$sum} {$currency}</h4></div>
                        </div>-->
            <div id="resultDiv"><!------ Start result --------->

                <hr/>
                <table class="table table-black">
                    <thead>
                        <tr>
                            <th> <center>   رقم الفاتورة</center></th>
                    <th><center>  قيمة الفاتورة</center></th>
                    <th><center>  قيمة الدين</center></th>
                    <th><center> القيمة المسددة من قبل</center></th>
                    <th class="hidden-print"><center>   تفاصيل سداد الفاتورة </center></th>
                    <th class="hidden-print"><center>   طباعة </center></th>
                    </tr>
                    </thead>

                    <tbody>

                        {foreach $client_bills as $data}

                        <tr class="gradeA " id="bill_tr_{$data.billno}">

                            <td ><center> <a href="sellbillController.php?do=showDetail&sellbillid={$data.id}" target="_blank" class="hide_billno hidden-print">{$data.billno}</a> <span class="show_billno hide">{$data.billno} </span> </center></td>

                    <td><center>  {$data.finalnetbillvalue}  </center></td>
                    <td><center> <span id='waitvalue_{$data.billno}'>{$data.waitvalue}</span></center></td>

                    <td><center>
                        {$data.total_payed}
                    </center>
                    </td>
                    <td class="hidden-print"><center> <a href="clientPayedDeptSellBillsController.php?do=show_details_ret&id={$data.billno}" target="_blank" type="button" class="btn btn-default btn-lg notesicon"></a> </center></td>
                    <td class="hidden-print"><center> <a href="clientPayedDeptSellBillsController.php?do=print&bill={$data.billno}&m={$data.total_payed}&type=1" target="_blank" type="button" class="btn btn-default btn-lg printicon"></a> </center></td>


                    </tr>



                    {/foreach}


                    </tbody>
                </table>
                <br><br>

                <div class=" col-lg-4">
                    <div class="well well-sm" style="background-color: #d0e9ff;"><h4 class="text-center">اجمالى  الفواتير : <span id='total_value'>{$total_bills}</span> </h4> </div>
                </div>
                <div class=" col-lg-4">
                    <div class="well well-sm"  style="background-color: #d0e9ff;"><h4 class="text-center">اجمالى دين الفواتير : <span id='total_value'>{$total_wait_bills}</span> </h4> </div>
                </div>
                <div class=" col-lg-4">
                    <div class="well well-sm"  style="background-color: #d0e9ff;"><h4 class="text-center">اجمالى سداد الفواتير : <span id='total_value'>{$total_payed_bills}</span> </h4> </div>
                </div>
            </div> <!------ End result --------->



            <input type="hidden" name="client_id" id="client_id" value="{$client_id}"/>
            <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" data-print='yes'  class="btn btn-success pull-right print_show" style="margin-right: 10px;">طباعة</button>

                        </div>

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

    </div>
</div>
