Can't delete unused financial types
Overview
Not a regression!
Financial types associated with quick config price sets can never be deleted.
Reproduction steps
- Create a new financial type.
- Create a new event.
- Select the financial type as the default for the event and save.
- Delete the event.
- Delete the financial type.
Current behaviour
Obtuse error.
The following tables have an entry for this financial type: CRM_Price_DAO_PriceSet, CRM_Price_DAO_PriceFieldValue
Expected behaviour
Financial type should be deletable.
When the warning Deleting this event will also delete associated Event Registration Page and Event Fee configurations. This action cannot be undone. Do you want to continue?
appears - continuing should delete the price set if it's a quick-config. But since I hope quick config dies a painful death, let's generalize to "deleting an event
Comments
Tangentially - you can't delete a price set that has any payments associated with it. This should be doable IMO and I believe is an artifact of pre-CiviAccounts (Civi 4.3) behavior when line items didn't exist.