
    [S. F. No. 1012.
    Department Two.
    June 17, 1899.]
    F. BERKA, Respondent, v. J. G. WOODWARD, Treasurer of the City of Santa Rosa, Appellant.
    Municipal Corporations—Illegal Contract by Member of Council—Implied Contract Prohibited.—The provisions of <i city charter and of the Political Code forbidding a member of the city council to be directly or indirectly interested in any contract made by the council, and of the Penal Code providing a penalty therefor, apply both to express and implied contracts; and a member of such council who has expressly contracted with it for the sale of lumber and materials to the city, cannot recover their value upon an implied contract.
    Id—Recovery upon Implied Contract, When Permissible.—It is only where contracts of public officers with their counties or municipalities have not been expressly forbidden by law, and are not malum in se, but are merely considered contrary to public policy, that the officer is allowed to recover upon an implied contract, upon a quantum meruit or quantum valelat. But no recovery of any kind can be had where the contract is either malum in se, or expressly prohibited.
    Id.—Effect of Penalty—Illegal Contbact—Where a statute pronounces a penalty for an act, a contract founded upon such act is void, even though the statute does not pronounce it void nor expressly prohibit it.
    Id.—Allowance of Claim by Council—Duty of Tbeasureb—Mandamus.—The allowance of a claim by the city council for the value of lumber and materials sold to the city by a member of the council does not give the claim a validity not otherwise possessed. It is the duty of the treasurer to pay only legal demands against his funds; and he cannot be compelled by mandamus to pay such claim.
    APPEAL from a judgment of the Superior Court of Sonoma County. S. K. Dougherty, Judge.
    The facts are stated in the opinion of the court.
    O. O. Webber, City Attorney, and J. Leppo, for Appellant.
    The contracts upon which the warrants were based were illegal and void, and no recovery could be had thereunder. (Stats. 1875-76, pp. 255, 256; Pol. Code, secs. 920, 921; Pen. Code, sec. 71; Civ. Code, secs. 1607, 1608, 1667; Fowler v. Scully, 72 Pa. St. 456; 13 Am. Rep. 708; Brooks v. Cooper, 50 N. J. Eq. 761; 35 Am. St. Rep. 801, 802; Swanger v. Mayberry, 59 Cal. 93, 94; Santa Clara Mill etc. Co. v. Hayes, 76 Cal. 390; 1 Am. St. Rep. 211; Gardner v. Tatum, 81 Cal. 373; Morrill v. Nightingale, 93 Cal. 458; Visalia etc. Co. v. Sims, 104 Cal. 332; 43 Am. St. Rep. 105; Wyman v. Moore, 103 Cal. 214; Capron v. Hitchcock, 98 Cal. 430; Alexander v. Johnson, 144 Ind. 82; Winchester etc. Light Co. v. Veal, 145 Ind. 506; Woods v. Armstrong, 54 Ala. 150; 25 Am. Rep. 671.) In case of a municipal corporation there can be no waiver of the illegality of a contract therewith, by virtue of a public law. (Civ. Code, see. 3513; Fowler v. Scully, supra; Mullan v. State, 114 Cal. 587.)
    D. E. Gale, and Campbell & Campbell, for Respondent.
    Plaintiff had the right to recover upon an implied contract. The party receiving the benefit, though the contract was illegal, is held to accountability upon an implied promise to prevent a failure of justice. (Concordia v. Hagerman, 1 Kan. App. 35; 
      Gardner v. Butler, 30 N. J. Eq. 702; Spearman v. Texarcana, 58 Ark. 348; Pickett v. School Dist., 25 Wis. 551, 558; 3 Am. Rep. 105; Call Pub. Co. v. Lincoln, 29 Neb. 149; Mayor v. Muzzy, 33 Mich. 61; 20 Am. Rep. 670; Mayor v. Huff, 60 Ga. 221; Marsh v. Fulton Co., 10 Wall. 676, 684; Louisiana v. Wood, 102 U. S. 294; Pimental v. San Francisco, 21 Cal. 362; Swift v. Swift, 46 Cal. 266; McConoughey v. Jackson, 101 Cal. 265; 40 Am. St. Rep. 53; Capitol Gas Co. v. Young, 109 Cal. 140; Hitchcock v. Galveston, 96 U. S. 350; Chapman v. Douglass Co., 107 U. S. 356; Crompton v. Zabriskie, 101 U. S. 601; Parkersburg v. Brown, 106 U. S. 487; Ashhurst's Appeal, 60; Pa. St. 290.)
   HENSHAW, J.

This is an appeal from a judgment in mandate ordering the treasurer of the city of Santa Rosa to honor and to pay two warrants issued in favor of plaintiff by the common council of the city. The warrants were in payment of lumber and materials “had and received by the city from Berka.” At the times when the material was supplied, at the times when Berka presented his bills and demands for payment, and at the time when the city council allowed and approved his claims, Berka was an officer of the city and a member of its common council. These facts appear by the petition. The defendant interposed a demurrer, both general and special. This demurrer was “overruled without leave to answer,” and a peremptory writ of mandate was ordered to be issued.

The question of first importance presented upon this appeal is that of the right of an officer of the city to recover upon an implied contract with the municipality. The following provisions of the law, and of the charter of the city of Santa Rosa, have direct bearing upon this consideration:

“No councilman to be directly or indirectly interested in any contract made by them, or in any pay for work done under their direction or supervision.” (Charter of Santa Rosa, Stats. 1875-76, p. 255.)
“All bills, claims, and demands against the city shall be . . . filed by the city clerk, who shall present it to the council, and they shall allow or reject the same in whole or in part.” (Charter of Santa Rosa, Stats. 1875-76, p. 251.)
“Members of the legislature, state, county, city, and township officers must not be interested in any contract made by them in their official capacity, or by any body or board of which they are members.” (Pol. Code, sec. 920.)
“State, county, township, and city officers must not be purchasers at any sale, nor vendors at any purchase made by them in their official capacity.” (Pol. Code, sec. 921.)
“Every contract made in violation of any of the provisions of the two preceding sections may be avoided at the instance of any party except the officer interested therein.” (Pol. Code, sec. 922.)
“Every officer or person prohibited by the laws of this state from making or being interested in contracts, or from becoming a vendor or purchaser at sales, or from purchasing script or other evidence of indebtedness, who violates any of the provisions of such laws, is punishable by a fine of not more than one thousand dollars, or by imprisonment in the state prison not more than five years, and is forever disqualified from any office in this state.” (Pen. Code, sec. 71.)
“That is not lawful which is: 1. Contrary to an express provision of law; 2. Contrary to the policy of express law, though not expressly prohibited; or, 3. Otherwise contrary to good morals.” (Civ. Code, sec. 1667.)
“The consideration of a contract must be lawful within the meaning of section 1667.” (Civ. Code, sec. 1607.)
“If any part of a single consideration for one or more objects, or of several considerations for a single object, is unlawful, the entire contract is void.” (Civ. Code, sec. 1608.)

It would seem that the need of discussion is foreclosed by the mere .quotation of our express laws, but respondent contends, and in his contention prevailed in the trial court, that these provisions have no application to an implied contract such as this admittedly is, and that in the case of implied contracts which are not malum in se, even though they may be against public policy, the rule is, that if the consideration has passed—if the contract upon the one hand has been wholly executed—the party who has so performed will be allowed a recovery upon quantum meruit or quantum valebat, as the case may be. The importance of this question, the right of an officer of the city to recover upon an implied contract with his municipality, its gravity and. far-reaching consequence, demand something more than e passing consideration.

By subdivision 1 of section 1667 of the Civil Code reference is had to contracts expressly prohibited. These will he discussed" hereafter. Within subdivisions 2 and 3 of the same section are embraced the multitude of contracts which, though not expressly prohibited, are refused recognition upon grounds of public policy. These contracts, in contemplation of their subject matter, may be divided into two distinct classes; the first where the consideration is base and against good morals, malum in se; the second, where the consideration is in itself lawful, but where the mode is unauthorized, or where, because of some fiduciary relation between the parties, the law will not permit the contract to be made, nor countenance it when made. As to the first it is said in Blatchford v. Preston, 8 Term Rep. 95: “A plaintiff cannot recover in a court of justice whose cause of action arises out of a contract between him and the defendant in-fraud or to the prejudice of third persons.” Of the second, Lord Mansfield and the court of King’s bench, in Jones v. Randall, Cowp. 39, declared: “Many contracts which are not against morality are still void as being against the maxims of sound policy.” The first class of contracts embraces the infinite number of those made to further crime, or to interfere with the administration of the law, or to obstruct the course of justice, all contracts affecting the rights and prerogatives of the government, as well as the personal rights of the citizen. In the second class no baseness is inherent in the essence of the contract, but there is either some defect in the mode of creation or the manner of performance, or some incapacity in one or the other of the parties because of nonage, mental disability, or the fiduciary relation which they sustain to each other. Within this second class, as has been said, are the contracts of one who stands in a fiduciary relation to another with that other. Because of the tendency to abuse, the temptation to fake undue advantage, these contracts, even when not expressly prohibited by law, are still looked upon with disfavor, and they may be avoided at the instance of the other party in interest; but, where the trustee or other fiduciary agent has fully carried out the terms of the contract, the contract itself being fair, public policy, which is not punitive, is satisfied to leave the right of rescission to the other party. If he shall elect to rescind, he does so upon the equitable condition of restoring what he has received. If, however, he chooses to retain the consideration, he is not bound by the terms and conditions of the contract, but the courts permit an action to establish and to recover the reasonable value of the thing sold or the service rendered. Such, it may be said, is the general rule, but in this state the line has been more closely drawn. Such contracts are against public policy. Being against public policy, the making of them is not to be encouraged. But to permit a profit is thus to encourage them. Therefore, in this state, when a recovery is permitted, it is not for the reasonable or market value, which naturally includes within it the contemplation of a profit, but, when possible, the recovery is limited to the actual cost. (Fox v. Hale etc. Min. Co., 108 Cal. 369.)

Where contracts of public officials, with their counties or municipalities, have not been expressly forbidden by law, the principles which we have been considering have in some cases been applied, and a recovery has been permitted. In these cases it has been said that the demands of public policy have been satisfied by allowing the officer to recover, not according to the terms of his contract, but upon a quantum meruit or quantum valebat. (Spearman v. Texarcana, 58 Ark. 348; Pickett v. School Dist., 25 Wis. 551; 3 Am. Rep. 105; Concordia v. Hagaman, 1 Kan. App. 35; Gardner v. Butler, 30 N. J. Eq. 702; Call Pub. Co. v. Lincoln, 29 Neb. 149; Mayor etc. v. Huff, 60 Ga. 221; Currie v. School Dist., 35 Minn. 163; Mayor etc. v. Muzzy, 33 Mich. 61; 20 Am. Rep. 670.) But in no one of these cases, nor indeed in any case which has come under our observation, have the courts entertained any contract or any rights growing out of a contract, where either the consideration was base, or the contract was against the express prohibition of the law. Thus, in Call Pub. Co. v. Lincoln, supra, the publishing company had sued the city to recover for printing. .Bushnell was a stockholder in the plaintiff company, and was chairman of the city council’s committee on printing during the time of the publications in question; the court held that the statute of Nebraska prohibiting officers from being interested in any contract with their municipalities referred to express contracts, that the contract under consideration was an implied contract. It therefore concluded that the contract was not one expressly prohibited by law, and proceeded to discuss and decide the question upon the grounds of public policy. In Concordia v. Hagaman, supra, the prohibitory statute was “an act to restrain state and county officers from speculating in their offices.” The contract there was a contract made by Hagaman when he was a member of the city council for the printing of the ordinances of the city. The court conceded that no recovery could be had if the contract were one expressly prohibited by law, but determined that the legislature had ex industria excluded municipal officers, and had limited the operation of the law to state and county officers. That being so, the contract was left to be considered upon the grounds of public policy alone. And in discussing that question the court says: “In. considering the question of illegality of the contract it is proper that a distinction be made between a contract which is illegal because its execution requires the performance of an immoral or unlawful act, or transgresses an express statutory prohibition, and one wherein the act to be performed is lawful, but the agreement is invalid because of the manner it was entered into, or because of incapacity to contract in either of the parties.....When the contract looks to the doing of a lawful act, but may be avoided by one of the parties to it because the other party at the time acted in a fiduciary capacity for the first, the rule is applied in order to'avoid the possibility of reaping any undue advantage from the contract. WTien it has been executed, without objection, and actual benefits have been received under it, all parties acting in entire good faith, the law is maintained and the ends of justice subserved by disregarding those parts of the express agreement wherein advantage might have been taken, and allowing compensation merely for the reasonable value of the benefits received under it. Considerations of public policy do not require /the doing of less than this. The defense of public policy has no element of punishment in it; nor is it allowed out of consideration for the defendant. It is upheld by the consideration which the law ever entertains for the protection of the public, and the set-tied policy of the courts to give no aid to the enforcement of contracts whose general tendency is injurious to the public. Hence, the courts refuse all relief to one who asks compensation for the doing of an act which is conclusively presumed to be hurtful to public interests or morals. When, however, the thing accomplished is proper and beneficial, and not placed under the ban of any penal prohibitory enactment, the reason for the rule fails, and it should not be applied any further than is necessary for the public good.”

This, then, is the undoubted rule, that when a contract is expressly prohibited by law, no court of justice will entertain an action upon it, or upon any asserted rights growing out of it. And the reason is apparent, for to permit this would be for the law to aid in its own undoing. Says the supreme court of the United States in Bank of United States v. Owens, 2 Pet. 527: “No court of justice can in its nature he made the handmaid of iniquity. Courts are instituted to carry into effect the laws of the country. How can they become auxiliary to the consummation of violations of law? There can be no civil right where there can be no legal remedy, and there can be no legal remedy for that which is itself illegal.” And again the same august tribunal, in Coppell v. Hall, 7 Wall. 512, says: “Whenever the illegality appears, whether the evidence comes from one side or the other, the disclosure is fatal to the case. No consent of the defendant can neutralize its effect. A stipulation in the most solemn form to waive the objection would be tainted with the vice of the original contract and void for the same reasons. Where the contamination reaches it destroys. The principle to be extracted from all the cases is that the law will not lend its support to a claim founded on its own violation.” And in our own state it has been said (Swanger v. Mayberry, 59 Cal. 91): “The general principle is well established that a contract founded on an illegal consideration, or which is made for the purpose of furthering any matter or thing prohibited by statute, or to aid or assist any party therein, is void. This rule applies to every contract which is founded on a transaction malum in se, or which is prohibited by a statute on the ground of public policy.” Nor in such cases does it matter whether the contract has been partially or wholly performed, or whether the consideration has passed or not. “The test,” says Judge Duncan in Swan v. Scott, 11 Serg. & R. 164, “whether a demand connected with an illegal transaction is capable of being enforced at law, is whether the plaintiff requires the aid of the illegal transaction to establish his case. If the plaintiff cannot open his case without showing that he has broken the law, the court will not assist him, whatever his claim in justice may be upon the defendant.” And this must be so, for, while as a matter of private justice between individuals it would be but fair that one under such an illegal contract should restore the consideration or should make the payment, the rights of the public are superior to any such private considerations, and the public’s right is that the fountains of justice shall remain unpolluted; that no court shall lend its aid to a man who grounds his action upon an immoral or illegal act. Therefore, there is no place for equitable considerations, presumptions, or estoppels. (Fowler v. Scully, 72 Pa. St. 456; 13 Am. Rep. 699.) Ex turpi causa non oritur actio. Whenever such a contract comes before the court the action must fail, and the parties will be left in the situation in which they may be found. Some slight attempt will be found occasionally to evade the application of inis well-settled doctrine upon the ground of the hardship which sometimes results, but in no case, we think, has the existence of the rule been denied, or its justice as a matter commanding public necessity been questioned.

The rule, further, is that where a statute pronounces a penalty for an act, a contract founded on such act is void, although the statute does not pronounce it void, nor expressly prohibit it. (Swanger v. Mayberry, supra; Santa Clara Mill etc. Co. v. Hayes, 76 Cal. 390; 9 Am. St. Rep. 211; Gardner v. Tatum, 81 Cal. 370; Morrill v. Nightingale, 93 Cal. 458; Wyman v. Moore, 103 Cal. 214; Visalia etc. Co. v. Sims, 104 Cal. 332; 43 Am. St. Rep. 105; Woods v. Armstrong, 54 Ala. 150; 25 Am. Rep. 671; Fowler v. Scully, supra; Seidenbender v. Charles, 4 Serg. & R. 151; 8 Am. Dec. 682; Brooks v. Cooper, 50 N. J. Eq. 761; 35 Am. St. Rep. 793.)

Applying these principles to the contract before us, it is most manifest that it is not only against the express prohibition of the law, but that the law makes penal upon the part of a public officer the entering into it. We can yield no assent to the contention that our laws apply only to express contracts. The statute itself is general in its terms. Both in the charter provision above quoted, and in section 920 of the Political Code, these officers are forbidden to be interested in “any contract” made by them. The only difference between an 'express contract and an implied contract is that in the former all of the terms and conditions are expressed between the parties; in the latter some one or more of the terms and conditions are implied by law from the conduct of the parties. Generally, express contracts with a municipality are made under the system of competitive bidding. Usually, this is made compulsory by law. To say that implied contracts were not prohibited would be to destroy the purpose and efficiency of the laws, and leave the people at the mercy of careless or unscrupulous officers. The case of Smith v. Albany, 61 N. Y. 444, is very similar to the one at bar. The council of the city, of which plaintiff was a member, appropriated two thousand five hundred dollars for defraying expenses of a Fourth of July celebration. Upon the day plaintiff furnished horses and vehicles for use in the celebration, and the fair value of their use was the sum of one hundred and thirty-nine dollars. The New York statute made it unlawful for a member of any common council to become a contractor under any contract authorized by the common council and authorized such contracts to be declared void at the instance of the city. Here was an implied contract, but it was one prohibited by the statute law as well as by considerations of public policy, and the plaintiff was denied any recovery. Our statutes are general in prohibiting any officer from being interested in such contracts, and, if ever there was an occasion for its strict enforcement, it certainly exists in a case such as this where the contractor is a member of the common council whose duty it is to make such contracts on behalf of the city. He cannot be permitted to place himself in any situation where his personal interest will conflict with the faithful performance of Ms duty as trustee, and it matters not how fair upon the face of it the contract may be, the law will not suffer him to occupy a position so equivocal and so fraught with temptation. Note the illustration here presented. This material was obtained from a member of the city council, and he as a member of that council sits-in judgment upon the validity and amount of his own claim. If he does not act, still the city is deprived of its right to his services and knowledge in determining these very questions.

The fact that the claim was allowed by the council does not give to it a validity which it otherwise did not possess. (Santa Cruz Rock P. Co. v. Broderick, 113 Cal. 628.) The duty of the treasurer is to pay only legal demands against his funds. The law will not imply a promise to pay for services illegally rendered under a contract expressly prohibited by law. (Gardner v. Tatum, supra.)

For the foregoing reasons the judgment is reversed, with directions to the trial court to sustain the general demurrer to plaintiffs complaint.

Temple, J., and McFarland, J., concurred.  