From: Terran McCanna Date: Wed, 22 Sep 2021 18:34:59 +0000 (-0400) Subject: LP1865062 Add Credit Card Approval Code to Payment Receipt X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a89852d705d469676aa33c69780d6319c7f1a38a;p=evergreen%2Fpines.git LP1865062 Add Credit Card Approval Code to Payment Receipt Makes approval code available to Bill Payment print template (when relevant). Signed-off-by: Terran McCanna --- diff --git a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js index f5b278c7b6..4e4b906ed9 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js +++ b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js @@ -614,6 +614,7 @@ function($scope , $q , egCore , ngToast) { change_given : 0, payment_type : 'cash_payment', payment_note : 'Here is a payment note', + approval_code : 'CH1234567', note : { create_date : new Date().toISOString(), title : 'Test Note Title', 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 011e553c9e..5c4bf553b9 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 @@ -395,10 +395,10 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, make_payments, note, $scope.check_number, cc_args, patron_credit) .then( function(payment_ids) { - + var approval_code = cc_args ? cc_args.approval_code : ''; if (!$scope.disable_auto_print && $scope.receipt_on_pay.isChecked) { printReceipt( - $scope.payment_type, payment_ids, make_payments, note); + $scope.payment_type, payment_ids, make_payments, note, approval_code); } refreshDisplay(); @@ -418,7 +418,7 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, egCore.hatch.setItem('eg.circ.bills.annotatepayment', $scope.annotate_payment); } - function printReceipt(type, payment_ids, payments_made, note) { + function printReceipt(type, payment_ids, payments_made, note, approval_code) { var payment_blobs = []; var cusr = patronSvc.current; @@ -441,6 +441,7 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, var print_data = { payment_type : type, payment_note : note, + approval_code : approval_code, previous_balance : Number($scope.summary.balance_owed()), payment_total : Number($scope.payment_amount), payment_applied : $scope.pending_payment(),