[open-ils-commits] [GIT] Evergreen ILS branch rel_3_4 updated. 89b5bf9a7a750da48300ab23e6e4b6aa32e8f778

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, rel_3_4 has been updated
       via  89b5bf9a7a750da48300ab23e6e4b6aa32e8f778 (commit)
       via  7d86d434a323b15e0d4d17cbf6cc0ae562346b5e (commit)
      from  bb9a04aff2da25a0f7b7a7bf8bd11bbf61a77f87 (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 89b5bf9a7a750da48300ab23e6e4b6aa32e8f778
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 7d86d434a323b15e0d4d17cbf6cc0ae562346b5e
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