16.0 urgent fix societe class (#25443)

* Fix : set_as_client can't use prospect/customer value if disabled (#25380)

* fix missing { on societe.class.php

---------

Co-authored-by: Maxime Kohlhaas <maxime@atm-consulting.fr>
This commit is contained in:
Eric 2023-07-24 19:22:54 +02:00 committed by GitHub
parent 22becb2ff4
commit e9d6a28e66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2177,7 +2177,7 @@ class Societe extends CommonObject
// phpcs:enable
if ($this->id) {
$newclient = 1;
if ($this->client == 2 || $this->client == 3) {
if (($this->client == 2 || $this->client == 3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) {
$newclient = 3; //If prospect, we keep prospect tag
}
$sql = "UPDATE ".MAIN_DB_PREFIX."societe";