What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi everyone, we have some unexpected roundings in the cart/orders. What's the reason behind taking o

U01LE4BMBK7
U01LE4BMBK7 Posts: 241 πŸ§‘πŸ»β€πŸš€ - Cadet

Hi everyone,
we have some unexpected roundings in the cart/orders. What's the reason behind taking over the rounding delta from one calculation to another? https://github.com/spryker/tax/blob/master/src/Spryker/Zed/Tax/Business/Model/AccruedTaxCalculator.php#L46

Comments

  • U01T075RRHD
    U01T075RRHD Posts: 118 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hi Philipp, what do you mean by taking over from one calculation to another?

  • U01T075RRHD
    U01T075RRHD Posts: 118 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited April 2021

    From what I can see the error delta gets calculated and stored for later reference but doesn't affect the actual tax calculation

  • U01LE4BMBK7
    U01LE4BMBK7 Posts: 241 πŸ§‘πŸ»β€πŸš€ - Cadet

    it does when the next calculation is run

  • U01LE4BMBK7
    U01LE4BMBK7 Posts: 241 πŸ§‘πŸ»β€πŸš€ - Cadet

    calculation 1: sets the rounding error delta
    calculation 2: takes that rounding error delta and uses that value

  • U01LE4BMBK7
    U01LE4BMBK7 Posts: 241 πŸ§‘πŸ»β€πŸš€ - Cadet

    netto prices for 2 products:

  • U01LE4BMBK7
    U01LE4BMBK7 Posts: 241 πŸ§‘πŸ»β€πŸš€ - Cadet

    gross prices for the same 2 products: