# must avoid biblioitems.* to prevent large marc and marcxml fields from killing performance
# FIXME: namespace collision: each table has "timestamp" fields. Which one is "timestamp" ?
# FIXME: circ/ciculation.pl tries to sort by timestamp!
- # FIXME: C4::Print::printslip tries to sort by timestamp!
# FIXME: namespace collision: other collisions possible.
# FIXME: most of this data isn't really being used by callers.
my $query =
$sth->execute( $borrowernumber, $notifyid );
my $total = 0;
while ( my $data = $sth->fetchrow_hashref ) {
+ if ( $data->{itemnumber} ) {
+ my $biblio = GetBiblioFromItemNumber( $data->{itemnumber} );
+ $data->{biblionumber} = $biblio->{biblionumber};
+ $data->{title} = $biblio->{title};
+ }
$acctlines[$numlines] = $data;
$numlines++;
$total += int(100 * $data->{'amountoutstanding'});
# return unless ( C4::Context->boolean_preference('printcirculationslips') );
- my $today = POSIX::strftime("%Y-%m-%d", localtime);
+ my $now = POSIX::strftime("%Y-%m-%d", localtime);
my $issueslist = GetPendingIssues($borrowernumber);
foreach my $it (@$issueslist){
- if ($it->{'issuedate'} eq $today) {
- $it->{'today'} = 1;
+ if ((substr $it->{'issuedate'}, 0, 10) eq $now) {
+ $it->{'now'} = 1;
}
- elsif ($it->{'date_due'} le $today) {
+ elsif ((substr $it->{'date_due'}, 0, 10) le $now) {
$it->{'overdue'} = 1;
}
'biblio' => $_,
'items' => $_,
'issues' => $_,
- }, grep { $_->{'today'} } @issues ],
+ }, grep { $_->{'now'} } @issues ],
);
}
else {