<div class="card" style="margin-bottom: 1%;">
    <input type="hidden" id="ptInvest" value="1" />
    <div class="card-header txtl">
        <div class="fright wds100">
            <table class="table" style="width: 100%">
                <tbody>
                    <tr>
                        <td rowspan="2">   
                            <span style="float: left;">
                                <input type="checkbox"  class="checkGroup" value="{$inv->id}" name="invCheck[]">
                            </span>

                            <a class="card-link fleft" data-toggle="collapse" href="#invDiv{$inv->id}">
                                {$inv->invname}
                            </a>

                            <div class="col-md-1  fright">
                                <a class="btn btn-xs  bg-green-haze  printResultsOne "  data-id="{$inv->id}"   
                                   href="javascript:;"   > <i class="fa fa-print"></i> 
                                </a>
                            </div>   

                            {if  $inv->hasPdf== 1 }

                            <div class="col-md-1  fright">
                                <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-1  fright">
                                {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>
                        <th class="wds5 txtc"> F </th>
                        <th class="wds5 txtc"> V </th>
                        <th class="wds5 txtc"> P </th>
                        <th class="wds5 txtc"> D </th>
                        <td class="wds5 txtc"> S </td>
                    </tr>
                    <tr>
                        <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: 5%;margin-bottom: 10%;"></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: 5%;margin-bottom: 10%;"></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: 5%;margin-bottom: 10%;"></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: 5%;margin-bottom: 10%;"></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: 5%;margin-bottom: 10%;"></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: 5%;margin-bottom: 10%;"></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: 5%;margin-bottom: 10%;"></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: 5%;margin-bottom: 10%;"></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: 5%;margin-bottom: 10%;"></i> 
                            {/if}
                        </td>
                    </tr>
                    <tr>
                        <td colspan="6">
                            <div class="form-group collapse  " data-parent="#accordion" style=" width: 100%; float: left;   border-bottom:1px solid black;  margin: 5px;padding-bottom: 5px;" id="invDiv{$inv->id}">
                                <div class="card-body">

                                    {if $inv->special_inv_type == 9 || $inv->special_inv_type == 12   }  
                                    <a class="btn btn-success btn-xs fright  " id="calculator"  
                                       href="javascript:;" data-invResId="{$inv->id}" style=" margin-right:  45px; "  >
                                        Factors
                                    </a>

                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                        <label class="col-md-2 control-label bold" style="text-align: center !important;background: #DDD;padding: 5px; margin-right:  21.66666667%;">PT</label>

                                        <div class="col-md-2">
                                            <input type="text"   class="form-control   notPop   "  value="Control's Time"    disabled=""  >
                                        </div>

                                        <div class="col-md-2">
                                            <input type="text" disabled="" id="control_time_pt"  class="form-control  notPop   " value="{$inv->pt->control_time}">
                                        </div>

                                        <div class="col-md-1 wds4">
                                            <input type="text"   class="form-control   notPop   "  value="sec"    disabled=""  >
                                        </div>

                                        <div class="col-md-1 wds4">
                                            <input type="text"   class="form-control  notPop    "  value="ISI"    disabled=""  >
                                        </div>

                                        <div class="col-md-2">
                                            <input type="text" disabled="" id="isi_pt"  class="form-control  notPop   " value="{$inv->pt->isi}">
                                        </div>

                                    </div>

                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                        <label class="col-md-2 control-label bold txtl" style="margin-left: 5%;">Patient's Time  : </label>

                                        <div class="col-md-2">
                                            <input type="text"  class="form-control updateInvest pt   notPop     positivefloat" data-colName="patient_time"  data-target="patient_time"    
                                                   data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}" value="{$inv->pt->patient_time}"  id="patient_time_pt"
                                                   {if $archive == 1 } disabled="" {/if} >
                                        </div>

                                        <div class="col-md-2">
                                            <input type="text" disabled="" id="patient_time_unit"  class="form-control  notPop   " value="{$inv->pt->patient_time_invest_units}">
                                        </div>

                                        <div class="col-md-2 wds10">
                                            <input type="text" disabled="" id="patient_time_level"  class="form-control  notPop   " value="   {if $inv->pt->patient_time_low == 1 } L  {else if $inv->pt->patient_time_high == 1 } H   {/if} ">
                                        </div>

                                        <div class="col-md-4">
                                            <select        class="form-control select2h updateInvest pt" data-colName="patient_time_rangeid" 
                                                           data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}"   data-target="patient_time"   
                                                           id="patient_time_rangeid" >
                                                <option value=""></option>
                                                {foreach  $inv->pt->patient_time_ranges as $rang}
                                                <option value="{$rang->id}" {if $rang->id == $inv->pt->patient_time_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                {/foreach}
                                            </select>
                                        </div>
                                    </div>

                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                        <label class="col-md-2 control-label bold txtl" style="margin-left: 5%;">Concentration  : </label>

                                        <div class="col-md-2">
                                            <input type="text"  class="form-control updateInvest pt   positivefloat  notPop   " data-colName="concentration"  data-target="concentration"    
                                                   data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}" value="{$inv->pt->concentration}"  id="concentration_pt"
                                                   disabled=""  >
                                        </div>

                                        <div class="col-md-2">
                                            <input type="text" disabled="" id="concentration_unit"  class="form-control  notPop   " value="{$inv->pt->concentration_invest_units}">
                                        </div>

                                        <div class="col-md-2 wds10">
                                            <input type="text" disabled="" id="concentration_level"  class="form-control  notPop   " value="   {if $inv->pt->concentration_low == 1 } L  {else if $inv->pt->concentration_high == 1 } H   {/if} ">
                                        </div>

                                        <div class="col-md-4">
                                            <select        class="form-control select2h updateInvest pt" data-colName="concentration_rangeid" 
                                                           data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}"   data-target="concentration"   
                                                           id="concentration_rangeid" >
                                                <option value=""></option>
                                                {foreach  $inv->pt->concentration_ranges as $rang}
                                                <option value="{$rang->id}" {if $rang->id == $inv->pt->concentration_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                {/foreach}
                                            </select>
                                        </div>
                                    </div>

                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                        <label class="col-md-2 control-label bold txtl" style="margin-left: 5%;">I.N.R  : </label>

                                        <div class="col-md-2">
                                            <input type="text"  class="form-control updateInvest pt   positivefloat  notPop   " data-colName="inr"  data-target="inr"    
                                                   data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}" value="{$inv->pt->inr}"  id="inr_pt"
                                                   disabled="" >
                                        </div>

                                        <div class="col-md-2">
                                            <input type="text" disabled="" id="inr_unit"  class="form-control  notPop   " value="{$inv->pt->inr_invest_units}">
                                        </div>

                                        <div class="col-md-2 wds10">
                                            <input type="text" disabled="" id="inr_level"  class="form-control  notPop   " value="   {if $inv->pt->inr_low == 1 } L  {else if $inv->pt->inr_high == 1 } H   {/if} ">
                                        </div>

                                        <div class="col-md-4">
                                            <select        class="form-control select2h updateInvest pt" data-colName="inr_rangeid" 
                                                           data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}"   data-target="inr"   
                                                           id="inr_rangeid" >
                                                <option value=""></option>
                                                {foreach  $inv->pt->inr_ranges as $rang}
                                                <option value="{$rang->id}" {if $rang->id == $inv->pt->inr_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                {/foreach}
                                            </select>
                                        </div>
                                    </div>


                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                        <label class="col-md-2 control-label bold txtl" style="margin-left: 5%;">Ratio  : </label>

                                        <div class="col-md-2">
                                            <input type="text"  class="form-control updateInvest pt   positivefloat  notPop   " data-colName="ratio"  data-target="ratio"    
                                                   data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}" value="{$inv->pt->ratio}"  id="ratio_pt"
                                                   {if $archive == 1 } disabled="" {/if} >
                                        </div>

                                        <div class="col-md-2">
                                            <input type="text" disabled="" id="ratio_unit"  class="form-control  notPop   " value="{$inv->pt->ratio_invest_units}">
                                        </div>

                                        <div class="col-md-2 wds10">
                                            <input type="text" disabled="" id="ratio_level"  class="form-control  notPop   " value="   {if $inv->pt->ratio_low == 1 } L  {else if $inv->pt->ratio_high == 1 } H   {/if} ">
                                        </div>

                                        <div class="col-md-4">
                                            <select        class="form-control select2h updateInvest pt" data-colName="ratio_rangeid" 
                                                           data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}"   data-target="ratio"   
                                                           id="ratio_rangeid" >
                                                <option value=""></option>
                                                {foreach  $inv->pt->ratio_ranges as $rang}
                                                <option value="{$rang->id}" {if $rang->id == $inv->pt->ratio_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                {/foreach}
                                            </select>
                                        </div>
                                    </div>

                                    {/if}

                                    {if $inv->special_inv_type == 9 || $inv->special_inv_type == 13   }  

                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5%; ">

                                        <label class="col-md-2 control-label bold" style="text-align: center !important;background: #DDD;padding: 5px; margin-right:  21.66666667%;">APTT</label>

                                        <div class="col-md-2">
                                            <input type="text"   class="form-control   notPop   "  value="Control's Time"    disabled=""  >
                                        </div>

                                        <div class="col-md-2">
                                            <input type="text" disabled="" id="control_time1_pt"  class="form-control  notPop   " value="{$inv->pt->control_time1}">
                                        </div>

                                        <div class="col-md-1 wds4">
                                            <input type="text"   class="form-control   notPop   "  value="sec"    disabled=""  >
                                        </div>
                                    </div>


                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                        <label class="col-md-2 control-label bold txtl" style="margin-left: 5%;">Patient's Time  : </label>

                                        <div class="col-md-2">
                                            <input type="text"  class="form-control updateInvest pt   positivefloat  notPop   " data-colName="patient_time1"  data-target="patient_time1"    
                                                   data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}" value="{$inv->pt->patient_time1}"  id="patient_time1_pt"
                                                   {if $archive == 1 } disabled="" {/if} >
                                        </div>

                                        <div class="col-md-2">
                                            <input type="text" disabled="" id="patient_time1_unit"  class="form-control  notPop   " value="{$inv->pt->patient_time1_invest_units}">
                                        </div>

                                        <div class="col-md-2 wds10">
                                            <input type="text" disabled="" id="patient_time1_level"  class="form-control  notPop   " value="   {if $inv->pt->patient_time1_low == 1 } L  {else if $inv->pt->patient_time1_high == 1 } H   {/if} ">
                                        </div>

                                        <div class="col-md-4">
                                            <select        class="form-control select2h updateInvest pt" data-colName="patient_time1_rangeid" 
                                                           data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}"   data-target="patient_time1"   
                                                           id="patient_time1_rangeid" >
                                                <option value=""></option>
                                                {foreach  $inv->pt->patient_time1_ranges as $rang}
                                                <option value="{$rang->id}" {if $rang->id == $inv->pt->patient_time1_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                {/foreach}
                                            </select>
                                        </div>
                                    </div>


                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                        <label class="col-md-2 control-label bold" style="margin-right: 5%;background: #DDD;padding: 5px;">Fibrinogen  : </label>

                                        <div class="col-md-2">
                                            <input type="text"  class="form-control updateInvest pt   notPop     positivefloat" data-colName="fibrinogen"  data-target="fibrinogen"    
                                                   data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}" value="{$inv->pt->fibrinogen}"  id="fibrinogen_pt"
                                                   {if $archive == 1 } disabled="" {/if} >
                                        </div>

                                        <div class="col-md-2">
                                            <input type="text" disabled="" id="fibrinogen_unit"  class="form-control  notPop   " value="{$inv->pt->fibrinogen_invest_units}">
                                        </div>

                                        <div class="col-md-2 wds10">
                                            <input type="text" disabled="" id="fibrinogen_level"  class="form-control  notPop   " value="   {if $inv->pt->fibrinogen_low == 1 } L  {else if $inv->pt->fibrinogen_high == 1 } H   {/if} ">
                                        </div>

                                        <div class="col-md-4">
                                            <select        class="form-control select2h updateInvest pt" data-colName="fibrinogen_rangeid" 
                                                           data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}"   data-target="fibrinogen"   
                                                           id="fibrinogen_rangeid" >
                                                <option value=""></option>
                                                {foreach  $inv->pt->fibrinogen_ranges as $rang}
                                                <option value="{$rang->id}" {if $rang->id == $inv->pt->fibrinogen_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                {/foreach}
                                            </select>
                                        </div>
                                    </div>

                                    <div class="form-group col-md-12 " style=" float: left; margin-top: 5px; ">

                                        <label class="col-md-2 control-label bold" style="margin-right: 5%;background: #DDD;padding: 5px;">FDP  : </label>

                                        <div class="col-md-2">
                                            <input type="text"  class="form-control updateInvest pt   notPop     positivefloat" data-colName="fdp"  data-target="fdp"    
                                                   data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}" value="{$inv->pt->fdp}"  id="fdp_pt"
                                                   {if $archive == 1 } disabled="" {/if} >
                                        </div>

                                        <div class="col-md-2">
                                            <input type="text" disabled="" id="fdp_unit"  class="form-control  notPop   " value="{$inv->pt->fdp_invest_units}">
                                        </div>

                                        <div class="col-md-2 wds10">
                                            <input type="text" disabled="" id="fdp_level"  class="form-control  notPop   " value="   {if $inv->pt->fdp_low == 1 } L  {else if $inv->pt->fdp_high == 1 } H   {/if} ">
                                        </div>

                                        <div class="col-md-4">
                                            <select        class="form-control select2h updateInvest pt" data-colName="fdp_rangeid" 
                                                           data-id="{$inv->pt->id}"  data-tableName="{$inv->tableName}"   data-target="fdp"   
                                                           id="fdp_rangeid" >
                                                <option value=""></option>
                                                {foreach  $inv->pt->fdp_ranges as $rang}
                                                <option value="{$rang->id}" {if $rang->id == $inv->pt->fdp_rangeid} selected {/if} >{$rang->range_txt}  {$rang->range_low} - {$rang->range_high}   {$rang->invest_units} </option>
                                                {/foreach}
                                            </select>
                                        </div>
                                    </div>

                                    {/if}

                                    <div class="form-group col-md-12 " style=" float: left;margin-top :  5px; ">
                                        <label class="col-md-2 control-label bold txtl" style=" font-size: 16px;"> Comment </label>
                                        <div class="col-md-10">
                                            <textarea class="form-control updateInvest   notPop   " rows="2" data-id="{$inv->pt->id}" data-colName="comment" 
                                                      data-tableName="{$inv->tableName}" placeholder="Enter more text" >
                                                {$inv->pt->comment}
                                            </textarea>
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>