From 020819d821215c52be65f2d03ab670a6c6099a6c Mon Sep 17 00:00:00 2001 From: Cesar Velez Date: Fri, 23 Jun 2017 17:45:15 +0100 Subject: [PATCH] LP#1697754 - WebStaff make receipt on payment sticky Add circ.bills.receiptonpay local storage setting. Signed-off by: Cesar Velez --- Open-ILS/src/templates/staff/circ/patron/t_bills.tt2 | 2 +- Open-ILS/web/js/ui/default/staff/circ/patron/bills.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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 bbf65956a0..c3fda5c688 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_bills.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_bills.tt2 @@ -108,7 +108,7 @@ not sure what's up, there. -->
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 836100f9be..c648def4b2 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 @@ -165,6 +165,12 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, $scope.amount_verified = false; $scope.disable_auto_print = false; + // check receipt_on_pay setting default persisted + egCore.hatch.getItem('circ.bills.receiptonpay') + .then(function(rcptOnPay){ + if (rcptOnPay) $scope.receipt_on_pay.isChecked = rcptOnPay; + }); + // pre-define list-returning funcs in case we access them // before the grid instantiates $scope.gridControls = { @@ -325,6 +331,10 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, }) } + $scope.onReceiptOnPayChanged = function(){ + egCore.hatch.setItem('circ.bills.receiptonpay', $scope.receipt_on_pay.isChecked); + } + function printReceipt(type, payment_ids, payments_made, note) { var payment_blobs = []; angular.forEach(payments_made, function(payment) { -- 2.11.0