
622 S.W.2d 144 (1981)
DAVIS MASONRY, INC., Appellant,
v.
B-F-W CONSTRUCTION CO., INC., Appellee.
No. 6292.
Court of Civil Appeals of Texas, Waco.
August 6, 1981.
Rehearing Denied September 10, 1981.
*145 Joe D. Milner, Jr., John F. Hamje, III, and Peter R. Meeker, Milner & Smith, P. C., Austin, for appellant.
Douglass D. Hearne, Douglass D. Hearne & Associates, Austin, for appellee.

OPINION
McDONALD, Chief Justice.
This is an appeal by Davis Masonry, Inc. (subcontractor) from judgment for plaintiff B-F-W Construction Company (general contractor) in a contractor-subcontractor suit.
Plaintiff B-F-W sued defendant Davis alleging plaintiff was general contractor to build a bank building in Rockdale; that defendant subcontracted to furnish the masonry and brick work on the project for $103,900; that defendant ceased work and abandoned the project in January, 1979. Plaintiff sought as damages the reasonable cost of remedying the defective work and completing the masonry work plus attorney's fees.
Defendant answered by general denial and counterclaimed that it subcontracted to perform the masonry work on the project; that it was prevented from completing its work by the actions of plaintiff in not making payments due it; that it was due $52,071.05 under the subcontract; that it had filed its lien against the property for such amount, and prayed judgment for such amount, foreclosure of its lien, and alternatively for $73,901 reasonable value of labor and materials furnished plus attorney's fees. Davis further filed cross action against Travelers Indemnity Company which was surety on a Release Bond executed by plaintiff in connection with the lien filed by Davis for $52,071.05 assertedly due.
Plaintiff then filed its First Amended Petition alleging defendant subcontracted to do the masonry work on the project for $103,900; that problems had arisen and defendant was sent a cancellation notice; but that a new agreement was reached between plaintiff and defendant in December, 1978, in which plaintiff rescinded its cancellation notice to defendant, and defendant agreed on 5 uncompleted items to be performed by defendant on its subcontract on a schedule, and that plaintiff would pay defendant assigned amounts (of the moneys unpaid defendant out of the $103,900) as each item was completed; that defendant again defaulted and left the job; that plaintiff pursuant to the subcontract with defendant completed the work at a cost of $27,969.21; that such with payments made to defendant leaves defendant due $16,146.75 under the subcontract which plaintiff tenders defendant. Plaintiff further prayed for attorney's fees.
*146 On the 7th day of trial defendant filed trial amendment in which it pled it agreed with plaintiff on the 5 uncompleted items to be performed on time and payment schedule; that plaintiff failed to pay as agreed; that defendant left the job; and defendant prays for its damages of $103,900 contract price, less payments made to it, less reasonable cost to plaintiff to finish the job, plus its attorney's fees.
Trial was to a jury which found:
1) The reasonable and necessary expenses of B-F-W required to finish the work called for under the Davis Masonry subcontract was $21,616.28.
2) B-F-W's reasonable attorney's fees were $25,700 for trial; $6,750 if appeal is taken to Court of Civil Appeals; and $4,000 if application for writ of error is applied for and granted by the Supreme court.
3) Davis's reasonable attorney's fees were $20,000 for trial; $3,000 if appeal be taken to Court of Civil Appeals; and $1,500 if application for writ of error is applied for and granted by the Supreme Court.
Both parties filed motions for judgment on the verdict. The trial court granted plaintiff's motion and rendered judgment for plaintiff for $11,168.45, plus court costs.
Such judgment was computed as follows, based on findings recited in the judgment:


$103,900.00    subcontract price to Davis.
- 57,002.17    paid Davis (including back charges).
___________
$ 46,897.83     retained by B-F-W.
- 21,616.28     cost to B-F-W to complete work.
___________
$ 25,281.55     due Davis under subcontract.
$ 36,450.00     attorney's fees due B-F-W.
- 25,281.55     due Davis under subcontract.
___________
$ 11,168.45     net judgment for plaintiff.

(The judgment further provided for credits of $10,750 if defendant did not appeal; and $4,000 if defendant did not apply for writ of error to Supreme Court).
Defendant appeals on 5 points:
1) The trial court erred in granting B-F-W's motion for judgment, in denying Davis's motion for judgment, and in rendering judgment for B-F-W, in that Davis established a demand against B-F-W upon a counterclaim exceeding that established against it by B-F-W.

2) The trial court erred in overruling Davis's motion for judgment, granting B-F-W's motion for judgment, and failing to render judgment for Davis for attorney's fees in that Davis is entitled to recover its attorney's fees under Article 2226 VATS.

