Opinion
Plaintiff Del E. Webb Corporation (hereinafter referred to as Webb) appeals from a judgment of dismissal entered in favor of defendant Structural Materials Company (hereinafter referred to as SMC) following the sustaining of SMC’s general demurrers without leave to amend to plaintiffs second amended complaint, and from the summary judgment entered in favor of defendant and against plaintiff in the said action.1
*600A brief summary of the controversy which culminated with the filing of the instant lawsuit is as follows: Webb entered into written agreement with the City of Fresno to act as general contractor of a construction project known as the municipal service center. Webb entered into a subcontract with defendant Joseph L. DeLancey (hereinafter referred to as DeLancey), a roofing subcontractor, for the performance by De-Lancey of the roofing and waterproofing work on the Fresno project.2 DeLancey defaulted in the performance of his subcontract agreement with Webb and, in particular, failed to furnish all of the materials which were required for the roofing and waterproofing portion of the project.
Defendant SMC was in the business of selling building materials and sold roofing and waterproofing materials to DeLancey for use on the Fresno project. Plaintiff Webb contends that SMC is liable for the breach of the subcontract agreement by DeLancey and is also liable for damages sustained by Webb as a result of SMC’s alleged failure to supply Webb with roofing materials necessary for the construction project. In this regard, Webb contends that SMC was paid in advance for these materials by the issuance of two checks jointly payable to DeLancey and SMC in the amounts of $52,704.49 and $19,944.61.3
*601Webb received only a portion of the materials described in the invoices for which the checks were issued and its principal claim against SMC relates to SMC’s failure to furnish the balance of the materials for which Webb has made payment.
In order to more succinctly analyze the issue raised in this appeal, we will discuss separately issues raised on demurrer and issues raised in the summary judgment proceedings.
Webb’s Theories of Recovery
Webb’s second amended complaint purports to set forth 10 causes of action against defendant SMC. The first and second causes of action are for money had and received and money paid. A demurrer to a common count is properly sustained where the plaintiff is not entitled to recover under those counts in the complaint wherein all the facts upon which his claim is based are specifically pleaded. (Hays v. Temple (1937) 23 Cal.App.2d 690 [73 P.2d 1248].) The validity of the first and second causes of action is, therefore, dependent upon whether a basis of recovery is adequately set forth in the other causes of action.
The third cause of action seeks damages from SMC for breach of the subcontract agreement between Webb and DeLancey. SMC’s purported liability for breach of the agreement, in which it is not a named party, was predicated upon the theory that SMC was the alter ego of DeLancey. Webb concedes on appeal that the allegations of the third cause of action were insufficient to establish an alter ego theory. It urges, however, that the third cause of action is viable on the theory that DeLancey was acting as an agent for SMC at the time the subcontract was made, and that SMC was the undisclosed principal in that contract; that the allegation reciting that “each of the defendants was the agent of each of the remaining defendants and were at all times acting within the scope of their authority as such agents” sufficiently alleged that DeLancey signed the contract on behalf of SMC, at least to the extent that Webb should have been given leave to amend so as to clarify the agency concept.
*602The fourth cause of action is against DeLancey only and is not involved in this appeal.
The fifth cause of action seeks damages for the breach of an alleged oral agreement between SMC and DeLancey which Webb contends was made for its benefit. Webb alleges that SMC and DeLancey orally agreed that SMC would provide all roofing and other materials necessary for the performance of the subcontract in a condition free of defects; that the oral contract was made for the benefit of Webb and has never been rescinded; that SMC breached the oral contract by supplying defective roofing materials to the project and by refusing to supply a portion of the roofing materials paid for by Webb.
In its sixth cause of action Webb contends that SMC breached an implied contract which existed between SMC and Webb. It is alleged that SMC agreed to furnish Webb, through DeLancey, with roofing materials necessary for Webb’s construction project; Webb agreed to pay for the materials by joint checks to DeLancey and SMC; that SMC submitted invoices from SMC and DeLancey and the waiver of lien to Webb through DeLancey; that Webb paid the invoices by joint check; that by reason of the foregoing SMC impliedly contracted to deliver to Webb all of the materials covered by said invoices in a usable condition, and that SMC breached the said contract by failing to deliver all the materials and by delivering certain of the materials in a defective and unusable condition.
Essentially the same allegations formulate the basis for the tenth cause of action, wherein Webb alleges that SMC failed and refused to deliver, in a nondefective condition, all the materials which Webb paid for pursuant to SMC’s invoice, and have also failed and refused to return any of the monies paid by Webb to SMC for the materials. Webb alleges that by reason thereof SMC has been unjustly enriched in the amount which was paid by Webb to SMC for materials which SMC did not deliver or which were delivered in a defective and unusable condition.
The seventh cause of action is for fraud. It is alleged that DeLancey acting as an authorized agent for SMC falsely and fraudulently represented to Webb that if Webb would prepay for roofing materials to be used in its construction project the payment would be used exclusively for the purchase of those materials and SMC and DeLancey would provide all the materials when requested to do so by Webb; that the
*603representations were false and SMC intended to apply Webb’s payments to accounts which DeLancey had incurred on other projects and did not intend to furnish the materials paid for by Webb; that SMC and DeLancey knew that the representations were false and that they were made with the intent to defraud and deceive Webb; that Webb was ignorant of the falsity of the representation and paid invoices presented by SMC and DeLancey in reliance upon said representation which reliance was justified. Webb seeks compensatory and punitive damages for the alleged tortious conduct.
The eighth cause of action incorporates the allegations of the seventh cause of action and further alleges that SMC and DeLancey conspired to defraud Webb by inducing Webb to pay for roofing materials which said defendants did not intend to furnish to Webb.4
The ninth cause of action alleges that Webb was the owner and entitled to possession of certain roofing materials described in an invoice of SMC; that Webb made demand on SMC for delivery of said personal property which demand was refused by SMC; that by reason thereof SMC converted the said personal property to its own use and benefit for which Webb seeks compensatory and punitive damages.
The Sufficiency of the Pleadings
Webb argues, in essence, that each of its causes of action is sufficiently pleaded to withstand an attack by way of general demurrer; that if any of the causes of action are insufficient, the deficiency can be cured by amendment and that the trial court abused its discretion in denying leave to amend. Additionally, plaintiff contends that facts in the complaint establish SMC’s liability to Webb for negligent interference with prospective economic advantage, a theory that was not argued at the trial court level, but which is viable from the pleadings and which make the complaint immune to attack by general demurrer.5
*604SMC asserts that the allegations of Webb’s second amended complaint fail on their face to state a cause of action against SMC. Furthermore, SMC contends, if the court takes judicial notice, which it has the right to do, of the declarations, depositions, and documentations contained in the court records which were filed in connection with SMC’s motion for summary judgment, it must conclude that none of the allegations set forth in the complaint have a factual basis and that Webb could not amend its complaint to state a cause of action. SMC additionally contends that Webb’s latest theory, that it has stated a cause of action for negligent interference with prospective economic advantage, was not raised in the trial court and, therefore, may not be raised for the first time on appeal, and, in any event, it has no application to the facts in the instant case.6
The Concept of Truthful Pleading
. As a general rule in testing a pleading against a demurrer the facts alleged in the pleading are deemed to be true, however improbable they may be. (Griffith v. Department of Public Works (1956) 141 Cal.App.2d 376 [296 P.2d 838].) The courts, however, will not close their eyes to situations where a complaint contains allegations of fact inconsistent with attached documents, or allegations contrary to facts which are judicially noticed. (Alphonzo E. Bell Corp. v. Bell View Oil Syndicate (1941) 46 Cal.App.2d 684 [116 P.2d 786]; Chavez v. Times-Mirror Co. (1921) 185 Cal. 20 [195 P. 666].) Thus, a pleading valid on its face may nevertheless be subject to demurrer when matters judicially noticed by the court render the complaint meritless. In this regard the court passing upon the question of the demurrer may look to affidavits filed on behalf of plaintiff, and the plaintiffs answers to interrogatories (Dwan v. Dixon (1963) 216 Cal.App.2d 260 [30 Cal.Rptr. 749]), as well as to the plaintiffs response to request for admissions. (Stencel Aero Engineering Corp. v. Superior Court (1976) 56 Cal.App.3d 978 [128 Cal.Rptr. 691]; Able v. Van Der Zee (1967) 256 Cal.App.2d 728 [64 Cal.Rptr. 481].)
The court will take judicial notice of records such as admissions, answers to interrogatories, affidavits, and the like, when consider*605ing a demurrer, only where they contain statements of the plaintiff or his agent which are inconsistent with the allegations of the pleading before the court. The hearing on demurrer may not be turned into a contested evidentiary hearing through the guise of having the court take judicial notice of affidavits, declarations, depositions, and other such material which was filed on behalf of the adverse party and which purports to contradict the allegations and contentions of the plaintiff. (Tyree v. Epstein (1950) 99 Cal.App.2d 361 [221 P.2d 1002].)7
Applying the foregoing principles to the case at hand, the trial court in passing upon SMC’s demurrer could properly take judicial notice of any inconsistent statements made by Webb or its representatives in the declarations filed in opposition to the motion for summary judgment, or any inconsistent statements contained in their depositions, but could not properly consider the testimony of the defense witnesses tending to refute Webb’s claims.
The testimony which may arguably be inconsistent with the allegations in Webb’s complaint and may properly have been considered by the trial court in determining the merits of the demurrer can be summarized as follows: DeLancey requested advance payments for materials required by him for the performance of the Webb-DeLancey subcontract; Webb’s personnel approved DeLancey’s request for advance payments because they considered that such payments were in the best interest of Webb; that such advance payments would enable DeLancey to have the materials shipped to the job before they were needed and be available when required; that ordering the materials in advance would enable DeLancey to avoid the effect of escalating prices of the materials; that Webb’s personnel knew at the time of the approval for advance payments that only a part of the materials identified in the billing prepared by SMC had been delivered to the jobsite; that Webb knew that DeLancey was unable to provide a faithful performance bond as was required in his subcontract; that the joint checks issued by Webb to DeLancey and SMC were approved by Webb’s personnel prior to their issuance.
*606We can find nothing in this evidence which constitutes admissions so inconsistent with facts alleged by Webb in its complaint that would render the complaint demurrable. Thus, taking of judicial notice of this evidence does not require that the allegation set forth in the complaint be disregarded.
SMC contends that even without resort to the use of judicial notice the facts alleged in the third and fifth causes of action are, on their face, insufficient, and that the insufficiencies can not be cured by amendment.
As regards the third cause of action which seeks to hold SMC responsible as undisclosed principal to the subcontract between Webb and DeLancey, SMC argues that any such construction of that contract would be contrary to the express provisions of the contract, which has been attached to the complaint as an exhibit, and would constitute an attempt to vary from the plain language of the contract in violation of the parol evidence rule. SMC’s contentions are not compelling.
Where a contract is made by an agent acting on behalf of an undisclosed principal, a third party, upon discovering the facts of the agency, may sue the undisclosed principal. In such a case, parol evidence would be admissible to prove that an undisclosed principal is in fact a party for whom the written contract was made. (Geary St. etc. R. R. Co. v. Rolph (1922) 189 Cal. 59 [207 P. 539].)8
Webb’s fifth cause of action proceeds upon the theory that an oral agreement was entered into between SMC and DeLancey and that Webb was a third party beneficiary of that contract. SMC contends that there are insufficient facts alleged to establish that such contract was made expressly for the benefit of Webb, and, moreover, that there is no writing to satisfy the statute of frauds with respect to any such oral agreement.
We find no merit in these contentions.
Webb alleges in its fifth cause of action: “That in order to provide defendant DeLancey with the roofing materials and other materials *607needed in the performance of the subcontract, and for the benefit of plaintiff, defendants SMC and Does 1 through 50 agreed to supply any and all roofing materials and other materials necessary for the performance of the subcontract between plaintiff and defendant DeLancey and Does 51 through 100.”
If SMC made such an agreement, Webb was its ultimate beneficiary and would be regarded as a creditor beneficiary. (Gilbert Financial Corp. v. Steelform Contracting Co. (1978) 82 Cal.App.3d 65 [145 Cal.Rptr. 448].)
It is further alleged in the fifth cause of action that Webb paid in full for all of the materials to be furnished under the oral contract. Thus, assuming that the contract is one normally required to be in writing pursuant to section 2201 of the California Uniform Commercial Code, the situation would come within the exception to the statute set forth in section 2201, subdivision (3).9
We conclude therefore that a general demurrer to the fifth cause of action was improperly sustained.
SMC does not specifically contend that other causes of action set forth in Webb’s second amended complaint are improperly pleaded, but asserts that if the court takes judicial notice of the facts established by the sworn statements in the court record it must conclude that there is no factual basis to support any of the causes of action.10 We do not agree.
The demurrer to the remaining counts in the second amended complaint were also improperly sustained.
*608Summary Judgment
It is well settled that the purpose of summary judgment proceedings is not to try issues that are in controversy but to decide whether or not there are any factual issues to be resolved. It is not incumbent upon the resisting party to establish that he could prevail in the action if it proceeded to trial. He need only demonstrate that there is a triable issue of fact. (Eagle Oil and Refining Co. v. Prentice (1942) 19 Cal.2d 553 [122 P.2d 264]; Walsh v. Walsh (1941) 18 Cal.2d 439 [116 P.2d 62].)
In support of its motion for summary judgment SMC submitted the declarations of the president of SMC, DeLancey, and Irvin Grant, counsel for SMC. The latter declaration details the deposition testimony of the president of SMC, vice president of SMC, the vice president of Webb, the project manager of Webb, and the project superintendent of Webb.
SMC contends that its evidence establishes that SMC and DeLancey were completely separate business entities and that no agency relationship existed between them, and further establishes that the manner in which Webb’s joint checks were processed was in accordance with normal business practices and with the full knowledge and consent of Webb. Regarding the SMC-DeLancey relationship, the evidence, briefly summarized, purports to establish that DeLancey did not at any time have an ownership interest in SMC; that DeLancey never utilized the facilities of SMC to perform DeLancey’s accounting work; DeLancey never received commissions from SMC; SMC had nothing to do with the decisions made by DeLancey relating to the bidding of jobs; that SMC had no knowledge of the Webb-DeLancey subcontract for the Fresno job until after the subcontract had been executed; that SMC did not participate in any decision on the part of DeLancey to terminate work on the Fresno job; that the only monies ever paid by DeLancey to SMC were for materials sold to DeLancey; that SMC never loaned money to DeLancey; that SMC never entered into any joint ventures with DeLancey; that SMC does not have a contractor’s license; that DeLancey did not purchase materials exclusively from SMC; that SMC never had an agreement with DeLancey to supply him with any materials except for materials which DeLancey purchased pursuant to specific orders.
*609Regarding the Webb checks, the evidence purported to show that the $52,704.49 check payable jointly to DeLancey and SMC was deposited by SMC into its account and credited to DeLancey’s account on the Fresno job; that no part of the resulting credit balance was paid to De-Lancey because SMC was in the process of shipping materials to DeLancey; that the $19,944.61 check was deposited into SMC’s account and credited to DeLancey’s account on the Fresno job; that SMC kept a portion of the check required to pay for materials sold to DeLancey to the date the check was issued and the balance of the proceeds of the check was paid over to DeLancey; that in the normal course of business when SMC receives joint payment checks SMC retains that portion of the check that will pay for materials sold to the date of the check and releases the balance of the check to the roofer for his labor and other expenses; that Webb did not direct the manner in which the check proceeds were to be applied on either of the checks. SMC also makes reference to the reasons for Webb’s issuance of checks in prepayment for materials as hereinabove set forth in the discussion of the ruling on demurrer.
Webb, in opposition to the motion for summary judgment, submitted the declarations of Webb’s vice president, an employee of Webb, and counsel for Webb relating to the deposition testimony of representatives of SMC. In support of its contention that each of its various causes of action involved a triable issue of fact, Webb makes reference to the following evidence relating to the relationship between SMC and DeLancey: DeLancey’s submittals of materials needed on the Fresno project were made by way of letters addressed to Webb which may have been typed for DeLancey by SMC; SMC maintained a supply of DeLancey’s stationery in its offices and did not have the stationery of any other subcontractor; the vice president of SMC was authorized to prepare invoices for DeLancey and prepare DeLancey’s invoice to Webb for a portion of the waterproofing work performed on the project; DeLancey maintained an office at SMC and SMC took care of DeLancey’s paper work.
As respects the manner in which its joint checks for the advance payment of materials were to be delivered to the Fresno project, Webb makes reference to the evidence purporting to establish that SMC and DeLancey collaborated in the preparation of the invoices for which advance payment was to be made by Webb; that SMC knew at the time the invoices were prepared that DeLancey intended to bill Webb for the *610materials set forth in the invoices; that at the time of the preparation of the invoices the materials described therein had neither been shipped nor ordered; that as soon as the invoices were prepared by SMC and given to DeLancey they were cancelled by SMC who purported to regard the documents as memo billings, not invoices, and did not consider that the documents were appropriate for posting as invoices; that SMC never notified Webb that the invoices had been cancelled. Additionally, Webb makes reference to the evidence detailing the manner in which SMC utilized the proceeds of the two joint checks issued by Webb.11
Each of the causes of action in the second amended complaint must be examined in the light of the foregoing evidence to determine whether or not any triable issues of fact exist as respects any of the causes of action.
Webb asserts that because all of the money paid by Webb to DeLancey under the subcontract was paid to SMC and because DeLancey abandoned the contract shortly after commencing his work, a triable issue of fact arises as to whether DeLancey entered into the subcontract as agent for SMC, an undisclosed principal. We find no merit to this contention. The totality of the evidence is that SMC is a material supplier and DeLancey the roofing contractor. There is no evidence to suggest that SMC was the real party in interest in the subcontract agreement made between Webb and DeLancey. The concept that the subcontract was actually between Webb and SMC rather than between Webb and DeLancey appears to be another fanciful attempt to place liability on SMC for DeLancey’s failure to perform his contract which, however, has no greater substance than Webb’s previous position that DeLancey was the alter ego of SMC. The summary judgment in favor of SMC as respects the third cause of action was appropriately granted.
The summary judgment is also properly granted as to Webb’s ninth cause of action for conversion.
To establish a conversion, plaintiff must establish an actual interference with his ownership or right of possession. (Home v. Kramer (1936) 7 Cal.2d 361 [60 P.2d 854].) Where plaintiff neither has title to the property alleged to have been converted, nor possession thereof, he can*611not maintain an action for conversion. (General Motors Acceptance Corp. v. Dallas (1926) 198 Cal. 365 [245 P. 184].)
Webb did not have possession of the materials which it claims SMC converted. Title to such material did not pass to Webb upon the issuance of the joint checks. To the contrary, it is uncontroverted that checks represented payment for materials to be delivered in the future. Having neither possession nor title to the property, Webb cannot maintain an action for conversion.
The remaining causes of action each involve a triable issues of fact.
Whether or not an oral agreement was entered into between DeLancey and SMC on terms described in Webb’s fifth cause of action is clearly a question of fact. The existence of such oral agreement was denied by DeLancey and representatives of SMC. There was also evidence produced that DeLancey did not deal with SMC exclusively. The manner in which the transaction was handled, however, supports an inference that such an agreement existed. In this regard there is evidence that SMC prepared the invoices detailing the material for which De-Lancey would request that Webb pay for in advance and that the payment would be made jointly to DeLancey and SMC. Since SMC prepared the invoices at DeLancey’s request for the purpose of providing a means so that Webb could make payment in advance for the materials that were needed, one may infer that SMC agreed with DeLancey that it would furnish all of the materials which were covered by its invoice for which it was receiving payment from Webb.
The evidence relating to the conduct of the parties, which makes the fifth cause of action immune from summary judgment determination, is equally applicable to the sixth cause of action alleging the existence of an implied contract between SMC and Webb, and to the tenth cause of action for unjust enrichment.
Whether or not an implied contract has been created is determined by the act and conduct of the parties and all the surrounding circumstances involved and is a question of fact. (Penn. Sec. Life Ins. Co. v. Rising (1976) 62 Cal.App.3d 302 [133 Cal.Rptr. 59].)
The conduct of SMC in preparing the DeLancey invoices, its actions as respects the receiving end disbursement of the Webb’s checks *612are supportive of an inference that SMC agreed to furnish to Webb all of the materials set forth on the invoices for which Webb had paid.
SMC contends that the evidence failed to establish any fraudulent conduct on the part of SMC but, to the contrary, demonstrated that SMC acted in a normal and proper manner consistent with the usual practice of the trade. Moreover, SMC contends that such evidence proved that Webb’s decision to make an advance payment for materials was not as a result of Webb’s reliance upon any alleged misrepresentations, but was the product of a studied business decision approved by high level management made for the purpose of enhancing its business interests and that at the time Webb made the decision to make advance payments for materials, which it had the option of doing under its subcontract with DeLancey, Webb knew that DeLancey was unable to furnish a performance bond presumably because of his shaky financial position.
Webb urges a much more sinister interpretation of the evidence. The evidence, Webb argues, shows that DeLancey was indebted to SMC; that SMC prepared invoices for DeLancey detailing materials for the purpose of causing Webb to issue a check as payment in advance for such materials; that SMC cancelled the invoice after it was prepared and never notified Webb that the invoice had been cancelled; that the materials were not delivered to Webb; and that the proceeds of the Webb’s check were paid over to DeLancey after SMC had paid itself the amount owing to it by DeLancey.
Webb maintains that it can be inferred from the foregoing that De-Lancey and SMC conspired to cause Webb to make an advance payment for materials representing to Webb that materials were needed and would be delivered while in truth SMC and DeLancey had no intention of furnishing the material described in the invoices.
It is not our function to determine which interpretation is most compelling. Whether or not DeLancey and SMC conspired to defraud Webb is a question of fact which cannot be resolved on summary judgment.
The judgment of dismissal which was entered by reason of the sustaining of the demurrers without leave to amend is reversed. The judgment of dismissal entered as a result of the granting of the motions for summary judgment is affirmed as respects the third and ninth *613causes of action in the second amended complaint and is reversed as to all remaining causes of action.
Ashby, Acting P. J., and Hastings, J., concurred.