|
Lines 190-195
my $issueinformation;
Link Here
|
| 190 |
my $itemnumber; |
190 |
my $itemnumber; |
| 191 |
my $barcode = $query->param('barcode'); |
191 |
my $barcode = $query->param('barcode'); |
| 192 |
my $exemptfine = $query->param('exemptfine'); |
192 |
my $exemptfine = $query->param('exemptfine'); |
|
|
193 |
my $accept = $query->param('accept'); |
| 193 |
if ( |
194 |
if ( |
| 194 |
$exemptfine && |
195 |
$exemptfine && |
| 195 |
!C4::Auth::haspermission(C4::Context->userenv->{'id'}, {'updatecharges' => 'writeoff'}) |
196 |
!C4::Auth::haspermission(C4::Context->userenv->{'id'}, {'updatecharges' => 'writeoff'}) |
|
Lines 268-278
if ($barcode) {
Link Here
|
| 268 |
# Check if we should display a checkin message, based on the the item |
269 |
# Check if we should display a checkin message, based on the the item |
| 269 |
# type of the checked in item |
270 |
# type of the checked in item |
| 270 |
my $itemtype = Koha::ItemTypes->find( $biblio->{'itemtype'} ); |
271 |
my $itemtype = Koha::ItemTypes->find( $biblio->{'itemtype'} ); |
| 271 |
if ( $itemtype && $itemtype->checkinmsg ) { |
272 |
if ($itemtype->checkinmsgtype eq 'question' && $accept != '1' && $accept !='2'){ |
| 272 |
$template->param( |
273 |
if ( $itemtype && $itemtype->checkinmsg ) { |
| 273 |
checkinmsg => $itemtype->checkinmsg, |
274 |
$template->param( |
| 274 |
checkinmsgtype => $itemtype->checkinmsgtype, |
275 |
checkinmsg => $itemtype->checkinmsg, |
| 275 |
); |
276 |
checkinmsgtype => $itemtype->checkinmsgtype, |
|
|
277 |
barcode => $barcode, |
| 278 |
); |
| 279 |
} |
| 276 |
} |
280 |
} |
| 277 |
|
281 |
|
| 278 |
# make sure return branch respects home branch circulation rules, default to homebranch |
282 |
# make sure return branch respects home branch circulation rules, default to homebranch |
|
Lines 299-305
if ($barcode) {
Link Here
|
| 299 |
borrower => $borrower, |
303 |
borrower => $borrower, |
| 300 |
additional_materials => $materials, |
304 |
additional_materials => $materials, |
| 301 |
); |
305 |
); |
| 302 |
|
|
|
| 303 |
my %input = ( |
306 |
my %input = ( |
| 304 |
counter => 0, |
307 |
counter => 0, |
| 305 |
first => 1, |
308 |
first => 1, |
|
Lines 307-315
if ($barcode) {
Link Here
|
| 307 |
); |
310 |
); |
| 308 |
|
311 |
|
| 309 |
# do the return |
312 |
# do the return |
| 310 |
( $returned, $messages, $issueinformation, $borrower ) = |
313 |
if($itemtype->checkinmsgtype ne 'question' || ($itemtype->checkinmsgtype eq 'question' && $accept == '1')) { |
| 311 |
AddReturn( $barcode, $userenv_branch, $exemptfine, $dropboxmode, $return_date_override, $dropboxdate ); |
314 |
( $returned, $messages, $issueinformation, $borrower ) = |
| 312 |
|
315 |
AddReturn( $barcode, $userenv_branch, $exemptfine, $dropboxmode, $return_date_override, $dropboxdate ); |
|
|
316 |
} |
| 313 |
if ($returned) { |
317 |
if ($returned) { |
| 314 |
my $time_now = DateTime->now( time_zone => C4::Context->tz )->truncate( to => 'minute'); |
318 |
my $time_now = DateTime->now( time_zone => C4::Context->tz )->truncate( to => 'minute'); |
| 315 |
my $duedate = $issueinformation->{date_due}->strftime('%Y-%m-%d %H:%M'); |
319 |
my $duedate = $issueinformation->{date_due}->strftime('%Y-%m-%d %H:%M'); |