In any civil action in the district court, small claims court or magistrate court to recover on an open account, the prevailing party may be allowed a reasonable attorney fee set by the court, and taxed and collected as costs.