7-2-102. Apportionment of indebtedness and credits upon alteration of boundary of local government. When any territory shall be detached from any county, city, or town of this state and annexed to any other county, city, or town therein, such county, city, or town to which the same shall be annexed shall be liable to the county, city, or town from which the territory was so detached for its just share of liabilities and indebtedness and shall receive a just share of the credits from the county, city, or town from which the same shall have been detached, which shall be apportioned by ascertaining what ratio the portion detached bears to the territory from which the same was detached. The last prior assessment shall be used as a basis in determining the same.