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

This commit is contained in:
Laurent Destailleur 2022-04-14 15:28:25 +02:00
commit 909766828e
2 changed files with 10 additions and 3 deletions

View File

@ -1690,7 +1690,11 @@ class Product extends CommonObject
$testExit = array('multiprices','multiprices_ttc','multiprices_base_type','multiprices_min','multiprices_min_ttc','multiprices_tva_tx','multiprices_recuperableonly'); $testExit = array('multiprices','multiprices_ttc','multiprices_base_type','multiprices_min','multiprices_min_ttc','multiprices_tva_tx','multiprices_recuperableonly');
foreach ($testExit as $field) { foreach ($testExit as $field) {
if (!isset($this->$field[$level])) { if (!isset($this->$field)) {
return array();
}
$tmparray = $this->$field;
if (!isset($tmparray[$level])) {
return array(); return array();
} }
} }

View File

@ -1,6 +1,7 @@
<?php <?php
/* Copyright (C) - 2013-2015 Jean-François FERRY <jfefe@aternatik.fr> /* Copyright (C) - 2013-2015 Jean-François FERRY <jfefe@aternatik.fr>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -224,9 +225,11 @@ class FormResource
$value = ($maxlength ?dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']); $value = ($maxlength ?dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']);
} elseif ($format == 3) { } elseif ($format == 3) {
$value = $arraytypes['code']; $value = $arraytypes['code'];
} elseif (empty($value)) {
print '&nbsp;';
} }
if (empty($value)) {
$value = '&nbsp;';
}
print $value;
print '</option>'; print '</option>';
} }
} }