Lookup product barcodes case insensitive (fixes #1734)

This commit is contained in:
Bernd Bestel
2022-01-06 13:42:38 +01:00
parent 8455b5a64a
commit ad0dbdfc22
2 changed files with 2 additions and 1 deletions

View File

@@ -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");