A witness shall not be entitled to charge for his attendance in a civil case at any term of the court unless he shall, during the term or within five (5) days thereafter, prove his attendance and obtain a certificate in the manner directed; nor in any case, civil or criminal, shall a witness who does not appear in court when called, or who is so intoxicated as to be disqualified from testifying, be entitled to receive compensation.