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=c1909c8b7b37453acd14da027b531364f9cdcdf4;p=Evergreen.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 Signed-off-by: Llewellyn Marshall Signed-off-by: Michele Morgan --- diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_bill_payment.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_bill_payment.tt2 index de88c7022d..1020066647 100644 --- a/Open-ILS/src/templates/staff/share/print_templates/t_bill_payment.tt2 +++ b/Open-ILS/src/templates/staff/share/print_templates/t_bill_payment.tt2 @@ -20,6 +20,7 @@ includes: * payment_total - total paid * new_balance - balance after the payments were applied * payments - list of specific payments +* approval_code - credit card approval code Individual payments within payments contain: * payment.xact.copy_barcode - Item barcode 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(),