
    (December 9, 1907.)
    VALLEY LUMBER & MANUFACTURING COMPANY, Respondent, v. JOHN E. NICKERSON et al., Appellants.
    [93 Pac. 24.]
    Foreign Corporation — Pleading Compliance with State Law— Materialman’s Lien — Extension of Time within Which to File Lien — Material to be Used in Building — Contractor Agent of Owner — Evidence—Proof of Delivery.
    1. In order for a foreign corporation to maintain an action in the courts of this state, it is necessary that it plead a compliance with the constitution and statutes prescribing the conditions on which it may qualify and obtain a legal capacity to contract and maintain actions thereon, and a complaint that fails to state such facts is subject to demurrer. If, however, the defendant fails to raise the question by demurrer or answer, he will be deemed to have waived the same.
    2. A demurrer to a complaint on the ground that it does not state facts sufficient to constitute a cause of action is not sufficient to raise the question of the legal capacity of a foreign cor"poration to maintain an action in this state.
    3. Where the materialman had furnished no material for thirty days, and during the last twenty days of that time the building was occupied by the owner, and in the meanwhile the contractor had returned material that was not used in the building, and the materialman had notice of all these facts, he cannot extend the time for filing a lien by proof that he thereafter sent to such building, for the contractor, forty cents’ worth of material, there being no showing that such material was necessary for or used in the building under the original contract.
    
      4. A memorandum kept by a yardman in the employ of a lumber company giving a description of lumber, the name of the owner of the building to which it was sent, and the name of the teamster to whom the lumber was delivered, is not competent evidence to prove a delivery of the material to the contractor or at the building for which it was furnished, where the teamster was in the employ of the lumber company and not the agent of or in the employ of the contractor.
    5. Under the mechanic’s lien law of this state (Act of Feb. 7, 1899, Sess. Laws, 1899, p. 147), the contractor for the construction, alteration or repair of a building is the special agent of the owner for the purpose of securing the material necessary for the construction, alteration or repair of such. building, but through such agency the owner cannot be personally bound, as the charge becomes one purely in rem, and runs against the building or structure only.
    6. The contractor being only a special agent of the owner, with limited power, his authority to bind the property benefited for the payment of the value of the material extends only to such material as is reasonably and ordinarily sufficient properly to construct or repair the building in accordance with the plans and specifications thereof, or in pursuance of the agreement and contract entered into between the owner and the builder.
    (Syllabus by the court.)
    APPEAL from the District Court of the Second Judicial District for Nez Perce County. Hon. Edgar C. Steele, Judge.
    Action by the plaintiff to foreclose a materialman’s lien. Judgment for the plaintiff and defendants appealed.
    
      Judgment reversed.
    
    Eugene A. Cos, for Appellants.
    Our statute provides that no contract or agreement in the name of or for the use or benefit of a corporation which has not complied with the laws of Idaho, “can be sued upon or enforced in any court of this state” prior to the making of such filings. {Katz v. Herrick, 12 Idaho, 1, 86 Pae. 873.)
    That being a condition precedent, the fact must be both alleged and proved to entitle the corporation to judgment. {Taber v. Interstate B. & L. Assn., 91 Tes. 92, 40 S. W. 954; citing Cumberland Land Co. v. Canter L. Co. (Tenn. Ch.), 35 S. W. 886; Mullens v. Mtg. Co., 88 Ala. 280, 7 South. 201; Thorne v. Ins. Co., 80 Pa. St. 15, 21 Am. Rep. 89; Paul v. Virginia, 8 Wall. 168,19 L. ed. 357; Holloway v. Bailway Co., 23 Tex. 465, 76 Am. Dec. 68.)
    Even if the point was not made in the court below, nor does it appear in the evidence, that the complainant had failed to file its charter and have an abstract thereof registered, as required by our statutes, but it does appear that it is a foreign corporation and that it was doing business in this state, then ■in order to obtain any relief in any of the courts of this state, it was incumbent on the complainant to show affirmatively that it had complied with our statutes. (Cary-Lombard Lumber Co. v. Thomas, 92 Tenn. 587, 22 S. W. 743; Cumberland L. Co. v. Canter L. Co. (Tenn. Ch.), 35 S. W. 886. See, also, for a New York decision in 1905, Welsbach Co. v. Norwich Gas Co., 180 N. Y. 533, 72 N. E. 1152.)
    There is no evidence of the filing of a designation of agent with the clerk of the court, and there is no evidence whatsoever of any attempt to file articles and designation of agent with the secretary of state.
    Plaintiff, in its lien and complaint, claims delivery of material from February 27, to May 31, 1905. The lien was filed on July 28, 1905, or fifty-eight days from the 31st day of May. The only deliveries attempted to be shown in May are one small item on May 1st, and a forty-cent item on May 31st. The plaintiff must prove that this item of May 31st was actually used in the building, or its case fails.
    ‘ ‘ There are many cases holding that it is not competent for mechanics by trivial work and trivial alterations to extend the time for the filing of liens. This is the law in all the states where such statutes exist. ’ ’ (Burleigh Bldg. Co. v. Mer-
    
    
      chants’ etc. Co., 13 Colo. App. 455, 59 Pac. 83; Joost v. Sullivan, 111 Cal. 286, 43 Pae. 896; Barrows v. Knight, 55 Cal. 155; California Pmoder Whs. v. Gold Mines (Cal.), 22 Pac. 391; Harlan v. Stufflebeem, 87 Cal. 508, 25 Pac. 686; Johnson v. Gold, 32 Minn. 535, 21 N. W. 719.)
    
      In states where the lien for materials is limited to materials not only furnished for but actually used in its construction, the time for filing dates from the last delivery of material used in the building, even though other material was afterward delivered. (Gale v. Blaikie, 129 Mass. 206; Kennebec Framing Co. v. Pickering, 142 Mass. 80, 7 N. E. 30; Barrows v. Knight, 55 Cal. 155; California Powder Wks. v. Gold Mines (Cal.), 22 Pac. 391.)
    It is impossible to segregate the lienable items, if such they be, from the nonlienable items, in the account set forth in the claim of lien, which is, therefore, unavailing for the purposes intended. (Williams v. Coal Co., 25 Or. 426, 42 Am. St. Rep. 799, 36 Pac. 159; Hughes v. Lansing, 34 Or. 118, 75 Am. St. Rep. 574, 55 Pac. 95; Kezartee v. Marke, 15 Or. 529,16 Pac. 407; Dalles Lumber & Mfg. Co. v. Wasco etc. Co., 3 Or. 527; Williams v. Coal Co., 25 Or. 426, 42 Am. St. Rep. 799, 36 Pac. 159; McLain v. Hutton, 131 Cal. 132, 61 Pac. 273, 63 Pac. 182.)
    C. H. Lingenfelter, for Respondent.
    The question as to whether or not the plaintiff is entitled to do business under the laws of the state of Idaho is not disputed by the appellants. The defendants, neither by demurrer nor answer, question the authority of the company to do business in this state. This can only be raised by answer, otherwise it is waived. (Ontario State Bank v. Tibbits, 80 Cal. 68, 22 Pac. 66; Phillips v. Goldtree, 74 Cal. 151, 13 Pae. 313, 15 Pac. 451; Southern Pac. B. Co. v. Pursell, 77 Cal. 69, 18 Pac. 886-889; Dahl v. Montana Copper Co., 132 IT. S. 264, 33 L. ed. 325, 10 Sup. Ct. Rep. 97; Ency. PI. & Pr. 89, 90, and cases cited; Wetzel v. Tennis Bros. Co., 145 Fed. 458.) In the case at bar it is not alleged in the complaint that the corporation is authorized to do business in this state, nor is its right denied either affirmatively or negatively by the defendants. The question cannot be raised in this court for the first time.
    
      There being no issue raised, either affirmatively or negatively, relative to compliance with the laws governing foreign corporations, such evidence will be regarded as immaterial, irrelevant and redundant. (1 G-reenleaf on Evidence, sec. 67; 1 Starkie on Evidence, sec. 401.)
    As to the items under one contract, the time commences at the date of the last thereof, regardless of the time occupied in the execution of the same. (Fowler v. Bailey, 14 Wis. 125; Hutchins v. Bautch, 123 Wis. 394, 107 Am. St. Rep. 1014, 101 N. W. 671.) •
    It is the furnishing of material for the building which entitles a party to a lien, and its actual use in the construction thereof need not be shown. (Fitch v. Hoivitt, 32 Or. 396, 52 Pac. 194; Frudden Lumber Co. v. Kinnan, 117 Iowa, 93, 90 N. W. 515; Lee v. Hoyt, 101 Iowa, 101, 70 N. W. 95.) All that is required is that the materials were delivered at the premises. (W. P. Fuller & Co. v. Ryan (Wash.), 87 Pac. 485, and cases cited.)
    If material is delivered in good faith to a subcontractor for use in the construction of a railroad, a materialman is entitled to his lien therefor, in the absence of definite proof that it was not used for that purpose. (Hercules Powder Co. v. Knoxville R. R. Co., 113 Tenn. 382, 106 Am. St. Rep. 836, 83 N. W. 354, 67 L. R. A. 487.)
    A lien may be had for materials in good faith delivered at the premises for use in the building, though some of them were afterward used for other purposes. (Kalina v. Btenmeyer, 103 111. App. 502; Tennis Bros. Co. v. Wetzel etc. R. R. Co., 140 Fed. 193; Westinghouse Brick Co. v. Kansas City R. R. Co., 137 Fed. 26.)
    The evidence adduced at the trial consisted of the original entries made by the yardmaster, who placed the materials on the wagon, and also the first entries made upon the books of the company, consisting of the delivery slips for the Nickerson house. Entries made from weight slips are admissible. (.Bloomington Min. Co. v. Brooklyn Hygienic Ice Co., 171 N. V. 673, 64 N. E. 1118; McGoldrick v, Traphagan, 88 N. Y. 334; 2 Ency. of Ev. 612.)
   AILSHIE, C. J.

