
50 Cal.App.3d 654 (1975)
123 Cal. Rptr. 606
VARCO-PRUDEN, INC., Plaintiff and Appellant,
v.
HAMPSHIRE CONSTRUCTION COMPANY, Defendant and Respondent.
Docket No. 34235.
Court of Appeals of California, First District, Division Two.
August 14, 1975.
*655 COUNSEL
Thomas & Thomas and Bruce I. Cornblum for Plaintiff and Appellant.
Noland, Hamerly, Etienne & Hoss and Peter T. Hoss for Defendant and Respondent.
*656 OPINION
BRAY, J.[*]
Plaintiff appeals from summary judgment of the Monterey County Superior Court in favor of defendant.
ISSUES PRESENTED
1) The pertinent contracts do not provide that plaintiff indemnify defendant for the expenditures in question.
2) Defendant's declaration does not establish that plaintiff subsequently assumed liability for the cost of repairs.
3) Section 2509, subdivision (3), of the California Uniform Commercial Code is not applicable.
4) Varco-Pruden, Inc. is not entitled to attorney's fees on this appeal.

RECORD
Plaintiff Varco-Pruden, Inc. (hereinafter "Varco") filed a complaint in the Monterey County Superior Court against Hampshire Construction Company (hereinafter "Hampshire") for damages for breach of contract. Hampshire filed an answer and counterclaim against Varco and cross-complaints against various other defendants.
Thereafter, Hampshire filed a motion for summary judgment and a supporting declaration of C.H. Haberkorn. Varco filed no counteraffidavits. The court granted the motion and judgment was entered dismissing the complaint.
The pleading situation in this action is most unusual in that the parties entirely ignored the theories expressed in the pleadings and the summary judgment was considered and granted on a theory not pleaded.[1] Plaintiff's complaint alleged that Varco and Hampshire on January 9, 1969, entered into a written contract that plaintiff would furnish the necessary labor and materials for the construction of a building on the property of Basic Vegetable Products. Inc. (hereinafter "Basic") at King *657 City; that plaintiff had performed its part of the contract but that Hampshire breached the contract by failing to pay plaintiff the balance owing on the contract  $14,923.93; and that Varco was thereby damaged in that sum.
Hampshire answered denying liability. It counterclaimed alleging that in the agreement of the parties it was provided that Varco "agreed to use proper care in dealing with all building materials on the job site" and be bound by "all agreements and contracts binding the contractor, defendant HAMPSHIRE...." The counterclaim then referred to the fact that Hampshire had entered into a contract with Basic to construct for it a building [thus the situation was that Varco subcontracted with Hampshire to construct the building which Hampshire was to build for Basic]. Hampshire's contract with Basic provided that Hampshire would "adequately protect the work, adjacent property and the public and shall be responsible for any damage or injury due to its act or neglect." Hampshire alleged that it had performed all the conditions of its contract with Varco but that Varco breached that contract by failing to protect its work and to take care of all building materials on the job site, and that as a result of said breach, a fire occurred which caused damage to building materials and the partially constructed building in an unknown amount exceeding $15,000 and that as a further result of said breach Hampshire was damaged in the amount of $14,923.
In a second cause of counterclaim Hampshire claimed damages for Varco's alleged negligence in the protection and preservation of the buildings and building materials.
Hampshire cross-complained against Basic alleging breach of its agreement with Hampshire in failing to pay $11,114.67 due under the contract. Thus, there is no mention in the pleadings of any claim of indemnity, the theory upon which as will hereinafter be shown the summary judgment was based.
In the pretrial statements of the parties and in the pretrial order there is still no mention of Hampshire's claim of indemnification by Varco.

