mirror of
https://github.com/grocy/grocy.git
synced 2025-10-14 09:11:11 +00:00
Lookup product barcodes case insensitive (fixes #1734)
This commit is contained in:
@@ -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