
274 Kan. 74 (2002)
49 P.3d 432
PLAINS PETROLEUM COMPANY and PLAINS PETROLEUM OPERATING COMPANY, Plaintiffs,
v.
FIRST NATIONAL BANK IN LAMAR, et al., Defendants.
AMOCO PRODUCTION COMPANY, Plaintiff/Appellant/Cross-appellee,
v.
VINCENT YOUNGREN, JR., et al., Defendants/Appellees/Cross-appellants.
OXY USA INC., Plaintiff/Appellant/Cross-appellee,
v.
OPAL LITTELL, et al., Defendants/Appellees/Cross-appellants.
GILBERT H. COULTER, et al., Counterclaim Defendant/Appellee,
v.
ANADARKO PETROLEUM CORPORATION, Counterclaim Plaintiff/Appellant.
No. 86,614.
Supreme Court of Kansas.
Opinion filed July 12, 2002.
Steven D. Gough, of Powell, Brewer, Gough & Withers L.L.P., of Wichita, argued the cause, and Donald L. Peterson, of the same firm, and James A. Gillespie, of Houston, Texas, were with him on the briefs for appellant/cross-appellee Amoco Production Company.
Donald L. Kahl, of Hall, Estill, Hardwick, Gable, Golden & Nelson, P.C., of Tulsa, Oklahoma, argued the cause, and James C. T. Hardwick, T. Lane Wilson, and John F. Heil, of the same firm, and Kerry McQueen, of Sharp, McQueen, *75 McKinley, Dreiling & Tate, P.A., of Liberal, were with him on the briefs for appellant/cross-appellee Oxy USA Inc.
David E. Bengtson and Amy M. Decker, of Morrison & Hecker, L.L.P., of Wichita, were on the briefs for appellant/cross-appellee Anadarko Petroleum Corporation.
William Scott Hesse, assistant attorney general, argued the cause, and John M. Cassidy, assistant attorney general, was with him on the brief for the appellee/ cross-appellant State of Kansas.
David G. Seely, of Fleeson, Gooing, Coulson & Kitch, L.L.C., of Wichita, argued the cause, and Gregory J. Stucky and David G. Seely, of the same firm, and Bernard E. Nordling and Erick E. Nordling, of Kramer, Nordling & Nordling, L.L.C., of Hugoton, were with him on the briefs for appellees/cross-appellants, Vincent Youngren, Jr., et al., Gilbert H. Coulter, et al., and Opal Littell, et al.
John McNish, advisory counsel, J. Michael Peters, assistant general counsel, and Susan B. Cunningham, general counsel, of Topeka, were on the brief for amicus curiae Kansas Corporation Commission.
The opinion of the court was delivered by
LARSON, J.:
This complex litigation raises the question of when plaintiffs'/gas producers'/lessees' causes of actions for unjust enrichment, restitution, money judgment, and setoff arose in order to determine whether a valid defense of the statute of limitations bars their attempts to recover ad valorem taxes, plus interest, which were paid from 1983 to 1988 by the producers on behalf of their royalty owners. The constitutionality of K.S.A. 2001 Supp. 55-1624 is also challenged.
While we resolve and dismiss these appeals as not being from a final judgment, we first set forth a brief summary of the claims and the proceedings below which give rise to the issues before us.
Plains Petroleum Company (Plains), Amoco Production Company (Amoco), Oxy USA, Inc. (Oxy), and Anadarko Petroleum Corporation (Anadarko) are producers of natural gas in the Hugoton Field in southwest Kansas. Each producer's petition asserts claims against royalty owners on the leases they operate. The producers' petitions name several individual royalty owners but contend those owners properly represent a class of 14,000 to 15,000 royalty owners as to Oxy's leases, with Amoco and Anadarko not estimating *76 any class numbers, but all contend the facts alleged justify class certification pursuant to K.S.A. 2001 Supp. 60-223.
Highly summarized, the basis for the producers' causes of action is that from 1983 through 1988 producers paid the Kansas ad valorem taxes on behalf of the royalty owners and passed such amounts on to the pipeline companies as a part of the price of natural gas which was contended could lawfully be charged. After years of hearings before the Federal Power Commission, which later became the Federal Energy Regulatory Commission, changes in the Natural Gas Policy Act, 15 U.S.C. § 3301 et seq. (1988) (repealed eff. Jan. 1, 1993), and decisions of various federal district and circuit courts, it was ultimately determined in Public Service Co. of Colorado v. F.E.R.C., 91 F.3d. 1478 (D.C. Cir. 1996), cert. denied 520 U.S. 1224 (1997), that Kansas ad valorem taxes were not a severance or production tax within the meaning of § 110 of the Natural Gas Policy Act (15 U.S.C. § 3320) and that producers must refund all Kansas ad valorem taxes collected since the date when all interested parties were first put on notice that the taxes might not be recoverable. 91 F.3d at 1481.
The claims for relief of the producers are basically for unjust enrichment, plus a declaration that the producers' right for monetary recovery and right of setoff are not barred by any Kansas general statute of limitations or by K.S.A. 2001 Supp. 55-1624 and, in the alternative, that such statute is unconstitutional.
The various royalty owners answered, alleging multiple defenses including (1) failure to state a claim upon which relief can be granted, (2) estoppel, quasi estoppel, and waiver, (3) all claims were barred by the applicable statutes of limitations (see K.S.A. 2001 Supp. 55-1624; K.S.A. 60-511; K.S.A. 60-512; K.S.A. 2001 Supp. 60-513), including laches or other principles of law or equity, (4) that a putative defendant class was not maintainable under K.S.A. 2001 Supp. 60-223, (5) the producers have not made irretrievable payment of refunds on behalf of royalty owners, (6) the producers' payments were voluntary, (7) payments were due to mistake of law, (8) recovery cannot be asserted because the Federal Energy Regulatory Commission cannot lawfully compel payment by royalty owners, (9) maintenance of a class would violate constitutional *77 requirements, (10) the producers have made no overpayment of royalties or overriding royalties that relate to a unit of production which is a characteristic of a royalty or overriding royalty payment, and for such additional defenses suggested by discovery or subsequent proceedings.
The cases before us on appeal were consolidated and transferred to Stevens County District Court, pursuant to K.S.A. 60-242(c) and Kansas Supreme Court Rule 146 (2001 Kan. Ct. R. Annot. 198).
Just prior to oral argument, Plains settled with all necessary parties. Both Plains and its royalty owner defendants have been dismissed without prejudice to the claims of the remaining parties.
The trial court in its first case management/discovery planning order dated April 17, 2000, substantially adopted a proposed order submitted by Amoco with certain clarifications. The order stated in applicable part:
"On or before May 26th, 2000, all parties herein shall file their motion for summary judgment, motion for partial summary judgment, or motion to dismiss upon only two issues, that being the applicability of the general statute of limitations to the claims of the Plaintiffs and Counter-Petitioner Anadarko Petroleum Corp. and upon the issue of the constitutionality of K.S.A. 55-1624.
"Any responses to those motions shall be filed on or before June 30th, 2000.
"The motions of summary judgment, partial summary judgment, or motion to dismiss upon the issues of applicability of the general statute of limitations upon the claims herein and upon the constitutionality of K.S.A. 55-1624 shall be heard upon oral argument on July 24th, 2000, commencing at 9:00 a.m.
"The Court is making this clarification so that there is no misunderstanding that dispositive motions upon other issues or other grounds need not be filed pursuant to the dates set forth herein, nor will any other dispositive motions be heard upon oral argument on July 24th, 2000, commencing at 9:00 a.m."
Summary judgment motions and or motions to dismiss were submitted with attached briefs. Oral arguments were held. On January 23, 2001, the trial court entered an 18-page decision in which it held the statute of limitations against all of the producers' claims against royalty owners commenced running on December 1, 1993. The producers' claims that were instituted on August 2, 1999, were held to be time barred.
The trial court further stated:

