diff --git a/src/Services/InfoProviderSystem/DTOs/PriceDTO.php b/src/Services/InfoProviderSystem/DTOs/PriceDTO.php index 8c563149..f1eb28f7 100644 --- a/src/Services/InfoProviderSystem/DTOs/PriceDTO.php +++ b/src/Services/InfoProviderSystem/DTOs/PriceDTO.php @@ -41,6 +41,8 @@ class PriceDTO public readonly ?string $currency_iso_code, /** @var bool If the price includes tax */ public readonly ?bool $includes_tax = true, + /** @var float the price related quantity */ + public readonly ?float $price_related_quantity = 1.0, ) { $this->price_as_big_decimal = BigDecimal::of($this->price); @@ -54,4 +56,4 @@ class PriceDTO { return $this->price_as_big_decimal; } -} \ No newline at end of file +} diff --git a/src/Services/InfoProviderSystem/DTOtoEntityConverter.php b/src/Services/InfoProviderSystem/DTOtoEntityConverter.php index 881d5f20..c88ab429 100644 --- a/src/Services/InfoProviderSystem/DTOtoEntityConverter.php +++ b/src/Services/InfoProviderSystem/DTOtoEntityConverter.php @@ -87,6 +87,7 @@ final class DTOtoEntityConverter { $entity->setMinDiscountQuantity($dto->minimum_discount_amount); $entity->setPrice($dto->getPriceAsBigDecimal()); + $entity->setPriceRelatedQuantity($dto->price_related_quantity); //Currency TODO if ($dto->currency_iso_code !== null) { @@ -95,7 +96,6 @@ final class DTOtoEntityConverter $entity->setCurrency(null); } - return $entity; } @@ -289,7 +289,7 @@ final class DTOtoEntityConverter //If the entity was newly created, set the file filter if ($tmp->getID() === null) { $tmp->setFiletypeFilter('image/*'); - $tmp->setAlternativeNames(self::TYPE_DATASHEETS_NAME); + $tmp->setAlternativeNames(self::TYPE_IMAGE_NAME); } return $tmp;