<table class="table table-black" >
    <thead>
        <tr style="background: #ccc;">
            <th style="width:50px;">م</th>
            <th>العميل </th>
            <th>جهة التعاقد</th>
            <th>المتبقى </th>
            {if $editforn == 1}
            <th>حذف </th>
            {/if}
        </tr>
    </thead>
    <tbody>
        {assign var=itr2 value=1}

        {if $editforn == 1}
       
        {foreach $editdatasellbills as $sellbill}
        <tr id="removerowtable{$sellbill['id']}">
            <td >{$sellbill@iteration}</td>
            <td >{$sellbill['clientname']}</td>
            <td >{$sellbill['typeName']}</td>
            <td >{$sellbill['valueclaimed']}</td>
            <td > <a href="javascript:;"  data-id="{$sellbill['id']}" data-url="claimController.php?do=removeclaimsclientbills" class="btn btn-xs red pull-right removerowtable"> x
                    </a></td>
            <input type="hidden"  name="claimsclientbillid_{$itr2}" value="{$sellbill['id']}">
            <input type="hidden"  name="clientid_{$itr2}" value="{$sellbill['clientid']}">
            <input type="hidden"  name="typeclientid_{$itr2}" value="{$sellbill['typeclientid']}">
            <input type="hidden"  name="sellbillids_{$itr2}" value="{$sellbill['sellbillidsprices']}">
            <input type="hidden"  name="sellbillfinalbill_{$itr2}" value="{$sellbill['sellbillfinalbill']}">
            <input type="hidden"  name="returnsellbillids_{$itr2}" value="{$sellbill['returnsellbillidsprices']}">
            <input type="hidden"  name="returnsellbillfinalbill_{$itr2}" value="{$sellbill['returnsellbillfinalbill']}">
            <input type="hidden"  name="valueclaimed_{$itr2}" value="{$sellbill['valueclaimed']}">
        </tr>
        {capture assign=itr2}{$itr2+1}{/capture}
        {/foreach}


        <tr>
            <td  colspan="5" class="text-center" style="background: #8bffba;font-size: 20px;">   الفواتير الجديده  </td>
        </tr>
        {/if}


        {assign var=itr value=$itr2}
        {foreach $sellbills as $sellbill}
        <tr>
            <td >{$sellbill@iteration}</td>
            <td >{$sellbill['clientname']}</td>
            <td >{$sellbill['typeName']}</td>
            <td >{$sellbill['valueclaimed']}</td>
             {if $editforn == 1}<td ></td>{/if}
            <input type="hidden"  name="clientid_{$itr}" value="{$sellbill['clientid']}">
            <input type="hidden"  name="typeclientid_{$itr}" value="{$sellbill['sellbilltypeclientid']}">
            <input type="hidden"  name="sellbillids_{$itr}" value="{$sellbill['sellbillids']}">
            <input type="hidden"  name="sellbillfinalbill_{$itr}" value="{$sellbill['sellbillfinalbill']}">
            <input type="hidden"  name="returnsellbillids_{$itr}" value="{$sellbill['returnsellbillids']}">
            <input type="hidden"  name="returnsellbillfinalbill_{$itr}" value="{$sellbill['returnsellbillfinalbill']}">
            <input type="hidden"  name="valueclaimed_{$itr}" value="{$sellbill['valueclaimed']}">
        </tr>
        {capture assign=itr}{$itr+1}{/capture}
        {/foreach}


        


       
        <tr>
            <td  {if $editforn == 1} colspan="5" {else}  colspan="4" {/if} class="text-center" style="background: #00dcff;font-size: 20px;"> اجمالى المتبقي     : {$allvalueclaimed}</td>
            <input type="hidden" id="allvalueclaimed" name="allvalueclaimed" value="{$allvalueclaimed}">
            <input type="hidden" id="sellbills" name="sellbills" value="{count($sellbills)+ count($editdatasellbills)}">
        </tr>

    </tbody>
</table>

