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

[Bug?] LineItem.gross_amount is used in xml unvalidated for ChargeAmount #11

Open
SubandiK opened this issue Dec 3, 2024 · 0 comments

Comments

@SubandiK
Copy link
Contributor

SubandiK commented Dec 3, 2024

Here

Helpers.currency_element(xml, 'ram', 'ChargeAmount', gross_amount, currency_code, add_currency: version == 1, digits: 4)

We use item.gross_amount to set ChargeAmount for GrossPriceProductTradePrice.

It turns out that it doesn't actually matter what we pass in there as gross_amount, unless it doesn't work with BigDecimal() all validations pass.
So there is no validation going on besides the type. Is this a problem that should be handled in this gem? Or is this a problem with the existing schemas?

To reproduce just change the gross_amounts in the existing specs, see they don't care.

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

No branches or pull requests

1 participant