[open-ils-commits] [GIT] Evergreen ILS branch rel_3_0 updated. 8ff8b98bdd4d7f26c649ef63196a0200feeb89e6

Evergreen Git git at git.evergreen-ils.org
Wed May 23 09:56:36 EDT 2018


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_0 has been updated
       via  8ff8b98bdd4d7f26c649ef63196a0200feeb89e6 (commit)
      from  2819c442346e2128d0a228ca3b8e3e5f91fcc161 (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 8ff8b98bdd4d7f26c649ef63196a0200feeb89e6
Author: Bill Erickson <berickxx at gmail.com>
Date:   Wed May 16 17:24:05 2018 -0400

    LP#1639022 Webstaff convert change to credit
    
    Add support for converting change to patron credit in the patron bills
    interface, consistent with the XUL feature.  When the
    'circ.disable_patron_credit' org unit setting is applied, the option is
    hidden.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Laura Sachjen <sachjenl at branchdistrictlibrary.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/circ/patron/t_bills.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_bills.tt2
index 835e1bf..3ea9cc4 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_bills.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_bills.tt2
@@ -105,6 +105,14 @@ off to the right.  flex-row is honoring the boundaries better.
 not sure what's up, there. -->
 <div class="flex-row" ng-if="!disable_auto_print">
   <div class="flex-cell"></div>
+  <div ng-hide="disablePatronCredit" class="pad-right">
+    <div class="checkbox">
+      <label>
+        <input type="checkbox" ng-model="convert_to_credit.isChecked">
+        [% l('Convert Change to Patron Credit') %]
+      </label>
+    </div>
+  </div>
   <form class="form-inline" role="form">
    <div class="checkbox">
       <label>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js
index 24d2e54..da9bb40 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js
@@ -12,9 +12,12 @@ function($q , egCore , egWorkLog , patronSvc) {
     // fetch org unit settings specific to the bills display
     service.fetchBillSettings = function() {
         if (service.settings) return $q.when(service.settings);
-        return egCore.org.settings(
-            ['ui.circ.billing.uncheck_bills_and_unfocus_payment_box','ui.circ.billing.amount_warn','ui.circ.billing.amount_limit','circ.staff_client.do_not_auto_attempt_print']
-        ).then(function(s) {return service.settings = s});
+        return egCore.org.settings([
+            'ui.circ.billing.uncheck_bills_and_unfocus_payment_box',
+            'ui.circ.billing.amount_warn', 'ui.circ.billing.amount_limit',
+            'circ.staff_client.do_not_auto_attempt_print',
+            'circ.disable_patron_credit'
+        ]).then(function(s) {return service.settings = s});
     }
 
     // user billing summary
@@ -24,7 +27,9 @@ function($q , egCore , egWorkLog , patronSvc) {
         .then(function(summary) {return service.summary = summary})
     }
 
-    service.applyPayment = function(type, payments, note, check, cc_args) {
+    service.applyPayment = function(
+        type, payments, note, check, cc_args, patron_credit) {
+
         return egCore.net.request(
             'open-ils.circ',
             'open-ils.circ.money.payment',
@@ -34,7 +39,7 @@ function($q , egCore , egWorkLog , patronSvc) {
                 payment_type : type,
                 check_number : check,
                 payments : payments,
-                patron_credit : 0,
+                patron_credit : patron_credit,
                 cc_args : cc_args
             },
             patronSvc.current.last_xact_id()
@@ -168,6 +173,7 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location,
     $scope.annotate_payment = false;
     $scope.receipt_count = 1;
     $scope.receipt_on_pay = { isChecked: false };
+    $scope.convert_to_credit = {isChecked: false};
     $scope.warn_amount = 1000;
     $scope.max_amount = 100000;
     $scope.amount_verified = false;
@@ -327,8 +333,10 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location,
     function sendPayment(note, cc_args) {
         $scope.applyingPayment = true;
         var make_payments = generatePayments();
+        var patron_credit = $scope.convert_to_credit.isChecked ?
+            $scope.pending_change() : 0; 
         billSvc.applyPayment($scope.payment_type, 
-            make_payments, note, $scope.check_number, cc_args)
+            make_payments, note, $scope.check_number, cc_args, patron_credit)
         .then(
             function(payment_ids) {
 
@@ -468,6 +476,9 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location,
                 s['circ.staff_client.do_not_auto_attempt_print'].indexOf('Bill Pay') > -1
             );
         }
+        if (s['circ.disable_patron_credit']) {
+            $scope.disablePatronCredit = true;
+        }
     });
 
     $scope.gridControls.allItemsRetrieved = function() {

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

Summary of changes:
 .../src/templates/staff/circ/patron/t_bills.tt2    |    8 +++++++
 .../web/js/ui/default/staff/circ/patron/bills.js   |   23 ++++++++++++++-----
 2 files changed, 25 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list