From: Jason Etheridge <jason@esilibrary.com>
Date: Thu, 21 Jul 2011 18:52:45 +0000 (-0400)
Subject: Correctly populate certain columns in the patron Messages interface
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fb58069857839fb5a404d15f4a403cb572da741b;p=evergreen%2Fmasslnc.git

Correctly populate certain columns in the patron Messages interface

When applying penalties, the csp's referenced by the ausp's are fleshed.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
---

diff --git a/Open-ILS/xul/staff_client/server/patron/standing_penalties.js b/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
index 1ddf2c4c27..79c628db77 100644
--- a/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
+++ b/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
@@ -188,7 +188,9 @@ function generate_request_handler_for_penalty_apply(penalty,id) {
                     'row' : {
                         'my' : {
                             'ausp' : penalty,
-                            'csp' : data.hash.csp[ penalty.standing_penalty() ],
+                            'csp' : typeof penalty.standing_penalty() == 'object'
+                                ? penalty.standing_penalty()
+                                : data.hash.csp[ penalty.standing_penalty() ],
                             'au' : xulG.patron,
                         }
                     }