FIX TakePos barcode rule (#31857)
* FIX TakePos barcode rule * Keep last test confition on barcode rule
This commit is contained in:
parent
991f53db9e
commit
c12a7e144a
2 changed files with 3 additions and 3 deletions
|
|
@ -212,7 +212,7 @@ if ($action == 'getProducts') {
|
|||
if (isset($barcode_value_list['qd'])) {
|
||||
$qty_str .= '.' . $barcode_value_list['qd'];
|
||||
}
|
||||
$qty = floatval($qty_str);
|
||||
$qty = (float) $qty_str;
|
||||
}
|
||||
|
||||
$objProd = new Product($db);
|
||||
|
|
@ -241,7 +241,7 @@ if ($action == 'getProducts') {
|
|||
'label' => $obj->label,
|
||||
'tosell' => $obj->tosell,
|
||||
'tobuy' => $obj->tobuy,
|
||||
'barcode' => $obj->barcode,
|
||||
'barcode' => $term, // there is only one product matches the barcode rule and so the term is considered as the barcode of this product,
|
||||
'price' => empty($objProd->multiprices[$pricelevel]) ? $obj->price : $objProd->multiprices[$pricelevel],
|
||||
'price_ttc' => empty($objProd->multiprices_ttc[$pricelevel]) ? $obj->price_ttc : $objProd->multiprices_ttc[$pricelevel],
|
||||
'object' => 'product',
|
||||
|
|
|
|||
|
|
@ -731,7 +731,7 @@ function Search2(keyCodeForEnter, moreorless) {
|
|||
console.log("There is only 1 answer with barcode matching the search, so we change the thirdparty "+data[0]['rowid']);
|
||||
ChangeThirdparty(data[0]['rowid']);
|
||||
}
|
||||
else if ($('#search').val() == data[0]['barcode'] && 'product' == data[0]['object']) {
|
||||
else if ('product' == data[0]['object'] && $('#search').val() == data[0]['barcode']) {
|
||||
console.log("There is only 1 answer and we found search on a barcode, so we add the product in basket, qty="+data[0]['qty']);
|
||||
ClickProduct(0, data[0]['qty']);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue