Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento 1.x Quote vs Order tax rounding issue #389

Open
seansan opened this issue Nov 27, 2017 · 4 comments
Open

Magento 1.x Quote vs Order tax rounding issue #389

seansan opened this issue Nov 27, 2017 · 4 comments

Comments

@seansan
Copy link
Contributor

seansan commented Nov 27, 2017

Hi, we are seeing a Quote vs Order tax rounding issue (1.9.3.x) and though I'd report it here.

In short, when we apply discounts for the following order

  • product 59,95
  • discount 10%
  • grandtotal = 53,955

we see that

  • quote totals are 95,96 using
    $totals = $this->_getQuote()->getTotals();
    $totals['grand_total']->getValue(); or $this->_getQuote()->getGrandTotal()
  • and order $order->getGrandTotal() = instance 95,95

May be related to here
magento/magento2#446

Problem is that 1 API uses quote to start a process in our ios app. And later tries to link this back to the order. But this never succeeds, because there is a 1 cent difference

Was this issue adressed before? I read a lot about rounding issues but nothing specific to this case other then Kristoffs post above

@tomekjordan
Copy link

tomekjordan commented Nov 27, 2017

Hi. I saw similar things when I used bundles and discounts, when I used Paypal with discounts, when I used points rewards extensions discounts in shopping cart.
I see many times subtotal differes than row total - no matter what tax calculation method I use. The best so far is row total, while by unit makes this even worse (but should be the best method to calculate)

Looks like this is still a problem - in many cases - at least in 1.9.3.x

@kanevbg
Copy link
Contributor

kanevbg commented Aug 1, 2019

It seems I am hitting this same thing

@rafaelpatro
Copy link
Contributor

Same to me.

The issue is related to this method I guess:

return round($price, 2);

roundPrice is widely applied

$totals = $store->roundPrice($totals);

Maybe truncating could be a solution:

    public function roundPrice($price)
    {
        return intval($price * 100) / 100;
    }

@addison74
Copy link
Contributor

This issue was reported 5 years ago and updated in 2019. What can we do with it? Create a PR if it confirms?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants