<input type="hidden" name="itr" value="{count($allBen)}" />
<table class="table table-black">
    <thead>
        <tr>
            <th class="hidden-print">
                <input type="checkbox" name="checkAll" id="checkAll" />
            </th>
            <th style="width:50px;">م</th>
            <th>رقم الحالة</th>
            <th>اسم المستفيد</th>
            <th>الرقم القومي</th>
            <th>إعانة مالية</th>
            <th>إعانة عينية</th>
            <th>ملاحظات</th>
            <th>قبض</th>
        </tr>
    </thead>
    <tbody>
        {assign var="i" value=1}
        {foreach $allBen as $data}

        <tr {if $data.paid} style="background-color: lightgreen;" {/if}>
            <td class="hidden-print">
                <input type="checkbox" name="choosedItem[]" id="checked{$i}" class="choosenItem" value="{$data.beneficiary_id}" />
            </td>
            <td>{$i}</td>
            <td>{$data.beneficiary_id}
                <input type="hidden" name="benefeciary_id{$i}" id="benefeciary_id{$i}" value="{$data.beneficiary_id}" />
            </td>
            <td>{$data.name}</td>
            <td>{$data.idnumber}</td>
            <td><input type="text" name="financial_aid{$i}" id="financial_aid{$i}" value="{$data.financial_aid}" /></td>
            <td><input type="text" name="inkind_aid{$i}" id="inkind_aid{$i}" value="{$data.inkind_aid}" /></td>
            <td>{$data.notes}
                <input type="hidden" name="notes{$i}" id="notes{$i}" value="{$data.notes}" />
            </td>
            <td>
                {if !$data.paid}
                <a href="javascript:;" class="btn btn-success paySubvention" data-itr="{$i}">
                    <i class="glyphicon glyphicon-ok"></i>
                </a>
                {/if}
            </td>
        </tr>
        {assign var="i" value=$i+1}
        {/foreach}
    </tbody>
</table>