[open-ils-commits] [GIT] Evergreen ILS branch master updated. c0c481c333e30d9a100ca15557009cff045af7a8

Evergreen Git git at git.evergreen-ils.org
Thu May 31 11:13:51 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  c0c481c333e30d9a100ca15557009cff045af7a8 (commit)
       via  7ec151d7bbcfd042dc1e5213d6a468ad3e41202f (commit)
       via  b754f4adcd7c82fff361dd7d8265f475b4047918 (commit)
       via  30b9e2a30487f207165a87bccfbdb0901b79908a (commit)
      from  860ef994ddeb6bd7a5c0373c94afa4b23d26e03e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c0c481c333e30d9a100ca15557009cff045af7a8
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Thu Apr 19 22:22:53 2012 -0400

    Work Log entry for holds placed from "Search the Catalog"
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
index 7b98020..a2ce364 100644
--- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
+++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
@@ -405,7 +405,40 @@ function set_opac() {
                     }
                 },
                 'get_barcode' : xulG.get_barcode,
-                'get_barcode_and_settings' : xulG.get_barcode_and_settings
+                'get_barcode_and_settings' : xulG.get_barcode_and_settings,
+                'opac_hold_placed' : function(hold) {
+                    try {
+                        var hold_id = typeof hold == 'object' ? hold.id() : hold;
+                        g.network.simple_request('FM_AHR_BLOB_RETRIEVE.authoritative', [ ses(), hold_id ],
+                            function(blob_req) {
+                                try {
+                                    var blob = blob_req.getResultObject();
+                                    if (typeof blob.ilsevent != 'undefined') throw(blob);
+                                    g.error.work_log(
+                                        $('offlineStrings').getFormattedString(
+                                            'staff.circ.work_log_hold_placed.message',
+                                            [
+                                                ses('staff_usrname'),
+                                                blob.patron_last,
+                                                blob.patron_barcode,
+                                                hold_id,
+                                                blob.hold.hold_type()
+                                            ]
+                                        ), {
+                                            'au_id' : blob.hold.usr(),
+                                            'au_family_name' : blob.patron_family_name,
+                                            'au_barcode' : blob.patron_barcode
+                                        }
+                                    );
+                                } catch(E) {
+                                    g.error.standard_unexpected_error_alert('opac.js, opac_hold_placed(), work_log #2: ',E);
+                                }
+                            }
+                        );
+                    } catch(F) {
+                        g.error.standard_unexpected_error_alert('opac.js, opac_hold_placed(), work_log #1: ',F);
+                    }
+                }
             },
             'on_url_load' : function(f) {
                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

commit 7ec151d7bbcfd042dc1e5213d6a468ad3e41202f
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Thu Apr 19 21:02:12 2012 -0400

    Work Log entry for holds placed within patron display
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/place_hold_result.tt2 b/Open-ILS/src/templates/opac/parts/place_hold_result.tt2
index 6504906..b933d6a 100644
--- a/Open-ILS/src/templates/opac/parts/place_hold_result.tt2
+++ b/Open-ILS/src/templates/opac/parts/place_hold_result.tt2
@@ -54,6 +54,24 @@
 
                         <div class='success'>[% l("Hold was successfully placed"); %]</div>
 
+                        [% IF ctx.is_staff %]
+                            <script>
+                                window.addEventListener(
+                                    'load',
+                                    function() {
+                                        try {
+                                            if (typeof xulG != 'undefined' && xulG.opac_hold_placed) {
+                                                xulG.opac_hold_placed([% hdata.hold_success %]);
+                                            }
+                                        } catch(E) {
+                                            alert('Error updating Work Log with hold placement: ' + E);
+                                        }
+                                    },
+                                    false
+                                );
+                            </script>
+                        [% END %]
+
                         [% ELSIF hdata.hold_failed; any_failures = 1 %]
 
                             <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
diff --git a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
index 23cd01a..5a5b0c4 100644
--- a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
+++ b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
@@ -120,6 +120,8 @@ menu.cmd_patron_register.related.tab=Editing Related Patron
 menu.cmd_patron_register.tab=Register Patron
 # 1 - Staff Username  2 - Patron Family  3 - Patron Barcode
 staff.circ.work_log_patron_registration.message=%1$s registered %3$s (%2$s)
+# 1 - Staff Username  2 - Patron Family  3 - Patron Barcode  4 - Hold ID  5 - Hold Type
+staff.circ.work_log_hold_placed.message=%1$s placed hold %4$s (%5$s) for %3$s (%2$s)
 menu.cmd_browse_holds.tab=Hold Browser
 menu.cmd_browse_holds_shelf.tab=Holds Shelf
 menu.cmd_browse_hold_pull_list.tab=On Shelf Pull List
diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js
index cad4e88..a17e247 100644
--- a/Open-ILS/xul/staff_client/server/patron/holds.js
+++ b/Open-ILS/xul/staff_client/server/patron/holds.js
@@ -1482,11 +1482,12 @@ patron.holds.prototype = {
                                         },
                                         'opac_hold_placed' : function(hold) {
                                             try {
+                                                var hold_id = typeof hold == 'object' ? hold.id() : hold;
                                                 obj.list.append(
                                                     {
                                                         'row' : {
                                                             'my' : {
-                                                                'hold_id' : typeof hold == 'object' ? hold.id() : hold
+                                                                'hold_id' : hold_id
                                                             }
                                                         }
                                                     }
@@ -1494,6 +1495,30 @@ patron.holds.prototype = {
                                                 if (window.xulG && typeof window.xulG.on_list_change == 'function') {
                                                     window.xulG.on_list_change(); 
                                                 }
+                                                obj.list.wrap_in_full_retrieve(
+                                                    function() {
+                                                        try {
+                                                            obj.error.work_log(
+                                                                $('offlineStrings').getFormattedString(
+                                                                    'staff.circ.work_log_hold_placed.message',
+                                                                    [
+                                                                        ses('staff_usrname'),
+                                                                        obj.holds_map[ hold_id ].patron_last,
+                                                                        obj.holds_map[ hold_id ].patron_barcode,
+                                                                        hold_id,
+                                                                        obj.holds_map[ hold_id ].hold.hold_type()
+                                                                    ]
+                                                                ), {
+                                                                    'au_id' : obj.holds_map[ hold_id ].hold.usr(),
+                                                                    'au_family_name' : obj.holds_map[ hold_id ].patron_family_name,
+                                                                    'au_barcode' : obj.holds_map[ hold_id ].patron_barcode
+                                                                }
+                                                            );
+                                                        } catch(F) {
+                                                            obj.error.standard_unexpected_error_alert('holds.js, opac_hold_placed(), work_log: ',F);
+                                                        }
+                                                    }
+                                                );
                                             } catch(E) {
                                                 obj.error.standard_unexpected_error_alert('holds.js, opac_hold_placed(): ',E);
                                             }

commit b754f4adcd7c82fff361dd7d8265f475b4047918
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Thu Apr 19 21:01:35 2012 -0400

    fix error reporting when using list.wrap_in_full_retrieve
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/chrome/content/util/list.js b/Open-ILS/xul/staff_client/chrome/content/util/list.js
index d6057e3..b17e9b2 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/list.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/list.js
@@ -1075,7 +1075,7 @@ util.list.prototype = {
                                 dump('exec_on_all_fleshed, processing on_all_fleshed array, length = ' + obj.on_all_fleshed.length + '\n');
                                 var f = obj.on_all_fleshed.pop();
                                 if (typeof f == 'function') { 
-                                    try { f(); } catch(E) { obj.error.standard_unexpected_error_alert('_full_retrieve_tree callback',f); } 
+                                    try { f(); } catch(E) { obj.error.standard_unexpected_error_alert('_full_retrieve_tree callback',E); }
                                 }
                                 if (obj.on_all_fleshed.length > 0) arguments.callee(); 
                             } catch(E) {

commit 30b9e2a30487f207165a87bccfbdb0901b79908a
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Tue Apr 17 17:03:21 2012 -0400

    work log entries for payments received
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
index 633c2df..3592b82 100644
--- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
+++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
@@ -429,6 +429,12 @@ staff.circ.work_log_checkin_attempt.reservation_shelf.message=%1$s attempted che
 staff.circ.work_log_checkin_attempt.cataloging.message=%1$s attempted checkin of %4$s, which is a pre-cat and was routed to Cataloging.  Route To = %5$s
 # 1 - Staff Username  2 - Patron Family  3 - Patron Barcode  4 - Item Barcode  5 - Route To text
 staff.circ.work_log_checkin_attempt.cataloging.message=%1$s attempted checkin of %4$s, which was not found, and so was routed to Cataloging.  Route To = %5$s
+# 1 - Staff Username  2 - Patron Family  3 - Patron Barcode  4 - Original Balance  5 - Voided Balance  6 - Payment Received  7 - Payment Applied
+# 8 - Change Given  9 - Credit Given  10 - New Balance  11 - Payment Type  12 - Note  13 - API call result
+staff.circ.work_log_payment_attempt.success.message=%1$s received %6$s (%11$s) for %3$s (%2$s).
+# 1 - Staff Username  2 - Patron Family  3 - Patron Barcode  4 - Original Balance  5 - Voided Balance  6 - Payment Received  7 - Payment Applied
+# 8 - Change Given  9 - Credit Given  10 - New Balance  11 - Payment Type  12 - Note  13 - API call result
+staff.circ.work_log_payment_attempt.failure.message=%1$s attempted receipt of %6$s (%11$s) for %3$s (%2$s), which failed for this reason: %13$s
 staff.circ.checkin.hold_capture=Hold Capture
 staff.circ.checkin.check_in.tab=Item Check In
 staff.circ.renew.tab.label=Renew Items
diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js
index e741494..fa0a8a0 100644
--- a/Open-ILS/xul/staff_client/server/patron/bill2.js
+++ b/Open-ILS/xul/staff_client/server/patron/bill2.js
@@ -916,6 +916,38 @@ function pay(payment_blob) {
             note : payment_blob.note
         }
         var robj = g.network.simple_request( 'BILL_PAY', [ ses(), payment_blob, g.patron.last_xact_id() ]);
+
+        try {
+            g.error.work_log(
+                $('circStrings').getFormattedString(
+                    robj && robj.payments
+                        ? 'staff.circ.work_log_payment_attempt.success.message'
+                        : 'staff.circ.work_log_payment_attempt.failure.message',
+                    [
+                        ses('staff_usrname'), // 1 - Staff Username
+                        g.patron.family_name(), // 2 - Patron Family
+                        g.patron.card().barcode(), // 3 - Patron Barcode
+                        g.previous_summary.original_balance, // 4 - Original Balance
+                        g.previous_summary.voided_balance, // 5 - Voided Balance
+                        g.previous_summary.payment_received, // 6 - Payment Received
+                        g.previous_summary.payment_applied, // 7 - Payment Applied
+                        g.previous_summary.change_given, // 8 - Change Given
+                        g.previous_summary.credit_given, // 9 - Credit Given
+                        g.previous_summary.new_balance, // 10 - New Balance
+                        g.previous_summary.payment_type, // 11 - Payment Type
+                        g.previous_summary.note, // 12 - Note
+                        robj && robj.textcode ? robj.textcode : robj // 13 - API call result
+                    ]
+                ), {
+                    'au_id' : g.patron.id(),
+                    'au_family_name' : g.patron.family_name(),
+                    'au_barcode' : g.patron.card().barcode()
+                }
+            );
+        } catch(E) {
+            alert('Error logging payment in bill2.js: ' + E);
+        }
+
         if (typeof robj.ilsevent != 'undefined') {
             switch(robj.textcode) {
                 case 'SUCCESS' : return true; break;

-----------------------------------------------------------------------

Summary of changes:
 .../src/templates/opac/parts/place_hold_result.tt2 |   18 ++++++++++
 .../xul/staff_client/chrome/content/cat/opac.js    |   35 +++++++++++++++++++-
 .../xul/staff_client/chrome/content/util/list.js   |    2 +-
 .../chrome/locale/en-US/offline.properties         |    2 +
 .../server/locale/en-US/circ.properties            |    6 +++
 Open-ILS/xul/staff_client/server/patron/bill2.js   |   32 ++++++++++++++++++
 Open-ILS/xul/staff_client/server/patron/holds.js   |   27 ++++++++++++++-
 7 files changed, 119 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list