-=head2 NumberNotifyId
-
- (@notify) = &NumberNotifyId($borrowernumber);
-
-Returns amount for all file per borrowers
-C<@notify> array contains all file per borrowers
-
-C<$notify_id> contains the file number for the borrower number nad item number
-
-=cut
-
-sub NumberNotifyId{
- my ($borrowernumber)=@_;
- my $dbh = C4::Context->dbh;
- my $query=qq| SELECT distinct(notify_id)
- FROM accountlines
- WHERE borrowernumber=?|;
- my @notify;
- my $sth = $dbh->prepare($query);
- $sth->execute($borrowernumber);
- while ( my ($numberofnotify) = $sth->fetchrow ) {
- push( @notify, $numberofnotify );
- }
- return (@notify);
-}
-
-=head2 AmountNotify
-
- ($totalnotify) = &AmountNotify($notifyid);
-
-Returns amount for all file per borrowers
-C<$notifyid> is the file number
-
-C<$totalnotify> contains amount of a file
-
-C<$notify_id> contains the file number for the borrower number and item number
-
-=cut
-
-sub AmountNotify{
- my ($notifyid,$borrowernumber)=@_;
- my $dbh = C4::Context->dbh;
- my $query=qq| SELECT sum(amountoutstanding)
- FROM accountlines
- WHERE notify_id=? AND borrowernumber = ?|;
- my $sth=$dbh->prepare($query);
- $sth->execute($notifyid,$borrowernumber);
- my $totalnotify=$sth->fetchrow;
- $sth->finish;
- return ($totalnotify);
-}
-
-=head2 GetItems
-
- ($items) = &GetItems($itemnumber);
-
-Returns the list of all delays from overduerules.
-
-C<$items> is a reference-to-hash whose keys are all of the fields
-from the items tables of the Koha database. Thus,
-
-C<$itemnumber> contains the borrower categorycode
-
-=cut
-
-# FIXME: This is a bad function to have here.
-# Shouldn't it be in C4::Items?
-# Shouldn't it be called GetItem since you only get 1 row?
-# Shouldn't it be called GetItem since you give it only 1 itemnumber?
-
-sub GetItems {
- my $itemnumber = shift or return;
- my $query = qq|SELECT *
- FROM items
- WHERE itemnumber=?|;
- my $sth = C4::Context->dbh->prepare($query);
- $sth->execute($itemnumber);
- my ($items) = $sth->fetchrow_hashref;
- return ($items);
-}
-