The plaintiff, the Valley Lumber Company, a corporation, furnished to the defendant, Hugh Morrison, who was the original contractor in the construction of a building for the defendant Nickerson, lumber and material necessary for the construction of the building. It is. alleged by the complaint that the material was furnished and delivered at the premises between the twenty-seventh day of February, 1905, and the thirty-first day of May of the same year. The lien was filed on July 28th, following. The lien was therefore filed fifty-eight days after the date on which it is alleged the last material was furnished.

The complaint is in the usual form for the foreclosure of a materialman’s lien, with the exception of paragraph 1 thereof, which alleges plaintiff’s corporate existence, and is as follows: ‘ ‘ That the plaintiff is, and was at all times hereinafter mentioned, a corporation organized and existing under and by virtue of the laws of the state of "Washington, with its principal place of business at Clarkston, Washington, and doing business at Lewiston, Nez Perce County, Idaho. ’ ’ The defendants demurred to the complaint on the ground that it does not state facts sufficient to constitute a cause of action. The demurrer was overruled and defendants thereupon answered. The answer did not put in issue the corporate existence of the plaintiff, nor did it contain any allegation touching the plaintiff’s compliance with the foreign corporation laws of this state.

At the trial the plaintiff introduced a certified copy of its-articles, together with a certificate showing that the same had been filed with the county recorder of Nez Perce county, and also a certificate showing that it had filed a designation of an agent, but it did not go further and show that it had made its filings with the secretary of state. Defendant’s attorney objected'to the evidence as immaterial and outside of the issue. The defendants failed, however, to raise the question either by demurrer or answer and must be deemed to have waived it. In Talley Lumber & Mfg. Co. v. Driessel, ante, p. 662, 93 Pac. 765, just decided, we have held that it is necessary for a foreign corporation commencing an action in. this state to allege and prove that it has complied with the law entitling it to do business in the state, but we also held that if it fails to do so, the defendant must raise the question by demurrer or answer in the usual and ordinary manner of pleading and settling issues, or he will be deemed to have waived it. Of course, if during the trial it should clearly appear to the court by admission or evidence that the plaintiff had not complied with the constitution and statutes of this state, the court might of its own motion nonsuit such a plaintiff. (Katz v. Herrick, 12 Idaho, 1, 86 Pac. 873.)

