From b6be7b260ecd5fdaa339e9fd1fd3f08e48be4508 Mon Sep 17 00:00:00 2001 From: Dan Wells Date: Fri, 21 Sep 2018 10:45:59 -0400 Subject: [PATCH] LP#1791340 Webstaff: Don't backdate when we're not There was code in the webstaff checkin interface which attempted to remove the backdate parameter when it wasn't needed, as its mere presence has a negative effect on the checkin process. This fail-safe was not working, however. Instead, let's build on the same check function used for the display, so we can be more sure that if the user doesn't see that they are backdating, the interface will not treat it as a backdate, and vice-versa. Signed-off-by: Dan Wells Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/staff/circ/checkin/app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js index 6a79396a74..c750f43ef5 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js @@ -130,13 +130,13 @@ function($scope , $q , $window , $location , $timeout , egCore , checkinSvc , eg function compile_checkin_args(args) { var params = angular.copy(args); + // a backdate of 'today' is not really a backdate + if (!$scope.is_backdate()) + delete params.backdate; + if (params.backdate) { params.backdate = params.backdate.toISOString().replace(/T.*/,''); - - // a backdate of 'today' is not really a backdate - if (params.backdate == $scope.max_backdate) - delete params.backdate; } angular.forEach(['noop','void_overdues', -- 2.11.0