projects
/
koha_fer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 7372: Move road types from the roadtype table to the ROADTYPE AV
[koha_fer]
/
circ
/
overdue.pl
diff --git
a/circ/overdue.pl
b/circ/overdue.pl
index
8fed8c8
..
80a9d7f
100755
(executable)
--- a/
circ/overdue.pl
+++ b/
circ/overdue.pl
@@
-40,6
+40,8
@@
my $borcatfilter = $input->param('borcat') || '';
my $itemtypefilter = $input->param('itemtype') || '';
my $borflagsfilter = $input->param('borflag') || '';
my $branchfilter = $input->param('branch') || '';
my $itemtypefilter = $input->param('itemtype') || '';
my $borflagsfilter = $input->param('borflag') || '';
my $branchfilter = $input->param('branch') || '';
+my $homebranchfilter = $input->param('homebranch') || '';
+my $holdingbranchfilter = $input->param('holdingbranch') || '';
my $op = $input->param('op') || '';
my $dateduefrom = format_date_in_iso($input->param( 'dateduefrom' )) || '';
my $datedueto = format_date_in_iso($input->param( 'datedueto' )) || '';
my $op = $input->param('op') || '';
my $dateduefrom = format_date_in_iso($input->param( 'dateduefrom' )) || '';
my $datedueto = format_date_in_iso($input->param( 'datedueto' )) || '';
@@
-89,10
+91,11
@@
while (my ($itemtype, $description) =$req->fetchrow) {
itemtypename => $description,
};
}
itemtypename => $description,
};
}
-my $onlymine=C4::Context->preference('IndependantBranches') &&
- C4::Context->userenv &&
- C4::Context->userenv->{flags} % 2 !=1 &&
- C4::Context->userenv->{branch};
+my $onlymine =
+ C4::Context->preference('IndependentBranches')
+ && C4::Context->userenv
+ && !C4::Context->IsSuperLibrarian()
+ && C4::Context->userenv->{branch};
$branchfilter = C4::Context->userenv->{'branch'} if ($onlymine && !$branchfilter);
$branchfilter = C4::Context->userenv->{'branch'} if ($onlymine && !$branchfilter);
@@
-214,7
+217,11
@@
if (@patron_attr_filter_loop) {
$template->param(
patron_attr_header_loop => [ map { { header => $_->{description} } } grep { ! $_->{isclone} } @patron_attr_filter_loop ],
branchloop => GetBranchesLoop($branchfilter, $onlymine),
$template->param(
patron_attr_header_loop => [ map { { header => $_->{description} } } grep { ! $_->{isclone} } @patron_attr_filter_loop ],
branchloop => GetBranchesLoop($branchfilter, $onlymine),
+ homebranchloop => GetBranchesLoop( $homebranchfilter, $onlymine ),
+ holdingbranchloop => GetBranchesLoop( $holdingbranchfilter, $onlymine ),
branchfilter => $branchfilter,
branchfilter => $branchfilter,
+ homebranchfilter => $homebranchfilter,
+ holdingbranchfilter => $homebranchfilter,
borcatloop=> \@borcatloop,
itemtypeloop => \@itemtypeloop,
patron_attr_filter_loop => \@patron_attr_filter_loop,
borcatloop=> \@borcatloop,
itemtypeloop => \@itemtypeloop,
patron_attr_filter_loop => \@patron_attr_filter_loop,
@@
-260,6
+267,8
@@
if ($noreport) {
issues.itemnumber,
issues.issuedate,
items.barcode,
issues.itemnumber,
issues.issuedate,
items.barcode,
+ items.homebranch,
+ items.holdingbranch,
biblio.title,
biblio.author,
borrowers.borrowernumber,
biblio.title,
biblio.author,
borrowers.borrowernumber,
@@
-295,6
+304,8
@@
if ($noreport) {
$strsth .= " AND borrowers.lost <> 0";
}
$strsth.=" AND borrowers.branchcode = '" . $branchfilter . "' " if $branchfilter;
$strsth .= " AND borrowers.lost <> 0";
}
$strsth.=" AND borrowers.branchcode = '" . $branchfilter . "' " if $branchfilter;
+ $strsth.=" AND items.homebranch = '" . $homebranchfilter . "' " if $homebranchfilter;
+ $strsth.=" AND items.holdingbranch = '" . $holdingbranchfilter . "' " if $holdingbranchfilter;
$strsth.=" AND date_due < '" . $datedueto . "' " if $datedueto;
$strsth.=" AND date_due > '" . $dateduefrom . "' " if $dateduefrom;
# restrict patrons (borrowers) to those matching the patron attribute filter(s), if any
$strsth.=" AND date_due < '" . $datedueto . "' " if $datedueto;
$strsth.=" AND date_due > '" . $dateduefrom . "' " if $dateduefrom;
# restrict patrons (borrowers) to those matching the patron attribute filter(s), if any
@@
-352,6
+363,8
@@
if ($noreport) {
title => $data->{title},
author => $data->{author},
branchcode => $data->{branchcode},
title => $data->{title},
author => $data->{author},
branchcode => $data->{branchcode},
+ homebranchcode => $data->{homebranchcode},
+ holdingbranchcode => $data->{holdingbranchcode},
itemcallnumber => $data->{itemcallnumber},
replacementprice => $data->{replacementprice},
enumchron => $data->{enumchron},
itemcallnumber => $data->{itemcallnumber},
replacementprice => $data->{replacementprice},
enumchron => $data->{enumchron},