3) The trial court erred in overruling Davis's motion for judgment and in rendering judgment for B-F-W for attorney's fees for the reason that attorney's fees are not recoverable by B-F-W.

4) The trial court erred in rendering judgment for B-F-W for attorney's fees in the event of appeals by Davis in that such does not turn on whether B-F-W succeeds in the appellate court.

5) The trial court erred in overruling Davis's motion for judgment and in rendering judgment that all costs be taxed against Davis for the reason that all costs were required to be taxed against B-F-W under Rule 303 TRCP.

B-F-W had a contract to build a bank building in Rockdale. Davis subcontracted to furnish the masonry and brick work on the project for $103,900. Davis began work on its subcontract and was paid $57,002.17 (including back charges) leaving $46,897.83 retained by B-F-W. Problems developed. B-F-W sent Davis a cancellation notice. In December 1978 B-F-W and Davis made a new agreement whereby Davis agreed to complete 5 items on a time schedule and receive specified amounts of money on completion of each item. Davis failed to complete any of the items and abandoned the job. B-F-W completed Davis's subcontract, and filed suit against Davis seeking its reasonable cost to complete Davis's job, alleged to be $27,969.21, plus attorney's fees. B-F-W further alleged Davis entitled to $16,146 and tendered same. Davis counterclaimed for an alleged amount due *147 under the contract of $52,071.05, and alternatively $73,901 under quantum meruit, but by trial amendment filed 9 days after trial began, Davis alleged the modified agreement previously alleged by B-F-W, and counterclaimed for the amount due it under the subcontract (including back charges), less the reasonable cost to B-F-W to finish the job (not setting out any amount). The jury found $21,616.28 to be the reasonable cost to finish the job; that $36,450 were plaintiff's reasonable attorney's fees; and that $24,500 were defendant's reasonable attorney's fees.
The trial court rendered judgment for plaintiff for its $36,450 attorney's fees plus $21,616.28 required to complete the work; deducted the $46,897.83 retained by plaintiff; and rendered net judgment of $11,168.45 against defendant (providing for credit on the judgment of attorney's fees awarded for appeals if no appeals were taken), plus costs of court.
The dominant question presented by this appeal is who was the prevailing party. We hold that plaintiff was the prevailing party.
At the time trial commenced: Plaintiff was seeking determination that defendant had abandoned its subcontract and that plaintiff was entitled to $27,969.21 for completing the job (and that defendant was entitled to $16,146.75); defendant was seeking determination that plaintiff had prevented it from completing the job and that it was entitled to $52,071.05 (and alternatively $73,901).
After the case had been in trial for 9 days and it was undisputed plaintiff held $46,897.83 in retainage; and was undisputed defendant had agreed to complete the work under the modification but failed to do so and left the job, defendant filed its trial amendment seeking to recover the amount of the retainage less the reasonable cost to plaintiff to complete the job, without specifying any amount.
What the parties sought must be determined from the state of the pleadings at the time trial commenced and not 9 days thereafter. Boaz Well Service, Inc. v. Carter, CCA (Fort Worth) NWH, 437 S.W.2d 38 (Tex.Civ.App.).
In any event there was $46,897.83 unpaid by plaintiff under the subcontract; it was undisputed $16,146.75 was due defendant; which leaves $30,751.08 in dispute; of which plaintiff recovered $21,616.28 and defendant recovered $9,134.80.
Paragraph 22 of the subcontract provides:
"If Contractor shall employ an attorney to enforce any provision of this Subcontract, or to defend any suit instituted by Subcontractor in connection herewith, Subcontractor shall, if contractor prevails, pay to contractor the amount of its reasonable attorney's fees and costs and expenses incurred in the enforcement hereof or the defense of any such suit by Subcontractor".
And Black's Law Dictionary, Revised Fourth Edition defines "Prevailing Party" as "That one of the parties to a suit who successfully prosecutes the action or successfully defends against it, prevailing on the main issue, even though not to the extent of his original contention".
Plaintiff was the prevailing and successful party in its suit against defendant, and was the prevailing and successful party in its defense of defendant's counterclaims; and is entitled to attorney's fees under the contract.
Rule 131 TRCP provides "The successful party to a suit shall recover of his adversary all costs incurred therein * *". Plaintiff was the "prevailing" and "successful" party in this case. Stewart v. Group Health & Life Ins. Co., CCA (Waco) NWH, 555 S.W.2d 531 (Tex.Civ.App.); Siepert v. Brewer, CCA (Texarkana) NRE, 433 S.W.2d 773 (Tex.Civ.App.); Tate v. Wiggins, CCA (Waco) NWH, 583 S.W.2d 640 (Tex.Civ. App.).
All defendant's points are overruled.
AFFIRMED.
