When is this activated?
The average payment term is calculated as the difference in days between invoice date and paid date of each invoice in the archive.
The calculation does not apply to payments and credit notes. All days are added together and then divided by the number of invoices in the archive.
- Use a limited archive to do this calculation: instead of all documents in the archive, only use documents that were archived in the last X months
- If the export from your source system does not contain a paid_at_date tag for each archived document, the paid_at_date will always be empty, so the calculation fails. To fix this, we could fill the paid date automatically with the archived date.