This is a proceeding in the Circuit Court of the City of St. Louis for a writ of prohibition to prevent appellant, as referee, in the case of Charles C. Curry, plaintiff, v. B.G. Dahlberg, defendant, pending in the circuit court of said city, from enforcing an order made by him in that case.
From the record it appears that on November 20, 1923, the case of Curry v. Dahlberg was pending in the circuit court, and that on that date a second amended petition was filed. The character of the original petition is not shown. It was alleged in the second amended petition that in 1914 Dahlberg, a commerce expert, made an agreement with Curry providing that Curry was to assist him to secure contracts for the handling of claims for refunds of shippers of forest products over various railroads. The basis of these claims were freight-rate overcharges by railroads. Curry was acquainted with many such shippers. It was alleged that the agreement provided that on all contracts which Dahlberg secured subsequent to July 9, 1914, either with or without the assistance of Curry, except contracts secured through certain specified sources, Dahlberg was to pay Curry twenty per cent of the gross compensation received by him from the claimants, except that, on claims which were not settled until after court trial. Curry was to receive only fifteen per cent, and on claims which went to trial in the United States Supreme Court he was to receive only ten per cent.
Curry in his petition alleged that he did actively engage in soliciting contracts and fully performed the agreement upon his part. He further alleged that under the agreement a very large number of contracts were secured from shippers: that a large number of the claims have been recovered by the claimants and the compensation received by Dahlberg: and that Curry's twenty per cent of this compensation became due. The petition then alleged that the claims on *Page 218 which recovery had been made and which form the basis of this action were against the St. Louis San Francisco Railway Company. These claims were alleged to have been settled on the 26th day of June, 1917, by an agreement, marked "A," which was attached to and made a part of the petition by reference. It was stated that under this settlement compensation was paid to Dahlberg on October 5, 1917, aggregating $217,648.84, which was received partly in cash, partly in bonds, and partly in preferred and common stocks of the Railway Company. This settlement was without trial in court. Curry alleged that his twenty per cent of the compensation was $43,529.77 in cash and securities. An exhibit, containing a list of the shippers' claims settled under this agreement, was attached, marked "B," and made a part of the petition, showing the claims secured subsequent to July 9, 1914, in which Curry claimed to have an interest, which totaled $451,498.04, and also the claims collected by Dahlberg in which Curry had no interest. It also set out that $217,648.84 was the total of the compensation Dahlberg received and that the amount Curry claimed was $43,529.77. Demand for an accounting of the gross compensation received by Dahlberg and refusal to either render an account or pay were also alleged.
The prayer of the petition was for judgment for twenty per cent of the cash and securities received by Dahlberg which, taken at par, aggregate $43,529.77, with interest on Curry's proportion of the cash from October 5, 1927, and the dividends paid on the securities since that date, and that Dahlberg be required to account for and pay to plaintiff a sum represented by the difference between the market value of the securities at the date of judgment and the highest value of the same since October 5, 1917. The prayer further asked the court to rule Dahlberg to make a full and complete statement of all compensation which he received under the terms of the agreement, together with a full statement of all contracts covered by the agreement in process of liquidation and the gross amount of compensation which he is to receive therefrom if they are paid, and further asked for judgment for all sums rightfully due Curry, and asked the court to retain jurisdiction of the suit for the purpose of compelling Dahlberg to account to him for his rightful share of all compensation recovered by him when the same is paid to him.
Curry's first amended petition was the same as the second amended petition except that there was no allegation in it that an accounting had been demanded, and there was no prayer for an accounting or for any relief with reference to contracts in the process of liquidation and not yet collected. Dahlberg filed two demurrers upon the ground that the facts stated were not sufficient to constitute a cause of action. Both were overruled, and he filed an *Page 219 answer containing a general denial; alleging that Curry now had no interest in the claims, because of assignment thereof and adjudication in bankruptcy; and asking by way of equitable counterclaim that the agreement be reformed if it should be construed to cover claims which were obtained by him without Curry's assistance, or to entitle Curry to the proportion of the compensation claimed by him, alleging that it was so written through mistake.
The appellant here was appointed referce by the Circuit Court of the City of St. Louis, to take the place of a former referee who had resigned, and was authorized to try all issues and report his findings. After appellant, as referee, had heard evidence, he made an order on November 8, 1926, in which, as later modified, he found that Curry was entitled to an accounting from Dahlberg on all contracts subsequent to July 13, 1914, whether obtained by plaintiff's assistance or not, except those exempt under the agreement. He found that on all such contracts Curry was entitled to receive twenty per cent where it was not necessary to go to trial, fifteen per cent in case claims were settled after trial, and ten per cent in case claims went to trial in the Supreme Court of the United States. The order required Dahlberg to file before appellant, on or before May 27, 1927, a statement of account identifying same, as to adjusted contracts, with name of claimant and railroad, gross compensation received, and compensation due Curry thereon and as to unadjusted contracts with the name of claimant and railroad. Dahlberg applied to this court for a writ of prohibition, but this court, without opinion, refused to issue a preliminary writ. He then filed a motion to strike out the part of the order requiring him to file the statement. This motion was overruled by the referee.
Thereupon, Dahlberg, as plaintiff, commenced this proceeding for a writ of prohibition to prohibit appellant, as referee, from enforcing this order. This petition alleged the record facts above set out and stated that Curry, by filing his petition upon an open account, had elected the remedy of an action on an open account and thereby abandoned his right to a suit for an accounting; that Curry's petition did not state a cause of action for accounting, and that the petition and the evidence before the referee showed that there was no necessity for an accounting; that the referee was appointed under the first subdivision of Section 1426. Revised Statutes 1919, to try the long account of some 200 items; that the order of the referee compels a discovery of evidence and compels Dahlberg to prepare an exhibit to be used by Curry to prove the items of his account, contrary to the statutes of Missouri providing for depositions and for production of books and papers to prove same; that the order compels discovery of compensation which had not accrued *Page 220 at the the institution of the suit and on contracts not adjusted; that the order is not responsive to the petition, and enforces recovery upon a different cause of action inconsistent with the one stated; that said order is one which the referee has no legal power to make and will cause Dahlberg irreparable damage; and that prohibition to prevent the referee from enforcing it is his only adequate remedy.
A preliminary writ was issued, and appellant made return and answer thereto in which he admitted the record facts; denied that the petition was upon an open account and that the referee was appointed to try such an account, denied other matters generally; alleged that he had jurisdiction over the parties and subject-matter in the case of Curry v. Dahlberg; stated that the order made by him was upon a consideration of the evidence and pleadings; that his rulings and orders have been excepted to by Dahlberg and may be reviewed in due course; that prior to the submission of the case to him, the circuit court had overruled demurrers to Curry's petition upon the grounds urged in this proceeding; that a review of his ruling before the filing of his report and before the completion of his duties under the order of reference to him would be premature and untimely; that Dahlberg was estopped by the motion he had filed and the stipulations he had entered into from claiming that his action was an action of law: that the Supreme Court of Missouri had denied an application for writ of prohibition upon the same ground as now urged, and that the matter was res adjudicata.
Respondent, in his reply, alleged that the order of the referee was in excess of his jurisdiction, denied his estoppel, and alleged that the denial of the writ by this court was not a conclusive adjudication.
Upon a trial of the cause, judgment was entered making the preliminary writ of prohibition absolute. This appeal is from that judgment. The appellant contends that the suit brought by Curry against Dahlberg was an action in equity for an accounting and that his order requiring Dahlberg to file a statement of account was therefore proper. Respondent, on the other hand, says that the action was an action at law upon an account. We must therefore first determine what kind of an action is stated in the petition.
There are three kinds of actions which are recognized under proper circumstances as remedies for determination of accounts between parties:
First: Action of account. This is a common law action by means of which persons who were under a legal duty toAction of account for property or money of another wereAccount. compelled to render such account. [1 C.J. 602, sec. 11.] The petition in *Page 221 an action of account is required to set out a relationship of the parties and a state of facts that would entitle the claimant to an accounting; allege that no accounting had been made; and pray for a money judgment, but need not ask that an account be taken. The judgments which are incident to such an action are two; judgment that defendant do account, and judgment after the account for the balance found due. [Hughes v. Woosley,15 Mo. 492; Sandwich Mfg. Co. v. Bogie, 317 Mo. 972, 298 S.W. 56.]
Second: Action for an accounting. This is an action in equity. The best considered authorities put equitable jurisdiction for an accounting upon three grounds, to-wit: The need of aAction for discovery, the complicated character of the accountsAccounting. and the existence of a fiduciary or trust relation. The relief which is given in this action is an accounting and a judgment for the balance found due on taking the account. [1 C.J. 613, sec. 56.] The basis of equity jurisdiction in accounting is the inadequacy of a legal remedy. [1 C.J. 615, sec. 58; Johnson v. Star Bucket Pump Co., 274 Mo. 414, 202 S.W. 1143; Ray v. Bayer Steam Soot Blower Co. (Mo. App.), 282 S.W. 176; Palmer v. Marshall (Mo. App.), 24 S.W.2d 229.] It is a remedy particularly applicable to mutual and complicated accounts. [1 C.J. 618, sec. 63.] And cases where a confidential or fiduciary relationship exists. [1 C.J. 621, sec. 68.]
Third: Action on account. This is an action of assumpsit or debt which is for recovery of money only for services performed, property sold and delivered, money loaned or damages for the non-performance of simple contracts, express orAction on implied, when the rights of the parties will beAccount. adequately conserved by the payment and receipt of money. [1 C.J. 648, secs. 142 to 146; 5 C.J. 1381, sec. 6.] Our statutes. Section 769 and Section 802. Revised Statutes 1929, change the common law requirements of pleadings in this action. Such actions are "on the law side of our courts, there to be tried; (1) By the court without a jury under named circumstances, (2) to be tried by a jury, (3) to be tried by a referee." Sandwich Mfg. Co. v. Bogie, 298 S.W. l.c. 61, and cases cited.]
Considering the second amended petition in the case of Curry v. Dahlberg in view of the above remedies, it seems to us that it does not state either a common law action of account or an action in equity for an accounting. It sets forth no relationship of the parties and no state of facts which would require a judgment that defendant account. Neither does it allege any of the grounds requisite to an accounting in equity, but on the contrary, it shows that the legal remedy is adequate. It is definitely stated in the petition *Page 222 "that the claims on which recovery has been made and which form the basis of this complaint were against the St. Louis and San Francisco Railway Company." It is definitely stated that the "settlement of said claims was made on the 26th day of June, 1917." It is definitely set forth in Exhibit A, attached and made a part of the petition by reference, exactly what the claimants received from the Railway Company in settlement of their claims. It is definitely stated in the petition that the compensation received by Dahlberg for making the settlement was $217,648.84. It is also stated what part of this Dahlberg received in cash, what part in bonds, and what part in stocks. It is definitely stated that Curry claims he is entitled to twenty per cent of this, or $43,529.77, and he prays judgment for this amount. It is true that he states "his proportion of said compensation is twenty per cent, or $43,529.77, in cash and securities of the compensation paid to defendant." It is also true that he prays judgment "for twenty per cent of the cash and securities received by defendant on October 5, 1917, and by him since retained which said twenty per cent in cash and securities taken at par aggregate $43,529.77, with interest on plaintiff's proportion of the cash from October 5, 1917, together with dividends paid on said securities since that date." However, it seems clear that this is a suit for $43,529.77, and that the allegations of the amount due and the prayer therefor, taking the securities at par, mean that Curry is claiming to be entitled to compensation for his services, under the contract, on the basis of considering the securities as having been received at par by Dahlberg, or having been received as $217,648.84. This view of the petition is further confirmed by Exhibit B, attached to and made a part of the petition, which conforms to the requirements of Section 802. Revised Statutes 1929. This exhibit contains a list of the claims settled for which Curry claimed to be entitled to twenty per cent of the compensation received by Dahlberg. It shows the total amount of these claims and the total amount paid to Dahlberg by the shippers as his compensation, to-wit, $217,648.84, and sets out that Curry's proportion is twenty per cent, or $43,529.77, the amount for which he prays judgment in the suit.
We see, therefore, that Curry sued Dahlberg for a definite amount of money; knew the claims settled upon which he bases that amount; stated them in an exhibit attached to his petition; stated the aggregate amount of the compensation received by Dahlberg for settling them; stated that this wasCompensation partly in cash and partly in securities, butfor Labor. claimed he was entitled to twenty per cent on the aggregate amount of claims settled as though the securities were accepted for the amount which he says *Page 223 Dahlberg received. If the securities were worth less than this amount and Curry was entitled to his proportion only of their actual value, that was a matter of defense to be set up by Dahlberg. Curry would not be prejudiced if he did not make this defense. Where a contract for a share in profits of a transaction is only a mode of determining compensation for labor, and no money is invested in such transaction, the remedy is by an action in assumpsit. [1 C.J. 604, sec. 12.] That is the situation set out here. It is clearly not an action for partition of the securities in kind. Nor are the securities alleged to have any special or peculiar value which cannot be compensated for in money. The action certainly is one where the rights of the parties will be adequately conserved by the payment and receipt of money. We therefore hold that this is an action on an account.
It may be that since this suit was commenced, Dahlberg has settled other claims with other railroads. It may beAccounting that Curry does not know and cannot find out whatin Action they are. It may be that he has a right of action inon Account. equity for an accounting for compensation for these claims. If so, he can commence it, but that is not the action he did commence.
Under this view of the action, the order of the referee was clearly in excess of his jurisdiction.
Appellant, however, contends that, even so, Dahlberg had an adequate remedy by appeal and that prohibition is therefore not proper in this case. According to High's Extraordinary Remedies (3 Ed.) section 764a: "Three conditions areProhibition. necessary to warrant the granting of the relief: First, that the court, officer or person, against whom it is sought, is about to exercise judicial or quasi-judicial power; second, that the exercise of such power is unauthorized by law; third, that it will result in injury for which no other adequate remedy exists." The writ reaches acting in excess of jurisdiction, as well as acting where there is no jurisdiction. [State ex rel. Warde v. McQuillin, 262 Mo. 256, 171 S.W. 72; State ex rel. Bernero v. McQuillin, 246 Mo. 517, 152 S.W. 347; State ex rel. McManus v. Muench, 217 Mo. 124, 117 S.W. 25; State ex rel. Terminal Ry. Co. v. Tracy, 237 Mo. 109, 140 S.W. 888; State ex rel. Minnesota Insurance Co. v. Denton,229 Mo. 187, 129 S.W. 709.] In the latter case an order of a circuit court in an equity case upon a foreign corporation for an accounting was of a character which the court had no power to make, and therefore in excess of its jurisdiction. Prohibition was held to be the proper remedy to prevent its enforcement. The writ also has issued to prevent a court from issuing an injunction where it is evident from *Page 224 the petition that no cause of action therefor is or can be stated. [Thomas v. Mead, 36 Mo. 232; Vitt v. Owens, 42 Mo. 512.]
In this case the appellant referee was an officer exercising judicial power. He was only authorized to try the issues made by the pleadings and it was beyond his power, on an action at law, to conduct a trial in equity for an accounting. No amendment of the petition, which did not state an entirely new and different cause of action, could give the court in which it was filed such power. This is particularly obvious as to the part of the order requiring an accounting on unsettled contracts upon which no cause of action for compensation had yet accrued and might never accrue. While Dahlberg would have the right of appeal at the conclusion of the trial, yet appeal would not prevent the expense, vexation and annoyance of making the statement and going through a trial before the referee of an action which is not alleged against him. An appeal would not, therefore, be an adequate remedy. A similar situation arose in the case of People ex rel. Pierce v. Carrington, 5 Utah, 531. In that case a writ of prohibition issued from the Supreme Court of Utah Territory to a commissioner of that court to prevent him from proceeding to punish a newspaper editor for contempt for an article published in his paper. It was contended there by the defendant, that even though the commissioner did not have such power, relator had an adequate remedy by appeal. The court, however, held that an appeal would not prevent the expense, vexation and annoyance of the trial; that the question on appeal would be merely whether or not the commissioner was acting without authority; and that that would not be an adequate remedy for going through such a trial. We held here that prohibition was a proper remedy, and that the Circuit Court of the City of St. Louis was right in preventing the referee appointed by it from enforcing his order.
Appellant further contends that the matter was res adjudicata because a writ of prohibition to prevent enforcement of the order, before it was modified, was denied by thisRes Judicata. court. In view of Rule 32 of this court, the mere refusal of this court to issue a preliminary writ was not a decision on the merits of the case. To constitute a former judgment a bar it must have been on the merits. [Wilson Co. v. Hartford Fire Ins. Co., 300 Mo. 1, 254 S.W. 266; Johnson v. United Rys. Co., 243 Mo. 278, 147 S.W. 1077; Couch v. Harp,201 Mo. 457, 100 S.W. 9; Baldwin v. Davidson, 139 Mo. 118, 40 S.W. 765; Wells v. Moore, 49 Mo. 229.]
Neither do we see any merit in the contention that the circuit court, prior to the reference, by overruling general demurrers to Curry's petition, held that it stated a cause of action in equity *Page 225 for an accounting. The demurrers were on the ground that there were not sufficient facts stated in the petition to constitute a cause of action. The court could just as properlyOverruling overrule the demurrers upon the ground that theDemurrers petition stated a cause of action of assumpsit.to Petition: Overruling general demurrers without any statementDetermination of grounds can certainly not be construed to be aof Kind of determination of the kind of action stated in theAction. petition.
Appellant's final contention is that Dahlberg is estopped from contending that Curry's action was not one in equity, because he entered into a stipulation that this case, being inEquitable equity, may be assigned to one of the equity divisionsDefense. of the Circuit Court of the City of St. Louis, and made certain admissions claimed to show that the case was treated by him as an equity case. These admissions do not seem material, and respondent intimates that such a stipulation would be understood in St. Louis to mean only that the case was a non-jury case. However, by his answer to Curry's second amended petition. Dahlberg set up an equitable defense and asked for affirmative equitable relief, namely, reformation of the contract. The orderly way then to try the cause was to first dispose of the issues raised by this equitable counterclaim and then try the legal action stated in the petition. [Martin v. Turnbaugh, 153 Mo. 172, 54 S.W. 515; Keltner v. Threlkel,316 Mo. 609, 291 S.W. 462.] This would be a proper reason for the stipulation to transfer the case to an equity division. Evidently, on this counterclaim, Curry prevailed, for the referee's order contains a finding of facts construing the contract against Dahlberg's contention. However, it could not, under any view, transform an action on an account into an action for an accounting and could not confer on the referee power to try a cause of action which was not before him. Courts only have power to decide such questions as are presented by the parties in their pleadings and mere consent of counsel would not confer other jurisdiction. [State ex rel. McManus v. Muench, 217 Mo. l.c. 141.] In Kessner v. Phillips, cited by appellant, the court said that it was immaterial whether that case be treated as one in equity or one at law, for in either event, the result would have been the same. From what we have said, it is evident that that would not be true here.
The judgment of the circuit court is affirmed. Ferguson andSturgis, CC., concur.