(1) Any person not subject to this code, who:
(a) Has been duly subpoenaed to appear as a witness or to produce books and records before a court-martial or court of inquiry, or before any military or civil officer designated to take a deposition to be read in evidence before such a court;
(b) Has been duly paid or tendered the fees and mileage of a witness at the rates allowed to witnesses attending a criminal court of the state; and (c) Willfully neglects or refuses to appear, or refuses to qualify as a witness or to testify or to produce any evidence which that person may have been legally subpoenaed to produce; may be punished by the military court in the same manner as a criminal court of the state.
(2) The fees and mileage of witnesses shall be advanced or paid out of the appropriations for the compensation of witnesses.