# overrides have been performed. Go ahead and re-override.
$circulator->override(1) if $circulator->request_precat;
$circulator->do_permit();
+ $circulator->is_checkout(1);
unless( $circulator->bail_out ) {
$circulator->events([]);
$circulator->do_checkout();
return $data;
} elsif( $api =~ /checkout/ ) {
+ $circulator->is_checkout(1);
$circulator->do_checkout();
} elsif( $api =~ /checkin/ ) {
$circulator->do_hold_notify($circulator->notify_hold)
if $circulator->notify_hold;
$circulator->retarget_holds if $circulator->retarget;
+ $circulator->append_reading_list;
}
}
volume
title
is_renewal
+ is_checkout
is_noncat
is_precat
request_precat
}
if( $self->is_precat ) {
- #$self->script_runner->insert("environment.isPrecat", 1, 1)
$self->make_precat_copy;
return if $self->bail_out;
sub do_renew {
my $self = shift;
$self->log_me("do_renew()");
- $self->is_renewal(1);
# Make sure there is an open circ to renew that is not
# marked as LOST, CLAIMSRETURNED, or LONGOVERDUE
sub append_reading_list {
my $self = shift;
- my $e = $self->editor;
- return undef unless $self->patron and $self->title;
+
+ return undef unless
+ $self->is_checkout and
+ $self->patron and
+ $self->title and
+ !$self->is_precat and
+ !$self->is_noncat;
+
+ my $e = new_editor(xact => 1, requestor => $self->editor->requestor);
+
+ my $setting = $e->search_actor_user_setting(
+ {usr => $self->patron->id,, name => 'circ.keep_checkout_history_list'})->[0];
+
+ return undef unless $setting and $setting->value;
my $bkt = $e->search_container_biblio_record_entry_bucket(
{owner => $self->patron->id, btype => 'reading_list'})->[0];
$e->create_container_biblio_record_entry_bucket_item($item)
or return $e->die_event;
+ $e->commit;
+
return undef;
}