
61 Cal.2d 199 (1964)
390 P.2d 193
37 Cal. Rptr. 425
FLORA CRANE SERVICE, INC., Plaintiff and Appellant,
v.
HARRY D. ROSS, as City and County Controller, etc., et al., Defendants and Respondents.
Docket No. S.F. 21571.
Supreme Court of California. In Bank.
March 24, 1964.
*200 Quentin L. Kopp and Katherine M. Griffin for Plaintiff and Appellant.
*201 Thomas M. O'Connor, City Attorney, and Robert M. Desky, Deputy City Attorney, for Defendants and Respondents.
SCHAUER, J.
Plaintiff appeals from a judgment denying a peremptory writ of mandate in a proceeding to compel various officers of the City and County of San Francisco (hereinafter called "the city") to take the steps set forth in the city charter to certify the availability of funds for payment under a contract for the performance of public improvements.
The dispositive issue is whether at the time mandate was sought the defendant city controller was under a clear ministerial duty to make such certification. For the reasons hereinafter delineated we have concluded that the controller was under such a duty; that he had no lawful excuse for refusing to perform it; and hence that the judgment should be reversed.
The matter was submitted for decision in the trial court upon the pleadings alone, consisting of plaintiff's application for mandate and defendants' answer (with attached exhibits) and return to the alternative writ. Our knowledge of the facts is therefore limited to such pleadings and exhibits.
On August 10, 1959, the defendant director of property of the city caused to be published a call for bids for the razing of five city-owned buildings in connection with a street-widening project. The call for bids declared, inter alia, that "The award of contract will be made subject to certification by the City's Controller...."
Plaintiff, a company doing demolition work, submitted its bid for $4,920, together with the required deposit check in the amount of $1,000. On September 21, 1959, a notice was published declaring that on September 14 the department of public works had approved an "award of contract" by the director of property to plaintiff, "said Company being the lowest regular and responsible bidder therefor in response to a published call for sealed bids...."
On October 19, 1959, a written form of contract embodying this agreement and prepared by the city was signed by plaintiff, and by the director of property on behalf of the city, and approved by the director of public works and the chief administrative officer and, as to form, by the city attorney.[1]*202 The contract provided, inter alia, that it "is made subject to the following terms and conditions:
"(1) Said work shall be commenced by the Company within ten calendar days after being notified by the Director of Property that the City's Controller has certified this contract, and shall be completed within sixty calendar days after date of such notification; ..."
No such certification by defendant controller was made, however, and no notification, either of certification or noncertification, was given to plaintiff by the director of property. Plaintiff nevertheless furnished the required surety bonds, began the work of demolition on October 29, 1959, and completed the same on May 16, 1960. There is no contention that the work was unsatisfactory.
A "Request for Allotment and Certification of [the subject] Contract" was first presented to the controller on July 6, 1960. (The record does not establish by whom it was presented, although the form used for such request is apparently a city form.) On July 13, 1960, the controller determined (and so informed the director of property) that he was "unable to certify [the subject contract] as to funds because of nonconformance with the provisions of section 86 of the Charter of the City and County of San Francisco."[2]
It is admitted in the pleadings that at the time of the *203 award of contract there were sufficient unencumbered funds to the credit of a valid appropriation to pay the whole amount of $4,920; and that at the time of filing the application for mandate unencumbered funds in the amount of $2,988.51 remained to the credit of such appropriation, and sufficient other monies were available for transfer from surplus or reserve funds to make up the total of $4,920.
The application prayed that a writ of mandate issue (1) directing the controller to certify that there is a valid appropriation from which $2,988.51 can be expended to pay plaintiff on the subject contract, (2) directing various defendant city officers to make available by transfer from surplus or reserve funds the sum of $1,931.49 and authorize its use to supplement the just mentioned appropriation, and (3) directing that a warrant in the amount of $4,920 then be drawn on the city treasury and delivered to plaintiff. The trial court denied the application and discharged the alternative writ.
[1] While the granting or denial of this form of relief lies ordinarily in the discretion of the court, it is settled that where the plaintiff shows compliance with the requirements for issuance of the writ, including the lack of any plain, speedy and adequate remedy in the usual course of law, he may be entitled to mandate as a matter of right. (May v. Board of Directors (1949) 34 Cal.2d 125, 133-134 [6] [208 P.2d 661], and cases there cited.) Insofar as here relevant those requirements are (1) a clear and present ministerial duty of the defendant to do an act which the law specially enjoins (Code Civ. Proc., § 1085; Faulkner v. California Toll Bridge Authority (1953) 40 Cal.2d 317, 326 [3] [253 P.2d 659]), and (2) a substantial beneficial interest of the plaintiff in the performance of that duty (Code Civ. Proc., § 1086; *204 Parker v. Bowron (1953) 40 Cal.2d 344, 351 [8-9] [254 P.2d 6]). In the case at bench defendants concede, as they must, that plaintiff has the requisite beneficial interest, and lacks a plain, speedy and adequate remedy at law. The dispositive issue, therefore, is whether at the time mandate was sought defendant controller was under a clear ministerial duty to certify the existence of available funds for the purpose of paying plaintiff under the subject contract. It is not denied that if the controller was under such a duty, then his codefendants were under consequential  and equally compellable  duties to perform the remaining official acts prayed for in this proceeding.
[2] The general powers and duties of the controller are set forth in sections 64 to 68 of the city charter, and deal with such matters as the keeping of accounts and the making of reports and audits of the financial condition of the city and each of its departments. More specifically relevant here are the provisions of the second paragraph of charter section 86 (ante, fn. 2), declaring that no obligation involving the expenditure of money shall be incurred or authorized by any city officer or board "unless the controller first certify that there is a valid appropriation from which the expenditure may be made, and that sufficient unencumbered funds are available in the treasury to the credit of such appropriation to pay the amount of such expenditure when it becomes due and payable." It is apparent that in all instances where such an obligation is contemplated this language imposes a correlative duty on the controller, by virtue of his office, to determine whether the necessary funds are available and, if so, to make the appropriate certification. [3] That duty, moreover, is a ministerial one, for the controller is required only to determine as a matter of fact whether "there is" such an appropriation and whether such funds "are available" in the treasury. A determination of this nature "is a matter of mere calculation requiring no exercise of discretion" (Balding v. Eich (1932) 120 Cal. App. 491, 496 [2] [7 P.2d 1073]). As summarized in 15 McQuillin on Municipal Corporations (3d ed. 1950) page 115, "The officer [here, the controller] certifies to the fact respecting the sufficiency of available funds as it exists when the certificate is made. The duty to certify, being expressly imposed by law, is ministerial and may be compelled by mandamus."
Thus we held in City & County of San Francisco v. Boyd (1941) 17 Cal.2d 606, 615 [8-9] [110 P.2d 1036], that mandate *205 lay to compel the city auditor to certify a five-year employment contract under the first paragraph of the very charter section here in issue, which provides that no such obligation shall be incurred by ordinance or resolution "unless the controller first certify to such board that there is a sufficient unencumbered balance in a fund that may legally be used for such proposed expenditure, and that, in the judgment of the controller, revenues as anticipated in the appropriation ordinance for such fiscal year and properly applicable to meet such proposed expenditure will be available in the treasury in sufficient amount to meet the same as it becomes due." (Italics added.) If performance of a duty involving the "judgment" of the controller was compellable by mandate in Boyd, then a fortiori performance of a duty involving no discretionary element at all (i.e., compliance with the second paragraph of section 86) is compellable by mandate in the case at bench. Similarly a city auditor may be compelled by mandate to certify that a proposed indebtedness of the municipal body can be incurred without violation of any provision of its charter. (Ackerman v. Moody (1918) 38 Cal. App. 461, 462 [176 P. 696]; see also California Pac. Title & Trust Co. v. Boyle (1930) 209 Cal. 398, 400 [287 P. 968], and In re City & County of San Francisco (1923) 191 Cal. 172, 174 [215 P. 549], each holding that the City Auditor of San Francisco (predecessor to the office now occupied by defendant controller) may be compelled by mandate to audit and approve a warrant drawn on the treasury by the appropriate officials and for a valid municipal purpose.)
The same conclusion has consistently been reached in our sister jurisdictions, where it is held that a city auditor or controller may be compelled by mandate to certify that sufficient unencumbered funds have been appropriated to pay the claimant under a contract with the municipal body. (See, e.g., State ex rel. Board of Education v. D'Aulisa (1947) 133 Conn. 414 [52 A.2d 636, 639 [3]]; People ex rel. P.J. Carlin Constr. Co. v. Prendergast (1917) 99 Misc. 8 [163 N.Y. Supp. 583, 585 [1]]; F.W. Mark Constr. Co. v. Hadley (1927) 290 Pa. 544 [139 A. 157, 158-159]; cf. State ex rel. Benz v. District Court (1884) 32 Minn. 181 [19 N.W. 732, 734].)
In the Hadley case the Supreme Court of Pennsylvania, speaking of an earlier decision of that court, said that in such matters as the certification of contracts with the city the controller's duty "is ministerial, and not discretionary; and, *206 if he denies he is required so to do in the particular instance, he must set forth, in his return, legal reasons justifying his denial." (F.W. Mark Constr. Co. v. Hadley (1927) supra, 290 Pa. 544 [139 A. 157, 159].) Here the reason given by defendant controller for refusing to make the requested certification was "non-conformance with the provisions of section 86" of the charter. In support of that position it is stressed that section 86 requires the controller to "first certify" the existence of the necessary funds before an obligation of the city "shall be incurred or authorized"; that here the controller did not do so because the contract papers were not presented to him until after the work was done; and that his refusal to certify at the latter date was justified by the final paragraph of section 86, which declares that "All obligations incurred ... contrary to the provisions of this section, shall be void, and any claim or demand against the city and county based thereon shall be invalid." Defendants rely on the many decisions holding that "the mode of contracting as prescribed by the municipal charter, is the measure of the power to contract; and a contract made in disregard of the prescribed mode is unenforceable" (Miller v. McKinnon (1942) 20 Cal.2d 83, 88 [1] [124 P.2d 34, 140 A.L.R. 570], and cases there cited); and in particular on William Bros. & Haas, Inc. v. City & County of San Francisco (1942) 53 Cal. App.2d 415, 416 [1] [128 P.2d 56], holding that "no enforceable liability arose against the city" under a contract which had not been certified by the controller pursuant to the charter section here in issue.
Defendants' argument, however, misses the point; and the decisions and principles relied on, though well settled in our law, are irrelevant to the case at bench. In each of those decisions a purported contract with a municipal body was entered into in disregard of one or more charter provisions relating to the mode of contracting (e.g., requirement of competitive bidding), and the contractor thereafter sought to recover against the city on that contract. Here, to the contrary, plaintiff is not suing on contract, but rather is seeking by writ of mandate to compel the defendant controller to perform a ministerial duty which is a prerequisite to the validity of the contract itself.[3] The distinction is illustrated, *207 by analogy, in Scannell v. Murphy (1947) 82 Cal. App.2d 844 [187 P.2d 790], where mandate was sought to compel the Sheriff of San Francisco to certify to the civil service commission that certain jail employes had worked eight-hour shifts at night (thereby entitling them to higher overtime pay). In rejecting the defendant's argument that the employes were in effect seeking to recover a sum of money for past services and that mandate does not ordinarily lie for such purpose, the court said (at p. 850 [3-4]), "But that is not the present case. Here the purpose of the proceeding is to compel the head of a department of a governmental agency to certify and transmit payrolls to the other city departments showing the periods these respondents worked on the night shifts during the year in question.... This proceeding was brought to start the chain of municipal action required under the charter as a condition precedent to qualify the respondents for overtime pay. Certification and transmittal by appellant are conditions precedent to a determination of respondents' rights. Mandamus is the proper proceeding for such a purpose." (Italics added.) Here too plaintiff seeks only to "start the chain of municipal action" envisaged in the charter.
[4] It is contended, however, that plaintiff has no remedy because at the time the request for certification was made (and a fortiori at the time the application for mandate was filed) it was too late for the controller to "first certify" the availability of the necessary funds to pay plaintiff on the subject contract. It is argued that the obligation in question had already been "incurred" and hence that by the very terms of section 86 the controller was no longer under a compellable duty to certify.
The city may not so easily profit by its own inaction. Manifestly the controller could not make his certification until the precise amount of the proposed contract had been established; i.e., until the bids had been advertised for and received, and the lowest responsible bid had been ascertained. But thereafter he was under a clear ministerial duty, as pointed out hereinabove, to determine whether the necessary funds were available and, if they were, to so certify the fact.
[5] As plaintiff correctly contends, that duty arose without *208 the need for a specific request therefor by plaintiff; i.e., the controller had an affirmative duty to act in this regard, and cannot now excuse his nonperformance by saying that plaintiff did not make a timely request for certification. While such duty to act is not expressly set forth in the charter, it appears by analogy in the affirmative duty of the controller, imposed by section 85, to audit and process all claims against the city.[4] It appears also by operation of the basic principle that "All things that in law or usage are considered as incidental to a contract, or as necessary to carry it into effect, are implied therefrom...." (Italics added.) (Civ. Code, § 1656.) Under that principle the "award of contract" to plaintiff may be deemed to have included an implied covenant by the city to take whatever steps were required to "carry it into effect," and in particular a covenant to submit the matter to the controller for his determination under section 86.
Moreover, the exhibits in the record before us (relevant portions of which are quoted hereinabove) clearly indicate that it is the city's practice to place this duty to act upon the controller rather than the individual contractor. To begin with, immediately upon determination of the lowest responsible bidder the city makes an "award of contract," such contract being "subject to certification" by the controller at an unspecified later date. That agreement is then processed by the relevant departments of the city government, and a written form of contract is subsequently prepared by the city, approved by the city attorney, and signed by all parties. [6] As quoted at the outset, the formal contract in the case at bench expressly recites that plaintiff was to begin work thereunder within 10 days "after being notified by the Director of Property that the City's Controller has certified this contract...." The clear implication of this language is that in due course the city will submit the contract to the controller for action under charter section 86, and plaintiff will be "notified" of the latter's determination. Bearing out this interpretation is the fact that in the present case the controller's notice of refusal to certify is in the form of an *209 interdepartmental memorandum addressed not to plaintiff but to the director of property. Indeed, it would be absurd to assume that a timely demand by plaintiff was a necessary prerequisite to submission of the matter to the controller for certification while all the other steps in the same contracting process (such as having the contract countersigned by the director of public works, the chief administrative officer, and the city attorney) were performable without any request whatever on plaintiff's part.
To summarize, in the present case the charter requirements relating to competitive bidding were, as they must be, strictly followed; an award of contract was made to plaintiff as the lowest responsible bidder; at that time there was a valid appropriation from which such an expenditure could legally have been made and there were sufficient unencumbered funds standing to the credit of that appropriation to pay plaintiff on the subject contract. In such circumstances the controller was under a clear ministerial duty compellable by mandate to make his certification pursuant to section 86 of the charter, and the unexplained delay in submitting the contract to him for that purpose is chargeable to the city and does not justify the controller's refusal to perform such duty. To permit the city to prevail in the circumstances established here would reward it for its own neglect.
[7] Nor does this conclusion open the door to fraudulent imposition of contractual liabilities on the city, by defeating or in any way impairing the operation of charter section 86. Insofar as here relevant, that provision is a measure of fiscal control designed principally to protect the city and its taxpayers from incurrence of liabilities in excess of specifically appropriated and encumbered funds in the treasury. Ordinarily, of course, the controller will fulfill his duty and the certification will be timely made. In the rare event, as in this case, that the contractor nevertheless performs the work before receiving the formal notice of the certification, he does so at his peril, i.e., at the risk that when certification is thereafter sought there may no longer be sufficient unencumbered funds available to the credit of a valid appropriation from which to pay such expenditure; in that case the city will be placed under no contractual liability for the work performed, since mandate does not lie to compel a public officer to authorize expenditures when the proper funds are lacking. (Tevis v. City & County of San Francisco (1954) 43 Cal.2d 190, 200 [11] [272 P.2d 757]; Sutro Heights Land Co. v. Merced Irr. *210 Dist. (1931) 211 Cal. 670, 703-704 [11] [296 P. 1088].) Here, however, such funds were admittedly available, and the controller had no lawful reason to refuse to so certify.
For the reasons stated the judgment is reversed.
Gibson, C.J., Traynor, J., McComb, J., Peters, J., Tobriner, J., and Peek, J., concurred.
NOTES
[1]  Defendants emphasize that in a statement of claim for "reasonable value of the services performed" filed with defendant controller on August 15, 1960 (i.e., after the controller had neglected and refused to certify), plaintiff asserted that "The contract involved was executed on or about May 15, 1960 in writing, confirming an oral agreement made between claimant and the City and County of San Francisco on or about October 29, 1959." It appears from the record, however, that the contract in question was in fact fully executed by plaintiff on October 19, 1959, the date recited on the face of the document itself. The original of the contract is an exhibit before this court (Defendants' Ex. 1), and attached thereto is a notarial certificate reciting in relevant part as follows: "On this 19th day of October in the year one thousand nine hundred and fifty nine, before me, Rose A. Sandona, a Notary Public in and for the city [and] County of San Francisco, State of California, ... personally appeared R.H. Flora, known to me to be the Vice President of the corporation described in and that executed the within instrument, and also known to me to be the person who executed the within instrument on behalf of the corporation therein named, and acknowledged to me that such corporation executed the same."
[2]  The relevant portion of section 86 begins with its second paragraph: "No obligation involving the expenditure of money shall be incurred or authorized by any officer, employee, board or commission of the city and county unless the controller first certify that there is a valid appropriation from which the expenditure may be made, and that sufficient unencumbered funds are available in the treasury to the credit of such appropriation to pay the amount of such expenditure when it becomes due and payable.

"Every officer who shall approve, allow or pay any demand on the treasury not authorized by law, ordinance or this charter, shall be liable to the city and county individually and on his official bond for the amount of the demand so illegally approved, allowed or paid.
"Each such certification shall be immediately recorded by the controller. Each sum so recorded shall be an encumbrance for the purpose certified until such obligation is fulfilled, cancelled or discharged, or until the ordinance or resolution is repealed by the board of supervisors.
"All obligations incurred, all ordinances passed, and resolutions and orders adopted, contrary to the provisions of this section, shall be void, and any claim or demand against the city and county based thereon shall be invalid." (Stats. 1931, ch. 56, pp. 3030-3031.)
[3]  For similar reasons we need not consider the relevance of plaintiff's contention that "Where a municipality is required by statute to call for bids and must under competitive bidding conditions let the contract to the lowest responsible bidder, the making of the award creates a contract between the public body and the successful bidder" (citing City of Susanville v. Lee C. Hess Co. (1955) 45 Cal.2d 684, 694 [11]-695 [12] [290 P.2d 520], and Williams v. City of Stockton (1925) 195 Cal. 743, 747 [1]-749 [5] [235 P. 986]).
[4]  Insofar as here relevant, section 85 provides: "The controller shall audit such claims. If he finds the same to be correct and proper in all particulars, and clearly within the purposes for which the appropriation item to which it is charged was made, and that there is an adequate balance in such appropriation item to meet the payment, he shall draw and approve the warrant therefor."
