{if $normalCount > 0}
<table class="table table-striped table-hover table-bordered">
    <thead>
        <tr>
            <th class="bold col-md-3"> <div align="center">Name </div></th>
            <th class="bold col-md-2"> <div align="center">Result </div></th>
            <th class="bold col-md-4"> <div align="center">Range </div></th>
            <td class="col-md-1 wds3 txtc"> F </td>
            <td class="col-md-1 wds3 txtc"> V </td>
            <td class="col-md-1 wds3 txtc"> P </td>
            <td class="col-md-1 wds3 txtc"> D </td>
            <td class="col-md-1 wds3 txtc"> S </td>
        </tr>
    </thead>
    <tbody>

        {foreach $normal as $inv}

        <tr>
            <td>
                <label class=" control-label bold txtl" style="margin-left: 4px;float: left;" >{$inv->invname}
                    <span style="float: left;">
                        <input type="checkbox"  class="checkGroup" value="{$inv->id}" name="invCheck[]">
                    </span>
                </label>
            </td>

            <td>
                {if  $inv->hasPdf== 1 }   <div class="col-md-6">  {else} <div class="col-md-12">     {/if}
                        <input type="text" {if $archive == 1 } disabled="" {/if} class="form-control updateInvest notPop " 
                               data-colName="investresult" data-id="{$inv->id}"  data-tableName="{$inv->tableName}" 
                               value="{$inv->investresult}">
                    </div>

                    {if  $inv->hasPdf== 1 }
                    <div class="col-md-4 " style="text-align: right;">
                        <a href="#"  class="btn green-jungle btn-xs"
                           onclick="document.getElementById('invPdf_{$inv->id}').click(); return false;" >
                            <i class="fa fa-upload"></i>  </a>
                        <input type="file" name="invPdf_{$inv->id}"  id="invPdf_{$inv->id}"  
                               class=" form-control addInvPdf" data-id="{$inv->id}" style="visibility:hidden;"  >
                    </div>   

                    <div class="col-md-2" style="text-align: right;" >
                        {if  $inv->pdf != ''  &&  $inv->pdf != '.'  &&  $inv->pdf != Null &&  $inv->pdf != 'no image'  }
                        <a class="btn  btn-xs blue" download="{$inv->invname}_{$patientNo}" 
                           href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf}" id="pdfDownload{$inv->id}" >
                            <i class="fa fa-download"></i>
                        </a>

                        {else}
                        <a class="btn  btn-xs blue" download="{$inv->invname}_{$patientNo}" 
                           id="pdfDownload{$inv->id}" style="display: none;" >
                            <i class="fa fa-download"></i>
                        </a>
                        {/if}
                        <img src="{$hosturl}/../upload/loading.gif" id="talks-loading{$inv->id}" style="display: none;">
                    </div>   
                    {/if}
            </td>

            <td>
                <select       class="form-control select2h updateInvest" data-colName="rangeid" data-id="{$inv->id}"  data-tableName="{$inv->tableName}"    id="ranges{$inv->id}" >
                    <option value=""></option>
                    {foreach  $inv->ranges as $rang}
                    <option value="{$rang->id}" {if $rang->id == $inv->rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                    {/foreach}
                </select>
            </td>

            <td>
                {if  $inv->filled == 1 }
                <i class="fa fa-check  invStatusChange"   data-colName="filled"  data-val="0" 
                   data-id="{$inv->id}"   id="invFilled{$inv->id}" 
                   style="color: #119866;font-size: 20px;margin-top: 25%;"></i> 
                {else}
                <i class="fa fa-times invStatusChange"   data-colName="filled"    data-val="1" 
                   data-id="{$inv->id}"   id="invFilled{$inv->id}" 
                   style="color: red;font-size: 20px;margin-top: 25%;"></i> 
                {/if}
            </td>

            <td>
                {if  $inv->verified == 1 }
                <i class="fa fa-check invStatusChange"   data-colName="verified"   data-val="0"  
                   data-id="{$inv->id}" 
                   style="color: #119866;font-size: 20px;margin-top: 25%;"></i> 
                {else}
                <i class="fa fa-times invStatusChange"   data-colName="verified"    data-val="1" 
                   data-id="{$inv->id}"  
                   style="color: red;font-size: 20px;margin-top: 25%;"></i> 
                {/if}
            </td>

            <td>
                {if  $inv->printed == 1 }
                <i class="fa fa-check invStatusChange"    data-colName="printed"    data-val="0"     id="invPrinted{$inv->id}" 
                   data-id="{$inv->id}" 
                   style="color: #119866;font-size: 20px;margin-top: 25%;"></i> 
                {else}
                <i class="fa fa-times invStatusChange"    data-colName="printed"    data-val="1"     id="invPrinted{$inv->id}" 
                   data-id="{$inv->id}"  
                   style="color: red;font-size: 20px;margin-top: 25%;"></i> 
                {/if}
            </td>

            <td>
                {if  $inv->delivered == 1 }
                <i class="fa fa-check invReDeliver "     data-id="{$inv->id}"  data-paid="{$paid}"  data-val="1" 
                   style="color: #119866;font-size: 20px;margin-top: 5%;"></i> 
                {else}
                <i class="fa fa-times invStatusChange"    data-colName="delivered"    data-val="1" 
                   data-id="{$inv->id}"  data-paid="{$paid}" 
                   style="color: red;font-size: 20px;margin-top: 25%;"></i> 
                {/if}
            </td>

            <td>
                {if  $inv->sent == 1 }
                <i class="fa fa-check invStatusChange"  data-colName="sent"    data-val="0" 
                   data-id="{$inv->id}"    
                   style="color: #119866;font-size: 20px;margin-top: 25%;"></i> 
                {else}
                <i class="fa fa-times invStatusChange"    data-colName="sent"    data-val="1" 
                   data-id="{$inv->id}"  
                   style="color: red;font-size: 20px;margin-top: 25%;"></i> 
                {/if}
            </td>
        </tr>

        <tr>
            <td>
                Comment
            </td>
            <td colspan="5">
                <div class="form-group col-md-12 " style=" float: left;margin-top :  5px; ">
                    <div class="col-md-12">
                        <textarea class="form-control updateInvest   notPop   " rows="1" data-id="{$inv->id}" data-colName="comment" 
                                  data-tableName="{$inv->tableName}" placeholder="Enter more text" >
                            {$inv->comment}
                        </textarea>
                    </div>
                </div>
            </td>
            <td colspan="2">
                <a class="btn bg-green-haze  printResultsOne fright "  data-id="{$inv->id}"   
                   href="javascript:;" > <i class="fa fa-print"></i> 
                </a>
            </td>
        </tr>

        {/foreach}

    </tbody>
</table>

{/if}

<div class="form-group " style=" width: 100%; float: left;   border-bottom:1px solid black;  margin: 5px;padding-bottom: 5px;"></div>

<div id="accordion">    