From e6fb400c7d57fa532d4118491cf0ff99d9b768c3 Mon Sep 17 00:00:00 2001 From: rangi Date: Tue, 16 Jan 2001 23:34:29 +0000 Subject: [PATCH] Fixing a glitch in the fines routine, was failing if adding a new fine to the same user for the same item --- C4/Circulation/Fines.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Circulation/Fines.pm b/C4/Circulation/Fines.pm index d140a7e9e2..52b5fe428d 100644 --- a/C4/Circulation/Fines.pm +++ b/C4/Circulation/Fines.pm @@ -76,7 +76,8 @@ sub CalcFine { and items.biblioitemnumber=biblioitems.biblioitemnumber and biblioitems.itemtype=itemtypes.itemtype and categoryitem.itemtype=itemtypes.itemtype and - categoryitem.categorycode='$bortype' and items.itemlost <> 1"; + categoryitem.categorycode='$bortype' and (items.itemlost <> 1 or +items.itemlost is NULL)"; my $sth=$dbh->prepare($query); # print $query; $sth->execute; @@ -106,7 +107,7 @@ sub UpdateFine { my $dbh=C4Connect; my $query="Select * from accountlines where itemnumber=$itemnum and borrowernumber=$bornum and (accounttype='FU' or accounttype='O' or - accounttype='F' or accounttype='M')"; + accounttype='F' or accounttype='M') and description like '%$due%'"; my $sth=$dbh->prepare($query); # print "$query\n"; $sth->execute; -- 2.39.2