-
Notifications
You must be signed in to change notification settings - Fork 16
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
6895 don't round displayed prescribed quantity #6909
6895 don't round displayed prescribed quantity #6909
Conversation
Bundle size differenceComparing this PR to
|
@@ -559,7 +557,7 @@ const summarise = ( | |||
} else { | |||
counts[packSize] = { | |||
unitName: (stockLine?.item as ItemNode)?.unitName ?? 'unit', | |||
count: NumUtils.round(packSize * numberOfPacks), | |||
count: NumUtils.round(packSize * numberOfPacks, 2), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still rounding to 2 to avoid unwieldy numbers
setAbbreviation(''); | ||
setDefaultDirection(''); | ||
}, [item?.id]); | ||
const newIssueQuantity = NumUtils.round(allocatedUnits / Math.abs(Number(packSizeController.selected?.value || 1)), 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rounding to 2dp here also to be consistent with other parts of app for input values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks @fergie-nz ! π
Fixes #6895
π©π»βπ» What does this PR do?
Removes rounding to no decimals from prescription prescribed quantity display.
π Any notes for the reviewer?
You can more easily view changes without new linting changes here
Values passed around retain all information; they were just getting rounded before front end display.
π§ͺ Testing
π Documentation
π Reviewer Checklist
The PR Reviewer(s) should fill out this section before approving the PR
Breaking Changes
Issue Review
Tests Pass