If judgment is rendered for the plaintiff, the amount of the judgment shall first be credited on any sales or use tax or amount of use tax due and payable from the plaintiff. The balance of the judgment shall be refunded to the plaintiff.
Ca. Rev. and Tax. Code § 6935