Modif look
This commit is contained in:
parent
edcbaed6d1
commit
4a8d7fc4cc
@ -39,8 +39,11 @@ if ($_POST["action"] == "create_stock")
|
|||||||
$product->create_stock($_POST["id_entrepot"], $_POST["nbpiece"]);
|
$product->create_stock($_POST["id_entrepot"], $_POST["nbpiece"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == "correct_stock")
|
if ($_POST["action"] == "correct_stock" && $_POST["cancel"] <> "Annuler")
|
||||||
{
|
{
|
||||||
|
if (is_numeric($_POST["nbpiece"]))
|
||||||
|
{
|
||||||
|
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
$product->id = $_GET["id"];
|
$product->id = $_GET["id"];
|
||||||
$product->correct_stock($user,
|
$product->correct_stock($user,
|
||||||
@ -48,28 +51,36 @@ if ($_POST["action"] == "correct_stock")
|
|||||||
$_POST["nbpiece"],
|
$_POST["nbpiece"],
|
||||||
$_POST["mouvement"]);
|
$_POST["mouvement"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($cancel == 'Annuler')
|
|
||||||
{
|
|
||||||
$action = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if ($_GET["id"])
|
if ($_GET["id"])
|
||||||
{
|
{
|
||||||
if ($action <> 're-edit')
|
|
||||||
{
|
|
||||||
$product = new Product($db);
|
|
||||||
$result = $product->fetch($_GET["id"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $result )
|
$product = new Product($db);
|
||||||
{
|
|
||||||
if ($action <> 'edit' && $action <> 're-edit')
|
if ( $product->fetch($_GET["id"]))
|
||||||
{
|
{
|
||||||
|
$head[0][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
|
||||||
|
$head[0][1] = 'Fiche';
|
||||||
|
|
||||||
|
$head[1][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id;
|
||||||
|
$head[1][1] = 'Prix';
|
||||||
|
$h = 2;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id;
|
||||||
|
$head[$h][1] = 'Stock';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id;
|
||||||
|
$head[$h][1] = 'Statistiques';
|
||||||
|
|
||||||
|
dolibarr_fiche_head($head, 2, 'Fiche '.$types[$product->type].' : '.$product->ref);
|
||||||
|
|
||||||
|
print($mesg);
|
||||||
|
|
||||||
print_fiche_titre('Fiche stock : '.$product->ref, $mesg);
|
print_fiche_titre('Fiche stock : '.$product->ref, $mesg);
|
||||||
|
|
||||||
@ -116,11 +127,9 @@ if ($_GET["id"])
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>Stock seuil</td><td>'.$product->seuil_stock_alerte.'</td></tr>';
|
print '<tr><td>Stock seuil</td><td>'.$product->seuil_stock_alerte.'</td></tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* Contenu des stocks
|
* Contenu des stocks
|
||||||
*
|
*
|
||||||
@ -148,6 +157,7 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
print '</div>';
|
||||||
/*
|
/*
|
||||||
* Correction du stock
|
* Correction du stock
|
||||||
*
|
*
|
||||||
@ -235,7 +245,10 @@ else
|
|||||||
|
|
||||||
print "<br><div class=\"tabsAction\">\n";
|
print "<br><div class=\"tabsAction\">\n";
|
||||||
|
|
||||||
|
if ($_GET["action"] <> 'correction')
|
||||||
|
{
|
||||||
print '<a class="tabAction" href="product.php?id='.$product->id.'&action=correction">Correction stock</a>';
|
print '<a class="tabAction" href="product.php?id='.$product->id.'&action=correction">Correction stock</a>';
|
||||||
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user