Make product barcode matching case insensitive (closes #2609)

This commit is contained in:
Bernd Bestel 2025-01-13 22:29:33 +01:00
parent cc40344845
commit caa28af0d2
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
3 changed files with 3 additions and 2 deletions

View File

@ -19,6 +19,7 @@
- => Quick video demo (using a Barcode Laser Scanner): https://www.youtube.com/watch?v=-moXPA-VvGc
- => Quick video demo (using Browser Camera Barcode Scanning): https://www.youtube.com/watch?v=veezFX4X1JU
- Optimized that when moving a product to a freezer location (so when freezing it) the due date will no longer be replaced when the product option "Default due days after freezing" is set to `0`
- Product barcode matching is now case-insensitive
- Added a new column "Product picture" on the products list (master data) page (hidden by default)
- Fixed that a once set quantity unit on a product barcode could not be removed on edit
- Fixed that when consuming a specific stock entry which is opened, and which originated from a before partly opened stock entry, the unopened one was wrongly consume instead

View File

@ -175,7 +175,7 @@ $('#product_id_text_input').on('blur', function(e)
}
else // Normal product barcode handling
{
possibleOptionElement = $("#product_id option[data-additional-searchdata*=\"" + input + ",\"]").first();
possibleOptionElement = $("#product_id option[data-additional-searchdata*=\"" + input.toLowerCase() + ",\"]").first();
}
if (GetUriParam('flow') === undefined && input.length > 0 && possibleOptionElement.length > 0)

View File

@ -66,7 +66,7 @@
$bc = FindObjectInArrayByPropertyValue($barcodes, 'product_id', $product->id);
}
@endphp
<option data-additional-searchdata="@if(isset($bc)){{ $bc->barcodes }}@endif,"
<option data-additional-searchdata="@if(isset($bc)){{ strtolower($bc->barcodes) }}@endif,"
value="{{ $product->id }}">{{ $product->name }}</option>
@endforeach
</select>