Merge pull request #14864 from aspangaro/13a20

FIX If salaries subledger account not defined, put only in the general account
This commit is contained in:
Laurent Destailleur 2020-10-01 19:29:29 +02:00 committed by GitHub
commit ab68d3febe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 21 deletions

View File

@ -101,22 +101,6 @@ if ($conf->societe->enabled) {
/* /*
* Actions * Actions
*/ */
$accounting_mode = empty($conf->global->ACCOUNTING_MODE) ? 'RECETTES-DEPENSES' : $conf->global->ACCOUNTING_MODE;
if (GETPOST('change_chart', 'alpha'))
{
$chartofaccounts = GETPOST('chartofaccounts', 'int');
if (!empty($chartofaccounts)) {
if (!dolibarr_set_const($db, 'CHARTOFACCOUNTS', $chartofaccounts, 'chaine', 0, '', $conf->entity)) {
$error++;
}
} else {
$error++;
}
}
if ($action == 'update') { if ($action == 'update') {
$error = 0; $error = 0;

View File

@ -237,7 +237,7 @@ if ($result) {
); );
// Set accountancy code for user // Set accountancy code for user
$compta_user = (!empty($obj->accountancy_code) ? $obj->accountancy_code : $account_employee); $compta_user = (!empty($obj->accountancy_code) ? $obj->accountancy_code : '');
$tabuser[$obj->rowid] = array( $tabuser[$obj->rowid] = array(
'id' => $obj->userid, 'id' => $obj->userid,