Merge pull request #24705 from mrbidon/develop

Add hidden option COMPANY_AQUARIUM_NO_PREFIX to ignore PREFIX
This commit is contained in:
Laurent Destailleur
2023-05-16 20:55:35 +02:00
committed by GitHub
2 changed files with 13 additions and 2 deletions

View File

@@ -61,8 +61,14 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
if (!isset($conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER) || trim($conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER) == '') {
$conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER = '401';
}
$this->prefixcustomeraccountancycode = $conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER;
$this->prefixsupplieraccountancycode = $conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER;
if (!empty($conf->global->COMPANY_AQUARIUM_NO_PREFIX)) {
$this->prefixcustomeraccountancycode = '';
$this->prefixsupplieraccountancycode = '';
} else {
$this->prefixcustomeraccountancycode = $conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER;
$this->prefixsupplieraccountancycode = $conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER;
}
}
@@ -102,6 +108,10 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
if (!empty($conf->global->COMPANY_AQUARIUM_CLEAN_REGEX)) {
$texte .= $langs->trans('COMPANY_AQUARIUM_CLEAN_REGEX').' = '.$conf->global->COMPANY_AQUARIUM_CLEAN_REGEX."<br>\n";
}
if (!empty($conf->global->COMPANY_AQUARIUM_NO_PREFIX)) {
$texte .= $langs->trans('COMPANY_AQUARIUM_NO_PREFIX').' = '.$conf->global->COMPANY_AQUARIUM_NO_PREFIX."<br>\n";
}
$texte .= '</td>';
$texte .= '<td class="right"><input type="submit" class="button button-edit reposition" name="modify" value="'.$langs->trans("Modify").'"></td>';
$texte .= '</tr></table>';

View File

@@ -2086,6 +2086,7 @@ EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous fiel
SeveralLangugeVariatFound=Several language variants found
RemoveSpecialChars=Remove special characters
COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX)
COMPANY_AQUARIUM_NO_PREFIX=Do not use prefix, only copy customer or supplier code
COMPANY_DIGITARIA_CLEAN_REGEX=Regex filter to clean value (COMPANY_DIGITARIA_CLEAN_REGEX)
COMPANY_DIGITARIA_UNIQUE_CODE=Duplicate not allowed
RemoveSpecialWords=Clean certain words when generating sub-accounts for customers or suppliers