STATEMENT OF FACTS
On January 9, 1969, Varco as subcontractor entered into a contract with Hampshire as contractor, whereby Varco agreed to furnish all labor and materials, with a few exceptions, to construct a metal building on the property of Basic in accordance with certain plans and specifications.
*658 By an agreement made January 24, 1969, between Basic and Hampshire. Hampshire contracted to perform all work necessary to construct for Basic a warehouse (the same metal building described in the Varco-Hampshire contract).
In May 1969, a fire occurred at the construction site. Neither of the parties to the appeal makes an assertion of fact that either caused the fire.
Following the fire a meeting was held between representatives of Varco and Hampshire. Varco agreed to reorder and replace damaged steel in the building. Hampshire agreed to steam clean and repair damaged steel which did not have to be replaced. The work done by Hampshire was to be billed to Varco on the understanding that Varco would submit the bill to its insurance carrier.
Meanwhile, Basic replaced damaged concrete expending $11,114.67 and deducting same from amounts due to Hampshire. On October 16, 1969, Hampshire sent Varco its final payment on the job deducting therefrom the charges for repairs and cleaning it had made to the nonreplaced steel, and the amount which Basic had expended for the concrete replacement which amount Basic withheld from payment to Hampshire. Varco then filed suit to recover these deducted amounts.

The Summary Judgment Proceedings
Hampshire moved for summary judgment against Varco "on the ground that there is no triable issue of fact, in that as a matter of law, the subcontract agreement between defendant HAMPSHIRE CONSTRUCTION COMPANY, a corporation, and plaintiff VARCO-PRUDEN, INC., a corporation, requires plaintiff to bear the loss for damages occurring during the course of construction which are not the fault of defendant HAMPSHIRE CONSTRUCTION COMPANY, a corporation." Supporting the motion was the declaration by C.H. Haberkorn, an employee of Hampshire, which set forth Hampshire's expenditures due to the fire and its demand on Varco for reimbursement. Attached was a letter from Varco to the effect that it was awaiting advice from its insurance carrier as to "where the liability lies on this claim, ..." There was no statement that Varco had agreed to reimburse Hampshire.
The rules of summary judgment are well established: "`The matter to be determined by the trial court in considering such a motion is whether *659 the defendant (or the plaintiff) has presented any facts which give rise to a triable issue. The court may not pass upon the issue itself. Summary judgment is proper only if the affidavits in support of the moving party would be sufficient to sustain a judgment in his favor and his opponent does not by affidavit show such facts as may be deemed by the judge hearing the motion sufficient to present a triable issue. The aim of the procedure is to discover, through the media of affidavits, whether the parties possess evidence requiring the weighing procedures of a trial. In examining the sufficiency of affidavits filed in connection with the motion, the affidavits of the moving party are strictly construed and those of his opponent liberally construed, and doubts as to the propriety of granting the motion should be resolved in favor of the party opposing the motion. Such summary procedure is drastic and should be used with caution so that it does not become a substitute for the open trial method of determining facts.' (Stationers Corp. v. Dun & Bradstreet, Inc. (1965) 62 Cal.2d 412, 417 [42 Cal. Rptr. 449, 398 P.2d 785]; see Joslin v. Marin Mun. Water Dist. (1967) 67 Cal.2d 132, 146-148 [60 Cal. Rptr. 377, 429 P.2d 889].)" (Corwin v. Los Angeles Newspaper Service Bureau, Inc. (1971) 4 Cal.3d 842, 851-852 [94 Cal. Rptr. 785, 484 P.2d 953].)

1) No provision for indemnity.

The claim of indemnity is based on condition 19 of the Varco-Hampshire contract and paragraph 2 of the Basic-Hampshire contract.
(1) Condition 19 of the contract between Varco and Hampshire provided in part: "All provisions of the contracts and agreements... binding the Contractor, in turn bind the Subcontractor." Paragraph 2[2] of the Basic-Hampshire contract reads: "Contractor shall be solely responsible *660 for and shall hold Owner free and harmless from any and all losses, expenses, damages, demands, and claims arising out of or in connection with injuries (including death) or damages to any and all persons, employees and/or property in any way sustained or alleged to have been sustained in connection with or by reason of the performance of the work by Contractor, its sub-contractors, agents or employees." Respondent Hampshire claims that under these provisions Varco had contracted to bear the risk of loss in such a situation as fire damage to the building under construction. However, as appellant Varco correctly contends this is not so because as a matter of law paragraph 2 only indemnifies Basic for claims by third parties.
In Dixie Container Corporation v. Dale (1968) 273 N.C. 624 [160 S.E.2d 708], the North Carolina Supreme Court was called upon to interpret a clause, similar to paragraph 2, which read: "`Dale Construction Company shall indemnify and save harmless the Delos Realty Corporation and Dixie Container Corporation of N.C., and their principals against all loss, cost, including reasonable attorney's fees, or damage on account of injury to persons or property occurring in the performance of this contract and agreement.'" (At p. 709.) In interpreting that clause as applying only to claims made by third parties the court wrote: "We think it is reasonably clear that in the `indemnify and save harmless' clause, defendant only bound itself to reimburse plaintiff for any damages it became obligated to pay third persons as a result of defendant's activity on the leased premises. Ordinarily, indemnity connotes liability for derivative fault. Edwards v. Hamill, 262 N.C. 528, 138 S.E.2d 151. `In indemnity contracts the engagement is to make good and save another harmless from loss on some obligation which he has incurred or is about to incur to a third party * * *.' New Amsterdam Casualty Co. v. Waller, 233 N.C. 536, 537, 64 S.E.2d 826, 827." (At p. 711.) The reasoning in the Dixie Container Corporation case is equally applicable to the instant case. And, as neither Basic nor Hampshire was a *661 third party, clearly liability cannot be imposed on Varco by virtue of paragraph 2.[3]

Condition 2 of the Varco-Hampshire contract
Condition 2 of the Varco-Hampshire contract reads: "All workmanship of Subcontractor shall be to the complete satisfaction of Contractor and until acceptance of the work by Contractor the job shall not be deemed complete and final payment shall not be due." Although respondent Hampshire raised this clause as a defense in its points and authorities submitted on its motion for summary judgment, the affidavit submitted fails to allege either any defect in the workmanship of the subcontractor or that such work was not accepted as satisfactory by the contractor. Therefore, the trial court could not have considered condition 2 as grounds upon which to grant the motion for summary judgment.[4]

Condition 10 of the Varco-Hampshire contract
Condition 10 of the Varco-Hampshire contract reads: "Subcontractor shall protect his work, shall take proper care of all building materials on the job, including the materials of others, and shall clean up and remove all rubbish and surplus materials as the work progresses. In the event such clean-up work is not done by Subcontractor, Contractor may then give Subcontractor 48 hours' notice to do so and to remove rubbish, and if this is not done by Subcontractor within such time, then Contractor shall have the same done at Subcontractor's expense and Subcontractor shall reimburse Contractor for such expense."
As with condition 2 of the Varco-Hampshire contract, respondent Hampshire raised this condition as a defense in its points and authorities submitted with its motion in the trial court. However, the declaration of C.H. Haberkorn makes no assertion that Varco failed to take proper care of the building materials. Therefore, the trial court could not have *662 considered condition 10 as grounds upon which to grant the summary judgment.[5][6]

2) The declaration fails to establish a subsequent agreement to assume liability.

