If such fence be not repaired or rebuilt accordingly, the complainant may repair or rebuild it, and the same being adjudged sufficient by the fence viewers, and the value thereof, with their fees, being ascertained by them and certified under their hands, the complainant may demand of the owner of the land where the fence was deficient, the sum so ascertained; and in case of neglect to pay the same for one month after written demand, may recover it, with interest at the rate of one percent per month, by action in any court of competent jurisdiction. In any such action the court shall allow the prevailing party a reasonable sum for attorney's fee.
K.S.A. 29-303