If the Bill Run process pulls charges from terminated customer licences, please check whether there have been any changes made to the termination date and whether that date coincides with the service dates on offices and contract services.
You can check changes to the Licence termination date by viewing the Licence record then selecting See Events.
Access the Office or Contract Service for which charges are being applied, then check the From and To dates on it. The To date here should not exceed the main Licence termination date. If you notice that this is the case, then this is why the charge has been applied.
To correct the charge:
Check the pre-bill run report (Reports > Pre-Bill Run) up until the end of the licence (or at least a couple of years in advance if the licence spans over more than 3 years) and make sure all items are correct and appear as expected.
If there are any inconsistencies on the report, then go back to the licence, check the item, edit it and ensure the billing dates are correct, save, then re-run the pre-bill run report.
Remove the charge from the Draft Invoice or raise a Credit Note if the Invoice has already been approved.