task #185 : Can input HT amount when correcting stock to recalculate PMP
This commit is contained in:
parent
1b2e6aa5e4
commit
e8a3af017e
@ -33,6 +33,7 @@ StockCorrection=Corriger stock
|
|||||||
StockMovement=Transférer
|
StockMovement=Transférer
|
||||||
StockMovements=Mouvements de stock
|
StockMovements=Mouvements de stock
|
||||||
NumberOfUnit=Nombre de pièces
|
NumberOfUnit=Nombre de pièces
|
||||||
|
UnitPurchaseValue=Prix d'achat unitaire
|
||||||
TotalStock=Total en stock
|
TotalStock=Total en stock
|
||||||
StockTooLow=Stock insuffisant
|
StockTooLow=Stock insuffisant
|
||||||
EnhancedValue=Valorisation
|
EnhancedValue=Valorisation
|
||||||
|
|||||||
@ -74,6 +74,7 @@ if ($action == 'setstocklimit')
|
|||||||
// Correct stock
|
// Correct stock
|
||||||
if ($action == "correct_stock" && ! $_POST["cancel"])
|
if ($action == "correct_stock" && ! $_POST["cancel"])
|
||||||
{
|
{
|
||||||
|
if ($_POST["price"] == '') $_POST["price"] = 0;
|
||||||
if (is_numeric($_POST["nbpiece"]) && $id)
|
if (is_numeric($_POST["nbpiece"]) && $id)
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
@ -85,7 +86,7 @@ if ($action == "correct_stock" && ! $_POST["cancel"])
|
|||||||
$_POST["nbpiece"],
|
$_POST["nbpiece"],
|
||||||
$_POST["mouvement"],
|
$_POST["mouvement"],
|
||||||
$_POST["label"],
|
$_POST["label"],
|
||||||
0
|
$_POST["price"]
|
||||||
); // 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)
|
||||||
@ -350,9 +351,10 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
// Label
|
// Label
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td width="20%">'.$langs->trans("Label").'</td>';
|
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 '<input type="text" name="label" size="40" value="">';
|
||||||
print '</td>';
|
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 '</tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user