Correctly populate certain columns in the patron Messages interface
authorJason Etheridge <jason@esilibrary.com>
Thu, 21 Jul 2011 18:52:45 +0000 (14:52 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 25 Jul 2011 21:31:32 +0000 (17:31 -0400)
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>
Open-ILS/xul/staff_client/server/patron/standing_penalties.js

index 1ddf2c4..79c628d 100644 (file)
@@ -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,
                         }
                     }