Ajout option pour calculer les stocks sur les factures
This commit is contained in:
parent
6afffa70cd
commit
03cb9fdeb6
@ -20,10 +20,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/admin/stock.php
|
\file htdocs/admin/stock.php
|
||||||
\ingroup stock
|
\ingroup stock
|
||||||
\brief Page d'administration/configuration du module gestion de stock
|
\brief Page d'administration/configuration du module gestion de stock
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
@ -33,7 +33,6 @@ $langs->load("stocks");
|
|||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -49,6 +48,12 @@ elseif ($_POST["action"] == 'stock_userstock_autocreate')
|
|||||||
Header("Location: stock.php");
|
Header("Location: stock.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
elseif ($_POST["action"] == 'stock_bill')
|
||||||
|
{
|
||||||
|
dolibarr_set_const($db, "STOCK_CALCULATE_ON_BILL", $_POST["stock_bill"]);
|
||||||
|
Header("Location: stock.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Affiche page
|
* Affiche page
|
||||||
@ -71,24 +76,17 @@ print " </tr>\n";
|
|||||||
// sousproduits activation/desactivation
|
// sousproduits activation/desactivation
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
|
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
|
|
||||||
print '<td width="60%">'.$langs->trans("UserWarehouse").'</td>';
|
print '<td width="60%">'.$langs->trans("UserWarehouse").'</td>';
|
||||||
print '<td width="160" align="right">';
|
print '<td width="160" align="right">';
|
||||||
print "<form method=\"post\" action=\"stock.php\">";
|
print "<form method=\"post\" action=\"stock.php\">";
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"stock_userstock\">";
|
print "<input type=\"hidden\" name=\"action\" value=\"stock_userstock\">";
|
||||||
print $html->selectyesno("stock_userstock",$conf->global->STOCK_USERSTOCK,1);
|
print $html->selectyesno("stock_userstock",$conf->global->STOCK_USERSTOCK,1);
|
||||||
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
print '</form>';
|
print "</form>\n</td>\n</tr>\n";
|
||||||
print "</td>";
|
|
||||||
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
if ($conf->global->STOCK_USERSTOCK == 1)
|
if ($conf->global->STOCK_USERSTOCK == 1)
|
||||||
{
|
{
|
||||||
// utilisation formulaire Ajax sur choix produit
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
@ -104,6 +102,16 @@ if ($conf->global->STOCK_USERSTOCK == 1)
|
|||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
$var=!$var;
|
||||||
|
|
||||||
|
print "<tr ".$bc[$var].">";
|
||||||
|
print '<td width="60%">'.$langs->trans("DeStockReStockOnBill").'</td>';
|
||||||
|
print '<td width="160" align="right">';
|
||||||
|
print "<form method=\"post\" action=\"stock.php\">";
|
||||||
|
print "<input type=\"hidden\" name=\"action\" value=\"stock_bill\">";
|
||||||
|
print $html->selectyesno("stock_bill",$conf->global->STOCK_CALCULATE_ON_BILL,1);
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
print "</form>\n</td>\n</tr>\n";
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user