
263 P.2d 386 (1953)
SCHLUETER
v.
NELSON et al.
No. 7976.
Supreme Court of Idaho.
November 17, 1953.
Russell S. Randall, Lewiston, for appellants.
J. Henry Felton, William J. Jones, Lewiston, for respondent.
KEETON, Justice.
On and between December 27, 1949, and April 5, 1951, plaintiff performed work and labor for defendants in the construction of two dwellings and earned total wages of $926.50. On this amount $231.50 was paid. There is no material dispute between the parties as to the amount earned or the unpaid balance. Complaint was filed May 3, 1951. Complaint showed on its face that the wages claimed were not due, it having been agreed between the parties, and alleged in the complaint, that the balance of the wages earned would be paid on the happening of certain contingencies, namely, the completion of the dwellings on which the work was performed, and the sale of the same. The contingencies on which payment was to be made had not happened when the suit was brought. Demurrer to the complaint was sustained on the ground it did not state facts sufficient to constitute a cause of action. Thereafter on May 28, 1951, plaintiff filed an amended complaint in which he sought to foreclose *387 a mechanic's lien. Demurrer to the complaint having been overruled defendants answered the amended complaint, and alleged in an affirmative defense that the wages were not due because the contingencies above referred to, without fault on their part, had not occurred. The answer alleged, and on the trial without material conflict, defendants proved that at the time the suit was instituted and amended complaint filed there was nothing due under the contract of employment.
The court found that the wage agreement for deferred payment is unlawful and unenforceable, and entered a decree foreclosing the lien and awarding the plaintiff $200 attorney fees. From the decree this appeal is prosecuted.
As a background and understanding of the situation, we succinctly recite the following facts regarding which there is no material dispute.
Respondent (plaintiff in the trial court) had been treated as an inebriate in a Washington institution and released. He came to Lewiston impoverished, ill, and with a desire to change environment. Appellants managed a nursing home near Lewiston, and were also engaged in constructing two houses for sale. Respondent met appellants at the nursing home and the contract of employment was entered into. The circumstances under which appellants were constructing the houses were fully and fairly outlined to respondent; and as much for his own protection as for the protection of appellants, it was agreed that he might stay in the home and for minor chores to be performed, receive his board, room, and other benefits. At odd times he was to do work in the construction of the dwellings for which he was to be paid weekly 25% of the amount earned, and the balance when the houses were finished and sold. Respondent was further advised of an outstanding indebtedness against the houses being constructed. He enthusiastically and gratefully accepted the terms of employment. No advantage was taken of respondent in any way and the contract was in all respects fair and aboveboard. This arrangement continued between the parties, apparently on a friendly basis until April 5, 1951 at which time, for no reason which appears in the record, respondent quit and discontinued staying at the nursing home. He did not demand his pay or enter into any negotiations whatsoever with appellants, or either, relative to payment of sums earned. There does not appear to have been any misunderstanding or trouble between the parties.
Appellants contend that under the facts presented the action was prematurely brought; that nothing was due and therefore the judgment should be reversed and the proceedings dismissed.
When the payment of a debt for services performed is conditioned on the happening of some event, which is under the control of the obligor, the event must happen or a reasonable time must elapse before payment becomes due, and the obligor must make some reasonable effort to cause the event to happen. Such a condition in a contract for payment of services does not mean that the debt can never become due until the event on which it is conditioned actually happens. A reasonable time for the happening of the event must be measured by the circumstances or conditions surrounding each individual case. 13 C.J. 685; 17 C.J.S. Contracts, § 503, page 1066; 12 Am.Jur. 301; Vance v. Mutual Gold Corporation, 6 Wash.2d 466, 108 P.2d 799; Branch v. Lambert, 103 Or. 423, 205 P. 995; Noland v. Bull, 24 Or. 479, 33 P. 983; Hood v. Hampton Plains Exploration Co., C.C., 106 F. 408; Crooker v. Holmes, 65 Me. 195, 20 Am.Rep. 687; Hughes v. McEwen, 112 Miss. 35, 72 So. 848, L.R.A. 1917B, 1048; and the case note on page 1050.
A reasonable time had not elapsed between the time respondent quit and the bringing of the action, or the filing of the amended complaint. We find nothing in the contract which is unlawful, or against public interest, or that contravenes the good of society, or is against good morals. On strictly technical grounds, the judgment should probably be reversed, a new trial ordered, or the action ordered dismissed.
*388 While it has been held that an action prematurely brought cannot successfully be maintained, the rule is not a universal one, and the circumstances affecting the rights of the parties must be taken into consideration. Buhrmeister v. Buhrmeister, 10 Cal.App. 392, 102 P. 221; 5 C.J.S., Appeal and Error, § 1897, page 1391; 4 C.J. 1169, Sec. 3193.
Sec. 5-907, I.C. provides:
"The court must, in every stage of an action, disregard any error or defect in the pleadings or proceedings which does not affect the substantial rights of the parties and no judgment shall be reversed or affected by reason of such error or defect."
We are constantly reminded to disregard matters which do not go to the substantial rights of the parties.
Under the facts presented, the amount earned would necessarily be due at this time.
The only substantial right of the appellants which has been adversely affected and which we can correct in this proceeding is the imposition of attorney fees, to which the respondent is not entitled, as conclusively shown by the record. Sec. 45-513, I.C. which allows the court to fix attorney fees is to protect the laborer for the recovery of money which at the time of the filing of the lien or the foreclosure proceedings should have been paid. Such is not the case here.
At the time of the filing of the lien and the instituting of the foreclosure proceedings there was nothing due, and allowing attorney fees on the facts presented would simply unnecessarily burden appellants with an item of expense which they should not be required to pay.
We are of the opinion that this matter could and should have been disposed of without protracted, expensive litigation, and we see no reason to further prolong the controversy.
Reversing the judgment, granting a new trial, or ordering the action dismissed could, in the matter before us, serve no useful purpose. It would simply prolong expensive, unproductive, and unnecessary litigation.
The judgment against appellants will be modified by striking from the decree that part which allowed attorney fees for the foreclosure of the lien. Otherwise the judgment is affirmed. No costs are allowed.
PORTER, C. J., and GIVENS, TAYLOR and THOMAS, JJ., concur.
