If the contract of a basket is inactive, it is not displayed in the dropdown list on the basket edit view. The info is lost if the form is saved. A fix for main has been provided in 'Bug 39711: (bugfix) Show contract of the basket if inactive'