By statute, every action must now be prosecuted in the name of the real party in interest, except in the few cases of trust and representation excepted by law. (Code, § 111.) The object of this provision was to abolish the distinction between the former practice of courts of common law and chancery, and give full effect at law as well as in equity to assignments of rights in action by permitting and requiring the assignee to sue in his own name. If, as between the assignor and assignee, the transfer is complete, so that the former is divested of all control and right to the cause of action, and the latter is entitled to • control it and receive its fruits, the assignee is the real party in interest, whether the assignment was with or without consideration, and notwithstanding the assignee may have taken it subject to all equities between the assignor- and third persons. The consideration and circumstances of the transfer may be important with a view to settle the equities and establish the rights of others; but if it is absolute as between the immediate parties to it, the assignor not only may, but tnust, bring the action in his own name. The consideration was ample, and it does not affect the transaction that it was not to be paid until the notes should be collected, and it may be its payment was conditional, depending upon that contingency. But the notes became the property of the plaintiff, although his liability to pay for them was contingent. Heither Prime nor the payee could have revoked the contract and reclaimed the notes; and upon the recovery and collection of the judgment, or the payment of the notes-without suit, the recovery belongs to the plaintiff, and all that Prime or Sargeant can claim is the Evergreen stock. The plaintiff may, without let or hindrance from the former holder of the notes, receive and appropriate the money that may be collected on them to his own use. This gives him the legal title and makes him the proper party plaintiff. (Selden v. Pugh, 17 Barb., 468; *628Hastings v. McMurdy 1 E. D. Smith, 273; James v. Chalmers, 2 Seld., 209 ; Ross v. Bedell, 5 Denio, 467.)
The notes, however, having been transferred by the payee long after due, were subject to, any defence, legal or equitable, which could have been made to them if no transfer had been made. If, at the time of the indorsement and delivery of the notes to Prime, Sargeant, the payee, could not have maintained an action upon them, the same infirmity attaches to them in the hands of the present plaintiff; and the question is whether the matters relied upon, and proof of which was rejected by the referee, would have constituted a legal or equitable bar to an action at the suit of Sargeant. We may lay out of view the alleged insolvency of Sargeant for the reasons, 1st, it is not averred in the answer; and, 2d, it was alleged to exist only-at the time of the suit, and it was not claimed to have existed when Sargeant parted with his interest in the notes, nor even at the commencement of the action. There is now no exclusion of defences merely equitable in actions strictly legal in their character. The Code (§ 150) secures to a defendant the right to interpose as many defences as he may have, whether legal or equitable, or both ; and this provision has been administered by the courts in its spirit and with just liberality. (Gage v. Angell, 8 How., 335 ; Dobson v. Pearce, 2 Kern., 156; Blair v. Claxton, 18 N. Y., 529; Bank of Toronto v. Hunter, 20 How., 292; Phillips v. Gorham, 17 N. Y., 270.)
The claim of the defendant grows out of partnership dealings between himself, the payee of the notes, and a third person, which have not been settled or adjusted in any way, and in respect of which no account has been, stated between the partners, and the claim itself is unliquidated. This does not constitute a counter-claim under the statute; for, by the terms of the act, that can only arise or exist between the parties to the action, and the plaintiff has had no dealings with the defendant, and the contract dealings, which are the foundation of the claim, were with a third person. (Code, § 150; Vassar v. Livingston, 3 Kern., 248; Gleason v. Moer, 2 Denio, 639; Spencer v. Babcock, 22 Barb., 326; Ives v. Miller, 19 id., 197.) *629The transactions sought to be introduced and investigated were distinct and independent transactions, having no connection with the notes or their origin or consideration, so that there is nothing in the identity of the plaintiff’s cause of action and the defence insisted upon, to entitle the defendant to claim that both should be tried at the same time, and the rights of the parties in respect to each be adjusted in one action. It is simply a money claim against a former bolder and owner of the notes that is alleged as a set-off in this action. One difficulty is met at the outset in the examination of this claim. To ascertain whether any and what amount may be due from either partner to the other, the partnership dealings must be settled and an account stated between the partners. It is only for the balance that may be ascertained to be due upon such an accounting, that one partner can be said to be indebted to another.- It is only for a balance thus ascertained and acknowledged, that an action will lie by one partner against hia co-partner. (Murray v. Bogart, 14 Johns., 318; Cary v. Burch, 2 Caines, 293; Westerlo v. Evertson, 1 Wend., 532 ; Patterson v. Blanchard, 6 Barb., 537.) One partner may have an action of account at law against his copartner, but the more usual remedy is by bill in chancery, or under our present system by action in the nature of a suit in equity, for an account in which the partnership dealings may be adjusted, the account stated, and a balance struck and judgment given for any balance that may be found due from one to the other. These are the only remedies that are available for the recovery of a balance that may be due from one partner to his co-partners, when the balance has not been struck by the partners themselves. (Saddler v. Nixon, 5 B. & Ad., 936.) As a general rule, no account between partners, either general partners or partners in a particular transaction, can be taken at law, except in the obsolete action of account, nor can a partner sue another at law unless the cause of action is so distinct from the partnership accounts as not to involve their consideration, and unless the plaintiff, if he recovers, may keep the money without having to account to his copartners; nor can he sue at law upon any demand, if *630the question upon the right to recover turns upon the state of the partnership accounts. (Burill v. Hammond, 6 B. & C., 151; Millner v. Codd, 7 id., 421; Caldcutt v. Griffiths, 8 Exch., 898; Hobson v. Curtis, 1 Stark., 78.) By abolishing the distinction between actions and proceedings at law and in equity, and permitting the joinder of different causes of action, and authorising equitable1 as well as legal defences to be made to legal claims and demands, some of the difficulties which, before the Code, would have absolutely precluded a defendant, sued by his partner at law after the termination of the partnership upon a contract or for a money claim entirely disconnected with the partnership dealings, from claiming as a set-off or counter-claim a balance due upon the partnership accounts, and asking that the same be adjusted and the balance applied to the extinguishment of the plaintiff’s demand to be proven upon the trial, have been removed. Legal and equitable causes of action may be united in the same complaint, provided they both arise out of the contract, express or implied, or out of the same transaction (Code, § 167; Capron v. The Bank of Utica, 3 Seld., 486); and I see no objection to the setting off a claim arising.upon contract, express or implied, equitable in its character, and which can only be ascertained and liquidated in equity, against a legal demand also arising upon contract. (Gage v. Angell, supra.) But in order to such a set-off, as in an action to establish and enforce the same claim, the proper parties must be before the court. If the action would, as a suit for the recovery of the same demand, be defective for want of parties, the set-off cannot be admitted. Neither the law which gave the right of set-off, nor that which secures to a defendant defences legal and equitable, as well those which are personal to the party to the record as those which exist against the demand in the. hands of the plaintiff as an assignee or otherwise, makes any change in the law relating to the necessary parties to an action. The court cannot, either at the instance of the plaintiff or defendant, entertain j urisdiction of any subject in the absence of, or without having acquired jurisdiction over, all parties interested in the matters to be acted upon.
*631This principle is elementary, and is confirmed by the Code of Procedure. (Code, §§ 1.17, 118, 119, 122.) In partnership matters no account will be decreed unless all persons interested in taking the account are, either by themselves or their trustees, parties to the action in which the account is sought. In Hill v. Nash (1 Phi., 594), a bill was filed by one partner against the executors of a deceased partner to obtain the portion of a loss due from the estate of the deceased, the whole of the loss having been paid by the plaintiff, and all the other partners having settled with him. It was objected, and held, that the other partners ought, nevertheless, to have been parties to the suit, for no settlement had been come to which was binding as between them and the defendant. Ho decree in the suit, as framed, would be binding on the absent partners, and they, notwithstanding the decree and their settlement with the plaintiff, would have the right to institute another suit against the defendants to settle the proportion of their respective contributions. In a suit for the dissolution and winding up of an ordinary partnership, all the partners must be parties. (Evans v. Stokes, 1 Keen Chan. R., 26; Richardson v. Hastings, 7 Beav., 301; Calvert on Parties, 118; Story Eq. Pl., §§ 166, 218, et seq.) It follows, that, in every proceeding, whether at law or in equity, in which the adjustment and settlement of partnership accounts and dealings becomes necessary, whether to establish a claim for the prosecution or defence, or for any other purpose, all persons interested in the accounting must be parties, so as to be bound by the judgment, and that no accounting can be had in the absence of any such persons.
What would have been the right of the defendant, had he brought a cross action, bringing in Sargeant or his representative, and the other partner, Allen, setting up this defence with proper allegations of the insolvency of Sargeant and his estate, with other circumstances upon which an equitable defence might be based, it is not necessary to consider: It is sufficient here to say that neither Sargeant, nor his representatives, nor Allen, were parties to the action, and that no accounting could have been had for any. purpose by reason of such defect. The *632accounting, which was indispensable to determine whether anything and how much was due the defendant, and an equitable set-off against the sum due upon the notes, would have bound no one, not even the defendant, in any action between the proper parties for an accounting; as estoppels, in order to be binding, must be mutual. The referee, therefore, properly excluded the evidence offered, and the judgment must be affirmed.
Weight, J.There is no force in the objection that the action was not prosecuted in the name of the real party in interest, within the meaning-of section 111 of the Code. Sargeant, the payee of the notes, indorsed and transferred them absolutely to Prime, in September, 1855, upon a good consideration ; and a few days afterwards, Prime, for a valuable consideration, indorsed and transferred them to the plaintiff. The referee found that the transfer to Prime was not made under any collusion- with Sargeant, or with any purpose or intent to assist him in avoiding the payment of any indebtedness to, or any offset which, the defendant had as against the notes in the hands of Sargeant. The transfer from Prime .to the plaintiff vested in the latter an absolute title to the notes and their proceeds. Having the actual possession of, and legal title to, the notes, an absolute right to the money due on them, and to recover and appropriate it when received to his own use, he is the real party in interest. There is no doubt whatever that a judgment in the plaintiff’s favor would, exonerate the defend ant from all claims by any one else.
The answer did not allege that any settlement of the partnership accounts had ever taken place, but, on the contrary, that an action had been commenced for the purpose of compelling such account in the Court of Chancery, in New Jersey, in which the defendant Morris .was complainant, and Allen and Sargeant defendants, and which was still pending. The answer nowhere alleged that Sargeant was insolvent.
If the matters stated in the defendant’s answer, coupled ' with the fact that at the time of the trial, in May, 1857, Sargeant’s estate was insolvent, constituted or were available as a *633defence, legal or equitable, to the action, then the referee erred in excluding the evidence. On the contrary, if the facts stated in the answer would have constituted no defence as against Sargeant at the time of the transfer of the notes, the referee was right. The notes having been negotiated nearly three years after their date, the plaintiff took them subject to all equities between the defendant and Sargeant.
The proposition was to use an unliquidated and unsettled partnership account, begun after the giving of the notes and ending subsequent to their transfer, and where the partnership was between three persons, one of whom was not a party to the suit, and there was no allegation of a dissolution of the partnership or Sargeant’s insolvency when the notes were negotiated, as a defence to the action. It was not offered to be shown that there had been a settlement or an account stated between the defendant and the payee of the notes, though the defendant was allowed the opportunity to prove such settlement if any had been had. On the contrary, the referee found that the affairs of the partnership were, at the time of joining issue in the action, open and unsettled; and no adjustment, settlement or other statement of any indebtedness of any of the copartners to the copartnership, or to one another on account thereof, had ever been made.
The proposed defence clearly did not establish a payment, nor was it available as a counter-claim, not being a claim against the plaintiff on the record. A remaining inquiry is, were the facts set out in the answer, in connection with those offered to be proved, sufficient to establish a set-off against the notes at law or in equity.
It is clear that this unadjusted partnership claim could not be set off at law. It was not a claim which existed and was due and payable, and belonged to the defendant before the notes were transferred in September, 1855, nor was it a demand against Sargeant alone, but against him and the partner Allen, jointly. It was not liquidated, nor could it be, without a statement and settlement of the partnership accounts. There was no account stated between the defendant and Sar*634geant, nor were the affairs of the partnership settled in any way. -At the time such partnership closed, if it did so on the completion of the Flushing railroad, the notes had been transferred over three months. And until the affairs of the partnership are closed and settled, it cannot be said that any debt exists from either partner to the other. (2 R. S., p. 354, § 18, subds. 3, 9; Beckwith v. Union Bank of New York, 5 Seld., 211; Beebe v. Bull, 12 Wend., 504; Plets v. Johnson, 3 Hill, 112; Ladue v. Hart, 4 Wend., 583.)
Could it be set off in equity according to the established principles of equity jurisprudence ? -If it could, there is probably no technical objection now to interposing an equitable defence against a legal liability which, at law, could not have been pleaded in bar. The Revised Statutes provide that in suits in Chancery for the payment or recovery of money, set-offs shall be allowed in the same manner and with likq effect as in actions at law. (2 R. S., 334, § 40.) In equity, when the demands are unconnected and distinct, the rule as to set-offs is as at law. (2 Story’s Eq. Jur., § 1434; Duncan v. Lyon, 3 John. Ch. R., 351; Dale v. Cooke, 4 id., 11; Barbour v. Spencer, 11 Paige, 507.) A court of equity will not interfere when the set-off claimed is of a debt arising under a distinct transaction, unless there is some peculiar equity calling for relief. When there is a legal debt on one side, and an equitable debt on the other, the mere fact of the existence of such cross demands will not be sufficient to justify a set-off in equity. 1 The party seeking it must show some further equitable' ground. Had the defendant in this case brought an action against Sargeant and Allen, while Sargeant held the notes, there would have been nothing (in the absence of an allegation of Sargeant’s insolvency) to show the existence of a right in equity to demand the set-off. (Bradley v. Angel, 3 Comst., 475; Keep v. Lovell, 2 Duer, 78; Gay v. Gay, 10 Paige, 369; Story’s Eq. Jur., §§ 1434 to 1437, inclusive.) Had Sargeant, prior to the transfer of the notes on the commencement of this suit, brought his action' upon them, and the defendant had interposed the same answer as in the present *635action in respect to his partnership demand, alleging nothing as to Sargeant’s insolvency, he would have shown no equitable right to set off such demand. The only ground relied on by the defendant to entitle him to make an equitable set-off wras, that Sargeant was dead and his estate insolvent at the time of the trial in May, 1857.. The answer averred no insolvency at the time of the transfer of the notes, or at the commencement of the suit in June, 1856. It is, therefore, evident that neither the allegations .of the answer nor the facts offered to be proved establish that any equitable right of set-off existed or had attached at the time when the notes vrere transferred to the plaintiff.
There was no legal or equitable right of set-off shown by the pleadings to have attached when the notes were negotiated by Sargeant, or even when the suit was brought; and the offer to show insolvency some eighteen months afterwards, presented no ground for equitable interposition against a bona fide transferee of the notes. The judgment of the Superior Court should be affirmed.
All the judges concurring,
Judgment affirmed.