Passing now to a more serious question in this case: Appellants contend that the company has no valid lien, for the reason that it did not file its claim of lien within sixty days after the completion of the building or the furnishing of the last item of material. If appellant’s contention is correct on that point,-our determination of that assignment of error will dispose of this appeal. The evidence On this point is' rather brief. Morrison, the contractor, testifies that “the building was finished sixty days before that (May 31st) and they were living in the house.” Nickerson moved into the house on May 11th, and Morrison further states that the house had been completed before Nickerson moved in, and the lumber and material had been cleared away from about the house prior to that time, and unused material had been returned and credited on the bill. He further testifies that he notified the plaintiff of the completion of the building, and that the owner had moved in, and that thereupon the company furnished him with an itemized statement of the material that had’ been used in the building, and that he checked over the list with the company’s secretary and they made some corrections in the account, and upon the trial he produced this itemized statement, and it was introduced in evidence as defendant’s exhibit “A.” Plaintiff had attached to its complaint what purported to be an itemized statement of the material furnished, and had it marked exhibit “A.” When the contractor was on the witness-stand, the plaintiff’s attorney asked him a number of questions about the account as shown on exhibit “A,” and the defendant’s attorney likewise asked the witness a number of questions about the statement as shown on exhibit “A.” A careful examination of the proceedings at the trial satisfies us that the plaintiff’s attorney was referring to exhibit “A” attached to the complaint, while defendants’ attorney was referring to exhibit “A” introduced in evidence, and which exhibit was the itemized statement presented to the contractor at the time he notified the company of the completion of the work. And it is equally clear that the witness so understood the questions propounded by the respective attorneys. The only material difference between these statements is the last entry in plaintiff’s exhibit “A,” which is:

