common-domain-model
common-domain-model copied to clipboard
Georgina Tarres Common Function QuantityDecreasedToZero - QuantityDecreasedToZero function Fix
Common Function QuantityDecreasedToZero - QuantityDecreasedToZero function Fix
Background
The function QuantityDecreasedToZero incorrectly flags as a decrease cases where the quantity goes from zero to zero.
What is being released?
CDM Event Model - Decrease to zero
Background
The CDM function QuantityDecreasedToZero currently assumes that a decrease has occurred when the quantity is reduced to zero by checking that:
- The quantity in the
afterTradeStateis zero. - The quantity in the
beforeTradeStateis zero or greater.
This leads to incorrectly flagging as decrease cases where both the before and after quantities are zero, which should not be considered a decrease.
What is being released?
This contribution modifies the logic in the QuantityDecreasedToZero function so that a decrease is only considered when the before quantity is greater than zero, not equal to zero.
Review directions
In Rosetta, select the Textual View and search for the changes mentioned.
Review directions
Changes can be reviewed in PR: #3635
[!NOTE] This comment was generated via Rosetta.
This PR corresponds to ISSUE #3625
Superseded by https://github.com/finos/common-domain-model/pull/3757