940 F.2d 1260
37 Cont.Cas.Fed. (CCH)  76,175
UNITED STATES for the Use of PALMER CONSTRUCTION, INC.,Plaintiff-Appellee,v.CAL STATE ELECTRIC, INC.;  United Pacific Reliance InsuranceCompany, Defendants-Appellants.
No. 90-55575.
United States Court of Appeals,Ninth Circuit.
Argued and Submitted July 10, 1991.Decided July 31, 1991.

Howard A. Allen, Evelyn R. Wiggins, Deb C. Pedersdotter, Hillyer & Irwin, San Diego, Cal., for defendants-appellants.
Irwin E. Sandler, Sandler & Breier, Los Angeles, Cal., for plaintiff-appellee.
Appeal from the United States District Court for the Central District of California.
Before REINHARDT and FERNANDEZ, Circuit Judges, and CROCKER,* District Judge.
FERNANDEZ, Circuit Judge:


1
This case presents a clash of principles at the interface between the law of expressed contracts and the law of quasi contracts.  Here, Cal State Electric, Inc.  (CSE) entered into a contract with Palmer Construction, Inc.  (Palmer).  Palmer breached its contract, and after a trial the district court found that CSE should pay damages and attorneys fees to Palmer.  CSE appealed1 the final judgment arising out of that somewhat jarring result.  We agree that the judgment is in error and reverse.

BACKGROUND FACTS

2
CSE entered into a prime contract with the U.S. Army Corps of Engineers to construct the STS Power Plant at Vandenburg Air Force Base in California.  CSE then entered into a contract with Palmer in which a portion of the work was subcontracted to the latter entity.  The contract price for Palmer's work was to be $220,162.  Due to agreed extra work, an additional $14,975 was added to the contract price for a total of $235,137.


3
Palmer commenced work but, after completing a portion of the job, Palmer breached.  There is no doubt about that.  By the time of the breach Palmer had supplied some goods and services which the district court found to have a value of $204,845.26.  Against the sum, CSE had already paid Palmer a total of $114,758.98, and after Palmer's breach CSE was required to expend the further sum of $126,673.56 in order to complete the work that Palmer had contracted to do.


4
CSE had, thus, paid out a total of $241,432.54 in order to obtain a job that it had contracted to get from Palmer at a price of $235,137.  Therefore, CSE had suffered damages in the amount of $6,295.54.  The district court so found.


5
However, rather than leaving matters where they stood, the district court went on to reflect on the fact that since the value of Palmer's work was $204,845.26 and it had only received $114,758.98, it was entitled to reimbursement for the rest of those services, less the "damage" done to CSE.  The result of that calculation, after also giving CSE prejudgment interest of $1,468.88, was a net sum due to Palmer of $82,321.86 plus attorneys fees.


6
Not surprisingly, CSE, the innocent party, expressed its chagrin at a result that required it to pay additional sums to Palmer plus attorneys fees.  It argues that this was caused by a misapplication of legal principles.  We agree.

JURISDICTION AND STANDARDS OF REVIEW

7
This is a Miller Act case over which the district court had jurisdiction pursuant to 40 U.S.C. Sec. 270b.  We have jurisdiction pursuant to 28 U.S.C. Sec. 1291.


8
"[S]tate law controls the interpretation of Miller Act subcontracts to which the United States is not a party."    United States ex rel. Leno v. Summit Constr. Co., 892 F.2d 788, 792 (9th Cir.1989) (citations omitted).  Here the contract should be interpreted under the law of California.  The district court's computation of the damage award is a finding of fact reviewable under the clearly erroneous standard except to the extent that the legal principles have been misapplied, in which event the issue is reviewed de novo.  United States ex rel. Morgan & Son Earth Moving, Inc. v. Timberland Paving & Constr. Co., 745 F.2d 595, 599 (9th Cir.1984).


9
Identification of the prevailing party for purposes of California Civ.Code Sec. 1717 is an issue that we review for abuse of discretion.  Krueger v. Bank of America, 145 Cal.App.3d 204, 217, 193 Cal.Rptr. 322 (1983).

DISCUSSION

10
A. The Measure and Allocation of Damages.


