Tidying up, need to tidy up the C4 dir also

This commit is contained in:
chris 2001-03-14 01:20:30 +00:00
parent 8d62d80bc4
commit af46387810
16 changed files with 1240 additions and 189 deletions

View file

@ -271,7 +271,7 @@ sub KeywordSearch {
$i=0;
while (my $data=$sth->fetchrow_hashref){
$results[$i]="$data->{'author'}\t$data->{'title'}\t$data->{'biblionumber'}\t$data->{'copyrightdate'}";
# print $results[$i];
# print $results[$i];
$i++;
}
$sth->finish;

View file

@ -14,7 +14,7 @@ $VERSION = 0.01;
@ISA = qw(Exporter);
@EXPORT = qw(&UpdateStats &statsreport &Count &Overdues &TotalOwing
&TotalPaid &getcharges &Getpaidbranch &unfilledreserves);
&TotalPaid &getcharges &Getpaidbranch &unfilledreserves &gettotals);
%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
# your exported package globals go here,
@ -152,7 +152,7 @@ sub TotalPaid {
} else {
$query.=" and date='$time'";
}
# $query.=" order by timestamp";
$query.=" order by timestamp";
my $sth=$dbh->prepare($query);
$sth->execute;
my @results;
@ -167,6 +167,22 @@ sub TotalPaid {
return(@results);
}
sub gettotals {
my ($date1,$date2,$branch)=@_;
my $dbh=C4Connect;
my $query="Select sum(value) from statistics where datetime >= '$date1' and
datetime < '$date2' and branch='$branch' and type='payment'";
my $sth=$dbh->prepare($query);
$sth->execute;
#print $query;
my $data=$sth->fetchrow_hashref;
$sth->finish;
$dbh->disconnect;
my $total=$data->{'sum(value)'};
$total=$total+0;
return($total);
}
sub getcharges{
my($borrowerno,$timestamp)=@_;
my $dbh=C4Connect;

View file

@ -10,7 +10,7 @@ use CGI;
use strict;
my $input=new CGI;
print $input->header();
#print $input->header();
my $id=$input->param('id');
my $title=$input->param('title');
my $author=$input->param('author');
@ -33,7 +33,9 @@ if ($ordnum eq ''){
$data=getsingleorder($ordnum);
$biblio=$data->{'biblionumber'};
}
if ($data->{'itemtype'} eq 'PER'){
print $input->redirect("/cgi-bin/koha/acqui/newperiodical.pl?id=$id&biblio=$biblio");
} else {
print startpage;
print startmenu('acquisitions');
@ -277,3 +279,4 @@ printend
print endmenu('acquisitions');
print endpage;
}

View file

@ -1,54 +0,0 @@
#!/usr/bin/perl
#script to do some serious catalogue maintainance
#written 22/11/00
# by chris@katipo.co.nz
use strict;
use CGI;
use C4::Output;
use C4::Database;
use C4::Maintainance;
my $input = new CGI;
print $input->header;
my $type=$input->param('type');
print startpage();
print startmenu('catalog');
my $blah;
my $num=0;
my $offset=0;
if ($type eq 'allsub'){
my $sub=$input->param('sub');
my ($count,$results)=listsubjects($sub,$num,$offset);
for (my $i=0;$i<$count;$i++){
my $sub2=$results->[$i]->{'subject'};
$sub2=~ s/ /%20/g;
print "\"<a href=\"/cgi-bin/koha/catmaintain.pl?type=allsub&sub=$sub\" onclick=\'messenger(\"/cgi-bin/koha/catmaintain.pl?type=modsub&sub=$sub2\");window1.focus()\'>$results->[$i]->{'subject'}\"</a><br>\n";
}
} elsif ($type eq 'modsub'){
my $sub=$input->param('sub');
print "<form action=/cgi-bin/koha/catmaintain.pl>";
print "Subject:<input type=text value=\"$sub\" name=sub size=40><br>\n";
print "<input type=hidden name=type value=upsub>";
print "<input type=hidden name=oldsub value=\"$sub\">";
print "<input type=submit value=modify>";
# print "<a href=\"nowhere\" onclick=\"document.forms[0].submit();\">Modify</a>";
print "</form>";
print "<p> This will change the subject headings on all the biblios this subject is applied to"
} elsif ($type eq 'upsub'){
my $sub=$input->param('sub');
my $oldsub=$input->param('oldsub');
updatesub($sub,$oldsub);
print "Successfully modified $oldsub is now $sub";
print "<p><a href=/cgi-bin/koha/catmaintain.pl target=window0 onclick=\"window0.focus()\">Back to catalogue maintenance</a><br>";
print "<a href=nowhere onclick=\"self.close()\">Close this window</a>";
} else {
print "<form action=/cgi-bin/koha/catmaintain.pl method=post>";
print "<input type=hidden name=type value=allsub>";
print "Show all subjects beginning with <input type=text name=sub><br>";
print "<input type=submit value=Show>";
print "</form>";
}
print endmenu('catalog');
print endpage();

827
circ/circulation.pl Executable file
View file

@ -0,0 +1,827 @@
#!/usr/bin/perl
use CGI qw/:standard/;
use C4::Circulation::Circ2;
use C4::Output;
use C4::Print;
use DBI;
my %env;
my $headerbackgroundcolor='#99cc33';
#my $circbackgroundcolor='#ffffcc';
my $circbackgroundcolor='white';
my $linecolor1='#bbbbbb';
my $linecolor2='#dddddd';
my $backgroundimage="/images/background-mem.gif";
my $query=new CGI;
my $branches=getbranches(\%env);
my $printers=getprinters(\%env);
my $branch=$query->param('branch');
my $printer=$query->param('printer');
($branch) || ($branch=$query->cookie('branch'));
($printer) || ($printer=$query->cookie('printer'));
my ($oldbranch, $oldprinter);
if ($query->param('selectnewbranchprinter')) {
$oldbranch=$branch;
$oldprinter=$printer;
$branch='';
$printer='';
}
$env{'branchcode'}=$branch;
$env{'printer'}=$printer;
$env{'queue'}=$printer;
my $branchcount=0;
my $printercount=0;
my $branchoptions;
my $printeroptions;
foreach (keys %$branches) {
(next) unless ($_);
(next) if (/^TR$/);
$branchcount++;
my $selected='';
($selected='selected') if ($_ eq $oldbranch);
$branchoptions.="<option value=$_ $selected>$branches->{$_}->{'branchname'}\n";
}
foreach (keys %$printers) {
(next) unless ($_);
$printercount++;
my $selected='';
($selected='selected') if ($_ eq $oldprinter);
$printeroptions.="<option value=$_ $selected>$printers->{$_}->{'printername'}\n";
}
if ($printercount==1) {
($printer)=keys %$printers;
}
if ($branchcount==1) {
($branch)=keys %$branches;
}
my $branchname='';
my $printername='';
if ($branch && $printer) {
$branchname=$branches->{$branch}->{'branchname'};
$printername=$printers->{$printer}->{'printername'};
}
my $branchcookie=$query->cookie(-name=>'branch', -value=>"$branch", -expires=>'+1y');
my $printercookie=$query->cookie(-name=>'printer', -value=>"$printer", -expires=>'+1y');
print $query->header(-type=>'text/html',-expires=>'now', -cookie=>[$branchcookie,$printercookie]);
# print $query->dump;
print startpage();
my @inp=startmenu('circulation');
if ($query->param('module') eq 'issues' && $query->param('barcode') eq '' && $query->param('charges') eq 'yes'){
my $count=@inp;
for (my $i=0;$i<$count;$i++){
my $bornum=$query->param('borrnumber');
$inp[$i]=~ s/onLoad=focusinput\(\)/onLoad=focusinput\(\)\;messenger\(\"\/cgi-bin\/koha\/pay.pl?bornum=$bornum\"\)\;window1.focus\(\)/;
}
}
print @inp;
print <<"EOF";
<script language="javascript" type="text/javascript">
<!--
function messenger(url){
window1=window.open(url,"window1","height=700,width=600,left=150,top=50,350,screenY=50");
}
//-->
</script>
EOF
print << "EOF";
<center>
<p>
<table border=0 width=100% cellspacing=0 bgcolor=$headerbackgroundcolor background=$backgroundimage>
<tr>
<th width=5%></th>
<th width=30%><font color=black>$branchname</font></th>
<th width=10%>
<a href=circulation.pl?module=issues&branch=$branch&printer=$printer><font color=black><img src=/images/issues.gif border=0 height=40></font></a>
</th>
<th width=10%>
<a href=circulation.pl?selectnewbranchprinter=1><font color=black>Branch/Printer</font></a>
</th>
<th width=10%>
<a href=circulation.pl?module=returns&branch=$branch&printer=$printer><font color=black><img src=/images/returns.gif border=0 height=40></font></a>
</th>
<th width=30%><font color=black>$printername</font></th>
<th width=5%></th>
</tr>
</table>
<br>
EOF
if ($printer && $branch) {
SWITCH: {
if ($query->param('module') eq 'issues') { issues(); last SWITCH; }
if ($query->param('module') eq 'returns') { returns(); last SWITCH; }
issues();
}
} else {
my ($printerform, $branchform);
if ($printercount>1) {
$printerform=<<"EOF";
<table border=0 cellspacing=0 cellpadding=5>
<tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage><font color=black>Choose a Printer</font></td></tr>
<tr><td>
<select name=printer>
$printeroptions
</select>
</td></tr>
</table>
EOF
} else {
my ($printer) = keys %$printers;
$printerform=<<"EOF";
<input type=hidden name=printer value=$printer>
EOF
}
if ($branchcount>1) {
$branchform=<<"EOF";
<table border=0 cellpadding=5 cellspacing=0>
<tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage><font color=black>Choose a Branch</font></td></tr>
<tr><td>
<select name=branch>
$branchoptions
</select>
</td></tr>
</table>
EOF
}
print << "EOF";
Select a branch and a printer
<form method=get>
<table border=0>
<tr><td>
$branchform
</td><td>
$printerform
</td></tr>
</table>
<input type=submit>
</form>
EOF
}
print endmenu('circulation');
print endpage();
sub default {
print << "EOF";
<a href=circulation.pl?module=issues&branch=$branch&printer=$printer>Issues</a>
<a href=circulation.pl?module=returns&branch=$branch&printer=$printer>Returns</a>
EOF
}
#}
sub returns {
my %returneditems;
$circbackgroundcolor="#FFCCCC";
$backgroundimage="/images/background-burg.gif";
print << "EOF";
<table border=0 cellpadding=10 cellspacing=0 cellpadding=5>
<!--<tr><th background=$backgroundimage>Circulation - Returns</th></tr>-->
<tr><td bgcolor=$circbackgroundcolor align=center>
EOF
foreach ($query->param) {
(next) unless (/ri-(\d*)/);
my $counter=$1;
(next) if ($counter>20);
my $barcode=$query->param("ri-$counter");
my $duedate=$query->param("dd-$counter");
my $borrowernumber=$query->param("bn-$counter");
$counter++;
$returneditems{$counter}=$barcode;
$riduedate{$counter}=$duedate;
$riborrowernumber{$counter}=$borrowernumber;
$ritext.="<input type=hidden name=ri-$counter value=$barcode>\n";
$ritext.="<input type=hidden name=dd-$counter value=$duedate>\n";
$ritext.="<input type=hidden name=bn-$counter value=$borrowernumber>\n";
}
if (my $barcode=$query->param('barcode')) {
$ritext.="<input type=hidden name=ri-0 value=$barcode>\n";
$returneditems{0}=$barcode;
}
my $barcodeentrytext= << "EOF";
<form method=get>
<table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd>
<tr><td colspan=2 bgcolor=$headerbackgroundcolor align=center background=$backgroundimage><font color=black><b>Enter Book Barcode</b></font></td></tr>
<tr><td>Item Barcode:</td><td><input name=barcode size=10></td></tr>
</table>
<input type=hidden name=module value=returns>
<input type=hidden name=branch value=$branch>
<input type=hidden name=printer value=$printer>
$ritext
EOF
if ((my $barcode=$query->param('barcode')) || (%returneditems)) {
my ($iteminformation, $borrower, $messages, $overduecharge) = returnbook(\%env, $barcode);
(my $nosuchitem=1) unless ($iteminformation);
$riborrowernumber{0}=$borrower->{'borrowernumber'};
$riduedate{0}=$iteminformation->{'date_due'};
$barcodeentrytext.= "<input type=hidden name=dd-0 value=$iteminformation->{'date_due'}>\n";
$barcodeentrytext.= "<input type=hidden name=bn-0 value=$borrower->{'borrowernumber'}>\n";
my @datearr = localtime(time());
my $todaysdate = (1900+$datearr[5]).'-'.sprintf ("%0.2d", ($datearr[4]+1)).'-'.sprintf ("%0.2d", $datearr[3]);
my $itemtable=<<"EOF";
<table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd>
<tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage><font color=black>Returned Item Information</font></th></tr>
<tr><td>
Title: $iteminformation->{'title'} &nbsp;
Type:$iteminformation->{'itemtype'}<br>
<!--Hlt decided they dont want these showing, uncoment the html to make it work
Author: $iteminformation->{'author'}<br>
Barcode: <a href=/cgi-bin/koha/detail.pl?bib=$iteminformation->{'biblionumber'}&type=intra onClick="openWindow(this, 'Item', 480, 640)">$iteminformation->{'barcode'}</a><br>
Date Due: $iteminformation->{'date_due'}-->
</td></tr>
</table>
EOF
if ($messages) {
my $messagetext='';
foreach (@$messages) {
$messagetext.="$_<p>\n";
}
print << "EOF";
<table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd>
<tr><th bgcolor=$headerbackgroundcolor $background=$backgroundimage><font color=black>Messages</font></th></tr>
<tr><td>
$messagetext
</td></tr>
</table>
<p>
EOF
}
if (($nosuchitem) && ($barcode)) {
print << "EOF";
<table border=0 cellpadding=1>
<tr>
<td valign=top>
$barcodeentrytext
</td>
<td valign=top>
<table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd>
<tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage><font color=black>Error</font></th></tr>
<tr><td>
<table border=0 cellpadding=5>
<tr><td>
$barcode is not a valid barcode.
</td></tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
EOF
} elsif ($nosuchitem) {
print << "EOF";
<table border=0 cellpadding=1>
<tr>
<td valign=top>
$barcodeentrytext
</td>
</tr>
</table>
EOF
} else {
if ($borrower->{'borrowernumber'}) {
my ($patrontable, $flaginfotext) = patrontable($borrower);
print << "EOF";
<table border=0 cellpadding=5>
<tr>
<td>
$barcodeentrytext
</td>
<td align=center valign=top>
$itemtable
</td>
</tr>
<tr>
<td valign=top align=center colspan=2>
<table border=0>
<tr><td valign=top>
$patrontable
</td>
<td valign=top>
$flaginfotext
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
EOF
} else {
print << "EOF";
<table border=0 cellpadding=5>
<tr><td>
$barcodeentrytext
</td>
<td>
<table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd>
<tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage><font color=black>Error</font></th></tr>
<tr><td>
<table border=0 cellpadding=5>
<tr><td>
$iteminformation->{'title'} by $iteminformation->{'author'} was not loaned out.
</td></tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
EOF
}
}
print << "EOF";
<p>
<table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd>
<tr><th colspan=6 bgcolor=$headerbackgroundcolor background=$backgroundimage><font color=black>Returned Items</font></th></tr>
<tr><th>Due Date</th><th>Bar Code</th><th>Title</th><th>Author</th><th>Type</th><th>Borrower</th></tr>
EOF
my $color='';
foreach (sort {$a <=> $b} keys %returneditems) {
($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
my $barcode=$returneditems{$_};
my $duedate=$riduedate{$_};
my @datearr = localtime(time());
my $todaysdate = (1900+$datearr[5]).'-'.sprintf ("%0.2d", ($datearr[4]+1)).'-'.sprintf ("%0.2d", $datearr[3]);
my $overduetext="$duedate";
($overduetext="<font color=red>$duedate</font>") if ($duedate lt $todaysdate);
($duedate) || ($overduetext="<img src=/images/blackdot.gif>");
my $borrowernumber=$riborrowernumber{$_};
my ($borrower) = getpatroninformation(\%env,$borrowernumber,0);
my ($iteminformation) = getiteminformation(\%env, 0, $barcode);
print "<tr><td bgcolor=$color>$overduetext</td><td bgcolor=$color align=center><a href=/cgi-bin/koha/detail.pl?bib=$iteminformation->{'biblionumber'}&type=intra onClick=\"openWindow(this, 'Item', 480, 640)\">$barcode</a></td><td bgcolor=$color>$iteminformation->{'title'}</td><td bgcolor=$color>$iteminformation->{'author'}</td><td bgcolor=$color align=center>$iteminformation->{'itemtype'}</td><td bgcolor=$color><img src=/images/blackdot.gif><a href=/cgi-bin/koha/moremember.pl?bornum=$borrower->{'borrowernumber'} onClick=\"openWindow(this,'Member', 480, 640)\">$borrower->{'cardnumber'}</a> $borrower->{'firstname'} $borrower->{'surname'}</td></tr>\n";
}
print "</table>\n";
} else {
print $barcodeentrytext;
}
print "</form>\n";
print "</td></tr></table>\n";
}
sub issues {
my ($noheader) = shift;
my $print=$query->param('print');
my $borrowernumber=$query->param('borrnumber');
my $barcode=$query->param('barcode');
if ($barcode eq ''){
$print='yes';
} elsif ($barcode eq ' '){
$query->param('barcode','');
$barcode='';
}
if ($print eq 'yes'){
my ($borrower, $flags) = getpatroninformation(\%env,$borrowernumber,0);
$env{'todaysissues'}=1;
my ($borrowerissues) = currentissues(\%env, $borrower);
$env{'nottodaysissues'}=1;
$env{'todaysissues'}=0;
my ($borroweriss2)=currentissues(\%env, $borrower);
$env{'nottodaysissues'}=0;
my $i=0;
my @issues;
foreach (sort keys %$borrowerissues) {
$issues[$i]=$borrowerissues->{$_};
$i++;
}
foreach (sort keys %$borroweriss2) {
$issues[$i]=$borroweriss2->{$_};
$i++;
}
remoteprint(\%env,\@issues,$borrower);
$query->param('borrnumber','');
}
unless ($noheader) {
print << "EOF";
<table border=0 cellpadding=10 cellspacing=0><tr><th background=$backgroundimage><font color=black>Circulation - Issues
</td></tr><tr><td bgcolor=$circbackgroundcolor align=center>
EOF
}
if (my $borrnumber=$query->param('borrnumber')) {
my ($borrower, $flags) = getpatroninformation(\%env,$borrnumber,0);
my $year=$query->param('year');
my $month=$query->param('month');
my $day=$query->param('day');
if (my $barcode=$query->param('barcode')) {
my $invalidduedate=0;
$env{'datedue'}='';
if (($year eq 0) && ($month eq 0) && ($year eq 0)) {
$env{'datedue'}='';
} else {
if (($year eq 0) || ($month eq 0) || ($year eq 0)) {
print "Invalid Due Date Specified. Book was not issued.<p>\n";
$invalidduedate=1;
} else {
if (($day>30) && (($month==4) || ($month==6) || ($month==9) || ($month==11))) {
print "Invalid Due Date Specified. Book was not issued. Only 30 days in $month month.<p>\n";
$invalidduedate=1;
} elsif (($day>29) && ($month==2)) {
print "Invalid Due Date Specified. Book was not issued. Never that many days in February!<p>\n";
$invalidduedate=1;
} elsif (($month==2) && ($day>28) && (($year%4) && ((!($year%100) || ($year%400))))) {
print "Invalid Due Date Specified. Book was not issued. $year is not a leap year.<p>\n";
$invalidduedate=1;
} else {
$env{'datedue'}="$year-$month-$day";
}
}
}
my %responses;
foreach (sort $query->param) {
if ($_ =~ /response-(\d*)/) {
$responses{$1}=$query->param($_);
}
}
if (my $qnumber=$query->param('questionnumber')) {
$responses{$qnumber}=$query->param('answer');
}
unless ($invalidduedate) {
my ($iteminformation, $duedate, $rejected, $question, $questionnumber, $defaultanswer, $message) = issuebook(\%env, $borrower, $barcode, \%responses);
unless ($iteminformation) {
print << "EOF";
<table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd>
<tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage><font color=black>Error</font></th></tr>
<tr><td>
<table border=0 cellpadding=5>
<tr><td>
$barcode is not a valid barcode.
</td></tr>
</table>
EOF
}
if ($rejected) {
if ($rejected == -1) {
} else {
print << "EOF"
<table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd>
<tr><th bgcolor= background=$backgroundimage><font color=black>Error Issuing Book</font></th></tr>
<tr><td><font color=red>$rejected</font></td></tr>
</table>
<br>
EOF
}
}
my $responsesform='';
foreach (keys %responses) {
$responsesform.="<input type=hidden name=response-$_ value=$responses{$_}>\n";
}
if ($question) {
my $stickyduedate=$query->param('stickyduedate');
print << "EOF";
<table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd>
<tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage><font color=black><b>Issuing Question</b></font></td></tr>
<tr><td>
<table border=0 cellpadding=10>
<tr><td>
Attempting to issue $iteminformation->{'title'} by $iteminformation->{'author'} to $borrower->{'firstname'} $borrower->{'surname'}.
<p>
$question
</td></tr>
</table>
</td></tr>
<tr><td align=center>
<table border=0>
<tr><td>
<form method=get>
<input type=hidden name=module value=issues>
<input type=hidden name=borrnumber value=$borrnumber>
<input type=hidden name=barcode value=$barcode>
<input type=hidden name=questionnumber value=$questionnumber>
<input type=hidden name=day value=$day>
<input type=hidden name=month value=$month>
<input type=hidden name=year value=$year>
<input type=hidden name=stickyduedate value=$stickyduedate>
<input type=hidden name=branch value=$branch>
<input type=hidden name=printer value=$printer>
$responsesform
<input type=hidden name=answer value=Y>
<input type=submit value=Yes>
</form>
</td>
<td>
<form method=get>
<input type=hidden name=module value=issues>
<input type=hidden name=borrnumber value=$borrnumber>
<input type=hidden name=barcode value=$barcode>
<input type=hidden name=questionnumber value=$questionnumber>
<input type=hidden name=day value=$day>
<input type=hidden name=month value=$month>
<input type=hidden name=year value=$year>
<input type=hidden name=stickyduedate value=$stickyduedate>
<input type=hidden name=branch value=$branch>
<input type=hidden name=printer value=$printer>
$responsesform
<input type=hidden name=answer value=N>
<input type=submit value=No>
</form>
</td>
</tr>
</table>
</td></tr>
</table>
</td></tr>
</table>
EOF
return;
}
if ($message) {
print << "EOF";
<table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd>
<tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage><font color=black>Message</font></th></tr>
<tr><td>$message</td></tr>
</table>
<p>
EOF
}
}
}
my $issueid=$query->param('issueid');
($issueid) || ($issueid=int(rand()*1000000000));
my $flag='';
my $flagtext='';
my $flaginfotext='';
foreach $flag (sort keys %$flags) {
if ($flags->{$flag}->{'noissues'}) {
$flagtext.="<font color=red>$flag</font> ";
} else {
$flagtext.="$flag ";
}
$flags->{$flag}->{'message'}=~s/\n/<br>/g;
if ($flags->{$flag}->{'noissues'}) {
$flaginfotext.="<tr><td bgcolor=red valign=top><font color=black><b>$flag</b></font></td><td bgcolor=red><font color=black><b>$flags->{$flag}->{'message'}</b></font></td></tr>\n";
} else {
$flaginfotext.="<tr><td valign=top>$flag</td><td>$flags->{$flag}->{'message'}</td></tr>\n";
}
}
if ($flaginfotext) {
$flaginfotext="<table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd><tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage colspan=2><font color=black>Patron Flags</font></th></tr>$flaginfotext</table>\n";
}
$env{'nottodaysissues'}=1;
my ($borrowerissues) = currentissues(\%env, $borrower);
$env{'nottodaysissues'}=0;
$env{'todaysissues'}=1;
my ($today) = currentissues(\%env, $borrower);
$env{'todaysissues'}=0;
my $previssues='';
my @datearr = localtime(time());
my $todaysdate = (1900+$datearr[5]).sprintf ("%0.2d", ($datearr[4]+1)).sprintf ("%0.2d", $datearr[3]);
my $color='';
foreach (sort keys %$borrowerissues) {
($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
my $bookissue=$borrowerissues->{$_};
my $bgcolor='';
my $datedue=$bookissue->{'date_due'};
my $dd=$bookissue->{'date_due'};
$datedue=~s/-//g;
if ($datedue < $todaysdate) {
$dd="<font color=red>$dd</font>\n";
}
$previssues.="<tr><td bgcolor=$color align=center>$dd</td><td bgcolor=$color align=center><a href=/cgi-bin/koha/detail.pl?bib=$bookissue->{'biblionumber'}&type=intra onClick=\"openWindow(this, 'Item', 480, 640)\">$bookissue->{'barcode'}</a></td><td bgcolor=$color>$bookissue->{'title'}</td><td bgcolor=$color>$bookissue->{'author'}</td><td bgcolor=$color align=center>$bookissue->{'dewey'} $bookissue->{'subclass'}</td></tr>\n";
}
my $todaysissues='';
$color='';
foreach (sort keys %$today) {
($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
my $bookissue=$today->{$_};
$todaysissues.="<tr><td bgcolor=$color align=center>$bookissue->{'date_due'}</td><td bgcolor=$color align=center><a href=/cgi-bin/koha/detail.pl?bib=$bookissue->{'biblionumber'}&type=intra onClick=\"openWindow(this, 'Item', 480, 640)\">$bookissue->{'barcode'}</a></td><td bgcolor=$color>$bookissue->{'title'}</td><td bgcolor=$color>$bookissue->{'author'}</td><td bgcolor=$color align=center>$bookissue->{'dewey'} $bookissue->{'subclass'}</td></tr>\n";
}
for ($i=1; $i<32; $i++) {
my $selected='';
if (($query->param('stickyduedate')) && ($day==$i)) {
$selected='selected';
}
$dayoptions.="<option value=$i $selected>$i";
}
my $counter=1;
foreach (('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec')) {
my $selected='';
if (($query->param('stickyduedate')) && ($month==$counter)) {
$selected='selected';
}
$monthoptions.="<option value=$counter $selected>$_";
$counter++;
}
for ($i=$datearr[5]+1900; $i<$datearr[5]+1905; $i++) {
my $selected='';
if (($query->param('stickyduedate')) && ($year==$i)) {
$selected='selected';
}
$yearoptions.="<option value=$i $selected>$i";
}
my $selected='';
($query->param('stickyduedate')) && ($selected='checked');
my ($borrower, $flags) = getpatroninformation(\%env,$borrnumber,0);
my ($patrontable, $flaginfotable) = patrontable($borrower);
print << "EOF";
<form method=get>
<table border=0 cellpadding=5>
<tr>
<td align=center valign=top>
<table border=0 cellspacing=0 cellpadding=5 bgcolor=#dddddd width=100%>
<tr><th align=center background=$backgroundimage><font color=black><b>Enter Book Barcode</b></font></th></tr>
<tr><td align=center>
<table border=0 bgcolor=#dddddd>
<tr><td>Item Barcode:</td><td><input name=barcode size=10></td><td><input type=submit value=Issue></tr>
<tr><td colspan=3 align=center>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td>
<select name=day><option value=0>Day$dayoptions</select>
</td><td>
<select name=month><option value=0>Month$monthoptions</select>
</td><td>
<select name=year><option value=0>Year$yearoptions</select>
</td></tr>
</table>
<br>
<input type=checkbox name=stickyduedate $selected> Sticky Due Date
</td></tr>
</table>
</td></tr>
</table>
<input type=hidden name=module value=issues>
<input type=hidden name=borrnumber value=$borrnumber>
<input type=hidden name=branch value=$branch>
<input type=hidden name=printer value=$printer>
EOF
if ($flags->{'CHARGES'}){
print "<input type=hidden name=charges value=yes>";
}
print << "EOF";
</form>
</td>
<td align=center valign=top>
$patrontable
<br>
<a href=/cgi-bin/koha/circ/circulation.pl?borrnumber=$borrowernumber&module=issues&branch=$branch&printer=$printer&print=yes>Next borrower</a>
<br>
$flaginfotable
</td>
</tr>
<tr>
<td colspan=2 align=center>
<table border=0 cellpadding=5 cellspacing=0 width=100% bgcolor=#dddddd>
<tr><th colspan=5 bgcolor=$headerbackgroundcolor background=$backgroundimage><font color=black><b>Issues Today</b></font></th></tr>
<tr><th>Due Date</th><th>Bar Code</th><th>Title</th><th>Author</th><th>Class</th></tr>
$todaysissues
</table>
</td>
</tr>
<tr>
<td colspan=2 align=center>
<table border=0 cellpadding=5 cellspacing=0 width=100% bgcolor=#dddddd>
<tr><th colspan=5 bgcolor=$headerbackgroundcolor background=$backgroundimage><font color=black><b>Previous Issues</b></font></th></tr>
<tr><th>Due Date</th><th>Bar Code</th><th>Title</th><th>Author</th><th>Class</th></tr>
$previssues
</table>
</td>
</tr>
</table>
</td></tr></table>
<p>
EOF
} else {
if (my $findborrower=$query->param('findborrower')) {
my ($borrowers, $flags) = findborrower(\%env, $findborrower);
my @borrowers=@$borrowers;
if ($#borrowers == -1) {
$query->param('findborrower', '');
print "No borrower matched '$findborrower'<p>\n";
issues(1);
return;
}
if ($#borrowers == 0) {
$query->param('borrnumber', $borrowers[0]->{'borrowernumber'});
$query->param('barcode',' ');
issues(1);
return;
} else {
print "<form method=get>\n";
print "<input type=hidden name=module value=issues>\n";
print "<input type=hidden name=branch value=$branch>\n";
print "<input type=hidden name=printer value=$printer>\n";
print "<input type=hidden name=barcode value=\" \">\n";
print "<table border=0 cellspacing=0 cellpadding=5 bgcolor=#dddddd>";
print "<tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage><font color=black><b>Select a borrower</b></font></th></tr>\n";
print "<tr><td align=center>\n";
print "<select name=borrnumber size=7>\n";
foreach (sort {$a->{'surname'}.$a->{'firstname'} cmp $b->{'surname'}.$b->{'firstname'}} @$borrowers) {
print "<option value=$_->{'borrowernumber'}>$_->{'surname'}, $_->{'firstname'} ($_->{'cardnumber'})\n";
}
print "</select><br>";
print "<input type=submit>\n";
print "</td></tr></table>\n";
print "</td></tr></table>\n";
}
} else {
print << "EOF";
<form method=get>
<table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd>
<tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage><font color=black><b>Enter borrower card number<br> or partial last name</b></font></td></tr>
<tr><td><input name=findborrower></td></tr>
</table>
<input type=hidden name=module value=issues>
<input type=hidden name=branch value=$branch>
<input type=hidden name=printer value=$printer>
<input type=hidden name=barcode value=" ">
</form>
</td></tr></table>
EOF
}
}
}
sub patrontable {
my ($borrower) = @_;
my $flags=$borrower->{'flags'};
my $flagtext='';
my $flaginfotable='';
my $flaginfotext='';
my $flag;
foreach $flag (sort keys %$flags) {
($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
if ($flags->{$flag}->{'noissues'}) {
$flagtext.="<font color=red>$flag</font> ";
} else {
$flagtext.="$flag ";
}
$flags->{$flag}->{'message'}=~s/\n/<br>/g;
if ($flags->{$flag}->{'noissues'}) {
if ($flag eq 'CHARGES') {
$flaginfotext.="<tr><td bgcolor=$color valign=top><font color=red>$flag</font></td><td bgcolor=$color><b>$flags->{$flag}->{'message'}</b> <a href=/cgi-bin/koha/pay.pl?bornum=$borrower->{'borrowernumber'} onClick=\"openWindow(this, 'Payment', 480,640)\">Payment</a></td></tr>\n";
} else {
$flaginfotext.="<tr><td bgcolor=$color valign=top><font color=red>$flag</font></td><td bgcolor=$color>$flags->{$flag}->{'message'}</td></tr>\n";
}
} else {
if ($flag eq 'CHARGES') {
$flaginfotext.="<tr><td valign=top bgcolor=$color>$flag</td><td bgcolor=$color>$flags->{$flag}->{'message'} <a href=/cgi-bin/koha/pay.pl?bornum=$borrower->{'borrowernumber'} onClick=\"openWindow(this, 'Payment', 480,640)\">Payment</a></td></tr>\n";
} elsif ($flag eq 'WAITING') {
my $itemswaiting='';
my $items=$flags->{$flag}->{'itemlist'};
foreach $item (@$items) {
my ($iteminformation) = getiteminformation($env, $item->{'itemnumber'}, 0);
$itemswaiting.="<a href=/cgi-bin/koha/detail.pl?bib=$iteminformation->{'biblionumber'}&type=intra onClick=\"openWindow(this, 'Item', 480, 640)\">$iteminformation->{'barcode'}</a> $iteminformation->{'title'} ($branches->{$iteminformation->{'holdingbranch'}}->{'branchname'})<br>\n";
}
$flaginfotext.="<tr><td bgcolor=$color valign=top>$flag</td><td bgcolor=$color>$flags->{$flag}->{'message'}<br>$itemswaiting</td></tr>\n";
} elsif ($flag eq 'ODUES') {
my $items=$flags->{$flag}->{'itemlist'};
my $itemswaiting="<table border=0 cellspacing=0 cellpadding=2>\n";
my $currentcolor=$color;
{
my $color=$currentcolor;
foreach $item (@$items) {
($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
my ($iteminformation) = getiteminformation($env, $item->{'itemnumber'}, 0);
$itemswaiting.="<tr><td bgcolor=$color><font color=red>$iteminformation->{'date_due'}</font></td><td bgcolor=$color><a href=/cgi-bin/koha/detail.pl?bib=$iteminformation->{'biblionumber'}&type=intra onClick=\"openWindow(this, 'Item', 480, 640)\">$iteminformation->{'barcode'}</a></td><td bgcolor=$color>$iteminformation->{'title'}</td></tr>\n";
}
}
$itemswaiting.="</table>\n";
if ($query->param('module') ne 'returns'){
$flaginfotext.="<tr><td bgcolor=$color valign=top>$flag</td><td bgcolor=$color>$flags->{$flag}->{'message'}<br>Overdue items can be seen in the Previous Issues table below</td></tr>\n";
} else {
$flaginfotext.="<tr><td bgcolor=$color valign=top>$flag</td><td bgcolor=$color>$flags->{$flag}->{'message'}</td></tr>\n";
}
} else {
$flaginfotext.="<tr><td bgcolor=$color valign=top>$flag</td><td bgcolor=$color>$flags->{$flag}->{'message'}</td></tr>\n";
}
}
}
($flaginfotext) && ($flaginfotext="<table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd><tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage colspan=2><font color=black>Patron Flags</font></th></tr>$flaginfotext</table>\n");
my $patrontable= << "EOF";
<table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd>
<tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage><font color=black><b>Patron Information</b></font></td></tr>
<tr><td>
<a href=/cgi-bin/koha/moremember.pl?bornum=$borrower->{'borrowernumber'} onClick="openWindow(this,'Member', 480, 640)">$borrower->{'cardnumber'}</a> $borrower->{'surname'}, $borrower->{'title'} $borrower->{'firstname'}<br>
EOF
if ($query->param('module') ne 'returns'){
$patrontable.="$borrower->{'streetaddress'} $borrower->{'city'}<br>
$borrower->{'categorycode'} ";
}
$patrontable.=<< "EOF";
$flagtext
</td></tr>
</table>
EOF
return($patrontable, $flaginfotext);
}

View file

@ -16,6 +16,17 @@ my $input = new CGI;
my $biblio=$input->param('biblio');
#print $input->header;
#check no items attached
my $count=C4::Acquisitions::itemcount($biblio);
delbiblio($biblio);
#print $count;
if ($count > 0){
print $input->header;
print "This biblio has $count items attached, please delete them before deleting this biblio<p>
";
} else {
#delbiblio($biblio);
print $input->redirect("/catalogue/");
}

View file

@ -46,7 +46,14 @@ for (my $i=1;$i<$count3;$i++){
$additional=$additional."|".$addauthor->[$i]->{'author'};
}
my @temp=split('\t',$items[0]);
print mkheadr(3,"$dat->{'title'} ($dat->{'author'}) $temp[4]");
if ($type eq 'catmain'){
print mkheadr(3,"Catalogue Maintenance");
}
if ($dat->{'author'} ne ''){
print mkheadr(3,"$dat->{'title'} ($dat->{'author'}) $temp[4]");
} else {
print mkheadr(3,"$dat->{'title'} $temp[4]");
}
print <<printend
<TABLE CELLSPACING=0 CELLPADDING=5 border=1 align=left width="220">
@ -169,41 +176,36 @@ while ($i < $count){
# print $items[$i],"<br>";
my @results=split('\t',$items[$i]);
if ($type ne 'opac'){
$results[1]=mklink("/cgi-bin/koha/moredetail.pl?item=$results[5]&bib=$bib&bi=$results[8]",$results[1]);
$results[1]=mklink("/cgi-bin/koha/moredetail.pl?item=$results[5]&bib=$bib&bi=$results[8]&type=$type",$results[1]);
}
if ($results[2] eq ''){
$results[2]='Available';
}
if ($type eq 'catmain'){
$results[10]=mklink("/cgi-bin/koha/maint/catmaintain.pl?type=fixitemtype&bi=$results[8]&item=$results[6]","Fix Itemtype");
}
if ($colour == 1){
if ($type ne 'opac'){
# if ($results[6] eq 'PER'){
if ($type eq 'catmain'){
print mktablerow(8,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9],$results[10]);
} else {
print mktablerow(7,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9]);
# } else {
# print mktablerow(6,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7],$results[1]);
# }
}
} else {
$results[6]=ItemType($results[6]);
# if ($results[6] =~ /Periodical/){
print mktablerow(6,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7],$results[9]);
# } else {
# print mktablerow(5,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7]);
# }
$results[6]=ItemType($results[6]);
print mktablerow(6,$secondary,$results[6],$results[4],$results[3],$results[2],$results[7],$results[9]);
}
$colour=0;
} else{
if ($type ne 'opac'){
# if ($results[6] eq 'PER'){
print mktablerow(7,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9]);
# }else{
# print mktablerow(6,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[1]);
# }
if ($type eq 'catmain'){
print mktablerow(8,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9],$results[10]);
} else {
print mktablerow(7,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[1],$results[9]);
}
} else {
$results[6]=ItemType($results[6]);
# if ($results[6] =~ /Periodical/){
print mktablerow(6,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[9]);
# } else {
# print mktablerow(5,'white',$results[6],$results[4],$results[3],$results[2],$results[7]);
# }
print mktablerow(6,'white',$results[6],$results[4],$results[3],$results[2],$results[7],$results[9]);
}
$colour=1;
}
@ -218,11 +220,28 @@ print <<printend
<TR VALIGN=TOP>
<TD bgcolor="99cc33" background="/images/background-mem.gif" colspan=2><p><b>HELP</b><br>
<b>Update Biblio for all Items:</b> Click on the <b>Modify</b> button [left] to amend the biblio. Any changes you make will update the record for <b>all</b> the items listed above. <p>
<b>Updating the Biblio for only ONE or SOME Items:</b> If some of the items listed above need a different biblio, or are on the wrong biblio, you must use the <a href="acquisitions/">acquisitions</a> process to fix this. You will need to "re-order" the items, and delete them from this biblio.<p>
<b>Updating the Biblio for only ONE or SOME Items:</b>
printend
;
if ($type eq 'catmain'){
print <<printend
If some of the items listed above need a different biblio,
you need to click on the wrong item, then shift the group it belongs to, to the correct biblio.
You will need to know the correct biblio number
<p>
</TR>
printend
;
} else {
print <<printend
If some of the items listed above need a different biblio, or are on the wrong biblio, you must use the <a href="acquisitions/">acquisitions</a> process to fix this. You will need to "re-order" the items, and delete them from this biblio.
<p>
</TR>
printend
;
}
}
print mktableft();
print endcenter();

View file

@ -37,7 +37,8 @@ if (my $data=$sth->fetchrow_hashref){
altrelationship='$data{'altrelationship'}',othernames='$data{'othernames'}',phoneday='$data{'phoneday'}',
categorycode='$data{'categorycode'}',city='$data{'city'}',area='$data{'area'}',phone='$data{'phone'}',
borrowernotes='$data{'borrowernotes'}',altphone='$data{'altphone'}',surname='$data{'surname'}',
initials='$data{'initials'}',streetaddress='$data{'address'}',ethnicity='$data{'ethnicity'}'
initials='$data{'initials'}',streetaddress='$data{'address'}',ethnicity='$data{'ethnicity'}',
gonenoaddress='$data{'gna'}',lost='$data{'lost'}',debarred='$data{'debarred'}'
where borrowernumber=$data{'borrowernumber'}";
# print $query;

98
maint/catmaintain.pl Executable file
View file

@ -0,0 +1,98 @@
#!/usr/bin/perl
#script to do some serious catalogue maintainance
#written 22/11/00
# by chris@katipo.co.nz
use strict;
use CGI;
use C4::Output;
use C4::Database;
use C4::Maintainance;
my $input = new CGI;
print $input->header;
my $type=$input->param('type');
print startpage();
print startmenu('catalog');
my $blah;
my $num=0;
my $offset=0;
if ($type eq 'allsub'){
my $sub=$input->param('sub');
my ($count,$results)=listsubjects($sub,$num,$offset);
for (my $i=0;$i<$count;$i++){
my $sub2=$results->[$i]->{'subject'};
$sub2=~ s/ /%20/g;
print "\"<a href=\"/cgi-bin/koha/maint/catmaintain.pl?type=allsub&sub=$sub\" onclick=\'messenger(\"/cgi-bin/koha/maint/catmaintain.pl?type=modsub&sub=$sub2\");window1.focus()\'>$results->[$i]->{'subject'}\"</a><br>\n";
}
} elsif ($type eq 'modsub'){
my $sub=$input->param('sub');
print "<form action=/cgi-bin/koha/maint/catmaintain.pl>";
print "Subject:<input type=text value=\"$sub\" name=sub size=40><br>\n";
print "<input type=hidden name=type value=upsub>";
print "<input type=hidden name=oldsub value=\"$sub\">";
print "<input type=submit value=modify>";
# print "<a href=\"nowhere\" onclick=\"document.forms[0].submit();\">Modify</a>";
print "</form>";
print "<p> This will change the subject headings on all the biblios this subject is applied to"
} elsif ($type eq 'upsub'){
my $sub=$input->param('sub');
my $oldsub=$input->param('oldsub');
updatesub($sub,$oldsub);
print "Successfully modified $oldsub is now $sub";
print "<p><a href=/cgi-bin/koha/maint/catmaintain.pl target=window0 onclick=\"window0.focus()\">Back to catalogue maintenance</a><br>";
print "<a href=nowhere onclick=\"self.close()\">Close this window</a>";
} elsif ($type eq 'undel'){
my $title=$input->param('title');
my ($count,$results)=deletedbib($title);
print "<table border=0>";
print "<tr><td><b>Title</b></td><td><b>Author</b></td><td><b>Undelete</b></td></tr>";
for (my $i=0;$i<$count;$i++){
print "<tr><td>$results->[$i]->{'title'}</td><td>$results->[$i]->{'author'}</td><td><a href=/cgi-bin/koha/maint/catmaintain.pl?type=finun&bib=$results->[$i]->{'biblionumber'}>Undelete</a></td>\n";
}
print "</table>";
} elsif ($type eq 'finun'){
my $bib=$input->param('bib');
undeletebib($bib);
print "Succesfully undeleted";
print "<p><a href=/cgi-bin/koha/maint/catmaintain.pl>Back to Catalogue Maintenance</a>";
} elsif ($type eq 'fixitemtype'){
my $bi=$input->param('bi');
my $item=$input->param('item');
print "<form method=post action=/cgi-bin/koha/maint/catmaintain.pl>";
print "<input type=hidden name=bi value=$bi>";
print "<input type=hidden name=type value=updatetype>";
print "Itemtype:<input type=text name=itemtype value=$item><br>\n";
print "<input type=submit value=Change>";
print "</form>";
} elsif ($type eq 'updatetype'){
my $bi=$input->param('bi');
my $itemtype=$input->param('itemtype');
updatetype($bi,$itemtype);
print "Updated successfully";
print "<p><a href=/cgi-bin/koha/maint/catmaintain.pl>Back to Catalogue Maintenance</a>";
} else {
print "<B>Subject Maintenance</b><br>";
print "<form action=/cgi-bin/koha/maint/catmaintain.pl method=post>";
print "<input type=hidden name=type value=allsub>";
print "Show all subjects beginning with <input type=text name=sub><br>";
print "<input type=submit value=Show>";
print "</form>";
print "<p>";
print "<B>Group Maintenance</b></br>";
print "<form action=/cgi-bin/koha/search.pl method=post>";
print "<input type=hidden name=type value=catmain>";
print "Show all Titles beginning with <input type=text name=title><br>";
print "<input type=submit value=Show>";
print "</form>";
print "<p>";
print "<B>Undelete Biblio</b></br>";
print "<form action=/cgi-bin/koha/maint/catmaintain.pl method=post>";
print "<input type=hidden name=type value=undel>";
print "Show all Titles beginning with <input type=text name=title><br>";
print "<input type=submit value=Show>";
print "</form>";
}
print endmenu('catalog');
print endpage();

View file

@ -7,7 +7,7 @@ use strict;
use C4::Output;
use CGI;
use C4::Search;
use C4::Database;
my $input = new CGI;
my $member=$input->param('bornum');
@ -15,7 +15,7 @@ if ($member eq ''){
$member=NewBorrowerNumber();
}
my $type=$input->param('type');
my $modify=$input->param('modify.x');
print $input->header;
print startpage();
print startmenu('member');
@ -39,13 +39,53 @@ if ($type eq 'Add'){
} else {
print "<input type=hidden name=updtype value=M>";
}
my $cardnumber=$data->{'cardnumber'};
my %systemprefs=systemprefs();
if ($cardnumber eq '' && $systemprefs{'autoMemberNum'} eq '1') {
my $dbh=C4Connect;
my $query="select max(substring(borrowers.cardnumber,2,7)) from borrowers";
my $sth=$dbh->prepare($query);
$sth->execute;
my $data=$sth->fetchrow_hashref;
$cardnumber=$data->{'max(substring(borrowers.cardnumber,2,7))'};
$sth->finish;
$dbh->disconnect;
# purpose: generate checksum'd member numbers.
# We'll assume we just got the max value of digits 2-8 of member #'s from the database and our job is to
# increment that by one, determine the 1st and 9th digits and return the full string.
my @weightings = (8,4,6,3,5,2,1);
my $sum;
my $i = 0;
if (! $cardnumber) { # If DB has no values, start at 1000000
$cardnumber = 1000000;
} else {
$cardnumber = $cardnumber + 1;
}
while ($i <8) { # step from char 1 to 7.
my $temp1 = $weightings[$i]; # read weightings, left to right, 1 char at a time
my $temp2 = substr($cardnumber,$i,1); # sequence left to right, 1 char at a time
#print "$temp2<br>";
$sum = $sum + ($temp1*$temp2); # mult each char 1-7 by its corresponding weighting
$i++; # increment counter
}
my $rem = ($sum%11); # remainder of sum/11 (eg. 9999999/11, remainder=2)
if ($rem == 10) { # if remainder is 10, use X instead
$rem = "X";
}
$cardnumber="V$cardnumber$rem";
} else {
$cardnumber=$data->{'cardnumber'};
}
print <<printend
<table border=0 cellspacing=0 cellpadding=5 >
<tr valign=top><td COLSPAN=2><input type=reset value="Clear all Fields"></td><td COLSPAN=3 ALIGN=RIGHT ><font size=4 face='arial,helvetica'>
Member# $member, Card Number* <input type=text name=cardnumber size=10 value="$data->{'cardnumber'}"><br>
Member# $member, Card Number* <input type=text name=cardnumber size=10 value="$cardnumber"><br>
</td></tr>
@ -224,9 +264,16 @@ print <<printend
<td><input type=text name=city size=20 value="$data->{'city'}"></td>
<td>
<SELECT NAME="area" SIZE="1">
<OPTION value=L
printend
;
print "<OPTION value=EEBF";
if ($data->{'area'} eq 'EEBF'){
print " Selected";
}
print ">EEBF - Delphi-E Flint
<OPTION value=L";
if ($data->{'area'} eq 'L'){
print " Selected";
}
@ -374,18 +421,54 @@ print <<printend
<tr valign=top bgcolor=white><td COLSPAN=5 align=right >
printend
;
if ($modify){
print <<printend
<tr><td><Font size=2>FLAGS</font></td></tr>
<tr><td>Gone No Address</td>
<td><input type=radio name=gna value=1
printend
;
if ($data->{'gonenoaddress'} eq '1'){
print " checked";
}
print ">Yes <input type=radio name=gna value=0";
if ($data->{'gonenoaddress'} eq '0'){
print " checked";
}
print ">No</td></tr>\n";
print "<tr><td>Lost</td><td><input type=radio name=lost value=1";
if ($data->{'lost'} eq '1'){
print " checked";
}
print ">Yes<input type=radio name=lost value=0";
if ($data->{'lost'} eq '0'){
print " checked";
}
print ">No</td></tr>\n";
print "<tr><td>Debarred</td><td><input type=radio name=debarred value=1";
if ($data->{'debarred'} eq '1'){
print " checked";
}
print ">Yes<input type=radio name=debarred value=0";
if ($data->{'debarred'} eq '0'){
print " checked";
}
print ">No</td></tr>\n";
}
if ($type ne 'modify'){
print <<printend
<input type=image src="/images/save-changes.gif" WIDTH=188 HEIGHT=44 ALT="Add New Member" border=0 ></td>
<tr><td></td><td><input type=image src="/images/save-changes.gif" WIDTH=188 HEIGHT=44 ALT="Add New Member" border=0 ></td>
printend
;
} else {
print <<printend
<input type=image src="/images/save-changes.gif" WIDTH=188 HEIGHT=44 ALT="Add New Member" border=0 ></td>
<td><td></td><td><input type=image src="/images/save-changes.gif" WIDTH=188 HEIGHT=44 ALT="Add New Member" border=0 ></td>
printend
;
}
print <<printend
</form>
</tr>
</TABLE>
</table>

View file

@ -53,6 +53,12 @@ $dewey=~ s/\.$//;
print <<printend
<br>
<a href=/cgi-bin/koha/request.pl?bib=$bib><img src=/images/requests.gif width=120 height=42 border=0 align=right border=0></a>
printend
;
if ($type eq 'catmain'){
print "<FONT SIZE=6><em>Catalogue Maintenance</em></FONT><br>";
}
print <<printend
<FONT SIZE=6><em><a href=/cgi-bin/koha/detail.pl?bib=$bib&type=intra>$data->{'title'} ($data->{'author'})</a></em></FONT><P>
<p>
<form action=/cgi-bin/koha/modbibitem.pl>
@ -84,6 +90,13 @@ print <<printend
<b>Size:</b> $data->{'size'}<br>
<b>Notes:</b> $data->{'notes'}<br>
<b>No. of Items:</b> $count
printend
;
if ($type eq 'catmain'){
print "<br><a href=/cgi-bin/koha/maintenance/shiftbib.pl?bi=$data->{'biblioitemnumber'}&bib=$data->{'biblionumber'}>Shift to another biblio</a>";
}
print <<printend
</font>
</TD>
</tr>

View file

@ -5,7 +5,8 @@
#Displays all the detailas about a borrower
#needs html removed and to use the C4::Output more, but its tricky
#last modified 21/1/2000 by chris@katipo.co.nz
#modifiecd 31/1/2001 by chris@katipo.co.nz to not allow items on request
#to be renewed
use strict;
use C4::Output;
use CGI;
@ -13,6 +14,7 @@ use C4::Search;
use Date::Manip;
use C4::Reserves2;
use C4::Circulation::Renewals2;
use C4::Circulation::Circ2;
my $input = new CGI;
my $bornum=$input->param('bornum');
@ -89,14 +91,14 @@ print <<printend
<P>
General Notes: <A HREF="popbox.html" onclick="messenger(200,250,'Form that lets you add to and delete notes.'); return false">
$data->{'borrowernotes'}</a>
General Notes: <!--<A HREF="popbox.html" onclick="messenger(200,250,'Form that lets you add to and delete notes.'); return false">-->
$data->{'borrowernotes'}<!--</a>-->
<p align=right>
<form action=/cgi-bin/koha/memberentry.pl method=post>
<input type=hidden name=bornum value=$bornum>
<INPUT TYPE="image" name="submit" VALUE="modify" height=42 WIDTH=93 BORDER=0 src="/images/modify-mem.gif">
<INPUT TYPE="image" name="modify" VALUE="modify" height=42 WIDTH=93 BORDER=0 src="/images/modify-mem.gif">
<INPUT TYPE="image" name="submit" VALUE="delete" height=42 WIDTH=93 BORDER=0 src="/images/delete-mem.gif">
<INPUT TYPE="image" name="delete" VALUE="delete" height=42 WIDTH=93 BORDER=0 src="/images/delete-mem.gif">
</p>
</TD>
@ -130,7 +132,13 @@ for (my$i=0;$i<$numaccts;$i++){
}
print "<td>$accts->[$i]{'date'}</td>";
# print "<TD>$accts->[$i]{'accounttype'}</td>";
print "<TD>$accts->[$i]{'description'} $accts->[$i]{'title'}</td>
print "<TD>";
my $env;
if ($accts->[$i]{'accounttype'} ne 'Res'){
my $iteminfo=C4::Circulation::Circ2::getiteminformation($env,$accts->[$i]->{'itemnumber'},'');
print "<a href=/cgi-bin/koha/moredetail.pl?itemnumber=$accts->[$i]->{'itemnumber'}&bib=$iteminfo->{'biblionumber'}&bi=$iteminfo->{'biblioitemnumber'}>$accts->[$i]->{'description'} $accts->[$i]{'title'}</a>";
}
print "</td>
<TD>$amount</td><td>$amount2</td>
</tr>";
}
@ -179,7 +187,9 @@ for (my $i=0;$i<$count;$i++){
if ($datedue < $today){
print "<font color=red>";
}
print "$issue->[$i]{'title'} $issue->[$i]{'barcode'}</td>
print "$issue->[$i]{'title'}
<a href=/cgi-bin/koha/moredetail.pl?item=$issue->[$i]->{'itemnumber'}&bib=$issue->[$i]->{'biblionumber'}&bi=$issue->[$i]->{'biblioitemnumber'}>
$issue->[$i]{'barcode'}</a></td>
<TD>$issue->[$i]{'date_due'}</td>";
#find the charge for an item
my ($charge,$itemtype)=calc_charges(\%env,$issue->[$i]{'itemnumber'},$bornum);
@ -194,15 +204,17 @@ for (my $i=0;$i<$count;$i++){
#check item is not reserved
my ($rescount,$reserves)=FindReserves($issue->[$i]{'biblionumber'},'');
if ($rescount >0){
print "<TD>On Request";
print "<TD><a href=/cgi-bin/koha/request.pl?bib=$issue->[$i]{'biblionumber'}>On Request - no renewals</a></td></tr>";
} elsif ($issue->[$i]->{'renewals'} > 0) {
print "<TD>Previously Renewed - no renewals</td></tr>";
} else {
print "<TD>";
}
print "<input type=radio name=\"renew_item_$issue->[$i]{'itemnumber'}\" value=y>Y
<input type=radio name=\"renew_item_$issue->[$i]{'itemnumber'}\" value=n>N</td>
</tr>
";
}
}
print <<printend

View file

@ -1,10 +1,7 @@
#!/usr/bin/perl
#script to provide intranet (librarian) advanced search facility
#modified 9/11/1999 by chris@katipo.co.nz
#adding an extra comment to play with CVS (Si, 19/11/99)
#modified 29/12/99 by chris@katipo.co.nz to be usavle by opac as well
#modified by chris 10/11/00 to fix dewey search
#modified by chris@katipo.co.nz 3/3/01 to fix glitch with " in titles
#modified by chris@katipo.co.nz 7/3/01 to as part of the catalogue maintenance module
use strict;
use C4::Search;
use CGI;
@ -40,6 +37,7 @@ $search{'title'}=$title;
my $keyword=validate($input->param('keyword'));
$search{'keyword'}=$keyword;
$search{'front'}=validate($input->param('front'));
my $author=validate($input->param('author'));
$search{'author'}=$author;
my $subject=validate($input->param('subject'));
@ -66,9 +64,12 @@ if ($num eq ''){
}
print startpage();
print startmenu($type);
#print $type;
#print $search{'ttype'};
if ($type ne 'opac'){
if ($type eq 'intra'){
print mkheadr(1,'Catalogue Search Results');
} elsif ($type eq 'catmain'){
print mkheadr(1,'Catalogue Maintenance');
} else {
print mkheadr(1,'Opac Search Results');
}
@ -85,7 +86,8 @@ if ($itemnumber ne '' || $isbn ne ''){
# print "hey";
($count,@results)=&KeywordSearch(\$blah,'intra',\%search,$num,$offset);
} elsif ($search{'front'} ne '') {
($count,@results)&FrontSearch(\$blah,'intra',\%search,$num,$offset);
$search{'keyword'}=$search{'front'};
($count,@results)&KeywordSearch(\$blah,'intra',\%search,$num,$offset);
# print "hey";
}elsif ($title ne '' || $author ne '' || $dewey ne '' || $class ne '') {
($count,@results)=&CatSearch(\$blah,'loose',\%search,$num,$offset);
@ -134,6 +136,7 @@ while ($i < $count2){
$stuff[1]=~ s/\`/\\\'/g;
my $title2=$stuff[1];
$title2=~ s/ /%20/g;
$title2=~ s/\W//g;
if ($subject eq ''){
# print $stuff[0];
$stuff[1]=mklink("/cgi-bin/koha/detail.pl?type=$type&bib=$stuff[2]&title=$title2",$stuff[1]);

View file

@ -45,7 +45,7 @@ my %levin;
my %foxton;
my %shannon;
my $oldtime;
#my $totalc=0;
my $totalw=0;
#my $totalcf=0;
print mktablehdr;
print mktablerow(5,'#99cc33',bold('Name'),bold('Type'),bold('Date/time'),bold('Amount'), bold('Branch'),'/images/background-mem.gif');
@ -54,34 +54,47 @@ for (my $i=0;$i<$count;$i++){
my $min=substr($payments[$i]{'timestamp'},10,2);
my $sec=substr($payments[$i]{'timestamp'},12,2);
my $time="$hour:$min:$sec";
$payments[$i]{'amount'}*=-1;
$total+=$payments[$i]{'amount'};
if ($payments[$i]{'accounttype'} ne 'W'){
$payments[$i]{'amount'}*=-1;
$total+=$payments[$i]{'amount'};
}
my @charges=getcharges($payments[$i]{'borrowernumber'},$payments[$i]{'timestamp'});
my $count=@charges;
my $temptotalf=0;
my $temptotalr=0;
my $temptotalres=0;
my $temptotalren=0;
for (my $i2=0;$i2<$count;$i2++){
my $temptotalw=0;
for (my $i2=0;$i2<$count;$i2++){
if ($charges[$i2]->{'amountoutstanding'} != $oldtime){
print mktablerow(6,'red',$charges[$i2]->{'description'},$charges[$i2]->{'accounttype'},'',
$charges[$i2]->{'amount'},$charges[$i2]->{'amountoutstanding'});
if ($charges[$i2]->{'accounttype'} eq 'Rent'){
$temptotalr+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'};
print mktablerow(6,'red',$charges[$i2]->{'description'},$charges[$i2]->{'accounttype'},'',
$charges[$i2]->{'amount'},$charges[$i2]->{'amountoutstanding'});
if ($payments[$i]{'accounttype'} ne 'W'){
# print $payments[$i]{'accounttype'};
if ($charges[$i2]->{'accounttype'} eq 'Rent'){
$temptotalr+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'};
}
if ($charges[$i2]->{'accounttype'} eq 'F' || $charges[$i2]->{'accounttype'} eq 'FU'){
$temptotalf+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'};
}
if ($charges[$i2]->{'accounttype'} eq 'Res'){
$temptotalres+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'};
}
if ($charges[$i2]->{'accounttype'} eq 'R'){
$temptotalren+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'};
}
}
}
if ($charges[$i2]->{'accounttype'} eq 'F' || $charges[$i2]->{'accounttype'} eq 'FU'){
$temptotalf+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'};
}
if ($charges[$i2]->{'accounttype'} eq 'Res'){
$temptotalres+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'};
}
if ($charges[$i2]->{'accounttype'} eq 'R'){
$temptotalren+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'};
}
}
}
}
if ($payments[$i]{'accounttype'} eq 'W'){
$totalw+=$payments[$i]{'amount'};
}
my $time2="$payments[$i]{'date'} $time";
my $branch=Getpaidbranch($time2);
$branch=~ s/Levi/C/;
if ($branch eq 'C'){
$levin{'total'}+=$payments[$i]{'amount'};
$levin{'totalr'}+=$temptotalr;
@ -110,8 +123,9 @@ for (my $i=0;$i<$count;$i++){
}
print mktableft;
print endcenter;
print "<p><b>$total</b>";
#print "<b
#$totalw=$totalw * -1;
print "<p><b>Total Paid $total</b>";
print "<br><b>total written off $totalw</b>";
print mktablehdr;
$levin{'issues'}=Count('issue','C',$date,$date2);
$foxton{'issues'}=Count('issue','F',$date,$date2);
@ -119,12 +133,16 @@ $shannon{'issues'}=Count('issue','S',$date,$date2);
$levin{'returns'}=Count('return','C',$date,$date2);
$foxton{'returns'}=Count('return','F',$date,$date2);
$shannon{'returns'}=Count('return','S',$date,$date2);
$levin{'renewals'}=Count('renew','C',$date,$date2);
$foxton{'renewals'}=Count('renew','F',$date,$date2);
$shannon{'renewals'}=Count('renew','S',$date,$date2);
print mktablerow(9,'white',"<b>Levin</b>","Fines $levin{'totalf'}","Rental Charges $levin{'totalr'}",
"Reserve Charges $levin{'totalres'}","Renewal Charges $levin{'totalren'}","Total $levin{'total'}",
"Reserve Charges $levin{'totalres'}","Renewal Charges $levin{'totalren'}","<b>Total $levin{'total'}</b>",
"Issues $levin{'issues'}","Renewals $levin{'renewals'}","Returns $levin{'returns'}");
print mktablerow(9,'white',"<b>foxton</b>","Fines $foxton{'totalf'}","Rental Charges $foxton{'totalr'}","Reserve Charges $foxton{'totalres'}","Renewal Charges $foxton{'totalren'}","Total $foxton{'total'}",
print mktablerow(9,'white',"<b>foxton</b>","Fines $foxton{'totalf'}","Rental Charges $foxton{'totalr'}","Reserve Charges $foxton{'totalres'}","Renewal Charges $foxton{'totalren'}","<b>Total $foxton{'total'}</b>",
"Issues $foxton{'issues'}","Renewals $foxton{'renewals'}","Returns $foxton{'returns'}");
print mktablerow(9,'white',"<b>shannon</b>","Fines $shannon{'totalf'}","Rental Charges $shannon{'totalr'}","Reserve Charges $shannon{'totalres'}","Renewal Charges $shannon{'totalren'}","Total $shannon{'total'}",
print mktablerow(9,'white',"<b>shannon</b>","Fines $shannon{'totalf'}","Rental Charges $shannon{'totalr'}","Reserve Charges $shannon{'totalres'}","Renewal Charges $shannon{'totalren'}","<b>Total $shannon{'total'}</b>",
"Issues $shannon{'issues'}","Renewals $shannon{'renewals'}","Returns $shannon{'returns'}");
print mktableft;

View file

@ -2,14 +2,13 @@
#written 14/1/2000
#script to display reports
#major rewrite by chris@katipo.co.nz 22/11/00
use C4::Stats;
use strict;
use Date::Manip;
use CGI;
use C4::Output;
use DBI;
use C4::Database;
my $input=new CGI;
my $time=$input->param('time');
@ -41,39 +40,24 @@ if ($time=~ /\//){
$date=UnixDate($date,'%Y-%m-%d');
$date2=UnixDate($date2,'%Y-%m-%d');
my $dbh=C4Connect;
my $query="select *
from accountlines,accountoffsets,borrowers where
accountlines.borrowernumber=accountoffsets.borrowernumber and
(accountlines.accountno=accountoffsets.accountno or accountlines.accountno
=accountoffsets.offsetaccount) and accountlines.timestamp >=20000621000000
and borrowers.borrowernumber=accountlines.borrowernumber
group by accountlines.borrowernumber,accountlines.accountno";
my $sth=$dbh->prepare($query);
$sth->execute;
print mkheadr(1,"$date");
print mktablehdr;
while (my $data=$sth->fetchrow_hashref){
print "<TR><Td>$data->{'surname'}</td><td>$data->{'description'}</td><td>$data->{'amount'}
</td>";
if ($data->{'accountype'}='Pay'){
my $branch=Getpaidbranch($data->{'timestamp'});
print "<td>$branch</td>";
}
print "</tr>";
}
print mktablerow(5,'white','<b>Branch</b>','<b>Issues</b>','<b>Returns</b>','<b>Renewals</b>','<b>Paid</b>');
my $issues=Count('issue','C',$date,$date2);
my $returns=Count('return','C',$date,$date2);
my $renew=Count('renew','C',$date,$date2);
my $paid=gettotals($date,$date2,'C');
print mktablerow(5,'white','<b>Levin</b>',$issues,$returns,$renew,$paid);
$issues=Count('issue','F',$date,$date2);
$returns=Count('return','F',$date,$date2);
$renew=Count('renew','F',$date,$date2);
$paid=gettotals($date,$date2,'F');
print mktablerow(5,'white','<b>Foxton</b>',$issues,$returns,$renew,$paid);
$issues=Count('issue','S',$date,$date2);
$returns=Count('return','S',$date,$date2);
$renew=Count('renew','S',$date,$date2);
$paid=gettotals($date,$date2,'S');
print mktablerow(5,'white','<b>Shannon</b>',$issues,$returns,$renew,$paid);
print mktableft;
print endcenter;
#print "<p><b>$total</b>";
print endmenu('report');
print endpage;
$sth->finish;
$dbh->disconnect;

View file

@ -5,14 +5,10 @@ use CGI;
use strict;
use C4::Acquisitions;
use C4::Output;
use C4::Circulation::Circ2;
my $env;
my $input= new CGI;
#print $input->header;
#print $input->dump;
#my $title=checkinp($input->param('Title'));
#my $author=checkinp($input->param('Author'));
my $bibnum=checkinp($input->param('bibnum'));
my $itemnum=checkinp($input->param('itemnumber'));
my $copyright=checkinp($input->param('Copyright'));
@ -23,10 +19,8 @@ my $notes=checkinp($input->param('ItemNotes'));
#need to do barcode check
my $barcode=$input->param('Barcode');
#modbiblio($bibnum,$title,$author,$copyright,$seriestitle,$serial,$unititle,$notes);
my $bibitemnum=checkinp($input->param('bibitemnum'));
#my $olditemtype
my $itemtype=checkinp($input->param('Item'));
my $isbn=checkinp($input->param('ISBN'));
my $publishercode=checkinp($input->param('Publisher'));
@ -38,11 +32,11 @@ my $wthdrawn=$input->param('withdrawn');
my $classification;
my $dewey;
my $subclass;
my $override=$input->param('override');
if ($itemtype ne 'NF'){
$classification=$class;
}
if ($class =~/[0-9]+/){
# print $class;
$dewey= $class;
$dewey=~ s/[a-z]+//gi;
my @temp;
@ -53,7 +47,6 @@ if ($class =~/[0-9]+/){
}
$classification=$temp[0];
$subclass=$temp[1];
# print $classification,$dewey,$subclass;
}else{
$dewey='';
}
@ -61,21 +54,42 @@ my $illus=checkinp($input->param('Illustrations'));
my $pages=checkinp($input->param('Pages'));
my $volumeddesc=checkinp($input->param('Volume'));
#have to check how many items are attached to this bibitem, if one, just change it,
#if more than one, we must create a new one.
#my $number=countitems($bibitemnum);
#if ($number > 1){
# print $number;
#check if bibitemneeds modifying
# my $needsmod=needsmod($bibitemnum,$itemtype);
# if ($needsmod != 1){
# $bibitemnum=newbiblioitem($bibnum,$itemtype,$volumeddesc,$classification);
# }
#}
#modbibitem($bibitemnum,$itemtype,$isbn,$publishercode,$publicationdate,$classification,$dewey,$subclass,$illus,$pages,$volumeddesc);
moditem('loan',$itemnum,$bibitemnum,$barcode,$notes,$homebranch,$lost,$wthdrawn);
if ($wthdrawn == 0 && $override ne 'yes'){
moditem('loan',$itemnum,$bibitemnum,$barcode,$notes,$homebranch,$lost,$wthdrawn);
print $input->redirect("moredetail.pl?type=intra&bib=$bibnum&bi=$bibitemnum");
print $input->redirect("moredetail.pl?type=intra&bib=$bibnum&bi=$bibitemnum");
} else {
# print "marking cancelled";
#need to check if it is on reserve or issued
my $dbh=C4Connect;
my $flag=0;
my ($resbor,$resrec)=C4::Circulation::Circ2::checkreserve($env,$dbh,$itemnum);
# print $resbor;
if ($resbor){
print $input->header;
print "The biblio or biblioitem this item belongs to has a reserve on it";
$flag=1;
}
my $sth=$dbh->prepare("Select * from issues where (itemnumber='$itemnum') and (returndate is null)");
$sth->execute;
my $data=$sth->fetchrow_hashref;
if ($data->{'borrowernumber'} ne '') {
print $input->header;
print "<p>Item is on issue";
$flag=1;
}
$sth->finish;
$dbh->disconnect;
if ($flag == 1){
my $url=$input->self_url;
$url.="&override=yes";
print "<p> <a href=$url>Cancel Anyway</a> &nbsp; or <a href=\"\">Back</a>";
}else {
moditem('loan',$itemnum,$bibitemnum,$barcode,$notes,$homebranch,$lost,$wthdrawn);
print $input->redirect("moredetail.pl?type=intra&bib=$bibnum&bi=$bibitemnum");
}
}
#print $bibitemnum;
sub checkinp{
@ -84,3 +98,6 @@ sub checkinp{
$inp=~ s/\"/\\\"/g;
return($inp);
}
#sub checkissue{