...
When an Accounting Periods Object Invoicing Closed field is and Accounting Closed fields are marked as true a Validation runs to check if there are open pre-invoices assigned to this Accounting Period (Invoice__c.AccountingPeriod__c). If there’s no pre-invoice assigned, it saves the changes to the Accounting Period. And shows an error message if there are open pre-invoices and restricts it from closing.
...