*78 "Although this Court has already decided that the applicable statute of limitations to all Plaintiffs' claims commenced on December 1, 1996 [sic], there are two additional matters that have been raised within the Motions for Summary Judgment by either the Plaintiffs or the Defendants in this proceeding and this Court, recognizing the necessity of an appellate decision, feels it is incumbent upon this Court to decide all matters before it at this time.
"The Defendants in their Motions to Dismiss or their Motions for Summary Judgment have raised an issue of equity as a defense to the Plaintiffs' claims of unjust enrichment."
The trial court then went on to state and hold:
"The Defendants have contended that there is an inherent unfairness in allowing the Plaintiffs to proceed upon claims that arose between 10 and 15 years ago.
"This Court has considered those Defendants' arguments and finds there is a basis of support for them.
"The equitable right of restitution from one unjustly enriched is terminated if circumstances have so changed that it would be inequitable to require restitution. See Restatement, RESTITUTION, Sections 69, 142.
"A change of circumstances is a defense to a claim of unjust enrichment if the conduct of the recipient of the benefit was not tortious and the recipient was no more at fault for his receipt or retention of the benefits than was the claimant. Restatement, RESTITUTION, Section 69 (2) and 142 (2).
"Any change of circumstances which would cause the recipient a loss, if the claimant were to obtain restitution, is such a change of circumstance which would prevent restitution if the recipient was not guilty of a tort or substantially more at fault than the claimant. Restatement, RESTITUTION, Section 142. In this case, this Court is well aware that there has been a substantial change in circumstances which, in this Court's opinion, would disallow the Plaintiffs' claim for unjust enrichment on an equitable basis.
"First of all, all of these facts of the instant case took place during a time when the United States Government regulated the production, transmission and sale of natural gas.
"The royalty owner Defendants had no input into the various Federal Power Commission or Federal Energy Regulatory Commission decisions which impacted the Plaintiffs in this case and allowed or caused them to pay ad valorem taxes on behalf of the Defendant royalty owners.
"Two things are clear to this Court. First, deregulation of natural gas sales has had a tremendous impact upon both the producers and the royalty owners in this lawsuit. Secondly, the royalty owners had less control over the payment of ad valorem taxes than did the Plaintiffs in this proceeding.
"On this basis alone, this Court would find the Plaintiffs' claims should be dismissed.
"The last issue to be decided by this Court is the constitutionality of K.S.A. 55-1624."
*79 The trial court further considered the provisions of K.S.A. 2001 Supp. 55-1624 and held they violated due process under § 18 of the Kansas Constitution Bill of Rights and were, therefore, unconstitutional and void.
The court finally stated:
"The Plaintiffs in their arguments upon their Motion for Summary Judgment asserted that a claim of setoff can be asserted even though the cause of action is barred by the statute of limitations. While this Court is not going to decide at this time whether or not the Plaintiffs have a right of setoff, the Court is mindful of the laws established by Waechter vs. Amoco Production Company, [217 Kan. 489], and Lightcap vs. Mobil Oil Corporation, [221 Kan. 448], in which the law is well settled that a setoff is only applicable when a claim is barred by statute of limitations if the claim coexisted at some time with the Plaintiffs' claim and arises out of the contract or transaction on which the Plaintiffs' claim is based. (Emphasis added.)
"IT IS, THEREFORE, the ORDER, JUDGMENT and DECREE of this Court that the Motions for Summary Judgment upon the issue of the statute of limitations of the Plaintiffs shall be and are hereby denied.
"IT IS THE ORDER, JUDGMENT and DECREE of this Court that upon the Plaintiffs' claim of unconstitutionality of K.S.A. 55-1624, Summary Judgment shall be and is hereby granted.
"IT IS, THEREFORE, the ORDER, JUDGMENT and DECREE Of this Court that upon the Motion for Summary Judgment by the Defendants upon the issue of the statute of limitations, said Motion is granted on behalf of all Defendants against all Plaintiffs, the Court having specifically found that the commencement of the statute of limitations for the cause of action of unjust enrichment by the Plaintiffs commenced on December 1, 1993, and, therefore, judgment is rendered in favor of all Defendants and against all Plaintiffs.
"This decision is the final order and decision of this Court without the necessity of any further journal entries or orders of any nature.
"It is the further decision of this Court that this order is final and appealable at this time."
All of the parties to the case appealed or cross-appealed from the trial court's rulings.
The Producers (Amoco, Oxy, and Anadarko) couched their appeals slightly differently but essentially contend the trial court erred in ruling that (1) their claims for unjust enrichment, restitution, or recoupment were barred by the applicable statute of limitations (K.S.A. 60-512) and in finding the claims accrued earlier than August 2, 1996, (2) it was reversible error to consider and rule *80 on the equitable defense of "change in circumstances" when the trial court had earlier issued an order that the only two issues to be briefed on summary judgment were the constitutionality of K.S.A. 2001 Supp. 55-1624 and whether the statute of limitations had run on the producers' claims, and (3) in Lightcap vs. Mobil Oil Corporation, 221 Kan. 448, Syl. ¶¶ 8, 9, 562 P.2d 1, cert. denied 434 U.S. 876 (1977), reh. denied 440 U.S. 931 (1979) and Waechter v. Amoco Production Company, 217 Kan. 489, Syl. ¶¶ 3, 4, 537 P.2d 228 (1975), it is well settled that a setoff is only applicable when a claim is barred by a statute of limitations if the claim coexisted at some time with the Plaintiffs' claims and arises out of the contract or transaction on which the Plaintiffs' claims are based.
The royalty ownersVincent Youngren, Jr., and Robert Larabee in the Amoco case, Opal Littell, et al., in the Oxy case, and Gilbert H. Coulter and Elizabeth Leighor in the Anadarko caseargue in their joint cross-appeal that (1) the trial court addressed an unnecessary constitutional question by considering the constitutionality of K.S.A. 2001 Supp. 55-1624, and (2) the trial court erred in holding that 55-1624 was unconstitutional.
Each of the producers in its docketing statement answered affirmatively the question whether the order appealed from was a final order. Each indicated that invocation of the provisions of K.S.A. 2001 Supp. 60-254(b) was "not applicable." Finally, in response to the question relating to statutory authority for appeal, each producer responded that the specific authority for its direct appeal was K.S.A. 60-2101(b), "an appeal from a final judgment of a district court in [a] civil action in which a statute of this state ... has been held unconstitutional."
Despite the above answers in the docketing statements of the producers, an examination of page 17 of the journal entry of decision by the trial court dated January 23, 2001, immediately raises the question of whether the decision of the trial court was a "final order" which is appealable. As previously set forth, the trial court's opinion specifically stated that the producers alleged "that a claim of setoff can be asserted even though the cause of action is barred by the statute of limitations." The trial court then appears to acknowledge *81 that there was at least one additional legal issue which remained to be resolved in the case, by stating:

