From 7472114bad0b616af278beba5e450690275287bb Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 12 Oct 2000 07:39:58 +0000 Subject: [PATCH] whole raft of cosmetic changes --- C4/Acquisitions.pm | 14 ++++++++++++-- C4/Reserves2.pm | 10 ++++++---- acqui/basket.pl | 7 +------ acqui/newbasket.pl | 4 ++-- acqui/newbiblio.pl | 10 +++------- acqui/order.pl | 8 ++++---- detail.pl | 2 +- imemberentry.pl | 2 +- jmemberentry.pl | 2 +- memberentry.pl | 4 ++-- opac-search.pl | 2 +- request.pl | 4 ++-- showbudget.pl | 6 +++--- subjectsearch.pl | 4 ++-- 14 files changed, 41 insertions(+), 38 deletions(-) diff --git a/C4/Acquisitions.pm b/C4/Acquisitions.pm index b0a7ffd..6755ea8 100644 --- a/C4/Acquisitions.pm +++ b/C4/Acquisitions.pm @@ -16,7 +16,7 @@ $VERSION = 0.01; &bookfundbreakdown &curconvert &updatesup &insertsup &makeitems &modbibitem &getcurrencies &modsubtitle &modsubject &modaddauthor &moditem &countitems &findall &needsmod &delitem &delbibitem &delbiblio &delorder &branches -&getallorders); +&getallorders &updatecurrencies); %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ], # your exported package globals go here, @@ -600,7 +600,17 @@ sub getcurrencies { } $sth->finish; $dbh->disconnect; - return($i,@results); + return($i,\@results); +} + +sub updatecurrencies { + my ($currency,$rate)=@_; + my $dbh=C4Connect; + my $query="update currency set rate=$rate where currency='$currency'"; + my $sth=$dbh->prepare($query); + $sth->execute; + $sth->finish; + $dbh->disconnect; } sub updatesup { diff --git a/C4/Reserves2.pm b/C4/Reserves2.pm index 554ab91..a59c191 100755 --- a/C4/Reserves2.pm +++ b/C4/Reserves2.pm @@ -60,17 +60,19 @@ sub FindReserves { if ($bor ne ''){ $query=$query." where reserves.biblionumber=$bib and reserves.borrowernumber=borrowers.borrowernumber and - biblio.biblionumber=$bib and cancellationdate is NULL and found - <> 'F'"; + biblio.biblionumber=$bib and cancellationdate is NULL and + (found <> 'F' or found is NULL)"; } else { $query=$query." where reserves.borrowernumber=borrowers.borrowernumber and biblio.biblionumber=$bib and reserves.biblionumber=$bib - and cancellationdate is NULL and found <> 'F'"; + and cancellationdate is NULL and + (found <> 'F' or found is NULL)"; } } else { $query=$query." where borrowers.borrowernumber=$bor and reserves.borrowernumber=borrowers.borrowernumber and reserves.biblionumber - =biblio.biblionumber and cancellationdate is NULL and found <> 'F'"; + =biblio.biblionumber and cancellationdate is NULL and + (found <> 'F' or found is NULL)"; } $query.=" order by priority"; my $sth=$dbh->prepare($query); diff --git a/acqui/basket.pl b/acqui/basket.pl index 6f283cd..da0c66a 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -116,12 +116,7 @@ To add new orders to this supplier, start with a search. -NOTES TO LIBRARY AND PROGRAMMERS -
-Again a bunch of questions here that you may have already answered elsewhere - but I couldn't spot it. -Is GST charged on overseas orders? -
-Is GST usually include in the RRP, and thus the Estimated price? Or do your suppliers quote ex GST + EOP ; diff --git a/acqui/newbasket.pl b/acqui/newbasket.pl index 16aa350..51753e2 100755 --- a/acqui/newbasket.pl +++ b/acqui/newbasket.pl @@ -30,7 +30,7 @@ Our Reference: HLT-$basket
Authorsed By: $user
$date -Shopping Basket For: +Shopping Basket For: {'id'}> $booksellers[0]->{'name'}
Ph: $booksellers[0]->{'phone'}, Fax: $booksellers[0]->{'fax'}, $booksellers[0]->{'address1'}, $booksellers[0]->{'address2'}, @@ -56,7 +56,7 @@ Levin
New Zealand

