* 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
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',
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();
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;
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(),