From: Billy Horn Date: Fri, 18 Nov 2016 21:04:24 +0000 (-0800) Subject: LP#1526163-auto-renew-not-honored X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fbhorn%2FLP1526163-checkout-auto-renew-not-honored;p=working%2FEvergreen.git LP#1526163-auto-renew-not-honored add check for auto_renew policy add check to checkout to see if it is a renew when updating the items out count Signed-off-by: Billy Horn --- diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js index 3f82de710f..8fe8610aef 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js @@ -148,8 +148,11 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc , function(co_resp) { // update stats locally so we don't have to fetch them w/ // each checkout. - patronSvc.patron_stats.checkouts.out++; - patronSvc.patron_stats.checkouts.total_out++; + //check for renew so that is doesn't update incorrectly + if(co_resp.evt[0].payload.parent_circ == null){ + patronSvc.patron_stats.checkouts.out++; + patronSvc.patron_stats.checkouts.total_out++; + } // copy the response event into the original grid row item // note: angular.copy clobbers the destination diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js index 753f54b5f2..64145d4e3f 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js @@ -439,6 +439,9 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog, return service.precat_dialog(params, options); case 'OPEN_CIRCULATION_EXISTS': + if(evt[0].payload.auto_renew == 1){ + return service.renew(params, options); + } return service.circ_exists_dialog(evt, params, options); case 'COPY_IN_TRANSIT':