[open-ils-commits] r14206 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Sep 29 12:18:54 EDT 2009
Author: erickson
Date: 2009-09-29 12:18:51 -0400 (Tue, 29 Sep 2009)
New Revision: 14206
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CircCommon.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
added void_overdues flag to checkin API call to allow for an 'amnesty checkin mode'. added optional system note to shared void_overdues routine. updated some code comments
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CircCommon.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CircCommon.pm 2009-09-29 16:13:39 UTC (rev 14205)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CircCommon.pm 2009-09-29 16:18:51 UTC (rev 14206)
@@ -21,7 +21,7 @@
# provided, then we only void back to the backdate
# -----------------------------------------------------------------
sub void_overdues {
- my($class, $e, $circ, $backdate) = @_;
+ my($class, $e, $circ, $backdate, $note) = @_;
my $bill_search = {
xact => $circ->id,
@@ -56,8 +56,8 @@
$bill->voided('t');
$bill->void_time('now');
$bill->voider($e->requestor->id);
- my $n = $bill->note || "";
- $bill->note("$n\nSystem: VOIDED FOR BACKDATE");
+ my $n = ($bill->note) ? sprintf("%s\n", $bill->note) : "";
+ $bill->note(sprintf("$n%s", ($note) ? $note : "System: VOIDED FOR BACKDATE"));
$e->update_money_billing($bill) or return $e->die_event;
}
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-09-29 16:13:39 UTC (rev 14205)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-09-29 16:18:51 UTC (rev 14206)
@@ -110,7 +110,9 @@
@param authtoken The login session key
@param params Hash of named parameters including:
barcode - The copy barcode
- force - If true, copies in bad statuses will be checked in and give good statuses
+ force - If true, copies in bad statuses will be checked in and give good statuses
+ noop - don't capture holds or put items into transit
+ void_overdues - void all overdues for the circulation (aka amnesty)
...
/
);
@@ -403,6 +405,7 @@
rental_billing
capture
noop
+ void_overdues
/;
@@ -2264,6 +2267,12 @@
return if $self->bail_out;
}
+ if($self->void_overdues) {
+ my $evt = OpenILS::Application::Circ::CircCommon->void_overdues(
+ $self->editor, $circ, undef, 'System: Amnesty Checkin'); # TODO i18n for system-generated notes
+ return $self->bail_on_events($evt) if $evt;
+ }
+
if(!$circ->stop_fines) {
$circ->stop_fines(OILS_STOP_FINES_CHECKIN);
$circ->stop_fines(OILS_STOP_FINES_RENEW) if $self->is_renewal;
More information about the open-ils-commits
mailing list