
76 Cal.Rptr.3d 396 (2008)
162 Cal.App.4th 950
PROFIT CONCEPTS MANAGEMENT, INC., Plaintiff and Appellant,
v.
Greg GRIFFITH, Defendant and Respondent.
No. G039077.
Court of Appeal of California, Fourth District, Division Three.
May 5, 2008.
*397 Law Offices of Paul A. Brennan and Paul A. Brennan, San Juan Capistrano, for Plaintiff and Appellant.
Law Offices of Mark Schondorf and Mark Schondorf, Los Angeles, for Defendant and Respondent.

OPINION
FYBEL, J.

Introduction
A California-based company sued its former employee, an Oklahoma resident, for breach of contract; the lawsuit was filed in the Orange County Superior Court. The employment contract at issue provided that in any litigation involving the contract, the prevailing party would be entitled to recover attorney fees and costs.
The former employee filed a motion to quash service for lack of personal jurisdiction. The company filed a notice of nonopposition, and the motion was granted. The former employee then requested and was awarded attorney fees as the prevailing party. . The company appealed; we affirm.
We hold, because the trial court granted the motion to quash service for lack of personal jurisdiction, the former employee was the party prevailing on the contract under Civil Code section 1717. He was therefore entitled to recover his reasonable attorney fees as costs. The complaint was dismissed in its entirety and the company obtained nothing.

Statement of Facts and Procedural History
On January 4, 2007, Profit Concepts Management, Inc. (Profit Concepts), sued Greg Griffith, a former employee, for breach of contract, misappropriation of trade secrets, and for an injunction. The complaint alleged Griffith was a resident of Oklahoma. The complaint also alleged Profit Concepts and Griffith had entered into a written employment contract on July 1, 2001; a copy of the contract was attached to the complaint. The contract included the following language: "If the *398 damaged party is successful in any legal proceedings it starts to enforce any part of this Agreement, or because of a party's violation of any part of this Agreement, all parties agree[ ] that the successful litigant will be entitled to recover reasonable attorney's fees and cost[s] which it incurs."
Griffith moved to quash service of summons for lack of personal jurisdiction. Profit Concepts filed a notice of nonopposition to the motion to quash, and the trial court granted the motion.
Griffith then moved for a determination that he was the prevailing party, and for attorney fees and costs; Profit Concepts filed an opposition. After a hearing, the trial court granted Griffith's motion, concluding he "was [the] prevailing party as obtaining the greater relief on this action on the contract." On June 19, 2007, judgment was entered awarding Griffith $3,400,78 in costs, including attorney fees. Profit Concepts timely appealed.

