From cb4dc07c3b0526800673ab019c3c45f40d372f08 Mon Sep 17 00:00:00 2001 From: Mike Risher Date: Wed, 29 Jan 2020 20:20:35 +0000 Subject: [PATCH] lp1776757 Default Billing Price Not Updating Fix the following bug: When billing a patron and one switches from one billing type to a different billing type, the price isn't updating to show the new default price Signed-off-by: Mike Risher Changes to be committed: modified: Open-ILS/web/js/ui/default/staff/circ/services/billing.js --- Open-ILS/web/js/ui/default/staff/circ/services/billing.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/billing.js b/Open-ILS/web/js/ui/default/staff/circ/services/billing.js index 048e9d78a6..17fef0aefd 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/billing.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/billing.js @@ -140,8 +140,11 @@ function($uibModal , $q , egCore) { $scope.updateDefaultPrice = function() { var type = billingTypes.filter(function(t) { return t.id() == $scope.billArgs.billingType })[0]; - if (type.default_price() && !$scope.billArgs.amount) + if (type.default_price()) { $scope.billArgs.amount = Number(type.default_price()); + } else { + $scope.billArgs.amount = null; + } } }], resolve : { -- 2.11.0