Hello,
Can anyone help me for How to set qty for multiple sources (Multi-source inventory) programmatically in magento 2.
Currently, I am using this code but it's not working.
$sourceItem = $objectManager->get('\Magento\InventoryApi\Api\Data\SourceInterface')->create();
$sourceItem->setSourceCode('default');
$sourceItem->setSku($productcode);
$sourceItem->setQuantity(111);
$sourceItem->setStatus(1);
$sourceItems[] = $sourceItem;
$sourceItem->execute($sourceItems);
Can anyone help to figure out How to Save Multiple Source item data Programmatically in Magento 2.3?