
281 P.2d 1042 (1955)
Arlle S. HIXON, also known as A. Hixon, and Florence Hixon, husband and wife, Plaintiffs-Appellants,
v.
Ray ALLPHIN, Defendant-Respondent.
No. 8239.
Supreme Court of Idaho.
April 1, 1955.
*1043 Richards, Haga & Eberle, Dale O. Morgan, Boise, for appellants.
J. F. and C. Ben Martin, Boise, for respondent.
ANDERSON, Justice.
This is an action for restitution. The facts are set out in appellants' amended complaint. It discloses that appellants, as husband and wife, purchased two milk routes designated 20 and 22 and operated them continually for several years prior to 1951, with the consent of the Ada County Dairymen's Association, for whom the routes were operated. Appellants collected all milk within the routes from member-producers and furnished their own hauling equipment and paid their own expenses. They received compensation at a stipulated rate per pound for milk hauled. The hauling contract was terminable upon notice by either appellants or the Association. The milk routes are alleged to be valuable rights and that it is the universal custom for haulers on such routes to sell them with the knowledge and consent of the Association.
*1044 On or about January 2, 1951, with the consent of the Association, appellants entered into a written instrument with respondent and L. E. and Beth Spraker for the sale of a certain truck and trailer, together with milk routes 20 and 22 and the right to operate them under the hauling contract with the Association. The total sale price was $7,500, of which $500 was cash, the balance to be paid at the rate of $200 per month, together with 6% interest paid semi-annually. Possession was delivered and respondent has since operated the milk routes. Total payments were made in the amount of $2,900 by January 1952, at which time respondent failed and neglected and refused to make further payments.
February 8, 1952, appellants gave notice that the contract would be forfeited unless delinquent payments were made by April 8, 1952. None was made and forfeiture was declared.
May 2, 1952, appellants brought action for forfeiture of their contract against respondent and L. E. and Beth Spraker in the District Court of the Third Judicial District, State of Idaho. The court subsequently ruled that contract was unenforceable and that it could not be reformed. No appeal was taken from such ruling. Later, this action was commenced, appellants claiming they have no adequate remedy at law. In addition to the above allegations, they allege they were induced to part with their equipment and routes under the above mentioned contract and that respondent has been unjustly enriched, to their detriment.
They also allege that at the time respondent took possession of the equipment and milk routes in January 1951, they were of the reasonable value of $7,500 and that the use and rental of same have been at all times of the reasonable value of $200 per month; that the sum respondent has paid was not the reasonable value of the equipment and rights transferred to him and that he has failed and refused to pay anything more. Appellants ask for return of their equipment and the milk routes, together with compensation for their use since January 2, 1952, and interest. In case return of the property cannot be made, appellants ask for $7,500 and interest, less payments. They also pray for general relief.
Respondent filed a general and special demurrer, a motion to strike, a motion to elect and a motion to separately state, against the amended complaint. The court sustained the general and special demurrer and granted in part the motion to strike. Appellants refused to further plead. The action was dismissed and this appeal taken.
Appellants contend the trial court erred in entering its order of dismissal and order striking certain allegations from the amended complaint relative to custom, the value of the milk routes, rental value, unjust enrichment and the forfeiture action.
Stripped down to its fundamental legal proposition, appellants, in their amended complaint, invoke equity for restitution of property now in possession of respondent in order to prevent him from becoming unjustly enriched at appellants' expense.
Under Idaho law there is but one form of civil action and a complaint is not subject to general demurrer if it states any cause of action entitling plaintiffs to relief at law or in equity. Idaho Constitution, Article V, Section 1.
"Under our code, the technicalities of pleadings have been dispensed with and plaintiff need only state his cause of action in ordinary and concise language, without regard to the ancient forms of pleadings, and plaintiff can be sent out of court only when upon his facts he is entitled to no relief either at law or in equity. Stone v. Bradshaw, 64 Idaho 152, 158, 128 P.2d 844, and cases cited." Paulsen v. Krumsick, 68 Idaho 341, 346, 195 P.2d 363, 366.
"All intendments and inferences that may reasonably be drawn therefrom and the facts alleged will be construed in favor of the sufficiency of a pleading challenged by general demurrer. Paulsen v. Krumsick, 68 Idaho 341, 195 P.2d 363." Cooper v. Wesco Builders, Inc., 73 Idaho 383, at page 385, 253 P.2d 226, at page 227.
For the purpose of determining the effect of a pleading, its allegations must be *1045 liberally construed with a view to substantial justice between the parties. Paulsen v. Krumsick, supra.
"The essence of a quasi contractual obligation lies in the fact that the defendant has received a benefit which it would be inequitable for him to retain. This was clearly pointed out by Lord Mansfield in the first case recognizing the doctrine of quasi contracts. `If the defendant,' he said, `be under an obligation, from the ties of natural justice, to refund, the law implies a debt, and gives this action, founded in the equity of the plaintiff's case, as it were, upon a contract ("quasi ex contractu" as the Roman law expresses it). * * * This kind of equitable action to recover back money, which ought not in justice to be kept, is very beneficial and therefore much encouraged. * * *" McShane v. Quillin, 47 Idaho 542, at pages 547-548, 277 P. 554, at page 559.
"* * * It is not necessary in order to create an obligation to make restitution or to compensate, that the party unjustly enriched should have been guilty of any tortious or fraudulent act. The question is: Did he, to the detriment of someone else, obtain something of value to which he was not entitled? See 46 Am.Jur. 99, Restitution and Unjust Enrichment.
* * * * * *
"* * *, the terms `restitution' and `unjust enrichment' are the modern designation for the older doctrine of `quasi contracts.' See also, 66 C.J. 32, Unjust Enrichment. `Quasi contracts' are not true contracts but are obligations created by the law when money or property has been placed in one person's possession, under such circumstances that in equity and good conscience, he ought not to retain it. Royal Indemnity Co. v. Sol Lustbader [Inc.], City Ct., 26 N.Y.S.2d 328; see also, 35 Words and Phrases, Perm. Ed., page 621. Thus, the substance of an action for unjust enrichment lies in a promise, implied by law, that one will render to the person entitled thereto that which in equity and good conscience, belongs to the latter. * * *" Bill v. Gattavara, 34 Wash.2d 645, 209 P.2d 457, at pages 459-460.
"Going to the Restatement, Law of Restitution, we find general statements supporting the instant judgment. Sec. 1, `A person who has been unjustly enriched at the expense of another is required to make restitution to the other.' Comment c. under the above implies that where a person receives a benefit from another he is liable to pay therefor if the circumstances of its receipt or retention are such that as between the two it is unjust for him to retain it. * * *" Duffy v. Scott, 235 Wis. 142, 292 N.W. 273, at page 276, 129 A.L.R. 487.
See also, Lauffer v. Vial, 153 Pa.Super. 342, 33 A.2d 777, at page 779.
The facts alleged in appellants' amended complaint disclose that the benefits acquired by respondent were not gratuitously conferred.
Respondent contends this action is res judicata. An examination of the amended complaint fails to disclose upon its face that such is the case. All of the pleadings and facts in this and the other action are not before us, but we are satisfied that res judicata is not applicable at this time, if at all. Evans v. Davidson, 57 Idaho 548, 67 P.2d 83.
In our opinion the amended complaint states one, and only one, cause of action, i. e., an equitable action for restitution. Madison v. Buhl, 51 Idaho 564, 577, 8 P.2d 271. The simple, but comprehensive, question is whether the circumstances are such that equitably, respondent (defendant) should restore to appellants (plaintiffs) that which he has received. 77 C.J.S., Restitution, page 323. The general demurrer should have been overruled and the motions to elect and to separately state, which were not passed on by the trial court, should have been denied. In view of our holding the amended complaint states but one cause of action, Par. III(a) of the special demurrer, which reads:
"That said amended complaint is uncertain in this:

