
101 Cal.App.3d 308 (1980)
161 Cal. Rptr. 459
JAMES J. DOMACH et al., Plaintiffs and Respondents,
v.
ROBERT G. SPENCER, Defendant and Appellant.
Docket No. 18343.
Court of Appeals of California, Third District.
January 23, 1980.
*309 COUNSEL
Richard Keith Corbin for Defendant and Appellant.
Norman & Eames and James K. Norman for Plaintiffs and Respondents.
*310 OPINION
REYNOSO, J.
Defendant's major contention is that the trial court made an incomplete finding on the issue of whether he was a licensed contractor; he also argues that the evidence does not support the judgment. We hold that while Business and Professions Code section 7031 bars an unlicensed contractor from maintaining an action on the building contract, it does not bar a member of the public from bringing such an action against the contractor. Thus, it is irrelevant whether defendant was a licensed contractor, and the court was not required to make a finding thereon. Further, we find sufficient evidence to support the judgment otherwise. Accordingly, we affirm.
Defendant Robert G. Spencer appeals from a judgment of the Superior Court of Placer County in favor of plaintiffs James J. and Mary Dale Domach in the amount of $10,276. Plaintiffs sued defendants Robert G. Spencer, Lavella Spencer, Alvin A. Chestnut, Chisum, Inc., C-B Ranch, and five fictitious defendants.[1]
The fourth cause of action, the subject of this appeal, was stated against defendants Spencer and Chisum, Inc., only. In that cause of action plaintiffs alleged that they had entered into a contract with defendants whereby they agreed to pay $38,000 for the construction of a dwelling upon real property located in Roseville, California. Plaintiffs alleged that defendants represented that they were competent licensed home builders and would construct the home for the approximate sum of $37,000. When the home was near completion defendants informed plaintiffs that the cost would be $54,000 rather than $38,000, and plaintiffs paid that sum to defendants. Plaintiffs alleged that defendants were not licensed contractors, that the home was not constructed in accordance with the specifications, and that it was constructed in a sloppy, incompetent and unworkmanlike manner. Plaintiffs sought the return of all payments they had made to defendants and the payment of all amounts required to complete the home in accordance with the specifications.
The parties stipulated that causes of action one through three would be tried separately from cause of action four. After trial the court found *311 in plaintiff's favor on the cattle investment issues (causes of action one through three) against defendants Alvin Chestnut and C-B Ranch, but specifically found in defendant Spencer's favor on those causes of actions. Those causes of action are not involved in this appeal. As to the fourth cause of action, the court found in favor of plaintiffs against Spencer and Chisum, Inc., and entered judgment in the amount of $10,276. Defendant Spencer filed a notice of appeal.

I
(1) Defendant first contends that the trial court made an incomplete finding of fact on the issue of whether he was a licensed contractor, and that a finding on that issue is indispensible to a proper conclusion of law. Proposed finding of fact number 14 initially stated "Defendants, at the time of entering into said agreement and during the construction of said dwelling, were not licensed building contractors." Defendants conceded that they were not licensed building contractors but objected to finding number 14 and proposed instead the following: "Defendants, at the time of entering into said agreement with Plaintiffs, and during the construction of said dwelling did not hold themselves out to Plaintiffs as licensed building contractors." The trial court struck finding 14 by interlineation with the notation "immaterial" and entered an order that such finding be deleted in its entirety.
We agree with the trial court that whether defendant was a licensed contractor is irrelevant and immaterial, and thus we reject defendant's contention that the trial court erred in refusing to make a finding on that question. Business and Professions Code section 7031 provides, inter alia, "No person engaged in the business or acting in the capacity of a contractor, may bring or maintain any action in any court of this state for the collection of compensation for the performance of any act or contract for which a license is required by this chapter without alleging and proving that he was a duly licensed contractor at all times during the performance of such act or contract, ..." That section bars an unlicensed builder from bringing or maintaining a suit on a construction contract; it does not shield such a person from a suit arising out of such a contract.[2]
*312 The judgment in this case was predicated upon the failure to perform according to contract specifications and unworkmanlike performance. The trial court specifically found that defendant had been fully paid for his services and he does not contend otherwise. Instead, defendant asserts that if the trial court found that he did not hold himself out as a contractor then plaintiffs would be barred from bringing or maintaining a suit on the contract since they would be parties to an illegal contract. We disagree. The purpose of Business and Professions Code section 7031 is to enforce the Contractors License Law, which has as its object the protection of the public. (General Ins. Co. v. Superior Court (1972) 26 Cal. App.3d 176, 183 [102 Cal. Rptr. 541].) Plaintiffs, as members of the public, are within the class for whose benefit the statute was passed and thus cannot be regarded as being in pari delicto with defendant. (Comet Theatre Enterprises v. Cartwright, supra, 195 F.2d at p. 82. See also Elmers v. Shapiro (1949) 91 Cal. App.2d 741, 754 [205 P.2d 1052].)
The bar of Business and Professions Code section 7031 applies by its terms only to the person acting in the capacity of a contractor and not to a member of the public. To apply that statute to members of the public would defeat its purpose by providing a shield from litigation for an unlicensed builder due to the fortuity that he had been paid. Such an interpretation is supported by neither the statutory nor decisional law of this state and is unwarranted.

