lp1770217 Items Out count shouldn't increment on renew
authorMike Risher <mrisher@catalyte.io>
Mon, 10 Jun 2019 18:11:38 +0000 (11:11 -0700)
committerBill Erickson <berickxx@gmail.com>
Tue, 18 Jun 2019 15:16:50 +0000 (11:16 -0400)
Determine if this item is currently out to the patron and is being
checked out again.  If so, be sure not to increment "Items Out" count.

Signed-off-by: Mike Risher <mrisher@catalyte.io>
Changes to be committed:
modified:   web/js/ui/default/staff/circ/patron/checkout.js
modified:   web/js/ui/default/staff/circ/services/circ.js

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js
Open-ILS/web/js/ui/default/staff/circ/services/circ.js

index ba7c545..f3df2d8 100644 (file)
@@ -201,7 +201,7 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc ,
 
                 // Avoid updating checkout counts when a checkout turns
                 // into a renewal via auto_renew.
-                if (!co_resp.auto_renew && !params.noncat) {
+                if (!co_resp.auto_renew && !params.noncat && !options.sameCopyCheckout) {
                     patronSvc.patron_stats.checkouts.out++;
                     patronSvc.patron_stats.checkouts.total_out++;
                 }
index 3e5c57d..6c2d30d 100644 (file)
@@ -1106,6 +1106,7 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog,  egAddCopyAl
             function(args) {
                 if (sameUser) {
                     params.void_overdues = args.forgive_fines;
+                    options.sameCopyCheckout = true;
                     return service.renew(params, options);
                 }