kohabug 2379 When a borrower is added manually in Koha...

This checks that the enrolmentfee for a category both exists, and is greater than 0, avoiding a spurious charge.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Jesse Weaver 2008-07-25 11:51:34 -05:00 committed by Joshua Ferraro
parent f6a3f83ca2
commit 406dbcd39a

View file

@ -771,7 +771,7 @@ sub AddMember {
$sth = $dbh->prepare("SELECT enrolmentfee FROM categories WHERE categorycode=?");
$sth->execute($data{'categorycode'});
my ($enrolmentfee) = $sth->fetchrow;
if ($enrolmentfee) {
if ($enrolmentfee && $enrolmentfee > 0) {
# insert fee in patron debts
manualinvoice($data{'borrowernumber'}, '', '', 'A', $enrolmentfee);
}