
33 Cal.App.4th 1429 (1995)
39 Cal. Rptr.2d 791
DENNIS R. CARROLL, Plaintiff and Appellant,
v.
IMPORT MOTORS, INC., et al., Defendants and Appellants; BMW CREDIT CORPORATION et al., Defendants and Respondents.
Docket No. A062754.
Court of Appeals of California, First District, Division Two.
April 7, 1995.
*1431 COUNSEL
Georgia Ann Michell for Plaintiff and Appellant.
Dean Christopherson for Defendant and Appellants.
Donald L. Morrow for Defendants and Respondents.
OPINION
KLINE, P.J.
This case presents the novel question whether a plaintiff who voluntarily dismisses a complaint without prejudice may, as a matter of right, commence a new action alleging related causes of action which are also related to claims still pending in a cross-complaint in the original action *1432 without violence to Code of Civil Procedure section 426.30,[1] the compulsory cross-complaint statute.
Dennis R. Carroll, M.D., appeals the judgment of dismissal entered in Contra Costa County Superior Court pursuant to an order striking his first amended complaint without leave to amend. He also challenges the postjudgment order awarding attorney fees to respondents Import Motors, Inc., doing business as BMW Concord (Import); Terry Lieb; Erin Custer; BMW Credit Corporation (BMW Credit); and BMW Leasing Corporation (BMW Leasing) in the second action. Import, in its cross-appeal, challenges the court's order awarding it contractual attorney fees solely for work done in the second action. We shall affirm.

STATEMENT OF THE CASE AND FACTS
On November 30, 1991, appellant went to Import's dealership in Concord and traded in his leased 1988 BMW 325i automobile for a new 1992 model. Respondents Erin Custer and Terry Lieb, two salespeople at the dealership, assisted appellant in the transaction. Based on a copy of his credit report obtained by Custer and Lieb, appellant believed he owed approximately $6,691 on his 1988 BMW. Appellant then signed a contract entitled "Trade-In Pay-Off Adjustment" which stated that he must pay any amount found owing beyond the $6,691.[2] The dispute arose when appellant learned that he in fact owed $16,853.10 and was obligated by the contract to pay an additional lump sum of $9,731.81.
On April 20, 1992, appellant filed a complaint in Contra Costa County Superior Court naming as defendants Import, Lieb, Custer, and BMW Credit,[3] and asserting causes of action for rescission, fraud, cancellation of written instrument, declaratory and injunctive relief, and requesting punitive damages. On June 4, Import filed its answer and a cross-complaint for breach of contract for the additional $9,731.81 allegedly owed by appellant. Appellant answered Import's cross-complaint on July 29. BMW Leasing filed a cross-complaint on September 14, requesting an $8,450.29 deficiency judgment against appellant and declaratory relief and express indemnity against Import.
On October 26, Import, along with Custer and Lieb, filed a motion for summary judgment against appellant, alleging that all causes of action were *1433 based on actual fraud and misrepresentation, that appellant could not prove respondents knew the difference in trade-in values, and that appellant's reliance on the lower value was not justifiable as a matter of law. On December 15, the court (Hon. Peter Spinetta) issued its tentative ruling, granting the motion for summary judgment, but continuing the hearing on the motion from December 16 to December 17. Appellant's counsel challenged the tentative ruling, stating in a letter to Import that the recording of the tentative ruling had been unintelligible, but that counsel planned to challenge all issues in dispute.
On December 16, one day before the hearing on the summary judgment motion, appellant filed a voluntary dismissal of his complaint without prejudice. The court ultimately determined that the filing of the voluntary dismissal left it without jurisdiction to order summary judgment against appellant.[4] Meanwhile, on December 30, appellant filed a new complaint against the same parties, similar to the first complaint but adding a cause of action for negligent misrepresentation. On January 19, 1993, appellant filed a first amended complaint and on February 10, he moved to consolidate the second action with the remainder of the first action (i.e., the cross-complaints).
On March 2, Import moved to strike appellant's complaint,[5] arguing that appellant's claims were related to those asserted in the pending action and hence must be filed as a compulsory cross-complaint in that action. After a hearing, the court (Hon. Ellen James) granted the motion to strike the first amended complaint without leave to amend and entered judgment, dismissing the action on June 10. On June 29, the court (Hon. James Marchiano), which had previously conditionally granted the motion to consolidate pending the decision on the motion to strike, vacated nunc pro tunc the prior order and denied the motion to consolidate, based on the June 10 judgment of dismissal.
Thereafter, respondents filed motions to recover attorney fees as prevailing parties under the contract.[6] Import sought to recover $12,252.00 in fees incurred in the first action and $4,987.50 in fees incurred in the second *1434 action. BMW Credit and BMW Leasing sought only to recover $6,266.25 in fees incurred in the second action.[7] Following a hearing on the motions, the court (Hon. Ellen James) issued an order on August 11, limiting the fee awards to work conducted in the second action.
Appellant filed a timely appeal, challenging the judgment of dismissal and the order awarding attorney fees to respondents. Import filed a timely cross-appeal, challenging the order limiting the attorney fees award.

DISCUSSION

I.
(1) Appellant voluntarily dismissed his first complaint without prejudice pursuant to section 581, subdivision (c).[8] He contends his right to bring a new action within the limitations period following such a dismissal is absolute. (See Burke v. W.R. Chamberlin & Co. (1942) 51 Cal. App.2d 419, 429 [125 P.2d 120] [where dismissal is without prejudice, "plaintiff is at liberty to file a new action"].) Appellant asserts that the voluntary dismissal of an action is or should be highly favored in law because it gives a party the opportunity to step back and reassess whether to continue with the litigation, thus potentially saving judicial resources. He further argues that because his right to bring a new action is absolute, section 426.30, the compulsory cross-complaint statute, is inapplicable.
Section 426.30, subdivision (a), provides: "Except as otherwise provided by statute, if a party against whom a complaint has been filed and served fails to allege in a cross-complaint any related cause of action which (at the time of serving his answer to the complaint) he has against the plaintiff, such party may not thereafter in any other action assert against the plaintiff the related cause of action not pleaded."[9] There is no dispute that the causes of action appellant sought to allege in the second action were related to those raised by respondents in their cross-complaint in the first action since all claims arose out of the "same transaction, occurrence, or series of transactions or occurrences...." (§ 426.10, subd. (c).)
*1435 Because the issues raised by appellant involve the proper interpretation of a statute as well as the application of a statute to undisputed facts, both of which are questions of law, we review appellant's claims de novo. (See Cal-Air Conditioning, Inc. v. Auburn Union School Dist. (1993) 21 Cal. App.4th 655, 667 [26 Cal. Rptr.2d 703], quoting Rudd v. California Casualty Gen. Ins. Co. (1990) 219 Cal. App.3d 948, 951 [268 Cal. Rptr. 624] ["`It is well settled that the interpretation and application of a statutory scheme to an undisputed set of facts is a question of law [citation] which is subject to de novo review on appeal.'"].)
We find no case, and the parties cite none, involving the question whether a plaintiff who voluntarily dismisses a complaint without prejudice may bring a new action on the same matter when there is a related cross-complaint pending in the original action.[10] There are, however, cases arising in other contexts which invoke the strict policy against multiplicity of litigation codified in the section 426.30, and which are relevant to our determination here. For example, in Currie Medical Specialties, Inc. v. Bowen (1982) 136 Cal. App.3d 774 [186 Cal. Rptr. 543], Currie, who had been the defendant in a prior action that was dismissed with prejudice, attempted to bring a new suit on claims arising from the same transaction as in the prior action. On appeal, Currie argued that the logical relation test defined in section 426.10 is improperly broad when used to bar a claim, given the policy in favor of giving each person a day in court. (136 Cal. App.3d at p. 777.) The Court of Appeal held, on the contrary, that "[t]he waiver provision of section 426.30 is mandatory, the policy in favor of hearing all related claims in a single action controlling [citations]." (Ibid.)
Similarly, in Cheiker v. Prudential Ins. Co. of America (9th Cir.1987) 820 F.2d 334, 337, the Ninth Circuit Court of Appeals held that California's compulsory cross-complaint statute applies to interpleader actions, and appellant's failure to plead related causes of action in a prior, resolved action barred him from litigating them in a new action. "Otherwise piecemeal litigation will occur and defeat the purpose of the compulsory cross-claim statute." (Ibid.)
We conclude that section 426.30 precludes appellant from bringing a new action based on claims arising from the same transaction that served as the *1436 basis for respondents' cross-complaint in the first action. That he voluntarily dismissed his complaint in the first action without prejudice does not change this result. To permit the dismissal and refiling of an action to function as an automatic exception to the compulsory cross-complaint requirement would encourage just the kind of piecemeal litigation section 426.30 is intended to prohibit. The claims appellant attempted to assert as a new action should have been filed as a compulsory cross-complaint in the first action. Because appellant already had answered Import's cross-complaint in the first action, he would have to ask leave of the trial court, pursuant to section 426.50,[11] to file his cross-complaint.[12]
We find unpersuasive appellant's additional arguments in support of his position. First, he asserts that sections 426.30 and 426.50 are inapplicable because they assume a situation in which a party has failed to bring his or her claim at the time of filing an answer, whereas appellant already had raised his claims when he filed the original complaint. Although the former situation undoubtedly is the more common, appellant is not exempt from the clear requirements of sections 426.30 and 426.50 simply because he had initially raised many of the same issues in the first action prior to the voluntary dismissal. Nor do we agree that application of the compulsory cross-complaint requirement in these circumstances would work as a disincentive to voluntary dismissal. A plaintiff who has voluntarily dismissed a complaint in an action such as this may always request leave of the court to file a late compulsory cross-complaint and, assuming the plaintiff acted in good faith, such leave will be granted. (§ 426.50.)
Appellant also contends that, regardless of whether his second action should have been filed as a compulsory cross-complaint in the first action, *1437 had his motion to consolidate the two actions been granted, the result would have been the same as if he had filed a compulsory cross-complaint in the first action, and the purpose of section 426.30  to hold related claims together in one action and to avoid duplication of time and efforts  would be fulfilled. He asserts that equity accordingly mandates the granting of his motion to consolidate. We disagree. As earlier indicated, there is no reason in law or logic why a party who has voluntarily dismissed a complaint without prejudice should be entitled to ignore the compulsory cross-complaint requirement. Appellant's recourse lies in moving to file a compulsory cross-complaint in the first action; that equity abhors a forfeiture (see O'Morrow v. Borad (1946) 27 Cal.2d 794, 800 [167 P.2d 483, 163 A.L.R. 894]) does not excuse him from complying with the law.[13]
In sum, the court properly struck appellant's first amended complaint in the second action because that complaint was filed in violation of section 426.30. (See § 436, subd. (b) [court may "[s]trike out all or any part of any pleading not drawn or filed in conformity with the laws of this state...."].) And because, as a matter of law, amendment could not have cured the defective pleading, the court did not err in striking the complaint without leave to amend and dismissing the action. (See § 581, subd. (f)(3) [dismissal is proper after granting a motion to strike a complaint without leave to amend].)
Appellant's final contention is that because the superior court erred in granting the motion to strike, the award to respondents of attorney fees in the second action was premature and likewise in error. However, because we have concluded that the court properly dismissed appellant's first amended complaint after striking the complaint without leave to amend, respondents are "prevailing parties" for purposes of the award of attorney fees in the second action pursuant to Civil Code section 1717, subdivision (a).[14]

II.
(2) Import's sole contention on cross-appeal is that the trial court erred in failing to award it attorney fees for work undertaken in the first action, *1438 prior to appellant's voluntary dismissal. Import does not attempt to argue that it was a prevailing party in the first action, given that Civil Code section 1717, subdivision (b)(2), provides that "[w]here an action has been voluntarily dismissed ... there shall be no prevailing party for purposes of this section." (See also, e.g., Bank of Idaho v. Pine Avenue Associates (1982) 137 Cal. App.3d 5, 16 [186 Cal. Rptr. 695].) Rather, Import seeks recovery of attorney fees in defending all claims on the contract, based on its status as prevailing party in the second action. Specifically, Import argues that the work in the first action directly led to the favorable result in the second action.
In support of its position, Import relies on Stokus v. Marsh (1990) 217 Cal. App.3d 647 [266 Cal. Rptr. 90], in which we affirmed the award to a plaintiff of attorney fees incurred prior to the filing of his third complaint. The defendant had successfully moved to quash service of the summons in the first action and the plaintiff had voluntarily dismissed the second action without prejudice. (Id. at pp. 650-651.) According to the plaintiff, however, work done in the prior actions, including issue evaluation, discovery, trial preparation, preparation of jury instructions, and trial memorandum, were essential to the victory achieved after a jury trial on the third complaint. (Id. at p. 654.) We concluded that nothing in Civil Code section 1717 "precludes compensation for fees incurred prior to filing the complaint, where fees were reasonably and necessarily incurred at that time by the prevailing party." (217 Cal. App.3d at p. 655.) Moreover, the award of prefiling fees was particularly warranted in Stokus, given that the dismissal and refiling were designed to avoid unnecessary litigation; significant trial preparation had occurred prior to the dismissal; and discovery conducted in the dismissed case was fully utilized in the refiled action. (Id. at p. 656.) "`It would be ridiculous to require the attorney to repeat formally all of this work after the complaint is filed in order to protect his client's rights....'" (Id. at p. 655, quoting La Mesa-Spring Valley School Dist. v. Otsuka (1962) 57 Cal.2d 309, 316-317 [19 Cal. Rptr. 479, 369 P.2d 7].)
In the present case, it is true, as Import points out, that the complaints filed by appellant in both actions were quite similar. This case, however, differs from Stokus in a significant way: Here, the work undertaken by Import's attorneys in the first action, including discovery and the filing of its summary judgment motion, cannot be said to have been "necessarily incurred" (Stokus v. Marsh, supra, 217 Cal. App.3d at p. 655) in connection with the second action. The dispositive issue in the second action was limited to whether appellant's claims should have been filed as a compulsory cross-complaint in the original action, wholly apart from the merits of the claims raised in either complaint and addressed in the summary judgment motion in the first action.
*1439 Because Import's work in the first action was not necessary to its victory in the second action, an award of attorney fees for such work would not be "reasonable" under Civil Code section 1717, subdivision (a). Accordingly, the court correctly awarded attorney fees to Import solely for work done after the filing of the second action.[15]

