From 30b9e2a30487f207165a87bccfbdb0901b79908a Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Tue, 17 Apr 2012 17:03:21 -0400 Subject: [PATCH] work log entries for payments received Signed-off-by: Jason Etheridge Signed-off-by: Bill Erickson --- .../server/locale/en-US/circ.properties | 6 ++++ Open-ILS/xul/staff_client/server/patron/bill2.js | 32 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties index 633c2df185..3592b82e68 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties @@ -429,6 +429,12 @@ staff.circ.work_log_checkin_attempt.reservation_shelf.message=%1$s attempted che staff.circ.work_log_checkin_attempt.cataloging.message=%1$s attempted checkin of %4$s, which is a pre-cat and was routed to Cataloging. Route To = %5$s # 1 - Staff Username 2 - Patron Family 3 - Patron Barcode 4 - Item Barcode 5 - Route To text staff.circ.work_log_checkin_attempt.cataloging.message=%1$s attempted checkin of %4$s, which was not found, and so was routed to Cataloging. Route To = %5$s +# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode 4 - Original Balance 5 - Voided Balance 6 - Payment Received 7 - Payment Applied +# 8 - Change Given 9 - Credit Given 10 - New Balance 11 - Payment Type 12 - Note 13 - API call result +staff.circ.work_log_payment_attempt.success.message=%1$s received %6$s (%11$s) for %3$s (%2$s). +# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode 4 - Original Balance 5 - Voided Balance 6 - Payment Received 7 - Payment Applied +# 8 - Change Given 9 - Credit Given 10 - New Balance 11 - Payment Type 12 - Note 13 - API call result +staff.circ.work_log_payment_attempt.failure.message=%1$s attempted receipt of %6$s (%11$s) for %3$s (%2$s), which failed for this reason: %13$s staff.circ.checkin.hold_capture=Hold Capture staff.circ.checkin.check_in.tab=Item Check In staff.circ.renew.tab.label=Renew Items diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js index e7414949bb..fa0a8a051a 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.js +++ b/Open-ILS/xul/staff_client/server/patron/bill2.js @@ -916,6 +916,38 @@ function pay(payment_blob) { note : payment_blob.note } var robj = g.network.simple_request( 'BILL_PAY', [ ses(), payment_blob, g.patron.last_xact_id() ]); + + try { + g.error.work_log( + $('circStrings').getFormattedString( + robj && robj.payments + ? 'staff.circ.work_log_payment_attempt.success.message' + : 'staff.circ.work_log_payment_attempt.failure.message', + [ + ses('staff_usrname'), // 1 - Staff Username + g.patron.family_name(), // 2 - Patron Family + g.patron.card().barcode(), // 3 - Patron Barcode + g.previous_summary.original_balance, // 4 - Original Balance + g.previous_summary.voided_balance, // 5 - Voided Balance + g.previous_summary.payment_received, // 6 - Payment Received + g.previous_summary.payment_applied, // 7 - Payment Applied + g.previous_summary.change_given, // 8 - Change Given + g.previous_summary.credit_given, // 9 - Credit Given + g.previous_summary.new_balance, // 10 - New Balance + g.previous_summary.payment_type, // 11 - Payment Type + g.previous_summary.note, // 12 - Note + robj && robj.textcode ? robj.textcode : robj // 13 - API call result + ] + ), { + 'au_id' : g.patron.id(), + 'au_family_name' : g.patron.family_name(), + 'au_barcode' : g.patron.card().barcode() + } + ); + } catch(E) { + alert('Error logging payment in bill2.js: ' + E); + } + if (typeof robj.ilsevent != 'undefined') { switch(robj.textcode) { case 'SUCCESS' : return true; break; -- 2.11.0