*292 Opinion
This аction arises out of a contract between plaintiff and defendant wherein plaintiff and one Prothro (not a party to the action or this appeаl) agreed to advance $40,000 to defendant and defendant agreed to harvest and deliver to plaintiff hay to be grown on certain described lands. Plaintiff agreеd to market the hay and to credit defendant with the proceeds less certain deductions, including commissions. After partial performance defendant refusеd to make further deliveries.
Plaintiff sued for breach of contract, money had and received, and account stated. As a special defense to the action defendant pleaded that the contract was illegal in that plaintiff was acting as a commission merchant without a license in violation of the applicable provisions of the Agricultural Code. Pursuant to stipulation the issue of illegality was tried by the court prior to the trial of any other issues. The court determinеd that the contract was illegal and void and entered judgment that plaintiff take nothing by his complaint. Plaintiff appeals from the judgment.
The issue of illegality was submitted on thе following stipulated facts.
The parties entered into the contract on January 11, 1967. It provided that plaintiff and Prothro were to furnish defendant $40,000 on or before February 3, 1967; the payment was to constitute “advance payment" on hay crops to be harvested by defendant from certain described lands comprising about 1,120 acres; plaintiff agreed to market the hay without delay at “fair market price[s]”; plaintiff was to deduct $10.50 per ton for commissions and costs of handling and marketing and the balance was to be applied to the repayment of the $40,000 advance plus $2,000 interest. Defendant harvested and delivered his crops pursuant to the contract until April 15, 1967. On that date he ceased making further deliveries. It was stipulated that in entering into the contract plaintiff was acting as a commission merchant and that at all times mentioned in the complaint he was unlicensed.
Plaintiff suggests that the transaction was a “cash purchase” and, hence, not proscribed by thе Agricultural Code. The contention is devoid of merit. The agreement was clearly not a contract of sale; it was an agreement fo sell the hay for defendant on a commission basis. Such transaction by an unlicensed person was proscribed by statute. Section 1263 of the Agricultural Code, then in effect, provided that “[n]o person shall act as a commission merchant, dealer, broker, cash buyer, or agent” without a license (Stats. 1965, ch. 1287,. p. 3169, § 1) and section 1273 provided that any pеrson guilty of so acting without a license was guilty of *293 a misdemeanor subject to fine or imprisonment in the county jail or both (Stats. 1947, ch. 774, p. 1861, § 10). 1
Although the provisions of the Agricultural Code relating to produce dealers, unlike section 7031 of the Business and Professions Code relating to contractors, do not contain an express provision prohibiting an unlicensed person from suing on a contract" for which a license is required, such contracts by unlicensed produce dealers have been declared to be illegal and void.
(California Chicks, Inc.
v.
Viebrock,
As his principal authority for the proposition that illegality is not a defense, plaintiff cites a decision of the Supreme Court which was vacated on rehearing.
(Fomco, Incorporated
v.
Joe Maggio, Inc.
(Cal.)
Despite the illegality of the contract, plaintiff should not be denied relief. The rule requiring courts to withhold relief under the terms of an illegal contract is based on the rationale that the public importance of discouraging such prohibited transactions outweighs equitable considerations of possible injustice as between the parties.
(Griffis
v.
Squire,
The present case is one in which plaintiff should be еntitled to some relief. The violation of law was one which did not involve serious moral turpitude; the policy of protecting the public from the future consequеnces of the contract will not be furthered because the transaction has been completed; neither party can be said to have been guilty of thе “greatest moral fault;” defendant would be unjustly enriched at the expense of plaintiff were he not required at least to repay the balance owing on thе $40,000 advance payment; and the penalty resulting from denial of relief would be disproportionately harsh in relation to the violation involved. 2
We conclude that notwithstanding illegality of the contract plaintiff should be entitled to recover the balance due on the $40,000 advance payment together with the agreed interest of $2,000. The balance should be determined by crediting defendant with the market value of the hay *295 delivered pursuant to the contract less out-of-pocket expenses actually incurred by plaintiff in handling and marketing the same, but with no allowance for commissions.
Judgment is reversed with directions to the trial court to take further proceedings in the matter not inconsistent with the views here expressed.
Gardner, P. J., and Kerrigan, J., concurred.
A petition for a rehearing was denied December 28, 1970, and respondent’s petition fоr a hearing by the Supreme Court was denied January 28, 1971.
Notes
The Agricultural Code was amended in 1967. However, the sections referred to above have been reenaсted in substantially the same form.
Although the stipulated facts did not disclose the balance owing on the advance, plaintiff asserts in his brief that the sum is in the neighborhood of $20,000. That assertion is not refuted by defendant.
