use Scalar::Util qw( looks_like_number );
use Koha::Patron::Attribute::Types;
use Koha::Patron::Debarments qw( GetDebarments );
+use Koha::Patron::Restriction::Types;
use Koha::Patron::Messages;
use Koha::CsvProfiles;
use Koha::Holds;
$patron->$_ and $template->param(flagged => 1) and last;
}
+$template->param(
+ restriction_types => scalar Koha::Patron::Restriction::Types->keyed_on_code()
+);
+
if ( $patron->is_debarred ) {
$template->param(
'debarments' => scalar GetDebarments({ borrowernumber => $borrowernumber }),
my @relatives;
my $guarantor_relationships = $patron->guarantor_relationships;
-my @guarantees = $patron->guarantee_relationships->guarantees;
-my @guarantors = $guarantor_relationships->guarantors;
+my @guarantees = $patron->guarantee_relationships->guarantees->as_list;
+my @guarantors = $guarantor_relationships->guarantors->as_list;
if (@guarantors) {
push( @relatives, $_->id ) for @guarantors;
- push( @relatives, $_->id ) for $patron->siblings();
+ push( @relatives, $_->id ) for $patron->siblings->as_list;
}
else {
push( @relatives, $_->id ) for @guarantees;
}
if ( C4::Context->preference("ExportCircHistory") ) {
- $template->param(csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc' }) ]);
+ $template->param(csv_profiles => Koha::CsvProfiles->search({ type => 'marc' }));
}
my $patron_messages = Koha::Patron::Messages->search(
WaitingHolds => $waiting_holds,
);
+if ( C4::Context->preference('UseRecalls') ) {
+ my $waiting_recalls = $patron->recalls->search({ status => 'waiting' });
+ $template->param( waiting_recalls => $waiting_recalls );
+}
+
my $no_issues_charge_guarantees = C4::Context->preference("NoIssuesChargeGuarantees");
$no_issues_charge_guarantees = undef unless looks_like_number( $no_issues_charge_guarantees );
if ( defined $no_issues_charge_guarantees ) {
has_modifications => $has_modifications,
);
+if ( C4::Context->preference('UseRecalls') ) {
+ $template->param(
+ recalls => $patron->recalls({},{ order_by => { -asc => 'recalldate' } })->filter_by_current,
+ specific_patron => 1,
+ );
+}
+
output_html_with_http_headers $input, $cookie, $template->output;