
    604 P.2d 605
    OCCIDENTAL CHEMICAL COMPANY, a Delaware Corporation, dba Best Fertilizers of Arizona, Inc., Appellant, v. Virginia S. CONNOR, Lawrence J. Smith, and Elias M. Romley, dba CSR Farm, Appellees.
    No. 14444.
    Supreme Court of Arizona, En Banc.
    Dec. 3, 1979.
    
      Black, Robertshaw, Frederick, Copple & Wright by Richard A. Black, Phoenix, for appellant.
    Moore & Romley by Roger T. Hargrove, Phoenix, for appellees.
   HAYS, Justice.

This case arises from a suit on an open account by Occidental Chemical Company, a Delaware corporation, dba Best Fertilizers of Arizona, Inc., appellant herein, against Virginia S. Connor, Lawrence J. Smith and Elias M. Romley, dba CSR Farm, appellees herein. The parties will hereinafter be referred to as Best and CSR. The trial court entered summary judgment in favor of CSR and against Best after a hearing on cross-motions for summary judgment. Best’s motion for rehearing was denied, and this appeal followed. We have jurisdiction under 17A A.R.S. Civil Appellate Proc. Rules, rule 19(e).

The facts necessary to dispose of the issues raised herein are as follows.

CSR is a farming operation owning land located in Pinal County and is engaged in the business of raising cotton. In connection with that business, CSR entered into a Tillage & Harvesting Contract with Glenn Lane pursuant to which Lane contracted to provide the necessary equipment, fuel and labor for the production of cotton on the CSR Farm. Pursuant to this agreement, Mr. Lane had for several years, including the times referred to herein, planted, managed and grown the cotton on the land owned by CSR and had CSR’s apparent authority to purchase all products necessary to produce a profitable cotton crop. Pursuant to his apparent authority, Mr. Lane had entered into a chemical program on behalf of CSR with Best for 1975, whereby Best would furnish necessary chemicals to CSR on an open account. The last item on the open account for the year 1975 was furnished by Best on October 2, 1975, and each item of account was due and payable on the 10th day of the month following delivery.

Problems arose, however, when on July 29, 1975 certain contaminates supplied by Best to CSR were applied to the cotton crop, severely damaging the crop. CSR brought suit against Best on September 15, 1975 in Pinal County seeking damages and alleging breach of contract and Best’s negligence in placing the chemicals at the sprayer’s airstrip in such a manner that the sprayer could not determine the nature of the chemicals. Best answered that lawsuit on October 9, 1975 and judgment in favor of CSR was entered on October 4, 1976, from which no appeal was taken. During the course of the Pinal County trial, evidence of the open account which is the subject of this action was introduced by Best, but not for the purposes of setoff or counterclaim.

This action was filed by Best on June 7, 1977 after attempts to collect the balance of the account had failed. In its ruling on the cross-motions for summary judgment the trial court determined that Best’s claim was barred because it was not asserted as a counterclaim in the prior litigation between the parties. The amount claimed by Best is $9,528.03, after allowance for all just payments, offsets and credits.

Best contends it could not have asserted its open account claim in the prior litigation because the account had not yet accrued when its answer was due in that action. CSR was still using chemicals from Best at that time and had indicated that Best was to continue to supply its regular chemical program to CSR and to supply additional chemicals to help the cotton crop recover from the damage it had suffered. Best also contends it had no indication that CSR would not pay its obligation until late in the trial of the prior action when CSR’s counsel indicated there was some question as to whether his client would pay the bills. Furthermore, the prior litigation was a negligence action, not a suit based on this contract, and this open account had no relationship to that action.

CSR contends that at the time the prior action was commenced on September 15, 1975, CSR had already accrued a substantial obligation to Best which was then due and payable under the terms of the open account and that since the last item on the account was furnished by Best on October 2, 1975, by the time the case was tried in August, 1976, and judgment was entered on October 4, 1976, the entire amount of the open account had become due and payable. Furthermore, no one from CSR agreed to payment for any chemicals supplied after July 29, 1975.

