231 Kan. 291 (1982)
644 P.2d 413
PANHANDLE AGRI-SERVICE, INC., A TEXAS CORPORATION, Appellee/Cross-Appellant,
NORMAN BECKER, Appellant/Cross-Appellee.
Supreme Court of Kansas.
Opinion filed May 8, 1982.
John M. Lindner, of John M. Lindner, Chartered, of Garden City, argued the cause and was on the brief for the appellant and cross-appellee.3
Lelyn J. Braun, of Lelyn J. Braun, Chartered, of Garden City, argued the cause and was on the brief for the appellee and cross-appellant.4
The opinion of the court was delivered by5
Panhandle Agri-Service, Inc., is a Texas corporation engaged in the purchase and sale of hay, feed yard chemicals, conditioners, and preservatives. It entered into a contract with Norman Becker, a farmer at Garden City, Kansas, to purchase 10,000 tons of alfalfa at $45.00 a ton to be delivered at the Becker farm near Garden City during the 1978 hay season. Becker was short of hay at the end of the 1978 season. The president of Panhandle, Jake Holster, and Becker then agreed that the balance of the hay due under the contract, 912 tons and 256 pounds, would be supplied from the 1979 hay crop.7
Difficulties arose in 1979. It was alleged that Becker failed or refused to supply the balance of hay, and Panhandle brought suit to recover damages for breach of the contract.8
Some of the difficulties which brought about the breach included certain financial difficulties of Panhandle. Although Panhandle had paid Becker for all hay delivered in 1978, it had incurred considerable outside indebtedness. In attempting to satisfy its creditors it sold its fleet of trucks which had been used to haul the hay from Kansas to Texas. Panhandle also had become involved in a lawsuit with LeRoy Nichols, a resident of Kansas, over payment of commissions. Nichols obtained a $3,000.00 judgment against Panhandle. The president of Panhandle, Jake Holster, quit the company and a Walter Nelson moved into the presidency.9
In May, 1979, Nelson called Becker by telephone to verify that they still had a contract. Becker later called Nelson and told him he could pick up the hay. However, because of Panhandle's financial troubles, of which Becker was aware, it was stipulated that the hay must be paid for before loading. Panhandle agreed. Panhandle arranged with a Gale McCoy to haul the hay and he was given a check for the first load. Then McCoy learned of the  judgment which Nichols held against Panhandle. Nichols threatened to attach the trucks by legal process if the hay was picked up. McCoy refused to get involved and returned the check for hay to Panhandle sometime later.10
By this time in 1979, the market price of hay at Garden City had risen by $62.00 per ton. Nelson then contacted Becker. Nelson testified at trial that Becker told him he would not deliver anymore hay. No reason was given. Suit was filed and the trial court awarded Panhandle damages for breach of contract in the sum of $12,698.63. There was testimony by Nelson that he had contracted to sell the hay in Texas for $67.00 per ton or at a profit of $22.00 per ton, and the cost of hauling the hay from Kansas to the Texas market was figured at $7,371.00. The trial court arrived at the $12,698.63 by multiplying 912.256 tons by $22.00 per ton to arrive at a figure of $20,069.63; then it subtracted the $7,371.00 cost of hauling to arrive at the amount of judgment.11
Both parties have appealed. At the outset it must be pointed out the trial court improperly used 912.256 tons instead of 912 tons 256 pounds.12
The plaintiff/cross-appellant argues that the cost of hauling should not have been deducted from the lost profits and that judgment should have been for $20,069.63. Defendant/appellant argues the plaintiff had no standing to bring the action because it was a foreign corporation not registered to do business within the state, but in any event, if this court determines otherwise, the proper damages should not exceed $4,560.64. He arrives at this figure by deducting McCoy's trucking rate, $17.00 per ton, from the anticipated profit claimed by Panhandle of $22.00 per ton to arrive at a net figure of $5.00 per ton on 912 tons and 256 pounds or $4,560.64.13
We will first examine the appellant's contention that Panhandle was a foreign corporation, not authorized to do business within the state, and therefore, without authority to maintain this action.14
K.S.A. 17-7307(a) provides:15
"A foreign corporation which is required to comply with the provisions of K.S.A. 17-7301 and 17-7302 and which has done business in this state without authority shall not maintain any action or special proceeding in this state, unless and until such corporation has been authorized to do business in this state and has paid to the state all taxes, fees and penalties which would have been due for the years or parts thereof during which it did business in this state without authority. This prohibition shall not apply to any successor in interest of any such foreign corporation."
 K.S.A. 17-7303 states:17
"Every foreign corporation that has an office or place of business within this state, or a distributing point herein, or that delivers its wares or products to resident agents in this state for sale, delivery or distribution, shall be held to be doing business in this state within the meaning of this act." Emphasis supplied.
K.S.A. 17-7301 and 17-7302 require all foreign corporations, before doing business in this state, to file an application in the office of the Secretary of State for authority to engage in business in this state as a foreign corporation. Annually, after registration, each foreign corporation doing business within the state must file a certificate of good standing.19
A foreign corporation is required to comply with the provisions of K.S.A. 17-7301 and 17-7302 before doing business in this state, and if it fails to comply and has done business in this state without authority it may not maintain any action in this state. K.S.A. 17-7307(a).20
Plaintiff argues it was not doing business in Kansas. This brings up the question of what constitutes doing business in this state so as to require registration. The phrase "doing business in this state" so as to require registration before maintaining an action is defined by K.S.A. 17-7303 and requires the establishment of an office or place of business within this state, or a distributing point herein, or delivery of its wares or products to resident agents in this state for sale, delivery or distribution. In the present case plaintiff had none of these. It merely sent its agents and trucks into this state to purchase and pick up the hay which was to be sold in Texas. It had no office, place of business or distributing point in Kansas. It did not deliver any wares or products to resident agents in this state for sale, delivery, or distribution. Panhandle was not doing business as that term is defined by K.S.A. 17-7303, was not required to register as a foreign corporation, and was not prohibited by K.S.A. 17-7307(a) from bringing the present action.21
Defendant Becker next contends the trial court erred in failing to enter summary judgment in his favor based on K.S.A. 84-2-309, which provides:22
"(1) The time for shipment or delivery or any other action under a contract if not provided in this article or agreed upon shall be a reasonable time.
"(2) Where the contract provides for successive performances but is indefinite  in duration it is valid for a reasonable time but unless otherwise agreed may be terminated at any time by either party.
"(3) Termination of a contract by one party except on the happening of an agreed event requires that reasonable notification be received by the other party and an agreement dispensing with notification is invalid if its operation would be unconscionable."
Becker contends the contract provided for successive deliveries of hay and the petition does not allege an agreed extension of the 1978 contract. Therefore, he insists the contract could be terminated at anytime because it was indefinite in duration.24
This statute does not apply under the facts of the present case. The contract was for the sale of a definite amount of hay, 10,000 tons. It was originally to be completed during the 1978 crop year but because of the 1978 crop shortage the contract was extended so that the balance of 912 tons 256 pounds could be furnished from the 1979 crop. The contract was not indefinite in duration. In the official UCC Comment following the statute it is pointed out:25
"7. Subsection (2) applies a commercially reasonable view to resolve the conflict which has arisen in the cases as to contracts of indefinite duration. The 'reasonable time' of duration appropriate to a given arrangement is limited by the circumstances. When the arrangement has been carried on by the parties over the years, the 'reasonable time' can continue indefinitely and the contract will not terminate until notice.
"8. Subsection (3) recognizes that the application of principles of good faith and sound commercial practice normally call for such notification of the termination of a going contract relationship as will give the other party reasonable time to seek a substitute arrangement. An agreement dispensing with notification or limiting the time for the seeking of a substitute arrangement is, of course, valid under this subsection unless the results of putting it into operation would be the creation of an unconscionable state of affairs." K.S.A. 84-2-309, Official UCC Comment.
The contract was not terminable at will. Summary judgment is proper only if the pleadings, depositions, answers to interrogatories, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that the moving party is entitled to a judgment as a matter of law. K.S.A. 60-256(c). In this case every material fact was contested and in issue and entry of a summary judgment would not have been proper.27
We next consider the question of whether the trial court found a breach of contract. It is true the journal entry does not contain the  statement that defendant breached the contract. However, the allowance of damages can only imply that a breach of contract was found. In all actions tried upon the facts without a jury, the judge should find the controlling facts. K.S.A. 60-252(a). However, his failure to do so in this case did not prejudice the defendant. Defendant did not request this finding or conclusion and at most it would constitute harmless error. K.S.A. 60-261.28
It appears that although Panhandle was willing to pay for the hay before taking delivery, no one ever showed up with a check to take delivery of the hay. The president of Panhandle testified that he called and was advised by Becker that he was not going to deliver the hay. It is a basic rule of law that a party should not be required to perform a useless act to perfect a cause of action. The trial judge believed Nelson, the president of Panhandle, when he testified that Becker refused to deliver the hay and thus failed to complete the contract. Becker himself testified he was not ready to deliver the hay at the time of trial. There was competent evidence to support a finding of breach of contract and this court on appeal will not reweigh the evidence. International Petroleum Services, Inc. v. S & N Well Service, Inc., 230 Kan. 452, Syl. ¶ 8, 639 P.2d 29 (1982).29
We now turn to the question of what was the proper method of arriving at the amount of damages. As previously stated Panhandle argues on appeal it should be entitled to loss of profits of $20,069.63. Becker argues the entire judgment should be set aside but, if not, the judgment should be reduced to $4,560.64, which would show a deduction from the loss of profits claimed by plaintiff of the costs of trucking from Kansas to Texas. McCoy was going to charge $17.00 per ton.30
Under the facts of this case we believe both contentions are in error. The Uniform Commercial Code concerning sales provides:31
"(1) Subject to the provisions of this article with respect to proof of market price (section 84-2-723), the measure of damages for nondelivery or repudiation by the seller is the difference between the market price at the time when the buyer learned of the breach and the contract price together with any incidental and consequential damages provided in this article (section 84-2-715), but less expenses saved in consequence of the seller's breach.
"(2) Market price is to be determined as of the place for tender or, in cases of rejection after arrival or revocation of acceptance, as of the place of arrival."
 The trial court determined that the market price of alfalfa hay at Garden City, Kansas, in 1979, was $62.00 per ton. The contract price agreed on by the parties was $45.00. So the measure of damages for nondelivery or repudiation by the seller would be $62.00 less $45.00 or $17.00 per ton, provided no incidental or consequential damages are recoverable in this case, and provided there was no evidence that "cover" was not possible.34
