<div class="page-content-wrapper rtl">
    <div class="page-content">
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                <div class="portlet box blue">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-users"></i>تقرير مديونية اللعملاء
                        </div>
                    </div>
                    <div class="portlet-body all">
                        <div class="clearfix"></div>

                        <div class="row">
                            <div class="portlet box white">
                                <div class="portlet-title">
                                    <div class="actions"></div>
                                </div>

                                <div class="portlet-body form" id="financialDiv">
                                    <table class="table table-hover portlet light bg-inverse" id="repTable"
                                        style="width: 100%;">
                                        <thead>
                                            <tr>
                                                <th style="width: 10px !important;">#</th>
                                                <td> رقم الحالة </td>
                                                <th> اسم الحالة</th>
                                                <th> الدين الحالي </th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            {assign var="i" value="1"}
                                            {foreach $allData as $key=>$data}
                                            <tr>
                                                <td>{$i}</td>
                                                <td>
                                                    {$data.statusno}
                                                </td>
                                                <td>
                                                    <a href="{$hosturl}/controllers/patienthistory.php?ac=show&patientid={$data.patientid}"
                                                        target="_new">
                                                        {if $data.for_husband == 1 }
                                                        {$data.husdandname}
                                                        {else if $data.for_husband == 2}
                                                        طفل / {$data.wifename}
                                                        {else}
                                                        {$data.wifename}
                                                        {/if}
                                                    </a>
                                                </td>
                                                <td>{$data.totaldebt}</td>

                                            </tr>
                                            {assign var="i" value={$i+1}}
                                            {/foreach}
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>

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

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


<div id="talks-loading"
    style="z-index: 3000;position: absolute;top: 7%;right: 2%;left: 6%;display:none; height: 65%; background-color: rgba(0, 0, 0,0.27); padding-top: 10%;"
    align="center">
    <img src="{$hosturl}/../upload/loading.gif">
</div>


{literal}
<script type="text/javascript">
    $(document).ready(function (e) {
        $('#repTable').dataTable();

    });
</script>
{/literal}