Filed 4/17/18
                  CERTIFIED FOR PUBLICATION


    IN THE COURT OF APPEAL OF THE STATE OF CALIFORNIA

                   SECOND APPELLATE DISTRICT

                           DIVISION FOUR



ACHIKAM SHAPIRA,                       B283445

        Plaintiff and Appellant,       (Los Angeles County
                                       Super. Ct. No.BC586445)
        v.

LIFETECH RESOURCES,

        Defendant and Respondent.



      APPEAL from an order of the Superior Court of
Los Angeles County, Elizabeth Allen White, Judge. Reversed and
remanded with instructions.
      Kilpatrick Townsend & Stockton, Emil W. Herich for
Plaintiff and Appellant.
      Conkle, Kremer & Engel, John A. Conkle, Amanda R.
Washton for Defendant and Respondent.
                         INTRODUCTION
       Appellant Achikam Shapira sued his former employer,
Lifetech Resources, LLC, for breach of an employment contract.
The case proceeded to a bench trial; the parties presented their
evidence and rested. The parties and court agreed that the
parties would submit closing arguments in written briefs. Before
Shapira submitted his closing argument brief, he requested that
the court dismiss the case pursuant to Code of Civil Procedure,
section 581, subdivision (e) (section 581(e)), which provides,
“After the actual commencement of trial, the court shall dismiss
the complaint . . . with prejudice, if the plaintiff requests a
dismissal . . . .”
       The court denied Shapira’s request to dismiss the case.
After the parties filed their closing argument briefs, the court
entered a statement of decision and judgment in Lifetech’s favor.
The court also held that Lifetech was the prevailing party
pursuant to Civil Code section 1717, and awarded costs and
$137,000 in attorney fees to Lifetech.
       Shapira appealed the order awarding attorney fees. He
argues that the court should have dismissed the case under
section 581(e), and therefore the court’s award of attorney fees
was erroneous under Civil Code section 1717, subdivision (b)(2)
(section 1717(b)(2)), which states, “Where an action has been
voluntarily dismissed or dismissed pursuant to a settlement of
the case, there shall be no prevailing party for purposes of this
section.”
       We agree with Shapira and reverse. Section 581(e)
provides a right to dismiss a case before the completion of trial,
and the court erred by refusing to dismiss the case upon




                                2
Shapira’s request. As such, there was no prevailing party under
section 1717(b)(2), and the attorney fees award was erroneous.
       FACTUAL AND PROCEDURAL BACKGROUND
       Shapira filed a complaint for breach of contract on June 26,
2015. He alleged that he and Lifetech entered into a written
contract on March 1, 2015, to “retain the services of [Shapira] as
a consultant and its director of international development” for
one of Lifetech’s products. Shapira alleged that the “contract
provided that the contract shall not be terminated without
substantial cause for a period of eight months and/but thereafter
either party could terminate the contract on sixty (60) days
written notice.” He further alleged that on April 15, 2015,
Lifetech “breached the contract by terminating the contract
without substantial cause.” Shapira asserted that he was
entitled to eight months’ compensation, loss of commissions, and
other damages.
       The case proceeded to a four-day bench trial on December
15, 16, 19, and 20, 2016. The facts of the case are not relevant to
the issues on appeal, and therefore we do not recount them here.
On the third day of trial, the court asked the parties whether
they wanted to do closing arguments orally or in written briefs;
Shapira’s counsel stated that the parties had agreed to submit
written briefs. The following day, at the end of the presentation
of evidence, the parties and court agreed that Shapira’s closing
argument brief would be due January 3, Lifetech’s closing
argument brief would be due January 17, and Shapira’s reply
would be due January 24, 2017. The court then stated, “The
matter will stand submitted – upon receipt of the reply, the
matter will stand submitted.” Shapira’s counsel asked, “As of the




                                 3
reply brief?” The court responded, “As of the reply brief.” The
proceedings concluded shortly thereafter.
       Ten days later, on December 30, 2016, the parties filed a
stipulation to adjust the briefing schedule due to an emergency in
Shapira’s counsel’s family. The parties agreed that Shapira’s
brief would be due January 10, Lifetech’s brief would be due
January 24, and Shapira’s reply would be due January 31, 2017.
       On January 6, Shapira filed an ex parte application
