From 6870bde897af2982f183c633e4654e4e7f97547a Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 13 Aug 2015 16:14:22 -0400 Subject: [PATCH] RT#85191 Legacy billing payment print error repair Some legacy data has NULL values (e.g. last_billing_note) where current data has empty strings. This leads to exceptions and annoying, but ultimately harmless error dialogs in the XUL client. Add some sanity checking to the code to avoid that. Signed-off-by: Bill Erickson --- Open-ILS/xul/staff_client/chrome/content/util/print.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Open-ILS/xul/staff_client/chrome/content/util/print.js b/Open-ILS/xul/staff_client/chrome/content/util/print.js index e257ce9a24..ee4dce8d61 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/print.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/print.js @@ -510,6 +510,11 @@ util.print.prototype = { } else { /* for dump_with_keys */ for (var i in params.row) { + + // some legacy data has NULL values where empty + // strings should be. This dies on .toString(). + if (params.row[i] == null) params.row[i] = ''; + switch(i) { case "due_date": var re = new RegExp('%'+i+'%',"g"); -- 2.11.0