Merge pull request #10821 from OPEN-DSI/fix-select-measuring-units

Fix measure unit id in select options
This commit is contained in:
Laurent Destailleur 2019-03-14 14:10:13 +01:00 committed by GitHub
commit 3c40d5d30c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,8 +337,8 @@ class FormProduct
$return .= '<option value="0">' . $langs->trans("Default") . '</option>';
foreach ($measuringUnits->records as $lines) {
$return .= '<option value="' . $lines->code . '"';
if ($lines->code == $default) {
$return .= '<option value="' . $lines->id . '"';
if ($lines->id == $default) {
$return .= ' selected';
}
// $return.= '>'.$value.'</option>';