II
(2) Defendant raises issues concerning the sufficiency of the evidence. He argues that the evidence fails to support certain allegations of the complaint. In this regard we note that the allegations of the complaint which defendant now states are not supported by the evidence do not form the basis of the trial court's judgment. The findings of fact state that plaintiffs and defendants entered into a contract for the construction of a home, that the home was constructed and defendant was paid in full, and that defendant breached the agreement by materially deviating from the plans and specifications and by general sloppy and unworkmanlike construction. The damages awarded were for breach of *313 contract in this manner. Where findings are made upon issues which determine the cause and uphold the judgment, other issues become immaterial and the failure to find thereon does not constitute prejudicial error. (Santoro v. Carbone (1972) 22 Cal. App.3d 721, 730-731 [99 Cal. Rptr. 488].) The allegations of the complaint which do not provide the basis of the judgment are irrelevant and we need not consider whether the evidence supports those allegations.
Plaintiff testified that he and defendant entered into an agreement for defendant to construct a home. A copy of a deposit receipt and offer to purchase real property was entered into evidence. That agreement, dated February 20, 1976, provides that plaintiff would purchase property for $54,000, with a "home to be complete as agreed according to plans & specs by buyer & seller." Such evidence supports the finding that plaintiff and defendant entered into a building construction contract.
The trial court found that defendant breached the agreement by deviating from the plans and specifications. Defendant did not contend that he performed according to the plans and specifications. Rather, he testified that plaintiff had changed his mind and decided not to take the house. When plaintiff said that he did not want the house defendant decided to build the house for himself, and he varied from the plans since his desires differed from plaintiffs. Plaintiff denied that he had decided not to accept the house or agreed to defendant's takeover. The trial court found in favor of plaintiff and awarded damages due to the material deviations from the plans and specifications. The evidence was conflicting on this question. In the face of conflicting evidence it is for the trial court, and not this court, to make factual determinations. (See In re Marriage of Mix (1975) 14 Cal.3d 604, 612 [122 Cal. Rptr. 79, 536 P.2d 479]; Nestle v. City of Santa Monica (1972) 6 Cal.3d 920, 925 [101 Cal. Rptr. 568, 496 P.2d 480].) The amount of the damage award for the deviations was in accordance with a list prepared by plaintiff's expert witness and was stipulated to by the parties. The evidence, although conflicting, thus supports that portion of the judgment.
The item which the trial court found to have been constructed in a sloppy and unworkmanlike manner was the roof. Plaintiff's expert witness, a building contractor, testified that the shake roof was not properly constructed in that the shake shingles were not overlapped to prevent exposure of the underlying felt. Plaintiff testified that the roof *314 was not properly constructed and that it leaked so that he was forced to place rolled up newspaper in the roof to prevent leakage. Water damage occurred to the ceiling in one room. A photograph of the roof was also entered into evidence which clearly shows that the shake shingles were not properly overlapped. Such evidence supports the determination that the roof was not properly constructed. Plaintiff's expert estimated that the cost of repairing the roof would be $5,246. At trial he stated that the material would cost between $4,000 and $4,500, and that the labor would be about $1,500. The court accepted the figure of $5,246. That figure is manifestly supported by the testimony of the expert witness.
The findings of the trial court are supported by the evidence and they, in turn, support the judgment. Inasmuch as the evidence supports the judgment we need not consider whether it also supports the allegations of the complaint which did not form the basis for the judgment.
The judgment is affirmed.
Puglia, P.J., and Evans, J., concurred.
Appellant's petition for a hearing by the Supreme Court was denied March 20, 1980.
NOTES
[1]  The first three causes of action were based upon certain transactions involving a ranching enterprise in which plaintiffs invested. Those causes of action are not involved in this appeal.
[2]  The bar of Business and Professions Code section 7031 does not prevent an unlicensed builder from asserting nonpayment under a contract as a defense in an action brought by the person with whom the contract was made. (Culbertson v. Cizek (1964) 225 Cal. App.2d 451, 473 [37 Cal. Rptr. 548]), nor does it create a cause of action in a person who has already paid the contract price. (Comet Theatre Enterprises v. Cartwright (9th Cir.1952) 195 F.2d 80, 82-83 [30 A.L.R.2d 1229].) The bar applies regardless of whether the other party is aware of the lack of a license. (Pickens v. American Mortgage Exchange (1969) 269 Cal. App.2d 299, 302-303 [74 Cal. Rptr. 788].)