The meaning of the word "cover" as used in the Uniform Commercial Code relating to sales is explained in K.S.A. 84-2-712 and refers roughly to the buyer's procurement of substitute goods when the seller nondelivers or repudiates. The philosophy underlying this "cover option" appears to be that an aggrieved buyer can obtain substituted goods without having to suffer any great loss. See the Official UCC Comment following K.S.A. 84-2-712.35
Trucking or transportation expense was not deductible from the above figure. Under the Code it is assumed the buyer will attempt to "cover" the merchandise lost by seller's nondelivery at the seller's shipping point. If the buyer seeks a replacement of the merchandise at the shipping point, he would incur replacement shipping costs roughly equivalent to those on the original contract. Thus, by comparison with such a replacement contract there would be no expenses saved in consequence of the seller's breach because we assume the buyer must pay the expenses for shipment under the new contract as well. White & Summers, Uniform Commercial Code § 6-4, pp. 231-232 (2nd ed. 1980).36
The Official UCC Comment, appearing after the text of K.S.A. 84-2-713, at paragraphs one and two states:37
"1. The general baseline adopted in this section uses as a yardstick the market in which the buyer would have obtained cover had he sought that relief. So the place for measuring damages is the place of tender (or the place of arrival if the goods are rejected or their acceptance is revoked after reaching their destination) and the crucial time is the time at which the buyer learns of the breach.
"2. The market or current price to be used in comparison with the contract price under this section is the price for goods of the same kind and in the same branch of trade."
As to incidental damages resulting from the seller's breach there was no evidence to support any of the items listed in K.S.A. 84-2-715(1). Incidental damages concern expenses when goods are tendered and rejected or have to be transported and cared for, or which concern charges in connection with effecting cover.39
 As to consequential damages K.S.A. 84-2-715(2)(a) provides:40
"(2) Consequential damages resulting from the seller's breach include
"(a) any loss resulting from general or particular requirements and needs of which the seller at the time of contracting had reason to know and which could not reasonably be prevented by cover or otherwise."
Failure of the buyer to utilize the remedy of cover when such is reasonably available will preclude recovery of consequential damages, such as loss of profits. White & Summers § 6-6, 234 n. 103, § 6-7, 250, § 10-4, 396. However, K.S.A. 84-2-712, which provides for cover, i.e., the buyer's procurement of substitute goods, states:42
"(3) Failure of the buyer to effect cover within this section does not bar him from any other remedy."
Therefore, cover is not a mandatory remedy for the buyer. The buyer is free to choose between cover and damages for nondelivery. In the present record we find no evidence which would support a finding that cover was attempted but found unavailable. We find nothing which would justify the trial court in arriving at damages using loss of business profits which are consequential damages. Consequential damages are limited under K.S.A. 84-2-715(2)(a) to those instances where it is established that the loss could not reasonably be prevented by cover or otherwise. A buyer does not have to cover under K.S.A. 84-2-715(3); however, on failure to attempt cover, consequential damages, including loss of profits, cannot be recovered. K.S.A. 84-2-715(2)(a). International Petroleum Services, Inc. v. S & N Well Service, Inc., 230 Kan. 452, Syl. ¶ 7.44
In view of our ultimate decision that loss of profits are not a proper basis for damages in this case it will not be necessary to address appellant's claim that it was error to disallow the testimony of Jake Holster as to the amount of profit ordinarily realized on a ton of hay bought and sold by Panhandle.45
The proper measure of damages under K.S.A. 84-2-713 based on the evidence before the trial court in this case is the difference between the contract price of $45.00 per ton and the market price of $62.00 at the place of delivery and at the time the buyer learned of nondelivery and repudiation. There was no evidence to indicate the buyer attempted and was unable to obtain cover. The proper award in this case is to be arrived at by subtracting $45.00 from $62.00 to make $17.00 per ton, the basis for arriving at  damages. Multiplying 912 tons 256 pounds by $17.00 equals $15,506.18, which is the correct amount of the judgment to be entered in favor of plaintiff, plus interest and costs. Accordingly, the judgment of the district court is affirmed as modified herein.
This is the old version of the H2O platform and is now read-only. This means you can view content but cannot create content. If you would like access to the new version of the H2O platform and have not already been contacted by a member of our team, please contact us at firstname.lastname@example.org. Thank you.