{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}