Don't print stock entry labels when not desired (server side WebHook execution) (references #1686)

This commit is contained in:
Bernd Bestel 2021-11-15 09:06:19 +01:00
parent 33ca6070f4
commit b83e4f53b1
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
- 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)

View File

@ -268,7 +268,7 @@ class StockService extends BaseService
]);
$stockRow->save();
if (GROCY_FEATURE_FLAG_LABEL_PRINTER && GROCY_LABEL_PRINTER_RUN_SERVER)
if ($stockLabelType == 1 && GROCY_FEATURE_FLAG_LABEL_PRINTER && GROCY_LABEL_PRINTER_RUN_SERVER)
{
$webhookData = array_merge([
'product' => $productDetails->product->name,