This commit is contained in:
florian HENRY 2019-02-13 12:32:06 +01:00
parent de87321c15
commit 37c66c2ece
2 changed files with 17 additions and 19 deletions

View File

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

View File

@ -227,13 +227,10 @@ if ($action == "correct_stock")
); // We do not change value of stock for a correction
}
if ($result > 0)
{
if ($result > 0) {
header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
exit;
}
else
{
exit();
} else {
$error ++;
setEventMessages($product->error, $product->errors, 'errors');
$action = 'correction';