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

@@ -59,7 +59,7 @@ class PrintService extends BaseService
$printer->selectPrintMode(Printer::MODE_DOUBLE_WIDTH);
$printer->setTextSize(4, 4);
$printer->setReverseColors(true);
$printer->text('grocy');
$printer->text('Grocy');
$printer->setJustification();
$printer->setTextSize(1, 1);
$printer->setReverseColors(false);

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();
}