[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. fd72b5126d70002b1ed9718ecf44a7b7f6b64fc6
Evergreen Git
git at git.evergreen-ils.org
Wed May 23 09:56:01 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_1 has been updated
via fd72b5126d70002b1ed9718ecf44a7b7f6b64fc6 (commit)
from b9194580f2c19b7ec613b816110665feca9232c7 (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 fd72b5126d70002b1ed9718ecf44a7b7f6b64fc6
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 bdc6c27..d37f336 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 392b696..e1d1686 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()
@@ -179,6 +184,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;
@@ -338,8 +344,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) {
@@ -479,6 +487,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