Ph: +64-6-368 1953
-Email: ruth\@levin.library.org.nz +Email: orders\@library.org.nz diff --git a/acqui/newbiblio.pl b/acqui/newbiblio.pl index 7b8019a..77cc3c8 100755 --- a/acqui/newbiblio.pl +++ b/acqui/newbiblio.pl @@ -114,9 +114,9 @@ print <{'gstreg'}> printend ; -my ($count2,@currencies)=getcurrencies; +my ($count2,$currencies)=getcurrencies; for (my $i=0;$i<$count2;$i++){ - print "{'currency'}\" value=$currencies[0]->{'rate'}>"; + print "[$i]->{'currency'}\" value=$currencies->[0]->{'rate'}>"; } print <

  • Bold fields must be filled in to create a new bibilo and item.

  • Shaded fields can be used to do a "quick" recieve, when items have been purchased locally or gifted. In this case the quantity "ordered" will also be entered into the database as the quantity recieved. -NOTES TO LIBRARY AND PROGRAMMERS -
    -Is it desirable to make the shaded fields ONLY available if the supplier is set to "Gift" or "Local Supplier".
    -Library can you confirm that you do not actually record the name of the local supplier? -
    +

     

    printend ; diff --git a/acqui/order.pl b/acqui/order.pl index 5ba7b9c..0aa7096 100755 --- a/acqui/order.pl +++ b/acqui/order.pl @@ -55,11 +55,11 @@ printend ; for (my $i2=1;$i2<$ordcount;$i2++){ print < - - + +   +   HLT-$orders->[$i2]->{'basketno'} - $orders->[$i2]->{'count(*)'}$orders->[$i2]->{'authorisedby'} + $orders->[$i2]->{'count(*)'}$orders->[$i2]->{'authorisedby'}   $orders->[$i2]->{'entrydate'} printend diff --git a/detail.pl b/detail.pl index 786e259..84bdbeb 100755 --- a/detail.pl +++ b/detail.pl @@ -217,7 +217,7 @@ if ($type ne 'opac'){ print <

    HELP
    -Update Biblio for all Items: Click on the Modify button [left] to ammend the biblio. Any changes you make will update the record for all the items listed above.

    +Update Biblio for all Items: Click on the Modify button [left] to amend the biblio. Any changes you make will update the record for all the items listed above.

    Updating the Biblio for only ONE or SOME Items: If some of the items listed above need a different biblio, or are on the wrong biblio, you must use the acquisitions process to fix this. You will need to "re-order" the items, and delete them from this biblio.

    diff --git a/imemberentry.pl b/imemberentry.pl index 397c2d6..d457619 100755 --- a/imemberentry.pl +++ b/imemberentry.pl @@ -129,7 +129,7 @@ print < - + diff --git a/jmemberentry.pl b/jmemberentry.pl index 01230ea..1861835 100755 --- a/jmemberentry.pl +++ b/jmemberentry.pl @@ -154,7 +154,7 @@ printend } print < - + diff --git a/memberentry.pl b/memberentry.pl index 5f84a77..0080839 100755 --- a/memberentry.pl +++ b/memberentry.pl @@ -376,12 +376,12 @@ printend ; if ($type ne 'modify'){ print < + printend ; } else { print < + printend ; } diff --git a/opac-search.pl b/opac-search.pl index 05b2cc2..1008479 100755 --- a/opac-search.pl +++ b/opac-search.pl @@ -146,6 +146,6 @@ sub validateinp { $input=~ s/\<\/[a-z]+\>//gi; $input=~ s/\//g; - $input=~ s/^%//g; + $input=~ s/%//g; return($input); } diff --git a/request.pl b/request.pl index 7749707..a36063b 100755 --- a/request.pl +++ b/request.pl @@ -66,7 +66,7 @@ my $date="$mday/$mon/$year"; print < - + $date diff --git a/showbudget.pl b/showbudget.pl index c3597f4..be8e250 100755 --- a/showbudget.pl +++ b/showbudget.pl @@ -10,7 +10,7 @@ use C4::Acquisitions; #print $inp->header; my ($count,@results)=bookfunds; -open (FILE,'>/usr/local/www/koha/htdocs/includes/budgets.inc') || die "Cant open file"; +open (FILE,'>/usr/local/www/hdl/htdocs/includes/budgets.inc') || die "Cant open file"; print FILE < @@ -34,7 +34,7 @@ for (my $i=0;$i<$count;$i++){ my $avail=$results[$i]->{'budgetamount'}-($spent+$comtd); print FILE < -$results[$i]->{'bookfundname'} +$results[$i]->{'bookfundname'} $results[$i]->{'budgetamount'} EOP ; @@ -55,7 +55,7 @@ print FILE < -Total $total +Total $total printend ; printf FILE ("%.2f",$totspent); diff --git a/subjectsearch.pl b/subjectsearch.pl index 1c45071..6c8ca78 100755 --- a/subjectsearch.pl +++ b/subjectsearch.pl @@ -36,9 +36,9 @@ my $i=0; print center(); print mktablehdr; if ($type ne 'opac'){ - print mktablerow(4,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('LOCATION'),"/images/background-mem.gif"); + print mktablerow(5,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('LOCATION'),' ',"/images/background-mem.gif"); } else { - print mktablerow(4,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('BRANCH')); + print mktablerow(5,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('BRANCH'),'   '); } my $colour=1; while ($i < $count){