Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0

Conflicts:
	htdocs/product/stock/class/mouvementstock.class.php
This commit is contained in:
Laurent Destailleur 2023-07-24 23:02:31 +02:00
commit 111b2bc72b
2 changed files with 6 additions and 4 deletions

View file

@ -971,15 +971,17 @@ class MouvementStock extends CommonObject
require_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php';
$origin = new Inventory($this->db);
break;
default:
if ($origin_type) {
// Separate originetype with "@" : left part is class name, right part is module name
$origin_type_array = explode('@', $origin_type);
$classname = ucfirst($origin_type_array[0]);
$classname = $origin_type_array[0];
$modulename = empty($origin_type_array[1]) ? strtolower($classname) : $origin_type_array[1];
$result = dol_include_once('/'.$modulename.'/class/'.strtolower($classname).'.class.php');
$result = dol_include_once('/'.$modulename.'/class/'.$classname.'.class.php');
if ($result) {
$classname = ucfirst($classname);
$origin = new $classname($this->db);
}
}

View file

@ -2154,7 +2154,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";