|
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 328-334
if ($patron) {
Link Here
|
| 328 |
# |
327 |
# |
| 329 |
# |
328 |
# |
| 330 |
my $message; |
329 |
my $message; |
| 331 |
my @message; |
|
|
| 332 |
|
330 |
|
| 333 |
if ( @$barcodes && $op eq 'cud-checkout' ) { |
331 |
if ( @$barcodes && $op eq 'cud-checkout' ) { |
| 334 |
my $checkout_infos; |
332 |
my $checkout_infos; |
|
Lines 551-557
if ( @$barcodes && $op eq 'cud-checkout' ) {
Link Here
|
| 551 |
if ( my $booked = $needsconfirmation->{BOOKED_EARLY} // $alerts->{BOOKED} ) { |
549 |
if ( my $booked = $needsconfirmation->{BOOKED_EARLY} // $alerts->{BOOKED} ) { |
| 552 |
$datedue = $booked->end_date; |
550 |
$datedue = $booked->end_date; |
| 553 |
} |
551 |
} |
| 554 |
$needsconfirmation->{'DEBT'} = $needsconfirmationDEBT if ($debt_confirmed); |
552 |
$needsconfirmation->{'DEBT'} = $needsconfirmationDEBT if ($debt_confirmed); |
|
|
553 |
$needsconfirmation->{'OVERRIDDEN'} = $issueconfirmed if ($issueconfirmed); |
| 555 |
my $issue = AddIssue( |
554 |
my $issue = AddIssue( |
| 556 |
$patron, $barcode, $datedue, |
555 |
$patron, $barcode, $datedue, |
| 557 |
$cancelreserve, |
556 |
$cancelreserve, |
|
Lines 567-600
if ( @$barcodes && $op eq 'cud-checkout' ) {
Link Here
|
| 567 |
} |
566 |
} |
| 568 |
); |
567 |
); |
| 569 |
$template_params->{issue} = $issue; |
568 |
$template_params->{issue} = $issue; |
| 570 |
|
|
|
| 571 |
my $borrower = $patron; |
| 572 |
my $borrowernumber = $patron->borrowernumber; |
| 573 |
my $user = C4::Context->userenv->{number}; |
| 574 |
my $branchcode = C4::Context->userenv->{branch}; |
| 575 |
$message = "Restriction overridden temporarily"; |
| 576 |
@message = ("Restriction overridden temporarily"); |
| 577 |
|
| 578 |
if ($issueconfirmed) { |
| 579 |
my $infos = ( |
| 580 |
{ |
| 581 |
message => \@message, |
| 582 |
borrowernumber => $borrowernumber, |
| 583 |
barcode => $barcode, |
| 584 |
manager_id => $user, |
| 585 |
branchcode => $branchcode, |
| 586 |
} |
| 587 |
); |
| 588 |
|
| 589 |
my $json_infos = JSON->new->utf8->pretty->encode($infos); |
| 590 |
$json_infos =~ s/"/'/g; |
| 591 |
|
| 592 |
logaction( |
| 593 |
"CIRCULATION", "ISSUE", |
| 594 |
$borrower->{'borrowernumber'}, |
| 595 |
$json_infos, |
| 596 |
) if C4::Context->preference("IssueLog"); |
| 597 |
} |
| 598 |
$session->clear('auto_renew'); |
569 |
$session->clear('auto_renew'); |
| 599 |
$inprocess = 1; |
570 |
$inprocess = 1; |
| 600 |
} |
571 |
} |