[Koha-patches] [PATCH] Fines On Return

Kyle Hall kyle.m.hall at gmail.com
Wed Jan 21 19:19:48 CET 2009


Indeed, you are correct sir!

Kyle

http://www.kylehall.info
Information Technology
Crawford County Federated Library System ( http://www.ccfls.org )




On Wed, Jan 21, 2009 at 12:33 PM, Michael Hafen
<mdhafen at tech.washk12.org> wrote:
> It seems you forgot to `use C4::FinesOnReturn`, I'm guessing you meant
> that to be in C4::Circulation.
>
> On Wed, 2009-01-21 at 09:54 -0500, Kyle Hall wrote:
> [snip]
>> diff --git a/C4/Circulation.pm b/C4/Circulation.pm
>> index 372b5e8..dfc57ae 100644
>> --- a/C4/Circulation.pm
>> +++ b/C4/Circulation.pm
>> @@ -1364,6 +1364,10 @@ sub AddReturn {
>>      my $validTransfert = 0;
>>      my $reserveDone = 0;
>>
>> +    if ( C4::Context->preference("calcFineOnReturn") ) {
>> +       CreateFineOnReturn( $barcode );
>> +    }
>> +
>>      # get information on item
>>      my $iteminformation = GetItemIssue( GetItemnumberFromBarcode($barcode));
>>      my $biblio = GetBiblioItemData($iteminformation->{'biblioitemnumber'});
>> @@ -2073,6 +2077,12 @@ sub AddRenewal {
>>      $sth->execute( $borrowernumber, $itemnumber );
>>      my $issuedata = $sth->fetchrow_hashref;
>>      $sth->finish;
>> +
>> +    # If using FinesOnReturn, we need to create the fine before
>> +    # updating the issues row
>> +    if ( C4::Context->preference("calcFineOnReturn") ) {
>> +       CreateFineOnReturn( my $barcode, $itemnumber );
>> +    }
>>
>>      # Update the issues record to have the new due date, and a new count
>>      # of how many times it has been renewed.
> [snip]
>
> --
> Michael Hafen
> Systems Analyst and Programmer
> Washington County School District
> Utah, USA
>
> for Koha checkout
> http://koha-dev.washk12.org
> or
> git://koha-dev.washk12.org/koha
>
>



More information about the Koha-patches mailing list