Bug 11887 - Add script for collections agency reports
Summary: Add script for collections agency reports
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on: 6427
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-04 13:23 UTC by Kyle M Hall
Modified: 2020-02-08 14:21 UTC (History)
6 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 11887 - Add script for collections agency reports (14.07 KB, patch)
2014-03-04 13:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11887 - Add script for collections agency reports (14.08 KB, patch)
2014-07-23 17:23 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11887 - Add script for collections agency reports (14.08 KB, patch)
2014-07-28 14:18 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11887 - Add script for collections agency reports (14.40 KB, patch)
2014-09-02 14:49 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11887 - Add script for collections agency reports (14.39 KB, patch)
2014-09-02 14:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11887 - Add script for collections agency reports (14.43 KB, patch)
2014-09-19 18:42 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 2014-03-04 13:23:30 UTC
Some libraries use collections agencies such as Unique Management Services to collection large unpaid balances owed to the library. It would be helpful if Koha had a standard script to generate these reports, rather than forcing each library to create their own solution.
Comment 1 Kyle M Hall 2014-03-04 13:33:21 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2014-03-17 20:50:05 UTC
Since this is your baby, I was wondering if you were really releasing under GPL v2, or perhaps you just hadn't copied the lastest license from http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence
Comment 3 Kyle M Hall 2014-07-23 17:23:29 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2014-07-28 14:18:07 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2014-09-02 14:49:18 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall 2014-09-02 14:50:55 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall 2014-09-19 18:42:22 UTC
Created attachment 31778 [details] [review]
Bug 11887 - Add script for collections agency reports

Some libraries use collections agencies such as Unique Management
Services to collection large unpaid balances owed to the library. It
would be helpful if Koha had a standard script to generate these
reports, rather than forcing each library to create their own solution.

This script is written following the guidelines for Unique Management
Systems. However, the reports it outputs should be useable by any
collections agency.

Test Plan:
1) Create the four required patron attributes
2) Create a patron who owes more then 5.00 in fees
3) Run the submission report
   account_collections.pl -r submission
   \ -mb 3 -bd $yesterday_iso -ed $tomorrow_iso -f 10
   \ -ft $fee_type -fd $fee_desc -c $can-collect-attribute-code
   \ -i $in-collections-attribute-code -l $last-updated-attribute-code
   \ -p previous-balance-attribute-code
4) Note the patron is now marked as in collections and has had the
   collections fee of 10.00 applied
5) Add a new fee to the patron's account
6) Run the update report with the same additional parameters
7) Verify the csv file generated contains that patron
8) Run the sync report with the same additional parameters
9) Note the csv file generated contains that patron
Comment 8 Owen Leonard 2016-08-19 14:52:19 UTC
Should this be 'Needs signoff?'
Comment 9 Lisette Scheer 2017-03-08 18:24:55 UTC
(In reply to Owen Leonard from comment #8)
> Should this be 'Needs signoff?'

I agree with Owen, it looks like this should be "Needs Signoff" instead of assigned. Nick?
Comment 10 Katrin Fischer 2020-01-05 12:51:02 UTC
(In reply to Lisette Scheer from comment #9)
> (In reply to Owen Leonard from comment #8)
> > Should this be 'Needs signoff?'
> 
> I agree with Owen, it looks like this should be "Needs Signoff" instead of
> assigned. Nick?

Just switching it... amazingly it still applies.
Comment 11 Katrin Fischer 2020-01-05 12:51:28 UTC
(In reply to Katrin Fischer from comment #10)
> (In reply to Lisette Scheer from comment #9)
> > (In reply to Owen Leonard from comment #8)
> > > Should this be 'Needs signoff?'
> > 
> > I agree with Owen, it looks like this should be "Needs Signoff" instead of
> > assigned. Nick?
> 
> Just switching it... amazingly it still applies.

Maybe not so amazing for a new script...
Comment 12 David Nind 2020-02-08 00:20:55 UTC
For whatever reason, I can't get this to run and get this error message:

root@d541025c7641:cronjobs(bz11887)$ ./account_collections.pl -h
Can't locate Koha/Accounts.pm in @INC (you may need to install the Koha::Accounts module) (@INC contains: /kohadevbox/koha /kohadevbox/qa-test-tools /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ./account_collections.pl line 27.
BEGIN failed--compilation aborted at ./account_collections.pl line 27.

For reference for testing:

Add four patron attribute codes (Home > Administration > Patrons and circulation > Patron attribute types) and use these codes when running, suggestions are:
- COLLECT-CF (Description: Code used to define if a patron can be collected from; YES_NO authorized value)
- COLLECT-IN (Description: Code used to define if a patron is currently in collections; YES_NO authorized value)
- COLLECT-LU (Description: Attribute field used to define the date the patron was last updated for collections purposes)
- COLLECT-PB (Description: Attribute field to record the patron balance of the last time the update report was run)

Add a collection fee code (Home > Administration > Accounting > Debit types), suggestion is:
- COLLECT (Default amount: 10.00; Description: Collection fee; Can be manually invoiced: ticked)
Comment 13 Katrin Fischer 2020-02-08 11:41:23 UTC
Hm, have you run it from koha-shell? But it could also be caused by all the changes to the Accounts code.
Comment 14 David Nind 2020-02-08 14:21:53 UTC
(In reply to Katrin Fischer from comment #13)
> Hm, have you run it from koha-shell? But it could also be caused by all the
> changes to the Accounts code.

I did - other scripts ran okay. Changing status to Failed QA.