*1046 "(a) That is cannot be ascertained from said amended complaint whether said cause of action is based upon an oral or parole agreement, whether it is based upon quantum meruit or based upon the written contract attached to the amended complaint as Exhibit `A'."
should have been overruled.
We next consider whether or not the trial court's ruling sustaining other parts of the special demurrer was correct. By Par. II of the demurrer, respondent contends there was a nonjoinder and a misjoinder of parties defendant in that L. E. and Beth Spraker are not made parties, although they are shown to be purchasers in the written instrument for the sale of the milk routes and equipment. Plaintiffs (appellants in this case) have the right to choose the party or parties they wish to sue, as long as they include all necessary parties. If they choose only respondent Allphin, of course, they could not recover judgment against the Sprakers, who may be proper parties, but they are not necessary parties to this action, insofar as can be determined from the record at this time. Nonjoinder of a proper, as distinguished from a necessary, party is not ground for demurrer. Taylor v. Lytle, 26 Idaho 97, 141 P. 92.
Respondent's special demurrer, further provides:
"III.
"That said amended complaint is uncertain in this:
* * * * * *
"(b) That it cannot be ascertained from said amended complaint that the plaintiffs herein were the owners of the milk routes which they contracted to sell.
"(c) That it cannot be ascertained from said amended complaint what right, if any, exists in the plaintiffs to collect monthly rentals for the privilege of operating the milk routes.
"(d) That it cannot be ascertained from said amended complaint the value of the truck described in said amended complaint.
"(e) That it cannot be ascertained from said amended complaint the value of the milk route described in said amended complaint."
"IV.
"That for the reasons set out in Paragraph III hereof, said amended complaint is ambiguous."
"V.
"That for the reasons set out in Paragraph III hereof, said amended complaint is indefinite."
Relative to Par. III(b), the amended complaint alleges appellants purchased the milk routes and operated them until they were sold to respondent, which in our opinion is a sufficient allegation of ownership.
Likewise, the allegations of the amended complaint sufficiently allege appellants are entitled to collect monthly rental from respondent for the privilege of operating the milk routes, to meet the objections raised by Par. III(c).
While it cannot be ascertained from the pleadings the value of the truck alone, as pointed out in Par. III(d) in the special demurrer, or the value of the milk routes alone, as pointed out in Par. III(e), nevertheless, the combined value of all the property which appellants seek to have returned is sufficiently plead. It is not necessary to plead the value of each individual item. That is a matter of proof. The special demurrer, including Paragraphs IV and V, should have been overruled.
Respondent's motion to strike was sustained to various parts of the amended complaint which referred to or mentioned matters pertaining to custom relative to the sale and transfer of the milk routes and equipment, and also stricken were parts of the amended complaint pertaining to appellants bringing action May 2, 1952, for forfeiture of the contract against the Sprakers, which contract the court ruled was unenforceable and could not be reformed. The court also struck allegations pertaining to the reasonable value of the routes and equipment January 2, 1951, the date *1047 possession was delivered to respondent, and of the reasonable value of the use and rental of the right and privilege to operate said milk routes, and the allegations that respondent has been unjustly enriched by receipt of the routes and equipment and that appellants have no remedy at law. Also, those provisions of the prayer applicable to these allegations.
Respondent claims that permitting the allegations relative to the aforementioned custom to remain in the amended complaint was error. We think it was not, because appellants are not endeavoring to vary the terms of a written contract. This action is based upon equity and is for restitution for property alleged to be held by respondent to his unjust enrichment. The doctrine of unjust enrichment is not contractual, but is equitable in nature. State v. Martin, 59 Ariz. 438, 130 P.2d 48.
We are of the opinion the trial court erred in granting any part of the motion to strike. The custom relative to sale and use of the milk routes may be material in determining the amount to which appellants are entitled, if anything, in case they recover judgment for return of the property, but return cannot be made. Each of the other matters above mentioned, which respondent seeks to strike, is proper to be plead in action of this nature, as it goes to show the basis for the action. Where any matter is relevant on any theory, it cannot be stricken, even though such matter in and of itself falls short of stating a cause of action. Parks v. Mathews, 58 Idaho 8, 69 P.2d 781. The motion to strike should have been overruled.
In an action for restitution, the plaintiff is entitled either to the value of the goods, rights and benefits at the time of their transfer, plus interest on said sum during the time of its detention, or to restoration of the property and rights plus damages during the time of their detention, based upon compensation for their use or rental value. Restatement of Restitution, Perm. Vol. Sec. 157, pp. 621, 625, 627; Matarese v. Moore-McCormack Lines, 2 Cir., 158 F.2d 631, 170 A.L.R. 440.
The judgment of the trial court is reversed and the cause remanded for further proceedings in consonance herewith. Costs awarded to appellants.
TAYLOR, C. J., and KEETON, PORTER and SMITH, JJ., concur.
