From: phasefx Date: Wed, 22 Sep 2010 19:37:43 +0000 (+0000) Subject: fixes a bug in Item Status -> Alternate View when the item being viewed has no circ... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7ba5d6e21c8f8f47358e8ed592a8bfe70b427e89;p=evergreen%2Ftadl.git fixes a bug in Item Status -> Alternate View when the item being viewed has no circ modifier git-svn-id: svn://svn.open-ils.org/ILS/trunk@17894 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js index 8128241227..addc364570 100644 --- a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js +++ b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js @@ -169,7 +169,11 @@ function load_item() { set("copy_circ_lib" , typeof details.copy.circ_lib() == 'object' ? details.copy.circ_lib().shortname() : data.hash.aou[ details.copy.circ_lib() ].shortname()); set_tooltip("copy_circ_lib" , typeof details.copy.circ_lib() == 'object' ? details.copy.circ_lib().name() : data.hash.aou[ details.copy.circ_lib() ].name()); var cm = details.copy.circ_modifier(); - set("circ_modifier", document.getElementById('commonStrings').getFormattedString('staff.circ_modifier.display',[cm,data.hash.ccm[cm].name(),data.hash.ccm[cm].description()])); + if (typeof data.hash.ccm[cm] != 'undefined') { + set("circ_modifier", document.getElementById('commonStrings').getFormattedString('staff.circ_modifier.display',[cm,data.hash.ccm[cm].name(),data.hash.ccm[cm].description()])); + } else { + set("circ_modifier",""); + } set("circulate", get_localized_bool( details.copy.circulate() )); set("copy_number", details.copy.copy_number()); set("copy_create_date", util.date.formatted_date( details.copy.create_date(), '%{localized}' ));