Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW Accountancy - Add centralized account (SQL & migration part) #33384

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

aspangaro
Copy link
Member

@aspangaro aspangaro commented Mar 9, 2025

#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

@alexandre-janniaux
Copy link
Contributor

Looks good to me for this MR, but either some form of the repair.php part might become needed at some point, which I find it hard to do (modifying accounting data that might be locked), or we need to also have an additional field on fiscal_period to indicate whether we want to apply the (future) rule or not.

@aspangaro
Copy link
Member Author

I'm sorry @alexandre-janniaux , but I don't understand why I'm going to change the anteriority of the data. As far as I'm concerned, this applies from the new version (v22 if PR accepted) and in terms of code, you'll have to make a page listing the problems, centralizing accounts that don't have a declared auxiliary or auxiliaries that don't have the right centralizer.

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Mar 11, 2025
@aspangaro aspangaro added PR OK to merge PR was analyzed by PR merger and seems ok to be validated. Merge may occurs soon... and removed Discussion Some questions or discussions are opened and wait answers of author or other people to be processed labels Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR OK to merge PR was analyzed by PR merger and seems ok to be validated. Merge may occurs soon...
Projects
Status: Review in progress
Development

Successfully merging this pull request may close these issues.

3 participants