25-4-403. Counterclaim in action on contract. A counterclaim on a contract is subject to the following rules:
(1) Except as otherwise provided by the Uniform Commercial Code, if the action is founded upon a contract which has been assigned by the party thereto, a demand existing against the party thereto or an assignee of the contract at the time of the assignment thereof and belonging to the defendant, in good faith, before notice of the assignment must be allowed as a counterclaim to the amount of the plaintiff's demand if it might have been so allowed against the party or the assignee while the contract belonged to him.
(2) If the plaintiff is a trustee for another or if the action is in the name of the plaintiff who has no actual interest in the contract upon which it is founded, a demand against the plaintiff shall not be allowed as a counterclaim, but so much of a demand existing against the person whom he represents or for whose benefit the action is brought as will satisfy the plaintiff's demand must be allowed as a counterclaim if it might have been so allowed in an action brought by the person beneficially interested.
History: En. Sec. 692, C. Civ. Proc. 1895; re-en. Sec. 6542, Rev. C. 1907; re-en. Sec. 9139, R.C.M. 1921; Cal. C. Civ. Proc. Sec. 438; re-en. Sec. 9139, R.C.M. 1935; amd. Sec. 11-158, Ch. 264, L. 1963; R.C.M. 1947, 93-3403.