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

This commit is contained in:
Laurent Destailleur
2025-10-24 19:46:38 +02:00
27 changed files with 168 additions and 116 deletions

View File

@@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
*/
// Load translation files required by the page
$langs->loadLangs(array("install", "other", "admin", "products"));
$langs->loadLangs(array("install", "other", "admin", "products", "mrp"));
if (!$user->admin) {
accessforbidden();
@@ -614,6 +614,27 @@ if ($resql) {
print '<br>';
$db->free($resql);
}
// Bom combo list
$sql = "SELECT COUNT(*) as nb";
$sql .= " FROM ".$db->prefix()."bom_bom as s";
$resql = $db->query($sql);
if ($resql) {
$limitforoptim = 5000;
$num = $db->num_rows($resql);
$obj = $db->fetch_object($resql);
$nb = $obj->nb;
if ($nb > $limitforoptim) {
if (!getDolGlobalString('BOM_USE_SEARCH_TO_SELECT')) {
print img_picto('', 'warning.png', 'class="pictofixedwidth"').' '.$langs->trans("YouHaveXObjectUseComboOptim", $nb, $langs->transnoentitiesnoconv("Bom"), 'BOM_USE_SEARCH_TO_SELECT');
} else {
print img_picto('', 'tick.png', 'class="pictofixedwidth"').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("Bom"), 'BOM_USE_SEARCH_TO_SELECT', getDolGlobalString('BOM_USE_SEARCH_TO_SELECT'));
}
} else {
print img_picto('', 'tick.png', 'class="pictofixedwidth"').' '.$langs->trans("NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv("Bom"));
}
print '<br>';
$db->free($resql);
}
print '</div>';