From: Bill Erickson Date: Fri, 5 Jan 2018 19:55:56 +0000 (-0500) Subject: LP#1729934 Webstaff penalty create org/depth repair X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=24b3dc1d16c887bfe0e9a5ad4dcb6e1c4ba704a5;p=working%2FEvergreen.git LP#1729934 Webstaff penalty create org/depth repair Apply correct org unit to patron penalties created in the web staff client. Specifically, be sure the standing penalty depth value is honored when set. Commit replaces manual pcrud creation with the XUL-tested API, which calculates the correct org unit by depth for us. Signed-off-by: Bill Erickson Signed-off-by: Cesar Velez Signed-off-by: Kathy Lussier --- 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 c0e25d1181..58277d1c60 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 @@ -1799,7 +1799,12 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog, } pen.staff(egCore.auth.user().id()); pen.set_date('now'); - return egCore.pcrud.create(pen); + + return egCore.net.request( + 'open-ils.actor', + 'open-ils.actor.user.penalty.apply', + egCore.auth.token(), pen + ); } ); }