The governing body of any city or county may provide by ordinance for the refund of any local taxes or classes of taxes erroneously paid. If such ordinance be passed, and the commissioner of the revenue is satisfied that he has erroneously assessed any applicant with any local taxes, he shall certify to the tax-collecting officer the amount erroneously assessed. If the taxes have not been paid, the applicant shall be exonerated from payment of so much thereof as is erroneous, and if such taxes have been paid, the tax-collecting officer or his successor in office shall refund to the applicant the amount erroneously paid, together with any penalties and interest paid thereon.
When the commissioner of the revenue who made the erroneous assessment has been succeeded by another person, such person shall have the same authority as the commissioner making the original erroneous assessment provided he makes diligent investigation to determine that the original assessment was erroneously made and certifies thereto to the local tax-collecting officer and to his local governing body.
No refund shall be made in any case when application therefor was made more than three years after the last day of the tax year for which such taxes were assessed; that however, if any tax is declared to be unconstitutional by a court of competent jurisdiction, the governing body may grant a refund of such tax hereunder to all taxpayers, for those years to which the court proceeding was applicable.
Va. Code § 58.1-3990