@@ -, +, @@ date --- circ/circulation.pl | 89 +++++++++++--------- .../prog/en/modules/circ/circulation.tt | 18 ++-- 2 files changed, 59 insertions(+), 48 deletions(-) --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -56,7 +56,6 @@ use Date::Calc qw( ); use List::MoreUtils qw/uniq/; - # # PARAMETERS READING # @@ -123,7 +122,6 @@ my $borrowernumber = $query->param('borrowernumber'); $branch = C4::Context->userenv->{'branch'}; $printer = C4::Context->userenv->{'branchprinter'}; - # If AutoLocation is not activated, we show the Circulation Parameters to chage settings of librarian if (C4::Context->preference("AutoLocation") != 1) { $template->param(ManualLocation => 1); @@ -137,13 +135,14 @@ my $barcode = $query->param('barcode') || q{}; $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace $barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter')); -my $stickyduedate = $query->param('stickyduedate') || $session->param('stickyduedate'); -my $duedatespec = $query->param('duedatespec') || $session->param('stickyduedate'); -my $issueconfirmed = $query->param('issueconfirmed'); -my $cancelreserve = $query->param('cancelreserve'); -my $print = $query->param('print') || q{}; -my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice -my $charges = $query->param('charges') || q{}; +my $stickyduedate = $query->param('stickyduedate') || $session->param('stickyduedate'); +my $duedatespec = $query->param('duedatespec') || $session->param('stickyduedate'); +my $restoreduedatespec = $query->param('restoreduedatespec') || $session->param('stickyduedate'); +my $issueconfirmed = $query->param('issueconfirmed'); +my $cancelreserve = $query->param('cancelreserve'); +my $print = $query->param('print') || q{}; +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 ( $barcode ) { @@ -519,38 +518,48 @@ my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $borrower->{stree $template->param(%$borrower); +# Restore date if changed by holds +if ($restoreduedatespec) { + $duedatespec = $restoreduedatespec; + + if ($stickyduedate eq 'on') { + $session->param( 'stickyduedate', $duedatespec ); + } +} + $template->param( - lib_messages_loop => $lib_messages_loop, - bor_messages_loop => $bor_messages_loop, - all_messages_del => C4::Context->preference('AllowAllMessageDeletion'), - findborrower => $findborrower, - borrower => $borrower, - borrowernumber => $borrowernumber, - branch => $branch, - branchname => GetBranchName($borrower->{'branchcode'}), - printer => $printer, - printername => $printer, - was_renewed => $query->param('was_renewed') ? 1 : 0, - expiry => format_date($borrower->{'dateexpiry'}), - roadtype => $roadtype, - amountold => $amountold, - barcode => $barcode, - stickyduedate => $stickyduedate, - duedatespec => $duedatespec, - message => $message, - totaldue => sprintf('%.2f', $total), - inprocess => $inprocess, - is_child => ($borrowernumber && $borrower->{'category_type'} eq 'C'), - circview => 1, - soundon => C4::Context->preference("SoundOn"), - fast_cataloging => $fast_cataloging, - CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"), - activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), - SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'), - AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'), - RoutingSerials => C4::Context->preference('RoutingSerials'), - relatives_issues_count => $relatives_issues_count, - relatives_borrowernumbers => \@relatives, + lib_messages_loop => $lib_messages_loop, + bor_messages_loop => $bor_messages_loop, + all_messages_del => C4::Context->preference('AllowAllMessageDeletion'), + findborrower => $findborrower, + borrower => $borrower, + borrowernumber => $borrowernumber, + branch => $branch, + branchname => GetBranchName($borrower->{'branchcode'}), + printer => $printer, + printername => $printer, + was_renewed => $query->param('was_renewed') ? 1 : 0, + expiry => format_date($borrower->{'dateexpiry'}), + roadtype => $roadtype, + amountold => $amountold, + barcode => $barcode, + stickyduedate => $stickyduedate, + duedatespec => $duedatespec, + restoreduedatespec => $restoreduedatespec, + message => $message, + totaldue => sprintf('%.2f', $total), + inprocess => $inprocess, + is_child => ($borrowernumber && $borrower->{'category_type'} eq 'C'), + circview => 1, + soundon => C4::Context->preference("SoundOn"), + fast_cataloging => $fast_cataloging, + CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"), + activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), + SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'), + AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'), + RoutingSerials => C4::Context->preference('RoutingSerials'), + relatives_issues_count => $relatives_issues_count, + relatives_borrowernumbers => \@relatives, ); # save stickyduedate to session --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -311,13 +311,15 @@ $(document).ready(function() { [% IF HIGHHOLDS %] [% END %] [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
+ [% IF (forceallow) %][% END %] @@ -362,6 +364,7 @@ $(document).ready(function() { [% IF ( RESERVED ) %] + @@ -371,6 +374,7 @@ $(document).ready(function() { [% IF ( RESERVE_WAITING ) %] + @@ -380,8 +384,10 @@ $(document).ready(function() { [% IF (forceallow) %][% END %] + + [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %] [% IF ( RENEW_ISSUE ) %] @@ -430,6 +436,7 @@ $(document).ready(function() {
[% IF (forceallow) %][% END %] + @@ -537,11 +544,11 @@ No patron matched [% message %] [% END %] - [% IF ( borrowers ) %] [% INCLUDE 'patron-toolbar.inc' %] +
Patron selection @@ -592,8 +599,8 @@ No patron matched [% message %] [% END %] - + [% IF ( issue ) %]
[% ELSE %] @@ -777,8 +784,6 @@ No patron matched [% message %] [% END %] - - @@ -846,7 +851,6 @@ No patron matched [% message %] [% END %] - @@ -960,8 +964,6 @@ No patron matched [% message %] [% END %] - - [% UNLESS ( borrowers ) %][% IF ( borrowernumber ) %]
--