ucdavis / ucdavis/Purchasing

Rounding errors when splitting order across multiple accounts.

Open
#371 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feedback
Dominant language
C#
Stars
7
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Hello, I recently split an order across 4 accounts at 25% per account. Upon submitting the order I had issues with $.002 not being assigned. This appears to just be a rounding error in the code that doesn't account for the fractional splits. I was able to work around it by just changing one of the accounts from 25% to 25% the total value plus the $.002 rounding error. Not a major issues, but a quirk that may bother some users.

Votes: 1
Author: dgagnon
Voters: dgagnon

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name a file or test. Start by locating the order-splitting logic and reproduce a four-account split at 25% each, then inspect how fractional amounts are assigned. Done means the full order value is allocated without leaving the reported $.002 remainder, with a regression test for the case.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.