[Koha-devel] Fines Broken

Chris Cormack chris at katipo.co.nz
Mon Sep 26 13:25:40 CEST 2005


Joshua Ferraro wrote:
> Hi all,
> 
> I just discovered (much to my dismay) that fines are broken
> in the 2.2.x and greater series. At first glance, one reason
> for this is that the categoryitem table has been removed. 
> 
Hi Joshua

I think it got removed and replaced with the issuingrules table.
So what needs to happen is C4::Circulation::Fines needs to be edited.
The subroutine CalcFine needs to be changed to use issuingrules not 
categoryitem.

  my $sth=$dbh->prepare("Select * from 
items,biblioitems,itemtypes,issuingrules where items.itemnumber=? 

   and items.biblioitemnumber=biblioitems.biblioitemnumber and 
 

   biblioitems.itemtype=itemtypes.itemtype and 
 

   issuingrules.itemtype=itemtypes.itemtype and 
 

   issuingrules.categorycode=? and (items.itemlost <> 1 or 
items.itemlost is NULL)");

Something like that oughta work (quick hack, needs tidying, but appears 
to work with my tests).

Id make the change and commit it, but my wife is in surgery today, so my 
mind is not on the job. Im fairly sure thats the fix it needs though.

Chris


-- 
Chris Cormack                                      Katipo Communications
Programmer                                         www.katipo.co.nz
027 4500 789




More information about the Koha-devel mailing list