requesting that the case be dismissed with prejudice. The
application stated, “Plaintiff has elected to exercise his right to
voluntarily dismiss the action with prejudice pursuant to
California Code of Civil Procedure section 581(e).”1
       Lifetech opposed the ex parte application. It said that
Lifetech made numerous attempts to settle the case before trial,
but Shapira refused to settle. The case thus proceeded to a full
trial, which was complete except for closing argument briefing.
When Shapira’s counsel informed Lifetech’s counsel that Shapira
wanted to dismiss the case, Lifetech asked Shapira to agree that
the dismissal was not “voluntary” for purposes of section
1717(b)(2). Shapira refused. Lifetech argued that the dismissal
was “a transparent attempt to avoid the ‘prevailing party’s’
contractual right to attorney’s fees.” Lifetech argued that the
right to dismiss is extinguished once a case has been “submitted
at trial.” Lifetech said that section 1717(b)(2) was intended to

      1  Section 581(e) states, “After the actual commencement of
trial, the court shall dismiss the complaint, or any causes of
action asserted in it, in its entirety or as to any defendants, with
prejudice, if the plaintiff requests a dismissal, unless all affected
parties to the trial consent to dismissal without prejudice or by
order of the court dismissing the same without prejudice on a
showing of good cause..”



                                  4
encourage plaintiffs to dismiss contract litigation that lacks
merit, and “[h]ere, [Shapira] had multiple opportunities to
dismiss this action, and even accept a settlement prior to trial,
yet . . . forced Lifetech to defend its case at trial . . . . Should the
Court allow Shapira to ‘voluntarily dismiss this case after all four
days of trial and after all of the evidence was submitted by the
parties, in order to avoid his contractual duties, the entire
purpose of this statute would be annihilated.”
        The court denied Shapira’s request to dismiss at a hearing
on January 6, 2017. The minute order does not include a
statement explaining the reasons for the court’s decision, and
there is no reporter’s transcript in the record on appeal.
        Shapira filed a document titled “Plaintiff’s Notice of
Voluntary Dismissal” on January 10, 2017. He acknowledged
that the court had denied his previous request, but stated that he
wanted to create a record for appeal and therefore “respectfully
submits this notice of renewed voluntary dismissal of [the] case.”
Shapira again relied on section 581(e),2 and argued that
voluntary dismissal is available any time before closing
arguments are complete. In a declaration supporting the request,
Shapira’s counsel stated that at the time Shapira initially
requested dismissal, “the Court had not ruled on the merits of the
action and no request for involuntary dismissal had been made or
was pending.” Shapira filed his closing argument brief the same
day.



      2The document title is “Plaintiff’s Notice of Voluntary
Dismissal [C.C.P. § 581(d)(e)].” This appears to be a
typographical error; the only subdivision of section 581 cited or
quoted in the document is subdivision (e).



                                   5
       Lifetech filed an opposition to Shapira’s renewed request
for dismissal, arguing that it was an attempt to circumvent the
court’s previous order denying the request. On January 20, the
trial court issued a minute order stating that Lifetech’s “objection
is sustained. [Shapira’s] Notice of Voluntary Dismissal filed
January 10, 2017 is rejected – the Court previously denied
Plaintiff’s ex parte application for dismissal on January 6, 2017.”
       Lifetech filed its closing argument brief as scheduled, and
Shapira filed his reply. On February 9, 2017, the court issued a
tentative statement of decision holding that Shapira failed to
perform under the contract and failed to demonstrate that
Lifetech breached the contract, and Lifetech was entitled to costs
and attorney fees. Lifetech and Shapira each requested a
statement of decision, and Shapira objected to several of the
findings in the tentative ruling. The court overruled Shapira’s
objections, and issued a final statement of decision finding for
Lifetech and awarding Lifetech costs and attorney fees. The
court entered judgment on March 17, 2017, awarding Lifetech
costs and attorney fees in an amount to be determined.
       Lifetech filed a motion seeking $167,046.50 in attorney fees
and $15,638 in costs. It argued that the contract provided that in
the event of legal action, the prevailing party was to recover all
costs and expenses, including attorney fees. Lifetech asserted
that it was the prevailing party under Civil Code section 1717.
       Shapira opposed Lifetech’s motion. Again Shapira argued
that he had an absolute right to voluntarily dismiss the case
before final arguments were complete. He asserted that “the
right to voluntarily dismiss terminates once the action has
proceeded to a determinative adjudication,” but “the plaintiff has
the absolute right to dismiss the case prior to submission.”




                                 6
Shapira argued that the case had not been “submitted” to the
court because the parties had not yet filed their closing argument
briefs, and said, “Given [Shapira’s] absolute right to dismiss, and
his timely request for dismissal prior to submission of the matter,
the Court should deny [Lifetech’s] motion for attorney’s fees
pursuant to California Civil Code section 1717(b)(2) which
precludes an award of attorney’s fees where the plaintiff has
voluntarily dismissed his action prior to an adjudication on the
merits having been rendered.” Shapira also argued that the
amount of fees Lifetech requested was unreasonable.
       At the hearing on Lifetech’s motion, Shapira’s counsel cited
a Rutter Group practice guide entry that said, “‘[I]f you go to trial
but find things going badly for your client, consider a voluntary
dismissal rather than proceeding to judgment. Even though the
dismissal will be with prejudice at this point because during trial
it may still save your client a lot of money in attorney’s fees.’”3
The parties also presented arguments about whether the
requested attorney fees were reasonable.
       In ruling on the motion, the court stated, “Let me address
this issue of the dismissal. And I want to be perfectly clear here.
Counsel opted to brief the closing as opposed to doing the closing
in open court, which made sense. There was a fair amount of
evidence. She had the time to do it. That, in no way, suggests
that the matter was submitted. There is no submission here.”
The court continued, “So, when we talk about trying to
voluntarily dismiss something in between the time that the
evidence is submitted to the court, and the time that closing
briefs arrive, I can’t imagine – I can’t imagine under any

      3It appears counsel was citing Weil & Brown, Cal. Prac.
Guide: Civ. Pro. Before Trial (The Rutter Group 2017) ¶ 11:39.5.



                                  7
circumstance that you could just voluntarily dismiss – well, it
looks like a losing battle here, so I am going to avoid the
attorney’s fees – that’s just sabotage. It is sandbag. It is
improper.” The court later added, “We had had a full trial, and
you want to come in at the last minute recognizing that, perhaps,
your client is in peril and avoid the attorney’s fees? No.” Counsel
for Shapria noted that the Rutter Group practice guide said
dismissal under the circumstances was allowed, and the court
responded, “I think your interpretation of Rutter under these
facts is inapposite. So, in any event, I think the attorney’s fees
are appropriate. There was a great deal of work that went into
this case. I have reduced the attorney’s fees in light of the fact
that I did find some excess, but I think [$] 137,000 is reasonable.”
       The court therefore granted Lifetech’s motion and awarded
$137,000 in attorney fees. Shapira timely appealed.
                           DISCUSSION
       This appeal presents a single issue: Did Shapira have a
right to voluntarily dismiss his case after the parties rested but
before closing arguments were complete? If Shapira did have the
right to voluntarily dismiss the case at that stage of trial, the
court erred by denying the dismissal. If the court erred, then
pursuant to the terms of section 1717(b)(2), Lifetech was not the
prevailing party and attorney fees should not have been awarded.
       The facts are not in dispute, and therefore the only
question before us is the application of law to the facts. Under
these circumstances, our review is de novo. (See 321 Henderson
Receivables Origination LLC v. Red Tomahawk (2009) 172
Cal.App.4th 290, 301 [“Where the facts are undisputed, we
review de novo the superior court’s denial of a request for
dismissal under section 581.”]; Carver v. Chevron U.S.A., Inc.




                                 8
(2002) 97 Cal.App.4th 132, 142 [“[A] determination of the legal
basis for an attorney fee award is a question of law to be reviewed
de novo.”].)
      Code of Civil Procedure section 581 sets out the
circumstances in which a plaintiff may voluntarily dismiss a case,
and when such a dismissal may be deemed without prejudice.
For example, subdivision (b)(1) says that an action may be
dismissed with or without prejudice “upon written request of the
plaintiff to the clerk . . . or by oral or written request to the court
at any time before the actual commencement of trial.”4
Subdivision (d) states that a court “shall” dismiss a complaint
with prejudice, “when upon the trial and before the final
submission of the case, the plaintiff abandons it.” And
subdivision (e) says, “After the actual commencement of trial, the
court shall dismiss the complaint, or any causes of action
asserted in it, in its entirety or as to any defendants, with
prejudice, if the plaintiff requests a dismissal. . . .” In his ex
parte request and later “notice of voluntary dismissal,” Shapira
requested that the court dismiss the case pursuant to section
581(e).



      4 The court in Franklin Capital Corp. v. Wilson (2007) 148
Cal.App.4th 187, 194 (Franklin Capital), noted that “a
substantial and fairly complex body of case law” addresses the
limits of voluntary dismissal under section 581, most of which
involves how to properly define the “commencement of trial” in
section 581, subdivision (b), to determine when a voluntary
dismissal may be entered without prejudice. Because this case
involves neither a dismissal without prejudice nor issues
involving the commencement of trial, much of this “complex body
of case law” is inapplicable here.



                                  9
       Below and on appeal, the parties focus on whether the case
had been “submitted” at the time Shapira requested dismissal,
reasoning that “submission” of the case marks the end of the time
frame in which a plaintiff may voluntarily dismiss a case. This
line of reasoning seems to be based on language in section 581,
subdivision (d), which states that dismissal is warranted where
plaintiff has “abandoned” a case “upon the trial and before the
final submission of the case.”
       We are not convinced that the language of subdivision (d)
controls here. Shapira requested dismissal of the case under
section 581(e), not subdivision (d).5 However, because the parties
reasonably assume there is an outer limit within which a plaintiff
may dismiss a case under section 581(e), and they assume that
“submission” defines that outer limit, we too will assume without
deciding that a plaintiff may dismiss a case under section 581(e)
at any time before the case has been submitted.
       The question therefore becomes whether the case had been
submitted at the time Shapira requested dismissal. It had not.
California Rules of Court, rule 2.900(a)—which neither party
cites—is titled “Submission of a cause in a trial court.” It states
that a “cause is deemed submitted” in the earlier of two
circumstances: when “[t]he . . . court orders the matter
submitted,” or on “[t]he date the final paper is required to be filed
or the date argument is heard, whichever is later.” The
California Supreme Court has stated, “A case is deemed to be


      5Throughout its respondent’s brief, Lifetech focuses almost
exclusively on section 581, subdivision (d). Lifetech does not offer
any explanation for focusing on this subdivision rather than
subdivision (e), which Shapira clearly relied upon in both
requests for dismissal and in his opening brief.



                                 10
under submission when the court, trying the case without a jury,
has heard the evidence and the arguments of counsel and has
taken the case under advisement.” (Jalof v. Robbins (1941) 19
Cal.2d 233, 235 [italics added].)
        The record demonstrates that the court had not ordered the
matter submitted when Shapira first requested dismissal. When
the parties rested at the end of trial and discussed the schedule
for filing their closing argument briefs, the court said, “[U]pon
receipt of the reply, the matter will stand submitted.” Later, at
the hearing on Lifetech’s motion for attorney fees, the court said,
“I want to be perfectly clear here. Counsel opted to brief the
closing as opposed to doing the closing in open court, which made
sense. . . . That, in no way, suggests that the matter was
submitted. There is no submission here.” Moreover, when
Shapira requested dismissal, closing arguments were not
complete and the date to file the “final paper” had not passed.
(Cal. Rules of Court, rule 2.900(a).) As a result, the case had not
been submitted. Assuming that “submission” of a case marks the
latest time that a plaintiff may voluntarily dismiss the case
under section 581(e), that deadline had not yet passed.
        Lifetech asserts that nevertheless, “the Court has
