diff --git a/src/Entity/Attachments/AttachmentType.php b/src/Entity/Attachments/AttachmentType.php index 375defa0..7a314ffe 100644 --- a/src/Entity/Attachments/AttachmentType.php +++ b/src/Entity/Attachments/AttachmentType.php @@ -213,7 +213,7 @@ class AttachmentType extends AbstractStructuralDBElement $tmp = []; foreach ($this->allowed_targets as $target) { - if (Attachment::ORM_DISCRIMINATOR_MAP[$target]) { + if (isset(Attachment::ORM_DISCRIMINATOR_MAP[$target])) { $tmp[] = Attachment::ORM_DISCRIMINATOR_MAP[$target]; } //Otherwise ignore the entry, as it is invalid diff --git a/src/Services/EntityMergers/Mergers/PartMerger.php b/src/Services/EntityMergers/Mergers/PartMerger.php index d1f5c137..8397257e 100644 --- a/src/Services/EntityMergers/Mergers/PartMerger.php +++ b/src/Services/EntityMergers/Mergers/PartMerger.php @@ -59,6 +59,7 @@ class PartMerger implements EntityMergerInterface $this->useOtherValueIfNotEmtpy($target, $other, 'manufacturer_product_number'); $this->useOtherValueIfNotEmtpy($target, $other, 'mass'); $this->useOtherValueIfNotEmtpy($target, $other, 'ipn'); + $this->useOtherValueIfNotEmtpy($target, $other, 'gtin'); //Merge relations to other entities $this->useOtherValueIfNotNull($target, $other, 'manufacturer'); @@ -184,4 +185,4 @@ class PartMerger implements EntityMergerInterface } } } -} \ No newline at end of file +} diff --git a/src/Services/InfoProviderSystem/Providers/ReicheltProvider.php b/src/Services/InfoProviderSystem/Providers/ReicheltProvider.php index 0adf9ab6..88bf33cb 100644 --- a/src/Services/InfoProviderSystem/Providers/ReicheltProvider.php +++ b/src/Services/InfoProviderSystem/Providers/ReicheltProvider.php @@ -149,6 +149,7 @@ class ReicheltProvider implements InfoProviderInterface $priceString = $dom->filter('meta[itemprop="price"]')->attr('content'); $currency = $dom->filter('meta[itemprop="priceCurrency"]')->attr('content', 'EUR'); + $gtin = null; foreach (['gtin13', 'gtin14', 'gtin12', 'gtin8'] as $gtinType) { if ($dom->filter("[itemprop=\"$gtinType\"]")->count() > 0) { $gtin = $dom->filter("[itemprop=\"$gtinType\"]")->innerText(); diff --git a/src/Services/LabelSystem/BarcodeScanner/GTINBarcodeScanResult.php b/src/Services/LabelSystem/BarcodeScanner/GTINBarcodeScanResult.php index 389bfdcc..30aaa223 100644 --- a/src/Services/LabelSystem/BarcodeScanner/GTINBarcodeScanResult.php +++ b/src/Services/LabelSystem/BarcodeScanner/GTINBarcodeScanResult.php @@ -43,8 +43,6 @@ readonly class GTINBarcodeScanResult implements BarcodeScanResultInterface 'GTIN' => $this->gtin, 'GTIN type' => $obj->getType(), 'Valid' => $this->validator->isValid() ? 'Yes' : 'No', - 'Reference Number' => $obj->getReferenceNumber(), - 'Check Digit' => $obj->getCheckDigit(), ]; }