Skip to content

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

@SubandiK

Description

@SubandiK

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions