
    WAUSAU DEVELOPMENT CORPORATION v. NATURAL GAS & OIL, INC.
    1120614.
    Supreme Court of Alabama.
    Nov. 22, 2013.
    
      Eric A. Tiebauer, Jr., of the Tiebauer Law Offices, LLC, Waynesboro, Mississippi, for appellant.
    H. Gregory Pearson and Charles E. Harrison of Junkin, Pearson, Harrison, Junkin & Pate, LLC, Tuscaloosa, for ap-pellee.
   PARKER, Justice.

Wausau Development Corporation (‘WDC”) appeals a judgment entered by the Lamar Circuit Court (“the circuit court”) in favor of Natural Gas & Oil, Inc. (“NGO”). We reverse the circuit court’s judgment.

Facts and Procedural History

On March 19, 2012, NGO filed a complaint seeking a judgment determining the validity of certain oil and gas leases held by WDC to particular wells located in Lamar County (“the wells”). NGO alleged that WDC was a Mississippi corporation with a principal office located in Mississippi and that WDC was not authorized to conduct business in Alabama because WDC was not registered as a foreign entity as required by § 10A-1-7.01, Ala.Code 1975. NGO also alleged that WDC had obtained leases to the wells but that, by their terms, WDC’s leases had expired and had not been held open by production. NGO further alleged that it had obtained new and current leases on the wells.

On April 30, 2012, WDC filed a motion for a more definite statement pursuant to Rule 12(e), Ala. R. Civ. P, and a motion to dismiss for failure to join an indispensable party pursuant to Rule 12(b)(7), Ala. R. Civ. P. On May 31, 2012, the circuit court held a hearing on WDC’s motions. On June 4, 2012, the circuit court issued an order noting that WDC’s motion for a more definite statement had been withdrawn and an order denying WDC’s motion to dismiss.

On June 19, 2012, WDC filed an answer and counterclaims against NGO. WDC admitted that it was a Mississippi corporation and that it was not authorized to conduct business in Alabama. However, WDC denied NGO’s allegation that WDC did not possess valid leases to the wells and that NGO did hold valid leases to the wells. WDC also expressly reserved the right to amend its answer and to raise additional defenses as discovery proceeded. WDC also asserted three counterclaims against NGO: breach of contract, slander of title, and unjust enrichment.

On July 10, 2012, NGO filed a motion to dismiss the counterclaims for failure to state a claim upon which relief could be granted pursuant to Rule 12(b)(6), Ala. R. Civ. P; the circuit court denied the motion on the same day.

On July 16, 2012, NGO filed a motion for a judgment on the pleadings as to the three counterclaims asserted by WDC. On August 6, 2012, WDC filed a response to NGO’s motion, requesting that NGO’s motion be struck pursuant to Rule 12(g), Ala. R. Civ. P., as attempting to assert arguments not made in the original Rule 12 motion. On August 10, 2012, the circuit court held a hearing on NGO’s motion for a judgment on the pleadings.

On September 17, 2012, the circuit court entered an order, which states, in pertinent part:

“[NGO] alleges in paragraph three of the complaint that [WDC] is not authorized to do business in Alabama. In its answer [WDC] admits that it is not qualified to do business and did not dispute this claim when [NGO] made the same allegation in its motion for a judgment on the pleadings. A business not qualified to do business in this state may not use its courts to enforce contracts or agreements. Sanjay, Inc. v. Duncan Constr. Co., 445 So.2d 876 (Ala.1983). See, Ala.Code 1975, [§ ] 10A[-2]~ 15.02[ (a) ]. Accordingly, [NGO’s] motion for a judgment on the. pleadings is granted.
“IT IS ORDERED ADJUDGED AND DECREED as follows:
“1. That a judgment is entered in favor of [NGO] and against [WDC] on all claims [and] counterclaims .... ”

(Capitalization in original.) The circuit court’s order also determined that the leases obtained by WDC to the wells were void, divested WDC of any and all interest in the leases, and declared NGO’s leases to be valid and current.

The circuit court’s judgment in favor of NGO relied upon Alabama’s “door-closing” statute, § 10A-2-15.02(a), Ala.Code 1975, which states:

“(a) A foreign corporation transacting business in this state without registering as required under Section 10A-1-7.01 or without complying with Chapter 14A of Title 40 may not maintain a proceeding in this state without so registering and complying. All contracts or agreements made or entered into in this state by foreign corporations prior to registering to transact business in this state shall be held void at the action of the foreign corporation or by any person claiming through or under the foreign corporation by virtue of the contract or agreement; but nothing in this section shall abrogate the equitable rule that he or she who seeks equity must do equity.”

The door-closing statute is a capacity defense that must be raised by a party that has been sued by a foreign corporation that has not registered with the State of Alabama pursuant to § 10A-1-7.01. See Penick v. Most Worshipful Prince Hall Grand Lodge F & AM of Alabama, Inc., 46 So.3d 416, 425 (Ala.2010) (“A foreign corporation’s failure to obtain authorization to do business in Alabama is a capacity defense and does not per se implicate standing and subject-matter jurisdiction.”). However, the capacity defense afforded defendants by the door-closing statute is not applicable to actions by foreign entities that involve interstate commerce “because ‘businesses engaged in interstate commerce are protected by the commerce clause in the United States Constitution, U.S. Const., Art. I, § 8, cl. 3, and are therefore immune from the effects of the “door closing” statutes.’ ” TradeWinds Envtl. Restoration, Inc. v. Brown Bros. Constr., L.L.C., 999 So.2d 875, 879 (Ala. 2008) (quoting Stewart Mach. & Eng’g Co. v. Checkers Drive In Rests, of North America, Inc., 575 So.2d 1072, 1074 (Ala. 1991)).

On October 15, 2012, WDC filed a post-judgment motion pursuant to Rule 59(e), Ala. R. Civ. P., to alter, amend, or vacate the circuit court’s September 17, 2012, judgment. Consistent with this Court’s holding in Stewart and TradeWinds, WDC argued, among other things, that the circuit court’s judgment violated the Commerce Clause of the United States Constitution because this case involves “an article of commerce which is wholly interstate in nature.” On January 14, 2013, WDC’s postjudgment motion was denied by operation of law pursuant to Rule 59.1, Ala. R. Civ. P. WDC appeals.

Standard of Review

‘“When a motion for judgment on the pleadings is made by a party, “the trial court reviews the pleadings filed in the case and, if the pleadings show that no genuine issue of material fact is presented, the trial court will enter a judgment for the party entitled to a judgment according to the law.” B.K.W. Enters., Inc. v. Tractor & Equip. Co., 603 So.2d 989, 991 (Ala.1992). See also Deaton, Inc. v. Monroe, 762 So.2d 840 (Ala.2000). A judgment on the pleadings is subject to a de novo review. Harden v. Ritter, 710 So.2d 1254, 1255 (Ala.Civ.App.1997). A court reviewing a judgment on the pleadings accepts the facts stated in the complaint as true and views them in the light most favorable to the nonmoving party. Id. at 1255-56. If matters outside the pleadings are presented to and considered by the trial court, then the motion for a judgment on the pleadings must be treated as a motion for a summary judgment. See Rule 12(c), Ala. R. Civ. P. Otherwise, in deciding a motion for a judgment on the pleadings, the trial court is bound by the pleadings. See Stockman v. Echlin, Inc., 604 So.2d 393, 394 (Ala.1992).’”

Medlock v. Safeway Ins. Co. of Alabama, 15 So.3d 501, 507 (Ala.2009) (quoting Universal Underwriters Ins. Co. v. Thompson, 776 So.2d 81, 82-83 (Ala.2000)). Here, no evidence was presented to the circuit court. Therefore, this Court conducts a de novo review, looking only to the pleadings to determine whether the circuit court erred in entering a judgment in favor of NGO.

Discussion

WDC argues that the circuit court exceeded its discretion by granting NGO’s motion for a judgment on the pleadings because, it says, the undisputed facts in the pleadings do not support the circuit court’s judgment as a matter of law. We agree.

The circuit court based its judgment on the door-closing statute because WDC was not authorized to conduct business in Alabama. In its October 15, 2012, post-judgment motion, WDC argued that the circuit court’s judgment was in contravention of the Commerce Clause of the United States Constitution because WDC’s business activities in Alabama involved interstate commerce. In TradeWinds, supra, this Court explained the interstate-commerce exception to the door-closing statute:

“ ‘A foreign corporation that has not been authorized to do business in Alabama is not barred from enforcing its contracts in the courts of this state, however, “unless the business conducted here by [the] nonqualified corporation! ] is considered ‘intrastate’ in nature.” ’ Building Maintenance Pers., Inc. v. International Shipbuilding, Inc., 621 So.2d 1303, 1304 (Ala.1993) (quoting Wise v. Grumman Credit Corp., 603 So.2d 952, 953 (Ala.1992)). This is because ‘businesses engaged in interstate commerce are protected by the commerce clause in the United States Constitution, U.S. Const., Art. I, § 8, cl. 3, and are therefore immune from the effects of the “door closing” statutes.’ Stewart Mach. & Eng’g Co. v. Checkers Drive In Rests, of N. America, Inc., 575 So.2d 1072,1074 (Ala.1991).”

999 So.2d at 878-79. WDC’s post-judgment motion was denied by operation of law pursuant to Rule 59.1, Ala. R. Civ. P.; therefore, its argument regarding the Commerce Clause exception to § 10Á-2-15.02(a) was not considered by the circuit court. Barter v. Burton Garland Revocable Trust, 124 So.3d 152, 156 (Ala.Civ.App. 2013) (“In the present case, the trial court permitted the postjudgment motion to be denied by operation of law, which indicates that the trial court did not consider the ... arguments [contained in the post-judgment motion]. See, generally, Espinoza v. Rudolph, 46 So.3d 403, 416 (Ala. 2010) (indicating that an appellate court will not presume that a trial court considered the merits of an untimely asserted legal argument absent an indication that it did so).”).

NGO argues on appeal that WDC “waived the affirmative defense of [the] interstate commerce exception” to the door-closing statute because that defense was not pleaded by WDC. NGO’s brief, at p. 19. However, NGO mischarac-terizes the burden-shifting process in applying the door-closing statute. The interstate-commerce exception to the door-closing statute is not an affirmative defense; rather, it is an exception to the affirmative defense of lack of capacity under the door-closing statute, which must be pleaded by the party alleging a lack of capacity. As this Court stated in Penick, 46 So.3d at 425-26:

“A foreign corporation’s failure to obtain authorization to do business in Alabama is a capacity defense and does not per se implicate standing and subject-matter jurisdiction. Archer Western Contractors, Ltd. v. Benise-Dowling & Assocs., Inc., 33 So.3d 1216, 1219 n. 4 (Ala.2009) (‘[Section 10A-2-15.02(a) ], Ala.Code 1975, does not preclude the courts of this state from exercising jurisdiction over actions brought by unauthorized foreign entities transacting business in Alabama for the purpose of enforcing their contracts.’); Moseley v. Commercial State Bank, 457 So.2d 967 (Ala.1984) (holding that a foreign corporation’s lack of authorization to do business in Alabama is a capacity defense that is waived unless timely asserted by specific negative averment); cf. [State v. Property at 2018 ] Rainbow Drive, 740 So.2d [1025] at 1028 [(Ala.1999)] (‘ “Standing represents a jurisdictional requirement which remains open to review at all stages of the litigation.”’ (quoting National Org. for Women, Inc. v. Scheidler, 510 U.S. 249, 255, 114 S.Ct. 798, 127 L.Ed.2d 99 (1994))); Ex parte Smith, 438 So.2d 766, 768 (Ala.1983) (‘Lack of subject matter jurisdiction may not be waived by the parties....’); and .Mobile, Alabamor-P ensacóla, Florida Bldg. & Constr. Trades Council v. Williams, 346 So.2d 964, 966 (Ala.1977) (Faulkner, J., dissenting) (‘There is a difference between capacity to sue and standing to sue.’).”

Rule 9(a), Ala. R. Civ. P., requires a party desiring to challenge another party’s capacity to sue or be sued to do so through specific negative averment, as follows:

“It is not necessary to aver the capacity of a party to sue or be sued or the authority of a party to sue or be sued in a representative capacity or the legal existence of an organized association of persons that is made a party. When a party desires to raise an issue as to the legal existence of any party or the capacity of any party to sue or be sued or the authority of a party to sue or be sued in a representative capacity, the party desiring to raise the issue shall do so by specific negative averment, which shall include such supporting particulars as are peculiarly within the pleader’s knowledge.”

(Emphasis added.) Under Rule 9(a), it was not necessary for WDC to aver its capacity to bring the counterclaims against NGO. Rather, NGO, as the party desiring to raise WDC’s capacity as an issue, should have pleaded WDC’s lack of capacity as an affirmative defense to WDC’s counterclaims by making a specific negative averment as to WDC’s capacity, while including “supporting particulars,” such as WDC’s failure to obtain authorization to conduct business in Alabama. See Rule 8(c), Ala R. Civ. P. (“In pleading to a preceding pleading, a party shall set forth affirmatively ... any ... matter constituting an avoidance or affirmative defense.”); Rikard v. Lile, 622 So.2d 413, 414 (Ala.Civ. App.1993) (“The lack of capacity to sue is an affirmative defense which must be specifically pled.”). In the present case, NGO failed to challenge WDC’s capacity to assert its counterclaims in a way that was consistent with the Alabama Rules of Civil Procedure. Therefore, WDC had no reason to assert the interstate-commerce exception to the capacity defense based upon the door-closing statute, which NGO has not raised.

Although NGO alleges in its complaint and in its motion for a judgment on the pleadings that WDC is not authorized to conduct business in Alabama, NGO never made a “specific negative averment” regarding WDC’s capacity to bring its counterclaims as required by Rule 9(a). Rather, in its motion for a judgment on the pleadings, NGO merely noted that WDC admitted in its answer that WDC was not authorized to conduct business in Alabama and addressed the merits of WDC’s counterclaims. Likewise, during the hearing on NGO’s motion, NGO did not argue that WDC lacked capacity to bring its counterclaims, nor did NGO mention the fact that WDC was not authorized to conduct business in Alabama; as in its motion, the only arguments made by NGO during the hearing related to the merits of WDC’s counterclaims. The issue of WDC’s capacity under the door-closing statute was raised for the first time by the circuit court when it became the basis of the circuit court’s judgment against WDC.

A circuit court exceeds its discretion when it disposes of a matter based upon an affirmative defense that was not raised by the parties. In Waite v. Waite, 959 So.2d 610, 612-13 (Ala.2006), this Court quoted from the Court of Civil Appeals’ opinion in Waite v. Waite, 891 So.2d 341, 343^4 (Ala.Civ.App.2004), in which that court addressed an issue similar to the one before us today:

“ ‘The doctrines of res judicata and collateral estoppel are affirmative defenses, Rule 8(c), Ala. R. Civ. P.; Lee L. Saad Constr. Co. v. DPF Architects, P.C., 851 So.2d 507, 516 (Ala.2002), and do not affect a court’s jurisdiction to consider an action. Affirmative defenses may be waived if they are not pleaded by a party against whom a claim is asserted. Rule 8(c), Ala. R. Civ. P.; Bechtel v. Crown Cent. Petroleum Corp., 451 So.2d 793 (Ala.1984) (citing 2A J. Moore, Federal Practice § 8.27[3] at 8-251 (2d ed. 1948)). By its actions in the present case, the trial court, in essence, asserted the affirmative defenses of the doctrines of res judicata and collateral estoppel on behalf of the defendants and dismissed the matter based on those affirmative defenses.
“ ‘After careful consideration, we find most persuasive the reasoning of the courts that have held that, although a trial court may dismiss an action on its own motion on a jurisdictional basis, affirmative defenses ... are not jurisdictional bases upon which a court may base a sua sponte dismissal. See Lease Partners Corp. v. R & J Pharmacies, Inc., [329 Ill.App.3d 69, 768 N.E.2d 54, 263 ULDec. 294 (2002) ]; Adams v. In-man, [892 S.W.2d 651 (Mo.Ct.App. 1994) ].’”

As in Waite, the circuit court in the present case entered a judgment in favor of NGO based upon an affirmative defense that the court asserted sua sponte on behalf of NGO. In doing so, the circuit court exceeded its discretion and denied WDC an opportunity to raise the interstate-commerce exception to the affirmative defense based upon the door-closing statute. Accordingly, the circuit court’s judgment is due to be reversed.

Conclusion

Based on the foregoing, we reverse the circuit court’s judgment and remand the case for further proceedings.

REVERSED AND REMANDED.

MOORE, C.J., and STUART, SHAW, and WISE, JJ., concur. 
      
      . For the reasons explained below, an allegation that a foreign entity is not authorized to conduct business in Alabama because it is not registered with the State of Alabama as required by § 10A-1-7.01 is not an averment that the foreign entity lacks capacity under Alabama’s "door-closing" statute, § 10A-2-15.02(a), Ala.Code 1975. Section 10A-2-15.02(a) was repealed effective January 1, 2014; however, the substance of § 10A-2-15.02(a) can be found in § 10A-l-7.21(a).
      Section 10A-1-7.01, Ala.Code 1975, provides:
      “(a) To transact business in this state, a foreign entity must register under this chapter if the entity:
      "(1) is a foreign entity, the formation of which, if formed in this state, would require the filing under Article 3 of a certificate of formation; or
      "(2) affords limited liability under the law of its jurisdiction of formation for any owner or member.
      "(b) A foreign entity described by subsection (a) must maintain the entity’s registration while transacting business in this state."
     
      
      . Section § 10A-2-15.02(a) was repealed effective January 1, 2014. See supra note 1.
     
      
      . Because NGO did not raise as a defense WDC’s capacity under the door-closing statute, we pretermit discussion of the applicability of the interstate-commerce exception to the present case.
     