416 P.2d 157

#### INSTITUTE FOR ESSENTIAL HOUSING, INC., a New Jersey Corporation, Defendant-Cross-Plaintiff and Appellant, v. Clifford G. KEITH and Annie M. Keith, his wife, Defendants-Cross-Defendants and Appellees.

No. 7759.

Supreme Court of New Mexico.

April 11, 1966.

Rehearing Denied July 18, 1966.

*493Boyce & Fettinger, Alamogordo, for appellant.

Frazier, Cusack & Schnedar, Roswell, for appellees.

NOBLE, Justice.

This action was commenced as one to foreclose materialmen’s liens in connection with the construction of the Keith home,’ but by cross-complaint Institute for Essential Housing, Inc. (hereafter termed I.E.H.) sought foreclosure of a note and mortgage executed by the Keiths and allegedly given to I.E.H. to finance the house. The material liens are not now an issue. I.E.H. has appealed from a summary judgment dismissing its cross-complaint. This appeal, therefore, turns on whether the pleadings, answers to interrogatories and affidavits present a genuine issue of fact requiring determination.

It is firmly established that in considering a motion for summary judgment, the pleadings, depositions and affidavits must be viewed in the most favorable aspect they will bear in support of the party opposing the motion. Ginn v. MacAluso, 62 N.M. 375, 310 P.2d 1034; Sooner Pipe & Supply Corp. v. Doerrie, 69 N.M. 78, 364 P.2d 138; Hubbard v. Mathis, 72 N.M. 270, 383 P.2d 240. And, summary judgment will be granted only when the moving party is entitled to the judgment as a matter of law upon clear and undisputed facts. Rules of Civil Procedure, Rule 56(c) '(§ 21-1-1(56) (c), N.M.S.A.1953); Srader v. Pecos Construction Company, 71 N.M. 320, 378 P.2d 364; Hubbard v. Mathis, supra.

So considered, we think that there were genuine issues of fact to be resolved in this case and that summary judgment was improper. Without attempting to detail all of them, we merely point out the fol*494lowing issues of fact which have not been resolved. Keith alleges and I.E.H. denies that the note and mortgage were delivered upon the condition that they would only become effective upon construction of the Keith home in accordance with certain plans and specifications. Keith alleges and I.E.H. denies that I.E.H. agreed to “furnish materials and build a house” for Keith. I.E.H. denies that a purported construction contract is in fact its agreement or that it was executed in its behalf by an authorized agent.

The arguments on appeal make it apparent to us that the trial court may have been influenced in rendering summary judgment by the contention that I.E.H. built the house without a contractor’s license and, therefore, could not enforce a claim for collection of compensation for such collection. In the first place, the issue of whether I.E.H. agreed to construct the Keith house is one of fact to be determined upon a trial of the issues and, since the question will no doubt be again before the trial court when the case is heard on its merits, we shall discuss it. The forfeiture clause (§ 67-16-14, N.M.S.A.1953) .of the Contractors’ License Law reads, so far as pertinent: •

> “No contractor * * * shall * * * bring or maintain any action in any court of the state for the collection of compensation for the performance of any act for which a license is required by this act without alleging and proving, that such contractor was a duly licensed contractor * *

It is plain that since the statute only prohibits an unlicensed contractor from bringing or maintaining an action “for the collection of compensation” for construction work, recovery by I.E.H. is prohibited only if its action on the note and mortgage is one for collection of compensation for a construction contract. It does not appear that it was such an action. The action framed by the cross-complaint of I.E.H. is one seeking judgment on a promissory note and to foreclose a mortgage given as security therefor. That cross-claim constitutes the action with which we are now concerned. From its very nature, a promissory note is a separate contract, Broyles v. Achor, 78 S.W.2d 459 (St. Louis Ct.App.1935), and an action based thereon is a separate cause of action. Grue v. Hensley, 357 Mo. 592, 210 S.W.2d 7. Keith’s defense claiming that I.E.H. an unlicensed contractor, agreed to-build his house does not make the I.E.H. counterclaim on the note and mortgage an action prohibited by § 67-16-14, supra.

It follows that the case must be reversed and the district court instructed to vacate the summary judgment and to proceed further in a manner not inconsistent with this, opinion.

It is so ordered.

CARMODY, C. J., and CHAVEZ, J.„ concur. ■ ■

*495PER CURIAM.

The motion for rehearing is denied. The following is in addition to the opinion heretofore filed.

OPINION ON REHEARING

NOBLE, Justice.

The question of whether any acts prohibited by the statute affect the consideration or validity of the obligation sued upon is not before us on this appeal, and we express no opinion thereon.

CARMODY, C. J., and CHAVEZ, J., concur.