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

develop
This commit is contained in:
Laurent Destailleur
2024-03-14 22:38:31 +01:00
parent 0c5d5fe671
commit e12faaa663

View File

@@ -9728,14 +9728,14 @@ function dol_osencode($str)
* Return an id or code from a code or id.
* Store also Code-Id into a cache to speed up next request on same key.
*
* @param DoliDB $db Database handler
* @param string $key Code or Id to get Id or Code
* @param string $tablename Table name without prefix
* @param string $fieldkey Field to search the key into
* @param string $fieldid Field to get
* @param int $entityfilter Filter by entity
* @param string $filters Filters to add. WARNING: string must be escaped for SQL and not coming from user input.
* @return int<-1,max> ID of code if OK, 0 if key empty, -1 if KO
* @param DoliDB $db Database handler
* @param string $key Code or Id to get Id or Code
* @param string $tablename Table name without prefix
* @param string $fieldkey Field to search the key into
* @param string $fieldid Field to get
* @param int $entityfilter Filter by entity
* @param string $filters Filters to add. WARNING: string must be escaped for SQL and not coming from user input.
* @return int<-1,max>|string ID of code if OK, 0 if key empty, -1 if KO
* @see $langs->getLabelFromKey
*/
function dol_getIdFromCode($db, $key, $tablename, $fieldkey = 'code', $fieldid = 'id', $entityfilter = 0, $filters = '')