11
The question which faces us on this appeal is one of some jurisprudential complexity.  It has engaged the attention of commentators for many years.  As a matter of pure contract law it is generally true that if two individuals enter into a contract and one breaches, the breaching party cannot obtain a recovery from the innocent party.  Rather, if the innocent party has suffered, a recovery against the party in breach is generally accorded.  See, e.g., California Civil Code Sec. 3300;  Bruckman v. Parliament Escrow Corp., 190 Cal.App.3d 1051, 235 Cal.Rptr. 813 (1987).  In building contracts "[t]he measure of damages ... is the reasonable cost ... to finish the work in accordance with the contract." Walker v. Signal Cos., Inc., 84 Cal.App.3d 982, 993, 149 Cal.Rptr. 119 (1978).


12
On the other hand, if the breaching party has conferred a benefit upon the innocent party rather than a detriment, it would unjustly enrich the innocent party and unduly punish the breaching party if the latter received nothing for its services.  Quasi contract principles will supply the remedy for that.  See 12 S. Williston, A Treatise on the Law of Contracts Secs. 1479-84 (3rd ed. 1970) (Williston).  See also 1 B. Witkin, Summary of California Law (Contracts) Secs. 91-96 (9th ed. 1987);  55 Cal.Jur.3d (Restitution) Sec. 66-67 (1980).


13
These policies appear to conflict to some extent, so anyone who considers them must reconcile their opposing tendencies.  When faced with these propositions, the commentators have resolved them by stating that the breaching party is entitled to the reasonable value of its services less any damages caused by the breach.  See 5A A. Corbin, Corbin on Contracts Sec. 1124 (1964).  They have added that the breaching party should not, in any event, be able to recover more than the contract price, or perhaps even a ratable part of that contract price.  Id.  See also, 5 A. Corbin, Corbin on Contracts Sec. 1113 at 606 (1964).  Williston puts it as follows:


14
The true measure of quasi contractual recovery, where the performance is incomplete but readily remediable, is the unpaid contract price less the cost of completion and other additional harm to the defendant except that it must never exceed the benefit actually received by him.  This is the net benefit by which the defendant is enriched.


15
Williston Sec. 1483 at 301.


16
While this phraseology is somewhat more complex, it can readily be seen that the effect is to preclude a recovery by the breaching party which will cause the innocent party to pay more than the contract price itself.2   The Restatement is in accord with this approach, for while it, too, allows for recovery for part performance, it indicates that the amount of that recovery is not only limited to the extent that the innocent party's gain exceeded its loss, but is also limited to no more than a ratable portion of the total contract price.  Restatement (Second) of Contracts Sec. 374 comments a & b (1981).


17
It is interesting to observe that treatise illustrations of the application of these principles demonstrate that the innocent party never winds up paying a total that is more than the contract price itself.  See, e.g., Restatement (Second) of Contracts Sec. 374 comment b, illustrations (1981).  That is sensible.  Were it otherwise, there would be a powerful inducement to breach rather than complete any contract which did not turn out to be profitable.  By doing so, the ultimate loss of the bargain would be shifted from the breaching party to the innocent party, which is precisely what would occur in the case at hand if the district court's judgment stands.


18
Palmer has referred us to cases from our and other circuits but not one of them stands for the proposition that an innocent party must pay more than the contract price for the goods or services it sought.  See United States ex rel. C.J.C., Inc. v. Western States Mechanical Contractors, Inc., 834 F.2d 1533 (10th Cir.1987) (breaching prime contractor had to pay quantum meruit charges to subcontractor);  United States ex rel. Coastal Steel Erectors, Inc. v. Algernon Blair, Inc., 479 F.2d 638 (4th Cir.1973) (same);  Sicula Oceanica, S.A. v. Wilmar Marine Eng'g & Sales Corp., 413 F.2d 1332 (5th Cir.1969) (actual amount of damages not decided;  no suggestion that innocent party must pay more than agreed upon price);  American Surety Co. v. United States ex rel. B & B Drilling Co., 368 F.2d 475 (9th Cir.1966) (breaching party could recover for what it did at the contract rate less setoffs for damages incurred on account of the breach).


19
Moreover, if the breaching party were permitted to recover an amount that leaves the innocent party paying more than the contract price for the goods and services contracted for, that would cause an increase in the loss to the innocent party on account of the breach and would offset the additional amount demanded by the breaching party.  However, no such paraphrastic principles are needed if the cost to the innocent party for the goods and services contracted for is limited to the contract price itself.  The breaching party would then be required to pay damages for excess costs imposed upon the innocent party.


