diff --git a/vendor/magento/module-inventory-catalog-admin-ui/Ui/DataProvider/Product/Listing/Modifier/QuantityPerSource.php b/vendor/magento/module-inventory-catalog-admin-ui/Ui/DataProvider/Product/Listing/Modifier/QuantityPerSource.php index 38bbf4428ee..7b43dbf6a87 100644 --- a/vendor/magento/module-inventory-catalog-admin-ui/Ui/DataProvider/Product/Listing/Modifier/QuantityPerSource.php +++ b/vendor/magento/module-inventory-catalog-admin-ui/Ui/DataProvider/Product/Listing/Modifier/QuantityPerSource.php @@ -105,6 +105,7 @@ class QuantityPerSource extends AbstractModifier foreach ($dataItems as $key => $item) { if (in_array($item['type_id'], $allowedProductTypes)) { + $item['sku'] = htmlspecialchars_decode($item['sku'], ENT_QUOTES | ENT_SUBSTITUTE); $itemsBySkus[$item['sku']] = $key; continue; } diff --git a/vendor/magento/module-inventory-sales-admin-ui/Model/GetSalableQuantityDataBySku.php b/vendor/magento/module-inventory-sales-admin-ui/Model/GetSalableQuantityDataBySku.php index edafa5ea823..019e163d647 100644 --- a/vendor/magento/module-inventory-sales-admin-ui/Model/GetSalableQuantityDataBySku.php +++ b/vendor/magento/module-inventory-sales-admin-ui/Model/GetSalableQuantityDataBySku.php @@ -7,13 +7,17 @@ declare(strict_types=1); namespace Magento\InventorySalesAdminUi\Model; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\InventoryConfigurationApi\Exception\SkuIsNotAssignedToStockException; use Magento\InventorySalesAdminUi\Model\ResourceModel\GetAssignedStockIdsBySku; use Magento\InventoryApi\Api\StockRepositoryInterface; use Magento\InventorySalesApi\Api\GetProductSalableQtyInterface; use Magento\InventoryConfigurationApi\Api\GetStockItemConfigurationInterface; /** - * Get salable quantity data by sku + * Get salable quantity data of product by sku */ class GetSalableQuantityDataBySku { @@ -56,12 +60,19 @@ class GetSalableQuantityDataBySku } /** + * Get salable quantity of product by sku + * * @param string $sku * @return array + * @throws InputException + * @throws LocalizedException + * @throws NoSuchEntityException + * @throws SkuIsNotAssignedToStockException */ public function execute(string $sku): array { $stockInfo = []; + $sku = htmlspecialchars_decode($sku, ENT_QUOTES | ENT_SUBSTITUTE); $stockIds = $this->getAssignedStockIdsBySku->execute($sku); if (count($stockIds)) { foreach ($stockIds as $stockId) {