diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 04856a3fe5c..f97e72c959d 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1575,7 +1575,7 @@ function complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tab */ function activateModulesRequiredByCountry($country_code) { - global $db, $conf, $langs; + global $db; $modulesdir = dolGetModulesDirs(); diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 0c0d61400e1..782f388df43 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -6167,22 +6167,22 @@ class Product extends CommonObject /** * Adjust stock in a warehouse for product with batch number * - * @param User $user user asking change - * @param int $id_entrepot id of warehouse - * @param float $nbpiece nb of units (should be always positive, use $movement to decide if we add or remove) - * @param int<0,1> $movement 0 = add, 1 = remove - * @param string $label Label of stock movement - * @param int|float $price Price to use for stock eval - * @param int|string $dlc eat-by date - * @param int|string $dluo sell-by date - * @param string $lot Lot number - * @param string $inventorycode Inventory code - * @param string $origin_element Origin element type - * @param ?int $origin_id Origin id of element - * @param int $disablestockchangeforsubproduct Disable stock change for sub-products of kit (useful only if product is a subproduct) - * @param ?ExtraFields $extrafields Array of extrafields - * @param boolean $force_update_batch Force update batch - * @return int Return integer <0 if KO, >0 if OK + * @param User $user User asking change + * @param int $id_entrepot Id of warehouse + * @param float $nbpiece Nb of units (should be always positive, use $movement to decide if we add or remove) + * @param int<0,1> $movement 0 = add, 1 = remove + * @param string $label Label of stock movement + * @param int|float $price Price to use for stock eval + * @param int|string $dlc eat-by date + * @param int|string $dluo sell-by date + * @param string $lot Lot number + * @param string $inventorycode Inventory code + * @param string $origin_element Origin element type + * @param ?int $origin_id Origin id of element + * @param int $disablestockchangeforsubproduct Disable stock change for sub-products of kit (useful only if product is a subproduct) + * @param ?ExtraFields $extrafields Array of extrafields + * @param boolean $force_update_batch Force update batch + * @return int Return integer <0 if KO, >0 if OK */ public function correct_stock_batch($user, $id_entrepot, $nbpiece, $movement, $label = '', $price = 0, $dlc = '', $dluo = '', $lot = '', $inventorycode = '', $origin_element = '', $origin_id = null, $disablestockchangeforsubproduct = 0, $extrafields = null, $force_update_batch = false) { diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 4492f47b215..1680c20293a 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -434,7 +434,7 @@ if ($action == "transfert_stock" && !$cancel && $usercanupdatestock) { (float) $nbpiece, 1, GETPOST("label", 'alphanohtml'), - $pricesrc, + (float) $pricesrc, $eatby, $sellby, $batch, @@ -452,7 +452,7 @@ if ($action == "transfert_stock" && !$cancel && $usercanupdatestock) { (float) $nbpiece, 0, GETPOST("label", 'alphanohtml'), - $pricedest, + (float) $pricedest, $eatby, $sellby, (string) $batch, @@ -486,7 +486,7 @@ if ($action == "transfert_stock" && !$cancel && $usercanupdatestock) { (float) $nbpiece, 0, GETPOST("label", 'alphanohtml'), - $pricedest, + (float) $pricedest, GETPOST('inventorycode', 'alphanohtml') ); if ($result2 < 0) {