<tr style="display: none;"><td colspan="8"><input type="hidden"   value="{$invest_itr}"  id="invest_itr"></td></tr>
{assign var="i" value="1"}
{foreach $invests as $one}
<tr>

    <td>
        <input type="text" class="form-control updateElement" id="inv{$one->id}" data-id="{$one->id}" disabled=""  data-colName="name" data-tableName="invests"  value="{$one->name}"
               style="height: 26px;"/>
    </td>
    <td>
        <select class="form-control  updateElement sampletype"   data-id="{$one->id}"  data-itr="{$i}"    disabled=""
                data-ptname="sampletype" name="sampletype"   id="sampletype{$i}" data-colName="sampletype" data-tableName="invests">
            <option value=""></option>

            {foreach $sampletype as $data}
            <option value="{$data->id}" {if $one->sampletype eq  $data->id}selected{/if}>{$data->name}</option>
            {/foreach}

            {if $smarty.session.role_id neq 3}
            <option value="0" class="deleteoptincompo">حذف</option>
            {/if}
        </select>

    </td>

    <td>
        <select class="form-control  updateElement"   data-id="{$one->id}"  data-itr="{$i}"     disabled=""  
                data-ptname="type" name="type"   id="type{$i}" data-colName="type" data-tableName="invests">
            <option value="0" {if $one->type eq  0 }selected{/if}>  Internal</option>
            <option value="1" {if $one->type eq  1 }selected{/if}>External</option>
        </select>

    </td>

    <td>
        <select class="form-control  updateElement"   data-id="{$one->id}"  data-itr="{$i}"     disabled=""  
                data-ptname="special_inv_type" name="special_inv_type"   id="special_inv_type{$i}" data-colName="special_inv_type" data-tableName="invests">
            <option value="0"> Not special</option>
            <option value="1" {if $one->special_inv_type eq  1 }selected{/if}>Blood Picture</option>
            <option value="2" {if $one->special_inv_type eq  2 }selected{/if}>Urine Examination</option>
            <option value="3" {if $one->special_inv_type eq  3 }selected{/if}>Stool Examination</option>
            <option value="4" {if $one->special_inv_type eq  4 }selected{/if}>Culture</option>
            <option value="5" {if $one->special_inv_type eq  5 }selected{/if}>ESR </option>
            <option value="6" {if $one->special_inv_type eq  6 }selected{/if}>Cross Matching </option>
            <option value="7" {if $one->special_inv_type eq  7 }selected{/if}>Fluid </option>
            <option value="8" {if $one->special_inv_type eq  8 }selected{/if}>Clothing time </option>
            <option value="9" {if $one->special_inv_type eq  9 }selected{/if}>PT + APTT </option>
            <option value="10" {if $one->special_inv_type eq  10 }selected{/if}>ABO/RH </option>
            <option value="11" {if $one->special_inv_type eq  11 }selected{/if}>Custom </option>
            <option value="12" {if $one->special_inv_type eq  12 }selected{/if}>PT </option>
            <option value="13" {if $one->special_inv_type eq  13 }selected{/if}>APTT </option>
        </select>

    </td>


    <td>
        <input type="text" class="form-control updateElement" id="price{$one->id}" data-id="{$one->id}" disabled=""  data-colName="price" data-tableName="invests"  value="{$one->price}"
               style="height: 26px;"/>
    </td>

    <td>
        <input type="text" class="form-control updateElement" id="lab_to_lab_price{$one->id}" data-id="{$one->id}" disabled=""  data-colName="lab_to_lab_price" data-tableName="invests"  value="{$one->lab_to_lab_price}"
               style="height: 26px;"/>
    </td>

    <td>
        <div class="md-checkbox" id="pdfCheck{$one->id}">
            <input type="checkbox" id="pdf{$one->id}" data-id="{$one->id}" data-tableName="invests"    value="1"                              
                   data-colName="pdf"        class="md-check updateElementCheck" {if $one->pdf == 1}checked{/if}>
            <label for="pdf{$one->id}">
                <span></span>
                <span class="check"></span>
                <span class="box"></span>
            </label>
        </div>
    </td>

    <td>
        <div class="md-checkbox" id="periorityCheck{$one->id}" >
            <input type="checkbox" id="periority{$one->id}" data-id="{$one->id}"  data-tableName="invests"    value="1"                              
                   data-colName="periority"    class="md-check updateElementCheck" {if $one->periority == 1}checked{/if}>
            <label for="periority{$one->id}">
                <span></span>
                <span class="check"></span>
                <span class="box"></span>
            </label>
        </div>
    </td>


    <td>
        <a class="btn btn-xs green finishEdit" style="display: none;float: right;" id="finishEdit{$one->id}" data-itr="{$i}" data-id="{$one->id}"  href="#" >finish  </a>
        <div class="md-checkbox" id="favoriteCheck{$one->id}">
            <input type="checkbox" id="checkbox{$one->id}" data-id="{$one->id}"  class="md-check addFavorite" {if $one->favorite == 1}checked{/if}>
            <label for="checkbox{$one->id}">
                <span></span>
                <span class="check"></span>
                <span class="box"></span>
            </label>
        </div>
    </td>

    <td>
        <a class="btn green btn-xs editInv" data-id="{$one->id}" data-itr="{$i}"   id="editInv{$one->id}"
           href="#" > <i class="fa fa-pencil"></i>
        </a>
        <a class="btn blue btn-xs" data-id="{$one->id}"   id="reviewInvSample{$one->id}" target="_blank"
           href="{$hosturl}/controllers/{$controllname}.php?ac=getinvpreview&investId={$one->id}" > 
            <i class="fa fa-eye"></i>
        </a>
        <!--a class="btn green-haze btn-xs printInvSample" data-id="{$one->id}"    id="printInvSample{$one->id}"
           href="#" > <i class="fa fa-print"></i>
        </a-->
        <a class="btn red btn-xs deletemsgEX" data-id="{$one->id}"   id="deleteInv{$one->id}" 
           href="#" data-link="addinvestigation" data-fn="del" data-tableName="invests"> <i class="fa fa-close"></i>
        </a>


        <a class="btn default btn-xs showCustom" data-id="{$one->id}"  href="#"  id="showCustom{$one->id}"  
           {if $one->special_inv_type !=   11 }   style="display: none;"     {/if}  >
            <i class="fa fa-question-circle"></i> 
        </a>



    </td>
</tr> 

{assign var="i" value={$i+1}}
{/foreach}









