Merge pull request #24416 from aspangaro/18a6

In FR, activate constant INVOICE_DISABLE_REPLACEMENT by default
This commit is contained in:
Laurent Destailleur 2023-04-04 21:46:29 +02:00 committed by GitHub
commit c6feb3c78a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -227,6 +227,12 @@ if (!defined('NOREQUIREDB') && !defined('NOREQUIRESOC')) {
// For FR, default value of option to show category of operations is on by default. Decret n°2099-1299 2022-10-07
$conf->global->INVOICE_CATEGORY_OF_OPERATION = 1;
}
if ($mysoc->country_code == 'FR' && !isset($conf->global->INVOICE_DISABLE_REPLACEMENT)) {
// For FR, the replacement invoice type is not allowed.
// From an accounting point of view, this creates holes in the numbering of the invoice.
// This is very problematic during a fiscal control.
$conf->global->INVOICE_DISABLE_REPLACEMENT = 1;
}
if ($mysoc->localtax1_assuj || $mysoc->localtax2_assuj) {
// For countries using the 2nd or 3rd tax, we disable input/edit of lines using the price including tax (because 2nb and 3rd tax not yet taken into account).