
35 Cal.App.4th 1808 (1995)
42 Cal. Rptr.2d 459
MORTON DORMAN, Plaintiff and Appellant,
v.
DWLC CORPORATION, Defendant and Appellant.
Docket No. B072335.
Court of Appeals of California, Second District, Division Four.
June 27, 1995.
*1811 COUNSEL
Robert Marc Hindin for Plaintiff and Appellant.
Ervin, Cohen & Jessup and Ronald M. St. Marie for Defendant and Appellant.
[Opinion certified for partial publication.[*]]
OPINION
HASTINGS, J.
This appeal and the related cross-appeal involve the sufficiency of monetary damages awarded to a landlord after a long-time commercial tenant vacated and left the premises in disrepair. The property in question is a commercial building on La Cienega Boulevard in Culver City, which was operated at all relevant times as the Dorman-Winthrop men's clothing store.
Appellant and cross-respondent, the tenant, is a corporation named DWLC Corporation (hereinafter referred to as Tenant). Respondent and cross-appellant, Morton Dorman, was the landlord at all relevant times (hereinafter referred to as Landlord). The lease agreement was entered into in 1981. It expired by its own terms in May 1989, and then became a month-to-month tenancy subject to essentially the same terms and conditions but with an increase in rent of almost $6,000 per month.
In February 1990, Landlord entered into an escrow for the sale of the building to Frank Festa (Buyer). Shortly thereafter, on February 28, 1990, Tenant moved out, leaving the premises in a state of disrepair. Landlord ultimately expended approximately $17,000 to repair and clean up the premises and also was required to reduce the purchase price by $31,200 for the Buyer's expenditures in installing a new roof and a new air conditioning system.
Landlord then sued Tenant in Los Angeles Superior Court, seeking $50,000, plus attorney fees and costs. After unsuccessful attempts at settlement and court-ordered arbitration, the matter was tried before the court, and *1812 the judge awarded Landlord damages in the amount of $22,910 for cleaning, necessary repairs to the roof, electrical system and air conditioning, plus prejudgment interest on the entire amount from the date suit was filed. It denied Landlord's request for attorney fees and costs.
On appeal, Tenant contends that the court erred in calculating the damage award for the roof and in awarding prejudgment interest. In its cross-appeal, Landlord contends the court should have awarded a greater amount for damages to the roof, air conditioning and electrical systems and that the court erred in denying Landlord its attorney fees and costs.
In the unpublished portion of this opinion, we uphold the award of damages to respondent and reverse the award of prejudgment interest. In the published portion of this decision, we reverse that portion of the judgment denying an award of attorney fees and costs. The matter is then remanded to the trial court for further proceedings.

DISCUSSION

A., B.[*]
.... .... .... .... .... .... .... .

C. Landlord's Attorney Fees


a. Should attorney fees have been added to the base judgment?

