From ade09f8bc93ae3ed8b1ee97c33ba082818ac3431 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 28 Jul 2020 10:43:25 -0400 Subject: [PATCH] LP#1776757: (follow-up) keep input for amount as type "number" Doing this preserves the form validation that ensures that the user cannot submit the form with a non-numeric amount. This does lose forcing the display of default amounts such as "1.50" to two decimal places, but I'm figuring that form validation takes priority pending a longer-term solution such as a custom value validator or using ng-currency. 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 | 2 +- 2 files changed, 2 insertions(+), 2 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 87691746ad..dd10c8b80f 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 920de26074..5826c12006 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 @@ -141,7 +141,7 @@ function($uibModal , $q , egCore) { var type = billingTypes.filter(function(t) { return t.id() == $scope.billArgs.billingType })[0]; if (type.default_price()) { - $scope.billArgs.amount = parseFloat(type.default_price()).toFixed(2); + $scope.billArgs.amount = parseFloat(type.default_price()); } else { $scope.billArgs.amount = null; } -- 2.11.0