REPORT STANDARD FIX: BIC requirement is now checked separately from IBAN #515
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.
REPORT STANDARD
FIX|BIC requirement is now checked separately from IBAN
Currently, the same function is used top check is an IBAN is required and if a BIC is required:
The needIBAN() function checks if the country is among a list of countries to decide if the field IBAN can be left blank or not.
I've added a needBIC() function which works the same way but for BIC/SWIFT since the list of countries where the BIC is mandatory is different than for IBAN (ex: Belgium requires an IBAN but not a BIC)
I've based the list on these sources:
https://www.westernunion.com/fr/fr/swift-bic-codes.html
https://qonto.com/fr/swift-codes
HOWEVER: I still added France to the list so in order to change as little as possible the way it has been working in dolibarr, even if technically BIC isn't mandatory in France.