discretion to determine that a request for voluntary dismissal is
untimely.” This contention is not supported by the statutory
language or the case law Lifetech cites. Section 581(e) states that
after commencement of trial, a court “shall dismiss the complaint
. . . with prejudice, if the plaintiff requests a dismissal.” The use
of “shall” in the statute suggests that dismissal is mandatory.6

      6By comparison, section 581, subdivision (f) states that a
court may dismiss a complaint under certain circumstances, and
thus the decision to dismiss under that subdivision rests in the



                                 11
(See, e.g., Tarrant Bell Property, LLC v. Superior Court (2011) 51
Cal.4th 538, 542 [“Under ‘well-settled principle[s] of statutory
construction,’ we ‘ordinarily’ construe the word ‘may’ as
permissive and the word ‘shall’ as mandatory, ‘particularly’ when
a single statute uses both terms.”].) Section 581(e) states that a
court has discretion to dismiss a case without prejudice upon a
showing of good cause, but nothing in the statute suggests that a
court has discretion to refuse to dismiss the case entirely.
       Case law also does not support Lifetech’s contention that
dismissal under section 581(e) is discretionary. For example,
Lifetech cites Bank of America, N.A. v. Mitchell (2012) 204
Cal.App.4th 1199 (Mitchell), in which the plaintiff bank filed a
complaint, the defendant demurred, and the trial court sustained
the demurrer without leave to amend. The plaintiff bank then
filed a request for dismissal, which apparently was denied. (Id.
at p. 1210.) The court granted the defendant’s request for
attorney fees. On appeal, the bank argued that the trial court
should not have awarded attorney fees, because the bank had a
right to dismiss the case under section 581, subdivision (b)(1),
which addresses the right to dismiss a case before trial. (Id. at p.
1209.) This Division held that “the Bank no longer had the right
to voluntarily dismiss under section 581,” because “the trial court


sound discretion of the trial court. (See, e.g., Gitmed v. General
Motors Corp. (1994) 26 Cal.App.4th 824, 827.) In addition,
although section 581, subdivision (d) also states that the court
“shall” dismiss a case if the plaintiff abandons it, Witkin states
that “a motion to dismiss under C.C.P. 581(d) is addressed to the
court’s discretion.” (6 Witkin, Cal. Procedure (5th ed. 2008)
Dismissal on Abandonment, § 312.) Witkin notes that the
“theoretical basis of this distinction is not entirely clear,” and
cites cases that predate the modern version of section 581.



                                 12
had already made a determinative adjudication on the legal
merits of the Bank’s claim.” (Id. at p. 1210.) The court further
explained that “the trial court had already sustained Mitchell’s
demurrer without leave to amend, and thus judgment against the
Bank had already ‘ripened to the point of inevitability.’” (Id. at p.
1212.) As a result, “the Bank no longer had the right to
voluntarily dismiss its action, either with or without prejudice.”
(Ibid.) This case is inapposite, because here the court did not
rule on the merits of the case before Shapira sought to dismiss it.7
       Lifetech also cites Vanderkous v. Conley (2010) 188
Cal.App.4th 111 (Vanderkous), which involved a property
dispute. “Following a three-day court trial and the filing of
closing briefs from both sides, the matter was deemed submitted
on March 10, 2008. On May 30, 2008, the court filed its
statement of decision and ordered Conley to execute a quitclaim
deed in favor of Vanderkous.” (Id. at p. 115.) The court also
made several fact determinations about lot lines, easements, and
ownership of various portions of the disputed property. (Ibid.)
The parties were directed to submit appraisals to assist the court
in reaching a final determination of the amount Vanderkous was
to pay Conley; they did. (Ibid.) Vanderkous asked for an


      7 The court in Franklin Capital, supra, noted that many
cases involving section 581, subdivision (b) involve the “mere
formality test,” which dictates that a plaintiff may not voluntarily
dismiss a case without prejudice once there has been a “public
and formal indication by the trial court of the legal merits of the
case,” or there has been “some procedural dereliction by the
dismissing plaintiff that made dismissal otherwise inevitable.”
(Id. at p. 200.) The parties do not assert here that the court had
ruled on or opined about the merits of the case before Shapira
sought to dismiss.



                                 13