“May 31, 20 ft. ceiling......................40”

This item does not appear on the defendants’ exhibit “A.” The last entry in each of the exhibits prior to this one of May 31st is the same, having been made of date May 1st. This latter entry is the last item appearing on defendant’s exhibit “A.” The contractor was on the witness-stand, but at no time did he state that he ever did any work of any kind on the building or placed any material therein after the owner moved in. On the contrary, he stated that he had never seen any statement containing this charge of May 31st until he was called as a witness. The plaintiff, in its endeavor to establish the fact that the forty cent item of May 31st was furnished and delivered for this building, introduced its yardmaster’s book, which contains the following entry:

“May 31st, Nickerson’s
20 ft. Bead Ceiling Frank
20 ft. 1x2 stop.”

and follows that by proof of the following entry in the office books of the plaintiff corporation:

“May 31, 1905, for Hugh Morrison
Delivered at Nickerson Teamster Frank
20 ft. No. 2 cedar ceiling, .40”

The bookkeeper was unable to identify the handwriting on the yardmaster’s book showing these entries. He thought however, they were made by one Cooper. He could not identify the forty cent entry, however, and was doubtful as to the word “Frank,” saying that it was apparently a different handwriting from the balance of the entry. Hollister, secretary of the corporation, testified that he entered the name of teamster on the yard' slip. A question arose upon the trial over the admission in evidence of the yardmaster’s book and the bookkeeper’s entry of the item for the purpose of proving the delivery of the material to the contractor or at the building for which it was furnished. There can be no doubt but that charges made by the yardmaster and the company’s officers at the. lumber-yard are not competent to prove a-delivery of the material to a third party or at a point removed from the place of the actual delivery. (2 Ency. of Ev. 641; White v. St. Phillips Church, 2 McMull. L. (S.C.) 306, 39 Am. Dec. 125.) These entries were proper and competent for some purposes and might be admissible to prove that the company delivered such material to the teamster, but it would take the evidence of the teamster or some other person who saw the lumber delivered or knew of its delivery to prove an actual delivery at the place to which the company undertook to make delivery. If the delivery had been made to the defendants’ agent, the case would be quite different, but this delivery seems to have been made to the plaintiff’s own teamster and would not prove a delivery to the defendants. There is an utter lack of evidence in this record to establish even a prima facie showing that the plaintiff furnished the item for the building charged under date of May 31st, and it likewise fails to show that any work was ever done on the building after May 11th, or that any material was used therein. For this reason alone the plaintiff has failed to establish a valid lien. Where the materialman had furnished no material for thirty days, and during the last twenty days of that”'time the building was occupied by the owner, and in the meanwhile the contractor had returned material that was not used in the building, and the material-man had notice of all these facts, he cannot extend the time for filing a lien by proof that he thereafter sent to such building, for the contractor, forty cents’ worth of material, there being no showing that such material was necessary for or used in the building under the original contract.

