Bug 18805 - Add ability to use up account credits
Summary: Add ability to use up account credits
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 2696
Blocks: 14825
  Show dependency treegraph
 
Reported: 2017-06-14 18:08 UTC by Kyle M Hall
Modified: 2017-10-14 22:49 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18805 - Add ability to use up account credits (8.80 KB, patch)
2017-06-14 18:17 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2017-06-14 18:08:40 UTC
Right now, in Koha, credits always have a static amount outstanding. So if a patron owes $10 in fines, and has a $10 credit, they technically owe nothing, but yet they still owe $10. This seems rather confusing.

Instead, we should add the ability for credits to be used to pay down closed out fines and other fees.
Comment 1 Kyle M Hall 2017-06-14 18:17:05 UTC
Created attachment 64297 [details] [review]
Bug 18805 - Add ability to use up account credits

Right now, in Koha, credits always have a static amount outstanding. So if a patron owes $10 in fines, and has a $10 credit, they technically owe nothing, but yet they still owe $10. This seems rather confusing.

Instead, we should add the ability for credits to be used to pay down closed out fines and other fees.

Test Plan:
1) Apply this patch and dependencies
2) Create a manual credit of some amount
3) Create a manual invoice
4) Note the manual invoice was automatically paid down using
   the balance from the manual credit!
Comment 2 Lisette 2017-08-11 21:12:58 UTC
After applying the patch when we applied a manual credit we got the following error:
SOFTWARE ERROR
DBIx::Class:Storage::DBI::_dbh_execute():table 'koha_sandbox1.accountoffsets' doesn't exist doesn't exist at /var/lib/koha/sandbox/1.kohaclone/koha/object.pm line 121.

The credit did apply. 

Same error when applying the manual credit.
Behavior appears to be the same both before and after patch.
Comment 3 Caroline Cyr La Rose 2017-09-08 20:51:33 UTC
Error message when trying to apply patch.

fatal: sha1 information is lacking or useless (C4/Accounts.pm)
Comment 4 Colin Campbell 2017-10-10 10:08:15 UTC
I think this is a change in behaviour that was inadvertantly added into - see bug 18580 for one case of it
Comment 5 Katrin Fischer 2017-10-14 20:54:10 UTC
This is at the bottom of a rather long dependency tree where most of the items are not yet pushed to master:

18805: Add ability to use up account credits 

depends on:

2696: Fine Payments Should Show What Was Paid For 
18790: Add ability to void payments 
18786: Add ability to create custom payment types 
14826: Resurrect account offsets table
Comment 6 Katrin Fischer 2017-10-14 22:49:47 UTC
When trying to suspend a hold from the holds list in staff, there is an internal server error that translates to:

Can't call method "ymd" on an undefined value at /home/vagrant/kohaclone/Koha/Hold.pm line 65.