src/Sulu/Bundle/Sales/CoreBundle/Item/ItemManager.php
private function updatePrices(ApiItemInterface $item, $data)
    {
        //TODO: currency
        $currency = null;

        // set products price by data
        if ($item->getUseProductsPrice() === false) {
            $item->setPrice($this->getProperty($data, 'price', $item->getPrice()));
        }

        // set items total net price
        $price = $this->itemPriceCalculator->calculate($item, $currency, $item->getUseProductsPrice());
        $item->setTotalNetPrice($price);

        // set items price
        $itemPrice = $this->itemPriceCalculator->getItemPrice($item, $currency, $item->getUseProductsPrice());
        $item->setPrice($itemPrice);
    }
private function updatePrices(ApiItemInterface $item, $data)
    {
        //TODO: currency
        $currency = null;

        // set products price by data
        if ($item->getUseProductsPrice() === false) {
            $item->setPrice($this->getProperty($data, 'price', $item->getPrice()));
        }

        // set items total net price
        $price = $this->itemPriceCalculator->calculate($item, $currency, $item->getUseProductsPrice());
        $item->setTotalNetPrice($price);

        // set items price
        $itemPrice = $this->itemPriceCalculator->getItemPrice($item, $currency, $item->getUseProductsPrice());
        $item->setPrice($itemPrice);
    }
private function updatePrices ( ApiItemInterface $ item , $ data ) { //TODO: currency $ currency = null ; // set products price by data if ( $ item -> getUseProductsPrice ( ) === false ) { $ item -> setPrice ( $ this -> getProperty ( $ data , 'price' , $ item -> getPrice ( ) ) ) ; } // set items total net price $ price = $ this -> itemPriceCalculator -> calculate ( $ item , $ currency , $ item -> getUseProductsPrice ( ) ) ; $ item -> setTotalNetPrice ( $ price ) ; // set items price $ itemPrice = $ this -> itemPriceCalculator -> getItemPrice ( $ item , $ currency , $ item -> getUseProductsPrice ( ) ) ; $ item -> setPrice ( $ itemPrice ) ; }
Function updates item prices its product data

@param ApiItemInterface $item
@param array $data
Function updates item prices its product data