Skip to content
Snippets Groups Projects
Commit 67d90d9d authored by Regis Houssin's avatar Regis Houssin
Browse files

Merge pull request #292 from atm-maxime/mko185

Mko185
parents 58878cdb c2b38e84
Branches
Tags
No related merge requests found
......@@ -33,6 +33,7 @@ StockCorrection=Corriger stock
StockMovement=Transférer
StockMovements=Mouvements de stock
NumberOfUnit=Nombre de pièces
UnitPurchaseValue=Prix d'achat unitaire
TotalStock=Total en stock
StockTooLow=Stock insuffisant
EnhancedValue=Valorisation
......
......@@ -74,7 +74,8 @@ if ($action == 'setstocklimit')
// Correct stock
if ($action == "correct_stock" && ! $_POST["cancel"])
{
if (is_numeric($_POST["nbpiece"]) && $id)
if ($_POST["price"] == '') $_POST["price"] = 0;
if (is_numeric($_POST["nbpiece"]) && $id && is_numeric($_POST["price"]))
{
$product = new Product($db);
$result=$product->fetch($id);
......@@ -85,7 +86,7 @@ if ($action == "correct_stock" && ! $_POST["cancel"])
$_POST["nbpiece"],
$_POST["mouvement"],
$_POST["label"],
0
$_POST["price"]
); // We do not change value of stock for a correction
if ($result > 0)
......@@ -350,9 +351,10 @@ if ($_GET["id"] || $_GET["ref"])
// Label
print '<tr>';
print '<td width="20%">'.$langs->trans("Label").'</td>';
print '<td colspan="4">';
print '<td colspan="2">';
print '<input type="text" name="label" size="40" value="">';
print '</td>';
print '<td width="20%">'.$langs->trans("UnitPurchaseValue").'</td><td width="20%"><input class="flat" name="price" size="10" value=""></td>';
print '</tr>';
print '</table>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment