1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Magento 2 - amounts are not rounded in sales_order_payment table

Discussion in 'Programming/Internet' started by Diego Guerrero, Oct 8, 2018.

  1. I have a payment method, which at the time of doing the place order, is saved in the table sales_order_payment the amounts wrong. I attach an image.


    The last 4 decimals of the amount_paid field, is not the same as base_amount_ordered

    In order to save the order, I get this: $ order-> getGrandTotal () = 31.0755 when it should be 31.0800

    I have tried to modify it in this way:


    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $quoteFactory = $objectManager->create('\Magento\Quote\Model\QuoteFactory');
    $quote = $quoteFactory->create()->load($order->getQuoteId());






    but in no way I have managed to set the correct value, can you give me an idea or help me in how can I do ?

    Login To add answer/comment

Share This Page