in WHMCS if a customer has not enough credit balance for full payment of an invoice, WHMCS allows him to do partly payment with credit balance and complete the payment elseway (i.e. credit card or Paypal)
This may cause issues with tax calculations, so to make impossible to a user a partly payment with his credit balance, you must edit wour viewinvoice.tpl file as follows:
Find following line of code:
<input type="text" name="creditamount" value="{$creditamount}" class="form-control" />
and replace it with:
<input type="hidden" name="creditamount" value="{$creditamount}" class="form-control" />