Bug 23454

Summary: Fine for the previous overdue may get overwritten by the next one
Product: Koha Reporter: Hemantha Rao KR <hemantharao.kr>
Component: Fines and feesAssignee: Hemantha Rao KR <hemantharao.kr>
Status: RESOLVED WORKSFORME QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andreas.hedstrom.mace, gmcharlt, hemantharao.kr, kyle.m.hall, martin.renvoize
Version: 18.11   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Test case: Example of Error & correct transaction

Description Hemantha Rao KR 2019-08-13 07:08:18 UTC
The fine for the previous overdue is getting overwritten by the next one in Koha version 18.11 in case of renewal with overdue, this is happening even after updating bug fix patch no. 17135. Please help me out with this error.
Comment 1 Katrin Fischer 2019-08-13 07:46:49 UTC
To clarify, is this the scenario?

1) User checks out item
2) Item goes overdue and accrues fines
3) Item is renewed, fine is left unpaid
4) Item goes overdue again - accrues new fines

In 4) the new fine overwrites the old fine, so that only the new overdue fine is visible?
Comment 2 Hemantha Rao KR 2019-08-13 12:17:13 UTC
(In reply to Katrin Fischer from comment #1)
> To clarify, is this the scenario?
> 
> 1) User checks out item
> 2) Item goes overdue and accrues fines
> 3) Item is renewed, fine is left unpaid
> 4) Item goes overdue again - accrues new fines
> 
> In 4) the new fine overwrites the old fine, so that only the new overdue
> fine is visible?

Please find below the scenario.
1) User checks out item
2) Item goes overdue and accrues fines
3) Item is renewed, 
4) During above step fine amount getting over written on previous overdue of the same item irrespective of dates.
5) Fine is paid for previous overdue, hence it is creating discrepancy in fine amount.

6) Basically it is deleting entry of fine for the same item which was accrued previously
Comment 3 Hemantha Rao KR 2019-08-17 04:41:20 UTC
(In reply to Katrin Fischer from comment #1)
> To clarify, is this the scenario?
> 
> 1) User checks out item
> 2) Item goes overdue and accrues fines
> 3) Item is renewed, fine is left unpaid
> 4) Item goes overdue again - accrues new fines
> 
> In 4) the new fine overwrites the old fine, so that only the new overdue
> fine is visible?

Please let me know if any more details required.
Comment 4 Katrin Fischer 2019-08-17 05:42:08 UTC
Hi Hemantha, we have tried to look into this, but I am not sure about those 2:

3) Item is renewed, 
4) During above step fine amount getting over written on previous overdue of the same item irrespective of dates.

When the item is renewed.. is the fine set to 0? 
Or is it the second renewal? The second time the user has checked out the item?

Sorry, but can you maybe add a more complete test plan, I feel like we are missing something :)
Comment 5 Hemantha Rao KR 2019-08-17 07:57:28 UTC
Created attachment 92334 [details]
Test case: Example of Error & correct transaction

Hi,
Uploaded screen shot of error for the reference, hope this will clear doubts.
Please do the needful.
Comment 6 Hemantha Rao KR 2019-08-17 08:02:54 UTC
(In reply to Katrin Fischer from comment #4)
> Hi Hemantha, we have tried to look into this, but I am not sure about those
> 2:
> 
> 3) Item is renewed, 
> 4) During above step fine amount getting over written on previous overdue of
> the same item irrespective of dates.
> 
> When the item is renewed.. is the fine set to 0? 
> Or is it the second renewal? The second time the user has checked out the
> item?
> 
> Sorry, but can you maybe add a more complete test plan, I feel like we are
> missing something :)

Hi Fischer,
Thank you for your prompt response, I have attached screen shot of example for your reference. The same transactions done in 2 versions of koha viz Koha 3.22.5 & 18.11. You can make out the difference by seeing screen shots.

Hope this will clarify your doubts. Kindly feel free to revert me if any more details required.
Comment 7 Katrin Fischer 2019-08-18 20:42:27 UTC
Don't use the 'in discussion' - we are still trying to confirm this bug, not argueing :)
Comment 8 Hemantha Rao KR 2019-08-19 03:05:36 UTC
(In reply to Katrin Fischer from comment #7)
> Don't use the 'in discussion' - we are still trying to confirm this bug, not
> argueing :)

Sorry, by mistake I have selected 'in discussion'.
Comment 9 Hemantha Rao KR 2019-08-28 04:11:36 UTC
Hi Katrin,
Please let me know if any more details required.
Comment 10 Hemantha Rao KR 2019-09-17 07:35:03 UTC
HI,
Could you please let us know is this is bug or anything wrong with our data or system setting problem.
Comment 11 Andreas Hedström Mace 2019-10-09 08:00:01 UTC
I tried reproducing this issue, based on the information provided, but could not do so (tested mostly on 18.11.04).

Looking at the screenshot provided, I see the problem described, but am not completely sure about the steps that leads to the issue of deleted fines. There seems to be steps missing from the test plan (like that a previous fine for the same item needs to exist, and have been payed. Is there more?). Also, how is the item renewed? From OPAC, staff interface, some other way (api?)?

Also, getting some information about your system preferences, regarding fines and renewals, would be good to help identify this bug.
Comment 12 Andreas Hedström Mace 2019-10-09 13:45:08 UTC
Also, this bug sounds kind of similar to https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17483

But there fines where forgiven during return (not renewal). Could it be the case here as well, that this was in effect for the renewal/return?
Comment 13 Hemantha Rao KR 2019-10-15 07:13:16 UTC
Hi,

- a previous fine for the same item needs to exist, and have been paid - Yes this is the scenario, nothing more
- how is the item renewed? - Bug observed mostly in case of staff interface transaction
-  System settings information wrt to fine and renewal mentioned below:

Loan period: 30 days; Fine amount: 0.50; Fine charging interval: 1; When to charge: End of interval; Fine grace period: 10 days; 

Renewal allowed: 3; No renewal before: 3; Automatic renewal: No; 

- This is case with respect to renewal only, and not pertaining to forgiving fines.

Please let me know if any more details required.
Comment 14 Martin Renvoize (ashimema) 2020-02-11 10:45:38 UTC
I've tried and failed to replicate this as well I'm afraid... :(.

As this appears to be only affecting one installation at this time I'm going to de-escalate it a little so we can concentrate on bugs affecting more users.  If you are still having issues, please let us know and perhaps try to narrow down a reproducible test plan for us.

As an aside, it's always worth keeping up with the point, bugfix, releases.. It would be sensible to perform such an update to 18.11.13 if you have not already done so.. you may find the bug is fixed there already.

Many thanks for your report,
Comment 15 Katrin Fischer 2023-12-08 21:05:25 UTC
In the screenshots we see 2 fines "Accruing", that is where things went wrong as only one fine for an item should ever be accruing. But: we have not been able to replicate.

I believe that in newer versions and accruing fine is correctly set to static when the item is returned or renewed and a second fine will not overwrite, but start over being completely separate.

Please re-open if you can still reproduce this issue in a maintained version.