Fixed other placeholders besides the IPN Barcodes

This commit is contained in:
Jan Böhmer 2023-11-05 21:42:39 +01:00
parent cf11320789
commit 9732b71f85
2 changed files with 3 additions and 2 deletions

View file

@ -26,7 +26,7 @@ parameters:
checkUninitializedProperties: true checkUninitializedProperties: true
checkFunctionNameCase: true checkFunctionNameCase: false
checkAlwaysTrueInstanceof: false checkAlwaysTrueInstanceof: false
checkAlwaysTrueCheckTypeFunctionCall: false checkAlwaysTrueCheckTypeFunctionCall: false

View file

@ -75,7 +75,8 @@ final class BarcodeProvider implements PlaceholderProviderInterface
return $this->barcodeGenerator->generateHTMLBarcode($label_options, $label_target); return $this->barcodeGenerator->generateHTMLBarcode($label_options, $label_target);
} }
if ($label_target instanceof Part || $label_target instanceof PartLot) { if (($label_target instanceof Part || $label_target instanceof PartLot)
&& str_starts_with($placeholder, '[[IPN_BARCODE_')) {
if ($label_target instanceof PartLot) { if ($label_target instanceof PartLot) {
$label_target = $label_target->getPart(); $label_target = $label_target->getPart();
} }