#New expiration date
$ctx->{response}->{expire_date} = $ctx->{user}->expire_date;
#Mark whether this is a temporary renewal or not
- # TERRAN - TO DO
+ my $findpenalty_temp = $e->search_config_standing_penalty({name => 'PATRON_TEMP_RENEWAL'})->[0];
+ my $searchpenalty_temp = $e->search_actor_user_standing_penalty({
+ usr => $cgi->param('patron_id'),
+ standing_penalty => $findpenalty_temp->id,
+ '-or' => [
+ {stop_date => undef},
+ {stop_date => {'>' => 'now'}}
+ ]
+ });
+ if (@$searchpenalty_temp) {
+ $ctx->{response}->{temp_renew} = 1;
+ } else {
+ $ctx->{response}->{temp_renew} = 0;
+ }
} else {
$ctx->{response}->{barcode} = $ctx->{user}->card->barcode;
}