Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
fb2f57be71
2 changed files with 16 additions and 3 deletions
|
|
@ -18,7 +18,7 @@
|
|||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020 Open-Dsi <support@open-dsi.fr>
|
||||
* Copyright (C) 2022 ButterflyOfFire <butterflyoffire+dolibarr@protonmail.com>
|
||||
* Copyright (C) 2023 Alexandre Janniaux <alexandre.janniaux@gmail.com>
|
||||
* Copyright (C) 2023-2024 Alexandre Janniaux <alexandre.janniaux@gmail.com>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
@ -1319,7 +1319,7 @@ class Societe extends CommonObject
|
|||
$vallabel = $this->$keymin;
|
||||
|
||||
if ($i > 0) {
|
||||
if ($this->isACompany()) {
|
||||
if ($mysoc != null && $this->isACompany()) {
|
||||
// Check for mandatory prof id (but only if country is same than ours)
|
||||
if ($mysoc->country_id > 0 && $this->country_id == $mysoc->country_id) {
|
||||
$idprof_mandatory = 'SOCIETE_'.$key.'_MANDATORY';
|
||||
|
|
|
|||
|
|
@ -61,7 +61,12 @@ function productAttributePrepareHead($object)
|
|||
*/
|
||||
function adminProductAttributePrepareHead()
|
||||
{
|
||||
global $langs, $conf;
|
||||
global $langs, $conf, $db;
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->fetch_name_optionals_label('product_attribute');
|
||||
$extrafields->fetch_name_optionals_label('product_attribute_value');
|
||||
|
||||
$langs->load("products");
|
||||
|
||||
$h = 0;
|
||||
|
|
@ -74,11 +79,19 @@ function adminProductAttributePrepareHead()
|
|||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/variants/admin/product_attribute_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ProductAttributeExtrafields");
|
||||
$nbExtrafields = $extrafields->attributes['product_attribute']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbExtrafields . '</span>';
|
||||
}
|
||||
$head[$h][2] = 'product_attribute';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/variants/admin/product_attribute_value_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ProductAttributeValueExtrafields");
|
||||
$nbExtrafields = $extrafields->attributes['product_attribute_value']['count'];
|
||||
if ($nbExtrafields > 0) {
|
||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbExtrafields . '</span>';
|
||||
}
|
||||
$head[$h][2] = 'product_attribute_value';
|
||||
$h++;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue