I am setting up the custom price with some calculation during add to cart and update cart.
I am using following code to add custom price
$fPrice = 39.1467 // after calculation
$qty = 24;
$item->setCustomPrice($fPrice);
$item->setOriginalCustomPrice($fPrice);
$item->getProduct()->setIsSuperMode(true);
Magento 2 calculating the row subtotal with this price and 24 quantity = $939.60 instead it should be $939.52. I have checked into the database and found that it is calculating with $fprice = 39.15
but I want to calculate with $fPrice = 39.1467
to correct the subtotal value.
Any help would be much appreciated. Thanks.