28 require
'../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/stock.lib.php';
31 require_once DOL_DOCUMENT_ROOT.
'/product/class/html.formproduct.class.php';
34 $langs->loadLangs(array(
"admin",
"stocks"));
41 $action =
GETPOST(
'action',
'aZ09');
42 $value =
GETPOST(
'value',
'alpha');
43 $label =
GETPOST(
'label',
'alpha');
44 $scandir =
GETPOST(
'scan_dir',
'alpha');
54 if (preg_match(
'/set_([a-z0-9_\-]+)/i', $action, $reg)) {
58 if (in_array($code, array(
'STOCK_CALCULATE_ON_BILL',
'STOCK_CALCULATE_ON_VALIDATE_ORDER',
'STOCK_CALCULATE_ON_SHIPMENT',
'STOCK_CALCULATE_ON_SHIPMENT_CLOSE'))) {
64 if (in_array($code, array(
'STOCK_CALCULATE_ON_SUPPLIER_BILL',
'STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER',
'STOCK_CALCULATE_ON_RECEPTION',
'STOCK_CALCULATE_ON_RECEPTION_CLOSE',
'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER'))) {
73 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
80 if (preg_match(
'/del_([a-z0-9_\-]+)/i', $action, $reg)) {
83 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
90 if ($action ==
'warehouse') {
91 $value =
GETPOST(
'default_warehouse',
'alpha');
92 $res =
dolibarr_set_const($db,
"MAIN_DEFAULT_WAREHOUSE", $value,
'chaine', 0,
'', $conf->entity);
93 if ($value == -1 || empty($value) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) {
101 if ($action ==
'specimen') {
102 $modele =
GETPOST(
'module',
'alpha');
105 $object->initAsSpecimen();
108 $file =
''; $classname =
''; $filefound = 0;
109 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
110 foreach ($dirmodels as $reldir) {
111 $file =
dol_buildpath($reldir.
"core/modules/stock/doc/pdf_".$modele.
".modules.php", 0);
112 if (file_exists($file)) {
114 $classname =
"pdf_".$modele;
122 $module =
new $classname($db);
124 if ($module->write_file($object, $langs) > 0) {
125 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=stock&file=SPECIMEN.pdf");
133 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
135 } elseif ($action ==
'set') {
138 } elseif ($action ==
'del') {
141 if ($conf->global->STOCK_ADDON_PDF ==
"$value") {
145 } elseif ($action ==
'setdoc') {
147 if (
dolibarr_set_const($db,
"STOCK_ADDON_PDF", $value,
'chaine', 0,
'', $conf->entity)) {
150 $conf->global->STOCK_ADDON_PDF = $value;
166 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
168 llxHeader(
'', $langs->trans(
"StockSetup"));
170 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
171 print
load_fiche_titre($langs->trans(
"StockSetup"), $linkback,
'title_setup');
183 if (!empty($conf->productbatch->enabled)) {
184 $langs->load(
"productbatch");
185 $disabled =
' disabled';
186 print
info_admin($langs->trans(
"WhenProductBatchModuleOnOptionAreForced"));
191 print
info_admin($langs->trans(
"IfYouUsePointOfSaleCheckModule"));
196 print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
197 print
'<input type="hidden" name="token" value="'.newToken().
'">';
198 print
'<input type="hidden" name="action" value="warehouse">';
201 print
'<table class="noborder centpercent">';
202 print
'<tr class="liste_titre">';
203 print
"<td>".$langs->trans(
"RuleForStockManagementDecrease").
"</td>\n";
204 print
'<td class="right">'.$langs->trans(
"Status").
'</td>'.
"\n";
209 print
'<tr class="oddeven">';
210 print
'<td>'.$langs->trans(
"DeStockOnBill").
'</td>';
211 print
'<td class="right">';
213 if ($conf->use_javascript_ajax) {
216 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
217 print
$form->selectarray(
"STOCK_CALCULATE_ON_BILL", $arrval, $conf->global->STOCK_CALCULATE_ON_BILL);
220 print $langs->trans(
"ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv(
"Module30Name"));
222 print
"</td>\n</tr>\n";
226 print
'<tr class="oddeven">';
227 print
'<td>'.$langs->trans(
"DeStockOnValidateOrder").
'</td>';
228 print
'<td class="right">';
229 if (!empty($conf->commande->enabled)) {
230 if ($conf->use_javascript_ajax) {
231 print
ajax_constantonoff(
'STOCK_CALCULATE_ON_VALIDATE_ORDER', array(),
null, 0, 0, 0, 2, 1);
233 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
234 print
$form->selectarray(
"STOCK_CALCULATE_ON_VALIDATE_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER);
237 print $langs->trans(
"ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv(
"Module25Name"));
239 print
"</td>\n</tr>\n";
245 print
'<tr class="oddeven">';
246 print
'<td>'.$langs->trans(
"DeStockOnShipment").
'</td>';
247 print
'<td class="right">';
248 if (!empty($conf->expedition->enabled)) {
249 if ($conf->use_javascript_ajax) {
250 print
ajax_constantonoff(
'STOCK_CALCULATE_ON_SHIPMENT', array(),
null, 0, 0, 0, 2, 1);
252 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
253 print
$form->selectarray(
"STOCK_CALCULATE_ON_SHIPMENT", $arrval, $conf->global->STOCK_CALCULATE_ON_SHIPMENT);
256 print $langs->trans(
"ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv(
"Module80Name"));
258 print
"</td>\n</tr>\n";
262 print
'<tr class="oddeven">';
263 print
'<td>'.$langs->trans(
"DeStockOnShipmentOnClosing").
'</td>';
264 print
'<td class="right">';
265 if (!empty($conf->expedition->enabled)) {
266 if ($conf->use_javascript_ajax) {
267 print
ajax_constantonoff(
'STOCK_CALCULATE_ON_SHIPMENT_CLOSE', array(),
null, 0, 0, 0, 2, 1);
269 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
270 print
$form->selectarray(
"STOCK_CALCULATE_ON_SHIPMENT_CLOSE", $arrval, $conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE);
273 print $langs->trans(
"ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv(
"Module80Name"));
275 print
"</td>\n</tr>\n";
285 print
'<table class="noborder centpercent">';
286 print
'<tr class="liste_titre">';
287 print
"<td>".$langs->trans(
"RuleForStockManagementIncrease").
"</td>\n";
288 print
'<td class="right">'.$langs->trans(
"Status").
'</td>'.
"\n";
293 print
'<tr class="oddeven">';
294 print
'<td>'.$langs->trans(
"ReStockOnBill").
'</td>';
295 print
'<td class="right">';
296 if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) {
297 if ($conf->use_javascript_ajax) {
298 print
ajax_constantonoff(
'STOCK_CALCULATE_ON_SUPPLIER_BILL', array(),
null, 0, 0, 0, 2, 1);
300 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
301 print
$form->selectarray(
"STOCK_CALCULATE_ON_SUPPLIER_BILL", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL);
304 print $langs->trans(
"ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv(
"Module40Name"));
306 print
"</td>\n</tr>\n";
311 print
'<tr class="oddeven">';
312 print
'<td>'.$langs->trans(
"ReStockOnValidateOrder").
'</td>';
313 print
'<td class="right">';
314 if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) {
315 if ($conf->use_javascript_ajax) {
316 print
ajax_constantonoff(
'STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER', array(),
null, 0, 0, 0, 2, 1);
318 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
319 print
$form->selectarray(
"STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER);
322 print $langs->trans(
"ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv(
"Module40Name"));
324 print
"</td>\n</tr>\n";
327 if (!empty($conf->reception->enabled)) {
328 print
'<tr class="oddeven">';
329 print
'<td>'.$langs->trans(
"StockOnReception").
'</td>';
330 print
'<td class="right">';
332 if ($conf->use_javascript_ajax) {
333 print
ajax_constantonoff(
'STOCK_CALCULATE_ON_RECEPTION', array(),
null, 0, 0, 0, 2, 1);
335 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
336 print
$form->selectarray(
"STOCK_CALCULATE_ON_RECEPTION", $arrval, $conf->global->STOCK_CALCULATE_ON_RECEPTION);
339 print
"</td>\n</tr>\n";
343 print
'<tr class="oddeven">';
344 print
'<td>'.$langs->trans(
"StockOnReceptionOnClosing").
'</td>';
345 print
'<td class="right">';
347 if ($conf->use_javascript_ajax) {
348 print
ajax_constantonoff(
'STOCK_CALCULATE_ON_RECEPTION_CLOSE', array(),
null, 0, 0, 0, 2, 1);
350 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
351 print
$form->selectarray(
"STOCK_CALCULATE_ON_RECEPTION_CLOSE", $arrval, $conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE);
353 print
"</td>\n</tr>\n";
356 print
'<tr class="oddeven">';
357 print
'<td>'.$langs->trans(
"ReStockOnDispatchOrder").
'</td>';
358 print
'<td class="right">';
359 if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) {
360 if ($conf->use_javascript_ajax) {
361 print
ajax_constantonoff(
'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER', array(),
null, 0, 0, 0, 2, 1);
363 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
364 print
$form->selectarray(
"STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER);
367 print $langs->trans(
"ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv(
"Module40Name"));
369 print
"</td>\n</tr>\n";
377 print
'<table class="noborder centpercent">';
378 print
'<tr class="liste_titre">';
379 print
"<td>".$langs->trans(
"RuleForStockAvailability").
"</td>\n";
380 print
'<td class="right">'.$langs->trans(
"Status").
'</td>'.
"\n";
384 print
'<tr class="oddeven">';
385 print
'<td>'.$langs->trans(
"WarehouseAllowNegativeTransfer").
'</td>';
386 print
'<td class="right">';
387 if ($conf->use_javascript_ajax) {
390 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
391 print
$form->selectarray(
"STOCK_ALLOW_NEGATIVE_TRANSFER", $arrval, $conf->global->STOCK_ALLOW_NEGATIVE_TRANSFER);
397 if (!empty($conf->invoice->enabled)) {
398 print
'<tr class="oddeven">';
399 print
'<td>'.$langs->trans(
"StockMustBeEnoughForInvoice").
'</td>';
400 print
'<td class="right">';
401 if ($conf->use_javascript_ajax) {
404 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
405 print
$form->selectarray(
"STOCK_MUST_BE_ENOUGH_FOR_INVOICE", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE);
411 if (!empty($conf->order->enabled)) {
412 print
'<tr class="oddeven">';
413 print
'<td>'.$langs->trans(
"StockMustBeEnoughForOrder").
'</td>';
414 print
'<td class="right">';
415 if ($conf->use_javascript_ajax) {
418 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
419 print
$form->selectarray(
"STOCK_MUST_BE_ENOUGH_FOR_ORDER", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER);
425 if (!empty($conf->expedition->enabled)) {
426 print
'<tr class="oddeven">';
427 print
'<td>'.$langs->trans(
"StockMustBeEnoughForShipment").
'</td>';
428 print
'<td class="right">';
429 if ($conf->use_javascript_ajax) {
432 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
433 print
$form->selectarray(
"STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT);
442 $virtualdiffersfromphysical = 0;
443 if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
444 || !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)
445 || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)
446 || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION)
447 || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)
448 || !empty($conf->mrp->enabled)) {
449 $virtualdiffersfromphysical = 1;
452 if ($virtualdiffersfromphysical) {
453 print
'<table class="noborder centpercent">';
454 print
'<tr class="liste_titre">';
455 print
"<td>".$langs->trans(
"RuleForStockReplenishment").
" ".
img_help(
'help', $langs->trans(
"VirtualDiffersFromPhysical")).
"</td>\n";
456 print
'<td class="right">'.$langs->trans(
"Status").
'</td>'.
"\n";
459 print
'<tr class="oddeven">';
461 print
$form->textwithpicto($langs->trans(
"UseRealStockByDefault"), $langs->trans(
"ReplenishmentCalculation"));
463 print
'<td class="right">';
464 if ($conf->use_javascript_ajax) {
467 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
468 print
$form->selectarray(
"STOCK_USE_REAL_STOCK_BY_DEFAULT_FOR_REPLENISHMENT", $arrval, $conf->global->STOCK_USE_REAL_STOCK_BY_DEFAULT_FOR_REPLENISHMENT);
480 print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
481 print
'<input type="hidden" name="token" value="'.newToken().
'">';
482 print
'<input type="hidden" name="action" value="warehouse">';
494 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
495 $sql .=
" WHERE type = '".$db->escape($type).
"'";
496 $sql .=
" AND entity = ".$conf->entity;
497 $resql = $db->query($sql);
500 $num_rows = $db->num_rows(
$resql);
501 while ($i < $num_rows) {
502 $array = $db->fetch_array(
$resql);
503 array_push($def, $array[0]);
511 print
"<table class=\"noborder\" width=\"100%\">\n";
512 print
"<tr class=\"liste_titre\">\n";
513 print
'<td>'.$langs->trans(
"Name").
'</td>';
514 print
'<td>'.$langs->trans(
"Description").
'</td>';
515 print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
516 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
517 print
'<td class="center" width="38">'.$langs->trans(
"ShortInfo").
'</td>';
518 print
'<td class="center" width="38">'.$langs->trans(
"Preview").
'</td>';
523 foreach ($dirmodels as $reldir) {
524 foreach (array(
'',
'/doc') as $valdir) {
525 $realpath = $reldir.
"core/modules/stock".$valdir;
529 $handle = opendir($dir);
530 if (is_resource($handle)) {
531 while (($file = readdir($handle)) !==
false) {
537 foreach ($filelist as $file) {
538 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
539 if (file_exists($dir.
'/'.$file)) {
540 $name = substr($file, 4,
dol_strlen($file) - 16);
541 $classname = substr($file, 0,
dol_strlen($file) - 12);
543 require_once $dir.
'/'.$file;
544 $module =
new $classname($db);
546 $modulequalified = 1;
547 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
548 $modulequalified = 0;
550 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
551 $modulequalified = 0;
554 if ($modulequalified) {
555 print
'<tr class="oddeven"><td width="100">';
556 print (empty($module->name) ? $name : $module->name);
558 if (method_exists($module,
'info')) {
559 print $module->info($langs);
561 print $module->description;
566 if (in_array($name, $def)) {
567 print
'<td class="center">'.
"\n";
568 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.urlencode($name).
'">';
569 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
573 print
'<td class="center">'.
"\n";
574 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
579 print
'<td class="center">';
580 if ($conf->global->STOCK_ADDON_PDF == $name) {
581 print
img_picto($langs->trans(
"Default"),
'on');
583 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoc&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
588 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
589 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
590 if ($module->type ==
'pdf') {
591 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
593 $htmltooltip .=
'<br>'.$langs->trans(
"Path").
': '.preg_replace(
'/^\//',
'', $realpath).
'/'.$file;
595 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
596 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
597 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
600 print
'<td class="center">';
601 print
$form->textwithpicto(
'', $htmltooltip, 1, 0);
605 print
'<td class="center">';
606 if ($module->type ==
'pdf') {
607 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
609 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
630 print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
631 print
'<input type="hidden" name="token" value="'.newToken().
'">';
632 print
'<input type="hidden" name="action" value="warehouse">';
636 print
'<table class="noborder centpercent">';
638 print
'<tr class="liste_titre">';
639 print
"<td>".$langs->trans(
"Parameter").
"</td>\n";
640 print
'<td class="right">'.$langs->trans(
"Value").
'</td>'.
"\n";
643 print
'<tr class="oddeven">';
644 print
'<td>'.$langs->trans(
"MainDefaultWarehouse").
'</td>';
645 print
'<td class="right">';
646 print $formproduct->selectWarehouses($conf->global->MAIN_DEFAULT_WAREHOUSE,
'default_warehouse',
'', 1, 0, 0,
'', 0, 0, array(),
'left reposition');
647 print
'<input type="submit" class="button button-edit small" value="'.$langs->trans(
"Modify").
'">';
651 print
'<tr class="oddeven">';
652 print
'<td>'.$langs->trans(
"UserDefaultWarehouse").
'</td>';
653 print
'<td class="right">';
654 if ($conf->use_javascript_ajax) {
657 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
658 print
$form->selectarray(
"MAIN_DEFAULT_WAREHOUSE_USER", $arrval, $conf->global->MAIN_DEFAULT_WAREHOUSE_USER);
663 if (!empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) {
664 print
'<tr class="oddeven">';
665 print
'<td>'.$langs->trans(
"UserWarehouseAutoCreate").
'</td>';
666 print
'<td class="right">';
667 if ($conf->use_javascript_ajax) {
670 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
671 print
$form->selectarray(
"STOCK_USERSTOCK_AUTOCREATE", $arrval, $conf->global->STOCK_USERSTOCK_AUTOCREATE);
677 print
'<tr class="oddeven">';
678 print
'<td>'.$langs->trans(
"WarehouseAskWarehouseOnThirparty").
'</td>';
679 print
'<td class="right">';
680 if ($conf->use_javascript_ajax) {
683 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
684 print
$form->selectarray(
"SOCIETE_ASK_FOR_WAREHOUSE", $arrval, $conf->global->SOCIETE_ASK_FOR_WAREHOUSE);
689 print
'<tr class="oddeven">';
690 print
'<td>'.$langs->trans(
"WarehouseAskWarehouseDuringPropal").
'</td>';
691 print
'<td class="right">';
692 if ($conf->use_javascript_ajax) {
695 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
696 print
$form->selectarray(
"WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL", $arrval, $conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL);
701 print
'<tr class="oddeven">';
702 print
'<td>'.$langs->trans(
"WarehouseAskWarehouseDuringOrder").
'</td>';
703 print
'<td class="right">';
704 if ($conf->use_javascript_ajax) {
707 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
708 print
$form->selectarray(
"WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER", $arrval, $conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER);
727 print
'<tr class="oddeven">';
729 print
$form->textwithpicto($langs->trans(
"StockSupportServices"), $langs->trans(
"StockSupportServicesDesc"));
731 print
'<td class="right">';
732 if ($conf->use_javascript_ajax) {
735 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
736 print
$form->selectarray(
"STOCK_SUPPORTS_SERVICES", $arrval, $conf->global->STOCK_SUPPORTS_SERVICES);
741 print
'<tr class="oddeven">';
742 print
'<td>'.$langs->trans(
"AllowAddLimitStockByWarehouse").
'</td>';
743 print
'<td class="right">';
744 if ($conf->use_javascript_ajax) {
747 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
748 print
$form->selectarray(
"STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE", $arrval, $conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE);
753 print
'<tr class="oddeven">';
754 print
'<td>'.$langs->trans(
"AlwaysShowFullArbo").
'</td>';
755 print
'<td class="right">';
756 if ($conf->use_javascript_ajax) {
759 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
760 print
$form->selectarray(
"STOCK_ALWAYS_SHOW_FULL_ARBO", $arrval, $conf->global->STOCK_ALWAYS_SHOW_FULL_ARBO);