In any action for a refund, the court may render judgment for the taxpayer for any part of the tax, interest, penalties, or other amounts found to be erroneously paid, together with interest on the amount of the overpayment. The amount of any judgment against the Tax Commissioner shall first be credited against any taxes, interest, penalties, or other amounts due from the taxpayer under the tax laws of Nebraska and the remainder refunded.