20
California law is not to the contrary.  In the leading case of Roseleaf Corp. v. Radis, 122 Cal.App.2d 196, 264 P.2d 964 (1953), the court dealt with a situation where a purchaser of property was to obtain a new refinancing loan in an amount not to exceed $75,000.  Instead, the purchaser obtained a loan for $125,000.  That loan was accepted by the seller.  When the purchaser sought credit for the costs of obtaining the loan, the seller claimed that the purchaser had no entitlement whatever because the purchaser had breached.  The court disagreed and, instead, awarded the purchaser a credit in the amount of the costs that would have been proper if a $75,000 loan had been obtained.


21
In reaching that unexceptional conclusion the court pointed to the fact that the case was one of "imperfect performance, accepted without waiver of a claim for damages....".  122 Cal.App.2d at 203-04, 264 P.2d 964.    It went on to quote Williston to the effect that the issue of damages for a breaching party is one which has caused great difficulties and differences of opinion because there is a clash of fundamental policies.  Those policies were identified as:


22
On the one hand, it seems a violation of the terms of a contract to allow a plaintiff in default to recover--to allow a party to stop when he pleases and sell his part performance at a value fixed by the jury to the defendant who has agreed only to pay for full performance.  On the other hand, to deny recovery often gives the defendant more than fair compensation for the injury he has sustained and imposes a forfeiture on the plaintiff.


23
Id. at 205, 264 P.2d 964.


24
The court stated that "[t]here is no hard and fast rule in cases of imperfect performance by which liability of the promisee to render compensation, and the amount of an allowable recovery can be judged."    Id. at 204, 264 P.2d 964.    It then went on to state that there had been no harm to the seller, so that the proper measure of damages would be the contract price, for "there was no difference in amount between the contract price, less damages, and the value of the financing" to the seller.  Id. at 207, 264 P.2d 964.    In other words, the seller simply paid the amount it contracted to pay, no more, no less.  Similarly Lacy Mfg. Co. v. Los Angeles Gas & Elec. Co., 12 Cal.App. 37, 106 P. 413 (1909), to which Palmer earnestly draws our attention, allowed a party whose performance was late to recover the value of his services, less damages for late performance.  It contains no hint that the recovery could be more than the contract price.  Palmer also presses Castagnino v. Balletta, 82 Cal. 250, 23 P. 127 (1889) upon us.  It is no more to the purpose than the other cases brought to our attention.  There the innocent subcontractor recovered the contract price plus agreed upon extras.


25
It is, therefore, apparent that the district court erred when it offset the damages to CSE against the raw value of the work done by Palmer, with the result that CSE was ordered to absorb the loss that Palmer incurred by entering into a contract which turned out to be unprofitable to it.  Instead, when it became apparent that Palmer's breach actually cost CSE $6,295.54 more than the contract price, CSE should have been awarded its damages and Palmer should have recovered nothing.3B. Attorneys Fees.


26
The contract between CSE and Palmer provided for an award of attorneys fees to the prevailing party.  Given that, we apply the law of California to the contract.  United States ex rel. Reed v. Callahan, 884 F.2d 1180, 1185 (9th Cir.1989), cert. denied, --- U.S. ----, 110 S.Ct. 1167, 107 L.Ed.2d 1069 (1990).  That law approves of the enforcement of attorneys fee provisions.  Cal.Civ.Code Sec. 1717.  The district court recognized that but, because it considered Palmer to be the prevailing party,4 fees were awarded to Palmer.  In light of our decision on the merits, that was an error.  On the contrary, fees should have been awarded to CSE.  On remand, the amount of those fees must be determined.5

CONCLUSION

27
It is possible to syncretize the principles which require people to carry out their contracts and those which prevent people from unjustly retaining benefits conferred upon them.  In other words it is possible to reach a just result in cases which involve both principles.  We hold that where, as here, the innocent party has paid more than the contract price for the goods and services ordered from the breaching party, the innocent party may recover the overage from the breaching party.  The breaching party may not obtain a quasi contractual recovery from the innocent party.  In short, the innocent party is not unjustly enriched when it receives what it bargained for and pays no more than the contract price.


28
CSE is therefore entitled to recover the sum of $6,295.24 plus prejudgment interest of $1,478.88 from Palmer.  CSE is also entitled to recover attorneys fees and costs for its litigation expenses in the district court, as well as its costs on appeal.


29
REVERSED AND REMANDED for entry of judgment in favor of CSE and for a determination of the amount of attorneys fees and costs to which CSE is entitled.

REINHARDT, Circuit Judge, concurring:

30
I concur in Judge Fernandez's fine opinion harmonizing various principles of law.  However, I do not think the problem is nearly as complicated as it appears.  All that is required is a little common sense.


