Fix for bug 1125: after entering a manual issue, the "Next expected issue" field is duplicated

Adds a syspref to enable librarian to specify how many previous
issues to display (5 by default, but can be set to 0 for instance, to
show none).
This commit is contained in:
kados 2006-08-09 16:25:52 +00:00
parent 9b52999ce2
commit e6d84442e2
1 changed files with 2 additions and 1 deletions

View File

@ -376,8 +376,9 @@ sub getserials {
ORDER BY IF(serial.publisheddate=\"00-00-0000\",serial.planneddate,serial.publisheddate) DESC");
$sth->execute($subscriptionid);
my $counter=0;
my $syspref_counter = C4::Context->preference('ReceiveBackIssues') | 5;
my @serials;
while((my $line = $sth->fetchrow_hashref) && $counter <5) {
while((my $line = $sth->fetchrow_hashref) && $counter <$syspref_counter) {
$counter++;
$line->{"status".$line->{status}} = 1; # fills a "statusX" value, used for template status select list
$line->{"publisheddate"} = format_date($line->{"publisheddate"});