Discussion
Profit Concepts does not dispute that Griffith is entitled to recover costs as "a defendant in whose favor a dismissal is entered." (Code Civ. Proc, § 1032, subd. (a)(4).) We therefore turn to the question whether Griffith may recover the attorney fees he incurred in defending against Profit Concepts's lawsuit as part of his recoverable costs. Attorney fees are allowable as costs under Code of Civil Procedure section 1032 when they are authorized by contract. (Code Civ. Proc., § 1033.5, subd. (a)(10)(A).) The employment contract between Profit Concepts and Griffithwhich was the basis of Profit Concepts's claim for breach of contractcontains an attorney fees provision.[1]
Civil Code section 1717 provides in relevant part: "(a) In any action on a contract, where the contract specifically provides that attorney's fees and costs, which are incurred to enforce that contract, shall be awarded either to one of the parties or to the prevailing party, then the party who is determined to be the party prevailing on the contract, whether he or she is the party specified in the contract or not, shall be entitled to reasonable attorney's fees in addition to other costs. [¶] ... [¶] (b)(1) The court, upon notice and motion by a party, shall determine who is the party prevailing on the contract for purposes of this section, whether or not the suit proceeds to final judgment. Except as provided in paragraph (2), the party prevailing on the contract shall be the party who recovered a greater relief in the action on the contract. The court may also determine that there is no party prevailing on the contract for purposes of this section, [¶] (2) Where an action has been voluntarily *399 dismissed or dismissed pursuant to a settlement of the case, there shall be no prevailing party for purposes of this section."
Code of Civil Procedure section 1032, subdivision (a)(4) states: "`Prevailing party' includes the party with a net monetary recovery, a defendant in whose favor a dismissal is entered, a defendant where neither plaintiff nor defendant obtains any relief, and a defendant as against those plaintiffs who do not recover any relief against that defendant. When any party recovers other than monetary relief and in situations other than as specified, the `prevailing party' shall be as determined by the court, and under those circumstances, the court, in its discretion, may allow costs or not and, if allowed may apportion costs between the parties on the same or adverse sides pursuant to rules adopted under Section 1034."
In Berard Construction Co. v. Municipal Court (1975) 49 Cal.App.3d 710, 715-716, 122 Cal.Rptr. 825 (Berard), on which Profit Concepts relied in the trial court, the appellate court held, "if defendants' motion to quash service had been granted, the court would have been without power to award attorney's fees. Civil Code section 1717, under which the claim for fees was made, authorizes their award only upon the rendering of a `final judgment.' [Citations.] The quashing of service would neither constitute nor authorize such a final judgment. Nor would there be any statutory authority for the award of attorney's fees, as costs, or of costs in general. [Citations.]" Berard was decided under former section 1717, which read in part, "[a]s used in this section `prevailing party' means the party in whose favor final judgment is rendered." (See Berard, supra, 49 Cal.App.3d at p. 713, fn. 2, 122 Cal.Rptr. 825.) As set forth ante, the current version of section 1717 does not contain the requirement of a final judgment.
Another case decided under the former version of section 1717 of the Civil Code, Samuels v. Sabih (1976) 62 Cal.App.3d 335, 340, 133 Cal.Rptr. 74, held that the defendants were not entitled to attorney fees, despite their success in having the plaintiffs complaint dismissed for failure to bring it to trial within five years, because the dismissal was not a final judgment. In Elms v. Builders Disbursements, Inc. (1991) 232 Cal.App.3d 671, 674, 283 Cal.Rptr. 515 (Elms), the appellate court recognized that "[i]n 1981, apparently in response to Samuels [v.] Sabih, supra, 62 Cal.App.3d 335, 133 Cal.Rptr. 74, the Legislature amended section 1717 to authorize a determination of the prevailing party `whether or not the suit proceeds to final judgment.'" (Fn. omitted.) In Elms, the appellate court concluded that under the amended version of section 1717, a defendant who is sued under a contract containing an attorney fees provision may recover such fees under section 1717 if the plaintiffs action is dismissed because it was not brought to trial within five years. (Elms, supra, 232 Cal.App.3d at p. 672, 283 Cal.Rptr. 515.) "[The defendant] obtained all the relief it requested, and the [plaintiffs] were denied all of their demands. Pragmatically, and legally, [the defendant] was the prevailing party under section 1717 and is entitled to the benefits of its provisions." (Id. at p. 675, 283 Cal.Rptr. 515.)
For purposes of determining whether there is a prevailing party, is there a meaningful difference between a dismissal for violation of the five-year rule and a dismissal due to lack of personal jurisdiction over the defendant? No. There is no decision on the merits of the case in either dismissal; in both, the trial court dismissed the case on procedural grounds. As the trial court in Elms had the ability to decide the issue of who was the prevailing party in a dismissed case, *400 the trial court here, too, should have that ability. This analysis would not apply in a case where the plaintiff voluntarily dismissed his or her lawsuit; that situation is covered by Civil Code section 1717, subdivision (b)(2), which provides there is no prevailing party for purposes of that section when the case is voluntarily dismissed, or dismissed pursuant to settlement.
Profit Concepts argues the trial court failed to make a finding as to which party prevailed under the contract. The trial court's minute order does make such a finding: "Defendant was [the] prevailing party as obtaining the greater relief on this action on the contract."
Profit Concepts also argues the language in Civil Code section 1717 permitting attorney fees to be awarded as costs to "the party who is determined to be the party prevailing on the contract" (italics added) means that a determination on the "merits" of the contract claim is necessary, and such a determination was never made in this case because the matter was resolved on the basis of Griffith's lack of personal contacts with the State of California. This argument does not withstand analysis, as we shall explain.
In Hsu v. Abbara (1995) 9 Cal.4th 863, 876, 39 Cal.Rptr.2d 824, 891 P.2d 804, our Supreme Court held, "in deciding whether there is a `party prevailing on the contract,' the trial court is to compare the relief awarded on the contract claim or claims with the parties' demands on those same claims and their litigation objectives as disclosed by the pleadings, trial briefs, opening statements, and similar sources. The prevailing party determination is to be made only upon final resolution of the contract claims and only by `a comparison of the extent to which each party ha[s] succeeded and failed to succeed in its contentions.' [Citation.]"
The only claims before the trial court were contained in Profit Concepts's complaint, which sought compensatory and punitive damages in an amount to be determined, as well as preliminary and permanent injunctive relief. The case in California has been finally resolved. What was awarded on Profit Concepts's complaint? Zero. Thus, the contract claim was finally resolved within the meaning of Hsu v. Abbara, and that case does not use the term "merits."
The determination of which party is the prevailing party must be made without consideration of whether the plaintiff may refile the action after a motion to quash service is granted. The issue of final resolution should not depend on the plaintiffs possible future conduct. Prevailing party attorney fees should be awarded based on the contract language, the statutory language, and the fact of dismissal of the case, not on speculation.
Profit Concepts initiated an action in Oklahoma against Griffith on April 4, 2007, seeking compensatory damages, punitive damages, and preliminary and permanent injunctive relief. Profit Concepts suggests that because the case in Oklahoma is pending, the case in toto has not been finally resolved. We find nothing in the language of the statute or of Hsu v. Abbara, or any other case, that requires resolution in another state on the merits of a contract claim first asserted in California before a prevailing party can be determined here, when the matter has been completely resolved vis-à-vis the California courts.

Disposition
The judgment is affirmed. Respondent to recover costs on appeal.
WE CONCUR: RYLAARSDAM, Acting P.J., and O'LEARY, J.
NOTES
[1]  The paragraph of the parties' contract which is at issue reads in full as follows: "Injunctive Remedy or Breach [¶] If YOU breach this Agreement, it would cause U.S. irreparable harm and it would be difficult, if not impossible, to determine the damages that WE would suffer. Therefore, if a court of competent jurisdiction finds that YOU have breached this Agreement, then WE will be entitled to temporary and permanent injunctive relief. OUR right to injunctive relief is in addition to and does not limit any other right, remedy or relief that is available to U.S. at law, including damages. If the damaged party is successful in any legal proceedings it starts to enforce any part of this Agreement, or because of a party's violation of any part of this Agreement, all parties agree[] that the successful litigant will be entitled to recover reasonable attorney's fees and cost[s] which it incurs." The contract defines the terms "us," "we," and "our" as referring to Profit Concepts, and defines "you" as referring to Griffith. Profit Concepts does not argue Griffith cannot benefit from this attorney fees provision because it provides a unilateral right to recover fees to Profit Concepts; Civil Code section 1717 makes the otherwise unilateral right to fees reciprocal. (See Santisas v. Goodin (1998) 17 Cal.4th 599, 610-611, 71 Cal. Rptr.2d 830, 951 P.2d 399.)
