From be16259a1bb86ab93397f02c60c0f9c21d6b6070 Mon Sep 17 00:00:00 2001 From: rangi Date: Fri, 17 Aug 2001 07:54:38 +0000 Subject: [PATCH] Changed the sorting of the hash of items on issue. To sort numerically, (so 10 comes after 2) Just a quick fix to get the items showing in date_due order --- circ/circulation.pl | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 6b8d29bb82..8d75d8a35c 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -19,6 +19,7 @@ my $branches=getbranches(\%env); my $printers=getprinters(\%env); my $branch=$query->param('branch'); my $printer=$query->param('printer'); +#print $query->header; ($branch) || ($branch=$query->cookie('branch')); ($printer) || ($printer=$query->cookie('printer')); my ($oldbranch, $oldprinter); @@ -427,7 +428,7 @@ sub issues { $query->param('barcode',''); $barcode=''; } - if ($print eq 'yes'){ + if ($print eq 'yes' && $borrowernumber ne ''){ my ($borrower, $flags) = getpatroninformation(\%env,$borrowernumber,0); $env{'todaysissues'}=1; my ($borrowerissues) = currentissues(\%env, $borrower); @@ -439,10 +440,20 @@ sub issues { my @issues; foreach (sort keys %$borrowerissues) { $issues[$i]=$borrowerissues->{$_}; + my $dd=$issues[$i]->{'date_due'}; + #convert to nz style dates + #this should be set with some kinda config variable + my @tempdate=split(/-/,$dd); + $issues[$i]->{'date_due'}="$tempdate[2]/$tempdate[1]/$tempdate[0]"; $i++; } foreach (sort keys %$borroweriss2) { $issues[$i]=$borroweriss2->{$_}; + my $dd=$issues[$i]->{'date_due'}; + #convert to nz style dates + #this should be set with some kinda config variable + my @tempdate=split(/-/,$dd); + $issues[$i]->{'date_due'}="$tempdate[2]/$tempdate[1]/$tempdate[0]"; $i++; } remoteprint(\%env,\@issues,$borrower); @@ -729,13 +740,14 @@ EOF EOF ; - my $amountold=$flags->{'CHARGES'}->{'message'}; - my @temp=split(/\$/,$amountold); - $amountold=$temp[1]; - print ""; + if ($flags->{'CHARGES'}){ print ""; } + my $amountold=$flags->{'CHARGES'}->{'message'}; + my @temp=split(/\$/,$amountold); + $amountold=$temp[1]; + print ""; print < -- 2.39.5