MT3801: Serials not received issues cannot be claimed

waiting issues which where planned for an old date were not "claimable"
This also fixes a bug from commit

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
This commit is contained in:
Henri-Damien LAURENT 2010-06-07 11:13:10 +02:00 committed by Colin Campbell
parent 63a8c5bc9d
commit 9bfcf01abd
2 changed files with 7 additions and 8 deletions

View File

@ -91,8 +91,8 @@ the array is in name order
sub GetSuppliersWithLateIssues {
my $dbh = C4::Context->dbh;
my $query = q|
SELECT DISTINCT aqbooksellerid as id, aqbooksellers.name as name
my $query = qq|
SELECT DISTINCT id, name
FROM subscription
LEFT JOIN serial ON serial.subscriptionid=subscription.subscriptionid
LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id

View File

@ -56,13 +56,12 @@ my ($template, $loggedinuser, $cookie)
});
my @suploop;
for ( sort {$supplierlist{$a} cmp $supplierlist{$b} } keys %supplierlist ) {
my ($count, @dummy) = GetLateOrMissingIssues($_, "", $order);
for my $s ( sort {$a->{name} cmp $b->{name} } @$supplierlist ) {
my @list = GetLateOrMissingIssues($s, "", $order);
push @suploop, {
id => $_,
name => $supplierlist{$_},
count => $count,
selected => $_ == $supplierid,
%$s,
count => scalar(@list),
selected => $s->{id} == $supplierid,
};
}