2006-12-04 12:17:24 +01:00
|
|
|
<?php
|
2009-04-27 22:37:50 +02:00
|
|
|
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
2010-05-28 22:41:41 +02:00
|
|
|
* Copyright (C) 2008-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
2018-10-27 14:43:12 +02:00
|
|
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
2013-08-20 16:50:33 +02:00
|
|
|
* Copyright (C) 2012-2013 Juanjo Menent <jmenent@2byte.es>
|
2018-05-11 22:31:17 +02:00
|
|
|
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
2013-08-20 16:50:33 +02:00
|
|
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
2006-12-04 12:17:24 +01:00
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
2013-01-16 15:36:08 +01:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2006-12-04 12:17:24 +01:00
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2011-08-01 00:21:57 +02:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2006-12-04 12:17:24 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
2009-11-18 00:05:00 +01:00
|
|
|
* \file htdocs/admin/stock.php
|
|
|
|
|
* \ingroup stock
|
|
|
|
|
* \brief Page d'administration/configuration du module gestion de stock
|
2008-10-23 23:54:30 +02:00
|
|
|
*/
|
2012-08-22 23:24:21 +02:00
|
|
|
require '../main.inc.php';
|
2012-08-22 23:11:24 +02:00
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
2006-12-04 12:17:24 +01:00
|
|
|
|
2018-05-26 18:52:14 +02:00
|
|
|
// Load translation files required by the page
|
2018-05-11 22:31:17 +02:00
|
|
|
$langs->loadLangs(array("admin", "stocks"));
|
2006-12-04 12:17:24 +01:00
|
|
|
|
2008-10-24 22:16:36 +02:00
|
|
|
// Securit check
|
2011-09-21 15:16:13 +02:00
|
|
|
if (!$user->admin) accessforbidden();
|
2006-12-04 12:17:24 +01:00
|
|
|
|
2012-03-29 12:41:11 +02:00
|
|
|
$action = GETPOST('action','alpha');
|
2011-09-02 16:31:53 +02:00
|
|
|
|
2008-10-24 22:16:36 +02:00
|
|
|
|
2006-12-06 00:08:59 +01:00
|
|
|
/*
|
2008-10-23 23:54:30 +02:00
|
|
|
* Actions
|
|
|
|
|
*/
|
2010-06-17 18:53:26 +02:00
|
|
|
|
2014-02-15 14:14:49 +01:00
|
|
|
if($action)
|
2008-10-24 22:16:36 +02:00
|
|
|
{
|
|
|
|
|
$db->begin();
|
2008-07-26 14:10:24 +02:00
|
|
|
|
2017-09-19 23:42:20 +02:00
|
|
|
if ($action == 'STOCK_SUPPORTS_SERVICES')
|
|
|
|
|
{
|
|
|
|
|
$res = dolibarr_set_const($db, "STOCK_SUPPORTS_SERVICES", GETPOST('STOCK_SUPPORTS_SERVICES','alpha'),'chaine',0,'',$conf->entity);
|
|
|
|
|
}
|
2014-02-15 14:14:49 +01:00
|
|
|
if ($action == 'STOCK_USERSTOCK_AUTOCREATE')
|
|
|
|
|
{
|
|
|
|
|
$res = dolibarr_set_const($db, "STOCK_USERSTOCK_AUTOCREATE", GETPOST('STOCK_USERSTOCK_AUTOCREATE','alpha'),'chaine',0,'',$conf->entity);
|
|
|
|
|
}
|
2016-09-16 17:09:38 +02:00
|
|
|
if ($action == 'STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE') {
|
|
|
|
|
$res = dolibarr_set_const($db, "STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE", GETPOST('STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE','alpha'),'chaine',0,'',$conf->entity);
|
|
|
|
|
}
|
2016-06-04 18:23:22 +02:00
|
|
|
if ($action == 'STOCK_ALLOW_NEGATIVE_TRANSFER')
|
|
|
|
|
{
|
|
|
|
|
$res = dolibarr_set_const($db, "STOCK_ALLOW_NEGATIVE_TRANSFER", GETPOST('STOCK_ALLOW_NEGATIVE_TRANSFER','alpha'),'chaine',0,'',$conf->entity);
|
|
|
|
|
}
|
2014-02-15 14:14:49 +01:00
|
|
|
// Mode of stock decrease
|
|
|
|
|
if ($action == 'STOCK_CALCULATE_ON_BILL'
|
|
|
|
|
|| $action == 'STOCK_CALCULATE_ON_VALIDATE_ORDER'
|
2016-04-25 18:33:39 +02:00
|
|
|
|| $action == 'STOCK_CALCULATE_ON_SHIPMENT'
|
2016-05-14 19:22:27 +02:00
|
|
|
|| $action == 'STOCK_CALCULATE_ON_SHIPMENT_CLOSE')
|
2014-02-15 14:14:49 +01:00
|
|
|
{
|
|
|
|
|
$res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_BILL", '','chaine',0,'',$conf->entity);
|
|
|
|
|
$res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_VALIDATE_ORDER", '','chaine',0,'',$conf->entity);
|
|
|
|
|
$res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_SHIPMENT", '','chaine',0,'',$conf->entity);
|
2016-05-14 19:22:27 +02:00
|
|
|
$res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_SHIPMENT_CLOSE", '','chaine',0,'',$conf->entity);
|
2014-02-15 14:14:49 +01:00
|
|
|
if ($action == 'STOCK_CALCULATE_ON_BILL') $res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_BILL", GETPOST('STOCK_CALCULATE_ON_BILL','alpha'),'chaine',0,'',$conf->entity);
|
|
|
|
|
if ($action == 'STOCK_CALCULATE_ON_VALIDATE_ORDER') $res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_VALIDATE_ORDER", GETPOST('STOCK_CALCULATE_ON_VALIDATE_ORDER','alpha'),'chaine',0,'',$conf->entity);
|
|
|
|
|
if ($action == 'STOCK_CALCULATE_ON_SHIPMENT') $res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_SHIPMENT", GETPOST('STOCK_CALCULATE_ON_SHIPMENT','alpha'),'chaine',0,'',$conf->entity);
|
2016-05-14 19:22:27 +02:00
|
|
|
if ($action == 'STOCK_CALCULATE_ON_SHIPMENT_CLOSE') $res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_SHIPMENT_CLOSE", GETPOST('STOCK_CALCULATE_ON_SHIPMENT_CLOSE','alpha'),'chaine',0,'',$conf->entity);
|
2014-02-15 14:14:49 +01:00
|
|
|
}
|
|
|
|
|
// Mode of stock increase
|
|
|
|
|
if ($action == 'STOCK_CALCULATE_ON_SUPPLIER_BILL'
|
|
|
|
|
|| $action == 'STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER'
|
2018-10-03 18:05:22 +02:00
|
|
|
|| $action == 'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER'
|
|
|
|
|
|| $action == 'STOCK_CALCULATE_ON_RECEPTION'
|
|
|
|
|
|| $action == 'STOCK_CALCULATE_ON_RECEPTION_CLOSE')
|
2014-02-15 14:14:49 +01:00
|
|
|
{
|
2016-08-04 11:37:32 +02:00
|
|
|
//Use variable cause empty(GETPOST()) do not work with php version < 5.4
|
|
|
|
|
$valdispatch=GETPOST('STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER','alpha');
|
|
|
|
|
|
2014-02-15 14:14:49 +01:00
|
|
|
$res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_SUPPLIER_BILL", '','chaine',0,'',$conf->entity);
|
|
|
|
|
$res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER", '','chaine',0,'',$conf->entity);
|
2018-10-03 18:05:22 +02:00
|
|
|
$res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_RECEPTION", '','chaine',0,'',$conf->entity);
|
|
|
|
|
$res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_RECEPTION_CLOSE", '','chaine',0,'',$conf->entity);
|
2014-02-15 14:14:49 +01:00
|
|
|
$res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER", '','chaine',0,'',$conf->entity);
|
|
|
|
|
if ($action == 'STOCK_CALCULATE_ON_SUPPLIER_BILL') $res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_SUPPLIER_BILL", GETPOST('STOCK_CALCULATE_ON_SUPPLIER_BILL','alpha'),'chaine',0,'',$conf->entity);
|
|
|
|
|
if ($action == 'STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER') $res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER", GETPOST('STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER','alpha'),'chaine',0,'',$conf->entity);
|
2018-10-03 18:05:22 +02:00
|
|
|
if ($action == 'STOCK_CALCULATE_ON_RECEPTION') $res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_RECEPTION", GETPOST('STOCK_CALCULATE_ON_RECEPTION','alpha'),'chaine',0,'',$conf->entity);
|
|
|
|
|
if ($action == 'STOCK_CALCULATE_ON_RECEPTION_CLOSE') $res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_RECEPTION_CLOSE", GETPOST('STOCK_CALCULATE_ON_RECEPTION_CLOSE','alpha'),'chaine',0,'',$conf->entity);
|
2016-08-04 11:37:32 +02:00
|
|
|
if ($action == 'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER') $res=dolibarr_set_const($db, "STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER", $valdispatch,'chaine',0,'',$conf->entity);
|
|
|
|
|
if (empty($valdispatch)) {
|
|
|
|
|
$res=dolibarr_set_const($db, "SUPPLIER_ORDER_USE_DISPATCH_STATUS", '','chaine',0,'',$conf->entity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($action == 'SUPPLIER_ORDER_USE_DISPATCH_STATUS') {
|
|
|
|
|
$res = dolibarr_set_const($db, "SUPPLIER_ORDER_USE_DISPATCH_STATUS", GETPOST('SUPPLIER_ORDER_USE_DISPATCH_STATUS','alpha'),'chaine',0,'',$conf->entity);
|
2014-02-15 14:14:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($action == 'STOCK_USE_VIRTUAL_STOCK') {
|
|
|
|
|
$res = dolibarr_set_const($db, "STOCK_USE_VIRTUAL_STOCK", GETPOST('STOCK_USE_VIRTUAL_STOCK','alpha'),'chaine',0,'',$conf->entity);
|
|
|
|
|
}
|
2014-07-08 01:02:30 +02:00
|
|
|
|
2014-03-15 12:45:56 +01:00
|
|
|
if($action == 'STOCK_MUST_BE_ENOUGH_FOR_INVOICE') {
|
|
|
|
|
$res = dolibarr_set_const($db, "STOCK_MUST_BE_ENOUGH_FOR_INVOICE", GETPOST('STOCK_MUST_BE_ENOUGH_FOR_INVOICE','alpha'),'chaine',0,'',$conf->entity);
|
|
|
|
|
}
|
|
|
|
|
if($action == 'STOCK_MUST_BE_ENOUGH_FOR_ORDER') {
|
|
|
|
|
$res = dolibarr_set_const($db, "STOCK_MUST_BE_ENOUGH_FOR_ORDER", GETPOST('STOCK_MUST_BE_ENOUGH_FOR_ORDER','alpha'),'chaine',0,'',$conf->entity);
|
|
|
|
|
}
|
|
|
|
|
if($action == 'STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT') {
|
|
|
|
|
$res = dolibarr_set_const($db, "STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT", GETPOST('STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT','alpha'),'chaine',0,'',$conf->entity);
|
|
|
|
|
}
|
2015-02-16 16:06:50 +01:00
|
|
|
if($action == 'INDEPENDANT_SUBPRODUCT_STOCK') {
|
|
|
|
|
$res = dolibarr_set_const($db, "INDEPENDANT_SUBPRODUCT_STOCK", GETPOST('INDEPENDANT_SUBPRODUCT_STOCK','alpha'),'chaine',0,'',$conf->entity);
|
|
|
|
|
}
|
2013-06-10 15:42:58 +02:00
|
|
|
|
2011-09-02 16:31:53 +02:00
|
|
|
if (! $res > 0) $error++;
|
|
|
|
|
|
|
|
|
|
if (! $error)
|
|
|
|
|
{
|
|
|
|
|
$db->commit();
|
2015-10-29 13:58:16 +01:00
|
|
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
2011-09-02 16:31:53 +02:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$db->rollback();
|
2015-10-29 13:58:16 +01:00
|
|
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
2011-09-02 16:31:53 +02:00
|
|
|
}
|
|
|
|
|
}
|
2006-12-06 00:08:59 +01:00
|
|
|
|
2013-06-10 15:42:58 +02:00
|
|
|
|
2006-12-04 12:17:24 +01:00
|
|
|
/*
|
2008-07-26 14:10:24 +02:00
|
|
|
* View
|
2006-12-04 12:17:24 +01:00
|
|
|
*/
|
2008-07-26 14:10:24 +02:00
|
|
|
|
2006-12-04 12:17:24 +01:00
|
|
|
llxHeader('',$langs->trans("StockSetup"));
|
|
|
|
|
|
2018-02-26 09:20:05 +01:00
|
|
|
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
2015-09-24 18:33:48 +02:00
|
|
|
print load_fiche_titre($langs->trans("StockSetup"),$linkback,'title_setup');
|
2013-03-22 17:10:17 +01:00
|
|
|
|
2011-11-08 10:18:45 +01:00
|
|
|
$form=new Form($db);
|
2008-07-26 14:10:24 +02:00
|
|
|
|
2006-12-04 12:17:24 +01:00
|
|
|
|
2014-12-05 16:01:01 +01:00
|
|
|
$disabled='';
|
|
|
|
|
if (! empty($conf->productbatch->enabled))
|
|
|
|
|
{
|
|
|
|
|
$langs->load("productbatch");
|
2015-05-07 11:57:23 +02:00
|
|
|
$disabled=' disabled';
|
2014-12-05 16:01:01 +01:00
|
|
|
print info_admin($langs->trans("WhenProductBatchModuleOnOptionAreForced"));
|
|
|
|
|
}
|
2010-07-11 21:29:18 +02:00
|
|
|
|
2014-12-05 16:01:01 +01:00
|
|
|
//if (! empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) || ! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT))
|
|
|
|
|
//{
|
|
|
|
|
print info_admin($langs->trans("IfYouUsePointOfSaleCheckModule"));
|
2017-05-06 17:08:38 +02:00
|
|
|
print '<br>';
|
2014-12-05 16:01:01 +01:00
|
|
|
//}
|
2008-07-26 14:10:24 +02:00
|
|
|
|
2008-10-23 23:54:30 +02:00
|
|
|
// Title rule for stock decrease
|
2013-03-22 17:10:17 +01:00
|
|
|
print '<table class="noborder" width="100%">';
|
2008-07-26 14:10:24 +02:00
|
|
|
print '<tr class="liste_titre">';
|
2008-10-23 23:54:30 +02:00
|
|
|
print " <td>".$langs->trans("RuleForStockManagementDecrease")."</td>\n";
|
2018-08-29 21:07:00 +02:00
|
|
|
print " <td align=\"right\"> </td>\n";
|
2008-07-26 14:10:24 +02:00
|
|
|
print '</tr>'."\n";
|
|
|
|
|
|
2015-02-28 19:37:44 +01:00
|
|
|
$found=0;
|
|
|
|
|
|
2017-04-14 11:22:48 +02:00
|
|
|
print '<tr class="oddeven">';
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<td>'.$langs->trans("DeStockOnBill").'</td>';
|
|
|
|
|
print '<td align="right">';
|
2012-09-15 10:01:35 +02:00
|
|
|
if (! empty($conf->facture->enabled))
|
2007-11-10 22:34:46 +01:00
|
|
|
{
|
2015-10-27 19:18:22 +01:00
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
2009-05-17 10:01:54 +02:00
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
2008-10-24 22:16:36 +02:00
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_BILL\">";
|
2014-12-05 16:01:01 +01:00
|
|
|
print $form->selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
2015-10-27 19:18:22 +01:00
|
|
|
print "</form>\n";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2016-08-04 11:37:32 +02:00
|
|
|
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module30Name"));
|
2007-11-10 22:34:46 +01:00
|
|
|
}
|
2015-10-27 19:18:22 +01:00
|
|
|
print "</td>\n</tr>\n";
|
|
|
|
|
$found++;
|
2006-12-04 12:17:24 +01:00
|
|
|
|
2017-04-14 11:22:48 +02:00
|
|
|
|
|
|
|
|
print '<tr class="oddeven">';
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<td>'.$langs->trans("DeStockOnValidateOrder").'</td>';
|
|
|
|
|
print '<td align="right">';
|
2012-09-15 10:01:35 +02:00
|
|
|
if (! empty($conf->commande->enabled))
|
2007-11-10 22:34:46 +01:00
|
|
|
{
|
2015-10-27 19:18:22 +01:00
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
2009-05-17 10:01:54 +02:00
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
2008-10-24 22:16:36 +02:00
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_VALIDATE_ORDER\">";
|
2014-12-05 16:01:01 +01:00
|
|
|
print $form->selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
2015-10-27 19:18:22 +01:00
|
|
|
print "</form>\n";
|
2007-11-10 22:34:46 +01:00
|
|
|
}
|
2015-10-27 19:18:22 +01:00
|
|
|
else
|
|
|
|
|
{
|
2016-08-04 11:37:32 +02:00
|
|
|
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module25Name"));
|
2015-10-27 19:18:22 +01:00
|
|
|
}
|
|
|
|
|
print "</td>\n</tr>\n";
|
|
|
|
|
$found++;
|
2007-03-22 18:27:21 +01:00
|
|
|
|
2015-10-27 19:18:22 +01:00
|
|
|
//if (! empty($conf->expedition->enabled))
|
|
|
|
|
//{
|
2017-04-14 11:22:48 +02:00
|
|
|
|
|
|
|
|
print '<tr class="oddeven">';
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<td>'.$langs->trans("DeStockOnShipment").'</td>';
|
|
|
|
|
print '<td align="right">';
|
2012-09-15 10:01:35 +02:00
|
|
|
if (! empty($conf->expedition->enabled))
|
2007-11-10 22:34:46 +01:00
|
|
|
{
|
2008-10-23 23:54:30 +02:00
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
2009-05-17 10:01:54 +02:00
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
2008-10-24 22:16:36 +02:00
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SHIPMENT\">";
|
2014-12-05 16:01:01 +01:00
|
|
|
print $form->selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
2015-10-27 19:18:22 +01:00
|
|
|
print "</form>\n";
|
2007-11-10 22:34:46 +01:00
|
|
|
}
|
2015-10-27 19:18:22 +01:00
|
|
|
else
|
|
|
|
|
{
|
2016-08-04 11:37:32 +02:00
|
|
|
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module80Name"));
|
2015-10-27 19:18:22 +01:00
|
|
|
}
|
|
|
|
|
print "</td>\n</tr>\n";
|
|
|
|
|
$found++;
|
2015-02-28 19:37:44 +01:00
|
|
|
|
2017-04-14 11:22:48 +02:00
|
|
|
|
|
|
|
|
print '<tr class="oddeven">';
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<td>'.$langs->trans("DeStockOnShipmentOnClosing").'</td>';
|
|
|
|
|
print '<td align="right">';
|
2016-04-25 18:33:39 +02:00
|
|
|
if (! empty($conf->expedition->enabled))
|
|
|
|
|
{
|
|
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
2016-05-14 19:22:27 +02:00
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SHIPMENT_CLOSE\">";
|
|
|
|
|
print $form->selectyesno("STOCK_CALCULATE_ON_SHIPMENT_CLOSE",$conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE,1,$disabled);
|
2016-04-25 18:33:39 +02:00
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
|
|
|
|
print "</form>\n";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2016-08-04 11:37:32 +02:00
|
|
|
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module80Name"));
|
2016-04-25 18:33:39 +02:00
|
|
|
}
|
|
|
|
|
print "</td>\n</tr>\n";
|
|
|
|
|
$found++;
|
|
|
|
|
|
2015-10-27 19:18:22 +01:00
|
|
|
/*if (! $found)
|
2015-02-28 19:37:44 +01:00
|
|
|
{
|
2017-09-15 23:49:04 +02:00
|
|
|
|
2017-04-14 11:22:48 +02:00
|
|
|
print '<tr class="oddeven">';
|
2015-10-27 19:18:22 +01:00
|
|
|
print '<td colspan="2">'.$langs->trans("NoModuleToManageStockDecrease").'</td>';
|
2015-02-28 19:37:44 +01:00
|
|
|
print "</tr>\n";
|
2015-10-27 19:18:22 +01:00
|
|
|
}*/
|
2015-02-28 19:37:44 +01:00
|
|
|
|
2013-03-22 17:10:17 +01:00
|
|
|
print '</table>';
|
2014-11-28 19:49:42 +01:00
|
|
|
|
2013-03-22 17:10:17 +01:00
|
|
|
print '<br>';
|
2008-10-23 23:54:30 +02:00
|
|
|
|
|
|
|
|
// Title rule for stock increase
|
2013-03-22 17:10:17 +01:00
|
|
|
print '<table class="noborder" width="100%">';
|
2008-10-23 23:54:30 +02:00
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
|
print " <td>".$langs->trans("RuleForStockManagementIncrease")."</td>\n";
|
2018-08-29 21:07:00 +02:00
|
|
|
print " <td align=\"right\"> </td>\n";
|
2008-10-23 23:54:30 +02:00
|
|
|
print '</tr>'."\n";
|
|
|
|
|
|
2015-02-28 19:37:44 +01:00
|
|
|
$found=0;
|
|
|
|
|
|
2017-04-14 11:22:48 +02:00
|
|
|
print '<tr class="oddeven">';
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<td>'.$langs->trans("ReStockOnBill").'</td>';
|
|
|
|
|
print '<td align="right">';
|
2012-09-15 10:01:35 +02:00
|
|
|
if (! empty($conf->fournisseur->enabled))
|
2008-10-24 22:16:36 +02:00
|
|
|
{
|
2015-10-27 19:18:22 +01:00
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
2009-05-17 10:01:54 +02:00
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
2008-10-24 22:16:36 +02:00
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_BILL\">";
|
2014-12-05 16:01:01 +01:00
|
|
|
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
2015-10-27 19:18:22 +01:00
|
|
|
print "</form>\n";
|
2008-10-24 22:16:36 +02:00
|
|
|
}
|
2015-10-27 19:18:22 +01:00
|
|
|
else
|
|
|
|
|
{
|
2016-08-04 11:37:32 +02:00
|
|
|
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name"));
|
2015-10-27 19:18:22 +01:00
|
|
|
}
|
|
|
|
|
print "</td>\n</tr>\n";
|
|
|
|
|
$found++;
|
|
|
|
|
|
2008-10-23 23:54:30 +02:00
|
|
|
|
2017-04-14 11:22:48 +02:00
|
|
|
|
|
|
|
|
print '<tr class="oddeven">';
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<td>'.$langs->trans("ReStockOnValidateOrder").'</td>';
|
|
|
|
|
print '<td align="right">';
|
2012-09-15 10:01:35 +02:00
|
|
|
if (! empty($conf->fournisseur->enabled))
|
2008-10-24 22:16:36 +02:00
|
|
|
{
|
2015-10-27 19:18:22 +01:00
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
2009-05-17 10:01:54 +02:00
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
2008-10-24 22:16:36 +02:00
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER\">";
|
2014-12-05 16:01:01 +01:00
|
|
|
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
2015-10-27 19:18:22 +01:00
|
|
|
print "</form>\n";
|
2010-07-11 21:29:18 +02:00
|
|
|
}
|
2015-10-27 19:18:22 +01:00
|
|
|
else
|
|
|
|
|
{
|
2016-08-04 11:37:32 +02:00
|
|
|
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name"));
|
2015-10-27 19:18:22 +01:00
|
|
|
}
|
|
|
|
|
print "</td>\n</tr>\n";
|
|
|
|
|
$found++;
|
|
|
|
|
|
2018-10-03 18:05:22 +02:00
|
|
|
if (!empty($conf->reception->enabled))
|
2010-07-11 21:29:18 +02:00
|
|
|
{
|
2018-10-03 18:05:22 +02:00
|
|
|
print '<tr class="oddeven">';
|
|
|
|
|
print '<td width="60%">'.$langs->trans("StockOnReception").'</td>';
|
|
|
|
|
print '<td width="160" align="right">';
|
|
|
|
|
|
|
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_RECEPTION\">";
|
|
|
|
|
print $form->selectyesno("STOCK_CALCULATE_ON_RECEPTION", $conf->global->STOCK_CALCULATE_ON_RECEPTION, 1, $disabled);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
|
|
|
|
print "</form>\n";
|
|
|
|
|
|
|
|
|
|
print "</td>\n</tr>\n";
|
|
|
|
|
$found++;
|
|
|
|
|
|
|
|
|
|
|
2017-04-14 11:22:48 +02:00
|
|
|
print '<tr class="oddeven">';
|
2018-10-03 18:05:22 +02:00
|
|
|
print '<td width="60%">'.$langs->trans("StockOnReceptionOnClosing").'</td>';
|
|
|
|
|
print '<td width="160" align="right">';
|
|
|
|
|
|
|
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
2010-05-28 22:41:41 +02:00
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
2018-10-03 18:05:22 +02:00
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_RECEPTION_CLOSE\">";
|
|
|
|
|
print $form->selectyesno("STOCK_CALCULATE_ON_RECEPTION_CLOSE", $conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE, 1, $disabled);
|
2014-12-05 16:01:01 +01:00
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
2015-10-27 19:18:22 +01:00
|
|
|
print "</form>\n";
|
2018-10-03 18:05:22 +02:00
|
|
|
|
|
|
|
|
print "</td>\n</tr>\n";
|
|
|
|
|
$found++;
|
2015-10-27 19:18:22 +01:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2018-10-03 18:05:22 +02:00
|
|
|
print '<tr class="oddeven">';
|
2018-10-23 10:27:46 +02:00
|
|
|
print '<td>'.$langs->trans("ReStockOnDispatchOrder").'</td>';
|
|
|
|
|
print '<td align="right">';
|
|
|
|
|
if (! empty($conf->fournisseur->enabled))
|
2018-10-03 18:05:22 +02:00
|
|
|
{
|
|
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER\">";
|
2018-10-23 10:27:46 +02:00
|
|
|
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled);
|
2018-10-03 18:05:22 +02:00
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
|
|
|
|
print "</form>\n";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name"));
|
|
|
|
|
}
|
|
|
|
|
print "</td>\n</tr>\n";
|
|
|
|
|
$found++;
|
2008-10-24 22:16:36 +02:00
|
|
|
}
|
2008-10-23 23:54:30 +02:00
|
|
|
|
2015-10-27 19:18:22 +01:00
|
|
|
/*if (! $found)
|
2015-02-28 19:37:44 +01:00
|
|
|
{
|
2017-09-15 23:49:04 +02:00
|
|
|
|
2017-04-14 11:22:48 +02:00
|
|
|
print '<tr class="oddeven">';
|
2016-06-18 15:36:19 +02:00
|
|
|
print '<td colspan="2">'.$langs->trans("NoModuleToManageStockIncrease").'</td>';
|
2014-03-15 12:45:56 +01:00
|
|
|
print "</tr>\n";
|
2015-10-27 19:18:22 +01:00
|
|
|
}*/
|
2014-03-15 12:45:56 +01:00
|
|
|
|
|
|
|
|
print '</table>';
|
|
|
|
|
|
2016-07-15 19:57:35 +02:00
|
|
|
print '<br>';
|
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
|
print " <td>".$langs->trans("RuleForStockAvailability")."</td>\n";
|
2018-08-29 21:07:00 +02:00
|
|
|
print " <td align=\"right\"> </td>\n";
|
2016-07-15 19:57:35 +02:00
|
|
|
print '</tr>'."\n";
|
2015-02-28 19:37:44 +01:00
|
|
|
|
2017-04-14 11:22:48 +02:00
|
|
|
|
|
|
|
|
print '<tr class="oddeven">';
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<td>'.$langs->trans("WarehouseAllowNegativeTransfer").'</td>';
|
|
|
|
|
print '<td align="right">';
|
2016-07-15 19:57:35 +02:00
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_ALLOW_NEGATIVE_TRANSFER\">";
|
|
|
|
|
print $form->selectyesno("STOCK_ALLOW_NEGATIVE_TRANSFER",$conf->global->STOCK_ALLOW_NEGATIVE_TRANSFER,1);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print '</form>';
|
|
|
|
|
print "</td>\n";
|
|
|
|
|
print "</tr>\n";
|
2015-02-28 19:37:44 +01:00
|
|
|
|
2016-07-15 19:57:35 +02:00
|
|
|
// Option to force stock to be enough before adding a line into document
|
2018-05-11 22:31:17 +02:00
|
|
|
if($conf->invoice->enabled)
|
|
|
|
|
{
|
2017-04-14 11:22:48 +02:00
|
|
|
print '<tr class="oddeven">';
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<td>'.$langs->trans("StockMustBeEnoughForInvoice").'</td>';
|
|
|
|
|
print '<td align="right">';
|
2016-07-15 19:57:35 +02:00
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_INVOICE\">";
|
|
|
|
|
print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_INVOICE",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE,1);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print '</form>';
|
|
|
|
|
print "</td>\n";
|
|
|
|
|
print "</tr>\n";
|
|
|
|
|
}
|
2015-02-28 19:37:44 +01:00
|
|
|
|
2018-07-26 18:22:16 +02:00
|
|
|
if($conf->order->enabled)
|
2018-05-11 22:31:17 +02:00
|
|
|
{
|
2017-04-14 11:22:48 +02:00
|
|
|
print '<tr class="oddeven">';
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<td>'.$langs->trans("StockMustBeEnoughForOrder").'</td>';
|
|
|
|
|
print '<td align="right">';
|
2016-07-15 19:57:35 +02:00
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_ORDER\">";
|
|
|
|
|
print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_ORDER",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER,1);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print '</form>';
|
|
|
|
|
print "</td>\n";
|
|
|
|
|
print "</tr>\n";
|
2015-02-28 19:37:44 +01:00
|
|
|
}
|
2014-02-15 14:14:49 +01:00
|
|
|
|
2018-07-26 18:22:16 +02:00
|
|
|
if($conf->expedition->enabled)
|
2018-05-11 22:31:17 +02:00
|
|
|
{
|
2017-04-14 11:22:48 +02:00
|
|
|
print '<tr class="oddeven">';
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<td>'.$langs->trans("StockMustBeEnoughForShipment").'</td>';
|
|
|
|
|
print '<td align="right">';
|
2016-07-15 19:57:35 +02:00
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT\">";
|
|
|
|
|
print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT,1);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print '</form>';
|
|
|
|
|
print "</td>\n";
|
|
|
|
|
print "</tr>\n";
|
|
|
|
|
}
|
|
|
|
|
print '</table>';
|
|
|
|
|
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<br>';
|
|
|
|
|
|
2014-02-15 14:14:49 +01:00
|
|
|
$virtualdiffersfromphysical=0;
|
|
|
|
|
if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
|
|
|
|
|
|| ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)
|
|
|
|
|
) $virtualdiffersfromphysical=1; // According to increase/decrease stock options, virtual and physical stock may differs.
|
|
|
|
|
|
|
|
|
|
if ($virtualdiffersfromphysical)
|
|
|
|
|
{
|
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
|
print " <td>".$langs->trans("RuleForStockReplenishment")." ".img_help('help',$langs->trans("VirtualDiffersFromPhysical"))."</td>\n";
|
2018-08-29 21:07:00 +02:00
|
|
|
print " <td align=\"right\"> </td>\n";
|
2014-02-15 14:14:49 +01:00
|
|
|
print '</tr>'."\n";
|
2018-05-11 22:31:17 +02:00
|
|
|
|
2017-04-14 11:22:48 +02:00
|
|
|
print '<tr class="oddeven">';
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<td>'.$langs->trans("UseVirtualStockByDefault").'</td>';
|
|
|
|
|
print '<td align="right">';
|
2014-02-15 14:14:49 +01:00
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_USE_VIRTUAL_STOCK\">";
|
|
|
|
|
print $form->selectyesno("STOCK_USE_VIRTUAL_STOCK",$conf->global->STOCK_USE_VIRTUAL_STOCK,1);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print '</form>';
|
|
|
|
|
print "</td>\n";
|
|
|
|
|
print "</tr>\n";
|
|
|
|
|
print '</table>';
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<br>';
|
2014-02-15 14:14:49 +01:00
|
|
|
}
|
2013-06-10 17:20:49 +02:00
|
|
|
|
2014-12-05 16:01:01 +01:00
|
|
|
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
|
|
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
|
print " <td>".$langs->trans("Other")."</td>\n";
|
2018-08-29 21:07:00 +02:00
|
|
|
print " <td align=\"right\"> </td>\n";
|
2017-09-19 23:42:20 +02:00
|
|
|
print '</tr>'."\n";
|
|
|
|
|
|
|
|
|
|
print '<tr class="oddeven">';
|
|
|
|
|
print '<td>'.$langs->trans("UserWarehouseAutoCreate").'</td>';
|
2018-08-29 21:07:00 +02:00
|
|
|
print '<td align="right">';
|
2017-09-19 23:42:20 +02:00
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_USERSTOCK_AUTOCREATE\">";
|
|
|
|
|
print $form->selectyesno("STOCK_USERSTOCK_AUTOCREATE",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print '</form>';
|
|
|
|
|
print "</td>\n";
|
|
|
|
|
print "</tr>\n";
|
|
|
|
|
|
|
|
|
|
print '<tr class="oddeven">';
|
|
|
|
|
print '<td>';
|
2018-08-29 21:07:00 +02:00
|
|
|
print $form->textwithpicto($langs->trans("StockSupportServices"), $langs->trans("StockSupportServicesDesc"));
|
|
|
|
|
print '</td>';
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<td align="right">';
|
|
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_SUPPORTS_SERVICES\">";
|
|
|
|
|
print $form->selectyesno("STOCK_SUPPORTS_SERVICES",$conf->global->STOCK_SUPPORTS_SERVICES,1);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print '</form>';
|
|
|
|
|
print "</td>\n";
|
|
|
|
|
print "</tr>\n";
|
|
|
|
|
|
|
|
|
|
print '<tr class="oddeven">';
|
|
|
|
|
print '<td>'.$langs->trans("AllowAddLimitStockByWarehouse").'</td>';
|
|
|
|
|
print '<td align="right">';
|
|
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE\">";
|
|
|
|
|
print $form->selectyesno("STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE",$conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE,1);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print '</form>';
|
|
|
|
|
print "</td>\n";
|
|
|
|
|
print "</tr>\n";
|
|
|
|
|
|
|
|
|
|
if (! empty($conf->fournisseur->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) {
|
|
|
|
|
|
|
|
|
|
print '<tr class="oddeven">';
|
|
|
|
|
print '<td>'.$langs->trans("UseDispatchStatus").'</td>';
|
|
|
|
|
print '<td align="right">';
|
|
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"SUPPLIER_ORDER_USE_DISPATCH_STATUS\">";
|
|
|
|
|
print $form->selectyesno("SUPPLIER_ORDER_USE_DISPATCH_STATUS",$conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS,1);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print "</form>\n";
|
|
|
|
|
print "</td>\n</tr>\n";
|
2014-02-15 14:14:49 +01:00
|
|
|
}
|
2013-06-10 17:20:49 +02:00
|
|
|
|
2017-09-19 23:42:20 +02:00
|
|
|
print '</table>';
|
2014-12-05 16:01:01 +01:00
|
|
|
|
2017-09-15 23:49:04 +02:00
|
|
|
print '<br>';
|
2017-05-06 22:28:07 +02:00
|
|
|
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
2017-05-02 15:19:55 +02:00
|
|
|
{
|
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
|
print '<td>'.$langs->trans("Inventory").'</td>'."\n";
|
|
|
|
|
print '<td align="center" width="20"> </td>';
|
2018-08-29 21:07:00 +02:00
|
|
|
print '<td align="center"> </td>'."\n";
|
2017-09-15 23:49:04 +02:00
|
|
|
|
2017-05-02 15:19:55 +02:00
|
|
|
// Example with a yes / no select
|
2017-05-06 10:54:28 +02:00
|
|
|
print '<tr class="oddeven">';
|
2017-05-02 15:19:55 +02:00
|
|
|
print '<td>'.$langs->trans("INVENTORY_DISABLE_VIRTUAL").'</td>';
|
|
|
|
|
print '<td align="center" width="20"> </td>';
|
|
|
|
|
print '<td align="right" width="300">';
|
|
|
|
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print '<input type="hidden" name="action" value="set_INVENTORY_DISABLE_VIRTUAL">';
|
|
|
|
|
print $form->selectyesno("INVENTORY_DISABLE_VIRTUAL",$conf->global->INVENTORY_DISABLE_VIRTUAL,1);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print '</form>';
|
|
|
|
|
print '</td></tr>';
|
2017-09-15 23:49:04 +02:00
|
|
|
|
2017-05-02 15:19:55 +02:00
|
|
|
// Example with a yes / no select
|
2017-05-06 10:54:28 +02:00
|
|
|
print '<tr class="oddeven">';
|
2017-05-02 15:19:55 +02:00
|
|
|
print '<td>'.$langs->trans("INVENTORY_USE_MIN_PA_IF_NO_LAST_PA").'</td>';
|
|
|
|
|
print '<td align="center" width="20"> </td>';
|
|
|
|
|
print '<td align="right" width="300">';
|
|
|
|
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print '<input type="hidden" name="action" value="set_INVENTORY_USE_MIN_PA_IF_NO_LAST_PA">';
|
|
|
|
|
print $form->selectyesno("INVENTORY_USE_MIN_PA_IF_NO_LAST_PA",$conf->global->INVENTORY_USE_MIN_PA_IF_NO_LAST_PA,1);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print '</form>';
|
|
|
|
|
print '</td></tr>';
|
2017-09-15 23:49:04 +02:00
|
|
|
|
2017-05-02 15:19:55 +02:00
|
|
|
// Example with a yes / no select
|
2017-05-06 10:54:28 +02:00
|
|
|
print '<tr class="oddeven">';
|
2017-05-02 15:19:55 +02:00
|
|
|
print '<td>'.$langs->trans("INVENTORY_USE_INVENTORY_DATE_FROM_DATEMVT").'</td>';
|
|
|
|
|
print '<td align="center" width="20"> </td>';
|
|
|
|
|
print '<td align="right" width="300">';
|
|
|
|
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print '<input type="hidden" name="action" value="set_INVENTORY_USE_INVENTORY_DATE_FROM_DATEMVT">';
|
|
|
|
|
print $form->selectyesno("INVENTORY_USE_INVENTORY_DATE_FROM_DATEMVT",$conf->global->INVENTORY_USE_INVENTORY_DATE_FROM_DATEMVT,1);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print '</form>';
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
print '</table>';
|
2016-11-14 15:25:45 +01:00
|
|
|
}
|
|
|
|
|
|
2015-02-24 17:23:23 +01:00
|
|
|
/* I keep the option/feature, but hidden to end users for the moment. If feature is used by module, no need to have users see it.
|
|
|
|
|
If not used by a module, I still need to understand in which case user may need this now we can set rule on product page.
|
2016-08-04 11:37:32 +02:00
|
|
|
if ($conf->global->PRODUIT_SOUSPRODUITS)
|
2015-02-24 17:23:23 +01:00
|
|
|
{
|
2016-08-04 11:37:32 +02:00
|
|
|
|
|
|
|
|
|
2017-04-14 11:22:48 +02:00
|
|
|
print '<tr class="oddeven">';
|
2017-09-19 23:42:20 +02:00
|
|
|
print '<td>'.$langs->trans("IndependantSubProductStock").'</td>';
|
|
|
|
|
print '<td align="right">';
|
2015-02-16 16:06:50 +01:00
|
|
|
print "<form method=\"post\" action=\"stock.php\">";
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"INDEPENDANT_SUBPRODUCT_STOCK\">";
|
|
|
|
|
print $form->selectyesno("INDEPENDANT_SUBPRODUCT_STOCK",$conf->global->INDEPENDANT_SUBPRODUCT_STOCK,1);
|
|
|
|
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print '</form>';
|
|
|
|
|
print "</td>\n";
|
|
|
|
|
print "</tr>\n";
|
|
|
|
|
}
|
2015-02-24 17:23:23 +01:00
|
|
|
*/
|
2015-02-16 16:06:50 +01:00
|
|
|
|
2018-07-28 18:03:14 +02:00
|
|
|
// End of page
|
2011-08-27 16:24:16 +02:00
|
|
|
llxFooter();
|
2014-07-08 01:02:30 +02:00
|
|
|
$db->close();
|