X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FSerials.pm;h=da0f4bda7caaabab1aa8b4191c6fb74544b4e141;hb=2c470899b3f0191b9597d713e895b9240fe1d137;hp=1abebb44c11fe1524717f68f14d52c50df1b7370;hpb=9e9d8dbe2ce8544c111cff7ba7b687fd658ac6fa;p=koha_gimpoz diff --git a/C4/Serials.pm b/C4/Serials.pm index 1abebb44c1..da0f4bda7c 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -125,10 +125,11 @@ sub GetLateIssues { LEFT JOIN biblio ON biblio.biblionumber = subscription.biblionumber LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id WHERE ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3) - AND subscription.aqbooksellerid=$supplierid + AND subscription.aqbooksellerid=? ORDER BY title |; $sth = $dbh->prepare($query); + $sth->execute($supplierid); } else { my $query = qq| SELECT name,title,planneddate,serialseq,serial.subscriptionid @@ -140,8 +141,8 @@ sub GetLateIssues { ORDER BY title |; $sth = $dbh->prepare($query); + $sth->execute; } - $sth->execute; my @issuelist; my $last_title; my $odd = 0; @@ -724,9 +725,16 @@ sub GetSerials2 { my @serials; while ( my $line = $sth->fetchrow_hashref ) { - $line->{ "status" . $line->{status} } = 1; # fills a "statusX" value, used for template status select list - $line->{"planneddate"} = format_date( $line->{"planneddate"} ); - $line->{"publisheddate"} = format_date( $line->{"publisheddate"} ); + $line->{ "status" . $line->{status} } = 1; # fills a "statusX" value, used for template status select list + # Format dates for display + for my $datefield ( qw( planneddate publisheddate ) ) { + if ($line->{$datefield} =~m/^00/) { + $line->{$datefield} = q{}; + } + else { + $line->{$datefield} = format_date( $line->{$datefield} ); + } + } push @serials, $line; } return @serials;