Aside from its contentions in regard to the written contract provisions, Hampshire also claims in respondent's brief that after the fire an agreement was reached between Varco and Hampshire as to who would perform the work necessary to correct the fire damage and how payment for same was to be handled. Hampshire asserts that the declaration of C.H. Haberkorn and the attached exhibits make it clear that there was an agreement between Varco and Hampshire that Hampshire would offset payments which it had to make relative to the fire damage against the contract price it owed Varco; and that Varco would not seek reimbursement for any fire related costs from Hampshire but would look to its own insurance carrier for same.
The declaration and attached documents fail to support Hampshire's contention. The declaration contains the following statement: "After VARCO-PRUDEN, INC., received the letter of May 5, 1969, a meeting was held at the job site between the undersigned on behalf of HAMPSHIRE CONSTRUCTION COMPANY and JAMES SHOOK and DENNIS DEZONIA, at which time it was agreed that VARCO-PRUDEN, INC., would reorder and replace damaged steel and that HAMPSHIRE CONSTRUCTION COMPANY would steam clean and repair smoke damaged steel which was not to be replaced. The work done by HAMPSHIRE CONSTRUCTION COMPANY was to be billed to VARCO-PRUDEN, INC., on the understanding that VARCO-PRUDEN, INC., would then submit HAMPSHIRE CONSTRUCTION COMPANY'S bill to its insurance carrier." This statement is not sufficient to support Hampshire's claim that Varco agreed to assume the cost of the *663 work done by Hampshire. All the statement says is that Varco would submit the bill to its insurance carrier. There is nothing in the statement that indicates that Varco agreed to assume the cost if its insurance carrier rejected the claim.
The declaration also states: "It was further stated by HAMPSHIRE CONSTRUCTION COMPANY and agreed by VARCO-PRUDEN, INC., that the matter of recovery of any losses incurred by VARCO-PRUDEN, INC., would be handled as an insurance matter as indicated in MR. TOSTEVIN'S letter attached hereto as Exhibit D." However, all that Tostevin's letter indicates is that Varco was submitting a claim to its insurance company for the expenses Hampshire incurred due to the fire damage. The letter does not reveal that absent an agreement by the insurance company to pay the claim Varco would assume liability for the amount. The body of the letter reads: "Thank you very much for your check on the Basic Vegetable job., We note, however, that you have deducted $14,923.93 for your portion of the fire damage. Since our insurance company has not advised us of where the liability lies on this claim, we will show this amount due on the Basic Vegetable job until such time our insurance company advises us of the true liability."

3) California Uniform Commercial Code section 2509, subdivision (3), is not applicable.

California Uniform Commercial Code section 2509.[7] subdivision (3), reads: "In any case not within subdivision (1) or (2), the risk of loss passes to the buyer on his receipt of the goods if the seller is a merchant; otherwise the risk passes to the buyer on tender of delivery." Appellant contends that, "[o]bviously, materials were delivered to defendant to help construct this building" and that under the above code section the risk of loss as to the materials passed to Hampshire.
In Aced v. Hobbs-Sesack Plumbing Co. (1961) 55 Cal.2d 573 [12 Cal. Rptr. 257, 360 P.2d 897], the court held that a contract for construction of a completed improvement (a heating system) was not a sale within the meaning of the Uniform Sales Act (the forerunner to the California Uniform Commercial Code), but a contract for labor and material. The court stated at page 581: "Several cases ... have applied the Massachusetts rule in holding that there was no sale in situations where the person supplying the labor and materials incorporated the product into a building. [Citations.] In such a situation the test is not *664 whether the materials used were specially manufactured for the particular work but whether the finished product in which they are incorporated is specially constructed for the job and not suitable for use in the ordinary course of the contractor's business. Here the tubing was embedded in concrete as part of a heating system designed for the particular home in which it was installed."
(2) The analysis is equally appropriate in the instant case, and it is clear that California Uniform Commercial Code section 2509, subdivision (3), does not apply.

4) Varco is not entitled to attorney's fees on the appeal.

(3) Condition 15 of the Varco-Hampshire contract provides in part: "In the event Contractor shall bring suit against Subcontractor under this Contract, any recovery by Contractor shall include costs of such litigation and reasonable attorney's fees." And, Civil Code section 1717 provides in part: "In any action on a contract, where such contract specifically provides that attorney's fees and costs, which are incurred to enforce the provisions of such contract, shall be awarded to one of the parties, the prevailing party, whether he is the party specified in the contract or not, shall be entitled to reasonable attorney's fees in addition to costs and necessary disbursements.... [¶] As used in this section `prevailing party' means the party in whose favor final judgment is rendered." [Italics added.]
There has not yet been any "recovery" by Varco or any final judgment. In the event that Varco recovers judgment on its complaint, attorney's fees for this appeal may be included in the attorney's fees awarded.
The order granting the motion for summary judgment and dismissing Varco's complaint is reversed and the case is remanded to the trial court for trial on Varco's amended complaint for breach of contract and damages. It is to be noted that this appeal has been limited to the determination that the contracts do not provide for indemnification.
Judgment reversed.
Taylor, P.J., and Rouse, J., concurred.
NOTES
[*]   Retired Presiding Justice of the Court of Appeal sitting under assignment by the Chairman of the Judicial Council.
[1]  However, for the purpose of this appeal, we are considering the issue as if pleaded.
[2]  For the first time on appeal Varco asserts that there was a triable issue of fact because there were no facts before the trial court showing mutual assent by Varco to be bound by paragraph 2 of the Basic-Hampshire contract or showing that Varco had any knowledge of the existence of paragraph 2. This contention is based upon the fact that the two contracts show on their faces that the Basic-Hampshire contract was not executed until after the Varco-Hampshire contract.

