Update html.form.class.php
Complete the Fix to #15565 Enhanced behaviour to select product on customer/supplier order to be able to use barcode reader efficiently. Answer to Eldy, https://github.com/Dolibarr/dolibarr/pull/15704#discussion_r538763166 In fact the change alone to htdocs/core/lib/ajax.lib.php is not, for me, sufficient to fix the issue. if $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 0, the combo remains even if the product is alone. So I recommend that the code is $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 1, (wihout combo) for product selection only for customer order filling because for this usage the the probability is higher to use a barcode scanner. It is less relevant for filling supplier orders (which are not usually entered by barcode scanner), because the combo gives verification information which then disappears. (This is especially true for the purchase price, which is not pre-filled in the box for the moment I tested(?).
This commit is contained in:
parent
a0d9d98402
commit
b3ca58d2d0
@ -1995,7 +1995,7 @@ class Form
|
||||
if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES) && !empty($socid)) {
|
||||
$urloption .= '&socid='.$socid;
|
||||
}
|
||||
$out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajax/products.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 0, $ajaxoptions);
|
||||
$out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajax/products.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 1, $ajaxoptions);
|
||||
|
||||
if (!empty($conf->variants->enabled)) {
|
||||
$out .= '
|
||||
|
||||
Loading…
Reference in New Issue
Block a user