Skip to content

[Bug]: there is a floating point error in the api #310

Description

@nkxxll

What happened?

route: /receitps -> transaction_data -> products -> price_with_vat

When you have a product which is e.g. 2.50 with 7% vat than the product price is 2.33 and the price_with_vat is 2.49. We loose a cent.
2.50 / 1.07 = 2,3364485981 only the last two decimals are kept => 2.33
2.33 + 2.33 * 0.07 = 2.4931 => 2.49

Relevant code or error output

above

SDK version

NA

Python version

NA

Operating system

NA

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions