(a) If a setoff established at the trial exceeds the plaintiff's claim so established, judgment for the defendant must be given for the excess.
(b) If it appears that the defendant is entitled to any other affirmative relief, judgment shall be given therefor.