Merge pull request #9960 from uberbrady/fix_null_sum_totals

Fix regression for NULL valued numbers in the summary calculation
This commit is contained in:
snipe 2021-08-19 12:08:33 -07:00 committed by GitHub
commit ff8faab3be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -596,6 +596,9 @@
}
function cleanFloat(number) {
if(!number) { // in a JavaScript context, meaning, if it's null or zero or unset
return 0.0;
}
if ("{{$snipeSettings->digit_separator}}" == "1.234,56") {
// yank periods, change commas to periods
periodless = number.toString().replace("\.","");