fixing date error
This commit is contained in:
parent
55a60aa3ea
commit
27a993a16f
3 changed files with 26 additions and 4 deletions
|
@ -165,7 +165,7 @@ sub returnrecord {
|
|||
#my $amt_owing = calc_odues($env,$dbh,$bornum,$itemno);
|
||||
my @datearr = localtime(time);
|
||||
my $dateret = (1900+$datearr[5])."-".$datearr[4]."-".$datearr[3];
|
||||
my $query = "update issues set returndate = '$dateret', branchcode ='$env->{'branchcode'}' where
|
||||
my $query = "update issues set returndate = now(), branchcode ='$env->{'branchcode'}' where
|
||||
(borrowernumber = '$bornum') and (itemnumber = '$itemno')
|
||||
and (returndate is null)";
|
||||
my $sth = $dbh->prepare($query);
|
||||
|
|
25
C4/Search.pm
25
C4/Search.pm
|
@ -16,7 +16,7 @@ $VERSION = 0.01;
|
|||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(&CatSearch &BornameSearch &ItemInfo &KeywordSearch &subsearch
|
||||
&itemdata &bibdata &GetItems &borrdata &getacctlist &itemnodata &itemcount
|
||||
&OpacSearch &borrdata2 &NewBorrowerNumber &bibitemdata);
|
||||
&OpacSearch &borrdata2 &NewBorrowerNumber &bibitemdata &borrissues);
|
||||
%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
|
||||
|
||||
# your exported package globals go here,
|
||||
|
@ -499,7 +499,7 @@ sub BornameSearch {
|
|||
}
|
||||
$query=$query.") or cardnumber = '$searchstring'
|
||||
order by surname,firstname";
|
||||
print $query,"\n";
|
||||
# print $query,"\n";
|
||||
my $sth=$dbh->prepare($query);
|
||||
$sth->execute;
|
||||
my @results;
|
||||
|
@ -533,6 +533,27 @@ sub borrdata {
|
|||
return($data);
|
||||
}
|
||||
|
||||
sub borrissues {
|
||||
my ($bornum)=@_;
|
||||
my $dbh=C4Connect;
|
||||
my $query;
|
||||
$query="Select * from issues,biblio,items where borrowernumber='$bornum' and
|
||||
items.itemnumber=issues.itemnumber and
|
||||
items.biblionumber=biblio.biblionumber and issues.returndate is NULL";
|
||||
#print $query;
|
||||
my $sth=$dbh->prepare($query);
|
||||
$sth->execute;
|
||||
my @result;
|
||||
my $i=0;
|
||||
while (my $data=$sth->fetchrow_hashref){
|
||||
$result[$i]=$data;;
|
||||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
$dbh->disconnect;
|
||||
return($i,\@result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub borrdata2 {
|
||||
|
|
|
@ -43,7 +43,8 @@ for (my $i=0; $i < $count; $i++){
|
|||
} else {
|
||||
$toggle="white";
|
||||
}
|
||||
print mktablerow(8,$toggle,mklink("/cgi-bin/koha/memberentry.pl?bornum=".$results->[$i]{'borrowernumber'},$results->[$i]{'cardnumber'}),
|
||||
#mklink("/cgi-bin/koha/memberentry.pl?bornum=".$results->[$i]{'borrowernumber'},$results->[$i]{'cardnumber'}),
|
||||
print mktablerow(8,$toggle,mklink("/cgi-bin/koha/moremember.pl?bornum=".$results->[$i]{'borrowernumber'},$results->[$i]{'cardnumber'}),
|
||||
$results->[$i]{'surname'},$results->[$i]{'firstname'},
|
||||
$results->[$i]{'categorycode'},$results->[$i]{'streetaddress'}." ".$results->[$i]{'city'},"$od/$issue",$fines,
|
||||
$results->[$i]{'borrowernotes'});
|
||||
|
|
Loading…
Reference in a new issue