mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Lookup product barcodes case insensitive (fixes #1734)
This commit is contained in:
@@ -4,3 +4,4 @@
|
||||
- Fixed that stock entry labels on purchase were printed, even when "No label" was selected (was only a problem when running label printer WebHooks server side)
|
||||
- Fixed that formatted (HTML) text for the (hidden by default) product description column on the stock overview page was not correctly displayed
|
||||
- Fixed that numeric and date-time sorting of table columns on the stock entries page did not work correctly (thanks @MasterofJOKers)
|
||||
- Fixed that the barcode lookup for the "Stock by-barcode" API endpoints was case sensitive
|
||||
|
@@ -775,7 +775,7 @@ class StockService extends BaseService
|
||||
return intval($gc->GetId());
|
||||
}
|
||||
|
||||
$potentialProduct = $this->getDatabase()->product_barcodes()->where('barcode = :1', $barcode)->fetch();
|
||||
$potentialProduct = $this->getDatabase()->product_barcodes()->where('barcode = :1 COLLATE NOCASE', $barcode)->fetch();
|
||||
if ($potentialProduct === null)
|
||||
{
|
||||
throw new \Exception("No product with barcode $barcode found");
|
||||
|
Reference in New Issue
Block a user