"While this Court is not going to decide at this time whether or not the Plaintiffs have a right of setoff, the Court is mindful of the laws established by Waechter vs. Amoco Production Company, supra, and Lightcap vs. Mobil Oil Corporation, supra, in which the law is well settled that a setoff is only applicable when a claim is barred by statute of limitations if the claim coexisted at some time with the Plaintiffs' claim and arises out of the contract or transaction on which the Plaintiffs' claim is based." (Emphasis added.)
Our concern that the decision we are asked to review was not one which finally resolved all of the issues in the case was strengthened when at oral argument counsel for the royalty owners admitted the recoupment and right to setoff issues remained and even if the statute of limitations had run the right of the producers to recover was still in issue.
Although none of the parties to this appeal have raised the question of jurisdiction, this is always an issue which we have the duty to question on our own motion. As Justice Lockett, speaking for a unanimous court in McDonald v. Hannigan, 262 Kan. 156, 160, 936 P.2d 262 (1997), clearly stated:
"The right to appeal is entirely statutory and not a right contained in the United States or Kansas Constitutions; ... Kansas appellate courts have jurisdiction to entertain an appeal only if the appeal is taken within the time limitations and in the manner prescribed by the applicable statutes. Jones v. Continental Can Co., 260 Kan. 547, Syl. ¶ 1, 920 P.2d 939 (1996). An appellate court has the duty of questioning jurisdiction on its own motion. If the record discloses a lack of jurisdiction, the appeal must be dismissed. Snodgrass v. State Farm Mut. Auto. Ins., Co., 246 Kan. 371, 373, 789 P.2d 211 (1990)." (Emphasis added.)
The apparent basis for jurisdiction for this appeal is K.S.A. 60-2101(b), which provides in part: "An appeal from a final judgment of a district court in any civil action in which a statute of this state or the United States has been held unconstitutional shall be taken directly to the supreme court." It must be noted that this statutory provision specifically requires that the order appealed from must be a "final judgment."
Directly on point as to the question of jurisdiction we face is our recent opinion of State ex rel. Board of Healing Arts v. Beyrle, 262 *82 Kan. 507, 941 P.2d 371 (1997), where the trial court found K.S.A. 65-2872a unconstitutional based on a motion for partial judgment on the pleadings but reserved judgment on the question of whether Beyrle, a naturopath, had unlawfully prescribed drugs or exceeded his statutory authority. The trial court stated that it granted Beyrle's motion for permission to take an interlocutory appeal, but no K.S.A. 60-2102(b) finding that "an immediate appeal ... may materially advance the ultimate termination of the litigation" was made. Nor did Beyrle comply with Supreme Court Rule 4.01 (2001 Kan. Ct. R. Annot. 28) to obtain permission from the Court of Appeals to accept an interlocutory appeal.
After stating in Beyrle that issues remained for later determination, we pointed to K.S.A. 60-254(a) as defining a judgment as "the final determination of the rights of the parties in an action." 262 Kan. at 509. We proceeded to state:
"In Honeycutt v. City of Wichita, 251 Kan. 451, 836 P.2d 1128 (1992), we quoted from Gulf Ins. Co v. Bovee, 217 Kan. 586, 587, 538 P.2d 724 (1975):
"No definition of `final decision' is contained in the statute but this court has previously construed it to mean, `one which finally decides and disposes of the entire merits of the controversy, and reserves no further questions or directions for the future or further action of the court.' [Citations omitted.]"

