my $sth = $dbh->prepare("SELECT notforloan FROM itemtypes WHERE itemtype = ?");
$sth->execute($item->{'itemtype'});
my $notforloan=$sth->fetchrow_hashref();
- $sth->finish();
if ($notforloan->{'notforloan'}) {
if (!C4::Context->preference("AllowNotForLoanOverride")) {
$issuingimpossible{NOT_FOR_LOAN} = 1;
(?,?,?,?)");
$usth->execute($data->{'borrowernumber'},$accdata->{'accountno'},$nextaccntno,$newamtos);
}
- $msth->finish; # $msth might actually have data left
}
$amountleft *= -1 if ($amountleft > 0);
my $desc = "Item Returned " . $item_id;
my $sth = $dbh->prepare( $statement );
$sth->execute( @bind_parameters );
my $upcoming_dues = $sth->fetchall_arrayref({});
- $sth->finish;
return $upcoming_dues;
}
);
$sth->execute( $borrowernumber, $itemnumber );
my $issuedata = $sth->fetchrow_hashref;
- $sth->finish;
if(defined $datedue && ref $datedue ne 'DateTime' ) {
carp 'Invalid date passed to AddRenewal.';
return;
);
$sth->execute( $datedue->strftime('%Y-%m-%d %H:%M'), $renews, $lastreneweddate, $borrowernumber, $itemnumber );
- $sth->finish;
# Update the renewal count on the item, and tell zebra to reindex
$renews = $biblio->{'renewals'} + 1;
$sth->execute( $bornum, $itemno );
my $data = $sth->fetchrow_hashref;
$renewcount = $data->{'renewals'} if $data->{'renewals'};
- $sth->finish;
# $item and $borrower should be calculated
my $branchcode = _GetCircControlBranch($item, $borrower);
}
}
- $sth->finish; # we havent _explicitly_ fetched all rows
return ( $charge, $item_type );
}
";
my $sth = $dbh->prepare($query);
$sth->execute( $borrowernumber, $itemnumber, $nextaccntno, $charge, $charge, $manager_id );
- $sth->finish;
}
=head2 GetTransfers
my $sth = $dbh->prepare($query);
$sth->execute($itemnumber);
my @row = $sth->fetchrow_array();
- $sth->finish;
return @row;
}
while ( my $data = $sth->fetchrow_hashref ) {
push @gettransfers, $data;
}
- $sth->finish;
return (@gettransfers);
}
AND datearrived IS NULL "
);
$sth->execute($itemnumber);
- $sth->finish;
}
=head2 AnonymiseIssueHistory
"update branchtransfers set datearrived = now(),tobranch=?,comments='wrongtransfer' where itemnumber= ? AND datearrived IS NULL"
);
$sth->execute($FromLibrary,$itemNumber);
- $sth->finish;
# second step create a new line of branchtransfer to the right location .
ModItemTransfer($itemNumber, $FromLibrary, $waitingAtLibrary);
my $sth = $dbh->prepare($query);
$sth->execute($branchcode,$week_day);
my $result=$sth->fetchrow;
-$sth->finish;
return $result;
}
my $sth = $dbh->prepare($query);
$sth->execute($years,$month,$day,$branchcode);
my $countspecial=$sth->fetchrow ;
-$sth->finish;
return $countspecial;
}
my $sth = $dbh->prepare($query);
$sth->execute($month,$day,$branchcode);
my $countspecial=$sth->fetchrow ;
-$sth->finish;
return $countspecial;
}
my $sth = $dbh->prepare($query);
$sth->execute($barcode);
my $exist=$sth->fetchrow ;
-$sth->finish;
return $exist;
}
WHERE issues.itemnumber=?");
$sth->execute($itemnumber);
my $issues=$sth->fetchrow_hashref();
- $sth->finish;
# If a borrower lost the item, add a replacement cost to the their record
if ( my $borrowernumber = $issues->{borrowernumber} ){
my $sth = $dbh->prepare("SELECT * FROM pending_offline_operations WHERE branchcode=? ORDER BY timestamp");
$sth->execute(C4::Context->userenv->{'branch'});
my $results = $sth->fetchall_arrayref({});
- $sth->finish;
return $results;
}
my $sth = $dbh->prepare("SELECT * FROM pending_offline_operations WHERE operationid=?");
$sth->execute( shift );
my $result = $sth->fetchrow_hashref;
- $sth->finish;
return $result;
}