The exclusion of territory from one district and its annexation to another district shall not be effective until all outstanding contracts of the district from which it is excluded have expired or the contracts, with the consent of the parties, have been modified or canceled so as to relieve the district of further obligation to pay for future maintenance in the territory excluded, and until the funds remaining on hand upon the completion of the exclusion and annexation have been apportioned between the district to which the territory was annexed and the district from which it was excluded.
The division of the funds shall be prorated in the proportion that the assessed value of the real property of the territory so excluded bore to the total assessed value of the real property in the district immediately prior to the exclusion.
Ca. Health and Saf. Code § 4903