This commit is contained in:
Bernd Bestel
2023-05-19 18:08:26 +02:00
parent 49daed6c2b
commit 5f65f2abd0
69 changed files with 204 additions and 502 deletions

View File

@@ -821,13 +821,13 @@ class StockService extends BaseService
public function GetProductIdFromBarcode(string $barcode)
{
// first, try to parse this as a product grocycode
// first, try to parse this as a product Grocycode
if (Grocycode::Validate($barcode))
{
$gc = new Grocycode($barcode);
if ($gc->GetType() != Grocycode::PRODUCT)
{
throw new \Exception('Invalid grocycode');
throw new \Exception('Invalid Grocycode');
}
return $gc->GetId();
}