Merge pull request #22589 from OPEN-DSI/develop_fix_get_origin_on_movement_stock

FIX: Fix the function get_origin() on MouvementStock class for general case
This commit is contained in:
Laurent Destailleur 2022-10-25 19:51:15 +02:00 committed by GitHub
commit 4a9fc9296b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -976,7 +976,7 @@ class MouvementStock extends CommonObject
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 = strtolower($origin_type_array[0]);
$modulename = empty($origin_type_array[1]) ? $classname : $origin_type_array[1];
$result = dol_include_once('/'.$modulename.'/class/'.strtolower($classname).'.class.php');
if ($result) {