mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
NEW Option STOCK_SUPPORTS_SERVICES become visible.
This commit is contained in:
parent
04e1458a3f
commit
cfd29841e1
|
|
@ -45,6 +45,10 @@ if($action)
|
|||
{
|
||||
$db->begin();
|
||||
|
||||
if ($action == 'STOCK_SUPPORTS_SERVICES')
|
||||
{
|
||||
$res = dolibarr_set_const($db, "STOCK_SUPPORTS_SERVICES", GETPOST('STOCK_SUPPORTS_SERVICES','alpha'),'chaine',0,'',$conf->entity);
|
||||
}
|
||||
if ($action == 'STOCK_USERSTOCK_AUTOCREATE')
|
||||
{
|
||||
$res = dolibarr_set_const($db, "STOCK_USERSTOCK_AUTOCREATE", GETPOST('STOCK_USERSTOCK_AUTOCREATE','alpha'),'chaine',0,'',$conf->entity);
|
||||
|
|
@ -164,8 +168,8 @@ $found=0;
|
|||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="60%">'.$langs->trans("DeStockOnBill").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print '<td>'.$langs->trans("DeStockOnBill").'</td>';
|
||||
print '<td align="right">';
|
||||
if (! empty($conf->facture->enabled))
|
||||
{
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
|
|
@ -184,8 +188,8 @@ $found++;
|
|||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="60%">'.$langs->trans("DeStockOnValidateOrder").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print '<td>'.$langs->trans("DeStockOnValidateOrder").'</td>';
|
||||
print '<td align="right">';
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
|
|
@ -206,8 +210,8 @@ $found++;
|
|||
//{
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="60%">'.$langs->trans("DeStockOnShipment").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print '<td>'.$langs->trans("DeStockOnShipment").'</td>';
|
||||
print '<td align="right">';
|
||||
if (! empty($conf->expedition->enabled))
|
||||
{
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
|
|
@ -226,8 +230,8 @@ $found++;
|
|||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="60%">'.$langs->trans("DeStockOnShipmentOnClosing").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print '<td>'.$langs->trans("DeStockOnShipmentOnClosing").'</td>';
|
||||
print '<td align="right">';
|
||||
if (! empty($conf->expedition->enabled))
|
||||
{
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
|
|
@ -268,8 +272,8 @@ $found=0;
|
|||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="60%">'.$langs->trans("ReStockOnBill").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print '<td>'.$langs->trans("ReStockOnBill").'</td>';
|
||||
print '<td align="right">';
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
|
|
@ -289,8 +293,8 @@ $found++;
|
|||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="60%">'.$langs->trans("ReStockOnValidateOrder").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print '<td>'.$langs->trans("ReStockOnValidateOrder").'</td>';
|
||||
print '<td align="right">';
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
|
|
@ -309,8 +313,8 @@ $found++;
|
|||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="60%">'.$langs->trans("ReStockOnDispatchOrder").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print '<td>'.$langs->trans("ReStockOnDispatchOrder").'</td>';
|
||||
print '<td align="right">';
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
|
|
@ -346,8 +350,8 @@ print '</tr>'."\n";
|
|||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="60%">'.$langs->trans("WarehouseAllowNegativeTransfer").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print '<td>'.$langs->trans("WarehouseAllowNegativeTransfer").'</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_NEGATIVE_TRANSFER\">";
|
||||
|
|
@ -361,8 +365,8 @@ print "</tr>\n";
|
|||
if($conf->invoice->enabled) {
|
||||
$var = !$var;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="60%">'.$langs->trans("StockMustBeEnoughForInvoice").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print '<td>'.$langs->trans("StockMustBeEnoughForInvoice").'</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_MUST_BE_ENOUGH_FOR_INVOICE\">";
|
||||
|
|
@ -376,8 +380,8 @@ if($conf->invoice->enabled) {
|
|||
if($conf->order->enabled) {
|
||||
$var = !$var;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="60%">'.$langs->trans("StockMustBeEnoughForOrder").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print '<td>'.$langs->trans("StockMustBeEnoughForOrder").'</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_MUST_BE_ENOUGH_FOR_ORDER\">";
|
||||
|
|
@ -391,8 +395,8 @@ if($conf->order->enabled) {
|
|||
if($conf->expedition->enabled) {
|
||||
$var = !$var;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="60%">'.$langs->trans("StockMustBeEnoughForShipment").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print '<td>'.$langs->trans("StockMustBeEnoughForShipment").'</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_MUST_BE_ENOUGH_FOR_SHIPMENT\">";
|
||||
|
|
@ -404,6 +408,9 @@ if($conf->expedition->enabled) {
|
|||
}
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
$virtualdiffersfromphysical=0;
|
||||
if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
|
||||
|| ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)
|
||||
|
|
@ -411,7 +418,6 @@ if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
|
|||
|
||||
if ($virtualdiffersfromphysical)
|
||||
{
|
||||
print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print " <td>".$langs->trans("RuleForStockReplenishment")." ".img_help('help',$langs->trans("VirtualDiffersFromPhysical"))."</td>\n";
|
||||
|
|
@ -419,8 +425,8 @@ if ($virtualdiffersfromphysical)
|
|||
print '</tr>'."\n";
|
||||
$var = !$var;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="60%">'.$langs->trans("UseVirtualStockByDefault").'</td>';
|
||||
print '<td width="160" align="right">';
|
||||
print '<td>'.$langs->trans("UseVirtualStockByDefault").'</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_USE_VIRTUAL_STOCK\">";
|
||||
|
|
@ -430,9 +436,70 @@ if ($virtualdiffersfromphysical)
|
|||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print " <td>".$langs->trans("Other")."</td>\n";
|
||||
print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("UserWarehouseAutoCreate").'</td>';
|
||||
print '<td class="width100" 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_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>';
|
||||
print $form->textwithpicto($langs->trans("StockSupportServices"), $langs->trans("StockSupportServicesDesc")).'</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_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";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br>';
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
{
|
||||
|
|
@ -484,54 +551,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
|||
print '</table>';
|
||||
}
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print " <td>".$langs->trans("Other")."</td>\n";
|
||||
print " <td align=\"right\" width=\"160\"> </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 width="60%">'.$langs->trans("UseDispatchStatus").'</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=\"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";
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="60%">'.$langs->trans("UserWarehouseAutoCreate").'</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_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 width="60%">'.$langs->trans("AllowAddLimitStockByWarehouse").'</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_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";
|
||||
|
||||
print '<br>';
|
||||
|
||||
/* 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.
|
||||
if ($conf->global->PRODUIT_SOUSPRODUITS)
|
||||
|
|
@ -539,9 +558,8 @@ if ($conf->global->PRODUIT_SOUSPRODUITS)
|
|||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="60%">'.$langs->trans("IndependantSubProductStock").'</td>';
|
||||
|
||||
print '<td width="160" align="right">';
|
||||
print '<td>'.$langs->trans("IndependantSubProductStock").'</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=\"INDEPENDANT_SUBPRODUCT_STOCK\">";
|
||||
|
|
@ -553,8 +571,6 @@ if ($conf->global->PRODUIT_SOUSPRODUITS)
|
|||
}
|
||||
*/
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
|
|
|
|||
|
|
@ -195,4 +195,6 @@ InventoryFlushed=Inventory flushed
|
|||
ExitEditMode=Exit edition
|
||||
inventoryDeleteLine=Delete line
|
||||
RegulateStock=Regulate Stock
|
||||
ListInventory=List
|
||||
ListInventory=List
|
||||
StockSupportServices=Stock management support services
|
||||
StockSupportServicesDesc=By default, you can stock only product with type "product". If on, and if module service is on, you can also stock a product with type "service"
|
||||
Loading…
Reference in New Issue
Block a user