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

Central-settlements calculating amounts incorrectly for every settlementModel that matches the ledgerAccountTypeId #2304

Closed
Tracked by #2151
mdebarros opened this issue Jun 18, 2021 · 0 comments
Assignees
Labels
bug Something isn't working or it has wrong behavior on a Mojaloop Core service oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it
Milestone

Comments

@mdebarros
Copy link
Member

Summary:
Central-settlements is calculating amounts incorrectly based on the Insert SQL statement: https://github.com/mojaloop/central-settlement/blob/master/src/models/settlementWindow/facade.js#L220.

It is calculating the amount incorrectly for every settlementModel that matches the ledgerAccountTypeId.

Severity:
High

Priority:
Critical

Expected Behavior

  • settlementWindowContent table should contain:
    • An entry for cach settlementWindow matching a speccific currency
    • Each entry should also contain the associated settlementModel id matching the currency and ledgerAccountTypeId where settlementGranularityId = Enum.Settlements.SettlementGranularity.NET
  • settlementContentAggregation table must reflect the above entry, providing an "amount" calculation for each participant+participantRole combination

Steps to Reproduce

  1. Create more than one settlementModel for two different currencies
  2. Send several transfers that match one of the above currencies
  3. Close the associated settlementWindow, and monitor the settlementContentAggregation amounts being "double" counted

Specifications

  • Component (if known): Central-Settlements
  • Version: 12.x
  • Platform: Node
  • Subsystem:
  • Type of testing: manual
  • Bug found/raised by: @vgenev

Notes:

  • Severity when opened: High
  • Priority when opened: Critical
@mdebarros mdebarros added the bug Something isn't working or it has wrong behavior on a Mojaloop Core service label Jun 18, 2021
@elnyry-sam-k elnyry-sam-k added the oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it label Jun 18, 2021
@elnyry-sam-k elnyry-sam-k added this to the Sprint 14.4 milestone Jun 18, 2021
@elnyry-sam-k elnyry-sam-k changed the title Central-settlements is calculating amounts incorrectly for every settlementModel that matches the ledgerAccountTypeId. Central-settlements calculating amounts incorrectly for every settlementModel that matches the ledgerAccountTypeId Jun 21, 2021
@vgenev vgenev closed this as completed Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or it has wrong behavior on a Mojaloop Core service oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it
Projects
None yet
Development

No branches or pull requests

3 participants