Bug 18805 - Add ability to use up account credits
Summary: Add ability to use up account credits
Status: Needs Signoff
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-08-11 21:12 UTC (History)
4 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.