let the @sum/@sumout example work with numbers like .70 collab/phasefx/sumoutfix
authorJason Etheridge <jason@esilibrary.com>
Wed, 10 Jun 2015 22:01:59 +0000 (18:01 -0400)
committerJason Etheridge <jason@esilibrary.com>
Wed, 10 Jun 2015 22:01:59 +0000 (18:01 -0400)
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/xul/staff_client/chrome/content/util/print_win.js

index 76f53f5..33d99a8 100644 (file)
@@ -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;