<div class="col-lg-offset-8 col-lg-4 ">
    <div class="well well-sm">
        <h4 class="text-center">إجمالي الفواتير    {$totalBalance}</h4>
    </div>
</div>
<div class="clearfix"></div>
<!-- Table -->
<table class="table table-black">
    <thead>
        <tr>
            <th class="hidden-print">
                <label>
                    <input type="checkbox" name="checkAll" id="checkAll"/>
                </label>
            </th>
            <th>رقم المسلسل</th>
            <th>اسم العميل</th>
            <th>رقم الفاتورة</th>
            <th>إجمالي المرتجع </th>
            <th>التاريخ</th>
            <th>المستخدم</th>
            {if $usergroup->allowEditDelInBills eq 0}<th class="hidden-print">التعديل</th>{/if}
            <th class="hidden-print">تفاصيل الفاتورة</th>
            {if $usergroup->allowEditDelInBills eq 0}<th class="hidden-print">حذف</th>{/if}
        </tr>
    </thead>
    <tbody>

        {foreach $billsReturn as $data}
        {if {$data->deleted} eq 1}
        <tr class="danger"> {elseif {$data->deleted} eq 0}
        <tr> {/if}
            <td class="hidden-print">
                <label>
                    <input type="checkbox" name="choosedItem[]" id="checked{$i}" class="choosenItem" value="{$data->id}" />
                </label>
            </td>
            <td>{$data->id}</td>
            <td> {$data->clientname} </td>
            <td>{$data->billno}</td>
            <td>{$data->returnedprice}</td>
            <td>{$data->date}</td>
            <td>{$data->username}</td>
            {if $usergroup->allowEditDelInBills eq 0}<td  class="hidden-print">
                {if {$data->deleted} eq 0}
                <a href="billsreturn.php?do=edit&id={$data->id}" type="button" class="btn btn-default btn-lg editicon"></a>
                {else}
                تم حذف الفاتوره
                {/if}
            </td>{/if}
            <td  class="hidden-print"><a href="billsreturn.php?do=details&id={$data->id}" type="button" class="btn btn-default btn-lg notesicon"></a></td>

            {if $usergroup->allowEditDelInBills eq 0}<td  class="hidden-print"> {if {$data->deleted} eq 0}
                <a href="billsreturn.php?do=delete&id={$data->id}" type="button" class="btn btn-default btn-lg deleteicon"> </a> {elseif {$data->deleted} eq 1 } تم حذف الفاتورة</td>{/if}
            {/if} </tr>
        {/foreach}
    </tbody>

</table>
<div  class="hidden-print">
    <div class="col-lg-12">
        <div class="well well-sm">
            <div class="form-group">
                <div class="col-lg-4">
                    <label for="operation"></label>
                    <span id="spryselect2">
                        <select name="operation" id="operation"  data-placeholder="اختر العملية" class="select2 wdt100">
                            <option value="-1"></option>
                            <option value="1">حذف</option>
                        </select>
                        <span class="selectInvalidMsg">اختر العملية</span></span></div>
            </div>
            <div class="form-group">
                <div class="col-lg-4">
                    <input name=""  class="noprint btn btn-primary" type="submit" value="تنفيذ"/>
                </div>
            </div>

            <!-----------  start noElementsError alert ------------->
            <div class="clearfix"></div>
            <div id="noElementsError" class="alert alert-danger fade in" style="display:none;">
                <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">×</button>
                <p>يجب اختيار العناصر أولاً</p>
                <div class="clearfix"></div>
            </div>
            <!----------  end noElementsError alert -------------->

            <div class="clearfix"></div>
        </div>
    </div>
    <div class="col-lg-offset-8 col-lg-4 ">
        <div class="well well-sm">
            <h4 class="text-center">إجمالي الفواتير  {$totalBalance}</h4>
        </div>
    </div>
    <div class="clearfix"></div>
</div>