<table class="table table-black">
    <thead>
        <tr>
            <th style="width:50px;">م</th>
            <th>رقم التخصيم</th>
            <th>سعر الصيانة</th>
            <th>تكلفة الصيانة</th>
            <th>بيان الإجراءات</th>
            <th>الإجراء</th>
            <th>سعر الشحن</th>
            <th>تكلفة الشحن</th>
            <th>رقم االيصال </th>
            <th> المنتج</th>
            <th>المورد</th>
            <th>SN</th>
        </tr>
    </thead>
    <tbody>

        <input type="hidden" name="maintenanceitr" value="{$maintenances|@count}" />
        {assign var=itr value=1}
        {foreach $maintenances as $maintenance}
        <tr>
            <td><label class="mt-checkbox mt-checkbox-single mt-checkbox-outline">
                <input type="checkbox" class="policycheck" data-update="0" data-id="" name="maintenanceid_{$itr}" value="{$maintenance->id}" />
                <span></span>
            </label>
            </td>
            <td><input type="text" name="factoringnumber_{$itr}" id="factoringnumber_{$maintenance->id}" class="form-control" value="{$maintenance->factoringnumber}"></td>
            <td><input type="text" name="maintenanceprice_{$itr}" id="maintenanceprice_{$maintenance->id}" class="form-control" value="{$maintenance->maintenanceprice}"></td>
            <td><input type="text" name="maintenancecost_{$itr}" id="maintenancecost_{$maintenance->id}" class="form-control" value="{$maintenance->maintenancecost}"></td>
             <td><input type="text" name="statementprocedure_{$itr}" id="statementprocedure_{$maintenance->id}" class="form-control" value="{$maintenance->statementprocedure}"></td>
             <td>
                 
                <input id="maintenanceprocedureid{$itr}" type="text" name="maintenanceprocedures_{$itr}"  class="getselectjoin2 maintenanceprocedureid{$itr}"  data-placeholder=" الإجراء    "   data-table="maintenanceprocedures" 
                data-tableid="id"  data-join=""   data-filter="" data-parent="" data-itr="{$itr}"  
                data-search="procedurename"/>
                <input  type="hidden" name="maintenanceprocedureid" class="selectedit2" data-tableidname="maintenanceprocedureid" data-itr="{$itr}" 
                data-join="" data-table="maintenanceprocedures" data-tableid="id" data-search="procedurename" value="{$maintenance->maintenanceprocedureid}" />
                <button type="button" class="btn btn-primary adddatamodal" data-table="maintenanceprocedures" data-tableid="maintenanceprocedureid" data-toggle="modal" data-target="#Modalmaintenanceprocedureid" data-whatever="@maintenanceprocedures" data-formt="formmaintenanceprocedures" data-selectitr="{$itr}">A</button>
                <button type="button" class="btn btn-primary editdatamodal"  data-model="#Modalmaintenanceprocedureid" data-table="maintenanceprocedures" data-name="maintenanceprocedureid" data-tableid="id" data-join="" data-formt="formmaintenanceprocedures" data-selectitr="{$itr}">E</button>

             </td>
            <td><input type="text" name="bshipprice_{$itr}"  id="shipprice_{$maintenance->id}"class="form-control" value="{$maintenance->shipprice}"></td>
            <td><input type="text" name="bshipcharge_{$itr}" id="shipcharge_{$maintenance->id}" class="form-control" value="{$maintenance->shipcharge}"></td>
            <td>{$maintenance->receiptnumber}</td>
            <td>{$maintenance->productName}</td>
            <td>{$maintenance->suppliername}</td>
            <td>{$maintenance->id}</td>
        </tr>
        {capture assign=itr}{$itr+1}{/capture}
        {/foreach}

    </tbody>
</table>