
3 Cal.App.2d 148 (1934)
KITTLE MANUFACTURING COMPANY (a Corporation), Appellant,
v.
CHARLES P SPEER, Respondent.
 Civ. No. 1898. 
California Court of Appeals. Second Appellate District, Division Two.  
December 18, 1934.
 Freston & Files and Ralph E. Lewis for Appellant.
 J. E. Ricketts for Respondent.
 Crail, J.
 The sole contention of appellant is that the trial court erred in applying the provisions of section 439 of the Code of Civil Procedure as a bar to his recovery. Said section reads as follows: "If the defendant omits to set up a counterclaim upon a cause arising out of the transaction set forth in the complaint as the foundation of the plaintiff's claim, neither he nor his assignee can afterwards maintain an action against the plaintiff therefor." [1] The term "transaction" employed in this section embraces not only a commercial negotiation or contract but also whatever may be done by one person which affects another's rights and out of which a cause of action may arise. (Colla v. U-Drive Autos, Inc., 111 Cal.App. Supp. 784 [294 P. 378].)
 Appellant was the plaintiff in the trial court and commenced this action against respondent to recover, among other items, the sum of $3,270.19 (as more fully set out in a bill of particulars) paid by appellant to respondent over a period of several months by way of advancements for commissions on sales of certain orchard heaters by virtue of a written contract between the parties. The defendant pleaded the provisions of said section as a bar to appellant's recovery alleging that appellant had failed to set up said items as a counterclaim in a prior action brought by respondent against appellant for commissions under the same contract. *150
 [2] The trial court found and decided that appellant had paid respondent as advancements upon commissions the said sum of $3,270.19, but that in a prior action respondent had sued appellant to reform the said contract and to recover a balance alleged to be due for commissions and for an accounting and for sums to be found due; that said cause was tried and judgment was entered for the reformation of the contract and for the sum of $6,934.80 as the balance due for commissions; that the claim for the items comprising the $3,270.19 in the pending action arose out of the transactions set forth in the complaint in the prior action and was not pleaded nor proved nor offered to be proved although existing at that time and was now barred by the provisions of said section.
 The complaint in the prior action contained three counts. The first was for a reformation of the contract by the insertion of the words "sole and exclusive" before the words "sales representative". In the second, the respondent set forth as the foundation of his claim the transaction or transactions wherein he had made sales of heaters under the said contract, as written or as reformed if reformation was had, and whereby he had earned commissions amounting to $6,934.80. The third count was for an accounting in respect to other sales. In that prior action judgment was entered in favor of respondent decreeing reformation of the contract and for the said sum of $6,934.80.
 In the prior action plaintiff's sole cause of action was not for a reformation of the contract but included an action for commissions earned thereunder.
 Out of the above transactions, to wit, the execution of the contract and the sales thereunder by respondent and the accrual of commissions thereon, there also arose a cause of action against respondent and in favor of appellant by way of counterclaim for such advances, if any, as had been made by appellant to respondent on commissions earned or to be earned by him for such sales, which tended to diminish or defeat respondent's recovery. This is such a counterclaim as is described in section 439, and also in section 438 as it existed at the commencement of the action, a failure to plead which results in a bar to a subsequent action thereon.
 Judgment affirmed.
 Stephens, P. J., and Scott, J., pro tem, concurred.
