From: Jason Etheridge Date: Wed, 10 Jun 2015 22:01:59 +0000 (-0400) Subject: let the @sum/@sumout example work with numbers like .70 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e111d4f1e9ea471b7ba63bea0ea11edfda46bed6;p=working%2FEvergreen.git let the @sum/@sumout example work with numbers like .70 Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/xul/staff_client/chrome/content/util/print_win.js b/Open-ILS/xul/staff_client/chrome/content/util/print_win.js index 76f53f5877..33d99a8f5c 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/print_win.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/print_win.js @@ -135,8 +135,8 @@ function print_do_sums() { var newVal = spans[i].textContent; // strip off a single non-digit character // Don't want to assume dollar sign - // But don't strip a - - newVal = newVal.replace(/^[^-0-9]/,''); + // But don't strip a - or . + newVal = newVal.replace(/^[^-0-9\.]/,''); newVal = parseFloat(newVal); if(!isNaN(newVal)) { sums[sumset] += newVal;