(1) Any person who admits that he or she has committed crimes in the county in which he or she is in custody and also in another county in this state may apply to the district attorney of the county in which he or she is in custody to be charged with those crimes so that the person may plead guilty and be sentenced for them in the county of custody. The application shall contain a description of all admitted crimes and the name of the county in which each was committed.(2) Upon receipt of the application the district attorney shall prepare an information charging all the admitted crimes and naming in each count the county where each was committed. The district attorney shall send a copy of the information to the district attorney of each other county in which the defendant admits he or she committed crimes, together with a statement that the defendant has applied to plead guilty in the county of custody. Upon receipt of the information and statement, the district attorney of the other county may execute a consent in writing allowing the defendant to enter a plea of guilty in the county of custody, to the crime charged in the information and committed in the other county, and send it to the district attorney who prepared the information.(3) The district attorney shall file the information in any court of the district attorney's county having jurisdiction to try or accept a plea of guilty to the most serious crime alleged therein as to which, if alleged to have been committed in another county, the district attorney of that county has executed a consent as provided in sub. (2). The defendant then may enter a plea of guilty to all offenses alleged to have been committed in the county where the court is located and to all offenses alleged to have been committed in other counties as to which the district attorney has executed a consent under sub. (2). Before entering a plea of guilty, the defendant shall waive in writing any right to be tried in the county where the crime was committed. The district attorney of the county where the crime was committed need not be present when the plea is made but the district attorney's written consent shall be filed with the court.(4) Thereupon the court shall enter such judgment, the same as though all the crimes charged were alleged to have been committed in the county where the court is located, whether or not the court has jurisdiction to try all those crimes to which the defendant has pleaded guilty under this section.(5) The county where the plea is made shall pay the costs of prosecution if the defendant does not pay them, and is entitled to retain fees for receiving and paying to the state any fine which may be paid by the defendant. The clerk where the plea is made shall file a copy of the judgment of conviction with the clerk in each county where a crime covered by the plea was committed. The district attorney shall then move to dismiss any charges covered by the plea of guilty, which are pending against the defendant in the district attorney's county, and the same shall thereupon be dismissed. It was not error for the court to accept a plea before an amended complaint was filed when the defendant waived the late filing and was not prejudiced thereby. Failure to prepare an amended information prior to obtaining consents by the district attorneys involved did not invalidate the conviction when the consents were actually obtained and the defendant waived the defect. Failure to dismiss the charges in one of the counties did not deprive the court of jurisdiction. Failure of a district attorney to specifically consent to one offense did not invalidate the procedure when the error was clerical. Peterson v. State, 54 Wis. 2d 370, 195 N.W.2d 837 (1972). Although the statute requires a plea of guilty to both the primary case and the case being consolidated, it is a logical extension to allow the defendant to ask for the consolidation of a case from another county to which a guilty plea has been entered with a case in which guilt was found by the court. State v. Rachwal, 159 Wis. 2d 494, 465 N.W.2d 490 (1991). In a consolidated case, amendment of the charges from another county is not permissible. When amendment of those charges occurs after consolidation, the original trial court retains jurisdiction. If the original charge does not have the identical elements of the amended charge, double jeopardy does not prevent prosecution of the original charge in the original county although a guilty plea was entered to the amended charge in the other court. State v. Dillon, 187 Wis. 2d 39, 522 N.W.2d 530 (Ct. App. 1994).