From dd47e20baf130adb211bc90c3d0026694906b326 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Sun, 3 Feb 2019 11:44:09 -0500 Subject: [PATCH] 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 --- .../js/ui/default/staff/circ/services/circ.js | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) 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); -- 2.43.2