[Koha] Forgiving all overdue fines

Raymund Delahunty r.delahunty at arts.ac.uk
Thu Mar 24 21:19:13 NZDT 2022


Hello Charles-

We do not have any write access to the tables and any database updates are done by our support company. I understand they have a script they run to do the business.

I think what PTFS were offering was a simple report for us to run to provide that ‘report for posterity’, but I had already obtained those details when I asked senior management for approval to have the fines removed. They may also have wanted to see how big the job would be for their script.

I doubt very much if the report processor would accept UPDATE clauses, even if I was logged in as a user that had write access to the tables. I know I have to be very careful not to include words like UPDATE or DELETE when writing reports (say, in tips to users running a report where they have to enter something like a date range).  Use of these bad words causes an error in the SQL.

Ray Delahunty
University of the Arts London

From: Charles Kelley <cmkelleymls at gmail.com>
Sent: 24 March 2022 02:17
To: Discussion Group Koha <koha at lists.katipo.co.nz>; Raymund Delahunty <r.delahunty at arts.ac.uk>
Subject: Re: Forgiving all overdue fines

Hello, Raymund!

    In a recent exchange, on 24 Mch. 2022 at 08:00 [JST], I read the following from you through the Koha Discussion Group.

We did exactly the same thing. We decided to wipe all fines (not cocts of replacements) accrued since 14th December 2019. We had PTFS Europe (our support company) do this. They ran this little SQL:

SELECT accountlines_id, date, accounttype, payment_type, amountoutstanding FROM accountlines
WHERE date > '2019-12-14'
AND accounttype IN ('F','FU')
AND amountoutstanding > 0

The support analyst said: "This finds 5129 bills. If you are happy for these to be deleted, let me know".

I did, and they were gone in an instant.


    I'm curious: You didn't have to make a SQL statement like this:

UPDATE accountlines
    SET amountoutstanding = 0
    WHERE date > '2019-12-14' AND accounttype IN ('F', 'FU') AND amountoutstanding > 0;

    Does the Koha report processor accept UPDATE clauses or do you know?

    Of course, if you want for posterity a report of forgiven fines before they are forgiven, you probably would want run the SELECT SQL statement above.

--

    よろしくお願いします。

    -- Charles.

    Charles Kelley, MLS
    PSC 704 Box 1029
    APO AP 96338

    Charles Kelley
    Tsukimino 1-Chome 5-2
    Tsukimino Gaadenia #210
    Yamato-shi, Kanagawa-ken
    〒242-0002 JAPAN

    +1-301-741-7122 [US cell]
    +81-80-4356-2178 [JPN cell]

    mnogojazyk at aol.com<mailto:mnogojazyk at aol.com> [h]
    cmkelleymls at gmail.com<mailto:cmkelleymls at gmail.com> [p]

    linkedin.com/in/cmkelleymls<http://www.linkedin.com/in/cmkelleymls>
    Meeting Your Information Needs. Virtually.
This email and any attachments are intended solely for the addressee and may contain confidential information. If you are not the intended recipient of this email and/or its attachments you must not take any action based upon them and you must not copy or show them to anyone. Please send the email back to us and immediately and permanently delete it and its attachments. Where this email is unrelated to the business of University of the Arts London or of any of its group companies the opinions expressed in it are the opinions of the sender and do not necessarily constitute those of University of the Arts London (or the relevant group company). Where the sender's signature indicates that the email is sent on behalf of UAL Short Courses Limited the following also applies: UAL Short Courses Limited is a company registered in England and Wales under company number 02361261. Registered Office: University of the Arts London, 272 High Holborn, London WC1V 7EY


More information about the Koha mailing list