"The rule that separate written documents between the same parties and relating to the same subject-matter as indicated by the language contained therein ... are to be construed together as one transaction, has been determined by so many authorities there is no room for controversy regarding that principle. [Citations.] This rule applies even though the separate written instruments were not executed on the same date." (Lynch v. Bank of America N.T. & S. Assn. (1934) 2 Cal. App.2d 214, 223 [37 P.2d 716]; Harm v. Frasher (1960) 181 Cal. App.2d 405, 414 [5 Cal. Rptr. 367].) "Likewise, the general principle under consideration applies whether each of the several instruments was signed by all or only by some of the parties to the transaction [citation]...." (Harm v. Frasher, supra; see also Body-Steffner Co. v. Flotill Products (1944) 63 Cal. App.2d 555, 560 [147 P.2d 84]; Cadigan v. American Trust Co. (1955) 131 Cal. App.2d 780, 786 [281 P.2d 332]; Berg Metals Corp. v. Wilson (1959) 170 Cal. App.2d 559, 567 [339 P.2d 869].) "The general rule is that when a person with the capacity of reading and understanding an instrument signs it, he is, in the absence of fraud and imposition, bound by its contents, and is estopped from saying that its explicit provisions are contrary to his intentions or understanding [citations]." (Larsen v. Johannes (1970) 7 Cal. App.3d 491, 501 [86 Cal. Rptr. 744].)
In the instant case Hampshire by the affidavit and attached contracts provided evidence of two contracts as one transaction. Varco failed to dispute this by any counteraffidavit. Therefore, the evidence presented by Hampshire was sufficient to establish mutual assent and the existence of the contracts for the purpose of the summary judgment motion.
[3]  Moreover, it is noted that while condition 19 in the Varco-Hampshire contract may be sufficient to "hind" the subcontractor. Varco, to any agreement which Hampshire made with Basic, its language in no manner purports to create any liability on Varco's part for expenditures which were made by Hampshire.

Furthermore, the affidavit fails to establish that the fire was "sustained in connection with or by reason of the performance of the work ..." of constructing the building. (See paragraph 2 of the Basic-Hampshire contract.)
[4]  It is also of note that respondent makes no argument in its brief that the condition was applicable.
[5]  It is noted that respondent's brief on appeal makes no argument that condition 10 was applicable.
[6]  Appellant also contends that absent a contract provision to the contrary, a subcontractor who contracts only to do part of the work on a structure is not deprived of his right to compensation by the fact that the building is destroyed after he has performed all of his work. This issue was not raised by appellant below. There was no evidence before the trial court that appellant had completed all its work before the fire. A determination of this issue and whether the claimed rule is applicable to the instant case may be properly determined at the trial on appellant's amended complaint, if appellant desires to pursue the theory. "`The matter to be determined by the trial court in considering such a motion [for summary judgment] is whether the defendant (or the plaintiff) has presented any facts which give rise to a triable issue. The court may not pass upon the issue itself....'" (Corwin v. Los Angeles Newspaper Service Bureau, Inc., supra, 4 Cal.3d 842 at p. 851.)
[7]  The section is 2-509 of the Uniform Commercial Code without change.
