Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 142
    • Merge requests 142
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • erp5erp5
  • Merge requests
  • !1635

accounting: always compare rounded values when indexing balance transactions

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Jérome Perrin requested to merge fix/balance-transaction-round into master May 24, 2022
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 1

To prevent rounding errors, we always compare rounded values to the precision of the accounting currency. There was a place here where we were using -= without rounding, which caused to detect a difference between new and current stock and insert a line for 0 in an existing instance for which some accounting lines were created with too precise values - but not in a way that was detected by the assertions in AccountingPeriod_createBalanceTransaction.

Rounding here as well solved the problem with that data.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/balance-transaction-round
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7