Skip to content

Commit

Permalink
Merge pull request #1628 from ORNL-AMO/issue-1624
Browse files Browse the repository at this point in the history
fix rounding issue in reports and summation in excel BP report
  • Loading branch information
rmroot authored Jun 17, 2024
2 parents 713d557 + b58386a commit 3c5b219
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/shared/helper-pipes/custom-number.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class CustomNumberPipe implements PipeTransform {
transform(value: number, isCurrency?: boolean): string {
let valueStr: string;
if (isNaN(value) == false && value != null) {
if (value < 10000) {
if (Math.abs(value) < 10000) {
//5 sig figs
valueStr = (value).toLocaleString(undefined, { maximumSignificantDigits: 5 });
} else {
Expand Down
Binary file modified src/assets/csv_templates/BBBP-Challenge-Annual-Reporting-Form.xlsx
Binary file not shown.

0 comments on commit 3c5b219

Please sign in to comment.