mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -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>';
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user