<table class="table table-striped table-bordered table-hover rtl" id="externalTable">
    <thead>
        <tr>
            <th class="wds5">م </th>
            <th>تاريخ وصف الروشتة </th>
            {if $programesetting->system_lang  == 1}     <th class="txtc wds9"> المريض </th> {/if}
            <th class="wds12">تاريخ أخر صرف  </th>
            <th class="wds9">تفاصيل   </th>
            <th class="wds9">صرف  </th>
        </tr>
    </thead>
    <tbody>
        {assign var=m value=1}
        {foreach $allPres as $single}
        <tr class="odd gradeX">
            <td>{$m}</td>
            <td>{$single.date}</td>
            {if $programesetting->system_lang  == 1}<td>{if $single.forhusband eq 1} الزوج{else} الزوجه{/if}</td>{/if}
            <td>{$single.lastDate}</td>
            <td>
                <a class="btn green-haze btn-sm cashingDetails"  id="cashingDetails{$single.pres_id}"
                   data-id="{$single.pres_id}">{$single.cashCount} </a>
            </td>
            <td>
                <a class="btn green btn-sm cashChronicPres"  id="cashChronicPres{$single.pres_id}"
                   data-id="{$single.pres_id}"><i class="fa fa-paper-plane"></i> </a>
            </td>
        </tr>
        {capture assign=m}{$m+1}{/capture}
        {/foreach}
    </tbody>
</table>


{literal}
<script type="text/javascript" >
    $('#externalTable').dataTable();
</script>
{/literal}