
964 N.E.2d 1288 (2012)
358 Ill. Dec. 266
Naresh PATEL, Petitioner-Appellee,
v.
HOME DEPOT USA, INC., Respondent-Appellant (The Home Depot, Inc., and Sedgwick Claims Management Services, Inc., Respondents).
No. 1-10-3217.
Appellate Court of Illinois, First District, Fourth Division.
February 2, 2012.
*1289 Gurber, McAndrews and Norgle, LLC (John M. McAndrews, of counsel), Law Offices of Philip J. McGuire, PC (Philip J. McGuire, of counsel), Chicago, for Appellant.
Paul W. Grauer & Associates, Schaumburg (Edward Adam Czapla, of counsel), for Appellee.

OPINION
Justice STERBA delivered the judgment of the court, with opinion.
¶ 1 This appeal arises out of the circuit court's entry of judgment against respondent-appellant Home Depot USA, Inc. (Home Depot), pursuant to section 19(g) of the Illinois Workers' Compensation Act (Act) (820 ILCS 305/19(g) (West 2008)). Petitioner-appellee Naresh Patel was injured while working for Home Depot and received an award of benefits from an arbitrator that was confirmed by the Illinois Workers' Compensation Commission (Commission). Home Depot was granted a credit by the arbitrator in excess of the amount of the benefits award. The credit was also affirmed by the Commission. When Home Depot did not pay the award, Patel filed a petition in circuit court for judgment on the award and also requested penalties under section 19(g) of the Act (820 ILCS 305/19(g) (West 2008)). The circuit court entered judgment against *1290 Home Depot for the amount of the benefits award and later awarded Patel attorney fees, costs and interest. On appeal, Home Depot contends that the circuit court erred in denying its motion to dismiss and entering judgment in favor of Patel because Home Depot had already paid more than it was obligated to pay. For the reasons that follow, we affirm the judgment of the circuit court.

¶ 2 BACKGROUND
¶ 3 As a result of two separate work-related accidents, Patel filed claims with the Commission for benefits. The cases were heard together before an arbitrator. In January 2004, the arbitrator entered an award in Patel's favor in both cases. Patel was awarded a total of $22,798.54 in temporary total disability (TTD) benefits, penalties, and attorney fees related to the two claims. The arbitrator also granted Home Depot a credit of $27,357.47 pursuant to section 8(j) of the Act (820 ILCS 305/8(j) (West 2008)), for TTD benefits previously paid to Patel.
¶ 4 The arbitrator noted that Home Depot paid Patel TTD benefits starting in November 2001. In November 2002, Home Depot terminated Patel's TTD benefits without written notice. After Patel's attorney demanded that TTD benefits be reinstated, Home Depot paid TTD benefits for several weeks before again terminating the benefits without written notice. This pattern repeated itself several times culminating with Home Depot's refusal to pay any TTD benefits after mid-February 2003. The arbitrator found that Patel was entitled to TTD benefits from February 14, 2003 through October 20, 2003.
¶ 5 Home Depot petitioned the Commission for review of the arbitrator's decision. In November 2005, the Commission confirmed the award of benefits and the credit. However, the Commission increased the amount of the credit to $32,357.47 and determined that it was not pursuant to section 8(j) of the Act. Patel then submitted a demand letter for payment of the benefits award to Home Depot. When Home Depot did not respond, Patel filed an application for entry of judgment and payment of compensation and penalties awarded under the Act pursuant to section 19(g) (820 ILCS 305/19(g) (West 2008)).
¶ 6 Home Depot filed a motion to dismiss pursuant to section 2-619.1 of the Illinois Code of Civil Procedure (Code) (735 ILCS 5/2-619.1 (West 2008)) on the grounds that it was entitled to offset the credit against the benefit award. The circuit court denied the motion and subsequently granted Patel's motion for judgment on the pleadings pursuant to section 2-615(e) of the Code (735 ILCS 5/2-615(e) (West 2008)). The circuit court entered judgment against Home Depot for $22,798.54 and set a briefing schedule to address the issues of attorney fees, costs and additional interest. In September 2010, the circuit court entered judgment in favor of Patel for attorney fees of $47,000, costs of $5,315.31 and interest of $13,679.08. Home Depot timely filed this appeal.

