From 20f2e15e249021f00ebc20464188119b3845bda3 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Fri, 17 Aug 2007 18:07:20 +0200 Subject: [PATCH] ordering supplier list & reindenting a little Signed-off-by: Chris Cormack --- C4/Serials.pm | 1 + serials/claims.pl | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 82e1094d10..93afe6b931 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -103,6 +103,7 @@ sub GetSuppliersWithLateIssues { LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id WHERE subscription.subscriptionid = serial.subscriptionid AND (planneddate < now() OR serial.STATUS = 3 OR serial.STATUS = 4) + ORDER BY name |; my $sth = $dbh->prepare($query); $sth->execute; diff --git a/serials/claims.pl b/serials/claims.pl index da8ae3ada6..a96857ec59 100755 --- a/serials/claims.pl +++ b/serials/claims.pl @@ -20,7 +20,7 @@ my $order = $input->param('order'); my %supplierlist = GetSuppliersWithLateIssues; my @select_supplier; -foreach my $supplierid (keys %supplierlist){ +foreach my $supplierid (sort {$supplierlist{$a} cmp $supplierlist{$b} } keys %supplierlist){ my ($count, @dummy) = GetLateOrMissingIssues($supplierid,"",$order); my $counting = $count; $supplierlist{$supplierid} = $supplierlist{$supplierid}." ($counting)"; @@ -77,19 +77,19 @@ my ($template, $loggedinuser, $cookie) $template->param('letters'=>\@letters,'letter'=>$letter); $template->param( - order =>$order, - CGIsupplier => $CGIsupplier, - phone => $supplierinfo[0]->{phone}, - booksellerfax => $supplierinfo[0]->{booksellerfax}, - bookselleremail => $supplierinfo[0]->{bookselleremail}, + order =>$order, + CGIsupplier => $CGIsupplier, + phone => $supplierinfo[0]->{phone}, + booksellerfax => $supplierinfo[0]->{booksellerfax}, + bookselleremail => $supplierinfo[0]->{bookselleremail}, preview => $preview, missingissues => \@missingissues, supplierid => $supplierid, claimletter => $claimletter, singlesupplier => $singlesupplier, supplierloop => \@supplierinfo, - intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), - intranetstylesheet => C4::Context->preference("intranetstylesheet"), - IntranetNav => C4::Context->preference("IntranetNav"), - ); + intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), + intranetstylesheet => C4::Context->preference("intranetstylesheet"), + IntranetNav => C4::Context->preference("IntranetNav"), + ); output_html_with_http_headers $input, $cookie, $template->output; -- 2.39.5