The opinion of the court was delivered by
Allen, J.:This is an original proceeding in mandamus to require the defendant, as judge of the district court of Sedgwick county, to decide plaintiff’s motion for the appointment of a referee, in an action pending in his court, upon its merits and in the exercise of judicial discretion.
The action in which the motion for a reference was filed was brought by Hasty to recover an attorney fee from three named defendants for professional services alleged to have been rendered under agreement with the defendants. One of the defendants demurred to the amended petition, the demurrer was overruled, and upon appeal from that order the sufficiency of the petition was before this court in Hasty v. Bays, 145 Kan. 463, 66 P. 2d 265. In that case it was said:
“The theory of the appellant is and has been that the suit at bar is on an account, and that under G. S. 1935, 60-739, each item thereof must be set out separately in the petition or attached thereto as an exhibit. The allegation in the petition that the employment of the plaintiff was for one purpose only *518and engaged the entire time of the plaintiff compels a different conclusion as to the amended petition. It is not for the recovery on separate and distinct items of service, but for the entire service rendered defendants on the alleged joint adventure upon the employment contract, and as no amount was named in the contract it is upon a quantum meruit basis.
“We think the amended petition states facts sufficient to constitute a cause of action for the professional services rendered by the plaintiff during the period of more than five months on the one major or general purpose of the enterprise.” (p. 466.)
In due course the defendants filed separate answers in which the employment of plaintiff, as alleged in the petition, was denied. The answers also denied that the defendants had entered into a partnership or joint adventure as set forth in plaintiff’s petition, and further denied that defendants are indebted to plaintiff in any amount.
In this state of the pleadings the plaintiff filed a written motion requesting the appointment of a referee. The defendants objected and demanded a jury trial. The court took the matter under advisement, and upon May 24, 1937, wrote counsel for the respective parties as follows:
“Upon the application to refer the above-entitled case I have carefully examined the statute and the decisions of the supreme court on this particular case and other cases, notably the 126 Kan. 385, and I am of the opinion that it is a case in which the defendants are entitled to a trial by jury. Of course, I should' be very glad to refer this case on agreement of counsel to any one whom you can agree upon as referee, or in case of nonagreement, to appoint someone myself, but where objection is made and jury demanded I am of the opinion that a jury will have to be called to try the case.”
Plaintiff contends that “on authority of Lapham v. Oil and Gas Co., 87 Kan. 65, 123 Pac. 863; Kagey v. Fox West Coast Theatres, 139 Kan. 301, 31 P. 2d 67, and other authorities, this action involves a long account on one side only and falls squarely under the provisions of our statutes providing for a reference.”
In Estey v. Holdren, 126 Kan. 385, 267 Pac. 1098, this court said:
“What sort of an action did plaintiff state? Surely it was one justiciable at common law. Common counts were stated therein. It was not essentially an action for an accounting, although defendants chose to ascribe that character to it in their motion for a reference. The substance of the pleadings, not the label designated by the' pleader, determines the character of an action. (Lapham v. Oil and Gas Co., 87 Kan. 65, 123 Pac. 863; Boam v. Cohen, 94 Kan. 42, 145 Pac. 559.) When a cause is properly justiciable before a jury such a trial may not be denied without the assent of parties. (Kansas Bill of Rights, §§ 5, 18; Kimball and Others v. Connor, Starks and Others, 3 Kan. 414; Atchison Street Rly. Co. v. Mo. Pac. Rly. Co., 31 Kan. 660, syl. ¶ 1, 3 Pac. 284 ; 34 Cyc. *519778, 779; 23 R. C. L. 288.) So far as the code of civil procedure attempts to govern this subject, its provisions (R. S. 60-2903, 60-2923) must be read and construed in the light of our constitutional guaranty of jury trial where' such trial is demandable as a matter of right; and a compulsory reference in derogation of such right can receive no countenance by this court, charged as it is with the solemn and responsible duty of supervising the administration of justice in all the courts of this state.
“It is not enough to justify a compulsory reference that a jury trial would be protracted and tedious, or that a mass of technical or complicated facts constitute the evidence. While these conditions might make a reference desirable (23 R. C. L. 284), it could only be had by assent of parties.” (p. 387.)
The nature of the action is determined by the pleadings. The pleadings show the action is one for the recovery of money alleged to be due the plaintiff for professional services rendered. It is not a suit in equity for an accounting formerly cognizable in a court of equity, but an action at law to recover money alleged to be due.
The fundamental reform of code pleading was the substitution of one form of action — a civil action — for the various forms of action at law, and for the suit in equity. For the separate courts of law and equity, the code substituted a single court with a blended system of law and equity.
From the beginning .there has been a question whether the reform could be attained because of the right of trial by jury in common-law actions preserved by the constitution in all code states, and because of the belief that there is an inherent distinction between law and equity. Thus, in Clark on Code Pleading, it is stated:
“The full effect of this reform has not always been attained, due to the belief of many courts that the' ancient forms rested on distinctions inherent in the law, and were essential because of the existence of rights, such as the constitutional right of trial by jury. (p. 44.) The constitutional right of trial by jury does not make necessary a separate system of law and equity. It applies no further than to give the right of such trial upon issues of fact so tried at common law and does not affect the pleading stage of the case, in advance of the actual trial, where the issues are being developed. Statutes in code state's provide when trial by jury may be had. The clearer form of statute is simply declaratory of the constitutional provisions, giving the option to claim such right in all cases so triable under the former practice.” (p. 52.)
In Keigwin, Cases in Code Pleading, 43, 44, a different view is expressed:
“This provision of the Code, as must be attentively observed, does not abolish the distinction between law and equity, but only the distinction between actions at law and suits in equity. The enactment does not affect any alteration in the substantive law; it is merely a new mode of procedure that *520is ordained. No rights, legal or equitable, are created or taken awa-y, nor are any preexisting principles, whether of the common law or of equity jurisprudence, in any degree modified. The inherent diversity between these two bodies of doctrines is not abrogated — as indeed it could not be; and legal doctrines and equitable doctrines, with their distinctive differences, remain quite as they were before . . . The distinction abolished is in the manner of asserting the different kinds of rights — between the declaration at law and the bill in equity; the rights themselves remain as distinct as ever in all their essentials, such as origin, extent, constituent elements, requisite proof, and character of remedy.
“That the substantial difference between law and equity is necessarily permanent results from (at least) two considerations:
“1. The right of trial by jury in actions at la-w is secured by the constitutions of all the states, while controversies of equitable nature are left subject to adjudication, in matters of fact as well as of law, by the court. The codes, therefore, in reducing both classes of suits to a single jurisdiction and a common form of pleading, are obliged to preserve the distinction, so far as to differentiate the mode of trial.
“2. There is an inherent difference between causes at law and causes in equity which, as it exists in the nature of things, ca-nnot be obliterated even in the theory and cannot be ignored in practice.”
The spirit of the code has been enforced in this state. It is no departure to say that what was an action at law before the code is still an action founded'on legal principles; and what was a bill in equity before the code is still a civil action founded on principles of equity. “This whole body of principles, whether of law or of equity, . . . becomes the reservoir to be drawn upon by the court in enlightening its judgment.’' (Susquehanna S. S. Co. v. Andersen & Co., 239 N. Y. 285, 294, 146 N. E. 381.) Our bill of rights, which guarantees the right of trial by jury, compels us to preserve the distinction between law and equity so far as to differentiate the mode of trial.
If, then, the action in the case at bar was an action founded on legal principles, and by the practice of the common law prior to the constitution was triable by a jury, then the defendant under the constitution was entitled to a trial by jury as of right. The constitutional provision is not directed at trial efficiency, but to protect the individual from oppression. As .stated by Mr. Justice Brewer in Walker v. Southern Pacific Railroad, 165 U. S. 593, 596, 17 S. Ct. 421, 41 L. Ed. 837, 841:
“Its aim is not to preserve mere matters of form and procedure, but substance of right. This requires that questions of fact in common-law actions *521shall be settled by a jury, and that the court shall not assume, directly or indirectly, to take from the jury or to itself such prerogative.....”
In Parsons v. Bedford, 3 Pet. 433, 7 L. Ed. 732, it was said by Mr. Justice Story:
“The trial by jury is justly dear to the American people. It has always been an object of deep interest and solicitude, and every encroachment upon it has been watched with great jealousy. . . . One of the strongest, objections originally taken against the constitution of the United States was the want of an express provision securing the right of trial by jury in civil cases. As soon as the constitution was adopted this right was secured by the seventh amendment of the constitution proposed by congress; and which received an assent of the people so general as to establish its importance as a fundamental guaranty of the rights and liberties of the people.” (p. 446.)
In the case pending in the district court the pleadings raise issues of fact. Under the practice of the common law such issues would be submitted to a jury. If an account is to be examined, it is incidental and collateral to the action on the contract. The defendant was entitled to a jury trial as of right.
In Lapham v. Oil & Gas Co., supra, it was agreed by the parties that the cause should be tried by the court, thereby waiving the right to a jury trial. The constitutional question was not raised in either the Lapham case or the Kagey case.
As we see no reason to depart from our ruling in Estey v. Holdren, the writ must be denied. It is so ordered.