¶ 7 ANALYSIS
¶ 8 The instant case involves the construction of section 19(g) of the Act (820 ILCS 305/19(g) (West 2008)). The construction of a statute is a question of law, which is reviewed de novo. Johnson v. Johnson, 386 Ill.App.3d 522, 534, 325 Ill.Dec. 412, 898 N.E.2d 145 (2008). Moreover, a reviewing court reviews de novo a lower court's ruling on a motion to dismiss. Simmons v. Homatas, 236 Ill.2d 459, 477, 338 Ill.Dec. 883, 925 N.E.2d 1089 (2010).
*1291 ¶ 9 Home Depot filed its motion to dismiss under section 2-619.1 of the Code (735 ILCS 5/2-619.1 (West 2008)). This section allows a defendant to raise alternative grounds for dismissal under section 2-615 (735 ILCS 5/2-615 (West 2008)) and section 2-619 (735 ILCS 5/2-619 (West 2008)). Here, Home Depot argues that Patel's complaint should have been dismissed pursuant to section 2-615 or, in the alternative, the complaint should have been dismissed pursuant to section 2-619.
¶ 10 A motion to dismiss under section 2-615 attacks the legal sufficiency of the complaint. Such a motion to dismiss does not raise affirmative factual defenses, but alleges defects appearing on the face of the pleadings. Kolegas v. Heftel Broadcasting Corp., 154 Ill.2d 1, 8, 180 Ill.Dec. 307, 607 N.E.2d 201 (1992). In ruling on a section 2-615 motion to dismiss, the court must accept as true all well-pled facts in the complaint and all reasonable inferences which can be drawn therefrom. McGrath v. Fahey, 126 Ill.2d 78, 90, 127 Ill.Dec. 724, 533 N.E.2d 806 (1988). In making this determination, the court interprets the allegations of the complaint in the light most favorable to the plaintiff. Id. A cause of action should not be dismissed on the pleadings unless it clearly appears that no set of facts can be proved under the pleading which will entitle plaintiff to recover. Reuben H. Donnelley Corp. v. Brauer, 275 Ill.App.3d 300, 302, 211 Ill.Dec. 779, 655 N.E.2d 1162 (1995).
¶ 11 Moreover, if a claim is based on a written document, the document itself must be attached to the pleading as an exhibit. The exhibit is part of the pleading for purposes of a motion to dismiss. If there is an inconsistency, the exhibit controls over the factual allegations in the pleading. F.H. Prince & Co. v. Towers Financial Corp., 275 Ill.App.3d 792, 797, 211 Ill.Dec. 950, 656 N.E.2d 142 (1995).
¶ 12 Conversely, a motion to dismiss pursuant to section 2-619 is properly used to raise affirmative matters that negate the claim and not to challenge the allegations of the plaintiff's pleading. Provenzale v. Forister, 318 Ill.App.3d 869, 878, 252 Ill.Dec. 808, 743 N.E.2d 676 (2001). This motion admits the legal sufficiency of a complaint, but asserts affirmative matters that avoid or defeat the allegations contained in the complaint. Miner v. Fashion Enterprises, Inc., 342 Ill. App.3d 405, 413, 276 Ill.Dec. 652, 794 N.E.2d 902 (2003).
¶ 13 Patel filed an application for entry of judgment and payment of compensation and penalties awarded pursuant to section 19(g) of the Act (820 ILCS 305/19(g) (West 2008)). Section 19(g) provides that a party may present a certified copy of the arbitrator's award or the decision of the Commission to the circuit court and "the court shall enter a judgment in accordance therewith." 820 ILCS 305/19(g) (West 2008). The statute further provides that in cases where the employer refuses to pay compensation according to the final award, the court will also tax as costs against the employer the reasonable costs and attorney fees in the arbitration proceedings and in the court entering the judgment. 820 ILCS 305/19(g) (West 2008).
¶ 14 Home Depot sought involuntary dismissal of Patel's application for entry of judgment on the grounds that Home Depot does not owe Patel anything. Home Depot claims the decisions of both the arbitrator and the Commission "destroy" Patel's claim, as both state an award in *1292 favor of Patel and also the credit that Home Depot is entitled to because of its previous overpayments. Because the amount of the credit exceeds the amount of the award, Home Depot posits that the credit offsets the award to Patel and therefore Home Depot owes Patel nothing. We disagree.
¶ 15 Although Home Depot may ultimately obtain the credit the arbitrator and the Commission granted, it is not entitled to that credit under section 19(g). See Illinois Graphics Co. v. Nickum, 159 Ill.2d 469, 203 Ill.Dec. 463, 639 N.E.2d 1282 (1994). In Illinois Graphics, Nickum filed a workers' compensation claim with the Commission for an injury she allegedly suffered in the course of her employment with Illinois Graphics. Id. at 472, 203 Ill.Dec. 463, 639 N.E.2d 1282. During the pendency of the workers' compensation matter, Illinois Graphics paid Nickum a sum of money for TTD benefits. Id. at 473, 203 Ill.Dec. 463, 639 N.E.2d 1282. Following a hearing, an arbitrator denied Nickum's claim. Id. Nickum appealed and the Commission subsequently affirmed the arbitrator's decision and awarded Illinois Graphics a credit for the money it had already paid to Nickum. Id. at 473-74, 203 Ill.Dec. 463, 639 N.E.2d 1282. Illinois Graphics then filed a petition pursuant to section 19(g) to obtain a judgment against Nickum for the amount of the credit. Id. at 474, 203 Ill.Dec. 463, 639 N.E.2d 1282.
¶ 16 In Illinois Graphics our supreme court stated, "The plain language of section 19(g) states that the Commission's decision, on which any judgment is based, be one 'providing for the payment of compensation according to this act.'" (Emphasis in original.) Id. at 480, 203 Ill.Dec. 463, 639 N.E.2d 1282. The court went on to state, "[T]hese express terms fairly limit the type of decision to those which provide for the payment of compensation benefits." (Emphasis in original.) Id. The court added, "The allowance of a credit within a decision or award merely serves to reduce the total payment of compensation benefits." Id. The Illinois Graphics decision demonstrates that under section 19(g), credit does not equal compensation. The purpose of the Act was to provide a flow of benefits to compensate for lost wages and to compensate workers for loss of industrial earning capacity. Id. at 481, 203 Ill.Dec. 463, 639 N.E.2d 1282. Although the court in Illinois Graphics noted that the employer had a common law remedy to recover the overpayment, the court held that it did not have a statutory remedy under section 19(g). Id. at 482, 203 Ill.Dec. 463, 639 N.E.2d 1282.
¶ 17 In Karastamatis v. Industrial Comm'n, 306 Ill.App.3d 206, 215, 238 Ill. Dec. 915, 713 N.E.2d 161 (1999), the appellate court recognized that the supreme court in Illinois Graphics held that section 19(g) does not enable an employer to recoup benefits paid to an employee. Instead, the Karastamatis court noted that Illinois Graphics specifically holds that any such action shall be a common law action. Id. Recoupment, restitution, or reimbursement, even if awarded by the Commission, does not constitute a decision providing for payment of benefits. Id. Although section 19(g) states that both an employer and an employee may seek relief under section 19(g), an employee is the only one who may have a decision providing for payment of benefits. Id. The Karastamatis court concluded that "should [an] employer desire to seek reimbursement from [a] claimant, the proper remedy would be to file suit in the circuit court based on common law [remedies]. There is no authority under the Act that would *1293 allow the Commission, the circuit court, or this court to award such credit in these proceedings." Id.
¶ 18 Home Depot contends that Illinois Graphics is distinguishable because the employer there was attempting to file a petition under section 19(g) in order to recover the amount of the credit from the employee. Here, Home Depot argues that it is not attempting to recover the amount of its overpayment from Patel but merely seeking to offset the credit against the benefits award. Home Depot further contends that the case cited by Patel, Messamore v. Industrial Comm'n, 302 Ill.App.3d 351, 235 Ill.Dec. 784, 706 N.E.2d 44 (1999), for the proposition that an employer is allowed to offset a credit against permanent partial disability (PPD) benefits but not against TTD benefits does not, in fact, bar a credit against TTD benefits.
¶ 19 In Messamore, the claimant was awarded both TTD and PPD benefits. Id. at 353, 235 Ill.Dec. 784, 706 N.E.2d 44. Due to an apparent clerical error on the part of the arbitrator, the employer overpaid the TTD benefits by approximately six months. Id. at 356, 235 Ill.Dec. 784, 706 N.E.2d 44. The Commission corrected the error and gave the employer a credit for the amount of the overpayment. Id. The Messamore court held that the employer was entitled to apply a credit for overpayment of TTD benefits against the PPD award. Id. at 359, 235 Ill.Dec. 784, 706 N.E.2d 44. The court stated that its reasoning applied whether the credit was sought against a permanent disability award or some other benefit paid after the TTD overpayment. Id. The court explained that if the employee were to receive a windfall at the employer's expense due to an accidental overpayment of TTD benefits, it would encourage delays in payments because employers would seek to resolve every ambiguity before paying benefits. Id. The court noted that the decision in Illinois Graphics did not apply because the employer there was bringing a claim for overpayments under section 19(g), not seeking a credit against future payments. Id. The Messamore court noted that section 19(g) was not an issue in the case before it. Id.
¶ 20 In the case sub judice, unlike the situation in Messamore, section 19(g) controls, so this court must follow the principle set forth in Illinois Graphics. Moreover, Home Depot is not seeking to apply its credit against future payments, but against the payment of benefits to which Patel was previously entitled. Home Depot paid TTD benefits for a certain time period, but refused to pay those benefits for an additional time period for which Patel was entitled to receive them, resulting in the arbitrator's award of TTD benefits. The fact that Home Depot inadvertently overpaid on the benefits for a certain time period is not something for which section 19(g) provides a remedy. Patel did not receive an award for future payments, merely an award for payments to which he was previously entitled. Just as Home Depot cannot seek to recover the amount of the overpayment by filing a claim under section 19(g), it cannot apply its credit for the overpayment to avoid an entry of judgment pursuant to section 19(g). Thus, Home Depot is not entitled to use the credit as an offset against the benefits awarded to Patel under section 19(g).
¶ 21 Accordingly, we affirm the circuit court's decision denying Home Depot's motion to dismiss and entering judgment in favor of Patel.
¶ 22 Affirmed.
*1294 Presiding Justice LAVIN and Justice PUCINSKI concurred in the judgment and opinion.
