<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}" data-itr="{$i}" />
            </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>
                {if $data.paid}
                {$data.paidF}
                {else}
                <input type="text" name="financial_aid{$i}" id="financial_aid{$i}" value="{$data.financial_aid}" />
                {/if}
            </td>
            <td>
                {if $data.paid}
                {$data.paidI}
                {else}
                <input type="text" name="inkind_aid{$i}" id="inkind_aid{$i}" value="{$data.inkind_aid}" />
                {/if}
            </td>
            <td>
                {if $data.paid}
                {$data.paidN}
                {else}
                {$data.notes}
                <input type="hidden" name="notes{$i}" id="notes{$i}" value="{$data.notes}" />
                {/if}
            </td>
            <td>
                {if !$data.paid}
                <a href="javascript:;" class="btn btn-success paySubvention" id="paySubvention{$i}" data-itr="{$i}">
                    <i class="glyphicon glyphicon-ok"></i>
                </a>
                {/if}
            </td>
        </tr>
        {assign var="i" value=$i+1}
        {/foreach}
    </tbody>
</table>