When an examination of a dealer's books and records indicates that the dealer is deficient in paying the proper tax due for a month, but has paid more tax than is actually due for another month, or is deficient in paying the proper tax on one (1) or more transactions within a month, but has paid more tax than is actually due on other transactions during the same month, or has erroneously paid tax to another dealer, the overpayment or erroneous payment shall be applied to the deficiency before computing any interest and penalty due as a result of such examination, the earliest overpayments offsetting the earliest underpayments for this purpose, and the penalty, if any, being computed on the amounts of underpayments not offset by overpayments.
T.C.A. § 67-6-516