DISPOSITION
The judgment dismissing appellant's first amended complaint in the second action is affirmed. The postjudgment order awarding attorney fees is affirmed.
Smith, J., and Haerle, J., concurred.
NOTES
[1]  Unless otherwise indicated, all statutory references are to the Code of Civil Procedure.
[2]  Appellant alleged in his complaint that Custer and Lieb told him that any amount due beyond the $6,691 pay-off amount would be nominal.
[3]  Appellant amended his complaint on October 2, to insert the true name of Doe defendant, BMW Leasing, the actual lessor of the new BMW.
[4]  In his January 12 order, Judge Spinetta stated: "The Court does not believe that it can properly declare plaintiff's objection to the tentative ruling a nullity, even if his counsel's real motivation in lodging the objection may have been simply to buy time to file a voluntary dismissal [] and even if that counsel's reason for initially not specifying the issues to be argued may have been disingenuous."
[5]  BMW Credit and BMW Leasing later joined Import, Lieb, and Custer in bringing the motion to strike.
[6]  The lease agreement upon which appellant based his two actions provided for recovery of reasonable attorney fees.
[7]  At the hearing, counsel for BMW Credit and BMW Leasing explained that they had not requested attorney fees for the first action because most of the work in that action was done by Import.
[8]  Section 581, subdivision (c), provides: "A plaintiff may dismiss his or her complaint, or any cause of action asserted in it, in its entirety, or as to any defendant or defendants, with or without prejudice prior to the actual commencement of trial."
[9]  In section 426.10, subdivision (a), "complaint" is defined as "a complaint or cross-complaint" and in section 426.10, subdivision (b), "plaintiff" is defined as "a person who files a complaint or cross-complaint."
[10]  We do note the tactical warning found in a California Practice Handbook: "As a practical matter, when a defendant seeks affirmative relief by a compulsory cross-complaint ..., the plaintiff will usually not wish to dismiss any related cause of action under CCP § 581(c). If the plaintiff were to do so, arguably his or her dismissed cause of action would be considered to be a compulsory cross-complaint to the defendant's cross-complaint and, under CCP § 426.30(a), the plaintiff would be barred thereafter in any other action from asserting that cause of action against the defendant." (2 Cal. Civil Procedure Before Trial (Cont.Ed.Bar 1994) § 33.28, p. 33-20.)
[11]  Section 426.50 provides: "A party who fails to plead a cause of action subject to the requirements of this article, whether through oversight, inadvertence, mistake, neglect, or other cause, may apply to the court for leave to amend his pleading, or to file a cross-complaint, to assert such cause at any time during the course of the action. The court, after notice to the adverse party, shall grant, upon such terms as may be just to the parties, leave to amend the pleading, or to file the cross-complaint, to assert such cause if the party who failed to plead the cause acted in good faith. This subdivision shall be liberally construed to avoid forfeiture of causes of action."
[12]  Respondents argue that appellant's dismissal of his complaint and subsequent refiling as a new action were done in bad faith, to avoid a negative ruling on summary judgment and to attempt to obtain a more sympathetic judge. Appellant's alleged bad faith, however, is not relevant to our decision in this case. Our conclusion that appellant's second action was properly stricken because not filed as a compulsory cross-complaint is not based on whether his motives were pure; it is based on our interpretation of the statutes in question. Appellant's motives are not relevant unless and until he requests leave to file a late cross-complaint, at which time section 426.50 instructs that the court shall permit such filing if the party who failed to plead the cause acted in good faith. (See Silver Organizations Ltd. v. Frank (1990) 217 Cal. App.3d 94, 99 [265 Cal. Rptr. 681] ["A motion to file a cross-complaint at any time during the course of the action must be granted unless bad faith of the moving party is demonstrated where forfeiture would otherwise result."].)
[13]  We are not obliged in this case to inquire whether there may be situations where equitable considerations, not present here, will come into play in which justice might require that exceptions to the compulsory cross-complaint requirement be made.
[14]  Civil Code section 1717, subdivision (a), provides in pertinent part: "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 prevailing party on the contract, whether he or she is the party specified in the contract or not, shall be entitled to reasonable attorney fees in addition to other costs."
[15]  In light of this conclusion, we do not find convincing Import's subsidiary arguments on this issue.
