From 79224bb12852c03085b70778de37e0a9f1dfd339 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 Signed-off-by: Terran McCanna Signed-off-by: Galen Charlton --- Open-ILS/src/templates/staff/circ/share/t_bill_patron_dialog.tt2 | 2 +- Open-ILS/web/js/ui/default/staff/circ/services/billing.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/templates/staff/circ/share/t_bill_patron_dialog.tt2 b/Open-ILS/src/templates/staff/circ/share/t_bill_patron_dialog.tt2 index dd10c8b80f..87691746ad 100644 --- a/Open-ILS/src/templates/staff/circ/share/t_bill_patron_dialog.tt2 +++ b/Open-ILS/src/templates/staff/circ/share/t_bill_patron_dialog.tt2 @@ -69,7 +69,7 @@
-
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..920de26074 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) - $scope.billArgs.amount = Number(type.default_price()); + if (type.default_price()) { + $scope.billArgs.amount = parseFloat(type.default_price()).toFixed(2); + } else { + $scope.billArgs.amount = null; + } } }], resolve : { -- 2.11.0