From: Jason Stephenson Date: Sun, 3 Feb 2019 16:44:09 +0000 (-0500) Subject: LP1779467: Fix bug with charging fees when marking item damaged. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=dd47e20baf130adb211bc90c3d0026694906b326;p=evergreen%2Fpines.git LP1779467: Fix bug with charging fees when marking item damaged. Revert the changes made to the mark_damaged function in the web staff client code (Open-ILS/web/js/ui/default/staff/circ/services/circ.js) earlier in this branch. The new code does not handle the mark damaged process correctly, but the original code does. Signed-off-by: Jason Stephenson Signed-off-by: Chris Sharp Signed-off-by: Terran McCanna --- 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 93a5d03faf..acf9d9420f 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 @@ -1361,26 +1361,16 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog, egAddCopyAl handle_checkin: !$scope.applyFine }).then(function(resp) { if (evt = egCore.evt.parse(resp)) { - egCore.pcrud.retrieve('ccs', 14) - .then(function(resp) { - service.handle_mark_item_event( - {id : params.id, barcode : params.barcode}, - resp, - { - apply_fines: $scope.applyFine, - override_amount: $scope.billArgs.charge, - override_btype: $scope.billArgs.type, - override_note: $scope.billArgs.note, - handle_checkin: !$scope.applyFine - }, - evt); - }).then(function(resp) { - // noop? - //if (doRefresh) egItem.add_barcode_to_list(params.barcode); - }, function(resp) { - doRefresh = false; - console.error('mark damaged failed: ' + evt); - }); + doRefresh = false; + console.debug("mark damaged more information required. Pushing back."); + service.mark_damaged({ + id: params.id, + barcode: params.barcode, + charge: evt.payload.charge, + circ: evt.payload.circ, + refresh: params.refresh + }); + console.error('mark damaged failed: ' + evt); } }).then(function() { if (doRefresh) egItem.add_barcode_to_list(params.barcode);