If the witness is summoned to attend and testify in this Commonwealth he shall receive such reimbursement for his daily mileage as prescribed in § 2.2-2823 for each day that he is required to travel and attend as a witness. A witness who has appeared in accordance with the provisions of the summons shall not be required to remain within this Commonwealth a longer period of time than the period mentioned in the certificate, unless otherwise ordered by the court.
The judge issuing the certificate prescribed in § 19.2-277 may, by order, direct the clerk of the court involved to issue such warrant or warrants payable out of the state treasury, as may be necessary to make the tender hereinabove prescribed; and after the entry of such order, such clerk, upon application of the attorney for the Commonwealth of the county or city involved, or of the accused, if certificate for the attendance of witness has been issued by such judge on his behalf as authorized by § 19.2-330, shall issue such warrant or warrants and deliver them to the said attorney for the Commonwealth, who shall, forthwith, cause such tender to be made. Upon issuance of any such warrant or warrants said clerk shall deliver a certified copy of the court's order to the Supreme Court, and the said warrant or warrants shall be paid out of the state treasury upon presentation.
Unless and until appropriate forms shall be obtained, such warrants may be issued on the regular forms provided for the payment of witness fees and allowances, but in such event the clerk issuing the same shall make a notation thereon that they were issued pursuant to the provisions of this section.
Va. Code § 19.2-278