
492 P.2d 470 (1972)
INVESTMENT SERVICE CO., an Oregon Corporation, Respondent,
v.
NORTH PACIFIC LUMBER CO., an Oregon Corporation, Appellant.
Supreme Court of Oregon.
Argued and Submitted June 2, 1971.
Decided January 12, 1972.
Robert L. Allen, Portland, argued the cause for appellant. With him on the briefs were Morrison & Bailey and James L. Sutherland, Portland.
William M. McAllister, Portland, argued the cause for respondent. On the brief were Cleveland C. Cory, Phillip D. Chadsey, Erik G. Sten, and Davies, Biggs, Strayer, Stoel & Boley, Portland.
Before O'CONNELL, C.J., and DENECKE, HOLMAN, HOWELL and SCHWAB, JJ.
DENECKE, Justice.
The plaintiff, as assignee of a bank, is attempting to recover the invoice price for lumber sold to defendant. The bank contends it is entitled to recover because Browne, a lumber producer, assigned the proceeds of the invoice to it and transferred a security interest in the lumber to it. The defendant, a lumber wholesaler, contends it does not owe the entire invoice for the reason that it has a setoff because of defective lumber which Browne previously sold defendant.
*471 Prior to all the sales involved here, the bank did perfect its security interest in Browne's lumber inventory.
Browne shipped a carload of lumber to the defendant. Pursuant to another security arrangement with the bank, Browne assigned the invoice for this shipment to the bank and the defendant paid the full amount of the invoice to the bank. After payment, the defendant found the lumber had been defectively manufactured and a reinspection of the lumber was ordered.
Browne made a second shipment to defendant and assigned the invoice to the bank. The defendant partially set off its claim for defective lumber in the first shipment by deducting $1,000 from its payment of the invoice for the second shipment.
A third shipment was made from Browne to defendant and the invoice was assigned to the bank. By this time the decrease in value of the first shipment due to defective manufacture had been definitely determined to be $1,580.80. Defendant, therefore, deducted $580.80 from its tendered payment of the invoice for the third shipment, which would have been in full payment of its claimed setoff because of the defective shipment. The bank did not object to the amount of the setoff, but refused to accept the tendered amount, contending defendant did not have a right to any setoff.
We hold that the defendant is entitled to its setoff.
The bank does not contest that the first shipment was defective or that if the bank were not involved and Browne was seeking payment that the defendant could set off the amount it now claims.
The bank was an assignee of the contracts for all three of the shipments as Browne assigned the proceeds of the three invoices to the bank. The bank received payment of the invoices for the first two shipments only because of the assignments. On these shipments the bank's security interest in the lumber afforded no protection. The defendant was a buyer in the ordinary course of business in the first two sales and, therefore, took the lumber free of the bank's security interest. ORS 79.3070.
ORS 79.3180 provides, in part:
"* * * [T]he rights of an assignee are subject to:
"(a) All the terms of the contract between the account debtor and assignor and any defense or claim arising therefrom; * * *."
Gilmore states: "`Claims' no doubt include the Restatement's `set-offs' * * *." 2 Gilmore, Security Interests in Personal Property § 41.4, 1090 (1965). The comment to the code states the quoted provision "makes no substantial change in prior law." Uniform Commercial Code § 79.3190, p. 389.
An assignee of a contract for the sale of the lumber is subject to any setoff the purchaser of the lumber might have because of a defect in the lumber sold. The setoff is available for use against any claim made by the assignee regardless of whether it has any connection with the claim asserted in the assignee's complaint.
Williston states the principle "* * * that the assignee of a non-negotiable chose in action takes it subject to all the defenses which the obligor may have against the assignor is applicable not simply to defenses like nonperformance, fraud, duress, mistake, covenants not to sue, which relate to the assigned obligation itself, but also to rights of set-off, or counterclaim arising out of separate matters which the obligor might have asserted against his original creditor, the assignor." 3 Williston, Contracts (3d ed.) 181-182, § 432. Accord, Rogue River Management Co. v. Shaw, 243 Or. 54, 59, 411 P.2d 440 (1966).
Koffman v. Modern-Imperial Company, 239 Cal. App.2d 135, 48 Cal. Rptr. 492 (1966), is a decision illustrating the principle. Before May 1961 the defendant, Modern-Imperial, sold trucking equipment to Golden West Livestock Transportation Company and was not paid. Golden West performed *472 trucking services for defendant in November 1961 and assigned the account receivable for such services to plaintiff. Plaintiff sued on this account and the defendant pleaded the amount owed it by Golden West for the trucking equipment sold as a setoff. The court allowed the setoff, holding that any amounts Golden West owed defendant could be set off in this action by Golden West's assignee.
Jefferson Union Co. v. American Radiator & S.S. Corp., 329 Mass. 692, 110 N.E.2d 385 (1953), is another example of the principle that the defendant can set off any claim it has against the assignor regardless of whether it has any connection with the claim asserted by the assignee.
The bank argues in its brief that it is not subject to the setoff because "the Bank had a direct interest in the inventory through its security interest while its rights in the account receivable was a derivative interest. If the Bank had only a security interest and had not taken an assignment of the account receivable, defendant could not argue that it could set off under ORS 79.3180 and be free of the Bank's security interest. Defendant's position is that an assignment of the account receivable will defeat the Bank's security interest. Certainly the court cannot accept the argument that by expanding its collateral to include accounts receivable the Bank diminished its rights."
The only assignment of any relevance is the assignment of the proceeds of the first shipment. When Browne assigned the invoice to the bank the bank took it subject to the defendant's right of offset for the defective lumber. When the defendant purchaser overpaid the bank because it did not know that the lumber was defective, the bank became indebted to the defendant. The assignment and payment to the bank created a new relationship between the bank and the defendant. Stated simply, because of the defective lumber in the first shipment, the defendant's overpayment, and the bank's receipt of the overpayment, the bank now owes defendant money. For our purposes, the legal consequences are the same as if the defendant had loaned $580.80 to the bank, which the bank now owes defendant. If the bank has a claim against the defendant for taking delivery of the lumber in which the bank has a security interest, the defendant is entitled to set off its debt of $580.80 just as it could set off such amount if the bank were making a claim against it for a loan the bank had made defendant.
Reversed with instructions to enter judgment for defendant.