The question we must first decide is whether the trial court properly granted summary judgment.

In granting a motion for summary judgment, the trial court must determine that no genuine issue as to any material fact exists and that as a matter of law the moving party is entitled to summary judgment. Love v. Farmers Ins. Group, 121 Ariz. 71, 588 P.2d 364 (App.1978); 16 A.R.S. Rules of Civil Procedure, rule 56(c), as amended. In ruling on a motion for summary judgment, the trial court may look to the pleadings, depositions and affidavits. If there is the slightest doubt as to whether there is an issue of fact, this doubt should be resolved in favor of trial on the merits. O’Brien v. Scottsdale Discount Corp., 14 Ariz.App. 224, 482 P.2d 473 (1971). We have examined the record before us, including the affidavits of both Charles B. Lair-more of Best Fertilizers and Elias M. Romley of CSR, and we are of the opinion that there is doubt as to whether the claim Best had against CSR was an enforceable claim in the prior action. This is a material issue of fact.

The affidavit of Charles B. Lairmore, assistant general manager of Best, dated April 17, 1978, states in part:

“12. Pursuant to the understanding between Glen Lane and Best, neither he nor CSR would be obligated to pay the 1975 cotton crop chemical bill owed to Best Fertilizer until the crop had been sold, any disaster credits received from the Federal Government (which were eventually received by both Lane and CSR during 1976) and final disposition of any claim against Best made. To do otherwise would have imposed a financial hardship upon these farmers which Best Fertilizer did not want to impose.”

The affidavit of Elias M. Romley, of CSR, dated May 2, 1978, states in part:

“7. Affiant is credibly informed and believes and therefore alleges that Glenn Lane did not enter into any agreement with Best on CSR’s behalf with respect to the time payment for the chemicals would be due; and, in fact, Glenn Lane never had any authority to enter into any such agreement.”

While the affidavits relating to this question are not as artfully drawn as possible, they do leave us with a doubt as to the outcome of this particular factual question. If one is not entitled to relief in a direct action, he is not entitled to assert a setoff or counterclaim. W. J. Kroeger Co. v. Travelers Indemnity Co., 112 Ariz. 285, 541 P.2d 385 (1975); Scoville v. Vail Investment Co., 55 Ariz. 486, 103 P.2d 662 (1940); Valley Gin Co. v. McCarthy, 56 Ariz. 181, 106 P.2d 504 (1940); Cruzan v. Franklin Stores Corp., 72 N.M. 42, 380 P.2d 190 (1963); 20 Am.Jur.2d Counterclaim, Recoupment, etc., § 54-55 (1965).

CSR also argues that the affidavit of Elias Romley, dated May 2, 1978, alleging that “Glenn Lane never had any authority to enter into any such agreement” placed the burden upon Best to produce sufficient competent evidence to show that there was a material issue relating to the alleged agreement and to demonstrate that evidence was available to justify a trial on that issue. •

We believe the affidavit of Charles Lair-more, dated May 9,1978 and filed as part of Best’s Rule 59(a) Motion for Rehearing of Order Granting Summary Judgment, is sufficient to raise such a genuine issue of material fact and prevent the granting of summary judgment against Best. The affidavit is based upon facts with which the affiant is “personally familiar” and states in pertinent part:

“3. Glen Lane was given complete authority to make all decisions regarding the purchase of chemicals from BEST FERTILIZERS for the CSR crop by an express authorization given to BEST FERTILIZERS by Elias Romley and for several years, BEST FERTILIZERS dealt only with Glen Lane with regard to the sale of its products to CSR and CSR held out Glen Lane as having complete and total authority for the management and administration of the CSR cotton crops.”

Rule 59(f), Rules of Civil Procedure, provides for the filing of affidavits and opposing affidavits when a Rule 59 motion is made. Lairmore’s May 9, 1978 affidavit is part of the record on appeal and we must therefore assume that it was considered by the trial court in its deliberation on this motion. Byars v. Arizona Public Service Co., 24 Ariz.App. 420, 539 P.2d 534 (1975).

