Off by a penny in the UI

When adding up all charges for one of our bills, I’m still off by a penny. I suspect this to be a floating point error, but I’m not sure where this is happening…

When using the query below, I’m getting the same total for “storage” as seen in the UI; however, when I manually calculate the sum by adding each individual storage charge for a bill, I’m off by a penny. I checked the math several times.

So I’m seeing the same storage sum in the UI and when querying the API, but when adding up the individual charges in the UI, for a single bill, I’m off by a penny.

Which number do I trust?

Query:

query bill {
        bills {
        request_id
        complexity
        data (first: 120 + [NEXT_PAGE]) {
            pageInfo {
                hasNextPage
                hasPreviousPage
                startCursor
                endCursor
            }
            edges {
            node {
                id
                legacy_id
                totals (first: 15) {
                    pageInfo {
                        hasNextPage
                        endCursor
                    }
                    edges {
                        node {
                            id
                            legacy_id
                            amount
                            label
                            category
                            quantity
                        }
                    }
                }
            }
            cursor
            }
        }
        }
    }

Hey @cschouten,

Thanks for reaching out. I’ll take a look at this and get back to you with an update as soon as I can.

Please let me know if you have any questions or concerns.

Best,
RayanP

Hey @cschouten,

Thanks for hanging in there!

Looking into this with the Team to find the best answer for you. Will have an update for you shortly.

Best,
RayanP

Hi @Rayanp,

Any updates with this thread?

Thanks,
Colin

Hey @cschouten,

We’re still trying to figure out if this issue is a bug or not. Going to bump this question and hopefully get back to you soon.

Thank you for hanging in there!

Best,
RayanP

Hi @Rayanp,

Thanks for giving this a bump. For context, not having clarity on which number to trust is severely impacting our ability to do billing at the end of the month.

If possible, may we get an ETA from ShipHero on if this is a bug or not?

Cheers,
Colin

Hey @cschouten,

I think in the interest of time I’m going to escalate this issue as a bug to our Engineering Team.
Thanks for hanging in there, I’ll keep you updated on how this progresses.

Please let me know if you have any questions or concerns.

Best,
RayanP

@Rayanp Any updates from the Engineering Team?

Hey @cschouten,

This issue is still making it’s way to our Engineering Team. I’ll bump the issue.
Let me know if there’s anything I can do to assist.

Best,
RayanP

Any updates @Rayanp?

Hey @cschouten,

Unfortunately, I don’t have an update for you regarding this. I will bump it again.

I’ll try to get in touch with someone in product so at the very least you’ll know which one to trust here, while the Engineers can just work on the fix whenever it gets to them.

Apologies for the delay, hoping to have a helpful update for you soon.
Let me know if there’s anything I can do to help in the meantime.

Best,
RayanP