The proceedings so authorized by this act in the name of the board of county commissioners of the county shall be for the benefit of the state of Kansas, any city, township, school district or other taxing unit interested in such taxes to be recovered. The balance equitably apportioned to each tract, lot or piece of real estate as provided in K.S.A. 79-2803, and amendments thereto, shall be paid by the clerk of the district court to the county treasurer, who shall prorate to each fund, if practicable, its proportionate interest in the entire lien for taxes and interest included in the foreclosure action. If the court shall find such proration impracticable, distribution shall be made among the various funds in such proportion as the court shall direct. If the proceeds of the sale of any particular tract, lot or piece of real estate sold by the board of county commissioners after the county has bid the same in at the tax foreclosure sale shall not equal or shall exceed the amount necessary to pay the entire lien for taxes, interest and costs which were included in the foreclosure action plus any and all subsequent taxes and special assessments and interest on said real estate due and unpaid at the time of such sale, the amount collected shall be apportioned as follows:
If such proration is impracticable such balance shall be prorated to each fund on the basis of the levy made for the year in which such sale is made by the county. Prorations and distributions shall be made only as and when the county receives said funds upon final sale, unless said county decides to use said real estate for county purposes; in that event it shall cause all taxes other than taxes levied by the county to be paid forthwith to the taxing unit that levied the same. The county treasurer at the time of making his or her proration and distribution shall cancel all taxes charged against such real estate which were due and unpaid at the time such sale or resale was made and shall issue his or her receipt therefor.
K.S.A. 79-2805