hold/transit slips may want to use stat cats as well
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Oct 2010 14:59:43 +0000 (14:59 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Oct 2010 14:59:43 +0000 (14:59 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18203 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/util.js

index 7388d49..76cb2d8 100644 (file)
@@ -2900,6 +2900,26 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
                 JSAN.use('patron.util');
                 var au_obj = patron.util.retrieve_fleshed_au_via_id( session, check.payload.hold.usr() );
                 print_data.user = au_obj;
+                print_data.user_stat_cat_entries = [];
+                var entries = au_obj.stat_cat_entries();
+                for (var i = 0; i < entries.length; i++) {
+                    var stat_cat = data.hash.my_actsc[ entries[i].stat_cat() ];
+                    if (!stat_cat) {
+                        stat_cat = data.lookup('actsc', entries[i].stat_cat());
+                    }
+                    print_data.user_stat_cat_entries.push( { 
+                        'id' : entries[i].id(),
+                        'stat_cat' : {
+                            'id' : stat_cat.id(),
+                            'name' : stat_cat.name(),
+                            'opac_visible' : stat_cat.opac_visible(),
+                            'owner' : stat_cat.owner(),
+                            'usr_summary' : stat_cat.usr_summary()
+                        },
+                        'stat_cat_entry' : entries[i].stat_cat_entry(),
+                        'target_usr' : entries[i].target_usr() 
+                    } );
+                }
                 msg += '\n';
                 if (au_obj.alias()) {
                     print_data.hold_for_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.patron_alias',  [au_obj.alias()]);