add standing penalty prompt to Mark Item Missing Pieces workflow
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 13 Aug 2010 08:17:45 +0000 (08:17 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 13 Aug 2010 08:17:45 +0000 (08:17 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17208 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index c7d8d14..566f1b2 100644 (file)
@@ -776,6 +776,24 @@ cat.util.mark_item_as_missing_pieces = function(copy_ids) {
                                 { 'copy_id' : copies[i].id() }
                             );
                             // TODO: patron notes/messages
+                            var my_xulG = win.open(
+                                urls.XUL_NEW_STANDING_PENALTY,
+                                'new_standing_penalty',
+                                'chrome,resizable,modal',
+                                {}
+                            );
+                            if (my_xulG.id) {
+                                var penalty = new ausp();
+                                penalty.usr( robj.payload.circ.usr() );
+                                penalty.isnew( 1 );
+                                penalty.standing_penalty( my_xulG.id );
+                                penalty.org_unit( ses('ws_ou') );
+                                penalty.note( my_xulG.note );
+                                network.simple_request(
+                                    'FM_AUSP_APPLY',
+                                    [ ses(), penalty ]
+                                );
+                            }
                             // TODO: Invoke 3rd party app with letter to patron
                         } else if (robj.ilsevent == 1500 /* ACTION_CIRCULATION_NOT_FOUND */) {
                             alert( $("catStrings").getFormattedString('staff.cat.util.mark_item_missing_pieces.circ_not_found',[ copies[i].barcode() ]) );