31
In the rush of dealing with an overwhelming daily calendar, the district judge made a simple error, as we all do from time to time.  She could have applied the two formulas that she utilized and reached the right result.  The error occurred because she applied them in the wrong order.  These things happen.


32
Conceptually, it is easy to see the error that results when the damages formula is applied first and the quantum meruit formula second.  Under that approach, the damages included in the damage formula are not the total damages CSE will incur--they fail to include the quantum meruit payment, which has not yet been calculated, but which it will be required to pay.  Thus, if both formulas are to be utilized, CSE's damages cannot properly be determined until after the quantum meruit calculation is performed.  Otherwise, we may end up, as we did here, with the non-breaching party having to pay more than the contract price.


33
On the other hand, when the quantum meruit theory is applied first, we determine at the outset that Palmer would be entitled to an additional payment of $90,086.28 for the work actually performed.  If we then required that the additional amount be paid, Palmer's total payment would be $204,845.26.  Instead, however, we proceed to step 2--the determination of CSE's actual damages.  We then find that if CSE is required to pay Palmer the unpaid amount of $90,086.28, and thus the total amount of $204,845.26, the total cost to CSE for the job would be $331,521.82--since CSE was also required to pay a third party the sum of $126,673.56 to finish the job.  Because the contract price was only $235,137.00, the damages to CSE would be $96,384.82.  However, we next subtract from CSE's damages the $90,086.28 that it theoretically owes Palmer in quantum meruit (but need not pay because it is less than Palmer owes).  As a result, we find that CSE's actual damages are reduced to the correct amount--$6,295.54.  Voila!


34
All this mathematical exercise proves is that if the district judge had applied the two theories in the proper order, she would have come to the correct result.  Thus express contract law and quantum meruit doctrines can be harmonized and live together happily ever after.


35
Judge Fernandez's learned approach certainly provides a more intellectual explanation of clashing legal principles.  It also provides a simpler and preferable method of calculating damages.  The only purpose of this concurrence is to show that from a practical and mathematical standpoint the two legal principles discussed in Judge Fernandez's opinion are not in conflict.


36
The elementary rules that emerge from both of our analyses are relatively simple.  When the party performing the work breaches the contract, it may nevertheless recover all or a portion of the value of the services it has actually rendered, but only under certain circumstances.  The breaching party may not recover any amount which, when added to the amount previously paid it, and the amount paid or owing to any party whose services are used to complete the job, would cause the contract price to be exceeded.  As Judge Fernandez's opinion clearly states, the contract price represents a ceiling on the amount the non-breaching party may be required to pay--in toto.    Similarly, regardless of the value of the work performed by the breaching party, if the amount the non-breaching party must pay to a third party to finish the job, when added to the amount it has already paid to the breaching party, exceeds the contract price, the non-breaching party may recover the excess amount from the breaching party as damages.  Thus, depending on the amount already paid the breaching party, the value of the labors it has performed, and the amount required to finish the job, the same breach may result in a recovery by either the breaching or non-breaching party.  Who recovers is not a function of who breaches--what matters is who has already paid how much to whom for what.


37
Finally, I want to emphasize that it is not necessary to utilize the two-step process illustrated at the beginning of this separate opinion.  One step will do.  However, all the figures must be calculated first.  It will then be possible to apply the applicable legal principles to that set of figures and determine who owes how much to whom.



*
 Honorable M.D. Crocker, Senior United States District Judge for the Eastern District of California, sitting by designation


1
 Its surety, United Pacific Insurance Company, also appeals.  We, hereafter, simply refer to CSE, because the interests of the surety and CSE are congruent for present purposes


2
 In the case at hand, for example, the mathematics would come out as follows:  (a) contract price--$235,137.00;  (b) unpaid portion--$120,378.02;  (c) cost of completion--$126,673.56;  (b) - (c) = -$6,295.54, which is exactly the damage to CSE and which leaves no quasi contractual recovery for Palmer


3
 Of course, if CSE had not previously paid out $114,758.98 to Palmer, there could have been some amount due to Palmer.  That is the situation that has usually been illustrated by the commentators.  But payment had been made.  Far from being entitled to recover more, Palmer should have been ordered to disgorge part of what it already had received


4
 We need not consider whether that was proper when, as here, the recovery was not directly based upon the contract itself


5
 CSE did not request fees on appeal.  Thus, we make no direction that it receive an award of fees for its prosecution of this appeal.  See Ninth Circuit Rule 28-2.3


