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

refactor: use common functionality to validate account number (backport #42842) #43314

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 21, 2024

Please provide enough information so that others can review your pull request:

In France we have chart of account where the same Account number can be use as Liability or as Asset ( the root_type do not exists like that but in France, it imply other definition and meaning but we try to find a way to allow proper French accountancy in ERPNext)

We can understand that add root_type to the check the uniqueness of a Account number may not please all country accountancy rules.
So we can also change the PR to always send root_type as parameters and not use it for standard/core test of uniqueness but add @erpnext.allow_regional on the validate_account_number() function.
Like that we can override it in ERPNext France app

Explain the details for making this change. What existing problem does the pull request solve?

This PR make two changes :

Use the same method/function on Account creation as on Account update to check the validity of the account number
Send root_type as parameters to validate_account_number() to check account number uniqueness by company and root_type

no-docs

Following #42279


This is an automatic backport of pull request #42842 done by Mergify.

feat: Allow unique Account number by root type (not unique for accros all Accounts)
(cherry picked from commit 40d97f4)
@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Sep 21, 2024
@vorasmit vorasmit merged commit d1c72dc into version-15-hotfix Sep 21, 2024
12 checks passed
@vorasmit vorasmit deleted the mergify/bp/version-15-hotfix/pr-42842 branch September 21, 2024 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants