Bug 16820

Summary: Add possibility to edit fines
Product: Koha Reporter: Marjorie Barry-Vila <marjorie.barry-vila>
Component: Fines and feesAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: NEW --- QA Contact: Kyle M Hall (khall) <kyle>
Severity: enhancement    
Priority: P5 - low CC: david.bourgault, gmcharlt, jonathan.druart, kebliss, kyle.m.hall, kyle, martin.renvoize, nengard
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 14825    
Attachments: Bug 16820 - Edit accountlines from borrower's profile
Bug 16820 - Edit accountlines from borrower's profile

Description Marjorie Barry-Vila 2016-06-27 18:13:22 UTC
Hi,

It would be great to have to edit fines if a mistake is made in the amount or in the notes.

Regards,
Marjorie
Comment 1 David Bourgault 2017-09-22 14:29:49 UTC
Created attachment 67313 [details] [review]
Bug 16820 - Edit accountlines from borrower's profile

Adds the option to edit an accountline from a borrower's profile page in the intranet.

Test plan :
0) Try to edit an accountline, you can't
1) Apply patch
2) Try to edit an accountline, you can

Also solves Bug 2193
Comment 2 Alex Buckley 2017-10-04 03:40:36 UTC
Created attachment 67585 [details] [review]
Bug 16820 - Edit accountlines from borrower's profile

Adds the option to edit an accountline from a borrower's profile page in the intranet.

Test plan :
0) Try to edit an accountline, you can't
1) Apply patch
2) Try to edit an accountline, you can

Also solves Bug 2193

Followed test plan, patch worked as described. Also ran QA test tools
and all 3 modified files passed

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Comment 3 Kyle M Hall (khall) 2017-10-27 17:06:29 UTC
Editing fines should create account offsets to reflect the change in amount to a fine if applicable. It would also be nice if the code use Koha::Account::Line(s) instead of direct sql.
Comment 4 Katrin Fischer 2017-11-10 09:59:19 UTC
Please also consider to add a separate permission for this, some libraries might consider it dangerous or not want everyone to be able to do this.
Comment 5 Kyle M Hall (khall) 2018-01-10 13:37:05 UTC
Needed to pass qa:
1) Implement use of Account Offsets. Any change to a fee or payment needs to add to the account offsets table from now on. The point of it is to create a full accounting of all changes to accountlines

2) Add a user permission for this functionality

3) Implement using Koha::Account::Line(s)/Offset(s) instead of using direct SQL queries. These new subs should live in Koha::Account::Line since they are operating on individual accountlines. We need to reduce the number of subs in the C4 namespace instead of adding to them ; )
Comment 6 Jonathan Druart 2018-01-10 13:37:45 UTC
So... once and for all: new subroutines cannot be added to the C4 namespace and you have to provide test coverage.
We are moving the code from C4 to Koha, so I will not accept more subroutines to C4.
Comment 7 Kyle M Hall (khall) 2018-01-10 13:40:47 UTC
4) Add unit tests
Comment 8 Katrin Fischer 2019-05-04 17:36:24 UTC
*** Bug 2193 has been marked as a duplicate of this bug. ***
Comment 9 Martin Renvoize (ashimema) 2019-05-06 20:06:51 UTC
Hmm, should we use 'adjust' or should we create a new credit/debit and offset against the original for this.

I'm torn
Comment 10 Martin Renvoize (ashimema) 2019-09-25 10:09:10 UTC
I'm going to assume David Bourgault isn't going to get back to this and unassign it so we can fold it into the accounts tree afresh.
Comment 11 Martin Renvoize (ashimema) 2021-02-02 08:54:24 UTC
With the introduction of a discounts process in accounts with bug 24081 I think this is resolved.
Comment 12 Martin Renvoize (ashimema) 2021-02-02 08:54:33 UTC

*** This bug has been marked as a duplicate of bug 24081 ***
Comment 13 Katrin Fischer 2021-02-02 14:16:21 UTC
What if you made the fine too low and want to fix that? I am not sure if this is really fixed by the discount feature.
Comment 14 Marjorie Barry-Vila 2021-02-02 14:24:42 UTC
(In reply to Martin Renvoize from comment #11)
> With the introduction of a discounts process in accounts with bug 24081 I
> think this is resolved.

Hi Martin,

Katrin is right. The new feature for making a discount does not allow you to increase the amount of the fine.
For example, it is convenient to be able to change an amount when a replacement price no longer matches the market value of an item.

Marjorie