
    21,903.
    The Sinclair Refining Company, Appellant, v. W. Lacy Rosier, Doing Business as The Hutchinson Oil Company, Appellee.
    
    SYLLABUS BY THE COURT.
    1. Open Account- — Defense Not Defeated by Assignment. An assignee of a demand based on an open account for merchandise, takes it subject to any defense or demand the debtor may have against the assignor at the time of the assignment.
    2. Same — Oil-inspection Fees — Statute Invalid — Cross Demand for Fees Paid. Where a dealer in oil pays inspection fees imposed by the state on oil sold by him, protesting that the statute requiring payment is invalid, and who charges such fees to and collects the pay therefor from his customers, and who subsequently, when the invalidity of the statute has been judicially determined, collects from the state “the fees so unlawfully imposed, he becomes liable to a customer for the amount of the fees paid by the customer, who has a right of action against the dealer for their recovery, and who is entitled to set up his claim as against an indebtedness in the form of an open account owed by him to the dealer for oil purchased from the dealer, and the customer cannot be deprived of this right by the assignment of the account to another. When an action is brought by the assignee on the account, the customer may set up his cross demand for the fees paid, and the two demands will be deemed to be compensated so far as they equal each other.
    Appeal from Reno district court; Frank F. Prigg, judge.
    Opinion filed May 10, 1919.
    Affirmed.
    
      M. A. Aelmore, of Hutchinson, and C. A. Braley, of Kansas City, Mo., for the appellant.
    
      A. C. Malloy, R. C. Davis, and Warren H. White, all of Hutchinson for the appellee.
   The opinion of the court was delivered by

Johnston, C. J.:

The Sinclair Refining Company brought this action against W. Lacy Rosier, doing business under the name of The Hutchinson Oil Company, to recover the value of a car of oil and also a car of gasoline, alleged to have been sold to the defendant by The Chanute Refining Company on an open” account, the balance alleged to be due being $1,516.58. This account, it was alleged, was subsequently assigned and transferred to the plaintiif. The answer of defendant was a general denial, an averment that one item,'$289.70, had been paid, and a cross demand for $1,477.30, based on dealings between The Chanute Refining Company,, the plaintiff’s assignor, and the defendant. It was alleged that defendant purchased oil from time to time of The Chanute Refining Company, which was inspected at the refinery under an invalid inspection law; that inspection fees were paid by The Chanute Refining Company under protest, and these fees were charged to and paid by the defendant; and that subsequently it was judicially determined that the inspection law was unconstitutional, and in pursuance of that decision the state refunded to the refining company the fees so paid by the defendant, amounting to $1-,477.30, which has never been paid or turned over to defendant, and the court was asked to allow and set off this demand against the claim of plaintiff. A motion to make the answer more definite as to certain averments was sustained, and the answer was amended in some particulars. Motions to strike out the cross demand, and to sustain a demurrer thereto, were denied by the trial court.

Plaintiff’s objection to the rulings raises the question whether the defendant is entitled to set off his claim against the assigned account on which the action was brought. It was money had and received by plaintiff’s assignor, to which the defendant was entitled, and it certainly constituted an actionable demand as against The Chanute Refining Company. We have the question, then, whether the assignment of the account to plaintiff cut off defenses which the defendant might have used against plaintiff’s assignor. The thing assigned was an open account, which lacks the qualities of negotiable paper, and the plaintiff took it subject-to any set-off or demand which the defendant held against the assignor at the time of the transfer.

The code (§26) provides:

“In the case of an assignment of a thing in action the action of the assignee shall he without prejudice to any set-off or other defense now allowed; hut this section shall not apply to negotiable bonds, promissory notes, or bills of exchange, transferred in 'good faith and upon good consideration before due.” (Gen. Stat. 1915, § 6916.)

It has been determined that when demands exist between parties, one of them cannot defeat the demands of the other by an assignment, but that the assignee takes the assigned claim subject to any defense or demand that the other party holds against the assignor prior to the assignment. The larger demand is deemed to be satisfied up to the amount of the smaller demand. (Leavenson and others v. Lafontane and others, 3 Kan. 523; Norton v. Foster, 12 Kan. 44; St. Jos. & D. C. Rld. Co. v. Casey, 14 Kan. 504; Gardner v. Risher, 35 Kan. 93, 10 Pac. 584; Bank v. Gunter, 67 Kan. 227, 72 Pac. 842.)

The claim of defendant, based as it is on the fees charged against and paid by the defendant, and which were collected by plaintiff’s assignor for the use and benefit of the defendant, amounted to a cross demand, and from the time they were collected by the assignor, cross demands ■ existed between the original parties, and for his demand the defendant had a right of action against the plaintiff’s assignor. A provision of the code (§ 102) applies directly to such a situation:

“When cross demands have existed between persons under such circumstances that, if one had brought an action against the other, a counterclaim or set-off could have been set up, neither can be deprived of the benefit thereof by the assignment or death of the other or by reason of the statute of limitations; but the two demands must be deemed compensated so far as they equal each other.” (Gen. Stat. 1915, § 6994.)

It is alleged that the money had been collected by the assignor for the benefit of the defendant, and that the denland had ripened into a right of action in his favor prior to the assignment of the account to the plaintiff. It being a subsisting claim, upon which he could maintain an action at the time the plaintiff’s cause of action was in existence under the statute, the demand of either party is available in an action brought against the other, and the two demands must be deemed compensated so far as they equal each other. (Bank v. Elliott, 97 Kan. 64, 154 Pac. 255; Cooper v. Seaverns, 97 Kan. 159, 155 Pac. 11; O’Neil v. Eppler, 99 Kan. 493, 162 Pac. 311).

Although it may not be important, it is alleged that the assigned account was received by plaintiff with full knowledge of the existence of the defendant’s demand. The answer of the defendant was sufficiently definite, and it set forth a good ground of defense upon the cross demand of the defendant.

Judgment affirmed.  