(6) Upon motion made by the offeror within 30 days after the entry of judgment or after voluntary or involuntary dismissal, the court shall determine the following:
(a) If a defendant serves an offer which is not accepted by the plaintiff, and if the judgment obtained by the plaintiff is at least 25 percent less than the amount of the offer, the defendant shall be awarded reasonable costs, including investigative expenses, and attorney's fees, calculated in accordance with the guidelines promulgated by the Supreme Court, incurred from the date the offer was served, and the court shall set off such costs in attorney's fees against the award. When such costs and attorney's fees total more than the amount of the judgment, the court shall enter judgment for the defendant against the plaintiff for the amount of the costs and fees, less the amount of the award to the plaintiff.
(b) If a plaintiff serves an offer which is not accepted by the defendant, and if the judgment obtained by the plaintiff is at least 25 percent more than the amount of the offer, the plaintiff shall be awarded reasonable costs, including investigative expenses, and attorney's fees, calculated in accordance with the guidelines promulgated by the Supreme Court, incurred from the date the offer was served.
For purposes of the determination required by paragraph (a), the term "judgment obtained" means the amount of the net judgment entered, plus any postoffer collateral source payments received or due as of the date of the judgment, plus any postoffer settlement amounts by which the verdict was reduced. For purposes of the determination required by paragraph (b), the term "judgment obtained" means the amount of the net judgment entered, plus any postoffer settlement amounts by which the verdict was reduced.