If you delete a sales code, all of the entries on invoices where the sales code has been used have the entry reset to "None".It would make much more sense to allow the user to re-allocate those lines to a different sales code should they wish.
You won't be notified about changes to this idea.