
563 So.2d 612 (1990)
VALLEY TIMBER SALES, INC.
v.
MIDWAY FOREST PRODUCTS, INC.
Civ. 7255.
Court of Civil Appeals of Alabama.
March 21, 1990.
Rehearing Denied May 2, 1990.
Judy A. Newcomb, Spanish Fort, for appellant.
Allan R. Chason of Chason & Chason, Bay Minette, for appellee.
L. CHARLES WRIGHT, Retired Appellate Judge.
Valley Timber Sales appeals from a judgment rendered in favor of Midway Forest Products.
Midway is engaged in the wholesale lumber brokerage business and is located in Spanish Fort, Alabama. Valley, operating *613 out of Virginia and in response to an advertisement by Midway, placed an order for certain timber. Essentially, the parties' agreement contemplated the sale of a number of rail carloads of timber, at a price of $340 per thousand board feet, to be delivered at various times in an approximate seven-month time period.
Midway, a timber broker, made arrangement with a mill to fill the requirements of Valley's orders. The mill would load the order upon a rail car, and Midway would direct the carrier to deliver each order.
Midway sent a form to the mill, which is both an acknowledgement of order and a purchase order, showing Valley as purchaser and the mill as seller. In the first order, Midway directed the mill to send three carloads for the month of November 1987. After payment on the first two shipments was not received within Midway's terms of payment, Midway contacted Valley to inquire about the delay. Valley, for the first time, informed Midway about its annual practice of "clearing its line of credit" with its bank. Valley stated that this practice caused a delay in payments due in the late months of the year. (Valley's vice president and general manager testified: "We... ask the vendor for a little extra time [because] we are a small business and occasionally run into these type of problems.") In response, Midway diverted and sold, at a higher price, the next three timber orders to a third party. Valley was informed of the diverted orders.
Subsequently, Midway resumed shipping orders to Valley. Valley held back payment on one shipment until the next shipment was received in Virginia to insure that the next shipment would be forthcoming. Valley stated that, because Midway held title to the timber while in transit, Midway could easily divert any shipment at any time (as Midway had done before) and leave Valley without timber to fulfill its own customers' orders.
After ten shipments were made, Valley sent a letter to Midway and demanded four additional orders at the same price as that in the parties' agreement. Valley informed Midway that, if the orders were not filled, Valley would be forced to purchase the required timber for Midway's account. In an attempt to comply, Midway informed Valley on July 13, 1988 that it had procured three additional orders, but that it would deliver them by truck and not by rail. Those orders were never filled by Midway. Valley, after further inquiry of Midway, purchased from another source at a higher price per thousand feet. Valley withheld $5,806.08 from its last payment to Midway, representing Valley's additional cost of procuring this "cover."
In August 1988 Midway sent a letter to Valley stating that $5,806.08 was still due on the last shipment, that any "mix-up" was caused by Valley's failure to comply with Midway's payment terms in November or December 1987, and that Midway would fill three more orders, but only at current market price (which was higher than the contract price). Valley then sent a letter to Midway refusing to pay the amount and enclosing copies of four invoices showing that Valley had purchased timber to replace the orders left unfilled by Midway.
Midway filed a complaint against Valley for the amount due under the parties' agreement. Valley counterclaimed for the cost it incurred to "cover" for Midway's failure to deliver. After ore tenus proceedings, the trial court issued a judgment of $5,806, plus interest and an attorney's fee, for Midway. The trial court denied recovery on Valley's counterclaim.
The agreement between Valley and Midway constitutes an installment contract, because it "requires or authorizes the delivery of goods in separate lots to be separately accepted." § 7-2-612(1), Code 1975. The breach or default of a single installment is not necessarily equivalent to a breach of the whole contract. Kirkwood Agri-Trade v. Frosty Land Foods Int'l Inc., 650 F.2d 602 (5th Cir.1981). Under § 7-2-612(3), if the "default with respect to one or more installments substantially impairs the value of the whole contract there is a breach of the whole." Whether the breach or default of an installment substantially impairs the value of the whole *614 contract is a question of fact. See, Kirkwood Agri-Trade.
The first inquiry is to determine what the terms of the Midway-Valley agreement included, and, if terms were missing, to fill in these "gaps" with the provisions of the Alabama Uniform Commercial Code. See e.g., §§ 7-2-305; -310.
After negotiations apparently concluded, Midway sent its acknowledgements of order/purchase orders to the mill; the terms for payment stated "2% 10 days ADI, ADF Net 11 days." The terms mean: the buyer can receive a discount of two percent from the invoiced price, after deducting the freight charges, if the buyer pays within ten days after the date of the invoice; otherwise the entire invoice amount is due by eleven days. This payment term was also used in Midway's invoices sent directly to Valley, after each order had been loaded on rail cars at the mill. Valley's purchase orders consistently used similar terms, except "net 30 days" was used instead of "net 11 days." It is undisputed that in November or December 1987 Valley was delinquent in payment beyond the thirty-day term. Therefore, a "default" by Valley arose even under Valley's own "net 30 days" payment terms. § 7-2-612; Hudson Feather & Down Products, Inc. v. Lancer Clothing Corp., 128 A.D.2d 674, 513 N.Y.S.2d 173 (1987); see also § 7-2-705 for seller's right to stop delivery upon such default. At a minimum, Midway was entitled to demand adequate assurance of performance, in writing, from Valley and suspend its own further performance until such was received. § 7-2-609. See, Scott v. Crown, 765 P.2d 1043 (Colo.App. 1988). Midway contacted Valley, and Valley explained the problems associated with its credit line at its bank. Midway responded by diverting shipments and selling them to a third-party buyer for a higher price than the Midway-Valley agreement.
Nonetheless, thereafter Midway and Valley resumed transacting business under the installment agreement. The agreement was modified by conduct of the parties. The documents reveal that when Valley would receive one shipment it would not pay Midway until the next shipment was also received in Virginia. See, § 7-2-209 (modification of contract valid and "needs no consideration to be binding").
Under § 7-2-612(3), when Midway and Valley continued to perform (even after the payment default by Valley), the entire contract was "reinstated" and continued as modified. See, Dangerfield v. Markel, 252 N.W.2d 184 (N.D.1977). Obviously, Midway did not consider the payment default as a "substantial impairment" of the value of the whole contract, and we find that Midway's conduct supports this conclusion. Midway shipped, and Valley paid within thirty days of receipt through six additional orders. It was not until Midway failed to ship the remaining orders that Valley terminated the contract and "covered" by purchasing from another source.
After the tenth rail car of timber was received by Valley, Valley wrote to Midway and complained that four orders were substantially overdue. Valley also asserted its right to buy sufficient lumber on the open market to make up this amount, should Midway not ship "by July 11, 1988."
Midway responded on July 13, 1988:
"Please note there is a discrepancy in the amount still due you. The original order was for 13 carloads, to date we have shipped you 10 cars, therefore we owe you for 3 carloads rather than the 4... indicated in your letter.
"The 3 cars in question were due in December 1987. Try and understand our position in December [1987] Valley Timber had already received 2 cars of 6 × 6 -8', which was shipped in November 1987. In December [1987] we had not received payment nor had we been notified of any problems. Put yourself in our position, what would you have done?
"We have procured the full amount due you from a mill that has no rail facilities. All shipments will arrive via truck."
(Plaintiff's Exhibit No. 4).
Valley's letter, dated June 30, 1988, was sent approximately one month after Midway's *615 tenth shipment was received. It can reasonably be viewed as a demand for adequate assurance of performance. Scott v. Crown. Midway's response can likewise be viewed as assurance that three carloads would be shipped. Valley relied upon this assurance and did not facilitate its "cover" until approximately July 14, 1988. (Defendant's Exhibit No. 5).
Midway never filled the orders. Valley purchased four carloads of timber from another supplier, at a higher cost than the agreement between Midway and Valley ($367 versus $340 per thousand board feet).
Thereafter, Valley sent Midway the payment due on the last carload, the tenth, less the additional costs associated with the four carloads purchased to "cover." Midway accepted the payment, but brought this suit.
Midway's refusal or failure to ship after the tenth carload constitutes a breach of the agreement. Seybold v. Magnolia Land Co., 376 So.2d 1083 (Ala.1979). Pursuant to § 7-2-610(b) and § 7-2-711, Valley's procurement of substitute goods was entirely legitimate. See, §§ 7-2-711, -712, -713, and -715 (measure of damages; incidental and consequential damages); American Carpet Mills v. Gunny Corp., 649 F.2d 1056 (5th Cir.1981). The withholding of the amount it paid, in excess of the contract price, for the procurement of the substitute goods is also legitimate under § 7-2-717. See, Gilliam v. Indiana Nat'l Bank, 337 So.2d 352 (Ala.Civ.App.1976).
The material facts are not in conflict, and we determine that the trial court misapplied the law to the facts.
The only conflict in the evidence is the number of installments involved, either thirteen or fourteen. After the ore tenus proceedings, the trial court determined that the Midway-Valley agreement contemplated thirteen carloads of timber. After ore tenus proceedings, the judgment of the trial court will not be reversed on appeal unless it is plainly and palpably wrong. The evidence relating to the number of carloads due was in conflict. We find no error in the determination that the parties' agreement was limited to thirteen carloads. Teague Bros. Transfer & Storage v. Kinloch, 441 So.2d 968 (Ala.Civ.App. 1983). Valley's act of withholding any amount greater than an amount sufficient to pay for three carloads was wrongful.
In this posture, the issue raised concerning the award of an attorney's fee in the judgment is moot.
The judgment entered is reversed as to the award to Midway. The case is remanded for entry of judgment for Midway in the amount of $1,451.52. That sum represents the amount withheld by Valley for covering a fourth carload, which the trial court found was not due under the contract. Valley's cost of cover was $27 per thousand board feet more than the Midway-Valley agreement. There were 53,760 board feet on each order of cover.
The foregoing opinion was prepared by Retired Appellate Judge L. CHARLES WRIGHT while serving on active duty status as a judge of this court under the provisions of section 12-18-10(e), Code 1975, and this opinion is hereby adopted as that of the court.
REVERSED AND REMANDED WITH DIRECTIONS.
All the Judges concur.