evidentiary hearing regarding the appraisals, then filed a request
for dismissal with prejudice, which the court clerk entered.
(Ibid.) The trial court found that the dismissal was void because
it did not comply with section 581 and Vanderkous’s appraisal
did not comply with the court’s orders; the court awarded Conley
the amount listed in her appraisal. (Id. at pp. 115-116.)
       On appeal, Vanderkous argued that the court should not
have set aside his dismissal, because submission of the case was
effectively vacated when the court requested evidence on the
value of parts of the property. (Vanderkous, supra, 188
Cal.App.4th at p. 117.) The Court of Appeal rejected this
contention, stating that nothing in the record “demonstrates any
intention on the part of the trial court to vacate submission of the
case.” (Ibid.) The court also noted that case law did not support
the assertion that submission of a cause could be “vacated by
implication merely because the trial court ordered post-
submission evidentiary proceedings.” (Id. at p. 118.) The court
concluded that Vanderkous did not have a right to dismiss his
case after it had been submitted and decided by the trial court.
As with Mitchell, the reasoning of Vanderkous is not applicable
here because the court had not ruled on the merits of the case at
the time Shapira sought to dismiss.
       Lifetech also cites Franks v. Cesena (1923) 192 Cal. 1,
which relied on a trial court order to determine that the case had
been submitted. There, a quiet title action was tried before the
court. The court minutes stated, “‘And the evidence being closed,
it was ordered that said cause be and the same is hereby
submitted to the court for consideration and decision on briefs of
10, 15 and 5 days.’” (Id. at p. 2.) The plaintiff later attempted to
dismiss the case, and the question before the Supreme Court was




                                14
“whether or not the dismissal was entered ‘before the final
submission of the case.’” (Id. at p. 3.) The Court held that the
court’s order made it clear that the case had been submitted at
the close of evidence, not when the final briefs were filed: “The
question of whether or not the case is submitted at the conclusion
of the testimony depends upon the terms of the order made at
that time. There is no doubt that the court could reserve the
order of submission until after the filing of briefs, or could
provide in the order of submission that the case should stand
submitted upon the filing of the closing brief, but where the order
reads as in this case, ‘it was ordered that said cause be and the
same is hereby submitted to the Court for consideration and
decision on briefs of 10, 15 and 5 days,’ the submission of the case
is not deferred until the filing of the final brief.” (Id. at p. 3.)
        Lifetech argues that Shapira’s dismissal was void because
the trial court “did not determine at the close of trial that it
would defer the final submission of the case until after the closing
briefs; it issued its order ‘deeming’ the matter already submitted
at the 1/13/17 ex parte application hearing; and it reiterated its
decision at the attorney’s fees hearing.” The only record citations
for these statements are to Lifetech’s own notice of ruling and a
declaration by Lifetech’s counsel. There is no indication from the
court itself that this was its holding. Indeed, these assertions
directly contradict the court’s own statements. At the close of
trial, the court said, “[U]pon receipt of the reply brief, the matter
will stand submitted.” And to ensure there was no confusion
about that issue, the court stated at the attorney fees hearing
that the parties’ choice to present closing arguments in briefs “in
no way, suggests that the matter was submitted. There is no
submission here.”




                                 15
       It is clear, therefore, that the trial court did not deny
Shapira’s request to dismiss on the basis that the case had been
“submitted” at the time Shapira requested to dismiss. Instead,
the court appears to have denied Shapira’s dismissal request on
fairness grounds based on the anticipated award of attorney fees
under section 1717. The court noted that there had been a full
trial, and stated, “I can’t imagine under any circumstance that
you could just voluntarily dismiss – well, it looks like a losing
battle here, so I am going to avoid the attorney’s fees – that’s just
sabotage. It is sandbag. It is improper.” The court also stated, “I
think the attorney’s fees are appropriate. There was a great deal
of work that went into this case.”
       Although the court’s position is understandable from a
