No person holding any office or appointment under any county, city or other municipality shall be paid any witness fees in any case whatsoever when such person is a witness for the state of Kansas, county, city or other municipality when such state, county, city or other municipality is a party to said suit; nor shall any sheriff or his undersheriff or deputies while attending court as an officer, claim or be paid any witness fees in such cases: Provided, That this act shall not apply where such witness is required to attend court at a place other than where he resides or is employed, nor shall it apply to any such witness who is not a regularly employed and salaried officer or employee of any such county, city or other municipality.
K.S.A. 28-126