@@ -, +, @@ --- circ/returns.pl | 22 ++++++++++------- .../prog/en/modules/admin/itemtypes.tt | 5 ++++ .../intranet-tmpl/prog/en/modules/circ/returns.tt | 28 +++++++++++++++++----- 3 files changed, 40 insertions(+), 15 deletions(-) --- a/circ/returns.pl +++ a/circ/returns.pl @@ -190,6 +190,7 @@ my $issueinformation; my $itemnumber; my $barcode = $query->param('barcode'); my $exemptfine = $query->param('exemptfine'); +my $accept = $query->param('accept'); if ( $exemptfine && !C4::Auth::haspermission(C4::Context->userenv->{'id'}, {'updatecharges' => 'writeoff'}) @@ -268,11 +269,14 @@ if ($barcode) { # Check if we should display a checkin message, based on the the item # type of the checked in item my $itemtype = Koha::ItemTypes->find( $biblio->{'itemtype'} ); - if ( $itemtype && $itemtype->checkinmsg ) { - $template->param( - checkinmsg => $itemtype->checkinmsg, - checkinmsgtype => $itemtype->checkinmsgtype, - ); + if ($itemtype->checkinmsgtype eq 'question' && $accept != '1' && $accept !='2'){ + if ( $itemtype && $itemtype->checkinmsg ) { + $template->param( + checkinmsg => $itemtype->checkinmsg, + checkinmsgtype => $itemtype->checkinmsgtype, + barcode => $barcode, + ); + } } # make sure return branch respects home branch circulation rules, default to homebranch @@ -299,7 +303,6 @@ if ($barcode) { borrower => $borrower, additional_materials => $materials, ); - my %input = ( counter => 0, first => 1, @@ -307,9 +310,10 @@ if ($barcode) { ); # do the return - ( $returned, $messages, $issueinformation, $borrower ) = - AddReturn( $barcode, $userenv_branch, $exemptfine, $dropboxmode, $return_date_override, $dropboxdate ); - + if($itemtype->checkinmsgtype ne 'question' || ($itemtype->checkinmsgtype eq 'question' && $accept == '1')) { + ( $returned, $messages, $issueinformation, $borrower ) = + AddReturn( $barcode, $userenv_branch, $exemptfine, $dropboxmode, $return_date_override, $dropboxdate ); + } if ($returned) { my $time_now = DateTime->now( time_zone => C4::Context->tz )->truncate( to => 'minute'); my $duedate = $issueinformation->{date_due}->strftime('%Y-%m-%d %H:%M'); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -272,6 +272,11 @@ Item types administration [% ELSE %] [% END %] + [% IF itemtype.checkinmsgtype == 'question' %] + + [% ELSE %] + + [% END %]
  • --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -528,12 +528,24 @@ $(document).ready(function () { [% IF ( checkinmsg ) %] - [% IF ( checkinmsgtype == 'alert' ) %] + [% IF ( checkinmsgtype == 'alert' || checkinmsgtype == 'question') %]
    [% ELSE %]
    [% END %]

    [% checkinmsg | html_line_break %]

    + [% IF ( checkinmsgtype == 'question') %] +
    + + + + + [% FOREACH inputloo IN inputloop %] + + + [% END %] + [% END %] +
    [% END%] @@ -553,12 +565,16 @@ $(document).ready(function () {
    Check in - [% IF ( exemptfine ) %] - - [% ELSIF ( dropboxmode ) %] - + [% IF checkinmsgtype == 'question' %] + [% ELSE %] - + [% IF ( exemptfine ) %] + + [% ELSIF ( dropboxmode ) %] + + [% ELSE %] + + [% END %] [% END %] --