

<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#"> ايصالات قبض</a></li>
            <li><a href="clientreceiptController.php">ايصالات قبض </a></li>
            <li class="active">عرض </li>
        </ol>


        <form class="form-inline hidden-print" action="clientreceiptController.php?do=show" id="receipt-form" method="post">

            <div class="form-group">
                <label class="sr-only">اسم العميل</label>
                <input type="hidden" name="searchvalue" id="searchvalue" value="0"/>
                <input type="text" name="clientname" id="client_id"   class="select2product wdt100"  data-placeholder="اختر عميل"/>
            </div>
            <div class="form-group">
                <label class="sr-only"><input type="radio"   name="showdel"  value="0" checked="">عدم عرض المحذوف</label>
                <label class="sr-only"><input type="radio" name="showdel" value="1" >عرض المحذوف</label>
            </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="datefrom" >
            </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="dateto" >
            </div>


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

        <div class="panel panel-default">
            <div class="panel-heading" style="padding:5px 15px 15px">
                <h3 class="panel-title" style="display: inline-block;"> عرض</h3>
                <a href="{$youtubes[235]->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 id="mydivToPay">

                <table class="table table-black">
                    <thead>
                        <tr>
                            <th style="width:50px;">م</th>
                            <th>رقم الفاتورة</th>
                            <th>اسم العميل</th>
                            <th>تاريخ الفاتورة</th>
                            <th>نوع الفاتورة</th>
                            <th>طريقة الدفع</th>
                            <th> الدين قبل</th>
                            <th> المدفوع</th>
                            <th> الدين بعد</th>
                            <th>طباعة</th>
                            <th>حذف</th>

                        </tr>
                    </thead>
                    {assign var=i value=1}
                    {foreach $allDataArr as $data}
                    {if $data->del ==0}
                    <tr>
                        {else if $data->del ==1}
                    <tr class="danger">
                        {/if}

                        <td style="widtd:50px;">{$i}</td>
                        {if $data->biltype == 0}
                        <td><a target="_blank" href="sellbillController.php?do=showDetail&sellbillid={$data->billid}" style="color: blue;"><u>{$data->billid}</u></a></td>
                        {elseif $data->biltype ==1}
                        <td><a target="_blank" href="bills.php?do=details&id={$data->id}" style="color: blue;"><u>{$data->billid}</u></a></td>
                        {elseif $data->biltype ==-1}
                        <td>{$data->id}</td>
                        {/if}
                        <td>{$data->clientid}</td>
                        <td>{$data->sysdate}</td>
                        <td>{if $data->biltype=="0"}فاتورة مبيعات{elseif $data->biltype==1}فاتورة بصريات{elseif $data->biltype==-1}سداد دين{/if}</td>
                        <td>{if $data->payedtype == "0"}نقدى{elseif $data->payedtype == "1"}شبكة{elseif $data->payedtype == "2"}بنك{/if}</td>
                        <td>{$data->debtbefore}</td>
                        <td>{$data->payed}</td>
                        <td>{$data->debtafter}</td>
                        <td class="hidden-print"><a href="clientreceiptController.php?do=editprint&id={$data->id}" class="btn btn-success pull-right">طباعة</a></td>
                        <th class="hidden-print">{if $data->del == "0"}<a class="showdeletemsg" data-go="clientreceiptController.php" data-id="{$data->id}"><input type="button" class="btn btn-danger pull-right" value="حذف"> </a>{elseif $data->del ==1}تم الحذف{/if}</th>
                    </tr>
                    {assign var=i value=$i+1}
                    {/foreach}



                </table>

            </div>







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


        </div>



    </div>

</div>

<!-- Modal -->
<div class="modal fade" id="small" 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 deleteit">نعم</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->