Having determined that the trial court was incorrect in granting summary judgment, we wish to address the issue of whether Best had a compulsory counterclaim in the prior action, if the trial court on remand should determine that Best’s claim was enforceable at that time.

Rule 13(a), Rules of Civil Procedure, states:

“Compulsory Counterclaim. A pleading shall state as a counterclaim any claim which at any time of serving the pleading the pleader has against any opposing party, if it arises out of the transaction or occurrence that is the subject matter of the opposing party’s claim and does not require for its adjudication the presence of third parties of whom the court cannot acquire jurisdiction. But the pleader need not state the claim if (1) at the time the action was commenced the claim was the subject of another pending action, or (2) the opposing party brought suit upon his claim by attachment or other process by which the court did not acquire jurisdiction to render a personal judgment on that claim, and the pleader is not stating any counterclaim under this Rule 13.”

Appellant argues that its claim on the open account did not arise out of the transaction or occurrence that was the subject matter of the previous litigation between the parties. In deciding what constitutes a “transaction or occurrence” within the meaning of Rule 13(a), courts have generally applied the test as stated in Wright and Miller, Federal Practice & Procedure, Vol. 6, § 1410 (1971) at 42:

1. Are the issues of fact and law raised by the claim and counterclaim largely the same?
2. Would res judicata bar a subsequent suit on defendant’s claim absent the compulsory counterclaim rule?
3. Will substantially the same evidence support or refute plaintiff’s claim as well as defendant’s counterclaim?
4. Is there any logical relation between the claim and the counterclaim?

Although Best argues that the answer to the first three tests when applied to this case is clearly “no,” it should be noted that Wright and Miller point out several deficiencies in the first three tests when viewed in light of the real purpose of Rule 13(a), which is to allow the court to apply the rule to any counterclaim that from an economy or efficiency perspective could be profitably tried with the main claim. We agree that the “logical relation” test is the more acceptable test. See Technical Air Products, Inc. v. Sheridan-Gray, Inc., 103 Ariz. 450, 445 P.2d 426 (1968).

In the present case, both the subject of the previous litigation between the parties (negligence in the application of chemicals) and the subject of this litigation (open account for chemicals supplied) logically relate to the raising of the 1975 cotton crop by CSR. Therefore, the open account had a logical relationship to the subject matter of the previous litigation between the parties. Even if, at the time Best filed its pleadings in the prior litigation, they did not anticipate a problem in collecting the amounts due, or to become due, on the open account, they might well have anticipated such problems because of the lawsuit then existing between the parties. Proper practice dictated the filing of the counterclaim, if Best was entitled to relief at that time. Technical Air Products, Inc. v. Sheridan-Gray, Inc., supra. See also Biaett v. Phoenix Title & Trust Co., 70 Ariz. 164, 217 P.2d 923, 22 A.L.R.2d 615 (1950).

Appellant next argues that the open account had not yet accrued at the time it filed its responsive pleadings in the previous litigation and was therefore not a compulsory counterclaim. The general nature of the accrual of an open account was discussed in Continental Casualty Co. v. Grabe Brick Co., 1 Ariz.App. 214, 401 P.2d 168 (1965), where the court stated:

“This court has found the general rule to be that where the parties are doing business on an ‘open account’ basis the statute of limitations does not run during such a state of mutual dealings, but only from the date of the last item. .

The general rule stated affirmatively in 54 C.J.S. Limitations of Actions § 165a, is as follows:

“ * * * where there is a mutual, open, and current account, the cause of action to recover the balance accrues, and the statute of limitations begins to run, at the date of the last item; and if the last item is not barred it draws to itself all the other items, which become barred only when the statute has run against the last item.”

Both parties agree that the last item of account was delivered by Best to CSR on October 2, 1975, seven days before Best filed its answer in the previous litigation. Thus, the account had already accrued, and, if Best was entitled to enforce its claim, it should have been included as a counterclaim in that litigation.

