CVS: koha/C4/Circulation Fines.pm,1.2,1.3
Update of /cvsroot/koha/koha/C4/Circulation In directory usw-pr-cvs1:/tmp/cvs-serv19101/C4/Circulation Modified Files: Fines.pm Log Message: Deals with lost book charges now Index: Fines.pm =================================================================== RCS file: /cvsroot/koha/koha/C4/Circulation/Fines.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Fines.pm 16 Jan 2001 23:34:29 -0000 1.2 --- Fines.pm 17 Mar 2002 02:58:00 -0000 1.3 *************** *** 14,18 **** @ISA = qw(Exporter); ! @EXPORT = qw(&Getoverdues &CalcFine &BorType &UpdateFine); %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ], --- 14,18 ---- @ISA = qw(Exporter); ! @EXPORT = qw(&Getoverdues &CalcFine &BorType &UpdateFine &ReplacementCost); %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ], *************** *** 77,82 **** biblioitems.itemtype=itemtypes.itemtype and categoryitem.itemtype=itemtypes.itemtype and ! categoryitem.categorycode='$bortype' and (items.itemlost <> 1 or ! items.itemlost is NULL)"; my $sth=$dbh->prepare($query); # print $query; --- 77,81 ---- biblioitems.itemtype=itemtypes.itemtype and categoryitem.itemtype=itemtypes.itemtype and ! categoryitem.categorycode='$bortype' and (items.itemlost <> 1 or items.itemlost is NULL)"; my $sth=$dbh->prepare($query); # print $query; *************** *** 123,127 **** amountoutstanding=$out,accounttype='FU' where borrowernumber=$data->{'borrowernumber'} and itemnumber=$data->{'itemnumber'} ! and (accounttype='FU' or accounttype='O');"; my $sth2=$dbh->prepare($query2); $sth2->execute; --- 122,126 ---- amountoutstanding=$out,accounttype='FU' where borrowernumber=$data->{'borrowernumber'} and itemnumber=$data->{'itemnumber'} ! and (accounttype='FU' or accounttype='O') and description like '%$due%'"; my $sth2=$dbh->prepare($query2); $sth2->execute; *************** *** 172,175 **** --- 171,185 ---- } + sub ReplacementCost{ + my ($itemnum)=@_; + my $dbh=C4Connect; + my $query="Select replacementprice from items where itemnumber='$itemnum'"; + my $sth=$dbh->prepare($query); + $sth->execute; + my $data=$sth->fetchrow_hashref; + $sth->finish; + $dbh->disconnect; + return($data->{'replacementprice'}); + } END { } # module clean-up code here (global destructor)
participants (1)
-
Chris Cormack