use C4::Output;
use CGI qw(-oldstyle_urls -utf8);
use C4::Auth;
-use C4::Branch;
use C4::Debug;
use Text::CSV_XS;
use Koha::DateUtils;
use DateTime;
+use DateTime::Format::MySQL;
my $input = new CGI;
my $order = $input->param('order') || '';
itemtypename => $description,
};
}
-my $onlymine =
- C4::Context->preference('IndependentBranches')
- && C4::Context->userenv
- && !C4::Context->IsSuperLibrarian()
- && C4::Context->userenv->{branch};
-
-$branchfilter = C4::Context->userenv->{'branch'} if ($onlymine && !$branchfilter);
# Filtering by Patron Attributes
# @patron_attr_filter_loop is non empty if there are any patron attribute filters
# %borrowernumber_to_attributes is populated by those borrowernumbers matching the patron attribute filters
my %cgi_attrcode_to_attrvalues; # ( patron_attribute_code => [ zero or more attribute filter values from the CGI ] )
-for my $attrcode (grep { /^patron_attr_filter_/ } $input->param) {
- if (my @attrvalues = grep { length($_) > 0 } $input->param($attrcode)) {
+for my $attrcode (grep { /^patron_attr_filter_/ } $input->multi_param) {
+ if (my @attrvalues = grep { length($_) > 0 } $input->multi_param($attrcode)) {
$attrcode =~ s/^patron_attr_filter_//;
$cgi_attrcode_to_attrvalues{$attrcode} = \@attrvalues;
print STDERR ">>>param($attrcode)[@{[scalar @attrvalues]}] = '@attrvalues'\n" if $debug;
$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,
homebranchfilter => $homebranchfilter,
holdingbranchfilter => $homebranchfilter,
$template->param(sql=>$strsth);
my $sth=$dbh->prepare($strsth);
$sth->execute(
- ($dateduefrom ? output_pref({ dt => $dateduefrom, dateformat => 'iso' }) : ()),
- ($datedueto ? output_pref({ dt => $datedueto, dateformat => 'iso' }) : ()),
+ ($dateduefrom ? DateTime::Format::MySQL->format_datetime($dateduefrom) : ()),
+ ($datedueto ? DateTime::Format::MySQL->format_datetime($datedueto) : ()),
);
my @overduedata;