fairness perspective, its reliance on Shapira’s rationale in
refusing to dismiss the case was erroneous under the law. “The
question of whether a plaintiff’s voluntarily dismissal is timely
under section 581 depends upon—and must remain tethered to—
a reasonable construction and application” of the statutory
language, and “a plaintiff’s subjective lack of good faith in
seeking a dismissal does not, by itself, terminate the statutory
right to dismiss.” (Lewis C. Nelson & Sons, Inc. v. Lynx Iron
Corp. (2009) 174 Cal.App.4th 67, 78.) The court criticized what it
perceived to be Shapira’s motives in seeking to dismiss the case,
but this is not a valid basis for denying a request for dismissal.
(See, e.g., Gogri v. Jack In The Box Inc. (2008) 166 Cal.App.4th
255, 265, fn. 8 (Gogri) [“an objective, not a subjective, standard
should apply in determining the timeliness of a section 581
voluntary dismissal.”].)
       The court therefore erred by awarding attorney fees to
Lifetech as prevailing party. Because the case should have been




                                 16
dismissed, section 1717(b)(2) barred an award of attorney fees:
“Where an action has been voluntarily dismissed or dismissed
pursuant to a settlement of the case, there shall be no prevailing
party for purposes of this section.” A trial court lacks discretion
to award fees under section 1717(b)(2) where a case has been
voluntarily dismissed. (See, e.g., Gogri, supra, 166 Cal.App.4th
at p. 274; Mesa Shopping Center-East, LLC v. Hill (2014) 232
Cal.App.4th 890, 903.)
       Section 1717(b)(2) helps “encourage parties to dismiss
pointless litigation.” (Ford Motor Credit Co. v. Hunsberger (2008)
163 Cal.App.4th 1526, 1531.) Had the Legislature intended
section 1717(b)(2) to apply only to pretrial dismissals, or to
otherwise set a time limitation cutting off the application of
section 1717(b)(2), we assume it would have stated as much. As
section 1717(b)(2) exists now, there is no such limitation. The
parties have not cited any authority, and we have found none,
holding that section 1717(b)(2) does not apply after the
commencement of trial.
       As Shapira points out, this case is similar to Marina
Glencoe v. Neue Sentimental Film AG (2008) 168 Cal.App.4th 874
(Marina Glencoe), a breach of lease case. There, the trial court
bifurcated the trial into stages to determine alter ego allegations
and damages. After the plaintiff rested in the alter ego phase,
the defendant moved for judgment pursuant to Code of Civil
Procedure section 631.8. The court heard argument on the
motion but did not rule; the following day, the plaintiff filed a
dismissal of the case with prejudice. (Id. at p. 876.) The
defendant moved for attorney fees as prevailing party, and the
trial court denied the motion. (Id. at pp. 876-877.)




                                17
       This Division held that the dismissal and denial of attorney
fees was appropriate. We acknowledged the case law holding
that attempts to dismiss a case without prejudice under section
581, subdivision (b) may be inappropriate where the court has
indicated that a case will be terminated in the defendant’s favor.
However, “[u]nlike the plaintiffs in those cases, respondent filed a
voluntary dismissal with prejudice. Its intent was to end the
litigation, not to manipulate the judicial process to avoid its
inevitable end. This was entirely proper.” (Marina Glencoe,
supra, 168 Cal.App.4th at p. 878.) We also pointed out that
section 1717 does not include “an intent to punish a party by
awarding attorney fees,” but instead “specifically contemplates
the voluntary dismissal of an action as an exception to an award
of fees to the prevailing party.” (Id. at p. 879.)
       The same reasoning is applicable here. Shapira voluntarily
dismissed his case after the commencement of trial, and before
the case had been submitted to the court for decision. The court
did not state that the case was under submission, and it had not
given any indication that it was inclined to rule against Shapira
on the merits. Shapira had a right to dismiss the case under
section 581(e), and as a result, pursuant to section 1717(b)(2)
Lifetech was not a prevailing party entitled to attorney fees. The
court erred by refusing to honor Shapira’s dismissal, and by
awarding Lifetech attorney fees as prevailing party.




                                18
                         DISPOSITION
      The order of the court awarding attorney fees is reversed,
and the case is remanded for further proceedings consistent with
this opinion. Shapira is entitled to costs on appeal.

              CERTIFIED FOR PUBLICATION



                          COLLINS, J.

We concur:



WILLHITE, Acting P. J.



MANELLA, J.




                               19
