
50 Ill. App.2d 344 (1964)
200 N.E.2d 424
Donald D. Dorland, Plaintiff-Appellee,
v.
Richard E. Steinbrecher, Defendant-Appellant.
Gen. No. 64-24.
Illinois Appellate Court  Second District.
July 16, 1964.
Rehearing denied August 14, 1964.
Supplemental Opinion August 14, 1964.
*345 Bernard V. Narusis, of Crystal Lake, for appellant.
No appearance or briefs filed for appellee.
SCHEINEMAN, J.
The plaintiff sued the defendant in California, and defendant filed a counterclaim. The court had jurisdiction of the subject matter and of the parties; the final judgment was for the plaintiff on his complaint and that the counter plaintiff take nothing.
The present suit in Illinois was begun as a suit by plaintiff on the California judgment. The defendant again filed a counterclaim which was dismissed as barred by the prior judgment. Defendant here contends the two claims were different, and, therefore, the present claim is not barred.
The California counterclaim alleged that Pacific Cork Corp. during the period February 24, 1958 to April 1, 1959 "furnished certain materials, machine parts and labor to counter defendant." It stated the *346 value of materials was $3,200 and labor $800, all of the reasonable value of $4,100.
It further alleged that, on July 1, 1959, Pacific assigned to defendant "all claims, rights, and causes of action, including the aforesaid claims, that it had against Donald D. Dorland."
Apparently this vague statement was amended to make a particular claim for $3,000 as the value of an automatic shaping machine, and $3,000 as its reasonable rental value, plus certain miscellaneous items of machine parts, etc.
The present counterclaim described items of machinery and parts furnished to Dorland by Pacific together with work, labor, services, and material, all being different from those described in California, and for different amounts, but all are claimed under the same assignment dated July 1, 1959 from Pacific to defendant.
[1] The defendant cites Litch v. Clinch, 136 Ill. 410, 26 NE 579 (1891) to the effect that a judgment for a plaintiff bars all defenses raised thereafter except a setoff, which a defendant has the privilege to assert in a pending suit, but is not required to do so. (In modern language a setoff is called a counterclaim, Ill Rev Stats c 110, § 38.)
The answer to this point is that defendant made his choice when he filed his counterclaim in California.
This court holds that, in filing the counterclaim in California, defendant was in the same position he would have been had he filed an original suit, and the test of identity of subject matter cannot be changed because his pleading was called a counterclaim rather than a complaint.
[2-4] Since the subject matter of both suits concern alleged rights of Pacific against Dorland in existence on July 1, 1959, and assigned on that date to defendant, the subject matter is the same and the prior judgment is a bar to the present counterclaim. *347 The defendant, in effect, is here claiming that, whatever rights he acquired under that assignment, he may assert them, piece by piece, in as many lawsuits as he finds convenient. This is not permitted. Defendant cannot avoid the bar of the prior judgment by changing the wording of what he says he acquired under the assignment, or by describing different materials furnished by, taken from, or paid for by Pacific. To hold otherwise would violate the fundamental rule against the splitting of causes of action.
"If suit is brought for a part of a claim, a judgment obtained in that action precludes the plaintiff from bringing a second action for the residue of the claim, notwithstanding the second form of action is not identical with the first, or different grounds for relief are set forth in the second suit. This principle not only embraces what was actually determined, but also extends to every other matter which the parties might have litigated in the case. The rule is founded upon the plainest and most substantial justice,  namely, that litigation should have an end and that no person should be unnecessarily harassed with a multiplicity of suits." 1 Am Jur, Actions, sec 96.
The above section was quoted in full in Hulke v. International Mfg. Co., 14 Ill. App.2d 5, at p 22, 142 NE2d 717. The rule applies in this case before us, and, therefore, the judgment is affirmed.
Judgment affirmed.
CULBERTSON, P.J. and ROETH, J., concur.

SUPPLEMENTAL OPINION ON DENIAL OF REHEARING
This court has filed an opinion which purported to compare a California counterclaim with one filed in Illinois. A petition for rehearing has been filed which *348 informs this court that the document we assumed to be a California pleading was in fact filed in Illinois. The pleading we referred to followed a California judgment with no indication of venue to disclose where the document was filed.
In the meantime, it has come to our attention that this same case was before this court on a prior appeal. The prior appeal was from a final judgment which dismissed the defendant's counterclaim. That judgment was affirmed, which terminated the lawsuit.
[5, 6] The defendant disregarded the fact that there was no suit pending thereafter and purported to file an amended counterclaim in the trial court. This procedure is a nullity. If the defendant wished to present his counterclaim in amended form, the time to do so was when the circuit court sustained the plaintiff's motion to dismiss. The defendant could then have obtained leave to amend. Instead, he stood by his counterclaim and allowed final judgment to be entered against him, from which he took an appeal. This court in March, 1963, decided the case. There was no remandment, the order was affirmed, and thereby became final. An adequate abstract of the decision is reported, Dorland v. Steinbrecher, 39 Ill. App.2d 368, 188 NE2d 746.
"Where on appeal a judgment or decree is affirmed in all of its parts, the controversy is at an end." 14 ILP, Appeal and Error, section 923.
Accordingly the petition for rehearing is denied. While the trial court had no jurisdiction to take any action in the terminated lawsuit, its final judgment was the same as was entered before and affirmed by this court, and the present judgment is therefore affirmed.