Neither party has argued that Rule 13(e), Rules of Civil Procedure, is applicable in this case:

“Counterclaim maturing or acquired after pleading. A claim which either matured or was acquired by the pleader after serving his pleading may, with the permission of the court, be presented as a counterclaim by supplemental pleading.”

We find nothing in the record before us to substantiate Best’s allegation that the trial court in the previous litigation ruled that the open account should not be made a counterclaim in that litigation. Thus, assuming that the total amount of the open account had not yet accrued at the time Best filed its answer in that case and that Best was entitled to enforce its claim, Best should have pled the amount then accrued as a counterclaim in that suit, and the pleadings could have been supplemented to reflect the total amount which later became due and payable. Moore v. New York Cotton Exchange, 270 U.S. 593, 46 S.Ct. 367, 70 L.Ed. 750 (1926); O’Brien v. Scottsdale Discount Corp., supra; New Britain Machine Co. v. Yeo, 358 F.2d 397 (6th Cir. 1966).

If the trial court should determine that the compulsory counterclaim was not enforceable by Best at the time of the previous action, then Best should prevail pursuant to our reasoning herein and be allowed to attempt to enforce its claim in the present action. However, if it is determined that the claim was enforceable at the time Best’s answer was due in the prior action, then, because Best’s claim was a compulsory counterclaim in the prior action and, because it failed to plead it in that action, it is barred by res judicata from bringing this independent action on the open account. We, therefore, reverse the summary judgment and remand this matter to the trial court for further proceedings not inconsistent with this opinion.

CAMERON, C. J., and HOLOHAN and GORDON, JJ., concur.

STRUCKMEYER, Vice Chief Justice,

dissenting.

I do not agree with the disposition of this case, believing that the summary judgment granted in the court below should be affirmed.

Charles B. Lairmore, Assistant General Manager of Best Fertilizer, by affidavit of April 17, 1978, quoted supra, stated that there was an understanding between Glenn Lane and Best Fertilizer that CSR Farm would not be obligated to pay the 1975 cotton crop chemical bill until, among other events, any disaster credits were received from the federal government. Thereafter, appellee, Elias M. Romley, in an affidavit dated May 2, 1978, stated that Glenn Lane “never had any authority to enter into any such agreement.”

CSR Farm was engaged in the business of farming. There is no assertion by Best Fertilizer that Glenn Lane was the general agent for CSR Farm, only that Glenn Lane planted, managed and grew the crops for CSR Farm. Appellee Romley by his affidavit established that Glenn Lane was not authorized to enter into any agreement binding CSR Farm relative to the payment of claims against it. Therefore, the issue in the case which appellant failed to contradict was not whether there was an understanding between Glenn Lane and Best Fertilizer as to the payment of the chemical bill, but whether Glenn Lane was acting within the scope of his authority if he actually spoke on behalf of CSR Farm in this matter.

If a motion for summary judgment is supported by proof of specific facts which would defeat a claim, the claimant must come forward to show the existence of a genuine factual issue. Joseph v. Markovitz, 27 Ariz.App. 122, 551 P.2d 571 (1976). Appellant, Best Fertilizer, in order to defeat the appellees’ motion for summary judgment, had the burden of showing at this point that there was a genuine issue of fact as to whether Glenn Lane was acting within the scope of his authority as the appellees’ agent. This it could have done, were it true, by taking the deposition of Glenn Lane. Since the appellant failed to establish that it had the right to rely on an agreement with Glenn Lane, it is my view that the trial court did not err in entering a summary judgment in favor of appellees. 
      
       Rule 13(a), Rules of Civil Procedure for the Superior Courts of Arizona was amended September 21, 1979 as follows:
      “IT IS ORDERED that Rule 13(a), Rules of Civil Procedure for the Superior Courts of Arizona, be amended by changing the words ‘at any time’ in the first sentence thereof to read ‘at the time,’ effective December 1, 1979.”
     