projects
/
koha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 8454 - Holds to Pull : Show pull list on load. Otherwise, it looks like the pull...
[koha.git]
/
circ
/
circulation.pl
diff --git
a/circ/circulation.pl
b/circ/circulation.pl
index
082b3d4
..
f15d4ce
100755
(executable)
--- a/
circ/circulation.pl
+++ b/
circ/circulation.pl
@@
-25,6
+25,7
@@
use strict;
use warnings;
use CGI;
use C4::Output;
use warnings;
use CGI;
use C4::Output;
+use C4::Print;
use C4::Auth qw/:DEFAULT get_session/;
use C4::Dates qw/format_date/;
use C4::Branch; # GetBranches
use C4::Auth qw/:DEFAULT get_session/;
use C4::Dates qw/format_date/;
use C4::Branch; # GetBranches
@@
-93,9
+94,13
@@
my ( $template, $loggedinuser, $cookie ) = get_template_and_user (
my $branches = GetBranches();
my @failedrenews = $query->param('failedrenew'); # expected to be itemnumbers
my $branches = GetBranches();
my @failedrenews = $query->param('failedrenew'); # expected to be itemnumbers
-
my %renew_failed
;
+
our %renew_failed = {}
;
for (@failedrenews) { $renew_failed{$_} = 1; }
for (@failedrenews) { $renew_failed{$_} = 1; }
+my @failedreturns = $query->param('failedreturn');
+our %return_failed = {};
+for (@failedreturns) { $return_failed{$_} = 1; }
+
my $findborrower = $query->param('findborrower');
$findborrower =~ s|,| |g;
my $borrowernumber = $query->param('borrowernumber');
my $findborrower = $query->param('findborrower');
$findborrower =~ s|,| |g;
my $borrowernumber = $query->param('borrowernumber');
@@
-147,8
+152,6
@@
if($duedatespec_allow){
if ($duedatespec) {
if ($duedatespec =~ C4::Dates->regexp('syspref')) {
$datedue = dt_from_string($duedatespec);
if ($duedatespec) {
if ($duedatespec =~ C4::Dates->regexp('syspref')) {
$datedue = dt_from_string($duedatespec);
- $datedue->set_hour(23);
- $datedue->set_minute(59);
} else {
$invalidduedate = 1;
$template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec);
} else {
$invalidduedate = 1;
$template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec);
@@
-156,7
+159,7
@@
if($duedatespec_allow){
}
}
}
}
-
my
$todaysdate = C4::Dates->new->output('iso');
+
our
$todaysdate = C4::Dates->new->output('iso');
# check and see if we should print
if ( $barcode eq '' && $print eq 'maybe' ) {
# check and see if we should print
if ( $barcode eq '' && $print eq 'maybe' ) {
@@
-172,7
+175,10
@@
if ( $barcode eq '' && $query->param('charges') eq 'yes' ) {
}
if ( $print eq 'yes' && $borrowernumber ne '' ) {
}
if ( $print eq 'yes' && $borrowernumber ne '' ) {
- PrintIssueSlip($session->param('branch') || $branch, $borrowernumber);
+ if ( C4::Context->boolean_preference('printcirculationslips') ) {
+ my $letter = IssueSlip($branch, $borrowernumber, "QUICK");
+ NetworkPrint($letter->{content});
+ }
$query->param( 'borrowernumber', '' );
$borrowernumber = '';
}
$query->param( 'borrowernumber', '' );
$borrowernumber = '';
}
@@
-275,10
+281,12
@@
if ($borrowernumber) {
#
if ($barcode) {
# always check for blockers on issuing
#
if ($barcode) {
# always check for blockers on issuing
- my ( $error, $question ) =
+ my ( $error, $question
, $alerts
) =
CanBookBeIssued( $borrower, $barcode, $datedue , $inprocess );
my $blocker = $invalidduedate ? 1 : 0;
CanBookBeIssued( $borrower, $barcode, $datedue , $inprocess );
my $blocker = $invalidduedate ? 1 : 0;
+ $template->param( alert => $alerts );
+
delete $question->{'DEBT'} if ($debt_confirmed);
foreach my $impossible ( keys %$error ) {
$template->param(
delete $question->{'DEBT'} if ($debt_confirmed);
foreach my $impossible ( keys %$error ) {
$template->param(
@@
-354,6
+362,8
@@
if ($borrowernumber) {
$getreserv{itemcallnumber} = $getiteminfo->{'itemcallnumber'};
$getreserv{biblionumber} = $getiteminfo->{'biblionumber'};
$getreserv{waitingat} = GetBranchName( $num_res->{'branchcode'} );
$getreserv{itemcallnumber} = $getiteminfo->{'itemcallnumber'};
$getreserv{biblionumber} = $getiteminfo->{'biblionumber'};
$getreserv{waitingat} = GetBranchName( $num_res->{'branchcode'} );
+ $getreserv{suspend} = $num_res->{'suspend'};
+ $getreserv{suspend_until} = $num_res->{'suspend_until'};
# check if we have a waiting status for reservations
if ( $num_res->{'found'} eq 'W' ) {
$getreserv{color} = 'reserved';
# check if we have a waiting status for reservations
if ( $num_res->{'found'} eq 'W' ) {
$getreserv{color} = 'reserved';
@@
-411,13
+421,13
@@
if ($borrowernumber) {
# make the issued books table.
my $todaysissues = '';
my $previssues = '';
# make the issued books table.
my $todaysissues = '';
my $previssues = '';
-
my @todaysissues
;
-
my @previousissues
;
-
my @relissues
;
-
my @relprevissues
;
+
our @todaysissues = ()
;
+
our @previousissues = ()
;
+
our @relissues = ()
;
+
our @relprevissues = ()
;
my $displayrelissues;
my $displayrelissues;
-
my
$totalprice = 0;
+
our
$totalprice = 0;
sub build_issue_data {
my $issueslist = shift;
sub build_issue_data {
my $issueslist = shift;
@@
-454,8
+464,9
@@
sub build_issue_data {
$it->{'od'} = $it->{'overdue'};
($it->{'author'} eq '') and $it->{'author'} = ' ';
$it->{'renew_failed'} = $renew_failed{$it->{'itemnumber'}};
$it->{'od'} = $it->{'overdue'};
($it->{'author'} eq '') and $it->{'author'} = ' ';
$it->{'renew_failed'} = $renew_failed{$it->{'itemnumber'}};
+ $it->{'return_failed'} = $return_failed{$it->{'barcode'}};
- if ( $
todaysdate eq $it->{'issuedate'} or $todaysdate eq $it->{'lastreneweddate'}
) {
+ if ( $
it->{'issuedate'} gt $todaysdate or $it->{'lastreneweddate'} gt $todaysdate
) {
(!$relatives) ? push @todaysissues, $it : push @relissues, $it;
} else {
(!$relatives) ? push @previousissues, $it : push @relprevissues, $it;
(!$relatives) ? push @todaysissues, $it : push @relissues, $it;
} else {
(!$relatives) ? push @previousissues, $it : push @relprevissues, $it;
@@
-702,7
+713,9
@@
$template->param(
soundon => C4::Context->preference("SoundOn"),
fast_cataloging => $fast_cataloging,
CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"),
soundon => C4::Context->preference("SoundOn"),
fast_cataloging => $fast_cataloging,
CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"),
- activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
+ SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
+ AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
);
# save stickyduedate to session
);
# save stickyduedate to session
@@
-724,6
+737,9
@@
$template->param(
AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
dateformat => C4::Context->preference("dateformat"),
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
dateformat => C4::Context->preference("dateformat"),
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
+ export_remove_fields => C4::Context->preference("ExportRemoveFields"),
+ export_with_csv_profile => C4::Context->preference("ExportWithCsvProfile"),
canned_bor_notes_loop => $canned_notes,
);
canned_bor_notes_loop => $canned_notes,
);
+
output_html_with_http_headers $query, $cookie, $template->output;
output_html_with_http_headers $query, $cookie, $template->output;