# 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,
$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;
}
@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)
...
/
);
rental_billing
capture
noop
+ void_overdues
/;
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;