From e111d4f1e9ea471b7ba63bea0ea11edfda46bed6 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Wed, 10 Jun 2015 18:01:59 -0400 Subject: [PATCH] let the @sum/@sumout example work with numbers like .70 Signed-off-by: Jason Etheridge --- Open-ILS/xul/staff_client/chrome/content/util/print_win.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.11.0