
324 N.W.2d 808 (1982)
212 Neb. 607
COLLECTION ASSOCIATES, INC., a Nebraska corporation, Appellant,
v.
Emerson ECKEL et al., Appellees.
No. 44364.
Supreme Court of Nebraska.
October 1, 1982.
*809 James G. Sharp of Everson, Noble, Wullschleger, Sutter, Sharp & Korslund, Beatrice, for appellant.
C. E. Danley, Beatrice, for appellees.
Heard before KRIVOSHA, C. J., and BOSLAUGH, McCOWN, WHITE, HASTINGS, and CAPORALE, JJ.
WHITE, Justice.
Collection Associates, Inc., plaintiff-appellant, appeals from the judgment of the District Court of Gage County, Nebraska, allowing a setoff for crop damages allegedly sustained by Emerson Eckel and Betty Eckel, defendants-appellees, in 1977. We affirm in part and reverse in part.
Plaintiff is a collection agency in Beatrice, Nebraska, which received an assignment of an open account from Firth Co-operative Co. (Firth Co-op) for goods and services sold to the defendants. It was uncontroverted that the defendants owed $11,553.94 on an open account, and no defense was raised at trial with regard to the amount due on the open account except for the setoff for spraying damages. The defendants requested a setoff for alleged damages to their milo and soybean crops for spraying done by the plaintiff's assignor, Firth Co-op, in 1978. After the plaintiff rested, the defendants amended their cross-petition over the objection of the plaintiff to allege milo damage in 1977 instead of 1978. The District Court found that there was damage to the defendants' milo crop in 1977 and awarded setoff of $3,699.36.
Of the several assignments of error we discuss only whether the trial court erred in permitting the defendants to amend their cross-petition to allege spraying damage to the milo in 1977 instead of 1978, and we will not reach the other assignments.
The right to amend pleadings rests within the sound discretion of the trial court and the allowing of an amendment will not be error unless prejudice resulted. Foremost Ins. Co. v. Allied Financial Services, Inc., 205 Neb. 153, 286 N.W.2d 740 (1980); Stungis v. Union Packing Co. of Omaha, Inc., 196 Neb. 126, 241 N.W.2d 660 (1976).
Neb.Rev.Stat. § 25-852 (Reissue 1979) provides: "The court may, either before or after judgment, in furtherance of justice, and on such terms as may be proper, amend any pleading ... by inserting other allegations material to the case, or, when the amendment does not change substantially the claim or defense, by conforming the pleading or proceeding to the facts proved." (Emphasis supplied.)
The record reveals that the defendants maintained the position that the spraying damage to the milo occurred in 1978, throughout discovery until after the plaintiff had rested. In the past we have not found the time at which an amendment occurred to be dispositive of whether prejudice occurred and have authorized amendments for the first time on appeal. See Lippire v. Eckel, 178 Neb. 643, 134 N.W.2d 802 (1965). However, in the instant case the change of the year of crop damage from 1978 to 1977 was a substantial change in the defense of setoff pleaded by the defendants. The plaintiff's discovery had been conducted with regard to damages in the year 1978. The pretrial order specifically allowed amendments relating to details of the claimed damage, but the amendments did not change the year in which the damage to the milo was alleged to have occurred.
Prejudicial error results when a pleading is allowed to be amended where *810 the amendment changes the issues and affects the quantum of proof as to any material fact. See Folken v. Union P. R. Co., 122 Neb. 193, 239 N.W. 831 (1932). Since the amendment here altered the year in issue, it substantially changed the nature of the proof to counter the setoff claimed. Indeed, in an affidavit offered in support of the motion for new trial, the plaintiff asserts that no spraying was supplied to the defendants by Firth Co-op in the year 1977. The plaintiff was clearly prejudiced by the action taken by the trial court. The plaintiff could not have been expected to meet claims of damages in other than the year alleged.
The action of the District Court finding for the plaintiff on the open account is affirmed, and the portion of the judgment allowing the setoff of $3,699.36 is reversed and the cause remanded for a new trial on the issue of the setoff damages for 1977 allegedly sustained by the defendants.
AFFIRMED IN PART, AND IN PART REVERSED AND REMANDED.
CLINTON, J., participating on briefs.
