From: Bill Erickson Date: Thu, 13 Aug 2015 20:14:22 +0000 (-0400) Subject: RT#85191 Legacy billing payment print error repair X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6870bde897af2982f183c633e4654e4e7f97547a;p=working%2FEvergreen.git 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 --- 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");