Provider cannot remove an existing discount in PBA Control Panel, the following error message is displayed:
Discount <ID> cannot be deleted because it is in use. Before deletion the discount should be detached from all of the objects discounted. To check the discount relations, click on its ID.
However, Provider checked all options in a discount and no objects are bound to it:
- Customer Classes
- Discounted Subscription Periods
- Discounted Plans
- Discounted Resources
A discount is assigned to objects which are not listed in a discount properties - existing customers' orders. If a discount was applied to a customer purchase (order) it is referenced in order details in PBA database and cannot be deleted due to database constraints.
In general, PBA does not allow to delete any billing-related object from database to keep database consistent.
Just deactivate the discount you do not want to give to customers anymore instead of removing it.