[open-ils-commits] [GIT] Evergreen ILS branch master updated. ade09f8bc93ae3ed8b1ee97c33ba082818ac3431

Evergreen Git git at git.evergreen-ils.org
Tue Jul 28 10:46:00 EDT 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  ade09f8bc93ae3ed8b1ee97c33ba082818ac3431 (commit)
       via  79224bb12852c03085b70778de37e0a9f1dfd339 (commit)
      from  2c09f8298861b32edac2ac570883a109582b9ce9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ade09f8bc93ae3ed8b1ee97c33ba082818ac3431
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Tue Jul 28 10:43:25 2020 -0400

    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 <gmc at equinoxinitiative.org>

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 @@
       <div class="form-group">
         <label for="bill-dialog-amount" class="control-label col-md-4">[% l('Amount:') %]</label>
         <div class="col-md-8">
-          <input type="string" min="0" step="any" class="form-control" 
+          <input type="number" min="0" step="any" class="form-control" 
             focus-me='focus' ng-required="true" id="bill-dialog-amount"
             ng-model="billArgs.amount"/>
         </div>
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;
                     }

commit 79224bb12852c03085b70778de37e0a9f1dfd339
Author: Mike Risher <mrisher at catalyte.io>
Date:   Wed Jan 29 20:20:35 2020 +0000

    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 <mrisher at catalyte.io>
    Signed-off-by: Terran McCanna <tmccanna at georgialibraries.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

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 @@
       <div class="form-group">
         <label for="bill-dialog-amount" class="control-label col-md-4">[% l('Amount:') %]</label>
         <div class="col-md-8">
-          <input type="number" min="0" step="any" class="form-control" 
+          <input type="string" min="0" step="any" class="form-control" 
             focus-me='focus' ng-required="true" id="bill-dialog-amount"
             ng-model="billArgs.amount"/>
         </div>
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 : {

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/js/ui/default/staff/circ/services/billing.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list