From 34b4a00712413142d77b1c84dd8673c959d16abd Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 10 Feb 2025 10:50:27 +0000 Subject: [PATCH] Bug 38924: Add quotas available on circuation screen --- circ/circulation.pl | 16 ++++++++++------ .../prog/en/includes/patron_messages.inc | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index a37abf63a96..ed4831fc1c8 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -49,6 +49,7 @@ use Koha::CsvProfiles; use Koha::Patrons; use Koha::DateUtils qw( dt_from_string ); use Koha::Patron::Restriction::Types; +use Koha::Patron::Quotas; use Koha::Plugins; use Koha::Database; use Koha::BiblioFrameworks; @@ -184,13 +185,13 @@ my $restoreduedatespec = $query->param('restoreduedatespec') || $duedatespec || if ( $restoreduedatespec && $restoreduedatespec eq "highholds_empty" ) { undef $restoreduedatespec; } -my $issueconfirmed = $query->param('issueconfirmed'); -my $cancelreserve = $query->param('cancelreserve'); -my $cancel_recall = $query->param('cancel_recall'); +my $issueconfirmed = $query->param('issueconfirmed'); +my $cancelreserve = $query->param('cancelreserve'); +my $cancel_recall = $query->param('cancel_recall'); my $selected_quota_id = $query->param('selected_quota_id'); -my $recall_id = $query->param('recall_id'); -my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice -my $charges = $query->param('charges') || q{}; +my $recall_id = $query->param('recall_id'); +my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice +my $charges = $query->param('charges') || q{}; # Check if stickyduedate is turned off if (@$barcodes) { @@ -322,6 +323,9 @@ if ($patron) { $template->param( limited_category => 1 ); } + # Add quota details + my $quotas = $patron->all_quotas; + $template->param( quotas => $quotas ); } # diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc index 25e05462e93..ee060c89473 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc @@ -179,6 +179,20 @@ [% END # /F ( has_modifications || warndeparture... %] +[% IF quotas %] +
+

Quota details

+ +
+[% END %] + [% IF waiting_recalls.count %]
[% SET waiting_here = 0 %] -- 2.39.5