From b403bb9eb3a9015e36e8c11e4245dec7f5c3ea41 Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 3 Nov 2008 17:07:58 +0000 Subject: [PATCH] backporting code for rental/deposits git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@11032 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/circ/checkout.js | 13 +++++++--- Open-ILS/xul/staff_client/server/circ/util.js | 28 +++++++++++++++++++++- .../server/locale/en-US/circ.properties | 8 +++++++ 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/circ/checkout.js b/Open-ILS/xul/staff_client/server/circ/checkout.js index 19aacdb84f..fb4f91cbca 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkout.js +++ b/Open-ILS/xul/staff_client/server/circ/checkout.js @@ -561,6 +561,8 @@ circ.checkout.prototype = { 1212 /* PATRON_EXCEEDS_OVERDUE_COUNT */, 1213 /* PATRON_BARRED */, 1215 /* CIRC_EXCEEDS_COPY_RANGE */, + 1232 /* ITEM_DEPOSIT_REQUIRED */, + 1233 /* ITEM_RENTAL_FEE_REQUIRED */, 7002 /* PATRON_EXCEEDS_CHECKOUT_COUNT */, 7003 /* COPY_CIRC_NOT_ALLOWED */, 7004 /* COPY_NOT_AVAILABLE */, @@ -570,11 +572,14 @@ circ.checkout.prototype = { 7013 /* PATRON_EXCEEDS_FINES */ ], 'text' : { + '1232' : function(r) { + return document.getElementById('circStrings').getString('staff.circ.checkout.override.item_deposit_required.warning'); + }, + '1233' : function(r) { + return document.getElementById('circStrings').getString('staff.circ.checkout.override.item_rental_fee_required.warning'); + }, '7004' : function(r) { - //return obj.data.hash.ccs[ r.payload ].name(); return r.payload.status().name(); - //return r.payload.name(); - //return r.payload; }, '7010' : function(r) { return r.payload; @@ -713,6 +718,8 @@ circ.checkout.prototype = { document.getElementById('circStrings').getString('staff.circ.confirm.msg') ); break; + case 1232 /* ITEM_DEPOSIT_REQUIRED */ : + case 1233 /* ITEM_RENTAL_FEE_REQUIRED */ : case 7013 /* PATRON_EXCEEDS_FINES */ : found_handled = true; break; diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index eaed6d62ce..28562b3fad 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -1911,6 +1911,7 @@ circ.util.checkin_via_barcode = function(session,params,backdate,auto_print,asyn 1213 /* PATRON_BARRED */, 1217 /* PATRON_INACTIVE */, 1224 /* PATRON_ACCOUNT_EXPIRED */, + 1234 /* ITEM_DEPOSIT_PAID */, 7009 /* CIRC_CLAIMS_RETURNED */, 7010 /* COPY_ALERT_MESSAGE */, 7011 /* COPY_STATUS_LOST */, @@ -1919,9 +1920,11 @@ circ.util.checkin_via_barcode = function(session,params,backdate,auto_print,asyn ], 'text' : { '1203' : function(r) { - //return data.hash.ccs[ r.payload.status() ].name(); return r.payload.status().name(); }, + '1234' : function(r) { + return document.getElementById('circStrings').getString('staff.circ.utils.checkin.override.item_deposit_paid.warning'); + }, '7010' : function(r) { return r.payload; } @@ -2243,6 +2246,23 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che document.getElementById('no_change_label').setAttribute('hidden','false'); } + } else /* HOLD_CAPTURE_DELAYED */ if (check.ilsevent == 7019) { + + var rv = 0; + msg += document.getElementById('circStrings').getString('staff.circ.utils.hold_capture_delayed.description'); + rv = error.yns_alert_formatted( + msg, + document.getElementById('circStrings').getString('staff.circ.utils.hold_capture_delayed.titlebar'), + document.getElementById('circStrings').getString('staff.circ.utils.hold_capture_delayed.prompt_for_nocapture'), + document.getElementById('circStrings').getString('staff.circ.utils.hold_capture_delayed.prompt_for_capture'), + null, + document.getElementById('circStrings').getString('staff.circ.confirm.msg'), + '/xul/server/skin/media/images/stop_sign.png' + ); + params.capture = rv == 0 ? 'nocapture' : 'capture'; + + return circ.util.checkin_via_barcode(session,params,backdate,auto_print,false); + } else /* NETWORK TIMEOUT */ if (check.ilsevent == -1) { error.standard_network_error_alert(document.getElementById('circStrings').getString('staff.circ.checkin.suggest_offline')); } else { @@ -2252,6 +2272,7 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che case 1213 /* PATRON_BARRED */ : case 1217 /* PATRON_INACTIVE */ : case 1224 /* PATRON_ACCOUNT_EXPIRED */ : + case 1234 /* ITEM_DEPOSIT_PAID */ : case 7009 /* CIRC_CLAIMS_RETURNED */ : case 7010 /* COPY_ALERT_MESSAGE */ : case 7011 /* COPY_STATUS_LOST */ : @@ -2294,6 +2315,7 @@ circ.util.renew_via_barcode = function ( barcode, patron_id, async ) { case 1213 /* PATRON_BARRED */ : break; case 1215 /* CIRC_EXCEEDS_COPY_RANGE */ : break; case 1224 /* PATRON_ACCOUNT_EXPIRED */ : break; + case 1233 /* ITEM_RENTAL_FEE_REQUIRED */ : break; case 1500 /* ACTION_CIRCULATION_NOT_FOUND */ : break; case 7002 /* PATRON_EXCEEDS_CHECKOUT_COUNT */ : break; case 7003 /* COPY_CIRC_NOT_ALLOWED */ : break; @@ -2328,6 +2350,7 @@ circ.util.renew_via_barcode = function ( barcode, patron_id, async ) { 1212 /* PATRON_EXCEEDS_OVERDUE_COUNT */, 1213 /* PATRON_BARRED */, 1215 /* CIRC_EXCEEDS_COPY_RANGE */, + 1233 /* ITEM_RENTAL_FEE_REQUIRED */, 7002 /* PATRON_EXCEEDS_CHECKOUT_COUNT */, 7003 /* COPY_CIRC_NOT_ALLOWED */, 7004 /* COPY_NOT_AVAILABLE */, @@ -2342,6 +2365,9 @@ circ.util.renew_via_barcode = function ( barcode, patron_id, async ) { '1212' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); }, '1213' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); }, '1215' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); }, + '1233' : function(r) { + return document.getElementById('circStrings').getString('staff.circ.renew.override.item_rental_fee_required.warning.barcode', [barcode]); + }, '7002' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); }, '7003' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [barcode]); }, '7004' : function(r) { 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 744ff9bad4..c3a8dd7fa2 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 @@ -42,6 +42,8 @@ staff.circ.checkout.non_cataloged.pending=Non-cataloged checkout pending... staff.circ.checkout.barcode.pending=%1$s checkout pending... staff.circ.checkout.barcode.failed.alert=Check Out Failed %1$s staff.circ.checkout.override.confirm=Override Checkout Failure? +staff.circ.checkout.override.item_deposit_required.warning=A billing for an Item Deposit will be added to the patron's account if this action is overrided. +staff.circ.checkout.override.item_rental_fee_required.warning=A billing for an Item Rental Fee will be added to the patron's account if this action is overrided. staff.circ.checkout.not_cataloged.confirm=Mis-scan or non-cataloged item. Checkout as a pre-cataloged item? staff.circ.pre_cataloged=Pre-cataloged staff.circ.non_cataloged=Non-cataloged @@ -276,6 +278,7 @@ staff.circ.utils.notify_count=Notices staff.circ.utils.patron_family_name=Patron Last Name staff.circ.utils.patron_first_given_name=Patron First Name staff.circ.utils.checkin.override=Override Checkin Failure? +staff.circ.utils.checkin.override.item_deposit_paid.warning=A paid deposit will be owed to this patron if this action is overrided. staff.circ.utils.billable.amount=Transaction for %1$s billable $%2$s staff.circ.utils.transit_hold_cancelled=Original hold for transit cancelled. staff.circ.utils.item_checked_in=%1$s was already checked in. @@ -294,6 +297,10 @@ staff.circ.utils.payload.hold.slip_date=Slip Date: %1$s staff.circ.utils.hold_slip=Hold Slip staff.circ.utils.hold_slip.print.yes=Print staff.circ.utils.hold_slip.print.no=Do Not Print +staff.circ.utils.hold_capture_delayed.description=This item could fulfill a hold request but capture has been delayed by policy. +staff.circ.utils.hold_capture_delayed.titlebar=Hold Capture Delayed +staff.circ.utils.hold_capture_delayed.prompt_for_nocapture=Do Not Capture +staff.circ.utils.hold_capture_delayed.prompt_for_capture=Capture staff.circ.utils.capture=%1$s has been captured for a hold. staff.circ.utils.needs_cataloging=%1$s needs to be cataloged. staff.circ.utils.copy_status.error=FIXME -- this case "%1$s" is unhandled. @@ -314,6 +321,7 @@ staff.circ.checkin.renew_failed.override=Override Renew Failure? staff.circ.renew.barcode=Barcode: %1$s staff.circ.renew.barcode.status=Barcode: %1$s Status: %2$s staff.circ.renew.barcode.msg=Barcode: %1$s Message: %2$s +staff.circ.circ.override.item_rental_fee_required.warning.barcode=For item with barcode %1$s, a billing for an Item Rental Fee will be added to the patron's account if this action is overrided. staff.circ.holds.activate.prompt=Are you sure you would like to activate hold %1$s? staff.circ.holds.activate.prompt.plural=Are you sure you would like to activate holds %1$s? staff.circ.holds.suspend.prompt=Are you sure you would like to suspend hold %1$s? -- 2.11.0