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) if ($adddefault)
$return .= '<option value="0">' . $langs->trans("Default") . '</option>'; $return .= '<option value="0">' . $langs->trans("Default") . '</option>';
foreach ( $measuringUnits->records as $lines ) { foreach ($measuringUnits->records as $lines)
{
$return .= '<option value="' . $lines->code . '"'; $return .= '<option value="' . $lines->code . '"';
if ($key == $default) { if ($key == $default) {
$return .= ' selected'; $return .= ' selected';

View File

@ -227,17 +227,14 @@ if ($action == "correct_stock")
); // We do not change value of stock for a correction ); // We do not change value of stock for a correction
} }
if ($result > 0) if ($result > 0) {
{ header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit();
exit; } else {
} $error ++;
else setEventMessages($product->error, $product->errors, 'errors');
{ $action = 'correction';
$error++; }
setEventMessages($product->error, $product->errors, 'errors');
$action='correction';
}
} }
if (! $error) $action=''; if (! $error) $action='';
@ -341,9 +338,9 @@ if ($action == "transfert_stock" && ! $cancel)
1, 1,
GETPOST("label", 'san_alpha'), GETPOST("label", 'san_alpha'),
$pricesrc, $pricesrc,
$eatby,$sellby,$batch, $eatby, $sellby, $batch,
GETPOST('inventorycode') GETPOST('inventorycode')
); );
// Add stock // Add stock
$result2=$product->correct_stock_batch( $result2=$product->correct_stock_batch(
$user, $user,
@ -352,9 +349,9 @@ if ($action == "transfert_stock" && ! $cancel)
0, 0,
GETPOST("label", 'san_alpha'), GETPOST("label", 'san_alpha'),
$pricedest, $pricedest,
$eatby,$sellby,$batch, $eatby, $sellby, $batch,
GETPOST('inventorycode') GETPOST('inventorycode')
); );
} }
} }
else else
@ -556,7 +553,7 @@ if ($resql)
$texte = $langs->trans("ListOfStockMovements"); $texte = $langs->trans("ListOfStockMovements");
if ($id) $texte.=' ('.$langs->trans("ForThisWarehouse").')'; if ($id) $texte.=' ('.$langs->trans("ForThisWarehouse").')';
} }
llxHeader("",$texte,$help_url); llxHeader("", $texte, $help_url);
/* /*
* Show tab only if we ask a particular warehouse * Show tab only if we ask a particular warehouse
@ -637,7 +634,7 @@ if ($resql)
print '<tr><td>'.$langs->trans("LastMovement").'</td><td>'; print '<tr><td>'.$langs->trans("LastMovement").'</td><td>';
if ($lastmovementdate) if ($lastmovementdate)
{ {
print dol_print_date($lastmovementdate,'dayhour'); print dol_print_date($lastmovementdate, 'dayhour');
} }
else else
{ {
@ -744,7 +741,7 @@ if ($resql)
if ($sall) if ($sall)
{ {
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall).'</div>'; print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall) . join(', ', $fieldstosearchall).'</div>';
} }
$moreforfilter=''; $moreforfilter='';