{if  $inv->pdfNos > 0  }
<div class="col-md-1 wds5  fright">
    <a href="#"  class="btn green-jungle btn-xs"
       onclick="document.getElementById('invPdf1_{$inv->id}').click(); return false;" >
        <i class="fa fa-upload"></i> 1   </a>
    <input type="file" name="invPdf1_{$inv->id}"  id="invPdf1_{$inv->id}"
           class=" form-control addInvPdf" data-id="{$inv->id}" data-no="1" style="visibility:hidden;height: 9px;"  >


    {if  $inv->pdf != ''  &&  $inv->pdf != '.'  &&  $inv->pdf != Null &&  $inv->pdf != 'no image'  }
    <a class=" btn  btn-xs blue" download="{$inv->invname}_1_{$patientNo}"
       href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf}" id="pdf1Download{$inv->id}" >
        <i class="fa fa-download"></i> 1 
    </a>

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

{if  $inv->pdfNos > 1  }
<div class="col-md-1  wds5  fright">
    <a href="#"  class="btn green-jungle btn-xs"
       onclick="document.getElementById('invPdf2_{$inv->id}').click(); return false;" >
        <i class="fa fa-upload"></i>  2  </a>
    <input type="file" name="invPdf2_{$inv->id}"  id="invPdf2_{$inv->id}"
           class=" form-control addInvPdf" data-id="{$inv->id}" data-no="2" style="visibility:hidden;height: 9px;"  >

    {if  $inv->pdf2 != ''  &&  $inv->pdf2 != '.'  &&  $inv->pdf2 != Null &&  $inv->pdf2 != 'no image'  }
    <a class=" btn  btn-xs blue" download="{$inv->invname}_2_{$patientNo}"
       href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf2}" id="pdf2Download{$inv->id}" >
        <i class="fa fa-download"></i> 2
    </a>

    {else}
    <a class=" btn  btn-xs blue" download="{$inv->invname}_2_{$patientNo}"
       id="pdf2Download{$inv->id}" style="display: none;" >
        <i class="fa fa-download"></i> 2
    </a>
    {/if}
    <img src="{$hosturl}/../upload/loading.gif" id="talks-loading{$inv->id}_2" style="display: none;">
</div>
{if  $inv->pdfNos > 2  }
<div class="col-md-1 wds5   fright">
    <a href="#"  class="btn green-jungle btn-xs"
       onclick="document.getElementById('invPdf3_{$inv->id}').click(); return false;" >
        <i class="fa fa-upload"></i>  3 </a>
    <input type="file" name="invPdf3_{$inv->id}"  id="invPdf3_{$inv->id}"
           class=" form-control addInvPdf" data-id="{$inv->id}" data-no="3" style="visibility:hidden;height: 9px;"  >

    {if  $inv->pdf3 != ''  &&  $inv->pdf3 != '.'  &&  $inv->pdf3 != Null &&  $inv->pdf3 != 'no image'  }
    <a class=" btn  btn-xs blue" download="{$inv->invname}_3_{$patientNo}"
       href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf3}" id="pdf3Download{$inv->id}" >
        <i class="fa fa-download"></i> 3
    </a>

    {else}
    <a class=" btn  btn-xs blue" download="{$inv->invname}_3_{$patientNo}"
       id="pdf3Download{$inv->id}" style="display: none;" >
        <i class="fa fa-download"></i> 3
    </a>
    {/if}
    <img src="{$hosturl}/../upload/loading.gif" id="talks-loading{$inv->id}_3" style="display: none;">
</div>
{if  $inv->pdfNos > 3  }
<div class="col-md-1 wds5  fright">
    <a href="#"  class="btn green-jungle btn-xs"
       onclick="document.getElementById('invPdf4_{$inv->id}').click(); return false;" >
        <i class="fa fa-upload"></i>  4 </a>
    <input type="file" name="invPdf4_{$inv->id}"  id="invPdf4_{$inv->id}"
           class=" form-control addInvPdf" data-id="{$inv->id}" data-no="4" style="visibility:hidden;height: 9px;"  >

    {if  $inv->pdf4 != ''  &&  $inv->pdf4 != '.'  &&  $inv->pdf4 != Null &&  $inv->pdf4 != 'no image'  }
    <a class=" btn  btn-xs blue" download="{$inv->invname}_4_{$patientNo}"
       href="{$hosturl}/../upload/inv_pdf/{$patientNo}/{$inv->pdf4}" id="pdf4Download{$inv->id}" >
        <i class="fa fa-download"></i> 4
    </a>

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

{/if}

{/if}

{/if}

{/if}