# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id$
use strict;
require Exporter;
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
-$VERSION = do { my @v = '$Revision$' =~ /\d+/g;
- shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v );
-};
+$VERSION = 3.00;
=head1 NAME
sub returnlost {
my ( $borrowernumber, $itemnum ) = @_;
my $dbh = C4::Context->dbh;
- my $borrower = GetMember( $borrowernumber, 'borrowernumber' );
+ my $borrower = C4::Members::GetMember( $borrowernumber, 'borrowernumber' );
my $sth = $dbh->prepare(
"UPDATE issues SET returndate=now() WHERE
borrowernumber=? AND itemnumber=? AND returndate IS NULL"
my $sth = $dbh->prepare(
"INSERT INTO accountlines
(borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding, itemnumber,notify_id)
- VALUES (?, ?, now(), ?,?, ?,?,?,?)"
- );
-
-# $sth->execute($borrowernumber, $accountno, $amount, $desc, $type, $amountleft, $data->{'itemnumber'});
- $sth->execute( $borrowernumber, $accountno, $amount, $desc, $type,
- $amountleft, $itemnum, $notifyid );
- }
- else {
- my $sth = $dbh->prepare(
- "INSERT INTO accountlines
+ VALUES (?, ?, now(), ?,?, ?,?,?,?)");
+ $sth->execute($borrowernumber, $accountno, $amount, $desc, $type, $amountleft, $itemnum,$notifyid) || return $sth->errstr;
+ } else {
+ my $sth=$dbh->prepare("INSERT INTO accountlines
(borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding,notify_id)
VALUES (?, ?, now(), ?, ?, ?, ?,?)"
);
$sth->execute( $borrowernumber, $accountno, $amount, $desc, $type,
$amountleft, $notifyid );
}
+ return 0;
}
=head2 fixcredit