View | Details | Raw Unified | Return to bug 21207
Collapse All | Expand All

(-)a/C4/Overdues.pm (-35 lines)
Lines 69-79 BEGIN { Link Here
69
    push @EXPORT, qw(
69
    push @EXPORT, qw(
70
      &GetIssuesIteminfo
70
      &GetIssuesIteminfo
71
    );
71
    );
72
73
    # subs to move to Biblio.pm
74
    push @EXPORT, qw(
75
      &GetItems
76
    );
77
}
72
}
78
73
79
=head1 NAME
74
=head1 NAME
Lines 699-733 sub GetFine { Link Here
699
    return 0;
694
    return 0;
700
}
695
}
701
696
702
=head2 GetItems
703
704
    ($items) = &GetItems($itemnumber);
705
706
Returns the list of all delays from overduerules.
707
708
C<$items> is a reference-to-hash whose keys are all of the fields
709
from the items tables of the Koha database. Thus,
710
711
C<$itemnumber> contains the borrower categorycode
712
713
=cut
714
715
# FIXME: This is a bad function to have here.
716
# Shouldn't it be in C4::Items?
717
# Shouldn't it be called GetItem since you only get 1 row?
718
# Shouldn't it be called GetItem since you give it only 1 itemnumber?
719
720
sub GetItems {
721
    my $itemnumber = shift or return;
722
    my $query = qq|SELECT *
723
             FROM items
724
              WHERE itemnumber=?|;
725
    my $sth = C4::Context->dbh->prepare($query);
726
    $sth->execute($itemnumber);
727
    my ($items) = $sth->fetchrow_hashref;
728
    return ($items);
729
}
730
731
=head2 GetBranchcodesWithOverdueRules
697
=head2 GetBranchcodesWithOverdueRules
732
698
733
    my @branchcodes = C4::Overdues::GetBranchcodesWithOverdueRules()
699
    my @branchcodes = C4::Overdues::GetBranchcodesWithOverdueRules()
734
- 

Return to bug 21207