"Honeycutt cites 6 Vernon's Kansas C. Civ. Proc. § 60-2102, Author's Comments, § 2102.2 (1967) and 2 Gard's Kansas C. Civ. Proc.2d Annot. § 60-2102, Comments (1979), and states: `In Gard, the author commented that a "`final decision' ... is really self-defining. Obviously it is an order which definitely terminates a right or liability involved in the action, or which grants or refuses a remedy as a terminal act in the case.'" 251 Kan. at 457." 262 Kan. at 509-10.
Syllabus ¶ 2 in Beyrle succinctly states: "A final judgment is one which finally decides and disposes of the entire merits of the controversy and reserves no further questions or directions for the future or further action of the court."
It is not necessary to further belabor this question, but we point to Henderson v. Hassur, 1 Kan. App.2d 103, 562 P.2d 108 (1977), for an excellent discussion of what does or does not constitute a "final decision." The issue of punitive damages was reserved there, as it was 21 years later in Wilkinson v. Shoney's Inc., 265 Kan. 141, 958 P.2d 1157 (1998), where we held that a trial court, even if it issued an order in compliance with K.S.A. 60-254(b), could not *83 render an order final, and therefore appealable, which is not in fact final. 265 Kan. at 143-44.
Another recent case with similar jurisdictional deficiencies was Gillespie v. Seymour, 263 Kan. 650, 952 P.2d 1313 (1998), where the entry of judgment expressly provided that the reasonableness of attorney fees or the share thereof of one of the litigants remained to be determined. We said:
"`Even if a section 254(b) certificate is issued, it is not binding on appeal; the trial court cannot thereby make an order final and therefore appealable, if it is not in fact final.' Elliott, Survey of Kansas Law: Civil Procedure, 27 Kan. L. Rev. 185, 194 (1979) (citing Henderson, 1 Kan. App.2d 103)." 263 Kan. at 655.
The trial court's decision and journal entry in this case that its "order is final and appealable at this time" is legally incorrect. It was not, and is not, a final order. We do not have jurisdiction over the appeals or the cross-appeals in this case.
We point to the observation from Henderson, quoted in Gillespie that "`should a future appeal be taken in this case from what is a "final decision," a motion to utilize the present record and briefs, suitably supplemented, would be favorably received.' [Henderson,] 1 Kan. App.2d at 112-13." Gillespie, 263 Kan. at 656.
Finally, we note that only the statute of limitations and the constitutionality of K.S.A. 2001 Supp. 55-1624 issues were to be considered under the trial court's first case management/discovery planning order of April 17, 2000. However, the trial court, contrary to that order, appears to have considered and ruled on an issue relating to a "changed circumstances" defense of the royalty owners without allowing any of the parties to be heard and provide legal authorities on the issue. That issue must be heard anew, without consideration of the previous ruling and without prejudice to any party.
The appeals and cross-appeals are dismissed.
DAVIS, J., not participating.
CHRISTEL E. MARQUARDT, J., assigned.[1]
NOTES
[1]  REPORTER'S NOTE: Judge Marquardt, of the Kansas Court of Appeals, was appointed to hear case No. 86,614 vice Justice Davis pursuant to the authority vested in the Supreme Court by K.S.A. 20-3002(c).
