[¶ 1] The representative plaintiffs in a class action, Ritter, Laber and Associates, Inc., Elizabeth Cantarme as personal representative of the estate of Eugene A. Burdick, and Russell L. Kiker, appeal from a summary judgment dismissing their claims against Koch Oil, Inc., a division of Koch Industries, Inc., (“Koch”) for conversion, unjust enrichment, and an accounting, and denying their motion to amend the complaint to allege a claim for breach of contract. We hold there are disputed issues of material fact regarding the plaintiffs’ claim for conversion, the trial court properly granted summary judgment on *637 the plaintiffs’ claim for unjust enrichment, and the court did not abuse its discretion in denying the plaintiffs’ motion to amend their complaint. We affirm in part, reverse in part, and remand for proceedings consistent with this opinion.
I
[¶ 2] This case has been before this Court previously on issues involving the trial court’s decision to certify the plaintiffs’ claims as a class action.
Ritter, Laber and Assocs., Inc. v. Koch Oil, Inc.,
[¶ 3] Koch’s oil purchases were governed by written contracts called “division orders” that set out the terms of the sale and specified the methodology for Koch to pay for the oil it purchased. Koch used two general types of division orders, a “basic” division order and a “100%” division order. Under the “basic” division order, Koch contracted directly with those who had an interest in the oil and paid them directly according to their percentage interest. Under the “100%” division order, Koch contracted with a well operator for 100% of the oil that it bought from a particular well, and the well operator held separate contracts with interest holders and paid them according to their percentage interests in the oil. The division orders authorized Koch to receive oil to the extent of its requirements and provided that the “oil run in pursuance of this division order shall become [Koch’s] property upon the delivery thereof to [Koch] or any agent designated by [Koch].” The division orders said the quantities of oil purchased would be determined by Koch’s methods of measurement and computation, including the “gauging of storage tanks using regularly compiled tank tables, the use of certified truck gauges, and the use of meters or any other reasonably accurate method of measurement and computation.” The division orders required Koch to correct the volume to a temperature of 60 Fahrenheit and to deduct from the corrected volume the full percentage of basic sediment, water, and other impurities.
[¶ 4] Koch paid the plaintiffs for oil based on hand-gauging measurements at the well, but when Koch delivered the oil for shipping or selling, Koch measured the oil by volumetric meter, which allegedly resulted in Koch selling more oil than it had obtained from the plaintiffs. The plaintiffs claim Koch had an established practice of systematically adjusting the observed hand-gauging measurements for oil taken at the well, which allowed Koch to obtain more than 750,000 barrels of oil during the relevant time period without paying the plaintiffs for that oil.
[¶ 5] The plaintiffs sued Koch for conversion, unjust enrichment; and an accounting, alleging the differences in Koch’s measurements resulted in Koch’s not paying for all the oil it had received from the plaintiffs. The plaintiffs sought lost revenues attributable to the differences in measurements. The trial court granted Koch summary judgment on the plaintiffs’ claims for conversion and for unjust enrichment. The court thereafter dismissed the plaintiffs’ request for an accounting and denied their motion to amend their complaint to allege a claim for breach of contract.
[¶6] The trial court had jurisdiction under N.D. Const, art. VI, § 8, and N.D.C.C. § 27-05-06. The plaintiffs’ ap *638 peal is timely under N.D.R.App.P. 4(a). This Court has jurisdiction under N.D. Const, art. VI, §§ 2 and 6, and N.D.C.C. § 28-27-01.
II
[¶ 7] We review this appeal under our standards for summary judgment, which is a procedure for promptly resolving an action on the merits without a trial if there are no disputed issues of material fact or inferences to be drawn from undisputed facts and if a party is entitled to judgment as a matter of law.
Bender v. Aviko,
III
[¶ 8] The plaintiffs argue the trial court erred in granting summary judgment dismissal of their claim for conversion. The court ruled “Koch did not wrongfully obtain additional goods,” because “Koch had the right to obtain all the oil that it obtained, but ... was obligated to properly measure and pay for all the oil it obtained,” and the court viewed “Koch’s alleged actions in not properly measuring and paying for the oil which Koch had lawfully obtained possession of as breach of contract but not conversion.”
[¶ 9] The plaintiffs argue claims for breach of contract and for conversion may arise from the same facts. They argue they have an enforceable property interest in the excess oil, and there are disputed factual issues about whether Koch systematically adjusted measurements of the oil without reporting the excess oil to the plaintiffs and then sold the unreported oil to third parties without paying the plaintiffs. The plaintiffs argue the contracts did not entitle Koch to wrongfully possess more oil than it reported and did not entitle Koch to wrongfully transfer the oil to third parties without remitting payment to the plaintiffs.
[¶ 10] Koch argues it never wrongfully possessed the oil, because the plaintiffs contracted with Koch to remove the oil from the plaintiffs’ wells “to the extent of [Koch’s] requirements” and any failure to pay for the oil may have been a breach of contract but was not conversion. Koch argues the law of conversion involves possession of property, and issues about payment for property are matters of contract law. Relying on
Piney Woods Country Life Sch. v. Shell Oil Co.,
[¶ 11] Conversion consists of a tortious detention or destruction of personal property, or a wrongful exercise of dominion or control over the property inconsistent with or in defiance of the rights of the owner.
Perry Center, Inc. v. Heitkamp,
[¶ 12] Our decisions have recognized that claims for conversion may arise under the same facts as claims for breach of contract.
See Finstrom v. First State Bank,
[¶ 13] In
Finstrom,
[¶ 14] In
Leach,
There can be no question under the agreement arrived at between the parties but that plaintiff acquired 3,600 shares of stock of North American Royalties which were delivered to defendant’s corporation and in turn taken, *640 possessed and sold by him, which in turn deprived the plaintiff of the right of ownership and possession of this stock and deprived him of any enjoyment or benefit therefrom.
Id. at 364.
[¶ 15] In
Hochstetler, 78
N.D. at 102,
[¶ 16] In
Golly,
[¶ 17] In
Taugher,
[¶ 18] The common thread in those eases is that claims for conversion and for breach of contract may arise from the same facts. Other courts also have recognized that claims for conversion may arise from the same facts as claims for breach of contract.
See Ansin v. River Oaks Furniture, Inc.,
[¶ 19] In
National Union Fire Ins.,
*641 “Tort obligations are in general obligations that are imposed by law—apart from and independent of promises made and therefore apart from the manifested intention of the parties—to avoid injury to others.” W. Keeton, D. Dobbs, R. Keeton & D. Owen, Prosser and Keeton On the Law of Torts § 92 at 655 (5th Ed. 1984).... If the defendant’s conduct—such as negligently burning down a house—would give rise to liability independent of the fact that a contract exists between the parties, the plaintiffs claim may also sound in tort. Conversely, if the defendant’s conduct—such as failing to publish an advertisement— would give rise to liability only because it breaches the parties’ agreement, the plaintiffs claim ordinarily sounds only in contract.
[¶ 20] We reject Koch’s argument that the plaintiffs’ conversion claims are simply about a mere failure to pay for the oil and are restricted to a breach of contract claim. There is conflicting evidence about whether Koch systematically adjusted the measurements of oil taken at the wells, which resulted in Koch’s obtaining more than 750,000 barrels of oil from the plaintiffs without reporting that oil to them and without paying them. Although Koch may have been entitled to initially take the oil, the gist of conversion is not the acquisition of the property but the wrongful deprivation of that property.
John Deere Co.,
[¶ 21] Koch’s reliance on
Piney
Woods is misplaced. The primary issue in
Piney Woods
was contract interpretation, i.e., the meaning of “market value” and “sold at the wells” in a royalty clause and the propriety of deducting processing costs from the lessors’ royalties.
Piney Woods,
[¶ 22] Under this Court’s summary judgment standard of review, we conclude there are disputed issues of fact about whether Koch took possession of more oil than it reported to the plaintiffs and whether the plaintiffs are entitled to the proceeds from that extra oil. We conclude there are disputed issues of material fact that may entitle the plaintiffs to recovery under their conversion claim, and we therefore reverse the summary judgment dismissing the plaintiffs’ conversion claim against Koch.
*642 IV
[¶ 23] The plaintiffs argue the trial court erred in granting Koch summary judgment dismissal of their claim for unjust enrichment. The trial court said unjust enrichment applied only in the absence of a contract between the parties, and concluded the contract between the parties precluded the plaintiffs’ claim for unjust enrichment against Koch.
[¶ 24] The plaintiffs concede an express contract generally precludes an unjust enrichment claim, but they assert that three exceptions to the general rule apply to this case. First, they argue the contract does not relate to the same subject matter, because the contract applies to “all liquid hydrocarbons purchased hereunder” and does not apply to the excess unreported oil that was not purchased. Second, they claim the class members not in privity with Koch lack a remedy for breach of contract. Third, they argue unjust enrichment is warranted because it is a better way to render complete justice.
[¶25] Koch argues the plaintiffs who have contracted directly with it have no unjust enrichment claim as a matter of law, because unjust enrichment applies only in the absence of a contract between the parties and there can be no implied-in-law contract when there is an express contract between the parties relative to the same subject matter.
See BTA Oil Producers, Inc. v. MDU Resources Group, Inc.,
[¶ 26] Unjust enrichment is an equitable doctrine based upon a quasi or constructive contract implied by law to prevent a person from being unjustly enriched at the expense of another.
Cavalier County Mem’l Hosp. Ass’n v. Kartes,
[¶ 27] In
Apache,
[¶ 28] In BTA
[¶ 29] Although Koch’s alleged systematic adjustments of oil measurements may support a claim for conversion based on wrongfully depriving the plaintiffs of the unreported oil and proceeds, we conclude the plaintiffs’ respective contractual relationships define their rights regarding the unreported oil and proceeds and preclude their claim for unjust enrichment. The plaintiffs with a direct contractual relationship with Koch are not entitled to recover under unjust enrichment, because there is an express contract between the parties relative to the same subject matter.
BTA,
V
[¶ 30] The plaintiffs argue the trial court erred in dismissing their re *644 quest for an accounting. The trial court concluded, because the plaintiffs’ underlying claims for conversion and unjust enrichment had been dismissed, they had no right to an accounting.
[¶ 31] Equitable jurisdiction for an accounting may be invoked when (1) there is a fiduciary relationship between the parties, accompanied by a duty on the part of the defendant to render an account, (2) there are mutual accounts, or, if the account is all on one side, the account is complicated, and (3) there is a need for discovery.
Stuber v. Taylor,
[¶ 32] Because we reverse the dismissal of plaintiffs’ conversion claim against Koch, we conclude there is an equitable basis for an accounting. We therefore reverse the trial court’s dismissal of the plaintiffs’ request for an accounting.
VI
[¶ 33] The plaintiffs argue the trial court abused its discretion in denying their motion to amend the complaint to include a claim for breach of contract, because the court did not find Koch would be prejudiced by an amendment, Koch included contract defenses in its answer, and the plaintiffs had previously declined to assert a contract claim because of strategic concerns. Koch responds the trial court did not abuse its discretion in denying the plaintiffs’ motion to amend their complaint, because the proposed amendment was omitted from the original complaint for strategic or tactical reasons, the plaintiffs’ motion was untimely, and the amendment would have prejudiced both the trial court and Koch by requiring reconsideration of the class certification issues.
[1134] Rule 15(a), N.D.R.Civ. P., permits amendments to pleadings and authorizes a trial court to freely grant amendments when justice requires. We will not reverse a trial court’s decision to grant or deny an amendment to pleadings, absent an abuse of discretion.
Messiha v. State,
[¶ 35] Under the circumstances of this case, including the plaintiffs’ failure to initially bring a breach of contract claim for tactical reasons and the ramifications on the class certification, we conclude the trial court did not abuse its discretion in denying the plaintiffs’ motion to amend their complaint to include a claim for breach of contract.
VII
[¶ 36] We affirm the dismissal of the plaintiffs’ claim for unjust enrichment and the denial of the plaintiffs’ motion to amend their complaint, and we reverse the dismissal of the plaintiffs’ claims for conversion and an accounting, and remand for proceedings consistent with this opinion.