Landlord filed suit in superior court, seeking over $50,000 in damages plus attorney fees and costs. The jurisdictional minimum amount in controversy for a lawsuit in superior court is $25,000. (Code Civ. Proc., § 86.) During a pretrial settlement attempt, the court had indicated it thought the value of the case was potentially $38,000. However, the case did not settle. When trial commenced, the court indicated to the parties: "[B]oth sides were advised in chambers that, first, if the [Landlord] recovers less than the jurisdictional amount of this Court, this Court is entitled to deny the [Landlord] any costs and second, if the [Landlord] recovers less than whatever amount was awarded at the arbitration proceeding, the [Tenant] is entitled to costs and that includes attorneys fees. That's made known."[2] After the close of evidence and prior to argument, the court evaluated the damages to be approximately $26,400. After argument, in open court, the court indicated *1813 damages were $21,200. The ultimate judgment rendered was $22,910. In the judgment and statement of decision, the following is included: "The court, exercising its discretion, will not award [Landlord] costs or attorneys fees. (CCP 1033(a))."
Landlord argues that the trial court erred by not granting attorney fees pursuant to Civil Code section 1717 (hereinafter section 1717) and adding them to the judgment before determining whether the judgment exceeded the municipal court jurisdictional limit. Tenant urges that Code of Civil Procedure section 1033, subdivision (a) (hereinafter section 1033(a)) takes precedence over section 1717, and, hence, because the net judgment was less than $25,000, the trial court did not err.
We have found no cases discussing which statute prevails under the circumstances presented where a party is clearly a prevailing party under both statutes, but the primary damages rendered are within the jurisdictional limits of the municipal court. Each statute incorporates the concept of prevailing party as the key to recovery of fees or costs.
Section 1033(a) provides: "In the superior court, costs or any portion of claimed costs shall be as determined by the court in its discretion in accordance with Section 1034 where the prevailing party recovers a judgment that could have been rendered in a court of lesser jurisdiction." (Italics added.)[3] The term "prevailing party" is defined in Code of Civil Procedure section 1032: "(a) As used in this section, unless the context clearly requires otherwise: [¶] ... [¶] (4) `Prevailing party' includes the party with a net monetary recovery...." Code of Civil Procedure section 1033.5 lists what items the Legislature has determined to be allowable costs pursuant to section 1032, and includes attorney fees when authorized by contract.
Section 1717, subdivision (a) provides: "In any action on a contract, where the contract specifically provides that attorney 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 ... shall be entitled to reasonable attorney's fees in addition to other costs. ..." (Italics added.)[4]
The recent case of Hsu v. Abbara (1995) 9 Cal.4th 863 [39 Cal. Rptr.2d 824, 891 P.2d 804] dealt with discretion of the court in determining whether *1814 a party was a "prevailing party" for purposes of section 1717. The court determined that the trial court has no discretion to deny attorney fees to a clearly prevailing party where the contract sued upon provides for attorney fees: "Here, the judgment was a `simple, unqualified win' (Deane Gardenhome Assn. v. Denktas [1993] 13 Cal. App.4th 1394, 1398 [16 Cal. Rptr.2d 816]) for the Abbaras on the only contract claim between them and the Hsus. In this situation, the trial court had no discretion to deny the Abbaras their attorney fees under section 1717 by finding, expressly or impliedly, that there was no party prevailing on the contract. The record contains no substantial evidence to support such a finding." (9 Cal.4th at p. 876.)
Here, there is no doubt but that Landlord was the prevailing party pursuant to Hsu, and as defined within Code of Civil Procedure section 1032. Therefore, we must reconcile which statute, section 1033(a) or section 1717, prevails under the circumstances presented.
"We begin with the fundamental rule that a court `should ascertain the intent of the Legislature so as to effectuate the purpose of the law.' [Citation.] In determining such intent `[t]he court turns first to the words themselves for the answer.' [Citation.] ... Moreover, the various parts of a statutory enactment must be harmonized by considering the particular clause or section in the context of the statutory framework as a whole. [Citations.]" (Moyer v. Workmen's Comp. Appeals Bd. (1973) 10 Cal.3d 222, 230 [110 Cal. Rptr. 144, 514 P.2d 1224].)
(1) In 1986, section 1717 provided that a party shall be entitled to "reasonable attorney's fees in addition to costs." The statute was amended in 1987 to read: "reasonable attorney's fees in addition to other costs." (Stats. 1987, ch. 1080, § 1, p. 3648; italics added.) This evidences an intent by the Legislature to consider attorney fees awarded pursuant to contract as costs.
Before 1990, Code of Civil Procedure section 1033.5, subdivision (a) provided, in pertinent part, as follows: "(a) The following items are allowable as costs under Section 1032: [¶] ... [¶] (10) Attorney fees authorized by statute." In 1990, the Legislature amended the section so that at the time this action was tried it read as follows: "(a) The following items are allowable as costs under Section 1032: [¶] ... [¶] 10. Attorney fees, when authorized by either of the following: [¶] (A) Contract. [¶] (B) Statute." (Stats. 1990, ch. 804 (Assem. Bill No. 331) § 1, italics added.)
By these amendments, we conclude that the Legislature intended that an award of attorney fees pursuant to section 1717 should be in harmony with *1815 the statutory scheme relating to costs contained in the Code of Civil Procedure, section 1032 et seq. Therefore, discretion to award attorney fees pursuant to section 1717 is controlled by the provisions of section 1033 in that situation where the primary damages awarded are less than the jurisdictional limit of a court of lesser jurisdiction.
(2) We conclude that Tenant is correct in its interpretation of the statutes and the trial court is not required to add a potential award of attorney fees, pursuant to section 1717, to the damage award before determining whether or not the prevailing party has recovered a judgment in excess of jurisdictional limits. However, that does not mean that the court need not consider the amount of reasonable fees or costs claimed when exercising its discretion pursuant to section 1033.
We now turn to Landlord's claim that the court abused its discretion in failing to award costs and attorney fees.

b. Did the trial court properly exercise its discretion?

(3) "`It is fairly deducible from the cases that one of the essential attributes of abuse of discretion is that it must clearly appear to effect injustice. [Citations.] Discretion is abused whenever, in its exercise, the court exceeds the bounds of reason, all of the circumstances before it being considered. The burden is on the party complaining to establish an abuse of discretion, and unless a clear case of abuse is shown and unless there has been a miscarriage of justice a reviewing court will not substitute its opinion and thereby divest the trial court of its discretionary power.' [Citations.]" (Denham v. Superior Court (1970) 2 Cal.3d 557, 566 [86 Cal. Rptr. 65, 468 P.2d 193], citing and quoting from Loomis v. Loomis (1960) 181 Cal. App.2d 345, 348-349 [5 Cal. Rptr. 550]; see also Blank v. Kirwan (1985) 39 Cal.3d 311, 331 [216 Cal. Rptr. 718, 703 P.2d 58], citing and quoting from Denham.) "The abuse of discretion standard ... measures whether, given the established evidence, the act of the lower tribunal falls within the permissible range of options set by the legal criteria." (Department of Parks & Recreation v. State Personnel Bd. (1991) 233 Cal. App.3d 813, 831 [284 Cal. Rptr. 839], italics added.) A logical concomitant of our review is that there must be sufficient evidence for us to conclude that the action of the trial court was within the permissible range of options set by the legal criteria; here, that no miscarriage of justice has occurred. We cannot so conclude.
(4a) Landlord argues that the statement by the trial court at the beginning of trial relating to recovery of costs and attorney fees suggests that the trial court either prejudged the issue of costs and attorney fees, or, when *1816 issuing the statement of decision, failed to adequately consider all necessary factors in exercising its discretion, citing Greenberg v. Pacific Tel. & Tel. Co. (1979) 97 Cal. App.3d 102 [158 Cal. Rptr. 558]. We disagree that the statement evidences prejudgment of the issue. However, the record does suggest that the court did not give adequate consideration to all of the factors bearing on its exercise of discretion in deciding whether to allow costs and fees.[5]
(5) "The statute (Code Civ. Proc., § 1032, subd. (d)) does not provide any guidance to the trial court with respect to what factors should be considered in the exercise of discretion to determine whether all or a portion of costs should be awarded to the prevailing party. It would seem clear that matters such as plaintiff's assessment of his chances of recovery beyond the jurisdiction of the municipal court when he filed his action  whether reasonable and in good faith  the amount of the recovery  looked at in relationship to the maximum amount of the municipal court jurisdiction  and the amount of costs incurred  are some of the factors to be considered by the trial judge in exercising his discretion under Code of Civil Procedure section 1032, subdivision (d)."[6] (Greenberg v. Pacific Tel. & Tel. Co., supra, 97 Cal. App.3d at p. 108, italics added.)
(4b) In this instance, after the court indicated its tentative decision, the following exchange occurred: "THE COURT: Unless I have miscounted, the award would come to 20,200: 50 percent of the roof, 7500 on the heating and air conditioning, 4200 on the electric, 2,000 on the clean up. 22,200. I think.... [¶] [Counsel for Landlord]: I have it, Your Honor. I think it's  I have 7500, 7500, 4200 and 2,000. Am I correct? [¶] THE COURT: Yes; that's correct. [¶] ... [¶] That would be 22,000. [¶] [Counsel for Landlord]: Actually 23,000. [¶] ... [¶] I'm sorry, 21,200. [¶] THE COURT: Yes, that sounds fair to me. [¶] [Counsel for Landlord]: Without interest and no costs or attorney's fees. [¶] THE COURT: That's a separate issue. [¶] [Counsel for Landlord]: Yes. That we do by cost bill. [¶] THE COURT: Yes. Do you want a statement of decision? [¶] [Counsel for Tenant]: I would like one, Your Honor. [¶] ... [¶] [Counsel for Landlord]: Shall I prepare a judgment? [¶] THE COURT: No. I've got to send out a draft statement of decision. I'll get that out as soon as I can, while my mind is fresh on it. [¶] [Counsel for Landlord]: Your Honor, as to the issue of what was not given at the arbitration as to attorney's fees, and things like that we would do when we file our cost bill. [¶] THE COURT: Exactly, yes." (Italics added.)
*1817 On August 26, 1992, the court filed its written tentative statement of decision, which indicates, in part, as follows: "The court will enter judgment in favor of [Landlord] in the amount of $22,910.[[7]] The court, exercising its discretion, believes that neither party should be awarded costs or attorneys fees. (CCP 1033(a).) [Landlord] is entitled to interest on the judgment."
Landlord objected to the tentative decision, arguing, inter alia, (1) that prejudgment interest should have been awarded, which would increase the award beyond the jurisdiction of the municipal court, and (2) that the court could not have considered all of the factors necessary in order to adequately exercise its discretion pursuant to section 1033. There is no indication that the court entertained a hearing on the objections. Instead, on September 14, 1992, the court issued its statement of decision confirming the tentative decision, including its decision not to award costs and attorney fees.
The record contains no cost bill. It is clear from the final exchange in the reporter's transcript that the court agreed it would consider costs and attorney fees at a later date, in the form of a cost bill. Greenberg v. Pacific Tel. & Tel. Co., supra, 97 Cal. App.3d at pages 108-109, indicates that before a decision is made whether or not to award costs, the amount of costs should be considered. The same is true with regard to the attorney fees incurred. It is apparent that the court decided to deny costs and fees to either party when drafting the statement of intended decision, prior to the time that a cost bill would have been presented. Thereafter, the court signed the statement of decision, apparently without a hearing on the objections. Without the amount and nature of costs and fees incurred, the court did not have all factors before it upon which exercise of its discretion must be based. Without this information we cannot conclude one way or the other whether there has been a miscarriage of justice. There is certainly nothing in the record to conclude that Landlord proceeded in bad faith and did not reasonably believe that the total damages claimed were appropriate. In fact, at one point the trial court indicated that it believed the value of the case may have been as high as $38,000. After the evidence was before the court, but before argument, the court indicated that damages appeared to be $26,400.
We conclude that the court abused its discretion in ruling on the issue of attorney fees and costs without having before it all of the evidence necessary to make a reasoned decision.

DISPOSITION
The judgment is affirmed with respect to the damages awarded for the roof, the air conditioning, the electrical system and cleanup costs. The award *1818 of prejudgment interest is reversed as is the order denying costs and attorney fees. The matter is remanded for a further determination of whether the court should award prejudgment interest, attorney fees and costs, and, if so, to determine the amounts to be awarded. The trial court shall also consider the issue of attorney fees for this appeal. The parties are to bear their own costs on appeal.
Epstein, Acting P.J., and Vogel (C.S.), J., concurred.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for publication with the exception of sections A. & B. of the Discussion.
[*]   See footnote, ante, page 1808.
[2]  Court-ordered arbitration had resulted in an award of $20,900, inclusive of attorney fees, which was, for whatever reason, not accepted.
[3]  Code of Civil Procedure section 1034 provides: "(a) Prejudgment costs allowable under this chapter shall be claimed and contested in accordance with rules adopted by the Judicial Council. [¶] (b) The Judicial Council shall establish by rule allowable costs on appeal and the procedure for claiming those costs."
[4]  Paragraph 31 of the lease in this action provides that "[i]f either party ... named herein brings an action to enforce the terms hereof or declare rights hereunder, the prevailing party in any action, on trial or appeal, shall be entitled to his reasonable attorney fees to be paid by the losing party as fixed by the court." (Italics added.) In his complaint, Landlord included a prayer for reasonable attorney fees pursuant to the lease. In his list of special damages, he requested $7,500 in attorney fees.
[5]  In fact, by awarding prejudgment interest, estimated to be at least $3,746.27, the total judgment of $26,656.27 exceeds jurisdictional limits of the municipal court. Therefore, were we to allow the award of prejudgment interest to stand, the judgment of the trial court denying attorney fees would not be legally supported. (Hsu v. Abbara, supra, 9 Cal.4th 863.)
[6]  Former Code of Civil Procedure section 1032, subdivision (d) is the forerunner of section 1033. In 1986, former section 1032 was repealed, and the current section 1032 added, and section 1033 was added to the code in its present language. (Stats. 1986, ch. 377, §§ 5, 6, 11, pp. 1578-1579.)
[7]  The statement of decision indicated in a footnote that the figure is higher by $1,710 than the amount announced in open court.
