NEW Accountancy - Add centralized account (SQL & migration part) #33384
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#33362
See this discussion (in french) for an explanation of this functionality.
https://www.dolibarr.fr/forum/t/cloture-dannee-bookkeepingrecordalreadyexists/48658/23?u=aspangaro-inovea
Discussion is about accountancy annual closure
For reasons of compatibility with other software, you must avoid empty auxiliary accounts in what are known as centralizing accounts, which group together employees (421xxx), customers (411xxx), suppliers (401xxx) and expense accounts since v20 (425xxx).
However, we don't identify these centralizing accounts in Dolibarr, as they are accounts that require an attached auxiliary. If they were identified with a simple option, scripts could be adapted to check whether an auxiliary account has been declared if a centralizing account is used. This applies to both manual and automatic entries.
Another problem is that our sub-ledger accounts don't know their centralizer and are therefore transverse. If we use the 401 account and the 9ASSODOLIBARR sub-ledger account, we can use it on the 411 account and it won't make any difference; when we view it in the general ledger, we'll see the two operations in the same sub-ledger account, even though they have nothing to do with each other.
Closing with sub-ledger details either can't work without this, or is complex to correct.
A final point that has long been a problem: if Dolibarr doesn't have an auxiliary on a transaction, it reuses the G/L account as an auxiliary. You end up with 411 / 411... An auxiliary account that doesn't exist...
If the accounting numerator for third parties is not set up, it's a disaster! In most cases, this means a complete overhaul of the accounting integration