The question of trivial work or a slight change or improvement by the contractor not being sufficient to extend the time for filing °a lien, does not require our consideration in this case. Here the claimant has failed to establish the essential fact that it filed the lien “within sixty days after .... it ceased to furnish material.” The “20 ft. bead Ceiling” item for which the forty cent charge is made is not sufficiently established to extend the time for filing the lien. Plaintiff’s counsel, with commendable zeal and much ability, has presented this phase of the case in the most favorable light possible for his client, but the lumber company has failed to furnish him with evidence to establish its contention or show it in time in preferring its lien.

In this case the owner paid the contractor for the job and the latter failed and was unable to pay the company for the lumber used. Considerable time is consumed by appellants’ counsel in arguing the proposition that it is incumbent on a materialman to show that the material furnished was not only “to be used in the building” but that it was actually used. Section 1 of the Mechanic’s Lien Law of February 7, 1899, is the same as section 3669 of Hill’s Annotated Laws of Oregon, and the point under consideration here was considered by Chief Justice Moore in Fitch v. Howitt, 32 Or. 396, 52 Pac. 192, and the following conclusion was reached: “The contractor, being in the nature of a special agent of the owner, with limited power, has authority to bind the property benefited for the payment of the reasonable value of such material only as is ordinarily sufficient to properly construct the building in accordance with the plans and specifications thereof, or in pursuance of the agreement entered into between the owner and the contractor.” By section 1 of our lien law, the “contractor .... shall be held to be the agent of the owner for the purposes of this chapter.” The eon-tractor is a special agent for this purpose only, and the materialman must take notice of the limitations of the agency. It extends only to the purchase of material reasonably necessary out of which to build the structure in accordance with contract entered into between the owner and the builder. The agency cannot bind the owner personally, but rather binds the property constructed or improved under the contract and the charge is purely in rem.

Appellants complain of what they contend was a failure on the part of the plaintiff to establish at the trial that the material furnished was necessary for, or was used in, or was to be used in this particular building. Morrison, the contractor, testified that he was engaged on about six buildings at the time he was at work on this contract, and that he used the Nickerson building as a central point of supply, and that he moved lumber from that place to other buildings as he might need it instead of returning it to the lumber-yard. Plaintiff’s yards were in Clarkston, state of Washington, while this building and all the others on which Morrison was then engaged were in Lewiston in this state. Since a new trial must be had in this case, the parties can produce their proofs as to the amount of material that was to be used in this building that was reasonably necessary for it, and it will be unnecessary for us to further consider that point here.

The judgment must be reversed and a new trial will be granted. The plaintiff will be entitled to a judgment against the contractor for whatever amount may be found due from him to it. We assume from what we gather from the record that there is no reason for a new trial as to the lien, but since a new trial must be had, it may be on the whole case, and if the plaintiff should conclude that it has evidence to establish its lien within the purview of the law as herein construed, it may again be heard on that issue. Judgment is reversed and a new trial granted. Costs awarded in favor of appellants.

Sullivan, J., concurs.  