Lueck’s Home Improvement, Inc., appeals an order denying reconsideration of the denial of its claim for restitution1 from Seal Tite National, Inc., under á stipulation between Seal Tite and the state and an order pursuant to secs. 100.18(1 l)(d) and 553.54(2)(a), Stats. The issue is whether the trial court abused its discretion in denying Lueck’s claim because its itemized schedule of returnable supplies, inventory and equipment was not timely filed under the restitution order. Because the trial court erroneously concluded that the restitution order constituted a contract and failed to exercise its discretion to allow or deny Lueck’s claim, we reverse and remand. We reject Seal Tite’s claim on its cross-appeal that the trial court abused its discretion in allowing Lueck to intervene to appeal its order and affirm that part of the order allowing Lueck’s intervention.
h-1
BACKGROUND OF THE CASE
This is a regulatory action by the Wisconsin office of the commissioner of securities (OCS) for alleged violations of the fraudulent advertising law, sec. 100.18(1), Stats., and the franchise investment law, ch. 553, Stats. Seal Tite waived the filing of a complaint *846and stipulated with the OCS to make restitution to its franchisees. Pursuant to the stipulation a restitution order was entered in the circuit court. Under the order, Seal Tite offered to franchisees, including Lueck, restitution for distribution fees and returnable supplies, inventory and equipment. Franchisees accepting restitution were required to return to the OCS a letter indicating acceptance, a signed affidavit summarizing the claim and an itemized schedule of returnable property.2 The OCS was to determine the restitution to be paid by Seal Tite and notify the court of the amount. Seal Tite had thirty days to object to any claim.
Lueck timely accepted restitution and submitted its affidavit stating its claim. The affidavit did not include a schedule itemizing the returnable supplies, inventory and equipment. After the time for accepting restitution expired under the order, the OCS reported to the court the total amount of restitution due all franchisees. The reported figure included all of Lueck’s claim.
Subsequently, on September 10, 1985, the OCS requested that Lueck submit within ten days its *847itemization of returnable property. On September 13 Seal Tite objected to Lueck’s claim because Lueck did not timely comply with the itemization requirement in the order. Lueck filed the itemization with the OCS on September 19.
The trial court denied Lueck’s claim for inventory, supplies and equipment, concluding "that the claim as timely filed was fatally defective under the rules of the restitution offer agreed to by the parties, and could not be subsequently corrected by unilateral action of the OCS, and must be denied.” The court held that the consent order created contractual obligations and that the time limits were mandatory.
rH hH
RESTITUTION CLAIMS INVOKE COURT’S EQUITABLE POWERS
Restitution under secs. 100.18(ll)(d) and 553.54(2)(a), Stats., invokes the court’s equitable powers. State v. Excel Management Services, 111 Wis. 2d 479, 490, 331 N.W.2d 312, 317 (1983). We review decisions in equity for abuse of discretion. Production Cr. Ass’n v. Jacobson, 131 Wis. 2d 550, 555, 388 N.W.2d 655, 657 (Ct. App. 1986).
We will find an abuse of discretion if the trial court failed to exercise its discretion. Oostburg Bank v. United Savings, 130 Wis. 2d 4, 11-12, 386 N.W.2d 53, 57 (1986). A discretionary ruling based on an error of law is an abuse of discretion. St. Michael’s Church v. Admin. Dept., 137 Wis. 2d 326, 338, 404 N.W.2d 114, 119 (Ct. App. 1987).
*848I — I I — ! hH
RESTITUTION IS NOT GOVERNED BY CONTRACT PRINCIPLES
The trial court erroneously concluded that the restitution order was a contract between Seal Tite and its franchisees.
The trial court relied on the fact that the restitution program had been "negotiated between the parties and accepted by the court.” This is factually inaccurate. Lueck was not a party to the stipulation negotiated between Seal Tite and the OCS.3 In any event, a restitution consent order is not a contract. Although stipulations of settlement have occasionally been referred to as contracts, they are not governed by contract law. Burmeister v. Vondrachek, 86 Wis. 2d 650, 664, 273 N.W.2d 242, 248, (1979).4 "We reject the *849argument... that a decree entered upon consent is to be treated as a contract and not as a judicial act.” United States v. Swift & Co., 286 U.S. 106, 115 (1932). In Swift the court recognized the power of a court to modify an injunction prohibiting monopolistic practices, even though the injunction had been entered as a consent decree.
[T]he ... authority to adopt a consent decree comes only from the statute which the decree is intended to enforce. Frequently of course the terms arrived at by the parties are accepted without change by the adopting court. But just as the adopting court is free to reject agreed-upon terms as not in furtherance of statutory objectives, so must it be free to modify the terms of a consent decree when a change ... brings those terms in conflict with statutory objectives.
System Federation No. 91 v. Wright, 364 U.S. 642, 651 (1961).
The trial court failed to appreciate that its equitable powers permitted it to allow Lueck’s claim despite Lueck’s failure to comply with the filing requirements of the restitution order. Once equity jurisdiction attaches, the court should continue to *850exercise its jurisdiction "in an effort to do complete justice between the parties.” Excel Management, 111 Wis. 2d at 491, 331 N.W.2d at 318. See J. Jeffries, Protection for Consumers Against Unfair and Deceptive Business, 57 Marq. L. Rev. 559, 600 (1974) (concept of restitution is grounded on traditional equitable principle that once equity jurisdiction attaches the court may grant full and complete relief).
Because the trial court proceeded on an incorrect legal theory, it did not exercise its discretion under proper equitable principles. We reverse and remand for the court to exercise its discretion. We may not exercise the discretion vested in the trial court. In re Cherokee Park Plat, 133 Wis. 2d 112, 125, 334 N.W.2d 580, 587 (Ct. App. 1983).
IV.
SEAL TITE’S CROSS-APPEAL
Seal Tite cross-appeals the trial court’s order allowing Lueck to intervene for the purpose of bringing this appeal. We conclude that the trial court did not abuse its discretion in allowing Lueck to intervene in order to appeal the trial court’s order. A party aggrieved by a judgment or order may appeal it. Mutual Service Cas. Ins. Co. v. Koenigs, 110 Wis. 2d 522, 526, 329 N.W.2d 157, 159 (1983); Tierney v. Lacenski, 114 Wis. 2d 298, 302, 338 N.W.2d 522, 524 (Ct. App. 1983). A person may be a party aggrieved even though he or she was not a party to the action. Miller v. Lighter, 21 Wis. 2d 401, 403, 124 N.W.2d 460, 461 (1963). Lueck was aggrieved by the denial of its claim.
*851By the Court. — Order affirmed in part, reversed in part and cause remanded.
The court’s memorandum decision of January 16, 1986 directed Seal Tite to prepare an appropriate order denying Lueck’s claim. This was never done because Lueck filed its motion for reconsideration and intervention. Thus Lueck’s appeal from the order denying its motion for reconsideration is timely.
The form affidavit stated:
I have attached a schedule which itemizes with particularity the supplies, inventory and equipment on hand that I regard as reusable and that I am willing to resell to Seal Tite National, Inc. The amounts that I paid to Seal Tite for such materials and the dates thereof are also set forth on the attachment. A summary of the amounts due me is as follows:
a) Supplies $ ____
b) Inventory $ ____
c) Equipment $ ____
The dissent claims this is factually inaccurate. However, the record shows that the state served Seal Tite with a summons but not a complaint. Seal Tite and its officers by stipulation with the state agreed to the entry of an order (and any judgment entered pursuant to such order) pursuant to which they would make an offer of restitution to named franchisees. Lueck was not a party to the stipulation or order. Lueck elected to participate in the restitution program only after it was in place as a result of the negotiations between the state and Seal Tite.
Contrary to the dissent’s suggestion, this case is not controlled by sec. 807.05, Stats. Our statement that stipulations of settlement are not governed by contract law is generic. In United States v. Swift & Co., 286 U.S. 106, 115 (1932), the Court made clear that when an order is entered pursuant to the consent of the parties to be bound thereby it is a judicial act, subject to the court’s continuing jurisdiction to modify the order. The Court stated:
The result is all one whether the decree has been entered after litigation or by consent. In either event, a court does not abdicate *849its power to revoke or modify its mandate if satisfied that what it has been doing has been turned through changing circumstances into an instrument of wrong.
Id. at 114-15 (citation omitted).
The dissent is apparently concerned that Seal Tite will lose its bargain, its "quid pro quo,” if Lueck’s claim is allowed. However, its concern is premature. Our mandate does not direct the trial court to allow Lueck’s claim, merely to consider whether Lueck’s failure to strictly comply with the filing requirements of the order has made it inequitable to Seal Tite to allow the claim.