|
Lines 39-45
use C4::Members;
Link Here
|
| 39 |
use C4::Biblio qw( TransformMarcToKoha ); |
39 |
use C4::Biblio qw( TransformMarcToKoha ); |
| 40 |
use C4::Search qw( new_record_from_zebra ); |
40 |
use C4::Search qw( new_record_from_zebra ); |
| 41 |
use C4::Reserves qw( ModReserveAffect ); |
41 |
use C4::Reserves qw( ModReserveAffect ); |
| 42 |
use C4::Log qw( logaction ); |
|
|
| 43 |
use Koha::Holds; |
42 |
use Koha::Holds; |
| 44 |
use C4::Context; |
43 |
use C4::Context; |
| 45 |
use CGI::Session; |
44 |
use CGI::Session; |
|
Lines 327-333
if ($patron) {
Link Here
|
| 327 |
# |
326 |
# |
| 328 |
# |
327 |
# |
| 329 |
my $message; |
328 |
my $message; |
| 330 |
my @message; |
|
|
| 331 |
|
329 |
|
| 332 |
if ( @$barcodes && $op eq 'cud-checkout' ) { |
330 |
if ( @$barcodes && $op eq 'cud-checkout' ) { |
| 333 |
my $checkout_infos; |
331 |
my $checkout_infos; |
|
Lines 548-554
if ( @$barcodes && $op eq 'cud-checkout' ) {
Link Here
|
| 548 |
if ( my $booked = $needsconfirmation->{BOOKED_EARLY} // $alerts->{BOOKED} ) { |
546 |
if ( my $booked = $needsconfirmation->{BOOKED_EARLY} // $alerts->{BOOKED} ) { |
| 549 |
$datedue = $booked->end_date; |
547 |
$datedue = $booked->end_date; |
| 550 |
} |
548 |
} |
| 551 |
$needsconfirmation->{'DEBT'} = $needsconfirmationDEBT if ($debt_confirmed); |
549 |
$needsconfirmation->{'DEBT'} = $needsconfirmationDEBT if ($debt_confirmed); |
|
|
550 |
$needsconfirmation->{'OVERRIDDEN'} = $issueconfirmed if ($issueconfirmed); |
| 552 |
my $issue = AddIssue( |
551 |
my $issue = AddIssue( |
| 553 |
$patron, $barcode, $datedue, |
552 |
$patron, $barcode, $datedue, |
| 554 |
$cancelreserve, |
553 |
$cancelreserve, |
|
Lines 564-597
if ( @$barcodes && $op eq 'cud-checkout' ) {
Link Here
|
| 564 |
} |
563 |
} |
| 565 |
); |
564 |
); |
| 566 |
$template_params->{issue} = $issue; |
565 |
$template_params->{issue} = $issue; |
| 567 |
|
|
|
| 568 |
my $borrower = $patron; |
| 569 |
my $borrowernumber = $patron->borrowernumber; |
| 570 |
my $user = C4::Context->userenv->{number}; |
| 571 |
my $branchcode = C4::Context->userenv->{branch}; |
| 572 |
$message = "Restriction overridden temporarily"; |
| 573 |
@message = ("Restriction overridden temporarily"); |
| 574 |
|
| 575 |
if ($issueconfirmed) { |
| 576 |
my $infos = ( |
| 577 |
{ |
| 578 |
message => \@message, |
| 579 |
borrowernumber => $borrowernumber, |
| 580 |
barcode => $barcode, |
| 581 |
manager_id => $user, |
| 582 |
branchcode => $branchcode, |
| 583 |
} |
| 584 |
); |
| 585 |
|
| 586 |
my $json_infos = JSON->new->utf8->pretty->encode($infos); |
| 587 |
$json_infos =~ s/"/'/g; |
| 588 |
|
| 589 |
logaction( |
| 590 |
"CIRCULATION", "ISSUE", |
| 591 |
$borrower->{'borrowernumber'}, |
| 592 |
$json_infos, |
| 593 |
) if C4::Context->preference("IssueLog"); |
| 594 |
} |
| 595 |
$session->clear('auto_renew'); |
566 |
$session->clear('auto_renew'); |
| 596 |
$inprocess = 1; |
567 |
$inprocess = 1; |
| 597 |
} |
568 |
} |